/* ══════════════════════════════════════════════════════════════════════════
   Header JM — navigation principale
   États : déconnecté / connecté · Desktop / Tablette / Mobile

   Nomenclature :
     .jm-header-bar          barre principale
     .jm-header-brand        zone logo
     .jm-header-nav          navigation centrale
     .jm-header-nav-item     lien de navigation
     .jm-header-actions      groupe boutons
     .jm-header-icon-btn     bouton icône carré (loupe, profil)
     .jm-header-account-btn  bouton texte (Connexion / Se déconnecter)
     .jm-header-cta          bouton CTA Adhérer
     .jm-header-burger       bouton burger mobile
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Habillage du Header Builder Kadence ───────────────────────────────────
   Depuis le retour au header du parent Kadence, cette couche redonne
   l'apparence JM au markup natif du builder.
   On cible volontairement des sélecteurs larges pour rester compatible
   avec les éléments Logo / Navigation / Recherche / Bouton / HTML. */

#masthead {
    position: sticky !important;
    top: 0;
    z-index: 1000;
    padding: 12px 24px;
    background: transparent;
}

#masthead .site-main-header-wrap,
#masthead .site-header-row-container,
#masthead .site-header-row-layout-contained,
#masthead .site-header-row-layout-fullwidth-contained,
#masthead .site-header-row-layout-standard {
    background: transparent;
}

#masthead .site-header-row-container-inner {
    max-width: 1480px;
    margin-right: auto;
    margin-left: auto;
    padding-top: 10px;
    padding-right: 20px;
    padding-bottom: 10px;
    padding-left: 20px;
    border: none;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: none;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

#masthead .site-main-header-inner-wrap {
    min-height: 86px;
}

#masthead .site-main-header-inner-wrap.site-header-row-center-column {
    display: grid;
    grid-template-columns: minmax(160px, 210px) minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 14px;
}

#masthead.is-scrolled .site-header-row-container-inner {
    background: var(--jm-bg);
    box-shadow: 0 2px 16px rgba(16, 41, 79, 0.07);
}

#masthead .site-header-section-left,
#masthead .site-header-section-center,
#masthead .site-header-section-right {
    min-width: 0;
}

#masthead .site-header-main-section-left,
#masthead .site-header-main-section-center,
#masthead .site-header-main-section-right,
#masthead .site-header-main-section-right-center {
    min-width: 0;
}

#masthead .site-header-main-section-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

#masthead .site-header-main-section-center {
    display: flex;
    justify-content: center;
}

#masthead .site-header-section-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: nowrap;
}

#masthead .site-header-section-left {
    justify-self: start;
}

#masthead .site-header-section-center {
    justify-self: center;
}

#masthead .site-header-section-right {
    justify-self: end;
}

#masthead .site-header-section-right .site-header-item {
    flex: 0 0 auto;
}

#masthead .site-header-main-section-right-center {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: max-content;
}

#masthead .site-header-main-section-right-center .site-header-item[data-section="kadence_customizer_header_html"] {
    order: 1;
}

#masthead .site-header-main-section-right-center .site-header-item[data-section="kadence_customizer_header_button"] {
    order: 2;
}

#masthead .site-header-main-section-right-center .site-header-item[data-section="kadence_customizer_header_search"] {
    order: 3;
}

body.logged-in #masthead.jm-account-enhanced .site-header-main-section-right-center .site-header-item[data-section="kadence_customizer_header_html"],
body.logged-in #masthead.jm-account-enhanced .site-header-main-section-right-center .site-header-item[data-section="kadence_customizer_header_button"] {
    display: none;
}

#masthead .site-branding,
#masthead .site-header-item {
    margin: 0;
}

#masthead .site-branding {
    padding: 0;
}

#masthead .custom-logo,
#masthead .site-branding img {
    width: clamp(150px, 13vw, 210px);
    max-width: 100%;
    height: auto;
}

#masthead .header-navigation {
    justify-content: center;
    min-width: 0;
}

