/* Thème clair — configuration d'origine (avant mode sombre) */

html[data-theme="light"] {
    background-color: #f8f9fa;
}

html[data-theme="light"] body {
    background-color: #f8f9fa !important;
    color: #212529 !important;
}

/* Navbar & footer — comme avant */
html[data-theme="light"] .navbar {
    background-color: #2c3e50 !important;
}

html[data-theme="light"] .navbar-brand,
html[data-theme="light"] .navbar .nav-link {
    color: #ffffff !important;
}

html[data-theme="light"] .nav-link:hover {
    color: #3498db !important;
}

html[data-theme="light"] .footer {
    background-color: #2c3e50 !important;
}

html[data-theme="light"] .footer .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Dashboard */
html[data-theme="light"] .dashboard-card {
    background: #ffffff !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

html[data-theme="light"] .dashboard-stats {
    color: #2c3e50 !important;
}

/* Modales */
html[data-theme="light"] .modal-header {
    background-color: #f8f9fa !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: #212529 !important;
}

html[data-theme="light"] .modal-footer {
    background-color: #f8f9fa !important;
    border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: #212529 !important;
}

html[data-theme="light"] .modal-content {
    background-color: #ffffff !important;
    color: #212529 !important;
}

/* Formulaires */
html[data-theme="light"] .form-control,
html[data-theme="light"] .form-select {
    background-color: #ffffff !important;
    color: #212529 !important;
    border-color: #ced4da !important;
}

html[data-theme="light"] .form-control:focus,
html[data-theme="light"] .form-select:focus {
    background-color: #ffffff !important;
    color: #212529 !important;
    border-color: #86b7fe !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

html[data-theme="light"] .form-control:disabled,
html[data-theme="light"] .form-control[readonly],
html[data-theme="light"] .form-select:disabled {
    background-color: #e9ecef !important;
    color: #6c757d !important;
    border-color: #ced4da !important;
}

/* Profil */
html[data-theme="light"] .profile-avatar-sm {
    background-color: #f8f9fa !important;
    border-color: #3498db !important;
}

html[data-theme="light"] .profile-preview {
    color: #666666 !important;
}

html[data-theme="light"] .profile-preview i {
    color: #3498db !important;
}

/* Badges Bootstrap d'origine */
html[data-theme="light"] .badge {
    font-weight: normal;
    border: none !important;
    box-shadow: none !important;
}

html[data-theme="light"] .badge-success {
    background-color: #28a745 !important;
    color: #ffffff !important;
}

html[data-theme="light"] .badge-danger {
    background-color: #dc3545 !important;
    color: #ffffff !important;
}

html[data-theme="light"] .badge-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
    font-weight: bold;
}

html[data-theme="light"] .badge-info {
    background-color: #17a2b8 !important;
    color: #ffffff !important;
}

html[data-theme="light"] .badge-primary {
    background-color: #0d6efd !important;
    color: #ffffff !important;
}

html[data-theme="light"] .badge.bg-light {
    background-color: #f8f9fa !important;
    color: #212529 !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

/* Tableaux — lignes discrètes (pas de grille marquée) */
html[data-theme="light"] .table {
    color: inherit !important;
    border: none !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
}

html[data-theme="light"] .table > :not(caption) > * > * {
    color: inherit !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    box-shadow: none !important;
}

html[data-theme="light"] .table thead th,
html[data-theme="light"] .table th {
    background-color: transparent !important;
    color: inherit !important;
    border: none !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
    font-weight: 600;
}

html[data-theme="light"] .table td {
    border: none !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
}

html[data-theme="light"] .table tbody tr:last-child > * {
    border-bottom: none !important;
}

html[data-theme="light"] .table-bordered {
    border: none !important;
}

html[data-theme="light"] .table-bordered > :not(caption) > * > * {
    border: none !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
}

html[data-theme="light"] .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(0, 0, 0, 0.02) !important;
}

html[data-theme="light"] .table-striped > tbody > tr:nth-of-type(even) > * {
    background-color: transparent !important;
}

html[data-theme="light"] .table-hover > tbody > tr:hover > * {
    background-color: rgba(0, 0, 0, 0.04) !important;
    box-shadow: none !important;
}

html[data-theme="light"] .table-responsive {
    border: none !important;
    border-radius: 0 !important;
}

/* Bordures générales plus douces */
html[data-theme="light"] .border,
html[data-theme="light"] .border-top,
html[data-theme="light"] .border-bottom,
html[data-theme="light"] .border-start,
html[data-theme="light"] .border-end {
    border-color: rgba(0, 0, 0, 0.08) !important;
}

html[data-theme="light"] hr {
    border-color: rgba(0, 0, 0, 0.08) !important;
    opacity: 1;
}

html[data-theme="light"] .card {
    border-color: rgba(0, 0, 0, 0.06) !important;
}

/* Onglets messagerie — style d'origine (pas les onglets dashboard colorés) */
html[data-theme="light"] .nav-tabs .nav-link:not([class*="bg-"]) {
    color: #495057 !important;
    background-color: #f8f9fa !important;
    opacity: 1 !important;
    font-weight: 600;
}

html[data-theme="light"] .nav-tabs .nav-link:not([class*="bg-"]).active {
    color: #495057 !important;
    background-color: #ffffff !important;
    border-bottom: 2px solid #0d6efd !important;
}

html[data-theme="light"] .nav-tabs .nav-link:not([class*="bg-"]) i {
    color: #495057 !important;
}

/* Champs fichier */
html[data-theme="light"] .file-input-indicator {
    color: #3498db !important;
}

html[data-theme="light"] .file-input-filename {
    color: #6c757d !important;
}

html[data-theme="light"] .file-input-custom {
    background-color: #f8f9fa !important;
    color: #212529 !important;
    border: 2px dashed #3498db !important;
}

html[data-theme="light"] .image-preview-container {
    background-color: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

/* Cartes & utilitaires */
html[data-theme="light"] .card {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

html[data-theme="light"] .bg-light {
    background-color: #f8f9fa !important;
    color: #212529 !important;
}

html[data-theme="light"] .bg-white {
    background-color: #ffffff !important;
    color: #212529 !important;
}

html[data-theme="light"] .text-muted {
    color: #6c757d !important;
}

html[data-theme="light"] .btn-close {
    filter: none !important;
}

html[data-theme="light"] .accordion-button::after {
    filter: none !important;
}

html[data-theme="light"] .error-page {
    background: #f8f9fa !important;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1) !important;
}

html[data-theme="light"] .notes-list-item {
    background-color: #f8f9fa !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    border-left: 3px solid #0d6efd !important;
    color: #212529 !important;
}

html[data-theme="light"] .list-absents-container {
    background: #f8f9fa !important;
}

html[data-theme="light"] .search-controls,
html[data-theme="light"] .table-responsive-custom {
    background: #f8f9fa !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    color: #212529 !important;
}

html[data-theme="light"] .theme-toggle-btn:hover,
html[data-theme="light"] .theme-toggle-btn:focus {
    color: #3498db !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Alertes Bootstrap standard */
html[data-theme="light"] .alert-info {
    background-color: #cff4fc !important;
    color: #055160 !important;
    border-color: #b6effb !important;
}

html[data-theme="light"] .alert-warning {
    background-color: #fff3cd !important;
    color: #664d03 !important;
    border-color: #ffecb5 !important;
}

html[data-theme="light"] .alert-danger {
    background-color: #f8d7da !important;
    color: #842029 !important;
    border-color: #f5c2c7 !important;
}

html[data-theme="light"] .alert-success {
    background-color: #d1e7dd !important;
    color: #0f5132 !important;
    border-color: #badbcc !important;
}

/* FullCalendar & Quill — fond clair simple */
html[data-theme="light"] .fc-daygrid-day {
    background-color: #ffffff;
}

html[data-theme="light"] .ql-toolbar.ql-snow {
    background-color: #f8f9fa !important;
}

html[data-theme="light"] .ql-container.ql-snow,
html[data-theme="light"] .ql-editor {
    background-color: #ffffff !important;
    color: #212529 !important;
}

html[data-theme="light"] .procedure-editor {
    background: #ffffff !important;
}
