/* ============================================
   MENU PROPRE ET PROFESSIONNEL
   ============================================ */

/* Header principal */
.header {
    padding: 0;
    width: 100%;
    position: relative;
    border-bottom: 1px solid #E5E9EB;
    background: #fff;
}

.header .main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    padding: 0;
    min-height: 80px;
}

.header .main-header .header-left {
    display: flex;
    align-items: center;
    gap: 40px;
    flex: 1;
}

.header .main-header .header-left .header-logo {
    flex-shrink: 0;
    max-width: 200px;
}

.header .main-header .header-left .header-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.header .main-header .header-left .header-logo a img {
    max-height: 50px;
    height: auto;
    width: auto;
}

.header .main-header .header-left .nav-main-menu {
    flex: 1;
    display: flex;
    align-items: center;
}

.header .main-header .header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.header .main-header .header-right .header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Menu principal - Desktop - Style original pour grandes tablettes et ordinateurs */
@media (min-width: 1200px) {
    .header .main-menu {
        padding-top: 3px;
    }
    
    .header .main-menu li {
        float: left;
        position: relative;
        text-align: left;
        padding-right: 15px;
    }
    
    .header .main-menu li.has-children > a::after {
        content: "";
        background: url(../imgs/template/icons/angle-down.svg) no-repeat center;
        height: 8px;
        width: 12px;
        position: absolute;
        top: 50%;
        right: 0px;
        margin-top: -4px;
    }
    
    /* Afficher la flèche SVG pour les items avec sous-menu */
    .header .main-menu li.has-children .menu-link .menu-arrow {
        display: inline-block !important;
        margin-left: 6px;
        vertical-align: middle;
        flex-shrink: 0;
    }
    
    .header .main-menu li a {
        font-family: "Manrope", sans-serif;
        font-style: normal;
        font-weight: 500;
        font-size: 16px;
        color: #071920;
        line-height: 23px;
        display: block;
        padding: 28px 18px 28px 15px;
        text-decoration: none;
        position: relative;
        border-radius: 0;
        background: transparent;
    }
    
    .header .main-menu li a:hover {
        color: #024430;
        background: transparent;
    }
    
    .header .main-menu li a:hover i {
        opacity: 1;
        transition: 0.2s;
    }
    
    .header .main-menu li a i {
        font-size: 12px;
        margin-right: 8px;
        opacity: 0.38;
        transition: 0.2s;
    }
    
    .header .main-menu li div.sub-menu {
        opacity: 0;
        visibility: hidden;
        transition-duration: 0.2s;
        position: absolute;
        top: 100%;
        left: 0px;
        z-index: 999999;
        min-width: 220px;
        width: 400px;
        border-radius: 8px;
        padding: 25px 30px 10px 30px;
        background-color: #fff;
        border: 1px solid #CDE2E7;
        box-shadow: 0px 0px 20px 0px rgba(14, 41, 50, 0.17);
        border-bottom: 8px solid #AFEAE4;
        display: none;
    }
    
    .header .main-menu li ul {
        opacity: 0;
        visibility: hidden;
        transition-duration: 0.2s;
        position: absolute;
        top: 100%;
        left: 0px;
        z-index: 999999;
        min-width: 220px;
        border-radius: 8px;
        padding: 8px 0px 8px 0;
        background-color: #fff;
        border: 1px solid #CDE2E7;
        box-shadow: 0px 0px 20px 0px rgba(14, 41, 50, 0.17);
    }
    
    /* Forcer le style simple pour le sous-menu de fonctionnalités (même si mega-menu existe) */
    .header .main-menu li ul.sub-menu {
        display: block !important;
        width: auto !important;
        max-width: none !important;
        padding: 8px 0px !important;
        border-radius: 8px !important;
        border: 1px solid #CDE2E7 !important;
        border-bottom: 1px solid #CDE2E7 !important;
        box-shadow: 0px 0px 20px 0px rgba(14, 41, 50, 0.17) !important;
    }
    
    .header .main-menu li ul.sub-menu li {
        width: 100% !important;
        padding: 0 !important;
        display: block !important;
    }
    
    .header .main-menu li ul.sub-menu li a {
        font-size: 14px !important;
        color: #071920 !important;
        padding: 6px 22px !important;
        display: block !important;
        text-decoration: none !important;
        transition: all 0.2s ease !important;
    }
    
    .header .main-menu li ul.sub-menu li a:hover {
        padding-left: 25px !important;
        color: #024430 !important;
    }
    
    .header .main-menu li ul li {
        width: 100%;
    }
    
    .header .main-menu li ul li a {
        font-size: 14px;
        color: #071920;
        position: relative;
        padding: 6px 22px 6px 22px;
        transition: 0.2s;
    }
    
    .header .main-menu li ul li a:hover {
        color: #024430;
        padding-left: 25px;
        transition: 0.2s;
    }
    
    .header .main-menu li:hover > ul, 
    .header .main-menu li:hover > .sub-menu {
        opacity: 1;
        visibility: visible;
        display: block;
    }
    
    /* Masquer les nouveaux styles pour desktop */
    .header .main-menu li .menu-link {
        display: flex;
        align-items: center;
        padding: 28px 18px 28px 15px;
        border-radius: 0;
        background: transparent;
    }
    
    .header .main-menu li .menu-link span {
        flex: 1;
    }
    
    .header .main-menu li .menu-link .menu-arrow {
        display: inline-block !important;
        margin-left: 6px;
        vertical-align: middle;
        flex-shrink: 0;
    }
}

