/* ============================================
   THÈME PERSONNALISÉ - GRIS & ROUGE
   ============================================
   Couleurs principales : Gris #303d49 | Rouge #ea5357
   Modifiez uniquement les valeurs ici pour tout changer
*/

/* ==========================================
   VARIABLES CSS - PALETTE DE COULEURS
   ========================================== */
:root {
    /* COULEURS PRINCIPALES - Gris foncé */
    --color-primary: #303d49;              /* Gris principal */
    --color-primary-dark: #232c35;         /* Gris plus foncé */
    --color-primary-light: #3d4e5d;        /* Gris plus clair */
    --color-primary-rgb: 48, 61, 73;       /* Version RGB pour transparence */
    
    /* COULEURS SECONDAIRES - Rouge */
    --color-secondary: #ea5357;            /* Rouge principal */
    --color-secondary-dark: #d6383c;       /* Rouge plus foncé */
    --color-secondary-light: #ef7074;      /* Rouge plus clair */
    --color-secondary-rgb: 234, 83, 87;    /* Version RGB pour transparence */
    
    /* COULEURS D'ACCENTUATION */
    --color-success: #4caf50;              /* Vert - succès (cohérent avec rouge) */
    --color-info: #607d8b;                 /* Gris-bleu - info (cohérent avec gris) */
    --color-warning: #ff9800;              /* Orange - avertissement */
    --color-danger: #ea5357;               /* Rouge - erreur (même que secondaire) */
    
    /* COULEURS NEUTRES */
    --color-dark: #212529;
    --color-light: #f5f5f5;
    --color-muted: #757575;
    --color-white: #ffffff;
    
    /* COULEURS DE TEXTE */
    --text-primary: #212529;
    --text-secondary: #757575;
    --text-white: #ffffff;
    --text-muted: #9e9e9e;
    
    /* COULEURS DE FOND */
    --bg-body: #f5f5f5;
    --bg-white: #ffffff;
    --bg-overlay: rgba(48, 61, 73, 0.7);
    --bg-overlay-light: rgba(48, 61, 73, 0.1);
}

/* ==========================================
   NAVIGATION - NAVBAR
   ========================================== */
.navbar-dark.bg-primary,
.bg-primary,
nav.bg-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%) !important;
    border-bottom: 3px solid var(--color-secondary);
}

.navbar-brand {
    color: var(--text-white) !important;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--color-secondary) !important;
    transform: translateY(-2px);
}

