/* =========================
   HEADER ISOLÉ
========================= */

.ds-header {
    position: sticky;
    top: 0;
    z-index: 10000;
    width: 100%;
    height: 118px;
    min-height: 118px;
    background: rgba(8, 7, 6, .96);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(224, 201, 130, .14);
    isolation: isolate;
}

.ds-header-container {
    width: min(100% - 88px, 1540px);
    height: 100%;
    margin: 0 auto;

    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    align-items: center;
    gap: 70px;
}

.ds-logo {
    position: relative;
    z-index: 10004;

    width: 320px;
    height: 118px;

    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.ds-logo img {
    width: 230px;
    height: auto;
    max-height: 98px;
    object-fit: contain;
    object-position: left center;
}

/* =========================
   NAV DESKTOP
========================= */

.ds-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 32px;

    color: var(--cream);
    font-size: 16px;
    letter-spacing: .2px;
    justify-self: end;
}

.ds-nav > a,
.ds-nav-trigger {
    position: relative;
    cursor: pointer;
    color: rgba(255, 255, 255, .9);
    font-weight: 700;
    white-space: nowrap;
    transition: color .25s ease, transform .25s ease;
}

.ds-nav-trigger {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    font: inherit;
    text-align: left;
}

.ds-nav > a:hover,
.ds-nav-dropdown:hover .ds-nav-trigger,
.ds-nav-dropdown.is-open .ds-nav-trigger {
    color: var(--gold-soft);
    transform: translateY(-1px);
}

.ds-nav-contact {
    padding: 16px 28px;
    border: 1px solid rgba(224, 201, 130, .62);
    border-radius: 999px;
    color: var(--gold-soft) !important;
    transition: background .25s ease, border-color .25s ease, transform .25s ease;
}

.ds-nav-contact:hover {
    background: rgba(224, 201, 130, .10);
    border-color: rgba(224, 201, 130, .9);
}

/* =========================
   DROPDOWN DESKTOP
========================= */

.ds-nav-dropdown {
    position: relative;
    padding: 40px 0;
}

.ds-dropdown-menu {
    position: absolute;
    top: 88px;
    left: 50%;
    z-index: 10005;

    min-width: 260px;
    padding: 12px;

    border-radius: 18px;
    background: rgba(18, 16, 12, .96);
    border: 1px solid rgba(180, 155, 87, .28);
    box-shadow: var(--shadow);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateX(-50%) translateY(12px);

    transition:
        opacity .25s ease,
        visibility .25s ease,
        transform .25s ease;
}

.ds-nav-dropdown:hover .ds-dropdown-menu,
.ds-nav-dropdown.is-open .ds-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.ds-dropdown-menu a {
    display: block;
    padding: 12px 14px;

    border-radius: 12px;
    color: var(--cream);

    font-size: 14px;
    line-height: 1.35;

    transition:
        background .2s ease,
        color .2s ease;
}

.ds-dropdown-menu a:hover {
    background: rgba(180, 155, 87, .14);
    color: var(--gold-soft);
}

/* =========================
   BOUTON MOBILE
========================= */

.ds-menu-toggle {
    display: none;
    position: relative;
    z-index: 10007;

    width: 44px;
    height: 44px;

    border: 1px solid rgba(180, 155, 87, .35);
    background: rgba(255, 255, 255, .03);
    border-radius: 12px;

    padding: 0;
    cursor: pointer;
}

.ds-menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 0;

    border-radius: 999px;
    background: var(--gold-soft);

    transition:
        transform .25s ease,
        opacity .2s ease;
}

.ds-menu-toggle.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.ds-menu-toggle.is-active span:nth-child(2) {
    opacity: 0;
}

.ds-menu-toggle.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* =========================
   RESPONSIVE TABLETTE
========================= */

@media (max-width: 1200px) {
    .ds-header-container {
        width: min(100% - 56px, 1280px);
        grid-template-columns: 280px minmax(0, 1fr);
        gap: 48px;
    }

    .ds-logo {
        width: 280px;
    }

    .ds-logo img {
        width: 210px;
        max-height: 90px;
    }

    .ds-nav {
        gap: 24px;
        font-size: 15px;
    }

    .ds-nav-contact {
        padding: 14px 24px;
    }
}

/* =========================
   MENU MOBILE PLEIN ÉCRAN
   Style conservé
========================= */

/* =========================
   MENU MOBILE PLEIN ÉCRAN
   Style conservé + plein écran réel
========================= */

