/* Fichier : css/navbar.css (Version Finale : Dropdown Hauteur Fixe) */

/* --- 1. CONFIGURATION DE LA BARRE PRINCIPALE --- */
nav {
    position: sticky;
    top: 70px; 
    z-index: 100;
    
    width: 100%;
    min-width: 1000px;
    
    background-color: #343a40;
    height: 50px;
    box-shadow: none; /* Enlever le shadow qui crée l'espace visuel */
    
    /* SCROLLBAR */
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap; 

    scrollbar-width: thin;
    scrollbar-color: #6c757d #343a40;
}

/* Responsive Mobile: annuler le min-width et permettre wrapping si nécessaire */
@media (max-width: 768px) {
    nav {
        min-width: 0;
        width: 100%;
        height: 56px;
        overflow-x: auto;
        white-space: nowrap;
    }
    nav ul {
        flex-wrap: nowrap;
    }
    nav > ul > li > a {
        padding: 0 14px;
        font-size: 0.85rem;
    }
}

/* Design Scrollbar */
nav::-webkit-scrollbar { height: 10px; }
nav::-webkit-scrollbar-track { background: #343a40; }
nav::-webkit-scrollbar-thumb { background-color: #6c757d; border-radius: 4px; border: 2px solid #343a40; }
nav::-webkit-scrollbar-thumb:hover { background-color: #17a2b8; cursor: grab; }

/* --- 2. STRUCTURE --- */
nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    height: 100%; 
}

/* Règle générale pour les LI du menu principal */
nav > ul > li {
    height: 100%;
    display: flex;
    align-items: center;
}

/* --- 3. STYLE DES ONGLETS PRINCIPAUX --- */
/* On cible uniquement les liens directs du menu pour éviter de casser le sous-menu */
nav > ul > li > a {
    display: flex;
    align-items: center;
    justify-content: center;
    
    height: 100%;       
    padding: 0 20px;    
    
    color: #f8f9fa;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap; 
    
    transition: background-color 0.2s;
    border-right: 1px solid rgba(255,255,255,0.05); 
}

nav > ul > li > a .icon { margin-right: 8px; font-size: 1.1em; }
nav > ul > li > a:hover { background-color: #495057; color: #17a2b8; }
nav > ul > li > a.active {
    background-color: #17a2b8 !important; 
    color: white !important;
    font-weight: bold !important;
    border-radius: 0; 
    border-bottom: 4px solid #0f6674; 
}