.navbar-text {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* ==========================================
   BOUTONS
   ========================================== */
.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border: none;
    color: var(--text-white);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(var(--color-primary-rgb), 0.3);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, #1a2229 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(var(--color-primary-rgb), 0.4);
    color: var(--text-white);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-success {
    background-color: var(--color-success);
    border-color: var(--color-success);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.btn-success:hover,
.btn-success:focus {
    background-color: #43a047;
    border-color: #43a047;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.btn-info {
    background-color: var(--color-info);
    border-color: var(--color-info);
}

.btn-info:hover,
.btn-info:focus {
    background-color: #546e7a;
    border-color: #546e7a;
}

.btn-warning {
    background-color: var(--color-warning);
    border-color: var(--color-warning);
    color: var(--text-white);
}

.btn-warning:hover,
.btn-warning:focus {
    background-color: #fb8c00;
    border-color: #fb8c00;
}

.btn-danger,
.btn-secondary {
    background-color: var(--color-secondary);
    border-color: var(--color-secondary);
    box-shadow: 0 2px 8px rgba(var(--color-secondary-rgb), 0.3);
}

.btn-danger:hover,
.btn-danger:focus,
.btn-secondary:hover,
.btn-secondary:focus {
    background-color: var(--color-secondary-dark);
    border-color: var(--color-secondary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(var(--color-secondary-rgb), 0.4);
}

/* Bouton désactivé */
.btn-secondary.disabled,
.btn.disabled {
    background-color: var(--color-muted) !important;
    border-color: var(--color-muted) !important;
    cursor: not-allowed;
    opacity: 0.6;
}

/* ==========================================
   CARTES (CARDS)
   ========================================== */
.card {
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-5px);
}

.card-header {
    font-weight: 600;
    border-bottom: 3px solid var(--color-primary);
}

.card-header.bg-light {
    background: linear-gradient(135deg, #f5f5f5 0%, #eeeeee 100%) !important;
    color: var(--color-primary);
}

.card-header.bg-success {
    background: linear-gradient(135deg, var(--color-success) 0%, #43a047 100%) !important;
    color: var(--text-white);
    border-bottom: 3px solid #388e3c;
}

.card-header.bg-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%) !important;
    color: var(--text-white);
    border-bottom: 3px solid var(--color-secondary);
}

/* Icônes dans les cartes */
.card .fa-4x,
.card .fa-3x {
    color: var(--color-primary);
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.card:hover .fa-4x,
.card:hover .fa-3x {
    color: var(--color-secondary);
    transform: scale(1.1);
    transition: all 0.3s ease;
}

/* ==========================================
   BADGES
   ========================================== */
.badge {
    font-weight: 600;
    padding: 0.5em 0.9em;
    border-radius: 6px;
}

.badge.bg-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%) !important;
    color: var(--text-white);
}

.badge.bg-success {
    background-color: var(--color-success) !important;
    color: var(--text-white);
}

.badge.bg-info {
    background-color: var(--color-info) !important;
    color: var(--text-white);
}

.badge.bg-warning {
    background-color: var(--color-warning) !important;
    color: var(--text-white);
}

.badge.bg-danger {
    background-color: var(--color-secondary) !important;
    color: var(--text-white);
}

.badge.bg-secondary {
    background-color: var(--color-secondary) !important;
    color: var(--text-white);
}

/* ==========================================
   ALERTES
   ========================================== */
.alert {
    border-radius: 10px;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.alert-success {
    background-color: #e8f5e9;
    border-left: 4px solid var(--color-success);
    color: #2e7d32;
}

.alert-info {
    background-color: #eceff1;
    border-left: 4px solid var(--color-info);
    color: #455a64;
}

.alert-warning {
    background-color: #fff3e0;
    border-left: 4px solid var(--color-warning);
    color: #e65100;
}

.alert-danger {
    background-color: #ffebee;
    border-left: 4px solid var(--color-secondary);
    color: #c62828;
}

/* ==========================================
   BANNIÈRES
   ========================================== */
.banner-container {
    position: relative;
    height: 300px;
    background: var(--color-light);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* Overlay pour bannières avec image */
.banner-overlay-light {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(var(--color-primary-rgb), 0.4) 0%, 
        rgba(var(--color-primary-rgb), 0.2) 50%, 
        rgba(var(--color-secondary-rgb), 0.4) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    z-index: 2;
}

/* Overlay pour bannières sans image */
.banner-overlay.no-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(var(--color-primary-rgb), 0.95) 0%, 
        rgba(var(--color-secondary-rgb), 0.95) 100%) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    z-index: 2;
}

.banner-content h1 {
    font-size: 3rem;
    font-weight: 700;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9);
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 0 15px rgba(0, 0, 0, 0.7));
    color: var(--text-white);
}

.banner-content p {
    font-size: 1.3rem;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.9);
    margin-bottom: 0;
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.7));
    color: var(--text-white);
}

.instance-badge {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50px;
    padding: 0.6rem 1.8rem;
    margin-top: 1rem;
    display: inline-block;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    font-weight: 600;
    color: var(--text-white);
}

/* ==========================================
   TABLES
   ========================================== */
.table {
    border-radius: 10px;
    overflow: hidden;
}

.table-light thead,
.table thead {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--text-white);
}

.table-light thead th {
    color: var(--text-white);
    font-weight: 600;
    border: none;
}

.table-hover tbody tr {
    transition: all 0.2s ease;
}

.table-hover tbody tr:hover {
    background-color: rgba(var(--color-primary-rgb), 0.05);
    transform: scale(1.01);
}

