/* ============================================
   header.css — Header & Menu burger responsive
   ============================================
   Charte graphique : utilise les variables CSS
   --color-primary, --color-secondary, etc.
   injectées via mediapilote_inject_acf_colors_css().
   ============================================ */

/* ============================================
   Top bar
   ============================================ */
.top-menu-container {
    background: black;
    height: 40px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

.top-menu-container .top-menu {
    padding: 7px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: end;
    -ms-flex-pack: end;
    justify-content: flex-end;
}

.top-menu-container .top-menu * {
    color: white;
}

.top-menu-container .top-menu a {
    text-decoration: none;
}

.top-menu-container .top-menu li {
    list-style-type: none;
    padding: 0 3px;
}

.banner-top {
    color: #fff;
    text-align: center;
    padding: 10px 0;
    font-weight: 600;
    font-size: 17px;
}

.banner-top__track {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.banner-top__item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.banner-top__icon {
    width: 45px;
    height: 45px;
    flex-shrink: 0;
    object-fit: contain;
}

.banner-top__text {
    white-space: nowrap;
}

.banner-top__separator {
    color: inherit;
    font-weight: inherit;
    font-size: inherit;
}

/* ============================================
   Header principal
   ============================================ */
header {
    height: 124px;
    background: var(--color-tertiary, #ff154d);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

header > .container {
    max-width: var(--wp--style--global--wide-size);
}

header > div {
    height: 100%;
    padding: 12px 20px;
}

header .header-logo {
    display: flex;
    align-items: center;
    width: min(200px, 100%);
    max-width: 200px;
    height: auto;
    flex-shrink: 0;
}

header .header-logo img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 80px;
    object-fit: contain;
}

header .menu-item {
    display: flex;
    align-items: center;
    justify-content: center;
}

header .menu-item.btn {
    height: fit-content;
}

header .menu-item a {
    color: var(--color-secondary, #fff);
    font-weight: 500;
    text-decoration: none;
}

header nav {
    padding: 20px 0;
}

header nav ul {
    list-style-type: none;
    gap: 50px;
}

header nav ul li {
    text-align: center;
}

#masthead.sticky {
    -webkit-animation: smoothScroll 1s forwards;
    animation: smoothScroll 1s forwards;
}

/* ============================================
   Burger icon — bouton
   ============================================ */
.menu-burger {
    background-color: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0 1rem;
    z-index: 100;
}

.menu-burger svg {
    width: 40px;
    height: 40px;
}

.menu-burger .line {
    fill: none;
    stroke: var(--color-secondary, #000000);
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dasharray 600ms cubic-bezier(0.4, 0, 0.2, 1), stroke-dashoffset 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-burger .line1 {
    stroke-dasharray: 60 207;
    stroke-width: 6;
}

.menu-burger .line2 {
    stroke-dasharray: 60 60;
    stroke-width: 6;
}

.menu-burger .line3 {
    stroke-dasharray: 60 207;
    stroke-width: 6;
}

.menu-burger.opened .line1 {
    stroke-dasharray: 90 207;
    stroke-dashoffset: -134;
    stroke-width: 6;
}

.menu-burger.opened .line2 {
    stroke-dasharray: 1 60;
    stroke-dashoffset: -30;
    stroke-width: 6;
}

.menu-burger.opened .line3 {
    stroke-dasharray: 90 207;
    stroke-dashoffset: -134;
    stroke-width: 6;
}

/* ============================================
   Menu responsive — panneau plein écran
   ============================================ */
.menu-responsive {
    position: fixed;
    left: 0;
    right: 0;
    background: var(--color-tertiary);
    z-index: 1;
    top: -100vh;
    height: 100vh;
    overflow-y: scroll;
    bottom: 0;
    transition: top 0.6s ease-in-out;
}

.menu-responsive .container {
    padding-right: 50px;
    padding-left: 50px;
    max-width: var(--wp--style--global--content-size, 1280px);
    margin: 0 auto;
}

.menu-responsive ul {
    list-style-type: none;
    flex-direction: column !important;
    margin-left: 0;
}

.menu-responsive li {
    border-bottom: none !important;
}

.menu-responsive li::before {
    display: none !important;
}

.menu-responsive li:not(.btn) a,
.menu-responsive li:not(.btn) {
    font-weight: 400 !important;
    text-transform: initial !important;
    text-decoration: none !important;
    color: var(--color-primary, #ff154d) !important;
    padding: 0 !important;
}

.menu-responsive .btn {
    display: none !important;
}

.menu-responsive .separator {
    display: none;
}

.menu-responsive.opened {
    top: 124px;
    transition: top 0.6s ease-in-out;
}

.menu-responsive .menu-item-has-children {
    position: relative;
}

.menu-responsive .menu-item-has-children::after {
    position: absolute;
    top: 0;
    right: 0;
    content: "+";
    color: var(--color-secondary, #000000);
    cursor: pointer;
}

.menu-responsive .menu-item-has-children.active::after {
    content: "-";
    cursor: pointer;
}

.menu-responsive .menu-item-has-children.active .sub-menu {
    display: block !important;
    position: relative;
    transition: height 0.6s ease-in-out;
}

.menu-responsive .menu-item-has-children:not(.active) .sub-menu {
    height: 0 !important;
}

.menu-responsive .sub-menu {
    top: 0 !important;
    margin-left: 25px;
    transition: height 0.6s ease-in-out;
    overflow: hidden;
}

.menu-responsive .sub-menu li {
    background: transparent !important;
}

.menu-responsive .sub-menu li a {
    font-size: 16px !important;
    position: relative;
}

.menu-responsive .sub-menu li a::before {
    display: inline-block;
    content: "-";
    left: -15px;
    position: absolute;
    color: var(--color-secondary, #000000);
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
}

.menu-responsive .nav_main_sub_list {
    margin-left: 30px;
}

.menu-responsive .nav_main_sub_list a {
    color: var(--color-secondary, #000000) !important;
}

.menu-responsive a br {
    display: none;
}

/* ============================================
   Body states
   ============================================ */
body.opened {
    overflow: hidden;
}

body:not(.responsive) .main-menu-class {
    display: flex;
    align-items: center;
    justify-content: center;
}

body.responsive header {
    padding: 0;
    z-index: 2;
    position: relative;
}

body.responsive header .header-menu > ul {
    display: flex;
    flex-direction: column !important;
    gap: 10px;
    align-items: flex-end;
}

body.responsive header .btn {
    padding: 5px 10px 5px 10px;
}

body.responsive header .btn a {
    font-size: 12px !important;
}

/* ============================================
   Breakpoints
   ============================================ */

/* --- 768px --- */
@media (max-width: 768px) {
    .banner-top__track {
        flex-direction: column;
        gap: 8px;
    }

    .banner-top__separator {
        display: none;
    }
}

/* --- 992px --- */
@media (max-width: 992px) {
    header .header-menu {
        display: flex !important;
        order: 2;
        align-items: center;
        margin-left: auto;
    }

    header .header-menu .menu-item:not(.btn) {
        display: none !important;
    }

    .menu-burger {
        display: flex !important;
        order: 3;
        margin-left: 1rem;
        margin-right: 0;
    }

    header .header-menu .btn {
        margin: 0 4px;
    }

    #masthead {
        height: 124px;
    }

    header {
        height: 124px;
    }

    header .header-logo,
    header .header-logo img {
        height: 100%;
        width: auto;
    }

    .menu-responsive li {
        margin: 4px 0 !important;
    }

    .menu-responsive a,
    .menu-responsive li {
        font-size: 20px !important;
    }
}

@media (min-width: 993px) {
    .menu-burger {
        display: none !important;
    }
}

/* --- 1149px --- */
@media (max-width: 1149px) {
    .header-logo {
        width: min(130px, 100%) !important;
        max-width: 130px;
    }

    .header-logo img {
        width: 100%;
        height: auto;
        max-height: 64px;
        object-fit: contain;
    }
}

/* --- 1150px --- */
@media (min-width: 1150px) {
    header .header-logo img {
        height: 100%;
        width: auto;
        object-fit: contain;
    }
}

/* --- 1150px - 1530px --- */
@media (min-width: 1150px) and (max-width: 1530px) {
    header .header-logo {
        width: min(175px, 100%) !important;
        max-width: 175px;
    }
}

/* --- 1530px --- */
@media (max-width: 1530px) {
    header > .container {
        width: 100%;
    }

    header .menu-item {
        width: 100px;
    }

    header nav ul {
        gap: 20px;
    }

    .btn a {
        font-size: 14px !important;
    }
}