/**
 * ========================================================
 * [ÉTAT : EN DÉVELOPPEMENT] Date : 24-05-2026 16:35:00
 * FICHIER : menu_universel.css
 * RÔLE : Styles pour le Méga Menu avec tampon de sécurité anti-échappement
 * Auteurs : Yvan Dubé & Gemini (IA Collaboratrice)
 * =========================================================
 */

#banniere-survol {
    background-color: #f8f9fa;
    border-bottom: 1px solid #ddd;
    padding: 0.5rem 2rem;
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    font-family: Arial, sans-serif;
}

.menu-principal {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1rem;
    align-items: center;
    width: 100%; 
}

.menu-principal > li {
    position: relative;
}

.pousse-droite {
    margin-left: auto;
}

.nav-item {
    display: block;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    border-radius: 6px;
    transition: background-color 0.2s, color 0.2s;
    border: 1px solid transparent;
}

.nav-item:hover, .nav-item.active {
    background-color: #e2e8f0;
    color: #0056b3;
}

.nav-item.disabled {
    color: #aaa;
    cursor: not-allowed;
}

/* --- BOÎTES DÉROULANTES (STRUCTURE COMMUNE) --- */
.dropdown-menu {
    position: absolute;
    top: 100%;
    background-color: #ffffff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    border: 1px solid #ddd;
    border-radius: 8px;
    z-index: 1000;

    /* --- SÉCURITÉ ANTI-ÉCHAPPEMENT --- */
    visibility: hidden;
    opacity: 0;
    transform: translateY(8px); /* Léger effet de glissement */
    pointer-events: none; /* Empêche de survoler un menu caché */
    
    /* Quand la souris QUITTE : on attend 0.3s (délai) avant de lancer la transition de 0.2s */
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear;
    transition-delay: 0.3s;
}

/* Quand la souris ENTRE / SURVOLE : affichage instantané sans aucun délai */
.dropdown:hover > .dropdown-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    transition-delay: 0s; 
}

/* --- CONFIGURATION PROPRE À CHAQUE MENU --- */

/* Menu simple (Mon compte / Profil) */
.menu-simple {
    display: block; /* Géré par visibility/opacity désormais */
    right: 0;
    left: auto;
    min-width: 200px;
    list-style: none;
    padding: 0.5rem 0;
}

.menu-simple > li > a {
    display: block;
    padding: 0.6rem 1.5rem;
    text-decoration: none;
    color: #444;
    transition: background-color 0.2s;
}

.menu-simple > li > a:hover {
    background-color: #f1f5f9;
    color: #0056b3;
}

.separator {
    height: 1px;
    background-color: #eee;
    margin: 0.5rem 0;
}


/* Le Méga Menu (Séva) */
.mega-menu {
    display: flex !important; /* Force le mode flexbox contre vents et marées */
    flex-direction: row !important; /* Force l'alignement horizontal strict */
    right: 0; 
    left: auto;
    padding: 1.5rem;
    gap: 2rem;
    white-space: nowrap;
}


.mega-colonne {
    display: flex;
    flex-direction: column;
    min-width: 220px;
}

.colonne-bordure {
    border-left: 1px solid #eee;
    padding-left: 2rem;
}

.mega-titre {
    font-weight: bold;
    color: #222;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #0056b3;
    font-size: 1.05em;
}

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

.mega-liste > li {
    margin-bottom: 0.3rem;
}

.mega-liste > li > a {
    display: block;
    padding: 0.4rem 0.5rem;
    text-decoration: none;
    color: #555;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s, padding-left 0.2s;
}

.mega-liste > li > a:hover {
    background-color: #f1f5f9;
    color: #0056b3;
    padding-left: 0.8rem;
}