/* ==========================================
   ICÔNES COLORÉES
   ========================================== */
.text-primary,
i.text-primary,
.fas.text-primary,
.fa.text-primary {
    color: var(--color-primary) !important;
}

.text-secondary {
    color: var(--color-secondary) !important;
}

.text-success {
    color: var(--color-success) !important;
}

.text-info {
    color: var(--color-info) !important;
}

.text-warning {
    color: var(--color-warning) !important;
}

.text-danger {
    color: var(--color-secondary) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

/* ==========================================
   LIENS
   ========================================== */
a {
    color: var(--color-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--color-secondary);
}

.nav-link.active {
    color: var(--color-secondary) !important;
    font-weight: 600;
}

/* ==========================================
   FORMULAIRES
   ========================================== */
.form-control,
.form-select {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--color-primary-rgb), 0.15);
}

.form-check-input:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.form-check-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--color-primary-rgb), 0.15);
}

/* Labels de formulaire */
.form-label {
    color: var(--color-primary);
    font-weight: 600;
}

/* ==========================================
   BACKGROUNDS UTILITAIRES
   ========================================== */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%) !important;
    color: var(--text-white);
}

.bg-gradient-secondary {
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-dark) 100%) !important;
    color: var(--text-white);
}

.bg-gradient-success {
    background: linear-gradient(135deg, var(--color-success) 0%, #43a047 100%) !important;
    color: var(--text-white);
}

/* ==========================================
   OMBRES & EFFETS
   ========================================== */
.shadow-sm {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.shadow {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.shadow-lg {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
}

.shadow-primary {
    box-shadow: 0 5px 15px rgba(var(--color-primary-rgb), 0.3) !important;
}

.shadow-secondary {
    box-shadow: 0 5px 15px rgba(var(--color-secondary-rgb), 0.3) !important;
}

.shadow-success {
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3) !important;
}

/* ==========================================
   PAGINATION
   ========================================== */
.pagination .page-link {
    color: var(--color-primary);
    border-color: #e0e0e0;
}

.pagination .page-link:hover {
    color: var(--color-secondary);
    background-color: var(--bg-overlay-light);
}

.pagination .page-item.active .page-link {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

/* ==========================================
   BREADCRUMBS
   ========================================== */
.breadcrumb-item.active {
    color: var(--color-primary);
}

.breadcrumb-item a {
    color: var(--color-info);
}

.breadcrumb-item a:hover {
    color: var(--color-secondary);
}

/* ==========================================
   PROGRESS BARS
   ========================================== */
.progress {
    background-color: var(--color-light);
    border-radius: 10px;
}

.progress-bar {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
}

.progress-bar.bg-success {
    background: linear-gradient(135deg, var(--color-success) 0%, #43a047 100%);
}

/* ==========================================
   SPINNERS / LOADERS
   ========================================== */
.spinner-border.text-primary {
    color: var(--color-primary) !important;
}

.spinner-border.text-secondary {
    color: var(--color-secondary) !important;
}

/* ==========================================
   TOOLTIPS & POPOVERS
   ========================================== */
.tooltip-inner {
    background-color: var(--color-primary);
}

.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: var(--color-primary);
}

.bs-tooltip-bottom .tooltip-arrow::before {
    border-bottom-color: var(--color-primary);
}

/* ==========================================
   MODAL
   ========================================== */
.modal-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--text-white);
    border-bottom: 3px solid var(--color-secondary);
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .banner-container {
        height: 250px;
    }
    
    .banner-content h1 {
        font-size: 2.2rem;
    }
    
    .banner-content p {
        font-size: 1.1rem;
    }
    
    .instance-badge {
        padding: 0.5rem 1.2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .banner-container {
        height: 200px;
    }
    
    .banner-content h1 {
        font-size: 1.8rem;
    }
    
    .banner-content p {
        font-size: 1rem;
    }
}

/* ==========================================
   ANIMATIONS
   ========================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* Transition douce pour tous les éléments interactifs */
button,
a,
.btn,
.card,
.badge {
    transition: all 0.3s ease;
}
/* 1. BOUTON S'INSCRIRE EN ROUGE */
.btn-success {
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-dark) 100%) !important;
    border-color: var(--color-secondary) !important;
    color: var(--text-white) !important;
    box-shadow: 0 2px 8px rgba(var(--color-secondary-rgb), 0.3) !important;
}

