/* ===== HEADER CSS — Partagé entre toutes les pages ===== */

:root {
    --primary: #0232CC;
    --primary-dark: #001A7A;
    --primary-deep: #000D4D;
    --primary-light: #3B6AF7;
    --primary-glow: rgba(2, 50, 204, 0.35);
    --gold: #D4AF37;
    --gold-light: #F4D03F;
    --accent-teal: #06B6D4;
    --ink: #030712;
    --text-muted: #6B7280;
    --surface: #FFFFFF;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
    --font-display: "Cormorant Garamond", Georgia, serif;
    --font-body: "Inter", system-ui, -apple-system, sans-serif;
}

/* ===== TOP BAR ===== */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem clamp(1.5rem, 4vw, 3.5rem);
    background: rgba(2, 50, 204, 0.03);
    border-bottom: 1px solid rgba(2, 50, 204, 0.06);
    font-size: 0.78rem;
    color: var(--text-muted);
    position: relative;
    z-index: 1001;
    font-family: var(--font-body);
}

.top-bar-left,
.top-bar-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

@media (max-width: 480px) {
    .hide-on-mobile { display: none; }
    .top-bar { padding: 0.4rem 1rem; font-size: 0.72rem; }
    .top-bar-left, .top-bar-right { gap: 0.75rem; }
}

/* ===== HEADER ===== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 clamp(1.5rem, 4vw, 3.5rem);
    height: 72px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(40px) saturate(1.8);
    -webkit-backdrop-filter: blur(40px) saturate(1.8);
    border-bottom: 1px solid rgba(2, 50, 204, 0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: height 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo);
    font-family: var(--font-body);
}

header.scrolled {
    height: 62px;
    box-shadow: 0 1px 0 rgba(2, 50, 204, 0.05), 0 20px 60px rgba(2, 50, 204, 0.06);
}

/* ===== BRAND ===== */
.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-logo {
    width: 52px !important;
    height: 52px !important;
    border-radius: 14px;
    object-fit: contain;
    background: #fff;
    padding: 3px;
    box-shadow: 0 4px 20px rgba(2, 50, 204, 0.14), 0 0 0 1px rgba(2, 50, 204, 0.07);
    transition: transform 0.45s var(--ease-spring), box-shadow 0.4s ease;
}

.brand:hover .brand-logo {
    transform: scale(1.07) rotate(-3deg);
    box-shadow: 0 10px 32px rgba(2, 50, 204, 0.24);
}

.brand-text h1 {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 2.5vw, 1.75rem);
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.brand-tagline {
    display: block;
    font-family: var(--font-body);
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

/* ===== NAV DESKTOP ===== */
.header-nav {
    display: flex;
    gap: 0.1rem;
    background: rgba(9, 14, 30, 0.04);
    padding: 0.3rem;
    border-radius: 999px;
    border: 1px solid rgba(2, 50, 204, 0.06);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-link {
    padding: 0.48rem 1.1rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.25s var(--ease-out-expo);
    white-space: nowrap;
    font-family: var(--font-body);
}

.nav-link:hover {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 14px rgba(2, 50, 204, 0.08);
}

.nav-link.active {
    color: var(--primary);
    background: #fff;
    box-shadow: 0 2px 16px rgba(2, 50, 204, 0.1);
}

/* ===== NAV TOGGLE (hamburger) ===== */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0.4rem;
    border-radius: 10px;
    transition: background 0.2s ease;
    z-index: 1060;
}

.nav-toggle:hover {
    background: rgba(2, 50, 204, 0.06);
}

.nav-toggle__bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
    border-radius: 99px;
    transition: all 0.3s var(--ease-out-expo);
}

.nav-toggle.active .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle.active .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== NAV OVERLAY ===== */
.nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(3, 7, 18, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* ===== MOBILE NAV ===== */
@media (max-width: 768px) {
    .nav-toggle { display: flex; }

    .header-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(300px, 78vw);
        height: 100vh;
        flex-direction: column;
        gap: 0.4rem;
        background: rgba(3, 7, 18, 0.97);
        backdrop-filter: blur(36px);
        -webkit-backdrop-filter: blur(36px);
        padding: 5.5rem 1.5rem 2rem;
        border-radius: 0;
        border: none;
        border-left: 1px solid rgba(2, 50, 204, 0.25);
        box-shadow: -12px 0 50px rgba(0, 0, 0, 0.4);
        transition: right 0.5s var(--ease-out-expo);
        z-index: 1050;
        left: auto;
        transform: none;
        overflow-y: auto;
    }

    .header-nav.open { right: 0; }

    .nav-link {
        font-size: 1rem;
        padding: 0.8rem 1.1rem;
        width: 100%;
        text-align: left;
        color: rgba(255, 255, 255, 0.65) !important;
        border-radius: 12px;
        background: transparent;
        box-shadow: none;
    }

    .nav-link:hover,
    .nav-link.active {
        color: #fff !important;
        background: rgba(255, 255, 255, 0.07);
        box-shadow: none;
    }
}

@media (min-width: 769px) {
    .header-nav {
        flex-wrap: wrap;
        max-width: 60%;
        justify-content: center;
    }
}
