/* 
=====================================================
🔥 UPPERFORMA - HEADER DESKTOP NUCLEAR FIX 🔥
=====================================================
OBJECTIF : Éliminer DÉFINITIVEMENT le double header desktop
MÉTHODE : Spécificité maximale + !important brutal
DATE : 28 Nov 2025
=====================================================
*/

/* ==========================================
   RESET ABSOLU DU HEADER
   ========================================== */

/* Force UN SEUL header visible */
html body .header {
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    z-index: 9999 !important;
    background: #fff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    display: block !important;
    visibility: visible !important;
}

/* Empêche tout header dupliqué */
html body .header ~ .header {
    display: none !important;
}

/* Force container unique */
html body .header .container {
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    width: 100% !important;
}

/* ==========================================
   HEADER TOP - Desktop SEULEMENT
   ========================================== */

html body .header .header-top {
    display: block !important;
    background: #f8f8f8 !important;
    padding: 10px 0 !important;
    border-bottom: 1px solid #e0e0e0 !important;
    width: 100% !important;
}

html body .header .header-top-content {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
}

html body .header .header-top .contact-info {
    display: flex !important;
    gap: 30px !important;
    flex-wrap: nowrap !important;
}

html body .header .header-top .contact-info a {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    color: #333 !important;
    font-size: 14px !important;
    transition: color 0.3s ease !important;
}

html body .header .header-top .contact-info a:hover {
    color: #E65C18 !important;
}

html body .header .header-top .btn-header-cta {
    background: #E65C18 !important;
    color: #fff !important;
    padding: 8px 20px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    border: none !important;
    cursor: pointer !important;
}

html body .header .header-top .btn-header-cta:hover {
    background: #d04e10 !important;
    transform: translateY(-2px) !important;
}

/* ==========================================
   NAVBAR - Desktop
   ========================================== */

html body .header .navbar {
    background: #fff !important;
    padding: 15px 0 !important;
    width: 100% !important;
    position: relative !important;
}

html body .header .navbar .nav-content {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
}

html body .header .navbar .logo {
    display: flex !important;
    align-items: center !important;
}

html body .header .navbar .logo img {
    height: 50px !important;
    width: auto !important;
}

/* ==========================================
   NAVIGATION MENU - Desktop UNIQUEMENT
   ========================================== */

@media (min-width: 769px) {
    
    /* Cache burger sur desktop */
    html body .header .mobile-menu-toggle {
        display: none !important;
    }
    
    /* Menu horizontal desktop */
    html body .header .nav-menu {
        display: flex !important;
        position: static !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 30px !important;
        list-style: none !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        width: auto !important;
        height: auto !important;
        transform: none !important;
        visibility: visible !important;
        box-shadow: none !important;
    }
    
    html body .header .nav-menu > li {
        display: inline-block !important;
        position: relative !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    html body .header .nav-menu .nav-link {
        display: inline-block !important;
        color: #333 !important;
        font-weight: 500 !important;
        font-size: 15px !important;
        padding: 8px 12px !important;
        transition: color 0.3s ease !important;
        text-decoration: none !important;
    }
    
    html body .header .nav-menu .nav-link:hover,
    html body .header .nav-menu .nav-link.active {
        color: #E65C18 !important;
    }
    
    /* ==========================================
       DROPDOWNS DESKTOP
       ========================================== */
    
    html body .header .nav-menu .dropdown {
        position: relative !important;
    }
    
    html body .header .nav-menu .dropdown .dropdown-menu {
        display: none !important;
        position: fixed !important;
        /* CHANGEMENT : fixed au lieu de absolute pour être relatif au viewport */
        top: 110px !important;
        /* Position exacte sous le header (100px header + 10px margin) */
        left: 50% !important;
        transform: translateX(-50%) !important;
        /* Centrage PARFAIT sur la page entière */
        background: #fff !important;
        border-radius: 12px !important;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
        padding: 30px !important;
        width: 800px !important;
        max-width: 90vw !important;
        z-index: 10000 !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: all 0.3s ease !important;
    }
    
    html body .header .nav-menu .dropdown:hover .dropdown-menu {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    html body .header .nav-menu .dropdown .dropdown-grid {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 25px !important;
    }
    
    html body .header .nav-menu .dropdown .dropdown-section {
        padding: 0 !important;
    }
    
    html body .header .nav-menu .dropdown .dropdown-section h4 {
        font-size: 14px !important;
        font-weight: 700 !important;
        color: #E65C18 !important;
        text-transform: uppercase !important;
        margin-bottom: 15px !important;
        letter-spacing: 0.5px !important;
    }
    
    html body .header .nav-menu .dropdown .dropdown-section a {
        display: block !important;
        color: #555 !important;
        font-size: 14px !important;
        padding: 10px 15px !important;
        border-radius: 6px !important;
        transition: all 0.2s ease !important;
    }
    
    html body .header .nav-menu .dropdown .dropdown-section a:hover {
        background: #f8f8f8 !important;
        color: #E65C18 !important;
        transform: translateX(5px) !important;
    }
    
    html body .header .nav-menu .dropdown .dropdown-footer {
        margin-top: 20px !important;
        padding-top: 20px !important;
        border-top: 1px solid #e0e0e0 !important;
        text-align: center !important;
    }
    
    html body .header .nav-menu .dropdown .dropdown-footer .btn-primary {
        background: #E65C18 !important;
        color: #fff !important;
        padding: 12px 30px !important;
        border-radius: 8px !important;
        font-weight: 600 !important;
        font-size: 15px !important;
        transition: all 0.3s ease !important;
        border: none !important;
        cursor: pointer !important;
        display: inline-block !important;
    }
    
    html body .header .nav-menu .dropdown .dropdown-footer .btn-primary:hover {
        background: #d04e10 !important;
        transform: translateY(-2px) !important;
    }
}

/* ==========================================
   MOBILE - Ne touche PAS au burger
   ========================================== */

@media (max-width: 768px) {
    
    /* Header top visible sur mobile */
    html body .header .header-top {
        display: none !important;
    }
    
    /* Laisse le mobile-menu.js gérer le menu burger */
    html body .header .mobile-menu-toggle {
        display: flex !important;
    }
    
    html body .header .nav-menu {
        /* Le JS gère via transform: translateX() */
    }
}