#masthead .header-navigation .header-menu-container,
#masthead .header-navigation .primary-menu-container,
#masthead .header-navigation .menu {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

#masthead .header-navigation ul.menu,
#masthead .header-navigation .header-menu-container > ul {
    gap: 2px;
    flex-wrap: nowrap;
}

#masthead .header-navigation ul.menu > li,
#masthead .header-navigation .header-menu-container > ul > li {
    margin: 0;
}

#masthead .header-navigation ul.menu > li > a,
#masthead .header-navigation .header-menu-container > ul > li > a,
#masthead .main-navigation ul.menu > li > a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 42px;
    padding: 8px 10px;
    border-radius: 14px;
    color: var(--jm-ink);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}

#masthead .header-navigation .nav-drop-title-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-right: 0;
}

#masthead .header-navigation .dropdown-nav-toggle {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    transform: none;
}

#masthead .header-navigation .dropdown-nav-toggle .kadence-svg-icon {
    width: 16px;
    height: 16px;
}

#masthead .header-navigation ul.menu > li:hover > a,
#masthead .header-navigation ul.menu > li.current-menu-item > a,
#masthead .header-navigation ul.menu > li.current-menu-ancestor > a,
#masthead .header-navigation .header-menu-container > ul > li:hover > a,
#masthead .header-navigation .header-menu-container > ul > li.current-menu-item > a,
#masthead .header-navigation .header-menu-container > ul > li.current-menu-ancestor > a {
    background: var(--jm-cyan);
    color: var(--jm-blue);
}

#masthead .header-navigation .sub-menu {
    padding-top: 8px;
    padding-bottom: 8px;
    border: 1px solid rgba(223, 229, 239, 0.92);
    border-radius: 18px;
    background: var(--jm-surface, #ffffff);
    box-shadow: var(--jm-shadow);
}

#masthead .header-navigation .sub-menu a {
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
}

#masthead .header-navigation .sub-menu a:hover {
    background: var(--jm-cyan);
    color: var(--jm-blue);
}

#masthead :is(.header-search-wrap, .mobile-search-wrap) a,
#masthead :is(.header-search-wrap, .mobile-search-wrap) button,
#masthead :is(.header-account-wrap, .header-html-wrap) a,
#masthead :is(.drawer-toggle, .menu-toggle-open, .mobile-toggle-open) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 1px solid rgba(223, 229, 239, 0.95);
    border-radius: 14px;
    background: var(--jm-surface, #ffffff);
}

#masthead .header-search-wrap a,
#masthead .header-search-wrap button,
#masthead .header-account-wrap a {
    min-width: 46px;
    padding-right: 0;
    padding-left: 0;
    color: var(--jm-blue);
}

#masthead .header-search-wrap .search-toggle-open {
    min-width: 46px;
    min-height: 46px;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid rgba(223, 229, 239, 0.95);
    border-radius: 16px;
    background: var(--jm-surface, #ffffff);
    box-shadow: none;
    color: var(--jm-blue);
}

#masthead .header-search-wrap .search-toggle-open:hover,
#masthead .header-search-wrap .search-toggle-open:focus {
    color: var(--jm-blue);
    background: var(--jm-surface, #ffffff);
    border-color: rgba(47, 103, 177, 0.22);
    box-shadow: none;
}

#masthead .header-search-wrap .search-toggle-icon,
#masthead .header-search-wrap .kadence-svg-iconset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

#masthead .header-search-wrap .kadence-search-svg {
    width: 22px;
    height: 22px;
}

#masthead .header-html {
    white-space: nowrap;
}

#masthead .header-html,
#masthead .header-html-inner,
#masthead .xoo-el-action-sc {
    display: flex;
    align-items: center;
}

#masthead .header-html a,
#masthead .header-html p,
#masthead .header-html span,
#masthead .header-html .xoo-el-login-tgr {
    color: var(--jm-ink);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
}

#masthead .header-html p {
    margin: 0;
}