.btn-success:hover,
.btn-success:focus {
    background: linear-gradient(135deg, var(--color-secondary-dark) 0%, #bf2a2e 100%) !important;
    border-color: var(--color-secondary-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(var(--color-secondary-rgb), 0.4) !important;
    color: var(--text-white) !important;
}

/* 2. CADRE INFORMATIONS D'INSCRIPTION - Harmoniser avec le thème */
.inscription-info {
    background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.1) 0%, rgba(var(--color-primary-rgb), 0.05) 100%) !important;
    border: 2px solid var(--color-primary) !important;
    border-left: 5px solid var(--color-primary) !important;
    color: var(--color-primary) !important;
    padding: 15px;
    border-radius: 0.5rem;
    margin-bottom: 20px;
}

.inscription-info i {
    color: var(--color-primary) !important;
}

.inscription-info strong {
    color: var(--color-primary) !important;
}

/* Variante avertissement */
.inscription-warning {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1) 0%, rgba(255, 152, 0, 0.05) 100%) !important;
    border: 2px solid var(--color-warning) !important;
    border-left: 5px solid var(--color-warning) !important;
    color: #e65100 !important;
}

.inscription-warning i,
.inscription-warning strong {
    color: #e65100 !important;
}

/* Variante danger */
.inscription-danger {
    background: linear-gradient(135deg, rgba(var(--color-secondary-rgb), 0.1) 0%, rgba(var(--color-secondary-rgb), 0.05) 100%) !important;
    border: 2px solid var(--color-secondary) !important;
    border-left: 5px solid var(--color-secondary) !important;
    color: #c62828 !important;
}

.inscription-danger i,
.inscription-danger strong {
    color: var(--color-secondary) !important;
}

/* 3. CORRECTION POUR LES NOMS D'EXAMENS - Assurer la visibilité */
.form-check-label {
    color: var(--text-primary) !important;
    font-size: 1rem;
    line-height: 1.5;
    cursor: pointer;
    display: block;
    width: 100%;
}

.form-check-label .fw-bold,
.form-check-label span {
    color: var(--text-primary) !important;
    font-weight: 600 !important;
}

.form-check-label .text-muted,
.form-check-label small {
    color: var(--text-muted) !important;
    font-size: 0.9rem;
}

/* 4. AMÉLIORATION DES OPTIONS D'EXAMEN */
.exam-option {
    position: relative;
    margin-bottom: 12px;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.exam-option:hover {
    background-color: rgba(var(--color-primary-rgb), 0.03);
}

.form-check-input {
    width: 1.2em;
    height: 1.2em;
    margin-top: 0.25em;
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
}

.form-check-input:focus {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 0.25rem rgba(var(--color-primary-rgb), 0.15) !important;
}

/* 5. TITRE DE LA PAGE */
.header-title {
    color: var(--color-primary) !important;
    font-weight: 700;
}

/* 6. SECTION "AUTRES EXAMENS" */
#autres_div {
    border: 2px solid var(--color-primary);
    padding: 20px;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.03) 0%, rgba(var(--color-primary-rgb), 0.01) 100%);
}

/* 7. BOUTON INFO */
.info-btn {
    background: none;
    border: none;
    color: var(--color-primary) !important;
    cursor: pointer;
    padding: 2px;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.info-btn:hover {
    background-color: rgba(var(--color-primary-rgb), 0.1);
    color: var(--color-secondary) !important;
}

/* 8. BOÎTE D'INFORMATION EXAMEN */
.exam-info-box {
    background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.08) 0%, rgba(var(--color-primary-rgb), 0.05) 100%);
    border: 1px solid var(--color-primary);
    border-left: 4px solid var(--color-primary);
    border-radius: 6px;
    padding: 10px 14px;
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-primary) !important;
}

