/* =========================================================
   MENU HEADER  [menu_header]
   ========================================================= */

/* ===== Variables (modifie ici) ===== */
.mh {
    --mh-ink: #0f172a;
    --mh-muted: #64748b;
    --mh-accent: #12a377;
    --mh-accent-soft: rgba(79, 70, 229, .09);
    --mh-bg: #ffffff;
    --mh-line: rgba(15, 23, 42, .08);
    --mh-radius: 14px;
    --mh-fs: 16px;
    --mh-ease: cubic-bezier(.22, 1, .36, 1);
    --mh-shadow: 0 24px 60px -14px rgba(15, 23, 42, .28), 0 0 0 1px rgba(15, 23, 42, .05);
    --mh-burger-top: 14px;
    --mh-burger-right: 14px;
    position: relative;
    font-size: var(--mh-fs);
    line-height: 1.4;
    font-family: inherit;
    color: var(--mh-ink);
    -webkit-font-smoothing: antialiased;
}

.mh--portal {
    position: static
}

/* ===== Affichage selon l'écran ===== */
@media (min-width:1025px) {
    .mh--burger {
        display: none !important
    }
}

@media (max-width:1024px) {
    .mh--pc {
        display: none !important
    }
}

/* ===== Reset (contre les styles du thème / Elementor) ===== */
.mh,
.mh *,
.mh *::before,
.mh *::after {
    box-sizing: border-box
}

.mh ul,
.mh li {
    list-style: none;
    margin: 0;
    padding: 0
}

.mh li::marker {
    content: ""
}

.mh a {
    color: var(--mh-ink);
    text-decoration: none;
    background: none;
    transition: color .25s ease, background-color .25s ease
}

.mh button[type=button] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
    color: var(--mh-ink);
    font: inherit;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    cursor: pointer;
    min-width: 0;
    min-height: 0;
    -webkit-tap-highlight-color: transparent;
}

.mh a:focus-visible,
.mh button:focus-visible {
    outline: 2px solid var(--mh-accent);
    outline-offset: 3px;
    border-radius: 8px
}

/* ===== Chevron ===== */
.mh .mh__toggle[type=button] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 1.6em;
    height: 1.6em;
    border-radius: 50%;
    color: var(--mh-bg);
    transition: background-color .25s ease, color .25s ease;
}

.mh .mh__toggle[type=button]:hover {
    background: var(--mh-accent-soft);
    color: var(--mh-accent)
}

.mh__chevron {
    width: .45em;
    height: .45em;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-.1em) rotate(45deg);
    transition: transform .35s var(--mh-ease);
}

.mh .is-open>.mh__toggle .mh__chevron {
    transform: translateY(.1em) rotate(-135deg)
}

/* ===== Liens actifs ===== */
.mh .current-menu-item>a,
.mh .current-menu-ancestor>a,
.mh .current_page_item>a {
    color: #12a377;
}

/* =========================================================
   DESKTOP
   ========================================================= */
@media (min-width:1025px) {

    .mh .mh__cta{
        display: none;
    }

    ul.mh__list li>a:not(div.mh__sub a) {
        color: white !important;
    }
    .mh .mh__burger,
    .mh .mh__close,
    .mh .mh__overlay,
    .mh .mh__cta {
        display: none !important
    }

    .mh__list {
        display: flex;
        align-items: center;
        gap: .15em
    }

    .mh__list li {
        position: relative;
        display: flex;
        align-items: center
    }

    .mh__list>li>a {
        position: relative;
        padding: .85em 1.05em;
        font-size: .95em;
        font-weight: 500;
        letter-spacing: .01em;
        white-space: nowrap
    }

    .mh__list>li>a::after {
        content: "";
        position: absolute;
        left: 1.05em;
        right: 1.05em;
        bottom: .5em;
        height: 2px;
        border-radius: 2px;
        background: var(--mh-accent);
        transform: scaleX(0);
        transform-origin: left center;
        transition: transform .4s var(--mh-ease);
    }

    .mh__list>li>a:hover,
    .mh__list>li:focus-within>a {
        color: var(--mh-bg)
    }

    .mh__list>li>a:hover::after,
    .mh__list>li:hover>a::after,
    .mh__list>li.current-menu-item>a::after,
    .mh__list>li.current-menu-ancestor>a::after,
    .mh__list>li.current_page_item>a::after {
        transform: scaleX(1)
    }

    .mh__list>li>.mh__toggle {
        margin-left: -.85em;
        margin-right: .35em
    }

    /* Dropdown */
    .mh__sub {
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 999;
        min-width: 15.5em;
        padding-top: .7em;
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        transition: opacity .25s ease, transform .35s var(--mh-ease), visibility .25s;
    }

    .mh__sub>.sub-menu {
        background: rgb(255 255 255);
        -webkit-backdrop-filter: saturate(180%) blur(18px);
        backdrop-filter: saturate(180%) blur(18px);
        border-radius: var(--mh-radius);
        box-shadow: var(--mh-shadow);
        padding: .5em;
    }

    .mh li:hover>.mh__sub,
    .mh li:focus-within>.mh__sub,
    .mh li.is-open>.mh__sub {
        opacity: 1;
        visibility: visible;
        transform: none
    }

    .mh .mh__sub li {
        display: flex;
        width: 100%
    }

    .mh .mh__sub a {
        flex: 1;
        padding: .7em .95em;
        font-size: .93em;
        font-weight: 500;
        white-space: nowrap;
        border-radius: calc(var(--mh-radius) - 4px);
    }

    .mh .mh__sub a:hover {
        background: var(--mh-accent-soft);
        color: var(--mh-accent)
    }

    .mh .mh__sub .mh__toggle[type=button] {
        margin-right: .3em
    }

    .mh .mh__sub .mh__chevron,
    .mh .mh__sub .is-open>.mh__toggle .mh__chevron {
        transform: rotate(-45deg)
    }

    /* Niveau 3 */
    .mh .mh__sub .mh__sub {
        top: -.5em;
        left: 100%;
        padding-top: 0;
        padding-left: .5em
    }

    /* Anti-débordement à droite */
    .mh__list>li:nth-last-child(-n+2)>.mh__sub {
        left: auto;
        right: 0
    }

    .mh__list>li:nth-last-child(-n+2) .mh__sub .mh__sub {
        left: auto;
        right: 100%;
        padding-left: 0;
        padding-right: .5em
    }

    .mh__list>li:nth-last-child(-n+2) .mh__sub .mh__chevron {
        transform: rotate(135deg)
    }
}

