/* ADJ Booking — Header global premium (remplace le header Elementor).
   Injecté via wp_body_open par ADJ_Booking_Header.

   Stratégie anti-thème : sélecteurs scopés .adj-header* + !important sur les
   couleurs texte/bg/border pour battre Hello Elementor / Elementor Pro qui
   forcent `a { color: var(--e-global-color-accent) }` (= orange ADJ).

   Architecture :
   - Topbar : contact + horaires (desktop only)
   - Header principal : logo + nav + actions
   - Drawer mobile : slide-in depuis la droite, fullscreen sur petit mobile
*/

/* ============================================================
   0) MASQUAGE du header Elementor / thème existant
   ============================================================ */

header[data-elementor-type="header"],
.elementor-location-header,
body > header.site-header,
#masthead,
.site-header:not(.adj-header),
.elementor-header,
.hello-elementor header.site-header,
div[data-elementor-type="header"] {
    display: none !important;
}

body {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* ============================================================
   1) VARIABLES — scope racine du header uniquement
   ============================================================ */

.adj-header {
    --adj-h-blue: #0E3A5D;
    --adj-h-blue-2: #1B5E8F;
    --adj-h-blue-deep: #08263D;
    --adj-h-orange: #FF7A00;
    --adj-h-orange-2: #FF9933;
    --adj-h-text: #1A2B3C;
    --adj-h-text-soft: #5A6B7E;
    --adj-h-border: #E3E9F0;
    --adj-h-bg: #ffffff;
    --adj-h-bg-soft: #F7FAFD;
    --adj-h-height: 124px;
    --adj-h-topbar: 38px;

    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    font-family: inherit;
    line-height: 1.3;
    box-sizing: border-box;
}

.adj-header *,
.adj-header *::before,
.adj-header *::after {
    box-sizing: border-box;
}

/* ============================================================
   2) TOPBAR (contact + horaires) — desktop only
   ============================================================ */

.adj-header__topbar {
    background: linear-gradient(90deg, var(--adj-h-blue-deep) 0%, var(--adj-h-blue) 100%);
    color: #E3E9F0 !important;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .01em;
    transition: height .3s ease, opacity .3s ease;
    overflow: hidden;
    height: var(--adj-h-topbar);
}

.adj-header.is-scrolled .adj-header__topbar {
    height: 0;
    opacity: 0;
}

.adj-header__topbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.adj-header__topbar-group {
    display: inline-flex;
    align-items: center;
    gap: 18px;
}

.adj-header__topbar-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #E3E9F0 !important;
    text-decoration: none !important;
    transition: color .15s;
    line-height: 1;
    white-space: nowrap;
}

.adj-header__topbar-item:hover {
    color: #fff !important;
}

.adj-header__topbar-item svg {
    width: 14px;
    height: 14px;
    color: var(--adj-h-orange);
    flex-shrink: 0;
}

.adj-header__topbar-sep {
    width: 1px;
    height: 14px;
    background: rgba(255, 255, 255, .15);
}

/* ============================================================
   3) BARRE PRINCIPALE (logo + nav + actions)
   ============================================================ */

.adj-header__main {
    background: rgba(255, 255, 255, .96);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--adj-h-border);
    transition: box-shadow .3s ease, border-color .3s ease, background .3s ease;
}

.adj-header.is-scrolled .adj-header__main {
    background: rgba(255, 255, 255, .98);
    border-bottom-color: transparent;
    box-shadow: 0 10px 32px rgba(14, 58, 93, .08);
}

.adj-header__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 28px;
    height: var(--adj-h-height);
    display: flex;
    align-items: center;
    gap: 28px;
    transition: height .25s ease;
}

.adj-header.is-scrolled .adj-header__inner {
    height: 102px;
}

/* ============================================================
   4) LOGO
   ============================================================ */

.adj-header__logo {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    text-decoration: none !important;
    line-height: 0;
    transition: transform .2s ease;
}

.adj-header__logo:hover {
    transform: scale(1.03);
}

.adj-header__logo img {
    height: 104px;
    width: auto;
    max-width: 340px;
    object-fit: contain;
    display: block;
    transition: height .25s ease;
}

.adj-header.is-scrolled .adj-header__logo img {
    height: 86px;
}

/* ============================================================
   5) NAV DESKTOP — underline animé depuis le centre
   ============================================================ */

.adj-header__nav {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
}

.adj-header__nav > ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    gap: 2px;
}

