/* ============================================
   VARIABLES & RESET
   ============================================ */
:root {
    --color-primary: #2E7D32;
    --color-primary-dark: #1B5E20;
    --color-primary-light: #4CAF50;
    --color-secondary: #FFC107;
    --color-text: #333;
    --color-text-light: #666;
    --color-text-dark: #333;
    --color-text-white: #fff;
    --color-border: #e0e0e0;
    --color-bg-light: #f8f9fa;
    --color-white: #ffffff;
    --font-primary: 'Inter', 'Segoe UI', sans-serif;
    --transition: cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 5px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 15px 35px rgba(0, 0, 0, 0.16);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-white);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s var(--transition);
}

/* ============================================
   LAYOUT & CONTAINERS
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-light {
    background: var(--color-bg-light);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 15px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--color-secondary);
    margin: 20px auto 0;
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--color-text-light);
    margin-bottom: 50px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

/* ============================================
   TOP BAR
   ============================================ */
.top-bar {
    background: var(--color-primary-light);
    border-bottom: 1px solid var(--color-border);
    padding: 8px 0;
    font-size: 0.82rem;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.top-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.top-links a {
    color: var(--color-text-white);
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
}

.top-links a:hover {
    color: var(--color-text-light);
}

.top-links i {
    margin-right: 5px;
}

.language-selector {
    display: flex;
    gap: 6px;
}

.language-selector a {
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.78rem;
    color: var(--color-text-white);
}

.language-selector a.active {
    background: var(--color-primary);
    color: white;
}

.language-selector a:not(.active):hover {
    background: var(--color-bg-light);
    color: var(--color-primary);
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.main-header {
    background: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 10000;
    /* Au-dessus du contenu mais sous le menu mobile */
    transition: all 0.3s var(--transition);
}

.main-header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ============================================
   LOGO
   ============================================ */
.logo {
    flex-shrink: 0;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s var(--transition);
}

.logo a:hover .logo-icon {
    transform: scale(1.05);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.2;
}

.logo-subtitle {
    font-size: 0.7rem;
    color: var(--color-text-light);
    font-weight: 500;
}

/* ============================================
   NAVIGATION DESKTOP
   ============================================ */
.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2px;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 14px;
    color: var(--color-text);
    font-weight: 500;
    font-size: 0.90rem;
    border-radius: 8px;
    position: relative;
    white-space: nowrap;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background: var(--color-primary);
    transition: transform 0.3s var(--transition);
}

.nav-link:hover,
.nav-link.active {
    background: rgba(46, 125, 50, 0.08);
    color: var(--color-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

.nav-link.has-dropdown i.fa-chevron-down {
    font-size: 0.65rem;
    transition: transform 0.3s var(--transition);
}

.nav-item:hover .nav-link.has-dropdown i.fa-chevron-down {
    transform: rotate(180deg);
}

/* ============================================
   MOBILE NAV HEADER - CACHÉ EN DESKTOP
   ============================================ */
.mobile-nav-header {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 18px;
    background: var(--color-primary);
    color: white;
    justify-content: space-between;
    align-items: center;
    z-index: 10000;
    /* Au-dessus du contenu du menu */
}

.mobile-nav-close {
    width: 38px;
    height: 38px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.15rem;
    transition: all 0.3s var(--transition);
}

.mobile-nav-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ============================================
   DROPDOWNS
   ============================================ */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 240px;
    background: var(--color-white);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s var(--transition);
    padding: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 100;
}

.nav-item:hover>.dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    color: var(--color-text);
    border-radius: 8px;
    font-size: 0.88rem;
    transition: all 0.3s var(--transition);
}

.dropdown-item i {
    width: 18px;
    color: var(--color-primary-light);
    font-size: 0.85rem;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.1) 0%, rgba(76, 175, 80, 0.05) 100%);
    color: var(--color-primary);
    transform: translateX(5px);
}

.dropdown-divider {
    height: 1px;
    background: var(--color-border);
    margin: 6px 0;
}

/* Sous-menus imbriqués */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu>.dropdown-item.has-submenu {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-submenu>.dropdown-menu {
    position: absolute;
    top: 0;
    left: 100%;
    margin-left: 8px;
}

/* ============================================
   MEGA MENU
   ============================================ */
.mega-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    min-width: 650px;
    background: var(--color-white);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 100;
}

