
.menu-opened .main-header{
    position: absolute;
    right: 0;
    top: 20px;
}

#masthead{
    height: 100vh;
    background: gray /*wip*/;
    position: relative;
    @media (max-width: 992px){
        height: 50vh;
    }
}

.btn-primary.current-menu-item a{
    color: white!important;
}

#masthead::before{
    content: '';
    position: absolute;
    top: 2px;
    left: 0;
    width: 500px;
    background-image: url('../images/crochet.svg');
    height: 100%;
    background-repeat: no-repeat;
    background-size: cover;
    z-index: 2;
    @media (max-height: 1100px){
        background-size: contain;
    }
}
header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}
body:not(.home) header {
    position: relative;
}
@media (max-width: 992px){
    #masthead::before{
        display: none;
    }
}

header .menu-item a{
    color: white;
    text-decoration: none;
    position: relative;

}
.nous-suivre{
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    &::after{
        content: '';
        position: relative;
        display: inline-block;
        height: 20px;
        width: 20px;
        margin-left: 10px;
        background-image: url(../images/icons/linkedin.svg);
        background-size: contain;
        background-position: center;
    }
}
header .menu-item:not(.top-menu):not(.wpml-ls-item)::before{
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 12px;
    height: 12px;
    background-image: url(../images/crochet-left.svg);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0;
    transition: all 0.3s ease;
}
.sub-menu .menu-item::before,
.sub-menu .menu-item::after{
    display: none;
}
header .menu-item:not(.top-menu):not(.wpml-ls-item)::after{
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%) scaleX(-1) scale(0);
    width: 12px;
    height: 12px;
    background-image: url(../images/crochet-left.svg);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0;
    transition: all 0.3s ease;
}
.wpml-ls-flag{
    border-radius: 99rem;
}
.wpml-ls-item{
    padding: initial!important; 
    margin-left: 30px;
    a{
        aspect-ratio: 1 / 1;
        height: 40px;
        @media (max-width: 1200px){
            height: 30px;
        }
    }
    img{
        border-radius: 99rem;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}
ul.top-menu{
    display: flex;
    align-items: center;
    justify-content: center;
}
li.top-menu{
    display: flex;
    align-items: center;
    justify-content: center;
    &.btn{
        max-height: 50px;
    }
}
header .menu-item:not(.top-menu):hover::before{
    transform: translateY(-50%) scale(1);
    opacity: 1;
}
header .menu-item:not(.top-menu):hover::after{
    transform: translateY(-50%) scaleX(-1) scale(1);
    opacity: 1;
}

header .menu-item{
    list-style-type: none;
    padding-bottom: 20px;
    padding: 10px 20px;
    position: relative;
}

/* S'assurer que les éléments de menu avec sous-menus ont un positionnement relatif */
header .menu-item.menu-item-has-children{
    position: relative;
}


header{
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;

}

@media (max-width: 1500px){
    header .logo{
        width: 150px;
        display: block;
    }
    header .logo img{
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
}

@media (max-width: 767px){
    header .logo{
        width: 90px;
    }
}
header video{
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150%!important;
    top: 50%;
    transform: translateY(-50%);
    object-fit: cover;
}

/* header::after{
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
} */

header > .container-fluid{
    padding-top: 8vh;
    position: relative;
    z-index: 2;
}

body:not(.menu-opened) header > .container-fluid{
        height: 100%;   
}
body.menu-opened {
    header > .container-fluid::after{
        display: none;
    }
    .logo{
        display: none;
    }
}

header >.container-fluid::after{
    content: '';
    position: absolute;
    bottom: 50px;
    right: 0;
    width: 150px;
    height: 150px;
    background-repeat: no-repeat;
    background-image: url('../images/logo-white.svg');
    background-size: contain;
}

@media (max-width: 1750px){
    header >.container-fluid::after{
        right: 100px;
    }
}

@media (max-width: 992px){
    header >.container-fluid::after{
        right: 50px;
        width: 90px;
        height: 90px;
        bottom: 100px;
        @media (max-width: 767px){
            right: 50px;
            width: 50px;
            height: 50px;
            bottom: 50px;
        }
    }
}

header .top-menu-container{
    margin-left: auto;
}

header .main-header{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

@media (min-width: 993px){
    header .main-header{
        margin-top: 100px;
    }
}

@media (min-width: 993px) and (max-width: 1900px){
    header .main-header{
        padding-left: 150px;
    }
}
@media (max-width: 1200px){
    header .right{
        background: transparent!important;
        padding: initial!important;
    }
    header .main-header{
        padding-right:  50px;
    }
    .wpml-ls-item{
        margin-top: 20px!important;
        height: 30px!important;
    }
}
@media (max-width: 992px){
    header .main-header{
        padding-left: 50px;
    }
}
@media (max-width: 500px){
    header .main-header{
        padding-left: 30px;
        padding-right: 30px;
    }
}
header .right{
    background: white;
    border-radius: var(--rounded);
    border-top-left-radius: 0;
    border-bottom-right-radius: 0;
    padding: 10px 20px;
}
header .right .menu-item{
    display: flex;
    align-items: center;
    justify-content: center;
}
header .right a{
    color: black;
    font-weight: 600;
    transition: color 0.3s ease;
    &:hover{
        color: var(--primary)!important;
        transition: color 0.3s ease;
    }

}
header .sub-menu{
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: white;
    border-radius: 0 0 20px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 10px 0;
}

header .sub-menu .menu-item{
    padding: 8px 20px;
    margin: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

header .sub-menu .menu-item:last-child{
    border-bottom: none;
}

header .sub-menu .menu-item a{
    color: #333;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: block;
    transition: color 0.2s ease;
}

header .sub-menu .menu-item a:hover{
    color: var(--primary-color);
}

/* Afficher les sous-menus au survol */
header .menu-item:hover .sub-menu,
header .sub-menu.dropdown-visible{
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
@media (min-width: 1201px){
    .mobile-menu{
        display: none!important;
    }
}
/* Menu burger responsive */
@media (max-width: 1200px){
    /* Masquer les menus dans .right mais garder le conteneur */
    header .right .main-menu-container{
        display: none;
    }

    header .top-menu-container{
        display: none;
    }
    
    /* Afficher le menu burger */
    .menu-burger{
        display: flex !important;
        top: 20px;
        right: 20px;
        z-index: 10;
    }
    
    /* Menu mobile */
    .mobile-menu{
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.95);
        z-index: 1000;
        padding-top: 50px!important;
        /* display: flex;
        align-items: center;
        justify-content: center; */
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 1;
        overflow-y: auto;
        overflow-x: hidden;
    }


    .mobile-menu.opened{
        opacity: 1;
        visibility: visible;
    }
    
    /* Top menu mobile */
    .mobile-top-menu{
        margin-bottom: 30px;
    }
    
    .mobile-top-menu .top-menu{
        flex-direction: column !important;
        text-align: center;
        .nous-suivre{
            flex-direction: row!important;
        }
    }
    
    .mobile-top-menu .menu-item{
        margin: 10px 0;
        padding: 10px 20px;
        margin-top: 0;
        margin-bottom: 0!important;
    }
    
    .mobile-top-menu .menu-item a{
        font-size: 1.2rem;
        font-weight: 500;
        color: rgba(255, 255, 255, 0.8);
        text-decoration: none;
    }
    
    /* Main menu mobile */
    .mobile-main-menu .main-menu-class{
        flex-direction: column !important;
        text-align: center;
    }
    
    .mobile-main-menu .menu-item{
        margin: 20px 0;
        padding: 5px 30px;
    }
    
    .mobile-main-menu .menu-item a{
        font-size: 1.5rem;
        font-weight: 600;
        color: white;
    }
    
    /* Gestion des sous-menus en mobile */
    .mobile-main-menu .sub-menu{
        position: static;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        background: rgba(255, 255, 255, 0.05);
        box-shadow: none;
        border-radius: 8px;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: all 0.3s ease;
    }
    
    /* Sous-menus ouverts en mobile */
    .mobile-main-menu .menu-item.menu-item-has-children .sub-menu.dropdown-visible{
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        max-height: 60vh;
        padding: 10px 0;
        margin-top: 10px;
        overflow-y: auto;
        overflow-x: hidden;
    }
    
    .mobile-main-menu .sub-menu .menu-item{
        padding: 8px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .mobile-main-menu .sub-menu .menu-item:last-child{
        border-bottom: none;
    }
    
    .mobile-main-menu .sub-menu .menu-item a{
        color: rgba(255, 255, 255, 0.8);
        padding: 5px 0;
        text-decoration: none;
        font-weight: 100;
        display: block;
        cursor: pointer;
        transition: color 0.2s ease;
    }
    
    .mobile-main-menu .sub-menu .menu-item a:hover{
        color: white;
    }
    
    /* Style pour les sous-menus avec scroll */
    .mobile-main-menu .sub-menu.dropdown-visible::-webkit-scrollbar {
        width: 4px;
    }
    
    .mobile-main-menu .sub-menu.dropdown-visible::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 2px;
    }
    
    .mobile-main-menu .sub-menu.dropdown-visible::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.3);
        border-radius: 2px;
    }
    
    .mobile-main-menu .sub-menu.dropdown-visible::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.5);
    }
    
    
    
    .mobile-menu .spacer{
        height: 30px;
    }
}