.adj-header__nav > ul > li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.adj-header__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 12px 18px;
    color: var(--adj-h-text) !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    text-decoration: none !important;
    border-radius: 8px;
    transition: color .2s ease;
    letter-spacing: .01em;
    line-height: 1;
    white-space: nowrap;
}

.adj-header__link::before {
    content: "";
    position: absolute;
    left: 50%;
    right: 50%;
    bottom: 4px;
    height: 2px;
    background: var(--adj-h-orange);
    border-radius: 2px;
    transition: left .25s ease, right .25s ease;
}

.adj-header__link:hover {
    color: var(--adj-h-blue) !important;
}

.adj-header__link:hover::before,
.adj-header__link.is-active::before {
    left: 18px;
    right: 18px;
}

.adj-header__link.is-active {
    color: var(--adj-h-blue) !important;
}

/* ============================================================
   6) ACTIONS (CTA + icônes)
   ============================================================ */

.adj-header__actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.adj-header__sep {
    width: 1px;
    height: 28px;
    background: var(--adj-h-border);
    margin: 0 4px;
}

/* CTA Réserver — couleur FORCÉE à blanc pour battre le thème qui
   force `a { color: orange }` (d'où "orange sur orange"). */
.adj-header__cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    background: linear-gradient(135deg, var(--adj-h-orange) 0%, var(--adj-h-orange-2) 100%) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 14px !important;
    text-decoration: none !important;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: .06em;
    box-shadow: 0 6px 18px rgba(255, 122, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .2);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
    white-space: nowrap;
    line-height: 1;
    overflow: hidden;
    border: none;
}

.adj-header__cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
    transform: translateX(-120%);
    transition: transform .6s ease;
    pointer-events: none;
}

.adj-header__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(255, 122, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .25);
    filter: brightness(1.05);
    color: #ffffff !important;
}

.adj-header__cta:hover::before {
    transform: translateX(120%);
}

.adj-header__cta:active {
    transform: translateY(0);
}

.adj-header__cta svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Icônes compte / panier */
.adj-header__icon-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: var(--adj-h-blue) !important;
    text-decoration: none !important;
    border-radius: 50%;
    background: var(--adj-h-bg-soft);
    border: 1px solid var(--adj-h-border);
    transition: color .15s, background .2s, border-color .2s, transform .15s;
}

.adj-header__icon-link:hover {
    color: #ffffff !important;
    background: var(--adj-h-blue);
    border-color: var(--adj-h-blue);
    transform: translateY(-1px);
}

.adj-header__icon-link svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
}

/* Badge panier */
.adj-header__cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--adj-h-orange), var(--adj-h-orange-2)) !important;
    color: #ffffff !important;
    font-size: 11px;
    font-weight: 800;
    border-radius: 999px;
    line-height: 1;
    box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(255, 122, 0, .4);
    letter-spacing: 0;
}

.adj-header__cart-count[data-empty="true"] {
    display: none;
}

/* ============================================================
   7) BURGER (mobile)
   ============================================================ */

.adj-header__burger {
    display: none;
    appearance: none;
    background: var(--adj-h-blue) !important;
    border: none;
    padding: 0;
    width: 44px;
    height: 44px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background .2s ease, transform .15s ease;
    position: relative;
    box-shadow: 0 4px 12px rgba(14, 58, 93, .25);
}

.adj-header__burger:hover {
    background: var(--adj-h-blue-deep) !important;
    transform: translateY(-1px);
}

/* Les 3 traits sont gérés par ::before, ::after et un span au milieu.
   On utilise border-top plutôt que background pour qu'ils restent visibles
   même si Hello Elementor fait un reset agressif sur les <span>. */
.adj-header__burger::before,
.adj-header__burger::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 18px;
    height: 2px;
    background: #ffffff !important;
    border-radius: 2px;
    transform: translate(-50%, -50%);
    transition: transform .25s ease, top .25s ease, opacity .15s ease;
}

.adj-header__burger::before {
    transform: translate(-50%, calc(-50% - 6px));
}

.adj-header__burger::after {
    transform: translate(-50%, calc(-50% + 6px));
}

.adj-header__burger > span {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 18px;
    height: 2px;
    background: #ffffff !important;
    border-radius: 2px;
    transform: translate(-50%, -50%);
    transition: opacity .15s ease;
}

.adj-header__burger[aria-expanded="true"] {
    background: var(--adj-h-blue-deep) !important;
}

