/* ============================================================
   HEADER — Structure fixe
   ============================================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: var(--header-h, 72px);
    background-color: var(--color-surface, #ffffff);
    box-shadow: 0 4px 20px rgba(0, 0, 0, calc(var(--header-shadow-alpha, 0) * 0.12));
    transition:
        background-color 0.35s var(--ease-out-expo),
        box-shadow 0.35s var(--ease-out-expo),
        backdrop-filter 0.35s var(--ease-out-expo);
}

.header-inner {
    width: 100%;
    height: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 4vw, 3rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

/* État au scroll — glassmorphism */
.site-header.is-scrolled {
    background-color: color-mix(in srgb, var(--color-bg, #f7f5f0) 82%, transparent);
    backdrop-filter: blur(20px) saturate(1.6);
    -webkit-backdrop-filter: blur(20px) saturate(1.6);
    box-shadow: 0 1px 0 var(--color-border, rgba(17, 16, 16, 0.08)),
        var(--shadow-soft, 0 4px 32px rgba(17, 16, 16, 0.06));
}

/* Ligne d'accent en haut (visible au scroll) */
.site-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
            transparent 0%,
            var(--color-accent, #c8a96e) 30%,
            var(--color-accent-2, #2d4a3e) 60%,
            transparent 100%);
    opacity: 0;
    transition: opacity 0.35s;
}

.site-header.is-scrolled::after {
    opacity: 1;
}

/* ============================================================
   2. LOGO
   ============================================================ */
.header-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    flex-shrink: 0;
    transition: opacity 0.2s;
}

.header-logo:hover {
    opacity: 0.75;
}

.header-logo-icon {
    display: flex;
    flex-shrink: 0;
}

.header-logo-text {
    font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-ink, #111010);
    letter-spacing: -0.02em;
    line-height: 1;
    white-space: nowrap;
}

/* ============================================================
   3. ACTIONS (CTA)
   ============================================================ */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.header-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    background: var(--color-accent-2, #2d4a3e);
    color: var(--color-bg, #f7f5f0);
    text-decoration: none;
    font-family: var(--font-body, 'DM Sans', sans-serif);
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 100px;
    white-space: nowrap;
    transition:
        background 0.2s,
        transform 0.2s var(--ease-out-expo),
        box-shadow 0.2s;
    box-shadow: 0 4px 16px rgba(45, 74, 62, 0.2);
}

.header-cta:hover {
    background: color-mix(in srgb, var(--color-accent-2, #2d4a3e) 88%, black);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(45, 74, 62, 0.3);
}

.header-cta:active {
    transform: scale(0.97);
}

.cta-arrow {
    transition: transform 0.25s var(--ease-out-expo);
    flex-shrink: 0;
}

.header-cta:hover .cta-arrow {
    transform: translateX(4px);
}

/* ============================================================
   4. MENU MOBILE — Bouton hamburger
   ============================================================ */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    background: transparent;
    border: 1px solid var(--color-border, rgba(17, 16, 16, 0.08));
    border-radius: 10px;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: background 0.2s;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 1.5px;
    margin: 0 auto;
    background: var(--color-ink, #111010);
    border-radius: 2px;
    transition: transform 0.3s var(--ease-out-expo), opacity 0.3s;
    transform-origin: center;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(6, 18, 10, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s var(--ease-out-expo);
}

.mobile-nav-overlay.is-visible { display: block; opacity: 1; }

/* ============================================================
   5. BARRE DE PROGRESSION
   ============================================================ */
.scroll-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-accent, #c8a96e), var(--color-accent-2, #2d4a3e));
    width: 0%;
    transition: width 0.1s linear;
}

/* ============================================================
   6. NAVIGATION — Desktop
   ============================================================ */
.navmenu {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.navmenu .header-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
}

.navmenu .nav-link,
.navmenu .nav-item-trigger {
    padding: 0.5rem 0.875rem;
    color: var(--color-ink-muted, #6b6860);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    border-radius: 8px;
    transition: color 0.2s, background-color 0.2s;
}

.navmenu .nav-link:hover,
.navmenu .nav-item-trigger:hover,
.navmenu .nav-item-trigger[aria-expanded="true"] {
    color: var(--color-ink, #111010);
}

.navmenu .dropdown-menu {
    position: absolute;
    top: calc(100% + 0.75rem);
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    min-width: 260px;
    background: var(--color-surface, #ffffff);
    border-radius: 14px;
    box-shadow: var(--shadow-float, 0 20px 60px rgba(17, 16, 16, 0.14));
    border: 1px solid var(--color-border, rgba(17, 16, 16, 0.08));
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s var(--ease-out-expo), transform 0.25s var(--ease-out-expo), visibility 0.25s;
    z-index: 100;
}

.navmenu .dropdown-menu.is-open { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

/* ============================================================
   7. RESPONSIVE
   ============================================================ */
@media (max-width: 992px) {
    .menu-toggle { display: flex; }
    .navmenu {
        position: fixed;
        top: 0;
        right: -340px;
        width: 340px;
        height: 100dvh;
        overflow-y: auto;
        background: var(--color-surface, #ffffff);
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        padding: calc(var(--header-h, 72px) + 1.5rem) 1.5rem 2rem;
        transition: right 0.4s var(--ease-out-expo);
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.08);
        z-index: 1000;
    }
    .navmenu.is-open { right: 0; }
    .navmenu .header-nav { flex-direction: column; align-items: stretch; }
    .navmenu .nav-item-trigger {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 0.85rem 0.5rem;
        text-align: left;
    }

    .navmenu .dropdown-menu {
        position: static;
        left: auto;
        margin-left: 0;
        box-shadow: none;
        border: 1px solid rgba(26, 107, 64, 0.1);
        background-color: #f9fafb;
        margin: 0.25rem 0 1rem;
        padding: 0.5rem;
        display: none;
        transform: none;
        opacity: 1;
        visibility: visible;
        width: 100%;
        min-width: unset;
        border-radius: 12px;
    }

    .navmenu .dropdown-menu.is-open {
        display: block;
        transform: none;
    }
    .header-cta { display: none; }

    /* Bouton de fermeture à l'intérieur du menu mobile */
    .mobile-nav-close {
        display: flex;
        position: absolute;
        top: 1.25rem;
        right: 1.5rem;
        width: 40px;
        height: 40px;
        align-items: center;
        justify-content: center;
        background: var(--color-bg, #f7f5f0);
        border: 1px solid var(--color-border, rgba(17, 16, 16, 0.08));
        border-radius: 10px;
        color: var(--color-ink, #111010);
        font-size: 1.5rem;
        cursor: pointer;
        transition: background 0.2s, transform 0.2s;
    }
    .mobile-nav-close:hover { background: var(--color-border); }
    .mobile-nav-close:active { transform: scale(0.95); }
}