/* Mega menu - Desktop uniquement */
@media (min-width: 1200px) {
    .header .main-menu li .mega-menu {
        position: absolute;
        top: calc(100% + 8px);
        left: 50%;
        transform: translateX(-50%) translateY(-8px);
        width: 750px;
        max-width: 90vw;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12);
        border: 1px solid rgba(205, 226, 231, 0.8);
        padding: 20px;
        opacity: 0;
        visibility: hidden;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 9999;
    }
    
    .header .main-menu li .mega-menu .mega-menu-content {
        width: 100%;
    }
    
    .header .main-menu li .mega-menu .mega-menu-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .header .main-menu li .mega-menu .mega-menu-item {
        display: flex;
        align-items: flex-start;
        gap: 14px;
        padding: 14px;
        border-radius: 10px;
        text-decoration: none;
        transition: all 0.2s ease;
        border: 1px solid transparent;
    }
    
    .header .main-menu li .mega-menu .mega-menu-item:hover {
        background: rgba(2, 68, 48, 0.06);
        border-color: rgba(2, 68, 48, 0.15);
        transform: translateY(-1px);
    }
    
    .header .main-menu li .mega-menu .mega-menu-icon {
        flex-shrink: 0;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(2, 68, 48, 0.08);
        border-radius: 8px;
        color: #024430;
        font-size: 16px;
    }
    
    .header .main-menu li .mega-menu .mega-menu-text h4 {
        margin: 0 0 3px 0;
        font-size: 14px;
        font-weight: 600;
        color: #071920;
        line-height: 1.4;
    }
    
    .header .main-menu li .mega-menu .mega-menu-text p {
        margin: 0;
        font-size: 12px;
        color: #4E6770;
        line-height: 1.5;
    }
    
    .header .main-menu li:hover .mega-menu {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }
}

/* Bouton mobile - À côté du sélecteur de langue */
.header .mobile-menu-toggle-btn {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: 1px solid #E5E9EB;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
}

.header .mobile-menu-toggle-btn:hover {
    border-color: #024430;
    background: rgba(2, 68, 48, 0.05);
}

.header .mobile-menu-toggle-btn .burger-line {
    width: 20px;
    height: 2px;
    background: #071920;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.header .mobile-menu-toggle-btn:hover .burger-line {
    background: #024430;
}

/* Sélecteur de langue */
.header .language-selector-wrapper {
    position: relative;
}

.header .language-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid #E5E9EB;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.header .language-selector:hover {
    border-color: #024430;
    background: rgba(2, 68, 48, 0.05);
}

.header .language-selector .language-flag {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.header .language-selector .language-code {
    font-size: 14px;
    font-weight: 500;
    color: #071920;
}

.header .language-selector .icon-chevron {
    width: 14px;
    height: 14px;
    color: #4E6770;
    transition: transform 0.2s ease;
}

.header .language-selector[aria-expanded="true"] .icon-chevron {
    transform: rotate(180deg);
}

.header .language-dropdown {
    min-width: 180px;
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid #E5E9EB;
    margin-top: 8px;
}

.header .language-dropdown .language-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #071920;
    transition: all 0.2s ease;
}