/* 9. TITRES DE SECTIONS */
h5.text-primary {
    color: var(--color-primary) !important;
    font-weight: 600;
    border-bottom: 2px solid var(--color-secondary);
    padding-bottom: 8px;
    margin-bottom: 15px;
}

/* 10. ALERTES INFO PERSONNALISÉES */
.alert-info {
    background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.08) 0%, rgba(var(--color-primary-rgb), 0.05) 100%) !important;
    border: 2px solid var(--color-primary) !important;
    border-left: 5px solid var(--color-primary) !important;
    color: var(--color-primary) !important;
}

.alert-info i {
    color: var(--color-primary) !important;
}

/* 11. SÉLECTEURS DE FORMULAIRE */
select.form-control,
select#categorie,
select#examen {
    border: 2px solid #e0e0e0;
    color: var(--text-primary) !important;
}

select.form-control:focus,
select#categorie:focus,
select#examen:focus {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 0.25rem rgba(var(--color-primary-rgb), 0.15) !important;
}

select.form-control option {
    color: var(--text-primary) !important;
}

/* 12. LABEL "AUTRES EXAMENS" */
label[for="autres"] {
    color: var(--text-primary) !important;
    font-weight: 600 !important;
}

/* 13. ICÔNES DANS LES TITRES */
h5 i.fas,
h5 i.fa {
    color: var(--color-secondary) !important;
    margin-right: 8px;
}

/* 14. RESPONSIVE - Ajustements mobiles */
@media (max-width: 768px) {
    .inscription-info {
        font-size: 0.9rem;
    }
    
    .exam-option {
        padding: 8px;
    }
    
    .form-check-label {
        font-size: 0.95rem;
    }
}
/* Examen éligible - Utiliser le gris avec accent */
.exam-eligible {
    background-color: white !important;
    border: 2px solid var(--color-primary) !important;
    border-left: 5px solid var(--color-primary) !important;
}

.exam-eligible h5,
.exam-eligible p {
    color: var(--text-primary) !important;
}

/* Examen expiré - Utiliser rouge */
.exam-expired {
    background-color: white !important;
    border: 2px solid var(--color-secondary) !important;
    border-left: 5px solid var(--color-secondary) !important;
}

.exam-expired h5,
.exam-expired p {
    color: var(--text-primary) !important;
}

.exam-expired h5 {
    color: var(--color-secondary) !important;
}

/* Rattrapage disponible - Utiliser gris avec accent secondaire */
.exam-catchup-available {
    background-color: #fff9e6 !important;
    border: 2px solid var(--color-primary) !important;
    border-left: 5px solid var(--color-secondary) !important;
}

.exam-catchup-available h5,
.exam-catchup-available p {
    color: var(--text-primary) !important;
}

.exam-catchup-available h5 {
    color: var(--color-primary) !important;
}

.exam-catchup-available .text-warning {
    color: var(--color-primary) !important;
}

/* Rattrapage en attente - Gris neutre */
.exam-catchup-pending {
    background-color: #f5f5f5 !important;
    border: 2px solid var(--color-info) !important;
    border-left: 5px solid var(--color-info) !important;
}

.exam-catchup-pending h5,
.exam-catchup-pending p {
    color: var(--text-primary) !important;
}

.exam-catchup-pending h5 {
    color: var(--color-info) !important;
}

.exam-catchup-pending .text-secondary {
    color: var(--color-info) !important;
}

/* Rattrapage accepté - Gris avec accent */
.exam-catchup-accepted {
    background-color: #e8f4f8 !important;
    border: 2px solid var(--color-primary) !important;
    border-left: 5px solid var(--color-primary) !important;
}

.exam-catchup-accepted h5,
.exam-catchup-accepted p {
    color: var(--text-primary) !important;
}

.exam-catchup-accepted h5 {
    color: var(--color-primary) !important;
}

