/* ============ Variables & base ============ */
:root {
    --green: #2ee6a8;
    --green-dark: #17b581;
    --blue: #4dd0e1;
    --blue-light: #8be9f5;
    --bg: #0b1f22;
    --bg-2: #0e2a2e;
    --surface: rgba(255, 255, 255, 0.05);
    --surface-2: rgba(255, 255, 255, 0.08);
    --border: rgba(77, 208, 225, 0.18);
    --text: #e8f7f5;
    --text-dim: #9dc4c4;
    --grad: linear-gradient(120deg, var(--green), var(--blue));
    --radius: 18px;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Poppins', sans-serif;
    background: radial-gradient(1200px 800px at 80% -10%, rgba(77, 208, 225, 0.12), transparent),
                radial-gradient(1000px 700px at -10% 110%, rgba(46, 230, 168, 0.10), transparent),
                linear-gradient(160deg, var(--bg), var(--bg-2));
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

::selection { background: rgba(46, 230, 168, 0.35); }

/* ============ Fond 3D animé ============ */
.bg-scene {
    position: fixed;
    inset: 0;
    z-index: -1;
    perspective: 900px;
    overflow: hidden;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.35;
    animation: orbFloat 22s ease-in-out infinite alternate;
}
.orb-1 { width: 420px; height: 420px; background: var(--green); top: -120px; left: -100px; }
.orb-2 { width: 380px; height: 380px; background: var(--blue); bottom: -140px; right: -80px; animation-delay: -5s; }
.orb-3 { width: 260px; height: 260px; background: var(--blue-light); top: 40%; left: 55%; opacity: 0.18; animation-delay: -9s; }

@keyframes orbFloat {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(60px, -50px, 0) scale(1.15); }
}

.floating-cube {
    position: absolute;
    transform-style: preserve-3d;
    animation: cubeSpin 45s linear infinite;
}
.cube-1 { width: 90px; height: 90px; top: 18%; left: 8%; }
.cube-2 { width: 60px; height: 60px; top: 65%; left: 82%; animation-duration: 38s; animation-direction: reverse; }
.cube-3 { width: 45px; height: 45px; top: 78%; left: 15%; animation-duration: 55s; }

.floating-cube .face {
    position: absolute;
    inset: 0;
    background: rgba(46, 230, 168, 0.06);
    border: 1px solid rgba(77, 208, 225, 0.35);
    box-shadow: inset 0 0 30px rgba(46, 230, 168, 0.12);
}
.cube-1 .face { --s: 45px; } .cube-2 .face { --s: 30px; } .cube-3 .face { --s: 22.5px; }
.face.front  { transform: translateZ(var(--s)); }
.face.back   { transform: rotateY(180deg) translateZ(var(--s)); }
.face.right  { transform: rotateY(90deg) translateZ(var(--s)); }
.face.left   { transform: rotateY(-90deg) translateZ(var(--s)); }
.face.top    { transform: rotateX(90deg) translateZ(var(--s)); }
.face.bottom { transform: rotateX(-90deg) translateZ(var(--s)); }

@keyframes cubeSpin {
    from { transform: rotateX(0) rotateY(0) rotateZ(0); }
    to   { transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg); }
}