.adj-header__burger[aria-expanded="true"]::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.adj-header__burger[aria-expanded="true"]::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.adj-header__burger[aria-expanded="true"] > span {
    opacity: 0;
}

/* ============================================================
   8) DRAWER MOBILE
   ============================================================ */

.adj-header__drawer {
    position: fixed;
    inset: 0;
    z-index: 1100;
    pointer-events: none;
}

.adj-header__drawer[hidden] {
    display: none;
}

.adj-header__drawer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(8, 38, 61, .6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity .25s ease;
    pointer-events: none;
}

.adj-header__drawer.is-open .adj-header__drawer-overlay {
    opacity: 1;
    pointer-events: auto;
}

.adj-header__drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 88%;
    max-width: 400px;
    background: linear-gradient(180deg, #ffffff 0%, #F7FAFD 100%);
    box-shadow: -16px 0 50px rgba(8, 38, 61, .2);
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(.4, 0, .2, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    pointer-events: auto;
}

.adj-header__drawer.is-open .adj-header__drawer-panel {
    transform: translateX(0);
}

/* Tête du drawer : logo + close, fond bleu marine en bande */
.adj-header__drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    background: linear-gradient(135deg, var(--adj-h-blue-deep) 0%, var(--adj-h-blue) 100%);
    border-bottom: 3px solid var(--adj-h-orange);
    flex-shrink: 0;
}

.adj-header__drawer-logo {
    line-height: 0;
    display: inline-flex;
    text-decoration: none !important;
}

.adj-header__drawer-logo img {
    height: 80px;
    width: auto;
    max-width: 240px;
    object-fit: contain;
    filter: brightness(0) invert(1); /* logo en blanc sur fond bleu */
}

/* Si tu préfères logo couleur d'origine, supprimer la ligne filter au-dessus
   et ajouter un fond blanc arrondi : */
.adj-header__drawer-logo--light img {
    filter: none;
    background: #fff;
    padding: 6px 10px;
    border-radius: 6px;
}

.adj-header__drawer-close {
    appearance: none;
    background: rgba(255, 255, 255, .12) !important;
    border: 1px solid rgba(255, 255, 255, .2);
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    cursor: pointer;
    border-radius: 10px;
    transition: background .15s, transform .15s;
}

.adj-header__drawer-close:hover {
    background: rgba(255, 255, 255, .22) !important;
    transform: rotate(90deg);
}

.adj-header__drawer-close > span {
    display: inline-block;
    color: #ffffff !important;
    font-size: 32px;
    line-height: 1;
    font-weight: 300;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    transform: translateY(-1px);
}

/* Nav verticale mobile — liens avec icônes à gauche */
.adj-header__drawer-nav {
    flex: 1 1 auto;
    padding: 16px 14px;
}

.adj-header__drawer-nav > ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.adj-header__drawer-nav > ul > li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.adj-header__drawer-nav a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 18px;
    color: var(--adj-h-text) !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    text-decoration: none !important;
    border-radius: 12px;
    transition: background .15s, color .15s, padding .2s;
    position: relative;
    line-height: 1.2;
    border: 1px solid transparent;
}

.adj-header__drawer-nav a svg {
    width: 20px;
    height: 20px;
    color: var(--adj-h-blue);
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
}

.adj-header__drawer-nav a:hover,
.adj-header__drawer-nav a:focus-visible {
    background: rgba(14, 58, 93, .06);
    color: var(--adj-h-blue) !important;
}

.adj-header__drawer-nav a.is-active {
    background: linear-gradient(135deg, rgba(255, 122, 0, .1) 0%, rgba(255, 122, 0, .02) 100%);
    color: var(--adj-h-blue) !important;
    border-color: rgba(255, 122, 0, .25);
    padding-left: 18px;
}

.adj-header__drawer-nav a.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    top: 15%;
    bottom: 15%;
    width: 3px;
    background: var(--adj-h-orange);
    border-radius: 0 3px 3px 0;
}

.adj-header__drawer-nav a.is-active svg {
    color: var(--adj-h-orange);
}

/* Footer drawer : secondary + CTA + contact */
.adj-header__drawer-foot {
    border-top: 1px solid var(--adj-h-border);
    padding: 16px 14px 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
    background: #fff;
}