.nav-item:hover>.mega-menu {
    opacity: 1;
    visibility: visible;
    /* transform: translateX(-50%) translateY(0); */
}

.mega-container {
    padding: 20px;
}

.mega-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.mega-column {
    padding: 14px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f8fef8 0%, #f0f9f0 100%);
    border-left: 3px solid var(--color-primary);
}

.mega-title {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--color-primary);
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.mega-title i {
    font-size: 1rem;
}

.mega-links {
    list-style: none;
}

.mega-links li {
    margin-bottom: 6px;
}

.mega-links a {
    display: block;
    padding: 9px 11px;
    color: var(--color-text);
    font-size: 0.85rem;
    border-radius: 7px;
    transition: all 0.3s var(--transition);
    background: white;
}

.mega-links a:hover {
    background: var(--color-primary);
    color: white;
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

/* ============================================
   HEADER ACTIONS
   ============================================ */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.search-btn,
.mobile-toggle {
    width: 42px;
    height: 42px;
    border: none;
    background: transparent;
    color: var(--color-text);
    cursor: pointer;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    transition: all 0.3s var(--transition);
}

.search-btn:hover {
    background: var(--color-bg-light);
    color: var(--color-primary);
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
}

.mobile-toggle span {
    width: 22px;
    height: 2.5px;
    background: var(--color-primary);
    border-radius: 2px;
    transition: all 0.3s var(--transition);
}

.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ============================================
   SEARCH OVERLAY
   ============================================ */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 20000;
    /* Au-dessus de tout pour la recherche */
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s var(--transition);
}

.search-overlay.active {
    display: flex;
    opacity: 1;
}

.search-container {
    width: 90%;
    max-width: 700px;
    position: relative;
}

.search-form {
    position: relative;
}

.search-form input {
    width: 100%;
    padding: 22px 55px 22px 22px;
    font-size: 1.4rem;
    border: 3px solid var(--color-primary);
    border-radius: 14px;
    background: white;
    color: var(--color-text);
    outline: none;
    transition: all 0.3s var(--transition);
}

.search-form input:focus {
    border-color: var(--color-primary-light);
    box-shadow: 0 0 0 6px rgba(76, 175, 80, 0.1);
}

.search-submit {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border: none;
    background: var(--color-primary);
    color: white;
    border-radius: 11px;
    cursor: pointer;
    font-size: 1.15rem;
    transition: all 0.3s var(--transition);
}

.search-submit:hover {
    background: var(--color-primary-dark);
    transform: translateY(-50%) scale(1.05);
}

.search-close {
    position: absolute;
    top: -55px;
    right: 0;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    transition: all 0.3s var(--transition);
}

.search-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

/* ============================================
   AUTOCOMPLETE DROPDOWN
   ============================================ */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    margin-top: 10px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
}

.autocomplete-dropdown.active {
    display: block;
}

.autocomplete-item {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
    transition: all 0.3s var(--transition);
    cursor: pointer;
}

.autocomplete-item:hover {
    background: var(--color-bg-light);
    color: var(--color-primary);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-light);
    border-radius: 50%;
    margin-right: 14px;
    color: var(--color-primary);
    font-size: 1rem;
}

.autocomplete-content {
    flex: 1;
}

.autocomplete-title {
    font-weight: 500;
    margin-bottom: 3px;
}

.autocomplete-type {
    font-size: 0.8rem;
    color: var(--color-text-light);
    text-transform: uppercase;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s var(--transition);
    border: none;
    cursor: pointer;
    font-size: 16px;
    text-align: center;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46, 125, 50, 0.3);
}