/* ============ Navbar ============ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(16px);
    background: rgba(11, 31, 34, 0.7);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    perspective: 500px;
}

.wolf-logo {
    width: 34px;
    height: 34px;
    filter: drop-shadow(0 0 10px rgba(46, 230, 168, 0.45));
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.logo:hover .wolf-logo { transform: rotate(-8deg) scale(1.12); }
.wolf-logo-lg {
    width: 145px;
    height: 145px;
    filter: drop-shadow(0 4px 18px rgba(4, 20, 17, 0.65)) drop-shadow(0 0 26px rgba(46, 230, 168, 0.5));
}

.logo-text {
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--text);
    letter-spacing: 0.5px;
}
.logo-text span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.nav-tabs { display: flex; gap: 6px; margin-left: auto; }

.tab-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 10px 18px;
    border-radius: 12px;
    cursor: pointer;
    transition: color 0.25s, background 0.25s, transform 0.25s;
}
.tab-btn:hover { color: var(--text); background: var(--surface); transform: translateY(-2px); }
.tab-btn.active { color: #06251c; background: var(--grad); font-weight: 600; }

.nav-auth { display: flex; gap: 10px; }

/* ============ Boutons ============ */
.btn {
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 10px 22px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: transform 0.25s, box-shadow 0.25s, background 0.25s, color 0.25s;
}
.btn-primary {
    background: var(--grad);
    color: #06251c;
    box-shadow: 0 8px 24px rgba(46, 230, 168, 0.35);
}
.btn-primary:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 14px 34px rgba(46, 230, 168, 0.5); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--surface); }
.lang-btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); font-weight: 700; letter-spacing: 1px; padding: 9px 14px; color: var(--blue-light); }
.lang-btn:hover { border-color: var(--green); color: var(--green); }
.flag-icon { width: 22px; height: 15px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25); flex-shrink: 0; }
.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1.5px solid var(--blue);
}
.btn-outline:hover { background: rgba(77, 208, 225, 0.12); transform: translateY(-3px); }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; border-radius: 14px; }
.btn-full { width: 100%; }

.burger { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 8px; }
.burger span { width: 24px; height: 2.5px; background: var(--text); border-radius: 2px; transition: 0.3s; }

/* ============ Panels / tabs ============ */
.tab-panel { display: none; max-width: 1280px; margin: 0 auto; padding: 40px 24px 80px; }
.tab-panel.active { display: block; animation: panelIn 0.5s ease both; }

@keyframes panelIn {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============ Hero ============ */
.hero {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 40px;
    min-height: 70vh;
    padding: 40px 0;
}

.badge {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--blue-light);
    margin-bottom: 20px;
}

.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; line-height: 1.15; }
.gradient-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.hero-sub { margin: 22px 0 30px; color: var(--text-dim); font-size: 1.08rem; line-height: 1.7; max-width: 560px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-stats { display: flex; gap: 44px; margin-top: 48px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-size: 1.8rem; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-label { color: var(--text-dim); font-size: 0.85rem; }

/* Grand cube 3D du hero */
.hero-visual { display: flex; justify-content: center; perspective: 1000px; }
.hero-cube-wrap { width: 220px; height: 220px; transform-style: preserve-3d; }
.hero-cube {
    width: 100%; height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: heroSpin 30s linear infinite;
}
.hc-face {
    position: absolute; inset: 0;
    display: grid; place-items: center;
    font-size: 4.5rem;
    background: linear-gradient(135deg, rgba(46, 230, 168, 0.15), rgba(77, 208, 225, 0.15));
    border: 1.5px solid rgba(77, 208, 225, 0.5);
    border-radius: 16px;
    box-shadow: inset 0 0 60px rgba(46, 230, 168, 0.15);
    backdrop-filter: blur(2px);
    --s: 110px;
}
.hc-front  { transform: translateZ(var(--s)); }
.hc-back   { transform: rotateY(180deg) translateZ(var(--s)); }
.hc-right  { transform: rotateY(90deg) translateZ(var(--s)); }
.hc-left   { transform: rotateY(-90deg) translateZ(var(--s)); }
.hc-top    { transform: rotateX(90deg) translateZ(var(--s)); }
.hc-bottom { transform: rotateX(-90deg) translateZ(var(--s)); }

@keyframes heroSpin {
    from { transform: rotateX(-15deg) rotateY(0); }
    to   { transform: rotateX(-15deg) rotateY(360deg); }
}

/* ============ Features ============ */
.section-title { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; text-align: center; margin: 60px 0 36px; }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 22px;
}

.feature-card, .support-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px 26px;
    transition: border-color 0.3s, box-shadow 0.3s;
    transform-style: preserve-3d;
    will-change: transform;
}
.feature-card:hover, .support-card:hover {
    border-color: rgba(46, 230, 168, 0.5);
    box-shadow: 0 24px 50px rgba(46, 230, 168, 0.12);
}
.feature-icon { font-size: 2.2rem; margin-bottom: 16px; }
.feature-card h3, .support-card h3 { margin-bottom: 10px; font-size: 1.15rem; }
.feature-card p, .support-card p { color: var(--text-dim); font-size: 0.93rem; line-height: 1.65; }