#masthead .header-html .xoo-el-login-tgr {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    min-height: 46px;
    padding: 0 14px 0 10px;
    border: 1px solid rgba(223, 229, 239, 0.95);
    border-radius: 16px;
    background: var(--jm-surface, #ffffff);
    color: var(--jm-blue);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    font-weight: 800;
    overflow: visible;
    text-indent: 0;
    white-space: nowrap;
}

#masthead .header-html .xoo-el-login-tgr::before {
    content: "";
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    background: center / contain no-repeat url("https://jeunesmedecins.fr/wp-content/uploads/2026/04/Login-Icon.svg");
}

#masthead .header-html .xoo-el-login-tgr:hover {
    border-color: rgba(47, 103, 177, 0.22);
}

#masthead .jm-kadence-account-item {
    order: 1;
}

#masthead .jm-kadence-account-wrap {
    position: relative;
}

#masthead .jm-kadence-account-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    padding: 0 14px 0 10px;
    border: 1px solid rgba(223, 229, 239, 0.95);
    border-radius: 16px;
    background: var(--jm-surface, #ffffff);
    color: var(--jm-blue);
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
}

#masthead .jm-kadence-account-trigger:hover,
#masthead .jm-kadence-account-trigger:focus-visible {
    border-color: rgba(47, 103, 177, 0.22);
}

#masthead .jm-kadence-account-trigger img {
    width: 22px;
    height: 22px;
    display: block;
    flex: 0 0 22px;
}

#masthead .jm-kadence-account-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 290px;
    padding: 10px 0 6px;
    border: 1px solid rgba(223, 229, 239, 0.95);
    border-radius: 22px;
    background: var(--jm-surface, #ffffff);
    box-shadow: var(--jm-shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    z-index: 220;
}

#masthead .jm-kadence-account-wrap.is-open .jm-kadence-account-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#masthead .jm-kadence-account-dropdown::before {
    content: "";
    position: absolute;
    top: -7px;
    right: 24px;
    width: 14px;
    height: 14px;
    transform: rotate(45deg);
    border-top: 1px solid rgba(223, 229, 239, 0.95);
    border-left: 1px solid rgba(223, 229, 239, 0.95);
    background: var(--jm-surface, #ffffff);
}

#masthead .jm-kadence-account-dropdown__title {
    padding: 8px 16px 12px;
    color: var(--jm-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#masthead .jm-account-menu {
    margin: 0;
    padding: 0;
    list-style: none;
}

#masthead .jm-account-menu .menu-item-has-children > a {
    position: relative;
    padding-right: 34px;
}

#masthead .jm-account-menu .menu-item-has-children > a::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 18px;
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-60%) rotate(45deg);
    opacity: 0.55;
    transition: transform 0.16s ease, opacity 0.16s ease;
}

#masthead .jm-account-menu .menu-item-has-children.is-open > a::after {
    transform: translateY(-15%) rotate(225deg);
    opacity: 0.8;
}

#masthead .jm-account-menu a,
#masthead .jm-kadence-account-logout {
    display: block;
    padding: 11px 16px;
    color: var(--jm-ink);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
    text-decoration: none;
}

#masthead .jm-account-menu a:hover,
#masthead .jm-kadence-account-logout:hover {
    background: var(--jm-cyan);
    color: var(--jm-blue);
}

#masthead .jm-kadence-account-logout {
    margin-top: 4px;
    color: #8b4b4b;
}

#masthead .jm-account-menu .sub-menu {
    display: none;
    margin: 0;
    padding: 0 0 8px;
    list-style: none;
    background: rgba(223, 239, 252, 0.55);
}

#masthead .jm-account-menu .menu-item-has-children.is-open > .sub-menu {
    display: block;
}

#masthead .jm-account-menu .sub-menu a {
    padding: 10px 16px 10px 30px;
    color: var(--jm-blue);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
}

