/* ==========================================================================
   CONSERVATION STRICTE DE LA CHARTE GRAPHIQUE DE DÉPART & VARIABLES NOMINALES
   ========================================================================== */
:root {
    --color-dark: #0c4a60;         /* Conserve votre bleu profond d'origine */
    --color-light: #ffffff;        /* Conserve votre blanc pur */
    --color-accent: #f1b84a;       /* Conserve votre jaune/orange safran d'origine */
    --color-accent-hover: #c06000; /* Conserve votre orange foncé de survol */
    --color-gold: #c99312;         /* Conserve la couleur dorée de la ligne 3 */
}

/* ==========================================================================
   1. SECTION 1 : LA BARRE D'ÉTAT SUPÉRIEURE (MASQUÉE SUR DEMANDE DE COMPACITÉ)
   ========================================================================== */
.top-bar {
    display: none !important;
}

/* ==========================================================================
   2. SECTION 2 : CONFIGURATION DU MENU FIGÉ ET COLLANT AU DÉFILEMENT (STICKY)
   ========================================================================== */
.main-header {
    position: sticky !important;
    top: 0 !important;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid #eeeeee;
    z-index: 999999 !important;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    padding: 15px 0;
    transition: all 0.3s ease;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 992px;
    margin: 0 auto;
    padding: 0 15px;
    overflow: visible !important;
}

.logo-block {
    display: flex;
    align-items: center;
    max-width: 65%;
    text-decoration: none;
}

.main-logo {
    height: 75px;
    width: auto;
    margin-right: 20px;
}

/* ==========================================================================
   3. BLOC LOGO CENTRALISÉ ET JUSTIFIÉ (RENDU STRICT SUR 3 LIGNES D'ORIGINE)
   ========================================================================== */
.logo-text-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    width: 100%;
    max-width: 480px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: transparent;
}

.logo-line-1 {
    font-size: 45px;
    font-weight: 400;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 28px;
    line-height: 0.95;
    margin: 0 0 0 -2px;
    padding: 0;
    text-align: justify;
    text-align-last: justify;
}

.logo-line-2 {
    font-size: 10px;
    font-weight: 600;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: -0.1px;
    line-height: 1.4;
    margin: 4px 0 0 0;
    padding: 0;
    text-align: justify;
}

.logo-line-3 {
    font-size: 10px;
    font-weight: 400;
    font-style: italic;
    color: var(--color-gold);
    line-height: 1.3;
    margin: 2px 0 0 0;
    padding: 0;
    text-align: justify;
}
/* ==========================================================================
   4. NAVIGATION PRINCIPALE ET LIENS DU MENU PRINCIPAL EN CAPITALES
   ========================================================================== */
.main-nav {
    position: relative;
    overflow: visible !important;
}

.nav-menu {
    display: flex;
    list-style: none;
    background-color: rgba(241, 184, 74, 0.99) !important; /* Retrait du fond dur d'origine pour la transparence */
    margin: 0;
    padding: 5px;
    align-items: center;
    gap: 20px;
    overflow: visible !important;
}

.nav-menu li {
    position: relative;
    overflow: visible !important;
}

.nav-menu li a {
    text-decoration: none;
    font-size: 11px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-dark) !important; /* Couleur bleu profond nominale */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
    padding: 10px 0;
}

.nav-menu li a:hover,
.nav-menu li.active a {
    color: var(--color-accent-hover) !important; /* Transition orange foncée nominale au survol */
}

/* ==========================================================================
   5. LE RUBAN DU MÉGA MENU : APPAREILLAGE TRANSPARENT ACCENTUÉ
   ========================================================================= */
.nav-item-megamenu {
    border-left: 1px solid rgba(12, 74, 96, 0.2);
    padding-left: 15px;
    margin-left: 5px;
    overflow: visible !important;
}

.megamenu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 520px;
    /* Voile de verre transparent préservant la charte or/orange de départ */
    background: rgba(241, 184, 74, 0.94) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(12, 74, 96, 0.2) !important;
    border-top: 3px solid var(--color-dark) !important;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.1);
    padding: 22px;
    display: none; /* Piloté en grid par le JavaScript */
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    z-index: 9999999 !important;
}

.megamenu-column h4 {
    color: var(--color-dark) !important; /* Titres en bleu profond lisible */
    font-size: 11px;
    font-weight: 900;
    margin: 0 0 12px 0;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(12, 74, 96, 0.15);
    padding-bottom: 6px;
}

.megamenu-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.megamenu-links li {
    margin-bottom: 9px;
}