/* =========================================================
   MOBILE / TABLETTE  (≤ 1024px)
   ========================================================= */
@media (max-width:1024px) {
    .mh .mh__burger[type=button] {
        position: relative;
        z-index: 2;
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        width: 46px;
        height: 46px;
        border-radius: 9px;
        border: 1px solid white;
        transition: background-color .25s ease, transform .25s var(--mh-ease);
    }

    .mh.mh--burger .mh__burger[type=button] {
        position: fixed;
        top: calc(var(--mh-burger-top) + env(safe-area-inset-top, 0px));
        right: calc(var(--mh-burger-right) + env(safe-area-inset-right, 0px));
        z-index: 99997;
        width: 52px;
        height: 52px;
        -webkit-backdrop-filter: blur(14px);
        backdrop-filter: blur(14px);
        box-shadow: 0 10px 30px -8px rgba(15, 23, 42, .35), 0 0 0 1px rgba(15, 23, 42, .06);
    }

    .mh .mh__burger[type=button]:active {
        transform: scale(.94)
    }

    .mh__bar {
        display: block;
        width: 20px;
        height: 2px;
        border-radius: 2px;
        background: #ffffff;
        transition: transform .4s var(--mh-ease), opacity .2s ease
    }

    .mh.is-open .mh__bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg)
    }

    .mh.is-open .mh__bar:nth-child(2) {
        opacity: 0
    }

    .mh.is-open .mh__bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg)
    }

    /* Fond */
    .mh__overlay {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 99998;
        background: rgba(15, 23, 42, .5);
        -webkit-backdrop-filter: blur(4px);
        backdrop-filter: blur(4px);
        opacity: 0;
        visibility: hidden;
        transition: opacity .4s ease, visibility .4s;
    }

    .mh.is-open .mh__overlay {
        opacity: 1;
        visibility: visible
    }

    /* Tiroir */
    .mh__nav {
        position: fixed;
        top: 0;
        right: 0;
        z-index: 99999;
        width: 85vw;
        height: 100%;
        height: 100dvh;
        display: flex;
        flex-direction: column;
        padding: calc(5.5em + env(safe-area-inset-top, 0px)) 1.6em calc(2em + env(safe-area-inset-bottom, 0px));
        background: var(--mh-bg);
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        transform: translateX(100%);
        visibility: hidden;
        transition: transform .55s var(--mh-ease), visibility .55s;
        box-shadow: -24px 0 60px -20px rgba(15, 23, 42, .35);
    }

    .mh.is-open .mh__nav {
        transform: none;
        visibility: visible
    }

    /* Bouton fermer */
    .mh .mh__close[type=button] {
        position: absolute;
        top: calc(1.1em + env(safe-area-inset-top, 0px));
        right: 1.3em;
        width: 46px;
        height: 46px;
        border-radius: 50%;
        background: var(--mh-accent-soft);
        transition: transform .3s var(--mh-ease), background-color .25s ease;
    }

    .mh .mh__close[type=button]:hover {
        background: var(--mh-accent)
    }

    .mh .mh__close[type=button]::before,
    .mh .mh__close[type=button]::after {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        width: 18px;
        height: 2px;
        border-radius: 2px;
        background: var(--mh-ink);
        transition: background-color .25s ease;
    }

    .mh .mh__close[type=button]::before {
        transform: translate(-50%, -50%) rotate(45deg)
    }

    .mh .mh__close[type=button]::after {
        transform: translate(-50%, -50%) rotate(-45deg)
    }

    .mh .mh__close[type=button]:hover::before,
    .mh .mh__close[type=button]:hover::after {
        background: #fff
    }

    .mh .mh__close[type=button]:active {
        transform: rotate(90deg)
    }

    /* Liste */
    .mh__list {
        display: flex;
        flex-direction: column
    }

    .mh__list li {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        width: 100%
    }

    .mh__list>li {
        border-bottom: 1px solid var(--mh-line);
        opacity: 0;
        transform: translateX(28px);
        transition: opacity .5s ease, transform .6s var(--mh-ease);
    }

    .mh.is-open .mh__list>li {
        opacity: 1;
        transform: none;
        transition-delay: .55s
    }

    .mh.is-open .mh__list>li:nth-child(1) {
        transition-delay: .12s
    }

    .mh.is-open .mh__list>li:nth-child(2) {
        transition-delay: .17s
    }

    .mh.is-open .mh__list>li:nth-child(3) {
        transition-delay: .22s
    }

    .mh.is-open .mh__list>li:nth-child(4) {
        transition-delay: .27s
    }

    .mh.is-open .mh__list>li:nth-child(5) {
        transition-delay: .32s
    }

    .mh.is-open .mh__list>li:nth-child(6) {
        transition-delay: .37s
    }

    .mh.is-open .mh__list>li:nth-child(7) {
        transition-delay: .42s
    }

    .mh.is-open .mh__list>li:nth-child(8) {
        transition-delay: .47s
    }

    .mh__list>li>a {
        flex: 1;
        padding: .8em .1em;
        font-size: clamp(19px, 5.2vw, 25px);
        font-weight: 600;
        letter-spacing: -.01em
    }

    .mh__list a:hover {
        color: var(--mh-accent)
    }

    .mh .mh__toggle[type=button] {
        width: 2.6em;
        height: 2.6em;
        background: var(--mh-accent-soft);
        color: var(--mh-accent)
    }

    .mh .is-open>.mh__toggle[type=button] {
        background: #12a377;
        color: #fff
    }

    .mh .mh__cta {
        margin-top: 1.6em;
        opacity: 0;
        transform: translateX(28px);
        transition: opacity .5s ease, transform .6s var(--mh-ease);
		display: flex;
		flex-direction: column;
		gap: 1rem;
    }

    .mh.is-open .mh__cta {
        opacity: 1;
        transform: none;
        transition-delay: var(--mh-cta-delay, .55s)
    }

    .mh .mh__phone {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: .7em;
        width: 100%;
        padding: 1.05em 1.4em;
        border-radius: 999px;
        background: var(--mh-accent);
        color: #fff;
        font-size: 17px;
        font-weight: 600;
        letter-spacing: .01em;
        box-shadow: 0 14px 30px -10px rgba(15, 23, 42, .4);
        transition: transform .3s var(--mh-ease), background-color .25s ease;
    }

    .mh .mh__phone:hover,
    .mh .mh__phone:focus-visible {
        background: var(--mh-ink);
        color: #fff;
        transform: translateY(-2px)
    }

    .mh .mh__phone:active {
        transform: scale(.98)
    }

    .mh .mh__phone svg {
        width: 1.05em;
        height: 1.05em;
        flex: none;
        fill: currentColor
    }

    /* Accordéon fluide */
    .mh__sub {
        display: grid;
        grid-template-rows: 0fr;
        flex-basis: 100%;
        width: 100%;
        visibility: hidden;
        transition: grid-template-rows .45s var(--mh-ease), visibility .45s;
    }

    .mh li.is-open>.mh__sub {
        grid-template-rows: 1fr;
        visibility: visible
    }

    .mh__sub>.sub-menu {
        overflow: hidden;
        min-height: 0;
        padding-left: .9em;
        transition: padding .45s var(--mh-ease)
    }

    .mh li.is-open>.mh__sub>.sub-menu {
        padding-bottom: .6em
    }

    .mh .mh__sub a {
        flex: 1;
        padding: .7em .1em;
        font-size: 16px;
        font-weight: 500;
        color: var(--mh-muted)
    }

    .mh .mh__sub .mh__toggle[type=button] {
        width: 2.2em;
        height: 2.2em
    }
}

html.mh-lock {
    overflow: hidden
}

.mh li.navbar-nolink>a {
    cursor: pointer
}

@media (prefers-reduced-motion:reduce) {

    .mh *,
    .mh *::before,
    .mh *::after {
        transition-duration: .01ms !important;
        transition-delay: 0s !important
    }
}

.navbar-flexbox-header{
    align-items: center;
}

.navbar-links-shortcode{
    height: fit-content;
}