/* ─── Variables de Thème ──────────────────────────────────────────── */
:root {
    --color-bg: 5, 5, 5;
    --color-surface: 0, 0, 0;
    --color-text: 255, 255, 255;
    --color-text-muted: 209, 213, 219;
    --color-text-dim: 156, 163, 175;
    --color-border: 31, 41, 55;
    --color-gold: 212, 175, 55;
}

body.light-mode {
    --color-bg: 250, 249, 246;
    --color-surface: 255, 255, 255;
    --color-text: 26, 26, 26;
    --color-text-muted: 75, 85, 99;
    --color-text-dim: 107, 114, 128;
    --color-border: 229, 231, 235;
}

html { scroll-behavior: smooth; }

body {
    background-color: rgb(var(--color-bg));
    color: rgb(var(--color-text));
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* Effet de lumière radial en fond */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 50% -20%, rgba(var(--color-gold), 0.15), rgb(var(--color-bg)) 60%);
    z-index: -1;
    pointer-events: none;
    transition: background 0.5s ease;
}

/* ─── Glassmorphism ───────────────────────────────────────────────── */
.glass-panel {
    background: rgba(var(--color-surface), 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(var(--color-text), 0.05);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.8);
    transition: background 0.5s ease, border-color 0.5s ease;
}
body.light-mode .glass-panel {
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
}

.glass-card {
    background: linear-gradient(145deg, rgba(var(--color-surface), 0.9) 0%, rgba(var(--color-bg), 0.95) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(var(--color-text), 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.glass-card:hover {
    border-color: rgba(var(--color-gold), 0.5);
    transform: translateY(-10px);
    box-shadow:
        0 30px 60px -15px rgba(0, 0, 0, 0.95),
        0 0 40px -10px rgba(var(--color-gold), 0.2),
        inset 0 1px 0 rgba(var(--color-gold), 0.1);
}
body.light-mode .glass-card:hover {
    box-shadow:
        0 30px 60px -15px rgba(0, 0, 0, 0.12),
        0 0 40px -10px rgba(var(--color-gold), 0.2),
        inset 0 1px 0 rgba(var(--color-gold), 0.1);
}

/* ─── Custom Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgb(var(--color-bg)); }
::-webkit-scrollbar-thumb { background: rgb(var(--color-border)); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgb(var(--color-gold)); }

/* ─── Hero Background ─────────────────────────────────────────────── */
.hero-bg {
    background-image: linear-gradient(rgba(var(--color-surface),0.4), rgba(var(--color-surface),0.9)), url('https://images.unsplash.com/photo-1539020140153-e479b8c22e70?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    transition: background-image 0.5s ease;
}
@media (max-width: 768px) {
    .hero-bg { background-attachment: scroll; }
}

/* ─── Navigation ──────────────────────────────────────────────────── */
.nav-glass {
    background: rgba(var(--color-surface), 0.4);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid rgba(var(--color-text), 0.05);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-scrolled {
    background: rgba(var(--color-surface), 0.75) !important;
    backdrop-filter: blur(24px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(200%) !important;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5) !important;
    border-bottom: 1px solid rgba(var(--color-gold), 0.2) !important;
}
body.light-mode .nav-scrolled {
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.05) !important;
    border-bottom: 1px solid rgba(var(--color-gold), 0.3) !important;
}

.nav-mobile-bg {
    background-color: rgb(var(--color-surface));
}

/* Mobile menu — slide-down animation */
#mobile-menu {
    transform: translateY(-8px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    pointer-events: none;
}
#mobile-menu.menu-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.nav-link { position: relative; }
.nav-link.active { color: rgb(var(--color-gold)); }
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: rgb(var(--color-gold));
}

/* ─── Focus States (accessibilité) ───────────────────────────────── */
.nav-link:focus-visible,
button:focus-visible,
a:focus-visible {
    outline: 2px solid rgb(var(--color-gold));
    outline-offset: 3px;
    border-radius: 3px;
}

/* ─── Scroll Reveal Animations ────────────────────────────────────── */
@keyframes revealUp {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes revealLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes revealRight {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes revealScale {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

.reveal        { opacity: 0; }
.reveal-left   { opacity: 0; }
.reveal-right  { opacity: 0; }
.reveal-scale  { opacity: 0; }

.reveal.visible       { animation: revealUp    0.7s cubic-bezier(0.4, 0, 0.2, 1) both; }
.reveal-left.visible  { animation: revealLeft  0.7s cubic-bezier(0.4, 0, 0.2, 1) both; }
.reveal-right.visible { animation: revealRight 0.7s cubic-bezier(0.4, 0, 0.2, 1) both; }
.reveal-scale.visible { animation: revealScale 0.6s cubic-bezier(0.34, 1.2, 0.64, 1) both; }

/* Stagger delays */
.stagger-1 { animation-delay: 0.08s; }
.stagger-2 { animation-delay: 0.18s; }
.stagger-3 { animation-delay: 0.28s; }
.stagger-4 { animation-delay: 0.38s; }

/* ─── Prefers Reduced Motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .reveal, .reveal-left, .reveal-right, .reveal-scale {
        opacity: 1 !important;
        animation: none !important;
    }
    .glass-card:hover { transform: none; }
    #mobile-menu { transition: none !important; }
    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