.megamenu-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #1e293b !important; /* Couleur sombre texturée pour une lecture parfaite */
    font-size: 11.5px;
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.megamenu-links a i {
    color: var(--color-dark) !important; /* Icônes intérieures coordonnées */
    font-size: 11px;
    width: 14px;
    text-align: center;
}

.megamenu-links a:hover {
    color: var(--color-accent-hover) !important;
    padding-left: 3px;
}

/* ==========================================================================
   6. SOLUTION DU SQUASH RESPONSIVE MOBILE ET HAMBURGER (STRICT SOUS 768PX)
   ========================================================================== */
/* ==========================================================================
   6. INTERFACE RESPONSIVE MOBILE AMÉLIORÉE (MÊME LIGNE & DOUBLE COLONNE STRICTE)
   ========================================================================== */
.menu-toggle {
    display: none; 
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.menu-toggle .bar {
    display: block;
    width: 24px;
    height: 3px;
    background-color: var(--color-accent);
    margin: 5px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Écrans Tablettes et Mobiles (Forçage double colonne) */
@media (max-width: 768px) {
    .menu-toggle {
        display: block !important; /* Force l'apparition du bouton hamburger */
    }

    /* Déploiement vertical de la liste de navigation mobile */
    .nav-menu {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        width: 100% !important;
        background-color: rgba(255, 255, 255, 0.99) !important;
        box-shadow: 0 8px 25px rgba(0,0,0,0.1) !important;
        flex-direction: column !important;
        gap: 0 !important;
        padding: 8px 0 !important;
        display: none !important; 
        border-top: 1px solid #f1f5f9;
    }

    .nav-menu.mobile-open {
        display: flex !important;
    }

    .nav-menu li {
        width: 100% !important;
    }

    .nav-menu li a {
        width: 100% !important;
        padding: 12px 20px !important;
        justify-content: flex-start !important; 
        border-bottom: 1px solid #f1f5f9;
    }
    
    .nav-item-megamenu {
        border-left: none !important;
        padding-left: 0 !important;
        margin-left: 0 !important;
    }

    /* 🚀 CORRECTION CRITIQUE : MAINTIEN STRICT EN 2 COLONNES MÊME SUR SMARTPHONE */
    .megamenu-dropdown {
        position: static !important;
        width: 100% !important;
        display: none; /* Piloté par la classe active ou le JS */
        grid-template-columns: repeat(2, 1fr) !important; /* Force les 2 colonnes en CSS Grid */
        gap: 15px !important; /* Réduction de l'espace d'écartement entre les blocs */
        background: rgba(241, 184, 74, 0.08) !important; 
        box-shadow: none !important;
        padding: 15px !important;
        border-radius: 0 !important;
        border: none !important;
        border-left: 4px solid var(--color-dark) !important;
    }
    
    /* Forçage d'affichage en Grid si ouvert */
    .nav-item-megamenu:hover .megamenu-dropdown {
        display: grid !important;
    }

    /* 🔎 DIMINUTION DE LA POLICE INTERNE DU MÉGA MENU SUR MOBILE */
    .megamenu-column h4 {
        font-size: 10px !important; /* Titre de colonne plus compact */
        margin: 0 0 8px 0 !important;
        padding-bottom: 4px !important;
        letter-spacing: 0.5px !important;
    }

    .megamenu-links li {
        margin-bottom: 6px !important; /* Rapproche les lignes verticalement */
    }

    .megamenu-links a {
        font-size: 10px !important; /* Liens réduits à 10px pour éviter les retours à la ligne */
        gap: 6px !important; /* Rapproche l'icône du texte */
    }

    .megamenu-links a i {
        font-size: 9px !important; /* Icônes intérieures légèrement plus petites */
        width: 10px !important;
    }
}

/* Réduction de sécurité pour smartphones très étroits */
@media (max-width: 576px) {
    .logo-text-container { max-width: 100%; }
    .logo-line-1 { font-size: 32px !important; letter-spacing: 12px !important; }
    .logo-line-2 { font-size: 5.9px !important; }
    .logo-line-3 { font-size: 7.4px !important; }
}

/* Optimisation pour les téléphones extrêmement étroits (Moins de 360px) */
@media (max-width: 360px) {
    .megamenu-dropdown {
        gap: 10px !important;
        padding: 10px !important;
    }
    .megamenu-links a {
        font-size: 9px !important; 
    }
    
    .logo-text-container { max-width: 100%; }
    .logo-line-1 { font-size: 32px !important; letter-spacing: 12px !important; }
    .logo-line-2 { font-size: 5.9px !important; }
    .logo-line-3 { font-size: 7.4px !important; }
}