#masthead .header-button-wrap a,
#masthead .header-button-wrap .button,
#masthead .header-button-wrap .wp-element-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding-right: 22px;
    padding-left: 22px;
    border: none;
    border-radius: 16px;
    background: var(--jm-grad-button);
    color: var(--jm-surface, #ffffff);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: none;
}

#masthead .header-button-wrap a:hover,
#masthead .header-button-wrap .button:hover,
#masthead .header-button-wrap .wp-element-button:hover {
    color: var(--jm-surface, #ffffff);
    opacity: 0.92;
}

@media (max-width: 1200px) {
    #masthead .site-main-header-inner-wrap.site-header-row-center-column {
        grid-template-columns: minmax(150px, 190px) minmax(0, 1fr) auto;
        column-gap: 14px;
    }

    #masthead .site-header-row-container-inner {
        padding-right: 18px;
        padding-left: 18px;
    }

    #masthead .site-main-header-inner-wrap {
        min-height: 78px;
    }

    #masthead .header-navigation ul.menu > li > a,
    #masthead .header-navigation .header-menu-container > ul > li > a,
    #masthead .main-navigation ul.menu > li > a {
        padding-right: 8px;
        padding-left: 8px;
        font-size: 12px;
    }
}

@media (max-width: 1024px) {
    #masthead {
        padding-right: 16px;
        padding-left: 16px;
    }

    #masthead .site-header-row-container-inner {
        border-radius: 24px;
    }

    #masthead .jm-kadence-account-dropdown {
        display: none;
    }
}

@media (max-width: 767px) {
    #masthead {
        padding-top: 8px;
        padding-right: 12px;
        padding-left: 12px;
    }

    #masthead .site-header-row-container-inner {
        padding-top: 8px;
        padding-right: 12px;
        padding-bottom: 8px;
        padding-left: 12px;
        border-radius: 20px;
    }

    #masthead .custom-logo,
    #masthead .site-branding img {
        width: 132px;
    }

    body.logged-in #masthead.jm-account-enhanced .site-header-main-section-right-center .site-header-item[data-section="kadence_customizer_header_html"],
    body.logged-in #masthead.jm-account-enhanced .site-header-main-section-right-center .site-header-item[data-section="kadence_customizer_header_button"] {
        display: none;
    }
}

/* ── Barre principale ────────────────────────────────────────────────────── */

.jm-header-bar {
    display: grid;
    grid-template-columns: minmax(150px, 190px) minmax(380px, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 68px;
    padding-top: 10px;
    padding-bottom: 10px;
    padding-left: 20px;
    padding-right: 20px;
    border-radius: 20px;
    border: none;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: none;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

/* Fond solide au scroll */
#jm-site-header.is-scrolled .jm-header-bar {
    background: var(--jm-bg);
    box-shadow: 0 2px 16px rgba(16, 41, 79, 0.07);
}

/* ── Logo / Brand ────────────────────────────────────────────────────────── */

.jm-header-brand {
    display: flex;
    align-items: center;
    justify-content: center;
}

.jm-header-logo {
    width: clamp(140px, 13vw, 190px);
    height: auto;
    object-fit: contain;
    display: block;
}

/* ── Navigation centrale ─────────────────────────────────────────────────── */

.jm-header-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.jm-header-nav-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding-top: 10px;
    padding-bottom: 10px;
    padding-left: 12px;
    padding-right: 12px;
    border-radius: var(--jm-radius-md);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    color: var(--jm-ink);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.jm-header-nav-item:hover,
.jm-header-nav-item.is-active {
    background: var(--jm-cyan);
    color: var(--jm-blue);
}

/* Chevron flèche bas dans les items avec sous-menu */
.jm-header-nav-chevron {
    width: 8px;
    height: 8px;
    border-right-width: 2px;
    border-right-style: solid;
    border-bottom-width: 2px;
    border-bottom-style: solid;
    border-color: currentColor;
    transform: rotate(45deg) translateY(-2px);
    opacity: 0.5;
    display: inline-block;
    flex-shrink: 0;
}

/* ── Dropdown sous-menu ──────────────────────────────────────────────────── */

.jm-header-nav-dropdown {
    position: relative;
}

.jm-header-nav-submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--jm-surface, #ffffff);
    border-radius: var(--jm-radius-lg);
    box-shadow: var(--jm-shadow);
    padding-top: 14px;
    padding-bottom: 8px;
    list-style: none;
    margin: 0;
    z-index: 200;
}