/* ============ Pages head ============ */
.page-head { text-align: center; max-width: 760px; margin: 20px auto 40px; }
.page-head h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; }
.page-head p { color: var(--text-dim); margin-top: 16px; font-size: 1.05rem; line-height: 1.7; }

/* ============ Filtres ============ */
.filter-bar {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.search-input {
    flex: 1;
    min-width: 240px;
    max-width: 380px;
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.search-input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(46, 230, 168, 0.15); }
.search-input::placeholder { color: var(--text-dim); }

.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
    padding: 8px 18px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.25s;
}
.chip:hover { color: var(--text); border-color: var(--blue); }
.chip.active { background: var(--grad); color: #06251c; font-weight: 600; border-color: transparent; }

/* ============ Mods grid ============ */
.mods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 24px;
    perspective: 1200px;
}

.coming-soon {
    text-align: center;
    max-width: 540px;
    margin: 20px auto 40px;
    padding: 48px 36px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.coming-soon-icon { font-size: 3.6rem; margin-bottom: 18px; }
.coming-soon h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 10px; }
.coming-soon p { color: var(--text-dim); font-size: 1.05rem; margin-bottom: 26px; line-height: 1.6; }

.mod-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transform-style: preserve-3d;
    will-change: transform;
    transition: border-color 0.3s, box-shadow 0.3s;
    animation: panelIn 0.5s ease both;
}
.mod-card:hover { border-color: rgba(46, 230, 168, 0.55); box-shadow: var(--shadow); }

.mod-thumb {
    height: 150px;
    display: grid;
    place-items: center;
    font-size: 3.4rem;
    background: linear-gradient(135deg, rgba(46, 230, 168, 0.18), rgba(77, 208, 225, 0.18));
    border-bottom: 1px solid var(--border);
}

.mod-logo {
    width: 88px;
    height: 88px;
    filter: drop-shadow(0 6px 14px rgba(4, 20, 17, 0.5));
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.mod-card:hover .mod-logo { transform: scale(1.12) rotate(-3deg); }

.mod-body { padding: 20px; }
.mod-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.mod-name { font-size: 1.1rem; font-weight: 700; }
.mod-version {
    font-size: 0.72rem;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(77, 208, 225, 0.15);
    color: var(--blue-light);
    white-space: nowrap;
}
.mod-desc { color: var(--text-dim); font-size: 0.88rem; line-height: 1.6; margin-bottom: 16px; min-height: 62px; }
.mod-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; color: var(--text-dim); margin-bottom: 16px; }
.mod-author { color: var(--blue-light); }
.mod-actions { display: flex; gap: 10px; }
.mod-actions .btn { flex: 1; padding: 10px; font-size: 0.88rem; }

.official-tag {
    font-size: 0.72rem;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--grad);
    color: #06251c;
    font-weight: 700;
    white-space: nowrap;
}

.empty-msg { grid-column: 1 / -1; text-align: center; color: var(--text-dim); padding: 60px 0; font-size: 1.05rem; }

/* ============ Official banner ============ */
.official-banner {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    background: linear-gradient(120deg, rgba(46, 230, 168, 0.12), rgba(77, 208, 225, 0.12));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 26px;
    margin-bottom: 32px;
}
.ob-badge {
    background: var(--grad);
    color: #06251c;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 8px 16px;
    border-radius: 999px;
    white-space: nowrap;
}
.official-banner p { color: var(--text-dim); font-size: 0.95rem; }

/* ============ Support ============ */
.support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
    margin-bottom: 30px;
}
.link-arrow {
    display: inline-block;
    margin-top: 14px;
    color: var(--green);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform 0.25s;
}
.link-arrow:hover { transform: translateX(5px); }

.faq { max-width: 780px; margin: 0 auto; }
.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: border-color 0.3s;
}
.faq-item[open] { border-color: rgba(46, 230, 168, 0.5); }
.faq-item summary {
    padding: 18px 22px;
    cursor: pointer;
    font-weight: 600;
    list-style: none;
    position: relative;
}
.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 22px;
    color: var(--green);
    font-size: 1.3rem;
    transition: transform 0.3s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 22px 20px; color: var(--text-dim); font-size: 0.92rem; line-height: 1.7; }