.exam-catchup-accepted .text-info {
    color: var(--color-primary) !important;
}

/* 2. FORMULAIRE DE RATTRAPAGE */
.catchup-form {
    display: none;
    margin-top: 15px;
    padding: 15px;
    border: 2px solid var(--color-primary) !important;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.03) 0%, rgba(var(--color-primary-rgb), 0.01) 100%) !important;
}

/* 3. BADGES DE STATUT */
.badge-success {
    background-color: var(--color-primary) !important;
    color: white !important;
}

.badge-warning {
    background-color: var(--color-secondary) !important;
    color: white !important;
}

.badge-secondary {
    background-color: var(--color-info) !important;
    color: white !important;
}

.badge-danger {
    background-color: var(--color-secondary) !important;
    color: white !important;
}

.badge-info {
    background-color: var(--color-primary) !important;
    color: white !important;
}

/* 4. TEXTES COLORÉS - Harmonisation */
.text-warning {
    color: var(--color-primary) !important;
}

.text-success {
    color: var(--color-primary) !important;
}

.text-secondary {
    color: var(--color-info) !important;
}

.text-info {
    color: var(--color-primary) !important;
}

.text-danger {
    color: var(--color-secondary) !important;
}

/* Forcer la couleur du texte dans les cartes */
.exam-card p,
.exam-card span,
.exam-card div {
    color: var(--text-primary) !important;
}

.exam-card small.text-muted {
    color: #757575 !important;
}

/* 5. COUNTDOWN ET JOURS RESTANTS */
.countdown {
    font-weight: bold;
    color: var(--color-secondary) !important;
}

.days-left {
    font-weight: bold;
    color: var(--color-primary) !important;
}

.days-warning {
    color: var(--color-secondary) !important;
    font-weight: 600;
}

.days-danger {
    color: var(--color-secondary) !important;
    font-weight: 700;
}

/* 6. ALERTES - Réharmonisation complète */
.alert-warning {
    background-color: #fff9e6 !important;
    border: 2px solid var(--color-primary) !important;
    border-left: 5px solid var(--color-secondary) !important;
    color: var(--text-primary) !important;
}

.alert-warning i,
.alert-warning strong {
    color: var(--color-secondary) !important;
}

.alert-info {
    background-color: #f0f4f8 !important;
    border: 2px solid var(--color-primary) !important;
    border-left: 5px solid var(--color-primary) !important;
    color: var(--text-primary) !important;
}

.alert-info i,
.alert-info strong {
    color: var(--color-primary) !important;
}

.alert-success {
    background-color: #f0f8f4 !important;
    border: 2px solid var(--color-primary) !important;
    border-left: 5px solid var(--color-primary) !important;
    color: var(--text-primary) !important;
}

.alert-success i,
.alert-success strong {
    color: var(--color-primary) !important;
}

.alert-danger {
    background-color: #fef0f0 !important;
    border: 2px solid var(--color-secondary) !important;
    border-left: 5px solid var(--color-secondary) !important;
    color: var(--text-primary) !important;
}

.alert-danger i,
.alert-danger strong {
    color: var(--color-secondary) !important;
}

/* 7. BOUTONS SPÉCIFIQUES À RESERVER.PHP */
.btn-warning {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%) !important;
    border-color: var(--color-primary) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(var(--color-primary-rgb), 0.3) !important;
}

.btn-warning:hover,
.btn-warning:focus {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, #1a2229 100%) !important;
    border-color: var(--color-primary-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(var(--color-primary-rgb), 0.4) !important;
    color: white !important;
}

/* Bouton pour demander une session - Utiliser le rouge secondaire */
button[onclick*="afficherDemandeSession"] {
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-dark) 100%) !important;
    border-color: var(--color-secondary) !important;
    color: white !important;
}