.btn-sm {
    padding: 8px 20px;
    font-size: 14px;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: #2c3e50;
    color: white;
    padding: 60px 0 20px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h3 {
    color: var(--color-primary-light);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-column p {
    margin-bottom: 20px;
    line-height: 1.7;
    opacity: 0.9;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-links a:hover {
    color: var(--color-primary-light);
    padding-left: 5px;
}

.footer-links i {
    margin-right: 8px;
    color: var(--color-primary-light);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.social-links a:hover {
    background: var(--color-primary-light);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s var(--transition);
    z-index: 999;
}

.back-to-top:hover {
    background: var(--color-primary-dark);
    transform: translateY(-5px);
}

/* ============================================
   RESPONSIVE - BREAKPOINT 1200PX
   ============================================ */
@media (max-width: 1200px) {
    .mobile-toggle {
        display: flex;
    }

    .logo-text {
        display: none;
    }

    /* AFFICHER LE HEADER MOBILE */
    .mobile-nav-header {
        display: flex !important;
    }

    /* FIX CRITIQUE 1: Menu par-dessus l'overlay - z-index élevé */
    .main-nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 300px;
        max-width: 85vw;
        height: 100vh;
        background: white;
        box-shadow: var(--shadow-lg);
        transition: left 0.4s var(--transition);
        z-index: 9999 !important;
        /* MUST BE ABOVE OVERLAY */
        overflow-y: auto;
        overflow-x: hidden;
        /* Empêche le débordement horizontal */
        padding: 75px 0 30px;
        -webkit-overflow-scrolling: touch;
        /* Smooth scroll sur iOS */
    }

    /* Forcer tous les enfants à respecter la largeur du menu */
    .main-nav * {
        max-width: 100%;
        box-sizing: border-box;
    }

    .main-nav.active {
        left: 0;
    }

    /* FIX CRITIQUE 2: Overlay en dessous du menu - z-index inférieur */
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(4px);
        z-index: 9998 !important;
        /* MUST BE BELOW MENU */
        display: none;
        opacity: 0;
        transition: opacity 0.3s var(--transition);
        pointer-events: auto;
        /* Permet les clics pour fermer */
    }

    .nav-overlay.active {
        display: block;
        opacity: 1;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid var(--color-border);
    }

    .nav-link {
        width: 100%;
        padding: 15px 18px;
        border-radius: 0;
        justify-content: space-between;
        font-size: 0.95rem;
    }

    .nav-link::after {
        display: none;
    }

    /* FIX CRITIQUE 3: Amélioration des dropdowns mobiles */
    .dropdown-menu,
    .mega-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: var(--color-bg-light);
        min-width: 100%;
        width: 100%;
        /* Force la largeur à 100% du parent */
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease-in-out, padding 0.3s ease;
        padding: 0;
        display: block !important;
        /* Force l'affichage */
        box-sizing: border-box;
        /* Inclut padding dans la largeur */
    }

    /* FIX CRITIQUE 4: Affichage des sous-menus - utiliser max-height élevé */
    .nav-item.active>.dropdown-menu,
    .nav-item.active>.mega-menu {
        max-height: 3000px;
        /* Très élevé pour contenir tout contenu */
        padding: 15px 0;
        /* Padding vertical pour aérer */
        border-top: 2px solid var(--color-primary);
        overflow: hidden;
        /* Empêche débordement horizontal */
    }

    .mega-container {
        padding: 0;
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
        /* Empêche débordement */
    }

    .mega-grid {
        grid-template-columns: 1fr;
        gap: 0;
        /* Pas d'espace entre les colonnes en mobile */
        width: 100%;
        box-sizing: border-box;
    }

    .mega-column {
        margin: 0 8px 12px 8px;
        /* Marges réduites pour éviter débordement */
        padding: 10px;
        /* Padding réduit */
        background: rgba(46, 125, 50, 0.08);
        border-left: 3px solid var(--color-primary);
        border-radius: 8px;
        box-sizing: border-box;
        max-width: calc(100% - 16px);
        /* Largeur max = 100% - marges */
        overflow: hidden;
        /* Empêche débordement du contenu */
    }

    .mega-title {
        font-size: 0.85rem;
        margin-bottom: 10px;
        padding-bottom: 8px;
        border-bottom: 1px solid var(--color-border);
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .mega-links {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .mega-links li {
        margin-bottom: 4px;
    }

    .mega-links a {
        display: block;
        padding: 9px 10px;
        /* Padding réduit */
        color: var(--color-text);
        font-size: 0.86rem;
        /* Police légèrement réduite */
        border-radius: 6px;
        transition: all 0.3s var(--transition);
        background: white;
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: normal;
        /* Permet le retour à la ligne */
        box-sizing: border-box;
        width: 100%;
        overflow: hidden;
    }

    .mega-links a:hover,
    .mega-links a:active {
        background: var(--color-primary);
        color: white;
        transform: translateX(4px);
    }

    /* CTA column spécifique */
    .mega-column-cta {
        background: linear-gradient(135deg, rgba(46, 125, 50, 0.15) 0%, rgba(76, 175, 80, 0.1) 100%);
        border-left-color: var(--color-secondary);
        text-align: center;
    }

    .mega-column-cta .btn {
        width: 100%;
        margin-top: 10px;
    }

    .dropdown-item {
        margin: 0 8px 6px 8px;
        /* Marges réduites */
        font-size: 0.9rem;
        padding: 12px 14px;
        border-radius: 8px;
        background: white;
        box-sizing: border-box;
        max-width: calc(100% - 16px);
        /* Largeur max = 100% - marges */
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .dropdown-item:hover,
    .dropdown-item:active {
        background: linear-gradient(135deg, rgba(46, 125, 50, 0.12) 0%, rgba(76, 175, 80, 0.08) 100%);
        transform: translateX(5px);
    }

    .dropdown-item i {
        width: 20px;
        font-size: 0.9rem;
    }

    /* FIX CRITIQUE 5: Sous-menus imbriqués - visibilité assurée */
    .dropdown-submenu>.dropdown-menu {
        position: static;
        margin-left: 15px;
        /* Marge gauche réduite */
        margin-right: 8px;
        /* Marge droite pour éviter débordement */
        margin-top: 0;
        background: rgba(46, 125, 50, 0.05);
        border-left: 2px solid var(--color-primary-light);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
        box-sizing: border-box;
        width: auto;
        /* Largeur automatique */
    }

    /* Sous-menu actif */
    .dropdown-submenu.active>.dropdown-menu {
        max-height: 2000px;
        padding: 8px 0;
    }

    /* Indicateur visuel pour les items avec sous-menus */
    .nav-link.has-dropdown i.fa-chevron-down {
        transition: transform 0.3s var(--transition);
    }

    .nav-item.active>.nav-link.has-dropdown i.fa-chevron-down {
        transform: rotate(180deg);
    }
}

@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }

    .top-bar .container {
        font-size: 0.78rem;
    }

    .top-links {
        gap: 12px;
    }

    .header-container {
        padding: 10px 15px;
    }

    .search-form input {
        font-size: 1.1rem;
        padding: 18px 50px 18px 18px;
    }

    /* Menu mobile pleine largeur sur petit écran */
    .main-nav {
        width: 280px;
    }
}

@media (max-width: 480px) {
    .main-nav {
        width: 100%;
        max-width: 100%;
    }

    .top-bar .container {
        flex-direction: column;
        gap: 10px;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item,
.mega-column {
    animation: fadeInUp 0.3s var(--transition) forwards;
    opacity: 0;
}

.dropdown-item:nth-child(1) {
    animation-delay: 0.05s;
}

.dropdown-item:nth-child(2) {
    animation-delay: 0.1s;
}

.dropdown-item:nth-child(3) {
    animation-delay: 0.15s;
}

.dropdown-item:nth-child(4) {
    animation-delay: 0.2s;
}

.dropdown-item:nth-child(5) {
    animation-delay: 0.25s;
}

.mega-column:nth-child(1) {
    animation-delay: 0.1s;
}

.mega-column:nth-child(2) {
    animation-delay: 0.2s;
}

.mega-column:nth-child(3) {
    animation-delay: 0.3s;
}

.nav-item:hover .dropdown-item,
.nav-item:hover .mega-column {
    animation: fadeInUp 0.3s var(--transition) forwards;
}

/* Désactiver les animations en mode mobile pour de meilleures performances */
@media (max-width: 1200px) {

    .dropdown-item,
    .mega-column {
        animation: none;
        opacity: 1;
    }
}

body.nav-open {
    overflow: hidden;
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center {
    text-align: center;
}

.text-white {
    color: white;
}

.mt-3 {
    margin-top: 1rem;
}

.me-2 {
    margin-right: 0.5rem;
}

.ms-auto {
    margin-left: auto;
}

.fw-bold {
    font-weight: 700;
}


/* ============================================
   PATCH MEGA-MENU MOBILE V2 - frontend-megamenu-fix.css
   
   Remplace le contenu de frontend-megamenu-fix.css par ce code
   
   Cette version corrige le mega-menu mobile de façon plus douce
   sans créer de conflits avec les styles existants
   ============================================ */

@media (max-width: 1200px) {

    /* ============================================
       CORRECTION MEGA-MENU : AFFICHAGE EN LISTE
       ============================================ */

    /* Container - permet l'affichage complet */
    .mega-container {
        padding: 0 !important;
        width: 100% !important;
        overflow: visible !important;
    }

    /* Grid devient une liste simple */
    .mega-grid {
        display: block !important;
        grid-template-columns: none !important;
        width: 100% !important;
        gap: 0 !important;
    }

    /* Colonnes en mode liste */
    .mega-column {
        display: block !important;
        width: 100% !important;
        margin: 0 0 12px 0 !important;
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        overflow: visible !important;
        box-sizing: border-box !important;
    }

    /* Titres de catégories - STYLE AMÉLIORE */
    .mega-title {
        display: flex !important;
        align-items: center !important;
        font-size: 0.75rem !important;
        font-weight: 700 !important;
        color: var(--color-primary) !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        padding: 10px 16px !important;
        margin: 0 12px 6px 12px !important;
        background: rgba(46, 125, 50, 0.1) !important;
        border-left: 4px solid var(--color-primary) !important;
        border-radius: 6px !important;
        border-bottom: none !important;
        width: auto !important;
        max-width: calc(100% - 24px) !important;
        box-sizing: border-box !important;
    }

    .mega-title i {
        margin-right: 8px !important;
        font-size: 1rem !important;
        flex-shrink: 0 !important;
    }

    /* Liste de liens - AFFICHAGE COMPLET */
    .mega-links {
        list-style: none !important;
        padding: 0 !important;
        margin: 0 0 16px 0 !important;
        width: 100% !important;
    }

    .mega-links li {
        margin: 0 !important;
        width: 100% !important;
    }

    /* Liens individuels - TEXTE COMPLET VISIBLE */
    .mega-links a {
        display: block !important;
        padding: 12px 16px !important;
        margin: 0 12px 4px 12px !important;
        color: var(--color-text) !important;
        font-size: 0.9rem !important;
        line-height: 1.4 !important;
        background: white !important;
        border-radius: 6px !important;
        border-left: 3px solid transparent !important;
        transition: all 0.3s ease !important;

        /* IMPORTANT : Permet l'affichage du texte complet */
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        white-space: normal !important;
        text-overflow: clip !important;
        overflow: visible !important;

        width: auto !important;
        max-width: calc(100% - 24px) !important;
        box-sizing: border-box !important;
    }

    .mega-links a:hover,
    .mega-links a:active {
        background: var(--color-primary) !important;
        color: white !important;
        border-left-color: var(--color-primary-dark) !important;
        transform: translateX(4px) !important;
        box-shadow: 0 2px 8px rgba(46, 125, 50, 0.2) !important;
    }

    /* Colonne CTA (Call to Action) */
    .mega-column-cta {
        display: block !important;
        margin: 12px !important;
        padding: 20px 16px !important;
        background: linear-gradient(135deg, rgba(46, 125, 50, 0.12) 0%, rgba(76, 175, 80, 0.08) 100%) !important;
        border-radius: 10px !important;
        border: 2px solid var(--color-primary) !important;
        text-align: center !important;
        width: auto !important;
        max-width: calc(100% - 24px) !important;
        box-sizing: border-box !important;
    }

    .mega-column-cta .mega-title {
        background: transparent !important;
        border: none !important;
        text-align: center !important;
        justify-content: center !important;
        margin: 0 0 16px 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .mega-column-cta .btn {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 12px 20px !important;
        box-sizing: border-box !important;
    }

    /* Fix pour les menus imbriqués si présents */
    .mega-menu .dropdown-menu {
        position: static !important;
    }
}

/* ============================================
   RESPONSIVE SUPPLÉMENTAIRE (Très petits écrans)
   ============================================ */
@media (max-width: 480px) {
    .mega-title {
        font-size: 0.7rem !important;
        padding: 8px 12px !important;
    }

    .mega-links a {
        font-size: 0.85rem !important;
        padding: 10px 14px !important;
    }
}

/* ============================================
   NOTES D'INSTALLATION
   ============================================
   
   1. REMPLACEZ le contenu de public/assets/css/frontend-megamenu-fix.css
      par ce nouveau code
   
   2. Videz le cache navigateur (Ctrl + Shift + R)
   
   3. Videz le cache Laravel :
      php artisan view:clear
      php artisan cache:clear
   
   4. Testez sur mobile
   
   ⚠️ Si le problème persiste, vérifiez que le fichier est bien chargé :
      - Inspectez l'élément dans le navigateur
      - Vérifiez dans l'onglet "Network" que frontend-megamenu-fix.css est chargé
   
   ============================================ */