@media (max-width: 767px){
    .mobile-menu .spacer {
        height: 0!important;
    }
    .mobile-main-menu .menu-item{
        margin: 0;
        a{
            text-decoration: none;
            font-size: 14px;
        }
    }
    .mobile-top-menu .menu-item{
        a{
            font-size: 14px;
        }
    }

}

/* Masquer le menu burger par défaut et au-dessus de 1200px */
.menu-burger{
    display: none;
}

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

/* Styles pour le body quand le menu mobile est ouvert */
body.menu-opened{
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Styles pour l'icône toggle des sous-menus en mobile uniquement */
@media (max-width: 992px){
    /* Supprimer les pseudo-éléments CSS */
    .menu-item.menu-item-has-children > a::after{
        display: none;
    }
    
    /* Styles pour l'icône JavaScript dans .mobile-main-menu uniquement */
    .mobile-main-menu .mobile-toggle-icon {
        font-size: 18px;
        font-weight: bold;
        margin-left: 8px;
        display: inline-block;
        transition: transform 0.3s ease;
        cursor: pointer;
        color: white;
        user-select: none;
        padding: 8px;
        border-radius: 3px;
        background-color: rgba(255, 255, 255, 0.1);
        min-width: 24px;
        text-align: center;
        line-height: 1;
    }
    
    .mobile-main-menu .mobile-toggle-icon:hover {
        background-color: rgba(255, 255, 255, 0.1);
        transform: scale(1.1);
    }
    
    /* S'assurer que le lien parent a de l'espace pour l'icône */
    .mobile-main-menu .menu-item.menu-item-has-children > a {
        padding-right: 10px;
    }
}



.current_page_item a {
    color: var(--primary)!important;
}
