/* --- Structure Globale --- */
body { 
    background-color: #f8f9fa; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* --- Barre de Navigation --- */
.navbar {
    border-bottom: 3px solid #0d6efd;
}
.welcome-text { 
    color: rgba(255,255,255,0.8); 
    font-size: 0.9rem; 
}
.nav-link-underline {
    text-decoration: underline;
}

/* --- Sections et Cartes --- */
.filter-section { 
    background: white; 
    border-radius: 12px; 
    padding: 20px; 
    margin-bottom: 25px; 
    border: none; 
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); 
}

.periode-info { 
    background: linear-gradient(45deg, #0d6efd, #004bb5); 
    color: white; 
    padding: 15px; 
    border-radius: 10px; 
    margin-bottom: 20px; 
    font-weight: bold; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); 
    font-size: 1.1rem;
}

/* --- Tableau et Catégories --- */
/* Cette classe remplace les styles "inline" dans tes fichiers PHP */
.category-row td {
    background-color: #f1f3f5 !important; 
    color: #212529 !important; 
    font-weight: 800 !important; 
    text-transform: uppercase !important; 
    letter-spacing: 1px !important;
    border-left: 5px solid #0d6efd !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    font-size: 0.9rem;
}

/* --- Badges de Quantité (Consultation) --- */
.qty-badge { 
    padding: 8px 12px; 
    border-radius: 8px; 
    font-weight: 900; 
    min-width: 65px; 
    display: inline-block; 
}
.qty-positive { 
    background-color: #e7f1ff; 
    color: #0d6efd; 
}
.qty-zero { 
    background-color: #f0f0f0; 
    color: #adb5bd; 
}

/* --- Champs de saisie (Saisie) --- */
.session-warning {
    border-left: 5px solid #ffc107;
}
.qty-input-mimic {
    width: 80px;
    padding: 8px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    transition: border-color 0.2s;
}
.qty-input-mimic:focus {
    border-color: #0d6efd;
    outline: none;
    background-color: #f8fbff;
}

/* --- Barre de validation fixe (Mobile) --- */
.sticky-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
    z-index: 1030;
}

/* --- Cards d'action (index.php — tableau de bord) --- */
.action-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.action-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.12) !important;
}
/* Icônes emoji des cards du tableau de bord */
.dashboard-icon {
    font-size: 3.5rem;
}

/* --- Card de connexion (index.php — non connecté) --- */
.login-card {
    border: none;
    border-radius: 16px;
}

/* --- Adaptations Mobile --- */
@media (max-width: 768px) {
    .container { padding-left: 10px; padding-right: 10px; }
    .periode-info { font-size: 0.95rem; }
    .category-row td { font-size: 0.8rem; }
    .btn-sm { padding: 0.2rem 0.35rem; font-size: 0.8rem; }
}

/* --- Membres de l'équipe (admin_users) --- */
.badge-role {
    min-width: 125px;
    display: inline-block;
    text-align: center;
}
.table-active-user {
    background-color: #f0f7ff !important;
    border-left: 4px solid #0d6efd !important;
}
.self-label {
    font-size: 0.75rem;
    font-style: italic;
    color: #0d6efd;
    margin-left: 5px;
}

/* --- Divers styles utilitaires --- */
/* Utilisé dans admin_categories.php (form-text ordre) */
.form-text-xs { font-size: 0.7rem; }
/* Utilisé dans admin_publications.php (sigle en minuscules) */
.text-lowercase-input { text-transform: lowercase; }
/* Utilisé dans admin_permissions.php (toggle switch dimensionné) */
.form-switch-lg .form-check-input { width: 2.5em; height: 1.25em; cursor: pointer; }
/* Curseur pointeur sur les labels cliquables */
.cursor-pointer { cursor: pointer; }
/* Largeur fixe pour la colonne Ordre dans admin_categories */
.col-width-80 { width: 80px; }
/* Largeur fixe pour la colonne Quantité dans saisie */
.col-width-120 { width: 120px; }
/* Texte muted légèrement plus petit (sous-titres de tableau) */
.text-muted-xs { font-size: 0.75rem; }
/* --- Messages d'alerte (renderMessage dans functions.php) --- */
.msg-alert {
    background-color: white;
    border-left: 5px solid transparent;
}
.msg-alert .msg-text {
    color: #444;
}
.msg-success { border-left-color: #198754; }
.msg-danger  { border-left-color: #dc3545; }
.msg-warning { border-left-color: #ffc107; }
.msg-info    { border-left-color: #0dcaf0; }