/** header **
------------------------------------------------------------
------------------------------------------------------------*/
header {
    position: relative;
    z-index: 1;
    transition: .3s;
}

.menu-bars {
    display: block;
    width: 36px;
    height: 2px;
    background: var(--color-primaire);
    margin: 10px 0;
}

/** BOUTONS HEADERTOP **
------------------------------------------------------------
------------------------------------------------------------*/
.header-btn, .header-btn-mobile, .header-close {
    cursor: pointer;
    transition: .3s;
}
.header-btn-search button {
    color: var(--color-dark);
    padding: 0;
    font-size: 22px;
}




/* Header sticky lorsque le menu mobile est ouvert */
.header-sticky {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 9;
}
body.scrolled .header {
    background: var(--color-tertiaire);
}

/* Ajustement pour la barre d'administration WordPress */
.admin-bar .header-sticky {
    top: 32px; /* Hauteur standard de la barre d'admin WP */
}

@media screen and (max-width: 782px) {
    .admin-bar .header-sticky {
        top: 0; /* Hauteur de la barre d'admin WP sur mobile */
    }
}
.menu-account {
    position: relative;
}
header .btn, header .btn-1, header .btn-2, .wpml-ls-legacy-list-horizontal a {
    white-space: nowrap;
    transition: .3s;
}
.header-recherche {
    margin: 0 20px;
}
header svg, header i {
    cursor: pointer;
}

body.no-scroll {
    overflow: hidden;
}

a {
    transition: .3s;
}

/** LOGO **
------------------------------------------------------------
------------------------------------------------------------*/
img.custom-logo.custom-logo-regular, img.custom-logo.custom-logo-small {
    height: 100%;
}
@media only screen and (min-width: 992px) {
    img.custom-logo.custom-logo-small {
        display: none;
    }
    img.custom-logo.custom-logo-regular {
        display: inline-block;
    }
}
@media only screen and (max-width: 991px) {
    img.custom-logo.custom-logo-small {
        display: inline-block;
    }
    img.custom-logo.custom-logo-regular {
        display: none;
    }
}

/** BTN URGENCE **
------------------------------------------------------------
------------------------------------------------------------*/
.header .btn-cta-urgence {
    border-radius: 0;
    display: block;
    right: -40px;
}
@media only screen and (max-width: 768px) {
    .header .btn-cta-urgence {
        right: -20px;
    }
}
.wp-child-theme-wp-theme-chcb-dotation-child .header .btn-cta-urgence {
    display: none;
}

/** MENU TOP **
------------------------------------------------------------
------------------------------------------------------------*/
.menu-top ul,
.menu-redirect ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}
.menu-top ul li,
.menu-redirect ul li {
    padding: 10px 20px;
    /* border-left: 1px solid var(--color-liseret); dynamique dans le fichier header.php */
}
@media only screen and (max-width: 991px) {
    .menu-top ul li,
    .menu-redirect ul li {
        padding: 10px;
        border-left: none !important;
    }
}
.menu-top ul li a,
.menu-redirect ul li a {
    position: relative;
    /* color: var(--color-light); dynamique dans le fichier header.php */
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: 14px; /* 137.5% */
}
.menu-top ul li a i,
.menu-redirect ul li a i {
    margin-right: 5px;
}
.menu-top li a::before,
.menu-redirect li a::before,
.menu-top li a::after,
.menu-redirect li a::after {
    position: absolute;
    width: 100%;
    height: 1px;
    background: currentColor;
    top: 25px;
    left: 0;
    pointer-events: none;
}