.adj-header__drawer-secondary {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 13px 16px;
    color: var(--adj-h-text) !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    text-decoration: none !important;
    border-radius: 10px;
    background: var(--adj-h-bg-soft);
    border: 1px solid var(--adj-h-border);
    transition: background .15s, color .15s, border-color .15s;
    line-height: 1.2;
}

.adj-header__drawer-secondary:hover {
    background: rgba(14, 58, 93, .08);
    color: var(--adj-h-blue) !important;
    border-color: var(--adj-h-blue);
}

.adj-header__drawer-secondary svg {
    width: 20px;
    height: 20px;
    color: var(--adj-h-blue);
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
}

.adj-header__drawer-count {
    font-style: normal;
    color: var(--adj-h-orange) !important;
    font-weight: 800;
    margin-left: auto;
    background: rgba(255, 122, 0, .12);
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 13px;
}

.adj-header__drawer-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--adj-h-orange) 0%, var(--adj-h-orange-2) 100%) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 15px !important;
    text-decoration: none !important;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    box-shadow: 0 8px 22px rgba(255, 122, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .2);
    transition: transform .15s, filter .15s;
    line-height: 1;
}

.adj-header__drawer-cta:hover {
    filter: brightness(1.05);
    transform: translateY(-2px);
    color: #ffffff !important;
}

.adj-header__drawer-cta svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
}

/* Bloc contact dans le drawer */
.adj-header__drawer-contact {
    margin-top: 14px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(14, 58, 93, .04) 0%, rgba(14, 58, 93, 0) 100%);
    border: 1px solid var(--adj-h-border);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.adj-header__drawer-contact-item {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--adj-h-text) !important;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none !important;
    line-height: 1.4;
}

.adj-header__drawer-contact-item:hover {
    color: var(--adj-h-blue) !important;
}

.adj-header__drawer-contact-item svg {
    width: 16px;
    height: 16px;
    color: var(--adj-h-orange);
    flex-shrink: 0;
    margin-top: 1px;
    stroke: currentColor;
    fill: none;
}

/* ============================================================
   9) BODY LOCK
   ============================================================ */

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

/* ============================================================
   10) RESPONSIVE — breakpoints
   ============================================================ */

/* Tablette : topbar masquée, nav cachée, burger visible */
@media (max-width: 1024px) {
    .adj-header__topbar {
        display: none;
    }

    .adj-header__nav,
    .adj-header__cta,
    .adj-header__sep {
        display: none;
    }

    .adj-header__burger {
        display: inline-flex;
    }

    .adj-header__inner {
        gap: 12px;
        padding: 0 20px;
        height: 108px;
    }

    .adj-header.is-scrolled .adj-header__inner {
        height: 94px;
    }

    .adj-header__logo img {
        height: 84px;
        max-width: 260px;
    }

    .adj-header.is-scrolled .adj-header__logo img {
        height: 74px;
    }

    .adj-header__actions {
        margin-left: auto;
        gap: 8px;
    }

    .adj-header__icon-link {
        width: 42px;
        height: 42px;
    }
}

/* Mobile : on cache le lien Compte (reste dans le drawer) */
@media (max-width: 600px) {
    .adj-header__actions .adj-header__icon-link[aria-label="Mon compte"] {
        display: none;
    }

    .adj-header__inner {
        padding: 0 16px;
        gap: 10px;
        height: 98px;
    }

    .adj-header.is-scrolled .adj-header__inner {
        height: 86px;
    }

    .adj-header__logo img {
        height: 76px;
        max-width: 230px;
    }

    .adj-header.is-scrolled .adj-header__logo img {
        height: 66px;
    }

    .adj-header__icon-link {
        width: 40px;
        height: 40px;
    }

    .adj-header__icon-link svg {
        width: 18px;
        height: 18px;
    }

    .adj-header__burger {
        width: 42px;
        height: 42px;
    }
}

/* Petit mobile */
@media (max-width: 380px) {
    .adj-header__logo img {
        height: 64px;
        max-width: 190px;
    }

    .adj-header__inner {
        gap: 6px;
        padding: 0 12px;
    }
}

/* Drawer fullscreen sur très petit */
@media (max-width: 380px) {
    .adj-header__drawer-panel {
        width: 100%;
        max-width: 100%;
    }
}

/* ============================================================
   11) PREFERS-REDUCED-MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    .adj-header,
    .adj-header *,
    .adj-header *::before,
    .adj-header *::after {
        transition: none !important;
        animation: none !important;
    }
}