.jm-header-nav-dropdown:hover .jm-header-nav-submenu,
.jm-header-nav-dropdown:focus-within .jm-header-nav-submenu {
    display: block;
}

.jm-header-nav-submenu-item {
    display: block;
    padding-top: 9px;
    padding-bottom: 9px;
    padding-left: 14px;
    padding-right: 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--jm-ink);
    text-decoration: none;
    white-space: nowrap;
}

.jm-header-nav-submenu-item:hover {
    background: var(--jm-cyan);
    color: var(--jm-blue);
}

/* ── Bloc actions (droite) ───────────────────────────────────────────────── */

.jm-header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Base commune aux 3 boutons */
.jm-header-icon-btn,
.jm-header-account-btn,
.jm-header-cta,
.jm-header-burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    border-radius: var(--jm-radius-md);
    border-width: 1px;
    border-style: solid;
    border-color: rgba(223, 229, 239, 0.95);
    background: var(--jm-surface, #ffffff);
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
}

/* Icône carrée (loupe, profil) */
.jm-header-icon-btn {
    width: 44px;
    flex-shrink: 0;
    color: var(--jm-blue);
}

.jm-header-icon-btn svg {
    width: 20px;
    height: 20px;
}

/* Bouton texte (Connexion / Se déconnecter) */
.jm-header-account-btn {
    gap: 8px;
    padding-left: 14px;
    padding-right: 14px;
    color: var(--jm-ink);
}

/* CTA Adhérer */
.jm-header-cta {
    padding-left: 16px;
    padding-right: 16px;
    border-color: transparent;
    background: var(--jm-grad-button);
    color: var(--jm-surface, #ffffff);
    box-shadow: none;
}

.jm-header-cta:hover {
    opacity: 0.9;
    color: var(--jm-surface, #ffffff);
}

/* ── Mobile ──────────────────────────────────────────────────────────────── */

.jm-header-burger {
    width: 48px;
    color: var(--jm-ink);
}

.jm-header-burger svg {
    width: 20px;
    height: 20px;
}

.jm-header-mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px;
}

.jm-header-mobile-brand {
    display: flex;
    align-items: center;
    min-width: 0;
}

.jm-header-logo--mobile {
    width: 132px;
    height: auto;
    display: block;
}

.jm-header-mobile-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Drawer mobile (menu ouvert) */
.jm-header-mobile-panel {
    padding-left: 16px;
    padding-right: 16px;
    padding-bottom: 16px;
}

.jm-header-mobile-menu {
    display: grid;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.jm-header-mobile-menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-radius: 18px;
    background: var(--jm-surface, #ffffff);
    border-width: 1px;
    border-style: solid;
    border-color: rgba(223, 229, 239, 0.92);
    font-weight: 700;
    color: var(--jm-ink);
    text-decoration: none;
}

.jm-header-mobile-menu a:hover {
    background: var(--jm-cyan);
    color: var(--jm-blue);
}

/* Boutons utilitaires bas du drawer (Se connecter / Adhérer) */
.jm-header-mobile-utility {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.jm-header-mobile-utility a {
    flex: 1;
    padding-top: 12px;
    padding-bottom: 12px;
    padding-left: 14px;
    padding-right: 14px;
    border-radius: var(--jm-radius-md);
    background: var(--jm-cyan);
    color: var(--jm-blue);
    font-size: 13px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
}

.jm-header-mobile-utility a:last-child {
    background: var(--jm-grad-button);
    color: var(--jm-surface, #ffffff);
}

/* ── Drawer mobile Kadence — version publique ───────────────────────────── */

#mobile-drawer.jm-has-public-utility .jm-mobile-public-utility {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

#mobile-drawer.jm-has-public-utility .jm-mobile-public-login-wrap,
#mobile-drawer.jm-has-public-utility .jm-mobile-public-cta {
    flex: 1 1 0;
}

#mobile-drawer.jm-has-public-utility .jm-mobile-public-login-wrap .xoo-el-action-sc {
    display: block;
    width: 100%;
}

#mobile-drawer.jm-has-public-utility .jm-mobile-public-login-wrap .xoo-el-login-tgr,
#mobile-drawer.jm-has-public-utility .jm-mobile-public-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid rgba(223, 229, 239, 0.95);
    border-radius: 16px;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    text-align: center;
    text-decoration: none;
}

#mobile-drawer.jm-has-public-utility .jm-mobile-public-login-wrap .xoo-el-login-tgr {
    background: var(--jm-surface, #ffffff);
    color: var(--jm-blue);
    cursor: pointer;
}

#mobile-drawer.jm-has-public-utility .jm-mobile-public-cta {
    background: var(--jm-grad-button);
    border-color: transparent;
    color: var(--jm-surface, #ffffff);
}

/* ── Drawer mobile Kadence — version connectée ──────────────────────────── */

body.logged-in #mobile-drawer.jm-has-account-drawer .drawer-inner {
    padding: 10px 10px 14px;
    max-height: calc(100vh - 24px);
    border-radius: 34px;
    background: #233761;
    box-shadow: var(--jm-shadow);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

body.logged-in #mobile-drawer.jm-has-account-drawer .drawer-header {
    padding: 0 0 8px;
}

