/* ===== HEADER NAV — Fichier partagé par toutes les pages ===== */
/* Empêche le décalage du header quand la scrollbar apparaît/disparaît */
html { scrollbar-gutter: stable; }
.header {
    background: rgba(255,255,255,0.97);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    padding: 0 24px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    view-transition-name: header;
    will-change: transform;
    transform: translateZ(0);
    -webkit-font-smoothing: auto;
    -moz-osx-font-smoothing: auto;
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    position: relative;
}
.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    color: #111;
    white-space: nowrap;
}
.logo-link img { height: 36px; width: 36px; border-radius: 50%; }
.header-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 1;
    padding-left: 10%;
}
.header-nav a {
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    color: #6B7280;
    padding: 24px 0;
    position: relative;
    white-space: nowrap;
    transition: color 0.2s;
}
.header-nav a:hover { color: #111; }
.header-nav a.active { color: #111; }
.header-nav a.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: calc(50% + 11px);
    height: 2px;
    background: #FFD600;
    border-radius: 1px;
}
.nav-emoji { display: none; }
.btn-member-nav {
    background: #111 !important;
    color: #FFD600 !important;
    text-decoration: none !important;
    border-radius: 6px !important;
    padding: 6px 14px !important;
    font-weight: 600 !important;
    font-size: 0.82rem !important;
    line-height: 1.6 !important;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: auto;
}
.btn-member-nav:hover { background: #333 !important; }
.btn-member-nav::after { display: none !important; }
.hamburger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 2px solid #F3F4F6;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    font-size: 1.3rem;
    color: #111;
    transition: border-color 0.2s;
}
.hamburger:hover { border-color: #FFD600; }

/* Intermediate breakpoints */
@media (max-width: 1100px) {
    .header-nav { gap: 16px; }
    .header-nav a { font-size: 0.8rem; }
    .logo-link span { font-size: 0.95rem; }
}
@media (max-width: 960px) and (min-width: 641px) {
    .logo-link { font-size: 1rem; }
    .logo-link span { max-width: 110px; display: inline-block; line-height: 1.25; }
    .header-nav { gap: 10px; }
    .header-nav a { font-size: 0.82rem; }
}
@media (max-width: 780px) and (min-width: 641px) {
    .logo-link { font-size: 0.9rem; }
    .logo-link span { max-width: 100px; }
    .header-nav { gap: 6px; }
    .header-nav a { font-size: 0.78rem; }
}
@media (max-width: 640px) {
    html { scrollbar-gutter: auto; }
    .logo-link span { display: none; }
    .header-inner { justify-content: space-between; }
    .hamburger { display: flex; order: 2; }
    .header-nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: rgba(255,255,255,0.98);
        backdrop-filter: blur(12px);
        padding: 16px 24px;
        border-bottom: 1px solid rgba(0,0,0,0.08);
        gap: 4px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.08);
        z-index: 999;
        margin: 0;
        transform: none;
    }
    .header-nav.open { display: flex; }
    .header-nav a { padding: 14px 16px; font-size: 1rem; border-radius: 10px; display: block; width: 100%; position: relative; }
    .header-nav a.active { color: #111; font-weight: 600; }
    .header-nav a.active { width: fit-content; align-self: flex-start; }
    .header-nav a.active::after { content: ''; display: block; width: 100%; height: 2px; background: #FFD600; border-radius: 1px; margin-top: 2px; position: static; }
    .btn-member-nav {
        position: static !important;
        transform: none !important;
        display: block !important;
        width: 100% !important;
        text-align: center !important;
        margin-top: 8px !important;
        margin-left: 0 !important;
        padding: 14px 16px !important;
        border-radius: 10px !important;
        font-size: 1rem !important;
    }
}