.menu-top li a::before,
.menu-redirect li a::before {
    content: '';
}
.menu-top li a::before,
.menu-redirect li a::before {
    transform-origin: 100% 50%;
    transform: scale3d(0, 1, 1);
    transition: transform 0.3s;
}
.menu-top li a:hover::before,
.menu-redirect li a:hover::before {
    transform-origin: 0% 50%;
    transform: scale3d(1, 1, 1);
}
.menu-top li.tel-standard a::before {
    top: 38px;
}
.menu-burger {
    border: 1px solid var(--color-dark);
    border-radius: 4px;
    padding: 16px 16px 12px 16px;
    cursor: pointer;
    transition: .3s;
}
.menu-burger:hover {
    background: var(--color-dark);
}
.menu-burger:hover i {
    color: var(--color-light);
}
.menu-burger i {
    color: var(--color-dark);
    font-size: 26px;
    transition: .3s;
    font-weight: 300;
}
.offcanvas-header {
    position: absolute;
    right: 20px;
    top: 20px;
}
.offcanvas-header .btn-close {
    filter: invert(1);
    font-size: 25px;
    opacity: 1;
}

.header-close {
    font-size: 36px;
}
.header-btn-mobile a, .header-btn a {
    color: var(--color-dark);
}
.header-btn:hover, .header-btn:hover a {
    color: var(--color-3);
}
.header-btn-fa,
.slick-prev::before, .slick-next::before {
    font-family: var(--font-fa) !important;
    font-weight: 600;
}
.header-btn-fa {
    white-space: nowrap;
}


/** MENU PRINCIPAL DESKTOP **
------------------------------------------------------------
------------------------------------------------------------*/
@-webkit-keyframes fadeInRight {
    0% {
        opacity: 0;
        left: 20%;
    }
    100% {
        opacity: 1;
        left: 0;
    }
}

@keyframes fadeInRight {
    0% {
        opacity: 0;
        left: 20%;
    }
    100% {
        opacity: 1;
        left: 0;
    }
}

/* langue */
#menu-menu_langue {
    padding-left: 0;
}
/* ====================================================================================================
	MENU CSS
==================================================================================================== */
#mobile-menu {
    display: none;
}
.mobile-menu.header-menu {
    background: var(--color-1);
    color: var(--color-light);
}
.header-menu:not(.mega-menu) {
    position: relative;
    display: block;
    text-decoration: none;
    text-align: center;
}
.header-menu .bt- {
    cursor: pointer;
}
.header-menu a {
    border-color: transparent;
}
.header-menu a:hover {
    color: var(--color-1);
}
.header-menu:not(.mega-menu) ul,
.header-menu:not(.mega-menu) ul li,
.header-menu:not(.mega-menu) ul li a {
    position: relative;
}
.header-menu:not(.mega-menu) ul {
    z-index: 1;
    margin-bottom: 0;
}
.header-menu:not(.mega-menu) > ul > li > a {
    border: 1px solid transparent;
    color: var(--color-dark);
}
.header-menu *, .sub-menu {
    transition: .3s;
}
.header-menu ul {
    margin-bottom: 0;
}
.header-menu ul li {
    margin: 0 25px;
    display: inline-block;
    transition: .3s;
}
.header-menu ul li a {
    display: block;
    font-size: 18px;
    font-style: normal;
    font-weight: 600;
    line-height: 24px;
    color: var(--color-dark);
}
.header-menu ul > li > a {
    padding: 20px 0;
}
.header-menu:not(.mega-menu) ul.menu > li > a::before {
    position: absolute;
    width: 100%;
    height: 2px;
    background: currentColor;
    top: 45px;
    left: 0;
    pointer-events: none;
    content: '';
    transform-origin: 100% 50%;
    transform: scale3d(0, 1, 1);
    transition: transform 0.3s;
}
.header-menu:not(.mega-menu) ul.menu > li > a:hover::before,
.header-menu:not(.mega-menu) ul.menu > li.current-menu-item > a::before {
    transform-origin: 0% 50%;
    transform: scale3d(1, 1, 1);
}

/* Flèche pour les éléments du premier niveau qui ont des sous-menus */
.header-menu ul.menu > li.menu-item-has-children > a::after {
    content: '\f107';
    font-family: var(--font-fa);
    display: inline-block;
    margin-left: 8px;
    font-size: 14px;
    color: var(--color-dark);
    font-weight: 400;
}
.header-menu ul.menu > li.menu-item-has-children:hover > a::after {
    content: '\f106';
    color: var(--color-dark);
}
.header-menu a {
    white-space: nowrap;
}
.header-menu .sub-menu {
    cursor: pointer;
}