body.logged-in #mobile-drawer.jm-has-account-drawer .menu-toggle-close {
    color: var(--jm-surface, #ffffff);
}

body.logged-in #mobile-drawer.jm-has-account-drawer .drawer-content.mobile-drawer-content {
    padding: 0;
}

body.logged-in #mobile-drawer.jm-has-account-drawer .jm-mobile-account-entry {
    margin-bottom: 14px;
}

body.logged-in #mobile-drawer.jm-has-account-drawer .jm-mobile-account-button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 54px;
    padding: 0 16px 0 14px;
    border-radius: 18px;
    background: var(--jm-surface, #ffffff);
    color: var(--jm-blue);
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
}

body.logged-in #mobile-drawer.jm-has-account-drawer .jm-mobile-account-button img {
    width: 22px;
    height: 22px;
    display: block;
    flex: 0 0 22px;
}

body.logged-in #mobile-drawer.jm-has-account-drawer .jm-mobile-site-group,
body.logged-in #mobile-drawer.jm-has-account-drawer .jm-mobile-account-group {
    display: block;
    margin-top: 14px;
    padding: 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
}

body.logged-in #mobile-drawer.jm-has-account-drawer .jm-mobile-drawer-label {
    display: block;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.logged-in #mobile-drawer.jm-has-account-drawer .mobile-navigation {
    margin: 0;
}

body.logged-in #mobile-drawer.jm-has-account-drawer .mobile-navigation ul,
body.logged-in #mobile-drawer.jm-has-account-drawer .jm-account-menu--mobile {
    margin: 0;
    padding: 0;
    list-style: none;
}

body.logged-in #mobile-drawer.jm-has-account-drawer .mobile-navigation ul li > a,
body.logged-in #mobile-drawer.jm-has-account-drawer .mobile-navigation ul li.menu-item-has-children > .drawer-nav-drop-wrap,
body.logged-in #mobile-drawer.jm-has-account-drawer .jm-account-menu--mobile a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
    color: var(--jm-surface, #ffffff);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

body.logged-in #mobile-drawer.jm-has-account-drawer .mobile-navigation ul li:last-child > a,
body.logged-in #mobile-drawer.jm-has-account-drawer .mobile-navigation ul li:last-child > .drawer-nav-drop-wrap,
body.logged-in #mobile-drawer.jm-has-account-drawer .jm-account-menu--mobile li:last-child a {
    border-bottom: 0;
}