.faq-item code { background: rgba(77, 208, 225, 0.15); padding: 2px 8px; border-radius: 6px; color: var(--blue-light); font-size: 0.85em; }

/* ============ Formulaires / Auth ============ */
.auth-wrap { display: flex; justify-content: center; padding: 30px 0; perspective: 1200px; }
.auth-card {
    width: 100%;
    max-width: 480px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 44px 40px;
    box-shadow: var(--shadow);
    transform-style: preserve-3d;
    will-change: transform;
}
.auth-card h1 { font-size: 1.8rem; font-weight: 800; margin-bottom: 10px; }
.auth-sub { color: var(--text-dim); font-size: 0.93rem; line-height: 1.6; margin-bottom: 28px; }

.auth-form .form-group { margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.auth-form label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 7px; color: var(--text); }
.auth-form input, .auth-form textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
    resize: vertical;
}
.auth-form input:focus, .auth-form textarea:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(46, 230, 168, 0.15);
}

.checkbox-line { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-dim); margin-bottom: 20px; cursor: pointer; }
.checkbox-line input { width: auto; accent-color: var(--green); }
.checkbox-line a, .auth-switch a, .link-small { color: var(--green); text-decoration: none; }
.checkbox-line a:hover, .auth-switch a:hover, .link-small:hover { text-decoration: underline; }

.form-line { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.form-line .checkbox-line { margin-bottom: 0; }
.link-small { font-size: 0.85rem; }

.auth-switch { text-align: center; margin-top: 22px; font-size: 0.9rem; color: var(--text-dim); }

.contact-form-wrap { max-width: 680px; margin: 60px auto 0; }
.contact-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 36px;
}

/* ============ Footer ============ */
.footer {
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.25);
    padding: 50px 24px 24px;
}
.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
}
.footer-col p { color: var(--text-dim); font-size: 0.88rem; line-height: 1.6; margin-top: 12px; max-width: 300px; }
.footer-col h4 { font-size: 0.95rem; margin-bottom: 14px; }
.footer-col a { display: block; color: var(--text-dim); text-decoration: none; font-size: 0.88rem; margin-bottom: 9px; transition: color 0.25s, transform 0.25s; }
.footer-col a:hover { color: var(--green); transform: translateX(4px); }
.footer-note { text-align: center; color: var(--text-dim); font-size: 0.78rem; margin-top: 40px; opacity: 0.7; }

/* ============ Reveal au scroll ============ */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============ Toast ============ */
.toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translate(-50%, 120px);
    background: var(--grad);
    color: #06251c;
    font-weight: 600;
    padding: 14px 28px;
    border-radius: 14px;
    box-shadow: 0 14px 40px rgba(46, 230, 168, 0.4);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 200;
    max-width: 90vw;
    text-align: center;
}
.toast.show { transform: translate(-50%, 0); }

/* ============ Responsive ============ */
@media (max-width: 960px) {
    .hero { grid-template-columns: 1fr; text-align: center; }
    .hero-sub { margin-inline: auto; }
    .hero-actions, .hero-stats { justify-content: center; }
    .hero-visual { margin-top: 20px; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 780px) {
    .nav-tabs, .nav-auth {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(11, 31, 34, 0.97);
        border-bottom: 1px solid var(--border);
        padding: 16px 24px;
    }
    .nav-auth { top: calc(100% + 190px); border-top: none; padding-top: 0; }
    .navbar.menu-open .nav-tabs, .navbar.menu-open .nav-auth { display: flex; }
    .burger { display: flex; margin-left: auto; }
    .form-row { grid-template-columns: 1fr; }
    .hero-cube-wrap { width: 160px; height: 160px; }
    .hc-face { --s: 80px; font-size: 3.2rem; }
    .wolf-logo-lg { width: 104px; height: 104px; }
}

@media (max-width: 520px) {
    .footer-inner { grid-template-columns: 1fr; }
    .auth-card { padding: 32px 24px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
