.header {
    @media screen and (min-width: 1024px) {
        pointer-events: none;
    }

    .header_banner {
        .header_lang-selector {
            .wpml-ls {
                ul {
                    display: flex;
                    flex-direction: row;
                    justify-content: space-between;

                    li {
                        font-family: var(--font-syne);
                        font-weight: 700;
                    }
                    li.wpml-ls-current-language {
                        opacity: 0.4;
                    }
                }
            }
        }
    }

    .header_main {
        .header_nav {
            pointer-events: auto;

            .header-main-menu {
                > .menu-item {
                    padding: 1rem 0;
                    position: relative;

                    /* Zone de pont invisible entre le menu et le sous-menu */
                    &:after {
                        content: "";
                        position: absolute;
                        top: 100%;
                        left: 0;
                        right: 0;
                        height: 30px;
                        background-color: transparent;
                        pointer-events: all;
                        z-index: 999;

                        @media screen and (max-width: 1024px) {
                            display: none;
                        }
                    }
                }
                > .menu-item {
                    a {
                        font-family: var(--font-syne);
                        font-size: 14px;
                        font-weight: 600;
                        line-height: 22px;
                        color: var(--color-white);
                        text-decoration: none;
                        transition: color 0.3s ease;
                    }
                    > a {
                        display: flex;
                        flex-direction: row;
                        align-items: center;
                        justify-content: space-between;
                        gap: 0.5rem;
                        position: relative;

                        span,
                        svg {
                            position: relative;
                            z-index: 2;
                        }

                        &:before {
                            content: "";
                            position: absolute;
                            top: 0;
                            left: 0;
                            width: 100%;
                            height: 100%;
                            background-color: var(--color-orange);
                            z-index: 1;
                            opacity: 0;
                            transition: all 0.3s ease;
                            border-radius: 15px;

                            @media screen and (max-width: 1024px) {
                                display: none;
                            }
                        }
                    }

                    /* Sous-menus cachés par défaut */
                    .custom-submenu {
                        position: absolute;
                        top: 100%;
                        left: 50%;
                        background-color: var(--color-black);
                        border-radius: 22px;
                        list-style: none;
                        opacity: 0;
                        visibility: hidden;
                        /* Délai plus long pour éviter les sauts (0.4s au lieu de 0.15s) */
                        transition: opacity 0.2s ease,
                                    visibility 0s ease 0.4s,
                                    transform 0.2s ease;
                        min-width: 200px;
                        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
                        z-index: 1000;
                        transform: translateX(-50%) translateY(0);
                        padding: 0.5rem 0.5rem;
                        pointer-events: all;

                        &:before {
                            content: "";
                            display: block;
                            position: absolute;
                            inset: 0;
                            opacity: 0;
                            transition: all 0.3s ease;
                            border-radius: 22px;
                            z-index: 2;
                            transform: scale(1.1);

                            @media screen and (max-width: 1024px) {
                                display: none;
                            }
                        }

                        li {
                            position: relative;
                            z-index: 3;

                            a {
                                font-family: var(--font-dm-sans);
                                font-size: 15px;
                                font-weight: 400;
                                color: var(--color-white);
                                display: block;
                                transition: background-color 0.3s ease, color 0.3s ease;
                                padding: 0.5rem 1rem;
                                border-radius: 12px;

                                &:hover {
                                    background-color: var(--color-orange);
                                    color: var(--color-white);
                                }
                            }
                        }
                    }

                    /* Afficher le sous-menu au survol du parent */
                    &:hover .custom-submenu {
                        opacity: 1;
                        visibility: visible;
                        transform: translateX(-50%) translateY(5px);
                        height: fit-content;
                        /* Pas de délai à l'affichage, animation plus rapide */
                        transition: opacity 0.2s ease,
                                    visibility 0s ease,
                                    transform 0.2s ease;
                    }

                    /* Garder le sous-menu visible quand on le survole directement */
                    .custom-submenu:hover {
                        opacity: 1;
                        visibility: visible;
                    }

                    &:hover {
                        > a {
                            color: var(--color-black);

                            > svg {
                                path {
                                    fill: var(--color-black);
                                }
                            }
                        }
                        @media screen and (min-width: 1024px) {
                            > a:before {
                                opacity: 1;
                                transform: scale(1.4);
                            }
                        }
                    }
                    @media screen and (min-width: 1024px) {
                        /* Animation de la flèche au survol */
                        &:hover .custom-menu_arrow {
                            transform: rotate(180deg);
                        }
                    }
                }
            }
        }
    }

    .mobile-menu {
        display: flex;
        flex-direction: column;
        justify-content: center;
        height: 100%;
        width: 100%;

        .mobile-menu_inner {
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            gap: 1rem;

            .mobile-menu_nav {
                position: relative;

                .mobile-nav {
                    height: 100%;
                    display: flex;
                    flex-direction: column;
                    justify-content: space-evenly;
                    align-items: center;
                    position: relative;
                    
                    > .menu-item {
                        width: 100%;
                        padding: 0.5rem 2rem;

                        a {
                            font-family: var(--font-syne);
                            color: var(--color-white);
                            font-size: var(--text-lg);
                        }

                        > a {
                            svg {
                                display: inline-block;
                                margin-left: 1rem;
                            }
                        }

                        .sub-menu {
                            position: absolute;
                            inset: 0;
                            height: 100%;
                            top: 50%;
                            transform: translateY(-50%);
                            background-color: var(--color-black);
                            right: 100%;
                            transition: all 0.3s ease-in-out;
                            overflow: hidden;
                        }

                        /* Bouton trigger pour les sous-menus */
                        > button.submenu-trigger {
                            background: none;
                            border: none;
                            cursor: pointer;
                            font-family: var(--font-syne);
                            color: var(--color-white);
                            font-size: var(--text-lg);
                            padding: 0;
                            display: flex;
                            flex-direction: row;
                            align-items: center;
                            width: 100%;
                            text-align: left;

                            svg {
                                display: inline-block;
                                margin-left: 1rem;
                                transition: transform 0.3s ease;
                            }

                            &[aria-expanded="true"] svg {
                                transform: rotate(90deg);
                            }
                        }

                        /* Sous-menu mobile */
                        .custom-submenu {
                            position: absolute;
                            top: 0;
                            left: 0;
                            right: 0;
                            bottom: 0;
                            height: 100vh;
                            width: 100%;
                            background-color: var(--color-black);
                            transform: translateX(100%);
                            transition: transform 0.3s ease-in-out;
                            z-index: 10;
                            padding: 0.5rem 2rem;

                            &.submenu-open {
                                transform: translateX(0);
                                opacity: 1;
                                visibility: visible;
                            }

                            /* Bouton retour */
                            .menu-item-back {
                                margin-bottom: 0.5rem;

                                .submenu-back {
                                    background: none;
                                    border: none;
                                    cursor: pointer;
                                    display: flex;
                                    flex-direction: row;
                                    align-items: center;
                                    gap: 0.75rem;
                                    padding: 0;

                                    svg {
                                        width: 20px;
                                        height: 20px;

                                        path {
                                            fill: var(--color-orange);
                                        }
                                    }

                                    .menu-item-text {
                                        font-family: var(--font-syne);
                                        font-size: var(--text-md);
                                        font-weight: 600;
                                        color: var(--color-orange);
                                    }
                                }
                            }

                            /* Lien vers la page parent */
                            .menu-item-parent-link {
                                border-bottom: 1px solid rgba(255, 255, 255, 0.2);

                                a {
                                    font-family: var(--font-syne);
                                    font-size: var(--text-md);
                                    font-weight: 700;
                                    color: var(--color-white);
                                }
                            }

                            /* Éléments du sous-menu */
                            .menu-item:not(.menu-item-back):not(.menu-item-parent-link) {
                                padding: 0.25rem 0;

                                a {
                                    font-family: var(--font-dm-sans);
                                    font-size: var(--text-md);
                                    font-weight: 400;
                                    color: var(--color-white);
                                    transition: color 0.2s ease;

                                    &:hover {
                                        color: var(--color-orange);
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
@media screen and (min-width: 1024px) {
    header a,
    header button {
        pointer-events: auto;
    }
}

@media screen and (max-width: 1024px) {
    .single-expertise .header {
        background-color: var(--color-white-2);
    }
}

.menu-toggle-bar {
    display: block;
    position: absolute;
    top: 50%;
    margin-top: -1px;
    right: 0;
    width: 100%;
    height: 1px;
    border-radius: 5px;
    background-color: var(--color-white);
    transition: all 0.3s ease;

    &.menu-toggle-bar--top {
        transform: translate(0, -6px);
    }
    &.menu-toggle-bar--middle {
    }
    &.menu-toggle-bar--bottom {
        transform: translate(0, 6px);
    }

    .nav-open & {
        &.menu-toggle-bar--top {
            transform: translate(0, 0) rotate(45deg);
        }
        &.menu-toggle-bar--middle {
            opacity: 0;
        }
        &.menu-toggle-bar--bottom {
            transform: translate(0, 0) rotate(-45deg);
        }
    }
}

.header.header-alt-white {
    .header_main {
        .header_logo {
            a {
                svg {
                    path.letter {
                        fill: var(--color-white) !important;
                    }
                }
            }
        }
        .header_nav {
            background-color: var(--color-white) !important;
        }
    }
    .header_nav {
        .header-main-menu {
            .menu-item {
                > a {
                    color: var(--color-black);
                }

                .custom-submenu {
                    background-color: var(--color-white);

                    li {
                        a {
                            color: var(--color-black);
                        }
                    }
                }
            }
        }
    }
}

.footer_nav {
    .footer-main-menu {
        > .menu-item {
            > a {
                font-family: var(--font-syne);
                color: var(--color-white);
                font-size: var(--text-md);
                font-weight: 600;
                line-height: normal;
                margin-bottom: 2rem;
                display: block;
            }

            .sub-menu {
                display: flex;
                flex-direction: column;
                justify-content: start;
                gap: 0.25rem;

                .menu-item {
                    a {
                        font-family: var(--font-dm-sans);
                        color: var(--color-white);
                        font-size: var(--text-sm);
                        font-weight: 300;
                        line-height: normal;
                    }
                }
            }
        }
    }
}

/* Flèche du sous-menu */
.menu_arrow {
    flex-shrink: 0;
    transform: rotate(180deg);
    transition: transform 0.3s ease;
}

.ordered-list ol {
    list-style: decimal;
    padding-left: 1.5rem;

    li {
        position: relative;
    }
    li:before {
        content: "";
        position: absolute;
        left: -1.5rem;
        top: 0.25rem;
        width: 1rem;
        height: 1rem;
        background-color: var(--color-orange);
        border-radius: 50%;
    }
}

#expandableSection {
    scrollbar-width: auto;
    scrollbar-color: #ed7226 #ffffff;
    
    @media screen and (max-width: 1024px) {
        scrollbar-color: #ffffff #ed7226;
    }
}
#expandableSection::-webkit-scrollbar {
    width: 16px;
}
#expandableSection::-webkit-scrollbar-track {
    background: #ffffff;
}
#expandableSection::-webkit-scrollbar-thumb {
    background-color: #ed7226;
    border-radius: 12px;
    border: 3px solid #ffffff;
}

/* Colors Gradients */
.bg-grey-to-white {
    background: #F4F2E9;
    background: linear-gradient(180deg,rgba(244, 242, 233, 1) 0%, rgba(255, 255, 255, 1) 100%);
}

.glassmorph-alt-white {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(3.5px);
    -webkit-backdrop-filter: blur(3.5px);
    border: 1px solid rgba(255, 255, 255, 0.19);
}

.glassmorph-bg-white {
    background: linear-gradient(151deg, rgba(173, 173, 173, 0.30) 17.37%, rgba(255, 255, 255, 0.00) 101.21%, rgba(129, 129, 129, 0.30) 101.21%);
    backdrop-filter: blur(3px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 1px 4px rgba(255, 255, 255, 0.1);
}
.glassmorph-bg-orange {
    background: linear-gradient(151deg, rgba(237, 114, 38, 0.70) 67.92%, rgba(255, 255, 255, 0.00) 101.21%, rgba(237, 114, 38, 0.70) 101.21%);
    backdrop-filter: blur(3px);
    border-bottom: 1px solid rgb(240, 128, 23, 0.3);
    border-right: 1px solid rgba(240, 128, 23, 0.3);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 1px 4px rgba(255, 255, 255, 0.1);
}

.black-triangle-up {
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-bottom: 50px solid #000;
}

.swiper-button-disabled {
    filter: grayscale(1);
    cursor: not-allowed;
}
.swiper-slide-active {
    background-color: var(--color-white-2);
    opacity: 1;
}

.swiper-pagination {
    .swiper-pagination-progressbar-fill {
        background-color: var(--color-orange-2);
    }
}

/* ================================================
   LOGO ANIMATION
   ================================================ */
.header_logo {
    svg {
        max-height: 60px;
        width: auto;
        overflow: visible;

        path {
            position: relative;
        }
    }

    /* Le chiffre 2 est toujours visible */
    .number-2 {
        opacity: 1;
        transform: translateX(0);
        transition: none;
        z-index: 3;
    }

    /* Lettres gauche (m, a, k) - cachées par défaut */
    .letter-m1 {
        opacity: 0;
        transform: translateX(15rem);
        transition: all 0.4s cubic-bezier(0.4, 1, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 2;
    }
    .letter-a {
        opacity: 0;
        transform: translateX(9rem);
        transition: all 0.4s cubic-bezier(0.4, 1, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 2;
    }
    .letter-k {
        opacity: 0;
        transform: translateX(4rem);
        transition: all 0.4s cubic-bezier(0.4, 1, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 2;
    }

    /* Lettres droite (c, o, m) - cachées par défaut */
    .letter-c {
        opacity: 0;
        transform: translateX(-4rem);
        transition: all 0.4s cubic-bezier(0.4, 1, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 2;
    }
    .letter-o {
        opacity: 0;
        transform: translateX(-9rem);
        transition: all 0.4s cubic-bezier(0.4, 1, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 2;
    }
    .letter-m2 {
        opacity: 0;
        transform: translateX(-14rem);
        transition: all 0.4s cubic-bezier(0.4, 1, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 2;
    }

    /* Animation en cascade au survol */
    a:hover {
        .letter-m1 {
            opacity: 1;
            transform: translateX(0);
            transition-delay: 0s;
        }
        .letter-m2 {
            opacity: 1;
            transform: translateX(0);
            transition-delay: 0s;
        }

        .letter-a {
            opacity: 1;
            transform: translateX(0);
            transition-delay: 0.1s;
        }
        .letter-o {
            opacity: 1;
            transform: translateX(0);
            transition-delay: 0.1s;
        }

        .letter-k {
            opacity: 1;
            transform: translateX(0);
            transition-delay: 0.2s;
        }
        .letter-c {
            opacity: 1;
            transform: translateX(0);
            transition-delay: 0.2s;
        }
    }
}

/* Version mobile - animation plus rapide */
@media (max-width: 768px) {
    .header_logo {
        svg {
            max-height: 50px;
        }

        .letter {
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        }

        a:hover {
            .letter-m1,
            .letter-a,
            .letter-k,
            .letter-c,
            .letter-o,
            .letter-m2 {
                transition-delay: 0s;
            }
        }
    }
}

/* ================================================
   Single Cas Client
   ================================================ */
@media screen and (min-width: 1024px) {
    html.has-scroll-smooth,
    html.has-scroll-smooth body {
        overflow: hidden;
    }

    .cas-client-single {
        overflow: hidden;
    }

    /* Empêcher le contenu après le wrapper de créer du scroll */
    .cas-client-single > *:not(#casClientWrapper):not(.pin-spacer) {
        display: none;
    }
}

/* ================================================
   Défi Mak2com Box - Ligne orange sur l'onglet
   ================================================ */
/* Ligne orange épaisse en haut de l'onglet */
.defi-mak2com-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--color-orange-2);
    border-top-left-radius: 2rem;
    border-top-right-radius: 2rem;
    z-index: 10;
}

/* Ligne orange horizontale qui s'étend vers la droite */
.defi-mak2com-tab::after {
    content: '';
    position: absolute;
    top: 0;
    left: 100%;
    width: 200px;
    height: 3px;
    background-color: var(--color-orange-2);
    z-index: 5;
}

@media screen and (min-width: 640px) {
    .defi-mak2com-tab::after {
        width: 300px;
    }
}

@media screen and (min-width: 1024px) {
    .defi-mak2com-tab::after {
        width: 400px;
    }
}



/* FAQ */
.faq-item.is-open {
    .faq-toggle {
        opacity: 1 !important;
    }
}

/* ================================================
   Footer Accordion Mobile
   ================================================ */
.footer-accordion-item {
    .footer-accordion-trigger {
        cursor: pointer;
        transition: all 0.3s ease;

        &:hover {
            .footer-accordion-arrow {
                transform: translateY(2px);
            }
        }

        &[aria-expanded="true"] {
            .footer-accordion-arrow {
                transform: rotate(180deg);
            }
        }
    }

    .footer-accordion-content {
        transition: max-height 0.3s ease;

        ul {
            list-style: none;
            padding: 0;
            margin: 0;
        }

        a {
            transition: color 0.2s ease;
        }
    }
}

/* Responsive Footer Adjustments */
@media screen and (max-width: 1024px) {
    .footer_nav--mobile {
        border-bottom: 1px solid var(--color-grey);
    }

    .footer-accordion-item {
        border-bottom: 1px solid rgba(90, 90, 90, 0.3);

        &:last-child {
            border-bottom: none;
        }
    }
}

/* Glass Buttns */
.glassContainer {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}