@media (max-width: 980px) {
    .ds-header {
        height: 84px;
        min-height: 84px;
        z-index: 10000;
    }

    .ds-header-container {
        width: min(100% - 28px, 980px);
        height: 84px;

        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 24px;

        position: relative;
        z-index: 10004;
    }

    .ds-logo {
        width: auto;
        height: 84px;
        z-index: 10006;
        pointer-events: auto;
    }

    .ds-logo img {
        width: 155px;
        max-height: 66px;
        image-rendering: auto;
    }

    .ds-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 5px;

        z-index: 10007;
        border: 1px solid rgba(224, 201, 130, .38);
    }

    .ds-nav {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;

        z-index: 10002 !important;

        width: 100vw !important;
        max-width: none !important;
        height: 100dvh !important;
        min-height: 100dvh !important;

        margin: 0 !important;

        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: 0 !important;

        padding: 116px 28px 34px !important;

        background:
            radial-gradient(circle at 50% 0%, rgba(216, 198, 142, .16), transparent 34%),
            radial-gradient(circle at 90% 20%, rgba(180, 155, 87, .12), transparent 28%),
            linear-gradient(180deg, #100d09 0%, #050403 100%) !important;

        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;

        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;

        transform: none !important;

        transition:
            opacity .28s ease,
            visibility .28s ease !important;
    }

    .ds-nav.is-open {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: none !important;
    }

    .ds-nav > a,
    .ds-nav-trigger {
        width: 100%;
        min-height: 56px;

        display: flex;
        align-items: center;
        justify-content: space-between;

        padding: 0;

        color: rgba(247, 241, 229, .88);
        font-size: 16px;
        font-weight: 800;

        border-bottom: 1px solid rgba(180, 155, 87, .15);
        background: transparent;

        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    .ds-nav > a:hover,
    .ds-nav-dropdown:hover .ds-nav-trigger,
    .ds-nav-dropdown.is-open .ds-nav-trigger {
        transform: none;
        color: var(--gold-soft);
    }

    .ds-nav-dropdown {
        width: 100%;
        padding: 0;
    }

    .ds-nav-trigger::after {
        content: "+";
        color: var(--gold-soft);
        font-size: 20px;
        line-height: 1;
    }

    .ds-nav-dropdown.is-open .ds-nav-trigger::after {
        content: "–";
    }

    .ds-dropdown-menu,
    .ds-nav-dropdown:hover .ds-dropdown-menu {
        position: static;
        left: auto;
        top: auto;
        z-index: auto;

        width: 100%;
        min-width: 0;
        max-height: 0;

        display: block;
        overflow: hidden;

        padding: 0;
        margin: 0;

        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;

        opacity: 0;
        visibility: hidden;
        pointer-events: none;

        transform: none;

        transition:
            max-height .32s ease,
            margin .32s ease,
            opacity .22s ease,
            visibility .22s ease;
    }

    .ds-nav-dropdown.is-open .ds-dropdown-menu,
    .ds-nav-dropdown.is-open:hover .ds-dropdown-menu {
        max-height: 480px;
        margin: 10px 0 16px;

        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .ds-dropdown-menu a {
        display: block;
        padding: 11px 0 11px 18px;

        border-radius: 0;
        border-left: 1px solid rgba(216, 198, 142, .28);

        color: rgba(247, 241, 229, .68);
        font-size: 14px;
        font-weight: 600;

        opacity: 0;
        transform: translateY(-4px);

        transition:
            opacity .22s ease,
            transform .22s ease,
            color .2s ease;
    }

    .ds-nav-dropdown.is-open .ds-dropdown-menu a {
        opacity: 1;
        transform: translateY(0);
    }

    .ds-nav-dropdown.is-open .ds-dropdown-menu a:nth-child(1) {
        transition-delay: .03s;
    }

    .ds-nav-dropdown.is-open .ds-dropdown-menu a:nth-child(2) {
        transition-delay: .06s;
    }

    .ds-nav-dropdown.is-open .ds-dropdown-menu a:nth-child(3) {
        transition-delay: .09s;
    }

    .ds-nav-dropdown.is-open .ds-dropdown-menu a:nth-child(4) {
        transition-delay: .12s;
    }

    .ds-nav-dropdown.is-open .ds-dropdown-menu a:nth-child(5) {
        transition-delay: .15s;
    }

    .ds-dropdown-menu a:hover {
        background: transparent;
        color: var(--gold-soft);
    }

    .ds-nav .ds-nav-contact {
        width: 100%;
        min-height: 54px !important;
        margin-top: 22px !important;

        display: flex !important;
        align-items: center !important;
        justify-content: center !important;

        padding: 0 22px !important;
        border-radius: 999px !important;

        background:
            linear-gradient(135deg, #d8c68e 0%, #b49b57 100%) !important;

        color: #120f0b !important;
        font-size: 15px !important;
        font-weight: 900 !important;
        letter-spacing: .2px !important;

        border: 1px solid rgba(216, 198, 142, .55) !important;

        box-shadow:
            0 0 24px rgba(216, 198, 142, .18),
            0 16px 40px rgba(180, 155, 87, .22) !important;

        opacity: 1 !important;
        visibility: visible !important;
    }

    .ds-nav .ds-nav-contact:hover,
    .ds-nav .ds-nav-contact:active {
        color: #120f0b !important;
        background:
            linear-gradient(135deg, #eadca8 0%, #c4a85f 100%) !important;
        transform: none !important;
    }

    body.menu-open {
        overflow: hidden;
    }
}

/* =========================
   PETITS TÉLÉPHONES
========================= */

@media (max-width: 560px) {
    .ds-header {
        height: 78px;
        min-height: 78px;
    }

    .ds-header-container {
        width: min(100% - 22px, 560px);
        height: 78px;
    }

    .ds-logo {
        height: 78px;
    }

    .ds-logo img {
        width: 145px;
        max-height: 60px;
    }

    .ds-nav {
        padding: 104px 22px 30px !important;
    }
}

/* =========================
   ACCESSIBILITÉ
========================= */

@media (hover: none) {
    .ds-nav > a:hover,
    .ds-nav-trigger:hover,
    .ds-dropdown-menu a:hover,
    .ds-nav-contact:hover {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ds-nav,
    .ds-dropdown-menu,
    .ds-dropdown-menu a,
    .ds-menu-toggle span,
    .ds-nav > a,
    .ds-nav-trigger,
    .ds-nav-contact {
        transition-duration: .01ms;
    }
}
