/* ── VARIABLES ── */
:root {
    --bg:       #0d0d0f;
    --bg2:      #131316;
    --bg3:      #1a1a1f;
    --border:   #2a2a32;
    --text:     #e8e8f0;
    --muted:    #7a7a8c;
    --orange:   #f97316;
    --orange2:  #fb923c;
    --glow:     rgba(249,115,22,0.15);
    --nav-h:    68px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

html, body {
    min-height: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── NAV ── */
nav.site-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 5%;
    background: rgba(13,13,15,0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 1.2rem;
    color: var(--text);
    letter-spacing: 2px;
    text-decoration: none;
}

.nav-logo .z { color: var(--orange); }

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: .4rem;
    color: var(--muted);
    text-decoration: none;
    font-size: .9rem;
    font-weight: 500;
    transition: color .2s;
}
.nav-links a svg { flex-shrink: 0; transition: color .2s; }
.nav-links a:hover { color: var(--text); }

.nav-cta {
    background: var(--orange);
    color: #000;
    padding: .5rem 1.25rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: .85rem;
    text-decoration: none;
    transition: background .2s, transform .15s;
}

.nav-cta:hover { background: var(--orange2); transform: translateY(-1px); }

.nav-auth {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.nav-link-plain {
    color: var(--muted);
    text-decoration: none;
    font-size: .9rem;
    font-weight: 500;
    transition: color .2s;
}

.nav-link-plain:hover { color: var(--text); }

.nav-right {
    display: flex;
    align-items: center;
    gap: .75rem;
}

/* Conservé pour compatibilité si référencé ailleurs */
.nav-user { display: flex; align-items: center; gap: .75rem; }

.nav-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--orange);
    color: #000;
    font-size: .75rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ── Dropdown utilisateur ── */
.nav-dropdown { position: relative; }

.nav-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: .45rem;
    background: none;
    border: none;
    color: var(--text);
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    padding: .3rem .4rem;
    border-radius: 8px;
    transition: color .15s, background .15s;
}
.nav-dropdown-trigger:hover,
.nav-dropdown.is-open .nav-dropdown-trigger {
    color: var(--orange);
    background: rgba(249,115,22,.06);
}