button[onclick*="afficherDemandeSession"]:hover {
    background: linear-gradient(135deg, var(--color-secondary-dark) 0%, #bf2a2e 100%) !important;
    border-color: var(--color-secondary-dark) !important;
}

/* 8. SECTIONS SPÉCIALES */
#section-demande-session {
    border: 2px solid var(--color-secondary) !important;
    background: linear-gradient(135deg, rgba(var(--color-secondary-rgb), 0.05) 0%, rgba(var(--color-secondary-rgb), 0.02) 100%) !important;
    border-left: 5px solid var(--color-secondary) !important;
}

/* 9. ICÔNES DANS LES TITRES */
.exam-card h5 i {
    color: var(--color-secondary) !important;
    margin-right: 10px;
}

/* 10. BORDURES DES EXAMENS */
.exam-card .border {
    border: 2px solid #e3e6f0 !important;
    transition: all 0.3s ease;
}

.exam-card .border:hover {
    border-color: var(--color-primary) !important;
    box-shadow: 0 2px 8px rgba(var(--color-primary-rgb), 0.15);
}

/* 11. BACKGROUNDS POUR LES EXAMENS */
.bg-light {
    background-color: #f8f9fc !important;
}

.bg-white {
    background-color: white !important;
}

/* 12. BOUTONS DANS LES CARTES D'EXAMENS */
.exam-card .btn-sm {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    font-weight: 600;
}

/* 13. ALERTES DANS LES FORMULAIRES */
.catchup-form .alert-info {
    margin-bottom: 15px;
    font-size: 0.9rem;
}

/* 14. FORMULAIRE DE RÉSERVATION */
#reservationForm .form-control:focus,
#demandeSessionForm .form-control:focus {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 0.25rem rgba(var(--color-primary-rgb), 0.15) !important;
}

/* 15. MESSAGES D'AVERTISSEMENT DE SCORE */
#score_warning {
    margin-top: 15px;
}

#score_warning .alert-warning h6 {
    color: var(--color-secondary) !important;
    font-weight: 700;
}

#score_warning .alert-warning {
    background-color: #fef0f0 !important;
    border-color: var(--color-secondary) !important;
}

/* 16. SECTION DEBUG (si activée) */
.alert-info ul {
    margin-bottom: 0;
}

.alert-info h6 {
    color: var(--color-primary) !important;
    font-weight: 700;
    margin-top: 10px;
}

/* 17. BOUTONS DÉSACTIVÉS */
.btn:disabled,
.btn.disabled {
    background: linear-gradient(135deg, #9e9e9e 0%, #757575 100%) !important;
    border-color: #9e9e9e !important;
    cursor: not-allowed;
    opacity: 0.7;
    color: white !important;
}

/* 18. LIENS DANS LES ALERTES */
.alert a {
    color: inherit;
    text-decoration: underline;
    font-weight: 600;
}

.alert a:hover {
    opacity: 0.8;
}

/* 19. FORMULAIRE RADIO BUTTONS */
.form-check-input:checked {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
}

.form-check-label {
    color: var(--text-primary) !important;
    cursor: pointer;
}

/* 20. ANIMATIONS SMOOTH */
.exam-card,
.catchup-form,
#section-demande-session {
    transition: all 0.3s ease;
}

/* 21. RESPONSIVE - Ajustements */
@media (max-width: 768px) {
    .exam-card {
        padding: 15px;
    }
    
    .exam-card h5 {
        font-size: 1.1rem;
    }
    
    .btn-sm {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .badge {
        font-size: 0.75rem;
    }
}

/* 22. BORDURES CONDITIONNELLES POUR LES EXAMENS */
.border-success {
    border-color: var(--color-success) !important;
}

.border-warning {
    border-color: var(--color-warning) !important;
}

.border-danger {
    border-color: var(--color-secondary) !important;
}

/* 23. TITRE DE LA PAGE */
.header-title {
    color: var(--color-primary) !important;
    font-weight: 700;
    text-shadow: none;
}

/* 24. ÉTATS DE HOVER POUR LES BOUTONS */
.btn-lg:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

/* 25. CORRECTION POUR LES BADGES DANS LES TITRES D'EXAMENS */
h6 .badge {
    vertical-align: middle;
    font-size: 0.75em;
}
/* 1. EN-TÊTE DE LA CARTE - Remplacer vert par gris primaire */
.card-header.bg-success {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%) !important;
    color: white !important;
    border-bottom: 3px solid var(--color-secondary) !important;
}