body.logged-in #mobile-drawer.jm-has-account-drawer .mobile-navigation .drawer-sub-toggle {
    color: rgba(255, 255, 255, 0.72);
}

body.logged-in #mobile-drawer.jm-has-account-drawer .jm-account-menu--mobile .menu-item-has-children > a {
    position: relative;
    padding-right: 28px;
}

body.logged-in #mobile-drawer.jm-has-account-drawer .jm-account-menu--mobile .menu-item-has-children > a::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 6px;
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-60%) rotate(45deg);
    opacity: 0.55;
    transition: transform 0.16s ease, opacity 0.16s ease;
}

body.logged-in #mobile-drawer.jm-has-account-drawer .jm-account-menu--mobile .menu-item-has-children.is-open > a::after {
    transform: translateY(-15%) rotate(225deg);
    opacity: 0.82;
}

body.logged-in #mobile-drawer.jm-has-account-drawer .jm-account-menu--mobile .sub-menu {
    display: none;
    margin: 0;
    padding: 2px 0 8px;
    list-style: none;
}

body.logged-in #mobile-drawer.jm-has-account-drawer .jm-account-menu--mobile .menu-item-has-children.is-open > .sub-menu {
    display: block;
}

body.logged-in #mobile-drawer.jm-has-account-drawer .jm-account-menu--mobile .sub-menu a {
    padding: 12px 8px 12px 18px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

body.logged-in #mobile-drawer.jm-has-account-drawer .jm-account-menu--mobile .sub-menu li:last-child a {
    border-bottom: 0;
}

body.logged-in #mobile-drawer.jm-has-account-drawer .mobile-navigation ul li.menu-item-has-children .sub-menu {
    margin-top: 4px;
    padding-left: 0;
}

body.logged-in #mobile-drawer.jm-has-account-drawer .mobile-navigation ul li.menu-item-has-children .sub-menu a {
    padding: 12px 8px 12px 18px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    font-weight: 600;
}

body.logged-in #mobile-drawer.jm-has-account-drawer .jm-mobile-account-logout {
    display: block;
    margin-top: 14px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 1100px) {
    .jm-header-bar {
        grid-template-columns: minmax(150px, 190px) 1fr;
    }
    .jm-header-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
        padding-bottom: 18px;
    }
    .jm-header-nav {
        justify-content: flex-start;
    }
}

@media (max-width: 767px) {
    .jm-header-bar {
        display: none;
    }
}

/* ── Wrapper sticky ──────────────────────────────────────────────────────── */

#jm-site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 12px 24px;
    background: transparent;
}

.jm-header-wrap {
    max-width: 1480px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Drawer mobile — état fermé / ouvert ─────────────────────────────────── */

.jm-header-mobile-bar {
    display: none;
    max-width: 1480px;
    margin-left: auto;
    margin-right: auto;
}

.jm-header-mobile-drawer {
    display: none;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    background: var(--jm-surface, #ffffff);
    border-radius: var(--jm-radius-xl);
    box-shadow: var(--jm-shadow);
    margin-top: 8px;
    overflow: hidden;
}

.jm-header-mobile-drawer.is-open {
    display: block;
}

@media (max-width: 767px) {
    .jm-header-bar      { display: none; }
    .jm-header-mobile-bar { display: flex; }
}

/* ── Page maintenance (ID 599) — header masqué ──────────────────────────── */
body.page-id-599 #masthead,
body.page-id-599 #jm-site-header {
    display: none;
}

/* ── Annule le margin-top Kadence (transparent-header) ──────────────────── */
/* Kadence ajoute body.transparent-header même avec notre header custom,
   ce qui génère calc(80px + 24px) de margin-top sur .content-area.
   On le remet à 0 — notre header sticky n'a pas besoin de ce décalage. */
.content-area {
    margin-top: 0 !important;
}