.nav-dropdown-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nav-dropdown-chevron {
    color: var(--muted);
    transition: transform .2s;
    flex-shrink: 0;
}
.nav-dropdown.is-open .nav-dropdown-chevron { transform: rotate(180deg); color: var(--orange); }

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + .6rem);
    right: 0;
    min-width: 200px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: .35rem;
    box-shadow: 0 8px 30px rgba(0,0,0,.35);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity .15s, transform .15s;
    z-index: 200;
}
.nav-dropdown.is-open .nav-dropdown-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem .75rem;
    border-radius: 8px;
    font-size: .875rem;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    transition: background .12s, color .12s;
    white-space: nowrap;
}
.nav-dropdown-item:hover { background: rgba(255,255,255,.06); color: var(--text); }
.nav-dropdown-item--danger { color: #f87171; }
.nav-dropdown-item--danger:hover { background: rgba(239,68,68,.08); color: #f87171; }
.nav-dropdown-item svg { color: var(--muted); flex-shrink: 0; }

.nav-dropdown-sep {
    height: 1px;
    background: var(--border);
    margin: .3rem .4rem;
}

/* ── Hamburger mobile ── */
.nav-hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: .3rem;
    border-radius: 6px;
    transition: background .15s;
}
.nav-hamburger:hover { background: rgba(255,255,255,.06); }

/* ── Menu mobile (overlay) ── */
.nav-mobile {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    padding: 0 1.5rem 2rem;
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
}
.nav-mobile.is-open { opacity: 1; pointer-events: auto; }

.nav-mobile-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.nav-mobile-close {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: .3rem;
}
.nav-mobile-close:hover { color: var(--text); }

.nav-mobile-links,
.nav-mobile-user,
.nav-mobile-auth {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.nav-mobile-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: var(--text);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 500;
    padding: .7rem .5rem;
    border-radius: 8px;
    transition: background .12s, color .12s;
}
.nav-mobile-link svg { color: var(--muted); flex-shrink: 0; transition: color .12s; }
.nav-mobile-link:hover { background: rgba(255,255,255,.05); }
.nav-mobile-link:hover svg { color: var(--text); }
.nav-mobile-link--danger { color: #f87171; }
.nav-mobile-link--danger svg { color: #f87171; }
.nav-mobile-link--danger:hover { background: rgba(239,68,68,.07); }

.nav-mobile-sep {
    height: 1px;
    background: var(--border);
    margin: 1rem 0;
}

.nav-mobile-identity {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem;
    margin-bottom: .5rem;
    font-weight: 700;
    font-size: .95rem;
}

.nav-mobile-auth { gap: .75rem; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .nav-hamburger { display: flex; align-items: center; justify-content: center; }
    .nav-links    { display: none; }
    .nav-dropdown { display: none; }
    .nav-auth     { display: none; }
}

.nav-admin-link {
    color: var(--muted);
    text-decoration: none;
    font-size: .95rem;
    padding: .25rem;
    transition: color .15s;
}
.nav-admin-link:hover { color: var(--orange); }

.btn-sm {
    padding: .45rem 1rem;
    font-size: .85rem;
}

/* ── BOUTONS ── */
.btn-primary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1rem;
    padding: .85rem 2rem;
    outline-offset: 2px;
}

.btn-primary {
    background: var(--orange);
    color: #000;
    font-weight: 700;
    border: none;
    transition: background .2s, transform .15s, box-shadow .2s;
    box-shadow: 0 0 30px rgba(249,115,22,0.3);
}

.btn-primary:hover {
    background: var(--orange2);
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(249,115,22,0.45);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    font-weight: 600;
    border: 1px solid var(--border);
    transition: border-color .2s, background .2s;
}

.btn-ghost:hover {
    border-color: var(--muted);
    background: var(--bg3);
}

/* ── SECTIONS (éléments génériques réutilisables) ── */
section { padding: 5rem 5%; }

.section-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--orange);
    margin-bottom: .75rem;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.section-desc {
    color: var(--muted);
    font-size: 1.05rem;
    max-width: 540px;
    line-height: 1.75;
}

/* ── FOOTER ── */
footer {
    border-top: 1px solid var(--border);
    padding: 2.5rem 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-logo {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    color: var(--text);
    letter-spacing: 2px;
    font-size: 1rem;
}

.footer-logo .z { color: var(--orange); }

.footer-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.footer-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: .85rem;
    transition: color .2s;
}

.footer-links a:hover { color: var(--text); }

.footer-copy { color: var(--muted); font-size: .8rem; }

@media (max-width: 768px) {
    footer { flex-direction: column; text-align: center; }
}

/* ── Flash toast ─────────────────────────────────────────── */
.flash-toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .8rem 1.25rem;
    border-radius: 10px;
    font-size: .875rem;
    font-weight: 600;
    box-shadow: 0 4px 24px rgba(0,0,0,.45);
    cursor: pointer;
    max-width: 380px;
    animation: toast-in .3s cubic-bezier(.34,1.56,.64,1);
    transition: opacity .3s, transform .3s;
}
.flash-toast.is-out { opacity: 0; transform: translateY(.75rem); pointer-events: none; }
.flash-toast--success { background: rgba(74,222,128,.12); border: 1px solid rgba(74,222,128,.28); color: #4ade80; }
.flash-toast--error   { background: rgba(239,68,68,.1);   border: 1px solid rgba(239,68,68,.28);  color: #f87171; }
.flash-toast--info    { background: rgba(99,102,241,.1);  border: 1px solid rgba(99,102,241,.28); color: #818cf8; }
.flash-toast--warning { background: rgba(251,191,36,.1);  border: 1px solid rgba(251,191,36,.28); color: #fbbf24; }

@keyframes toast-in {
    from { opacity: 0; transform: translateY(1.5rem) scale(.95); }
    to   { opacity: 1; transform: translateY(0)      scale(1);   }
}

@media (max-width: 480px) {
    .flash-toast { bottom: 1rem; right: 1rem; left: 1rem; max-width: none; }
}