/*** submenu ***/
.header-menu:not(.mega-menu) ul ul {
    position: absolute;
    visibility: hidden;
    opacity: 0;
    max-height: 0;
    background-color: var(--color-primaire);
    border-radius: 10px;
    padding: 10px 0;
    min-width: 250px;
    left: 0;
    top: 100%;
    transition: 0.3s;
    z-index: 100;
}
.header-menu ul li:hover > ul {
    visibility: visible;
    opacity: 1;
    max-height: 1000px;
    z-index: 100;
}

.header-menu:not(.mega-menu) ul ul li {
    display: block;
    overflow: hidden;
    height: auto;
    padding: 10px;
    transition: 0.3s;
}
.header-menu ul ul {
    margin: 0 0 0 -40px;
}
.header-menu ul ul li {
    display: flex;
    transition: .3s;
    flex-wrap: nowrap;
    flex-direction: column;
    align-items: flex-start;
    margin: 0 8px;
}

/* RESPONSIVE
================================================== */
@media only screen and (max-width: 991px) {
    .menu-header-principal .header-menu {
        display: none;
    }
    input.header-menu-button {
        display: none;
    }

    label.header-menu-button {
        display: inline-block;
        text-transform: uppercase;
        background: var(--color-light);
        color: var(--color-dark);
        cursor: pointer;
        height: 80px;
        font-size: 0;
        width: 90px;
        padding: 30px 0 0 30px;
        /*border-left: 1px solid #000000;*/
    }

    label.header-menu-button:before {
        position: absolute;
        content: '\f0c9';
        font-family: var(--font-fa);
        font-size: 40px;
        z-index: 1;
    }

    .header-menu ul {
        margin: 0;
        padding: 0;
    }

    .header-menu li, .header-menu a {
        display: block;
    }

    .header-menu li {
        position: initial !important;
    }

    .header-menu ul > li {
        padding-bottom: 0;
    }

    .header-menu > ul > li:hover > a,
    .header-menu > ul > li.current > a {
        border-left: 1px solid transparent;
        border-right: 1px solid transparent;
    }

    .header-menu ul ul ul a {
        padding-left: 55px;
    }

    .header-menu ul ul ul ul a {
        padding-left: 70px;
    }

    .header-menu ul ul li a {
        font-size: 16px;
        padding-left: 40px;
    }

    .header-menu ul ul ul a {
        font-size: 16px;
        padding-left: 60px;
    }

    .header-menu ul li.menu-item-has-children > a:before,
    .header-menu ul li.menu-item-has-children > a:after {
        top: 50%;
        left: auto;
        right: 12px;
        background: var(--color-dark);
    }

    .header-menu ul li.menu-item-has-children > a:before {
        margin-top: -6px;
    }

    .header-menu ul li.menu-item-has-children > a:after {
        margin-top: 6px;
    }


    .header-menu .show-submenu {
        position: absolute;
        display: block !important;
        right: 0;
        margin: 0 21px;
        -webkit-appearance: none;
    }

    .header-menu .show-submenu:before {
        content: "\f078";
        font-family: var(--font-fa);
        font-size: 20px;
        color: var(--color-dark);
        display: block;
        position: relative;
        top: -20px;
    }

    .header-menu .show-submenu + ul,
    .header-menu .show-submenu + .menu-wrapper {
        display: none;
        visibility: hidden;
    }

    .header-menu .show-submenu:checked + ul,
    .header-menu .show-submenu:checked + .menu-wrapper {
        display: block;
        visibility: visible;
        top: 1px;
    }

    .btn-header {
        display: none;
    }
    .header-recherche {
        margin-right: 0;
    }


    @-webkit-keyframes slide-left {
        0% {
            left: 100%;
        }
        100% {
            left: 0%;
        }
    }
    @keyframes slide-left {
        0% {
            left: 100%;
        }
        100% {
            left: 0%;
        }
    }

}