/* 2. BOUTON DE VÉRIFICATION - Remplacer vert par rouge */
.btn-success {
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-dark) 100%) !important;
    border-color: var(--color-secondary) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(var(--color-secondary-rgb), 0.3) !important;
}

.btn-success:hover,
.btn-success:focus {
    background: linear-gradient(135deg, var(--color-secondary-dark) 0%, #bf2a2e 100%) !important;
    border-color: var(--color-secondary-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(var(--color-secondary-rgb), 0.4) !important;
    color: white !important;
}

/* 3. ALERTE SUCCÈS - Harmoniser avec le thème */
.alert-success {
    background-color: #f0f8f4 !important;
    border: 2px solid var(--color-primary) !important;
    border-left: 5px solid var(--color-primary) !important;
    color: var(--text-primary) !important;
}

.alert-success i,
.alert-success strong {
    color: var(--color-primary) !important;
}

/* 4. ICÔNE PRINCIPALE - Remplacer bleu par gris primaire */
.text-primary,
.fa-paper-plane.text-primary {
    color: var(--color-primary) !important;
}

/* 5. BORDURE DU CHAMP DE CODE QUAND VALIDE */
/* Mettre à jour le style inline ajouté par JavaScript */
.code-input[style*="background-color: rgb(212, 237, 218)"] {
    background-color: #f0f8f4 !important;
    border-color: var(--color-primary) !important;
}

.code-input:valid {
    border-color: var(--color-primary) !important;
    background-color: #f0f8f4 !important;
}

/* 6. BOUTON RENVOYER LE CODE */
.btn-outline-primary {
    color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: white !important;
}

/* 7. EMAIL DISPLAY */
.email-display {
    background-color: #f8f9fa !important;
    border: 2px solid var(--color-primary) !important;
    color: var(--text-primary) !important;
    font-weight: bold;
}

/* 8. CHAMP DE SAISIE DU CODE */
.code-input {
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.code-input:focus {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 0.25rem rgba(var(--color-primary-rgb), 0.15) !important;
    outline: none;
}

/* 9. ICÔNES DANS LA PAGE */
.fa-paper-plane,
.fa-check,
.fa-redo {
    transition: all 0.3s ease;
}

.btn:hover .fa-check,
.btn:hover .fa-redo {
    transform: scale(1.1);
}

/* 10. CARTE DE VÉRIFICATION */
.verification-card {
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

/* 11. TEXTE MUTED */
.text-muted {
    color: #757575 !important;
}

/* 12. LIGNE HORIZONTALE */
hr {
    border-top: 2px solid #e0e0e0;
    margin: 20px 0;
}

/* 13. RESPONSIVE */
@media (max-width: 576px) {
    .code-input {
        font-size: 1.5rem;
        letter-spacing: 0.3rem;
    }
    
    .verification-card {
        margin: 10px;
    }
}
/* Titre principal de la page de login */
.text-center.font-weight-bolder {
    color: var(--color-primary) !important;
}

/* Sous-titre / Instructions de connexion */
.h6.text-gray-900 {
    color: var(--text-primary) !important;
}

/* Tous les textes dans la zone de login */
.card-body h1,
.card-body h2,
.card-body h3,
.card-body h4,
.card-body h5,
.card-body h6 {
    color: var(--color-primary) !important;
}

.card-body p {
    color: var(--text-primary) !important;
}

/* Labels des formulaires */
.form-label,
label {
    color: var(--text-primary) !important;
}

/* Texte du checkbox "Se souvenir de moi" */
.custom-control-label {
    color: var(--text-primary) !important;
}

/* Liens (mot de passe oublié, etc.) */
.card-body a,
.text-left a {
    color: var(--color-primary) !important;
}

.card-body a:hover,
.text-left a:hover {
    color: var(--color-secondary) !important;
}