.header .language-dropdown .language-item:hover {
    background: rgba(2, 68, 48, 0.05);
}

.header .language-dropdown .language-item.active {
    background: rgba(0, 74, 173, 0.1);
    color: var(--color-brand-1, #024430);
}

/* Bouton CTA */
.header .btn-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 24px;
    background: var(--color-brand-1, #024430);
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.4;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.header .btn-cta svg {
    transition: transform 0.2s ease;
}

.header .btn-cta:hover {
    background: var(--color-brand-1-hover, #032a5e);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.header .btn-cta:hover svg {
    transform: translateX(2px);
}

/* ============================================
   MENU MOBILE - Styles déplacés vers mobile-menu-premium.css
   Les styles ci-dessous sont conservés pour compatibilité mais seront surchargés
   ============================================ */

.mobile-header-wrapper-style {
    position: fixed;
    top: 0;
    max-width: 380px;
    width: 85%;
    min-height: 100vh;
    bottom: 0;
    right: 0;
    visibility: hidden;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #ffffff;
    box-shadow: -4px 0 32px rgba(0, 0, 0, 0.15);
    z-index: 1003;
    overflow: hidden;
}

.mobile-header-wrapper-style::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #024430 0%, #AFEAE4 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease 0.1s;
}

.mobile-header-wrapper-style.sidebar-visible {
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
}

.mobile-header-wrapper-style.sidebar-visible::before {
    transform: scaleX(1);
}

.mobile-header-wrapper-style .mobile-header-wrapper-inner {
    padding: 0;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.mobile-header-wrapper-style .mobile-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: #ffffff;
    border-bottom: 1px solid #E5E9EB;
    position: sticky;
    top: 0;
    z-index: 10;
}

.mobile-header-wrapper-style .mobile-header-logo-section {
    display: flex;
    align-items: center;
    flex: 1;
}

.mobile-header-wrapper-style .mobile-logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.mobile-header-wrapper-style .mobile-logo-link:hover {
    opacity: 0.8;
}

.mobile-header-wrapper-style .mobile-logo-img {
    max-height: 40px;
    height: auto;
    width: auto;
}

.mobile-header-wrapper-style .mobile-logo-text {
    font-size: 18px;
    font-weight: 700;
    color: #024430;
    font-family: "Manrope", sans-serif;
    letter-spacing: -0.01em;
}

.mobile-header-wrapper-style .mobile-menu-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #4E6770;
    transition: all 0.2s ease;
}

.mobile-header-wrapper-style .mobile-menu-close svg {
    width: 20px;
    height: 20px;
}

.mobile-header-wrapper-style .mobile-menu-close:hover {
    background: rgba(7, 25, 32, 0.05);
    color: #024430;
}

.mobile-header-wrapper-style .mobile-menu-close:active {
    transform: scale(0.95);
}

.mobile-header-wrapper-style .mobile-menu-wrap {
    flex: 1;
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
    background: #ffffff;
}

.mobile-header-wrapper-style .mobile-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-header-wrapper-style .mobile-menu li {
    display: block;
    position: relative;
    border-bottom: 1px solid #F0F2F3;
}

.mobile-header-wrapper-style .mobile-menu li:last-child {
    border-bottom: none;
}

.mobile-header-wrapper-style .mobile-menu li.has-children .menu-expand {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.25s ease;
    color: #4E6770;
    background: transparent;
}

.mobile-header-wrapper-style .mobile-menu li.has-children .menu-expand svg {
    transition: transform 0.3s ease;
    width: 14px;
    height: 14px;
}

.mobile-header-wrapper-style .mobile-menu li.has-children .menu-expand:hover {
    background: rgba(2, 68, 48, 0.08);
    color: #024430;
}

.mobile-header-wrapper-style .mobile-menu li.has-children.active .menu-expand {
    background: rgba(2, 68, 48, 0.1);
    color: #024430;
}

.mobile-header-wrapper-style .mobile-menu li.has-children.active .menu-expand svg {
    transform: rotate(180deg);
}

.mobile-header-wrapper-style .mobile-menu li > a {
    display: block;
    padding: 16px 24px;
    padding-right: 60px;
    font-size: 16px;
    line-height: 1.5;
    font-family: "Manrope", sans-serif;
    font-weight: 500;
    color: #071920;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mobile-header-wrapper-style .mobile-menu li > a span {
    display: block;
}

.mobile-header-wrapper-style .mobile-menu li > a:hover {
    color: #024430;
    background: rgba(2, 68, 48, 0.05);
}

.mobile-header-wrapper-style .mobile-menu li > a.active {
    color: #024430;
    background: rgba(2, 68, 48, 0.08);
    font-weight: 600;
}

.mobile-header-wrapper-style .mobile-menu li .sub-menu {
    max-height: 0;
    overflow: hidden;
    padding: 0;
    margin: 0;
    list-style: none;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
    background: rgba(245, 247, 248, 0.3);
}

.mobile-header-wrapper-style .mobile-menu li .sub-menu li {
    border-bottom: 1px solid rgba(229, 233, 235, 0.3);
}

.mobile-header-wrapper-style .mobile-menu li .sub-menu li:last-child {
    border-bottom: none;
}

.mobile-header-wrapper-style .mobile-menu li .sub-menu li a {
    display: block;
    padding: 12px 24px 12px 40px;
    font-size: 15px;
    font-weight: 400;
    color: #4E6770;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

.mobile-header-wrapper-style .mobile-menu li .sub-menu li a span {
    display: block;
}

.mobile-header-wrapper-style .mobile-menu li .sub-menu li a::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #CDE2E7;
    transition: all 0.2s ease;
}

.mobile-header-wrapper-style .mobile-menu li .sub-menu li a:hover {
    color: #024430;
    background: rgba(2, 68, 48, 0.05);
    padding-left: 44px;
}

.mobile-header-wrapper-style .mobile-menu li .sub-menu li a:hover::before {
    background: #024430;
}

.mobile-header-wrapper-style .mobile-menu li.has-children.active .sub-menu {
    max-height: 1000px;
    padding: 4px 0 8px 0;
    background: rgba(245, 247, 248, 0.3);
}

.mobile-header-wrapper-style .mobile-language-section {
    padding: 20px 24px;
    border-top: 1px solid #E5E9EB;
    margin-top: auto;
    background: #ffffff;
}

.mobile-header-wrapper-style .mobile-language-flags {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

.mobile-header-wrapper-style .mobile-language-flag-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    text-decoration: none;
    background: #fff;
}

.mobile-header-wrapper-style .mobile-language-flag-item img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.mobile-header-wrapper-style .mobile-language-flag-item:hover {
    border-color: #024430;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(2, 68, 48, 0.2);
}

.mobile-header-wrapper-style .mobile-language-flag-item.active {
    border-color: #024430;
    background: rgba(2, 68, 48, 0.1);
    box-shadow: 0 2px 8px rgba(2, 68, 48, 0.15);
}

/* Responsive */
@media (max-width: 1399px) {
    .header .main-menu {
        gap: 2px;
    }
    
    .header .main-menu li .menu-link {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .header .mega-menu {
        width: 700px;
        max-width: 90vw;
    }
}

@media (max-width: 1199px) {
    .header .main-header .header-left {
        gap: 20px;
    }
    
    .header .main-header .header-left .header-logo {
        max-width: 160px;
    }
    
    .header .main-menu {
        gap: 2px;
    }
    
    .header .main-menu li .menu-link {
        padding: 8px 10px;
        font-size: 14px;
    }
    
    .header .mega-menu {
        width: 600px;
    }
    
    .header .mega-menu .mega-menu-grid {
        grid-template-columns: 1fr;
    }
    
    .header .btn-cta {
        padding: 10px 20px;
        font-size: 14px;
    }
}

@media (max-width: 991px) {
    .header .main-header .header-left .nav-main-menu {
        display: none !important;
    }
    
    .header .main-header .header-right .btn-cta {
        display: none;
    }
}

@media (max-width: 575px) {
    .header .main-header {
        min-height: 70px;
    }
    
    .header .main-header .header-left .header-logo {
        max-width: 140px;
    }
    
    .header .main-header .header-right {
        gap: 12px;
    }
    
    .header .language-selector {
        padding: 6px 10px;
    }
    
    .header .language-selector .language-code {
        display: none;
    }
}