@media (max-width: 1200px) {
    header .header-site .col-10 {
        padding-left: 100px!important;
    }
    .header-menu .sub-menu .sub-menu {
        max-width: 250px;
        width: 100%;
    }
    .header-menu #menu-menu_principal > li > a, .header-menu .sub-menu .sub-menu a {
        white-space: normal;
    }
    .header-menu ul.sub-menu ul li {
        -padding: 15px 20px 15px 20px;
    }
    .header-btn {
        width: 46px;
    }
    #menu-menu_principal {
        display: flex;
        padding-right: 2rem;
    }
}

@-webkit-keyframes fade-in {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}
@keyframes fade-in {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}


/*------------------- message_top -------------------*/
.message_top,
.message_top a {
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 20px; /* 125% */
}


/*------------------- menu mobile -------------------*/
.menu-header-mobile {
    position: fixed;
    width: 100%;
    z-index: 999;
    left: 0;
    right: 0;
    top: var(--menu-top-position, 0px); /* Utilise directement la variable header-height qui contient la hauteur totale */
    height: calc(100vh - var(--menu-top-position, 0px)); /* Utilise la même variable pour la hauteur */
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: .3s;
}

.menu-header-mobile.active {
    max-height: calc(100vh - var(--menu-top-position, 0px)); /* Hauteur maximale ajustée */
    opacity: 1;
    background: var(--color-light);
}
/* Bouton de fermeture du menu mobile */
.close-menu-mobile {
    position: absolute;
    top: 45px;
    right: 20px;
    z-index: 1000;
    background: transparent;
    border: none;
    color: var(--color-light);
    font-size: 18px;
    cursor: pointer;
    width: auto;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.close-menu-mobile .fa-xmark-large {
    color: var(--color-light);
    font-size: 16px;
}
.menu-header-mobile.active .close-menu-mobile {
    opacity: 1;
}
.menu-header-mobile nav.menu-mobile {
    position: relative;
    padding: 0;
    overflow: auto;
    overflow-x: hidden;
    width: 100vw;
    height: calc(100vh - var(--menu-top-position, 0px)); /* Hauteur maximale ajustée */
    margin-top: 0; /* Plus besoin de marge car déjà positionné sous le header */
    background: var(--color-primaire);
}
@media (min-width: 768px) {
    .menu-header-mobile,
    .menu-header-mobile nav.menu-mobile {
        width: 100%;
    }
}

.menu-header-mobile ul {
    padding: 0rem;
    border-top: 1px solid var(--color-dark);
}
.menu-header-mobile li {
    min-height: 62px;
    background: var(--color-light);
    border-bottom: 1px solid var(--color-dark);
    display: flex;
    align-items: center;
    cursor: pointer;
}
.menu-header-mobile .menu-menu_top-container ul,
.menu-header-mobile .menu-menu_top-container li {
    border-top: none;
    border-bottom: none;
}
.menu-header-mobile .menu-menu_top-container li i {
    margin-right: 10px;
}
.menu-header-mobile li:has(.sub-menu)::after {
    position: absolute;
    width: 34px;
    height: 62px;
    content: '\f054';
    font-family: var(--font-fa);
    font-size: 22px;
    right: var(--rem-1);
    font-weight: 300;
    line-height: 62px;
    color: var(--color-dark);
}

.menu-header-mobile a {
    color: var(--color-dark);
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: 18px;
    margin-left: var(--rem-2);
    display: flex;
    position: relative;
    height: 62px;
    align-items: center;
    min-width: 30%;
}
@media (max-width: 768px) {
    .menu-header-mobile a {
        margin-left: var(--rem-2);
    }
    .menu-header-mobile li:has(.sub-menu)::after {
        right: 0;
    }
}
.menu-header-mobile li a::after {
    position: absolute;
    width: 100%;
    height: 1px;
    background: currentColor;
    top: 100%;
    left: 0;
    pointer-events: none;
}
.menu-header-mobile li a::after {
    transform-origin: 100% 50%;
    transform: scale3d(0, 1, 1);
    transition: transform 0.3s;
    content: '';
}
.menu-header-mobile li a:hover::after {
    transform-origin: 0% 50%;
    transform: scale3d(1, 1, 1);
}
.menu-header-mobile .sub-menu {
    position: absolute;
    height: calc(100vh - var(--menu-top-position));
    top: 0;
    right: -110%;
    z-index: 1;
    width: 100%;
    background: var(--color-light);
    overflow: hidden;
    transition: .3s;
    /*box-shadow: 0 0 10px #aaa;*/
}
.menu-header-mobile .sub-menu .sub-menu {
    z-index: 2;
}
.menu-header-mobile .sub-menu .sub-menu .sub-menu {
    z-index: 3;
}
.menu-header-mobile .sub-menu .sub-menu .sub-menu .sub-menu {
    z-index: 4;
}
.menu-header-mobile .sub-menu.opened {
    right: 0;
}
.menu-header-mobile .retour {
    background: var(--color-primaire);
    color: var(--color-light);
    padding-left: 1rem;
    border: 0;
    min-height: 65px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--color-tertiaire);
}
.menu-header-mobile li.menu-parent {
    background: var(--color-light);
}
.menu-header-mobile .parent-title {
    padding-left: var(--rem-2);
    font-size: 22px;
    font-style: normal;
    font-weight: 700;
    line-height: 32px;
    color: var(--color-dark);
}
.menu-header-mobile .retour::before {
    position: relative;
    width: 34px;
    height: 42px;
    content: '\f053';
    font-family: var(--font-fa);
    font-size: 22px;
    font-weight: 300;
    line-height: 42px;
}
.menu-header-mobile li.primaire {
    background: var(--color-primaire);
    border-bottom: 1px solid var(--color-tertiaire);
}
.menu-header-mobile li.primaire a {
    color: var(--color-light);
}
.menu-header-mobile:has(input#mobile-menu:checked) {
    max-height: 100vh;
    opacity: 1;
}
@media only screen and (max-width: 768px) {
    body:has(input#mobile-menu:checked) {
        overflow: hidden;
    }
}


