/* ==========================================================================
   HEADER
   ========================================================================== */
.header-unified.dark-theme {
    background-color: #111827 !important; /* Deeper, richer contrast */
    padding: 12px 24px;
    color: #ffffff;
    border-bottom: 1px solid #1f2937;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.header-right-group .btn.btn-secondary-ghost,
.header-right-group .user-info .dropdown-toggle {
    background-color: rgba(255, 255, 255, 0.05); /* Increases visibility */
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
}

.header-right-group .btn.btn-secondary-ghost:hover,
.header-right-group .user-info .dropdown-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
}

/* ==========================================================================
   NAVIGATION PRINCIPALE - SEGMENTED CONTROL
   ========================================================================== */
.subnav,
.subnav-bar,
.subnav-container {
    background-color: transparent !important;
    border-bottom: none !important;
    box-shadow: none !important;
    margin: 0;
    width: 100%;
}

/* ==========================================================================
   NAVIGATION PRINCIPALE - STYLE "MINIMAL TABS" SAAS
   ========================================================================== */

/* 1. Conteneur global (Ajout d'une ligne séparatrice très fine en bas) */
.subnav-container {
    padding: 0 24px 0 24px !important; /* Plus de padding en bas pour coller les onglets à la ligne */
    display: flex;
    justify-content: flex-start; /* Alignement à gauche (plus standard sur les dashboards) */
    border-bottom: 1px solid #e5e7eb !important; 
    background-color: #ffffff !important;
}

.modern-subnav {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}

/* 2. Suppression du "bloc" gris */
.modern-subnav .nav-segmented {
    display: flex;
    background-color: transparent !important; /* Disparition du fond gris */
    padding: 0 !important;
    border-radius: 0 !important;
    list-style: none;
    margin: 0;
    gap: 32px !important; /* Espacement plus large et élégant entre les onglets */
    border: none !important;
    box-shadow: none !important;
}

/* 3. Style des onglets (Minimaliste) */
.modern-subnav .nav-segmented .nav-item {
    display: flex;
    flex: none !important; /* Ils reprennent leur taille naturelle au lieu de s'étirer */
    align-items: center;
    gap: 8px;
    padding: 16px 4px !important; /* Hauteur généreuse, padding latéral réduit */
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    text-decoration: none;
    border-radius: 0 !important; /* Plus de bords arrondis */
    background-color: transparent !important;
    border: none !important;
    border-bottom: 2px solid transparent !important; /* Prépare la ligne d'état actif */
    transition: color 0.2s ease, border-color 0.2s ease;
    margin-bottom: -1px; /* Permet à la ligne active de chevaucher la bordure grise du conteneur */
}

/* 4. Survol (Texte plus sombre, ligne grise subtile) */
.modern-subnav .nav-segmented .nav-item:hover,
.modern-subnav .nav-segmented .nav-item:focus {
    color: #111827 !important;
    background-color: transparent !important; /* Surtout pas de fond au survol */
    border-bottom-color: #d1d5db !important; /* Soulignement gris clair au survol */
}

/* 5. État Actif (Ligne rouge et texte en gras) */
.modern-subnav .nav-segmented .nav-item.active {
    background-color: transparent !important;
    color: #D9232D !important; /* Rouge marque */
    font-weight: 600;
    border-bottom: 2px solid #D9232D !important; /* Soulignement rouge net */
    box-shadow: none !important; /* Retrait de l'effet 3D */
}

/* Ajustement de la taille des icônes */
.modern-subnav .nav-segmented .nav-item i {
    font-size: 1.1rem;
}