/* MEGA MENU
================================================== */
.sub-menu-tpl {
    position: absolute;
    width: 100%;
    left: 0;
    right: 0;
    background: var(--color-light);
    color: var(--color-dark);
    margin-top: 0;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: .8s;
}
li:hover > .sub-menu-tpl {
    max-height: 900px;
    opacity: 1;
    z-index: 10;

    -padding-left: calc(var(--cont-margin) - var(--rem-1));
    border-bottom: 1px solid var(--color-primaire);
    border-top: 1px solid var(--color-primaire);
}
.sub-menu-tpl li > a {
    color: var(--color-dark);
    font-size: 17px !important;
    font-weight: 600 !important;
    line-height: 22px !important; /* 129.412% */
    letter-spacing: -0.17px !important;
    margin: 15px 0;
}
.sub-menu-tpl ul ul li a {
    color: var(--color-dark);
    font-size: 17px !important;
    font-weight: 400 !important;
    transition: 0.2s;
    margin: 5px 0;
}
.sub-menu-tpl ul ul li a:hover {
    color: var(--color-primaire) !important;
}
.sub-menu-tpl ul.menu > li.menu-item-has-children > a::after {
    content: '' !important;
    margin-left: 0 !important;
}
.sub-menu-tpl li .sub-menu li a::before {
    content: '\f068' !important;
    margin-left: 0 !important;
    font-family: var(--font-fa);
    font-weight: 300;
    font-size: 12px;
    margin-right: 10px;
}

.header-menu ul li .sub-menu-tpl li,
.header-menu ul li .sub-menu-tpl li a {
    padding: 0 !important;
    white-space: normal !important;
}