/* ============================================
   STYLE-MODE-NUIT.CSS - MODE NUIT
   ============================================ */

/* ========== VARIABLES GLOBALES ========== */
[data-bs-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --border-color: #404040;
    --card-bg: #2d2d2d;
    --input-bg: #333333;
    --hover-bg: #3d3d3d;
    --shadow-color: rgba(0,0,0,0.5);
    --critical: #ef4444;
    --danger: #f97316;
    --warning: #fbbf24;
    --info: #3b82f6;
    --success: #10b981;
}

/* ========== GLOBAL ========== */
[data-bs-theme="dark"] body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

[data-bs-theme="dark"] h1, [data-bs-theme="dark"] h2, 
[data-bs-theme="dark"] h3, [data-bs-theme="dark"] h4,
[data-bs-theme="dark"] h5, [data-bs-theme="dark"] h6 {
    color: var(--text-primary);
}

[data-bs-theme="dark"] .text-muted,
[data-bs-theme="dark"] .text-secondary,
[data-bs-theme="dark"] small {
    color: var(--text-secondary) !important;
}

[data-bs-theme="dark"] .container,
[data-bs-theme="dark"] .container-fluid,
[data-bs-theme="dark"] .row,
[data-bs-theme="dark"] .col,
[data-bs-theme="dark"] [class*="col-"] {
    background-color: transparent !important;
}

[data-bs-theme="dark"] * {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* ========== CARTES COMMUNES ========== */
[data-bs-theme="dark"] .photo-card,
[data-bs-theme="dark"] .video-card,
[data-bs-theme="dark"] .admin-card,
[data-bs-theme="dark"] .upload-card,
[data-bs-theme="dark"] .stat-card,
[data-bs-theme="dark"] .dashboard-card,
[data-bs-theme="dark"] .module-card,
[data-bs-theme="dark"] .config-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
}

[data-bs-theme="dark"] .photo-card:hover,
[data-bs-theme="dark"] .video-card:hover,
[data-bs-theme="dark"] .admin-card:hover,
[data-bs-theme="dark"] .dashboard-card:hover,
[data-bs-theme="dark"] .module-card:hover,
[data-bs-theme="dark"] .config-card:hover {
    border-color: #8b5cf6;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

/* ========== STATS CARDS ========== */
[data-bs-theme="dark"] .stats-grid {
    margin-bottom: 2rem;
}

[data-bs-theme="dark"] .stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 16px;
}

[data-bs-theme="dark"] .stat-card h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

[data-bs-theme="dark"] .stat-card p {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin: 0;
}

[data-bs-theme="dark"] .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--bg-secondary);
    color: #8b5cf6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* ========== FORMULAIRES ========== */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] .input-with-icon input,
[data-bs-theme="dark"] .input-with-icon textarea {
    background-color: var(--input-bg);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    background-color: var(--input-bg);
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139,92,246,0.2);
}

[data-bs-theme="dark"] .form-label,
[data-bs-theme="dark"] label {
    color: var(--text-primary);
}

[data-bs-theme="dark"] .input-with-icon i {
    color: var(--text-secondary);
}

/* ========== BOUTONS ========== */
[data-bs-theme="dark"] .btn-primary,
[data-bs-theme="dark"] .btn-modal-primary,
[data-bs-theme="dark"] .btn-primary-modern {
    background: #8b5cf6 !important;
    border-color: #8b5cf6 !important;
    color: white !important;
}

[data-bs-theme="dark"] .btn-primary:hover,
[data-bs-theme="dark"] .btn-modal-primary:hover,
[data-bs-theme="dark"] .btn-primary-modern:hover {
    background: #7c3aed !important;
    border-color: #7c3aed !important;
}

[data-bs-theme="dark"] .btn-outline-primary,
[data-bs-theme="dark"] .btn-outline-modern {
    background: transparent !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-secondary) !important;
}

[data-bs-theme="dark"] .btn-outline-primary:hover,
[data-bs-theme="dark"] .btn-outline-modern:hover {
    background: #8b5cf6 !important;
    border-color: #8b5cf6 !important;
    color: white !important;
}

[data-bs-theme="dark"] .btn-modal-secondary {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-bs-theme="dark"] .btn-modal-secondary:hover {
    background-color: var(--hover-bg);
    border-color: #8b5cf6;
}

/* ========== BADGES ========== */
[data-bs-theme="dark"] .badge.bg-primary {
    background-color: #8b5cf6 !important;
}

[data-bs-theme="dark"] .badge.bg-success {
    background-color: #10b981 !important;
}

[data-bs-theme="dark"] .badge.bg-warning {
    background-color: #f59e0b !important;
    color: #1a1a1a;
}

[data-bs-theme="dark"] .badge.bg-secondary {
    background-color: var(--text-secondary) !important;
    color: var(--bg-primary);
}

[data-bs-theme="dark"] .badge.bg-light {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
}

[data-bs-theme="dark"] .badge.bg-info {
    background-color: #0dcaf0 !important;
    color: #000 !important;
}

[data-bs-theme="dark"] .badge.bg-primary.bg-opacity-10 {
    background: rgba(139, 92, 246, 0.2) !important;
    color: #a78bfa !important;
}

[data-bs-theme="dark"] .badge.bg-success.bg-opacity-10 {
    background: rgba(16, 185, 129, 0.2) !important;
    color: #34d399 !important;
}

[data-bs-theme="dark"] .badge.bg-warning.bg-opacity-10 {
    background: rgba(245, 158, 11, 0.2) !important;
    color: #fbbf24 !important;
}

[data-bs-theme="dark"] .badge.bg-danger.bg-opacity-10 {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #f87171 !important;
}

/* ========== THUMBNAILS & IMAGES ========== */
[data-bs-theme="dark"] .thumbnail-wrapper {
    background-color: var(--input-bg);
    border-color: var(--border-color);
}

[data-bs-theme="dark"] .hero-section {
    background-color: var(--card-bg) !important;
}

[data-bs-theme="dark"] .hero-section h1,
[data-bs-theme="dark"] .hero-section p {
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .hero-overlay {
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), rgba(0,0,0,0.5)) !important;
}

/* ========== DROP ZONE ========== */
[data-bs-theme="dark"] .drop-zone {
    background-color: var(--bg-secondary);
    border: 2px dashed var(--border-color);
    color: var(--text-secondary);
}

[data-bs-theme="dark"] .drop-zone:hover {
    background-color: var(--hover-bg);
    border-color: #8b5cf6;
}

/* ========== TAGS ========== */
[data-bs-theme="dark"] .add-tag {
    color: var(--text-secondary);
    border-color: var(--border-color);
}

[data-bs-theme="dark"] .add-tag:hover {
    background-color: var(--hover-bg);
    border-color: #8b5cf6;
    color: var(--text-primary);
}

[data-bs-theme="dark"] .tags-list .input-with-icon input {
    background-color: var(--input-bg);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* ========== STATUS ========== */
[data-bs-theme="dark"] .photo-status,
[data-bs-theme="dark"] .video-status {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-bs-theme="dark"] .photo-status .small {
    color: var(--text-primary);
}

/* ========== MODALS ========== */
[data-bs-theme="dark"] .modal-content,
[data-bs-theme="dark"] .custom-modal-content,
[data-bs-theme="dark"] .modal-thumbnail-content,
[data-bs-theme="dark"] .confirm-modal-content,
[data-bs-theme="dark"] .upload-modal-content {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
}

[data-bs-theme="dark"] .modal-header,
[data-bs-theme="dark"] .modal-footer,
[data-bs-theme="dark"] .custom-modal-header,
[data-bs-theme="dark"] .custom-modal-footer,
[data-bs-theme="dark"] .modal-thumbnail-header {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-bs-theme="dark"] .modal-title,
[data-bs-theme="dark"] .modal-header h5,
[data-bs-theme="dark"] .custom-modal-header h5 {
    color: var(--text-primary);
}

[data-bs-theme="dark"] .modal-body,
[data-bs-theme="dark"] .custom-modal-body,
[data-bs-theme="dark"] .modal-thumbnail-body {
    background-color: var(--card-bg);
    color: var(--text-primary);
}

/* ========== NOTIFICATIONS ========== */
[data-bs-theme="dark"] .notification {
    background-color: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

[data-bs-theme="dark"] .notification-title {
    color: var(--text-primary);
}

[data-bs-theme="dark"] .notification-message {
    color: var(--text-secondary);
}

/* ========== UPLOAD ========== */
[data-bs-theme="dark"] .upload-card {
    background-color: var(--card-bg);
    border-color: var(--border-color);
}

[data-bs-theme="dark"] .upload-header {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

[data-bs-theme="dark"] .upload-header h5 {
    color: var(--text-primary);
}

[data-bs-theme="dark"] .file-info {
    background-color: var(--input-bg);
    border-color: var(--border-color);
}

[data-bs-theme="dark"] .file-name {
    color: var(--text-primary);
}

[data-bs-theme="dark"] .file-size {
    color: var(--text-secondary);
}

/* ========== LIGHTBOX ========== */
[data-bs-theme="dark"] .lightbox,
[data-bs-theme="dark"] .cinema-overlay {
    background: rgba(0,0,0,0.98) !important;
}

/* ========== STICKY BOTTOM ========== */
[data-bs-theme="dark"] .sticky-bottom {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3) !important;
}

/* ========== ALERTES ========== */
[data-bs-theme="dark"] .alert {
    background-color: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .alert-info {
    background-color: rgba(13,202,240,0.2) !important;
    border-color: #0dcaf0 !important;
    color: #0dcaf0 !important;
}

[data-bs-theme="dark"] .alert-success {
    background-color: rgba(16,185,129,0.2) !important;
    border-color: #10b981 !important;
    color: #10b981 !important;
}

[data-bs-theme="dark"] .alert-warning {
    background-color: rgba(245,158,11,0.2) !important;
    border-color: #f59e0b !important;
    color: #f59e0b !important;
}

[data-bs-theme="dark"] .alert-danger {
    background-color: rgba(239,68,68,0.2) !important;
    border-color: #ef4444 !important;
    color: #ef4444 !important;
}

/* ========== PROGRESS BAR ========== */
[data-bs-theme="dark"] .progress {
    background-color: var(--bg-secondary) !important;
}

[data-bs-theme="dark"] .progress-bar {
    background-color: #8b5cf6 !important;
}

/* ========== TOOLTIPS ========== */
[data-bs-theme="dark"] .tooltip .tooltip-inner {
    background-color: var(--card-bg) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
}

/* ========== CONTENEURS ========== */
[data-bs-theme="dark"] .content-wrapper,
[data-bs-theme="dark"] .dashboard-container,
[data-bs-theme="dark"] .audit-container,
[data-bs-theme="dark"] .sante-container,
[data-bs-theme="dark"] .logs-container,
[data-bs-theme="dark"] .studio-container {
    background-color: var(--bg-primary) !important;
}

[data-bs-theme="dark"] main,
[data-bs-theme="dark"] section,
[data-bs-theme="dark"] header {
    background-color: var(--bg-primary) !important;
}

/* ========== FORCER LES FONDS BLANCS ========== */
[data-bs-theme="dark"] [style*="background-color: white"],
[data-bs-theme="dark"] [style*="background: white"],
[data-bs-theme="dark"] [style*="background:#fff"],
[data-bs-theme="dark"] [style*="background-color: #fff"] {
    background-color: var(--card-bg) !important;
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .bg-white {
    background-color: var(--card-bg) !important;
}

[data-bs-theme="dark"] .bg-light {
    background-color: var(--bg-secondary) !important;
}

/* ========== ADMIN-VISUEL.PHP ========== */
[data-bs-theme="dark"] .category-header {
    border-bottom-color: var(--border-color) !important;
}

[data-bs-theme="dark"] .category-icon {
    background: #8b5cf6 !important;
    box-shadow: 0 4px 12px rgba(139,92,246,0.3) !important;
}

[data-bs-theme="dark"] .pages-grid {
    background-color: transparent;
}

[data-bs-theme="dark"] .page-card h3,
[data-bs-theme="dark"] .page-card p {
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .page-card .text-muted {
    color: var(--text-secondary) !important;
}

[data-bs-theme="dark"] .page-icon {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .field-row {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
}

[data-bs-theme="dark"] .style-controls {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
}

[data-bs-theme="dark"] .style-toggle-btn {
    background: var(--bg-secondary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-secondary) !important;
}

[data-bs-theme="dark"] .style-toggle-btn:hover {
    background: var(--hover-bg) !important;
    border-color: #8b5cf6 !important;
    color: #8b5cf6 !important;
}

[data-bs-theme="dark"] .nav-tabs {
    border-bottom-color: var(--border-color) !important;
}

[data-bs-theme="dark"] .nav-tabs .nav-link {
    color: var(--text-secondary) !important;
}

[data-bs-theme="dark"] .nav-tabs .nav-link:hover {
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
    background: var(--bg-secondary) !important;
}

[data-bs-theme="dark"] .nav-tabs .nav-link.active {
    color: #8b5cf6 !important;
    background: var(--card-bg) !important;
    border-color: var(--border-color) var(--border-color) var(--card-bg) !important;
}

[data-bs-theme="dark"] .tab-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-top: none;
}

[data-bs-theme="dark"] .image-upload-area {
    background-color: var(--bg-secondary) !important;
    border: 2px dashed var(--border-color) !important;
}

[data-bs-theme="dark"] .image-upload-area:hover {
    border-color: #8b5cf6 !important;
    background-color: var(--hover-bg) !important;
}

[data-bs-theme="dark"] .image-preview {
    background-color: var(--input-bg) !important;
    border: 1px solid var(--border-color) !important;
}

/* ========== ADMIN-LOGS.PHP ========== */
[data-bs-theme="dark"] .logs-table {
    background-color: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
}

[data-bs-theme="dark"] .logs-table th {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .logs-table td {
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

[data-bs-theme="dark"] .logs-table tr:hover td {
    background-color: var(--hover-bg) !important;
}

[data-bs-theme="dark"] .log-user {
    color: #8b5cf6 !important;
}

[data-bs-theme="dark"] .log-ip {
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .log-location,
[data-bs-theme="dark"] .log-date,
[data-bs-theme="dark"] .log-browser {
    color: var(--text-secondary) !important;
}

/* ========== ADMIN-MEDIA-AUDIT.PHP ========== */
[data-bs-theme="dark"] .audit-files {
    background-color: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
}

[data-bs-theme="dark"] .audit-table th {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .audit-table td {
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

[data-bs-theme="dark"] .file-name {
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .file-path,
[data-bs-theme="dark"] .file-size {
    color: var(--text-secondary) !important;
}

[data-bs-theme="dark"] .status-used {
    background-color: rgba(16,185,129,0.2) !important;
    color: #10b981 !important;
}

[data-bs-theme="dark"] .status-unused {
    background-color: rgba(239,68,68,0.2) !important;
    color: #ef4444 !important;
}

[data-bs-theme="dark"] .file-icon.image {
    background-color: rgba(139,92,246,0.2) !important;
    color: #8b5cf6 !important;
}

[data-bs-theme="dark"] .file-icon.video {
    background-color: rgba(16,185,129,0.2) !important;
    color: #10b981 !important;
}

/* ========== ADMIN-SANTE-API.PHP ========== */
[data-bs-theme="dark"] .health-header {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%) !important;
    border-bottom: 3px solid #8b5cf6 !important;
}

[data-bs-theme="dark"] .alert-card.critical {
    border-left: 4px solid var(--critical) !important;
}

[data-bs-theme="dark"] .alert-card.danger {
    border-left: 4px solid var(--danger) !important;
}

[data-bs-theme="dark"] .alert-card.warning {
    border-left: 4px solid var(--warning) !important;
}

[data-bs-theme="dark"] .alert-card.healthy {
    border-left: 4px solid var(--success) !important;
}

[data-bs-theme="dark"] .count-critical {
    color: var(--critical) !important;
}

[data-bs-theme="dark"] .count-danger {
    color: var(--danger) !important;
}

[data-bs-theme="dark"] .count-warning {
    color: var(--warning) !important;
}

[data-bs-theme="dark"] .count-safe {
    color: var(--success) !important;
}

[data-bs-theme="dark"] .file-item {
    background: var(--bg-secondary) !important;
    border-color: var(--border-color) !important;
}

[data-bs-theme="dark"] .file-item:hover {
    border-color: #8b5cf6 !important;
}

[data-bs-theme="dark"] .issue-critical {
    background: rgba(239,68,68,0.2) !important;
    color: var(--critical) !important;
}

[data-bs-theme="dark"] .issue-danger {
    background: rgba(249,115,22,0.2) !important;
    color: var(--danger) !important;
}

[data-bs-theme="dark"] .issue-warning {
    background: rgba(251,191,36,0.2) !important;
    color: var(--warning) !important;
}

[data-bs-theme="dark"] .issue-info {
    background: rgba(59,130,246,0.2) !important;
    color: var(--info) !important;
}

[data-bs-theme="dark"] .issue-success {
    background: rgba(16,185,129,0.2) !important;
    color: var(--success) !important;
}

[data-bs-theme="dark"] .issue-line {
    background: #1a1a1a !important;
    color: #e2e8f0 !important;
}

/* ========== GALERIE-VIDEO.PHP ========== */
[data-bs-theme="dark"] .video-desc h3 {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .video-meta,
[data-bs-theme="dark"] .video-meta span {
    color: #cccccc !important;
}

[data-bs-theme="dark"] .video-meta i {
    color: #8b5cf6 !important;
}

[data-bs-theme="dark"] .video-description {
    color: #cccccc !important;
    border-left-color: rgba(139, 92, 246, 0.3) !important;
}

[data-bs-theme="dark"] .video-description strong,
[data-bs-theme="dark"] .video-description ul,
[data-bs-theme="dark"] .video-description li {
    color: #cccccc !important;
}

[data-bs-theme="dark"] .video-description a {
    color: #8b5cf6 !important;
}

[data-bs-theme="dark"] .video-description a:hover {
    color: #a78bfa !important;
}

[data-bs-theme="dark"] .video-wrapper {
    box-shadow: 0 25px 55px rgba(0,0,0,0.5) !important;
}

[data-bs-theme="dark"] .video-wrapper::after {
    color: rgba(255,255,255,0.9);
    background: rgba(0,0,0,0.5);
}


[data-bs-theme="dark"] .cinema-content video {
    border-radius: 18px;
    box-shadow: 0 25px 55px rgba(0,0,0,0.5);
}

/* ========== ADMIN.PHP - CARTES SPÉCIFIQUES ========== */
[data-bs-theme="dark"] .dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #8b5cf6, #c084fc);
    opacity: 0;
    transition: opacity 0.3s ease;
}

[data-bs-theme="dark"] .dashboard-card:hover::before {
    opacity: 1;
}

[data-bs-theme="dark"] .card-icon {
    width: 50px;
    height: 50px;
    background: var(--bg-secondary) !important;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #8b5cf6 !important;
}

[data-bs-theme="dark"] .dashboard-card:hover .card-icon {
    background: #8b5cf6 !important;
    color: white !important;
    transform: rotate(5deg) scale(1.1);
}

[data-bs-theme="dark"] .card-stats {
    background: var(--bg-secondary) !important;
    border-radius: 12px;
    padding: 1rem;
}

[data-bs-theme="dark"] .stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: #8b5cf6 !important;
}

[data-bs-theme="dark"] .card-badge {
    background: var(--bg-secondary) !important;
    color: var(--text-secondary) !important;
    border-radius: 30px;
    padding: 0.35rem 1rem;
}

[data-bs-theme="dark"] .quick-stat-card {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
}

[data-bs-theme="dark"] .quick-stat-card .stat-icon {
    color: #8b5cf6 !important;
}

[data-bs-theme="dark"] .quick-stat-card .stat-value {
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .session-info {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-secondary) !important;
}

/* ========== MODAL GÉNÉRATION MINIATURES ========== */
[data-bs-theme="dark"] .modal-thumbnail {
    background-color: rgba(0,0,0,0.95) !important;
}

[data-bs-theme="dark"] .config-options {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
}

[data-bs-theme="dark"] .config-input-group {
    background: var(--input-bg) !important;
    border: 1px solid var(--border-color) !important;
}

[data-bs-theme="dark"] .config-input-group input[type="range"] {
    background: linear-gradient(90deg, #8b5cf6 0%, #fbbf24 100%) !important;
}

[data-bs-theme="dark"] .preset-btn {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-secondary) !important;
}

[data-bs-theme="dark"] .preset-btn:hover {
    background: #8b5cf6 !important;
    color: white !important;
}

[data-bs-theme="dark"] .thumbnail-preview-item-modal {
    background-color: var(--input-bg) !important;
}

[data-bs-theme="dark"] .thumbnail-preview-item-modal:hover {
    border-color: #fbbf24 !important;
}

[data-bs-theme="dark"] .thumbnail-time-badge-modal {
    background: rgba(0,0,0,0.8) !important;
    color: white !important;
}

/* ========== ADAPTATION MOBILE ========== */
@media (max-width: 768px) {
    [data-bs-theme="dark"] .cards-grid {
        grid-template-columns: 1fr;
    }
    
    [data-bs-theme="dark"] .quick-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    [data-bs-theme="dark"] .module-card {
        padding: var(--space-3) !important;
    }
    
    [data-bs-theme="dark"] .module-icon {
        width: 48px !important;
        height: 48px !important;
    }
}

@media (max-width: 576px) {
    [data-bs-theme="dark"] .stats-grid {
        gap: var(--space-2) !important;
    }
    
    [data-bs-theme="dark"] .admin-card {
        padding: var(--space-3) !important;
    }
}

/* ========== ANIMATIONS ========== */
@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}
/* ========== FORCER LES COULEURS DE TEXTE ========== */
[data-bs-theme="dark"] {
    color-scheme: dark;
}

[data-bs-theme="dark"] body,
[data-bs-theme="dark"] p,
[data-bs-theme="dark"] h1, [data-bs-theme="dark"] h2, 
[data-bs-theme="dark"] h3, [data-bs-theme="dark"] h4,
[data-bs-theme="dark"] h5, [data-bs-theme="dark"] h6,
[data-bs-theme="dark"] span:not(.badge):not(.label),
[data-bs-theme="dark"] div:not(.badge):not(.label),
[data-bs-theme="dark"] li,
[data-bs-theme="dark"] a:not(.btn),
[data-bs-theme="dark"] label,
[data-bs-theme="dark"] .form-label,
[data-bs-theme="dark"] .text-dark,
[data-bs-theme="dark"] .text-body,
[data-bs-theme="dark"] .text-primary:not(.badge),
[data-bs-theme="dark"] .text-secondary {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .text-muted,
[data-bs-theme="dark"] small,
[data-bs-theme="dark"] .text-secondary-light {
    color: #cccccc !important;
}

/* ========== FORCER LES ÉCRITURES SPÉCIFIQUES ========== */
[data-bs-theme="dark"] .video-desc h3,
[data-bs-theme="dark"] .video-meta,
[data-bs-theme="dark"] .video-meta span,
[data-bs-theme="dark"] .video-description,
[data-bs-theme="dark"] .video-description strong,
[data-bs-theme="dark"] .video-description ul,
[data-bs-theme="dark"] .video-description li,
[data-bs-theme="dark"] .video-description p {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .video-meta i {
    color: #8b5cf6 !important;
}

[data-bs-theme="dark"] .video-description a {
    color: #8b5cf6 !important;
}

/* ========== FORCER LES TITRES ========== */
[data-bs-theme="dark"] header h1,
[data-bs-theme="dark"] header p,
[data-bs-theme="dark"] .hero-section h1,
[data-bs-theme="dark"] .hero-section p,
[data-bs-theme="dark"] .dashboard-header h1,
[data-bs-theme="dark"] .dashboard-header p,
[data-bs-theme="dark"] .admin-card h5,
[data-bs-theme="dark"] .module-content h5 {
    color: #ffffff !important;
}

/* ========== EXCEPTIONS (ce qui doit rester coloré) ========== */
[data-bs-theme="dark"] .badge,
[data-bs-theme="dark"] .btn,
[data-bs-theme="dark"] .btn i,
[data-bs-theme="dark"] .btn-primary,
[data-bs-theme="dark"] .btn-success,
[data-bs-theme="dark"] .btn-danger,
[data-bs-theme="dark"] .btn-warning,
[data-bs-theme="dark"] .btn-info {
    color: inherit !important;
}

[data-bs-theme="dark"] .badge.bg-success,
[data-bs-theme="dark"] .badge.bg-danger,
[data-bs-theme="dark"] .badge.bg-warning,
[data-bs-theme="dark"] .badge.bg-info {
    color: white !important;
}

[data-bs-theme="dark"] .badge.bg-warning.text-dark {
    color: #1a1a1a !important;
}
/* ========== ADMIN-VISUEL.PHP - FORCER LES ÉCRITURES EN BLANC ========== */
[data-bs-theme="dark"] .page-card,
[data-bs-theme="dark"] .page-card * {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .page-card .text-muted,
[data-bs-theme="dark"] .page-card small,
[data-bs-theme="dark"] .page-card .text-secondary {
    color: #cccccc !important;
}

[data-bs-theme="dark"] .page-card h3,
[data-bs-theme="dark"] .page-card h4,
[data-bs-theme="dark"] .page-card h5,
[data-bs-theme="dark"] .page-card p {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .page-card .btn-outline-primary {
    color: #ffffff !important;
    border-color: #ffffff !important;
    background: transparent !important;
}

[data-bs-theme="dark"] .page-card .btn-outline-primary:hover {
    background: #8b5cf6 !important;
    border-color: #8b5cf6 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .page-card .badge {
    color: #ffffff !important;
}

/* Pour les cartes dans les onglets */
[data-bs-theme="dark"] .category-header h3,
[data-bs-theme="dark"] .category-header h4,
[data-bs-theme="dark"] .category-header p,
[data-bs-theme="dark"] .category-header span {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .category-header .badge {
    color: #ffffff !important;
    background: rgba(255,255,255,0.2) !important;
}

/* Pour les titres de section */
[data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4,
[data-bs-theme="dark"] h5 {
    color: #ffffff !important;
}

/* Pour le texte dans les onglets */
[data-bs-theme="dark"] .nav-link {
    color: #cccccc !important;
}

[data-bs-theme="dark"] .nav-link:hover {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .nav-link.active {
    color: #8b5cf6 !important;
}
/* ========== ADMIN-VISUEL.PHP - FORCER LE MODE SOMBRE ========== */
[data-bs-theme="dark"] .page-card {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.2) !important;
}

[data-bs-theme="dark"] .page-card:hover {
    border-color: #8b5cf6 !important;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.4) !important;
}

[data-bs-theme="dark"] .page-card .page-icon {
    background: var(--bg-secondary) !important;
    color: #8b5cf6 !important;
}

[data-bs-theme="dark"] .page-card:hover .page-icon {
    background: #8b5cf6 !important;
    color: white !important;
}

/* Cartes dans les onglets */
[data-bs-theme="dark"] .category-card {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
}

[data-bs-theme="dark"] .category-card:hover {
    border-color: #8b5cf6 !important;
}

[data-bs-theme="dark"] .category-header {
    background: var(--bg-secondary) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

[data-bs-theme="dark"] .category-content {
    background: var(--card-bg) !important;
}

/* Sections d'édition */
[data-bs-theme="dark"] .edit-section,
[data-bs-theme="dark"] .field-row {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
}

[data-bs-theme="dark"] .edit-section:hover,
[data-bs-theme="dark"] .field-row:hover {
    border-color: #8b5cf6 !important;
}

/* Onglets */
[data-bs-theme="dark"] .nav-tabs {
    border-bottom-color: var(--border-color) !important;
}

[data-bs-theme="dark"] .nav-tabs .nav-link {
    color: var(--text-secondary) !important;
    background: transparent !important;
}

[data-bs-theme="dark"] .nav-tabs .nav-link:hover {
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
    background: var(--bg-secondary) !important;
}

[data-bs-theme="dark"] .nav-tabs .nav-link.active {
    color: #8b5cf6 !important;
    background: var(--card-bg) !important;
    border-color: var(--border-color) var(--border-color) var(--card-bg) !important;
}

[data-bs-theme="dark"] .tab-content {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    border-top: none !important;
}

/* Contrôles de style */
[data-bs-theme="dark"] .style-controls {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
}

[data-bs-theme="dark"] .style-controls input,
[data-bs-theme="dark"] .style-controls select {
    background: var(--input-bg) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .style-toggle-btn {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-secondary) !important;
}

[data-bs-theme="dark"] .style-toggle-btn:hover {
    background: var(--hover-bg) !important;
    border-color: #8b5cf6 !important;
    color: #8b5cf6 !important;
}

/* Force le fond de la page */
[data-bs-theme="dark"] .studio-container,
[data-bs-theme="dark"] .studio-content {
    background: var(--bg-primary) !important;
}
/* ========== ADMIN-SANTE-API.PHP - COULEURS APAISÉES ========== */
[data-bs-theme="dark"] .sante-container {
    background-color: var(--bg-primary) !important;
}

/* En-tête du scan */
[data-bs-theme="dark"] .health-header {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%) !important;
    border-bottom: 3px solid #8b5cf6 !important;
    color: #e0e0e0 !important;
}

[data-bs-theme="dark"] .health-header h1,
[data-bs-theme="dark"] .health-header p {
    color: #ffffff !important;
}

/* Message d'information sur le mode sombre */
[data-bs-theme="dark"] .info-message {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    color: #cccccc !important;
    padding: 1rem !important;
    border-radius: 8px !important;
    margin-bottom: 1.5rem !important;
}

[data-bs-theme="dark"] .info-message i {
    color: #8b5cf6 !important;
    margin-right: 0.5rem;
}

/* Section ATTENTION REQUISE */
[data-bs-theme="dark"] .alert-header {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    padding: 1.5rem !important;
    margin-bottom: 1.5rem !important;
}

[data-bs-theme="dark"] .alert-header h2 {
    color: #ffffff !important;
    font-size: 1.3rem !important;
    margin-bottom: 1rem !important;
}

[data-bs-theme="dark"] .alert-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

[data-bs-theme="dark"] .alert-stat {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

[data-bs-theme="dark"] .alert-stat .badge {
    font-size: 1rem !important;
    padding: 0.5rem 1rem !important;
    border-radius: 30px !important;
    font-weight: 600 !important;
}

[data-bs-theme="dark"] .alert-stat .badge.bg-danger {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
}

[data-bs-theme="dark"] .alert-stat .badge.bg-warning {
    background: rgba(245, 158, 11, 0.2) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
}

[data-bs-theme="dark"] .alert-stat .badge.bg-info {
    background: rgba(59, 130, 246, 0.2) !important;
    color: #60a5fa !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
}

[data-bs-theme="dark"] .alert-stat span {
    color: #e0e0e0 !important;
    font-size: 0.95rem;
}

/* Barre de filtres */
[data-bs-theme="dark"] .filter-bar {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 10px !important;
    padding: 0.75rem !important;
    margin-bottom: 1.5rem !important;
}

[data-bs-theme="dark"] .filter-btn {
    background: transparent !important;
    border: 1px solid var(--border-color) !important;
    color: #cccccc !important;
    padding: 0.5rem 1rem !important;
    border-radius: 20px !important;
    font-size: 0.9rem !important;
    transition: all 0.2s ease !important;
}

[data-bs-theme="dark"] .filter-btn:hover {
    background: var(--hover-bg) !important;
    border-color: #8b5cf6 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .filter-btn.active {
    background: #8b5cf6 !important;
    border-color: #8b5cf6 !important;
    color: white !important;
}

[data-bs-theme="dark"] .filter-btn.critical.active { 
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: #ef4444 !important;
    color: #f87171 !important;
}

[data-bs-theme="dark"] .filter-btn.danger.active { 
    background: rgba(245, 158, 11, 0.2) !important;
    border-color: #f59e0b !important;
    color: #fbbf24 !important;
}

[data-bs-theme="dark"] .filter-btn.warning.active { 
    background: rgba(251, 191, 36, 0.2) !important;
    border-color: #fbbf24 !important;
    color: #fde047 !important;
}

/* Cartes de catégories */
[data-bs-theme="dark"] .category-card {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    margin-bottom: 1rem !important;
    overflow: hidden !important;
}

[data-bs-theme="dark"] .category-header {
    background: var(--bg-secondary) !important;
    padding: 1rem 1.5rem !important;
    border-bottom: 1px solid var(--border-color) !important;
    cursor: pointer !important;
}

[data-bs-theme="dark"] .category-header h3 {
    color: #ffffff !important;
    font-size: 1.1rem !important;
    margin: 0 !important;
}

[data-bs-theme="dark"] .category-header .badge {
    background: rgba(255,255,255,0.1) !important;
    color: #cccccc !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
}

[data-bs-theme="dark"] .category-content {
    background: var(--card-bg) !important;
    padding: 1.5rem !important;
}

/* Items de fichiers */
[data-bs-theme="dark"] .file-item {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    padding: 1rem !important;
    margin-bottom: 1rem !important;
    transition: all 0.2s ease !important;
}

[data-bs-theme="dark"] .file-item:hover {
    border-color: #8b5cf6 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
}

[data-bs-theme="dark"] .file-item.critical { 
    border-left: 4px solid rgba(239, 68, 68, 0.5) !important;
}

[data-bs-theme="dark"] .file-item.danger { 
    border-left: 4px solid rgba(245, 158, 11, 0.5) !important;
}

[data-bs-theme="dark"] .file-item.warning { 
    border-left: 4px solid rgba(251, 191, 36, 0.5) !important;
}

[data-bs-theme="dark"] .file-name {
    color: #ffffff !important;
    font-weight: 600 !important;
}

[data-bs-theme="dark"] .file-meta {
    color: #a0a0a0 !important;
    font-size: 0.85rem !important;
}

/* Badges d'issues */
[data-bs-theme="dark"] .issue-critical {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
    padding: 0.25rem 0.75rem !important;
    border-radius: 20px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
}

[data-bs-theme="dark"] .issue-danger {
    background: rgba(245, 158, 11, 0.15) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
    padding: 0.25rem 0.75rem !important;
    border-radius: 20px !important;
}

[data-bs-theme="dark"] .issue-warning {
    background: rgba(251, 191, 36, 0.15) !important;
    color: #fde047 !important;
    border: 1px solid rgba(251, 191, 36, 0.3) !important;
    padding: 0.25rem 0.75rem !important;
    border-radius: 20px !important;
}

[data-bs-theme="dark"] .issue-info {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #60a5fa !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
    padding: 0.25rem 0.75rem !important;
    border-radius: 20px !important;
}

[data-bs-theme="dark"] .issue-success {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
    padding: 0.25rem 0.75rem !important;
    border-radius: 20px !important;
}

/* Détails des issues */
[data-bs-theme="dark"] .issue-line {
    background: #0f0f0f !important;
    color: #e0e0e0 !important;
    border-radius: 6px !important;
    padding: 0.75rem !important;
    font-family: monospace !important;
    font-size: 0.9rem !important;
}

[data-bs-theme="dark"] .issue-context {
    background: #0a0a0a !important;
    color: #a0a0a0 !important;
    border-left: 3px solid #8b5cf6 !important;
    padding: 0.75rem !important;
    margin: 0.5rem 0 !important;
    border-radius: 4px !important;
}

[data-bs-theme="dark"] .issue-context .current-line {
    color: #8b5cf6 !important;
    font-weight: bold !important;
}

[data-bs-theme="dark"] .recommendation {
    background: var(--bg-secondary) !important;
    border-left: 3px solid #8b5cf6 !important;
    padding: 0.75rem !important;
    color: #e0e0e0 !important;
    border-radius: 4px !important;
    margin-top: 0.5rem !important;
}

/* Statistiques */
[data-bs-theme="dark"] .stats-mini {
    color: #a0a0a0 !important;
    font-size: 0.9rem !important;
}

[data-bs-theme="dark"] .stats-mini strong {
    color: #ffffff !important;
}

/* Compteurs */
[data-bs-theme="dark"] .count-critical {
    color: #f87171 !important;
    font-weight: 700 !important;
}

[data-bs-theme="dark"] .count-danger {
    color: #fbbf24 !important;
    font-weight: 700 !important;
}

[data-bs-theme="dark"] .count-warning {
    color: #fde047 !important;
    font-weight: 700 !important;
}

[data-bs-theme="dark"] .count-safe {
    color: #34d399 !important;
    font-weight: 700 !important;
}

/* Boutons d'action */
[data-bs-theme="dark"] .btn-sante {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    color: #cccccc !important;
    padding: 0.4rem 1rem !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
}

[data-bs-theme="dark"] .btn-sante:hover {
    background: var(--hover-bg) !important;
    border-color: #8b5cf6 !important;
    color: #ffffff !important;
}
/* ========== ADMIN-SANTE-API.PHP - COULEURS APAISÉES ========== */
[data-bs-theme="dark"] .sante-container {
    background-color: var(--bg-primary) !important;
}

/* En-tête du scan */
[data-bs-theme="dark"] .health-header {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%) !important;
    border-bottom: 3px solid #8b5cf6 !important;
    color: #e0e0e0 !important;
}

[data-bs-theme="dark"] .health-header h1,
[data-bs-theme="dark"] .health-header p {
    color: #ffffff !important;
}

/* Message d'information sur le mode sombre */
[data-bs-theme="dark"] .info-message {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    color: #cccccc !important;
    padding: 1rem !important;
    border-radius: 8px !important;
    margin-bottom: 1.5rem !important;
}

[data-bs-theme="dark"] .info-message i {
    color: #8b5cf6 !important;
    margin-right: 0.5rem;
}

/* Section ATTENTION REQUISE */
[data-bs-theme="dark"] .alert-header {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    padding: 1.5rem !important;
    margin-bottom: 1.5rem !important;
}

[data-bs-theme="dark"] .alert-header h2 {
    color: #ffffff !important;
    font-size: 1.3rem !important;
    margin-bottom: 1rem !important;
}

[data-bs-theme="dark"] .alert-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

[data-bs-theme="dark"] .alert-stat {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

[data-bs-theme="dark"] .alert-stat .badge {
    font-size: 1rem !important;
    padding: 0.5rem 1rem !important;
    border-radius: 30px !important;
    font-weight: 600 !important;
}

[data-bs-theme="dark"] .alert-stat .badge.bg-danger {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
}

[data-bs-theme="dark"] .alert-stat .badge.bg-warning {
    background: rgba(245, 158, 11, 0.2) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
}

[data-bs-theme="dark"] .alert-stat .badge.bg-info {
    background: rgba(59, 130, 246, 0.2) !important;
    color: #60a5fa !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
}

[data-bs-theme="dark"] .alert-stat span {
    color: #e0e0e0 !important;
    font-size: 0.95rem;
}

/* Barre de filtres */
[data-bs-theme="dark"] .filter-bar {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 10px !important;
    padding: 0.75rem !important;
    margin-bottom: 1.5rem !important;
}

[data-bs-theme="dark"] .filter-btn {
    background: transparent !important;
    border: 1px solid var(--border-color) !important;
    color: #cccccc !important;
    padding: 0.5rem 1rem !important;
    border-radius: 20px !important;
    font-size: 0.9rem !important;
    transition: all 0.2s ease !important;
}

[data-bs-theme="dark"] .filter-btn:hover {
    background: var(--hover-bg) !important;
    border-color: #8b5cf6 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .filter-btn.active {
    background: #8b5cf6 !important;
    border-color: #8b5cf6 !important;
    color: white !important;
}

[data-bs-theme="dark"] .filter-btn.critical.active { 
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: #ef4444 !important;
    color: #f87171 !important;
}

[data-bs-theme="dark"] .filter-btn.danger.active { 
    background: rgba(245, 158, 11, 0.2) !important;
    border-color: #f59e0b !important;
    color: #fbbf24 !important;
}

[data-bs-theme="dark"] .filter-btn.warning.active { 
    background: rgba(251, 191, 36, 0.2) !important;
    border-color: #fbbf24 !important;
    color: #fde047 !important;
}

/* Cartes de catégories */
[data-bs-theme="dark"] .category-card {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    margin-bottom: 1rem !important;
    overflow: hidden !important;
}

[data-bs-theme="dark"] .category-header {
    background: var(--bg-secondary) !important;
    padding: 1rem 1.5rem !important;
    border-bottom: 1px solid var(--border-color) !important;
    cursor: pointer !important;
}

[data-bs-theme="dark"] .category-header h3 {
    color: #ffffff !important;
    font-size: 1.1rem !important;
    margin: 0 !important;
}

[data-bs-theme="dark"] .category-header .badge {
    background: rgba(255,255,255,0.1) !important;
    color: #cccccc !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
}

[data-bs-theme="dark"] .category-content {
    background: var(--card-bg) !important;
    padding: 1.5rem !important;
}

/* Items de fichiers */
[data-bs-theme="dark"] .file-item {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    padding: 1rem !important;
    margin-bottom: 1rem !important;
    transition: all 0.2s ease !important;
}

[data-bs-theme="dark"] .file-item:hover {
    border-color: #8b5cf6 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
}

[data-bs-theme="dark"] .file-item.critical { 
    border-left: 4px solid rgba(239, 68, 68, 0.5) !important;
}

[data-bs-theme="dark"] .file-item.danger { 
    border-left: 4px solid rgba(245, 158, 11, 0.5) !important;
}

[data-bs-theme="dark"] .file-item.warning { 
    border-left: 4px solid rgba(251, 191, 36, 0.5) !important;
}

[data-bs-theme="dark"] .file-name {
    color: #ffffff !important;
    font-weight: 600 !important;
}

[data-bs-theme="dark"] .file-meta {
    color: #a0a0a0 !important;
    font-size: 0.85rem !important;
}

/* Badges d'issues */
[data-bs-theme="dark"] .issue-critical {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
    padding: 0.25rem 0.75rem !important;
    border-radius: 20px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
}

[data-bs-theme="dark"] .issue-danger {
    background: rgba(245, 158, 11, 0.15) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
    padding: 0.25rem 0.75rem !important;
    border-radius: 20px !important;
}

[data-bs-theme="dark"] .issue-warning {
    background: rgba(251, 191, 36, 0.15) !important;
    color: #fde047 !important;
    border: 1px solid rgba(251, 191, 36, 0.3) !important;
    padding: 0.25rem 0.75rem !important;
    border-radius: 20px !important;
}

[data-bs-theme="dark"] .issue-info {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #60a5fa !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
    padding: 0.25rem 0.75rem !important;
    border-radius: 20px !important;
}

[data-bs-theme="dark"] .issue-success {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
    padding: 0.25rem 0.75rem !important;
    border-radius: 20px !important;
}

/* Détails des issues */
[data-bs-theme="dark"] .issue-line {
    background: #0f0f0f !important;
    color: #e0e0e0 !important;
    border-radius: 6px !important;
    padding: 0.75rem !important;
    font-family: monospace !important;
    font-size: 0.9rem !important;
}

[data-bs-theme="dark"] .issue-context {
    background: #0a0a0a !important;
    color: #a0a0a0 !important;
    border-left: 3px solid #8b5cf6 !important;
    padding: 0.75rem !important;
    margin: 0.5rem 0 !important;
    border-radius: 4px !important;
}

[data-bs-theme="dark"] .issue-context .current-line {
    color: #8b5cf6 !important;
    font-weight: bold !important;
}

[data-bs-theme="dark"] .recommendation {
    background: var(--bg-secondary) !important;
    border-left: 3px solid #8b5cf6 !important;
    padding: 0.75rem !important;
    color: #e0e0e0 !important;
    border-radius: 4px !important;
    margin-top: 0.5rem !important;
}

/* Statistiques */
[data-bs-theme="dark"] .stats-mini {
    color: #a0a0a0 !important;
    font-size: 0.9rem !important;
}

[data-bs-theme="dark"] .stats-mini strong {
    color: #ffffff !important;
}

/* Compteurs */
[data-bs-theme="dark"] .count-critical {
    color: #f87171 !important;
    font-weight: 700 !important;
}

[data-bs-theme="dark"] .count-danger {
    color: #fbbf24 !important;
    font-weight: 700 !important;
}

[data-bs-theme="dark"] .count-warning {
    color: #fde047 !important;
    font-weight: 700 !important;
}

[data-bs-theme="dark"] .count-safe {
    color: #34d399 !important;
    font-weight: 700 !important;
}

/* Boutons d'action */
[data-bs-theme="dark"] .btn-sante {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    color: #cccccc !important;
    padding: 0.4rem 1rem !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
}

[data-bs-theme="dark"] .btn-sante:hover {
    background: var(--hover-bg) !important;
    border-color: #8b5cf6 !important;
    color: #ffffff !important;
}
/* ========== ADMIN-SANTE-API.PHP - ADOUCIR L'ORANGE ========== */
[data-bs-theme="dark"] .alert-header {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    padding: 1.5rem !important;
    margin-bottom: 1.5rem !important;
}

[data-bs-theme="dark"] .alert-header h2 {
    color: var(--text-primary) !important;
    font-size: 1.3rem !important;
    margin-bottom: 1rem !important;
}

[data-bs-theme="dark"] .alert-header .alert-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

[data-bs-theme="dark"] .alert-header .alert-stat {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Badges plus doux */
[data-bs-theme="dark"] .badge.bg-danger {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
    padding: 0.5rem 1rem !important;
    border-radius: 30px !important;
    font-weight: 600 !important;
}

[data-bs-theme="dark"] .badge.bg-warning {
    background: rgba(245, 158, 11, 0.15) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
    padding: 0.5rem 1rem !important;
    border-radius: 30px !important;
    font-weight: 600 !important;
}

[data-bs-theme="dark"] .badge.bg-info {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #60a5fa !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
    padding: 0.5rem 1rem !important;
    border-radius: 30px !important;
}

[data-bs-theme="dark"] .badge.bg-success {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
    padding: 0.5rem 1rem !important;
    border-radius: 30px !important;
}

/* Texte des statistiques */
[data-bs-theme="dark"] .alert-header span {
    color: var(--text-secondary) !important;
    font-size: 0.95rem;
}

/* Boutons de filtre plus doux */
[data-bs-theme="dark"] .filter-btn.critical.active {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.5) !important;
    color: #f87171 !important;
}

[data-bs-theme="dark"] .filter-btn.danger.active {
    background: rgba(245, 158, 11, 0.15) !important;
    border-color: rgba(245, 158, 11, 0.5) !important;
    color: #fbbf24 !important;
}

[data-bs-theme="dark"] .filter-btn.warning.active {
    background: rgba(251, 191, 36, 0.15) !important;
    border-color: rgba(251, 191, 36, 0.5) !important;
    color: #fde047 !important;
}

/* Bordure des fichiers items */
[data-bs-theme="dark"] .file-item.critical {
    border-left: 4px solid rgba(239, 68, 68, 0.5) !important;
}

[data-bs-theme="dark"] .file-item.danger {
    border-left: 4px solid rgba(245, 158, 11, 0.5) !important;
}

[data-bs-theme="dark"] .file-item.warning {
    border-left: 4px solid rgba(251, 191, 36, 0.5) !important;
}

/* Badges d'issues */
[data-bs-theme="dark"] .issue-critical {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
}

[data-bs-theme="dark"] .issue-danger {
    background: rgba(245, 158, 11, 0.15) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
}

[data-bs-theme="dark"] .issue-warning {
    background: rgba(251, 191, 36, 0.15) !important;
    color: #fde047 !important;
    border: 1px solid rgba(251, 191, 36, 0.3) !important;
}

[data-bs-theme="dark"] .issue-info {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #60a5fa !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
}

[data-bs-theme="dark"] .issue-success {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
}

/* Compteurs */
[data-bs-theme="dark"] .count-critical {
    color: #f87171 !important;
}

[data-bs-theme="dark"] .count-danger {
    color: #fbbf24 !important;
}

[data-bs-theme="dark"] .count-warning {
    color: #fde047 !important;
}

[data-bs-theme="dark"] .count-safe {
    color: #34d399 !important;
}
/* ========== ADMIN-SANTE-API.PHP - ÉLÉMENTS PRINCIPAUX ========== */
[data-bs-theme="dark"] .dark-mode-info {
    background: var(--bg-secondary) !important;
    color: #8b5cf6 !important;
    border-left: 4px solid #8b5cf6 !important;
    padding: 1rem !important;
    border-radius: 8px !important;
    margin-bottom: 1.5rem !important;
    font-size: 0.9rem !important;
    border: 1px solid var(--border-color) !important;
}

/* Statut global ATTENTION REQUISE */
[data-bs-theme="dark"] .overall-status {
    border-radius: 16px !important;
    padding: 2rem !important;
    margin-bottom: 2rem !important;
    text-align: center !important;
}

[data-bs-theme="dark"] .overall-status.status-warning {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%) !important;
    border: 1px solid #8b5cf6 !important;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.3) !important;
}

[data-bs-theme="dark"] .overall-status i {
    color: #8b5cf6 !important;
    font-size: 3rem !important;
    margin-bottom: 1rem !important;
}

[data-bs-theme="dark"] .overall-status h3 {
    color: #ffffff !important;
    font-size: 1.8rem !important;
    font-weight: 700 !important;
    margin-bottom: 0.5rem !important;
}

[data-bs-theme="dark"] .overall-status p {
    color: var(--text-secondary) !important;
    font-size: 1rem !important;
}

[data-bs-theme="dark"] .overall-status .badge {
    background: rgba(139, 92, 246, 0.2) !important;
    color: #8b5cf6 !important;
    border: 1px solid rgba(139, 92, 246, 0.3) !important;
    padding: 0.5rem 1rem !important;
    border-radius: 30px !important;
    font-size: 0.9rem !important;
}

/* Barre de filtres */
[data-bs-theme="dark"] .filter-bar {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    padding: 1rem !important;
    margin-bottom: 1.5rem !important;
}

[data-bs-theme="dark"] .filter-btn {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-secondary) !important;
    padding: 0.5rem 1rem !important;
    border-radius: 20px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}

[data-bs-theme="dark"] .filter-btn:hover {
    background: var(--hover-bg) !important;
    border-color: #8b5cf6 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .filter-btn.active {
    background: #8b5cf6 !important;
    border-color: #8b5cf6 !important;
    color: white !important;
}

[data-bs-theme="dark"] .filter-btn.critical.active {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: rgba(239, 68, 68, 0.5) !important;
    color: #f87171 !important;
}

[data-bs-theme="dark"] .filter-btn.danger.active {
    background: rgba(245, 158, 11, 0.2) !important;
    border-color: rgba(245, 158, 11, 0.5) !important;
    color: #fbbf24 !important;
}

[data-bs-theme="dark"] .filter-btn.warning.active {
    background: rgba(251, 191, 36, 0.2) !important;
    border-color: rgba(251, 191, 36, 0.5) !important;
    color: #fde047 !important;
}

/* Statistiques globales */
[data-bs-theme="dark"] .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

[data-bs-theme="dark"] .stat-card {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    padding: 1.25rem !important;
    transition: all 0.2s ease !important;
    display: flex;
    align-items: center;
    gap: 1rem;
}

[data-bs-theme="dark"] .stat-card:hover {
    border-color: #8b5cf6 !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.2) !important;
}

[data-bs-theme="dark"] .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--bg-secondary) !important;
    color: #8b5cf6 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

[data-bs-theme="dark"] .stat-info h3 {
    color: var(--text-primary) !important;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

[data-bs-theme="dark"] .stat-info p {
    color: var(--text-secondary) !important;
    font-size: 0.8rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Catégories */
[data-bs-theme="dark"] .category-card {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 16px !important;
    margin-bottom: 1.5rem !important;
    overflow: hidden !important;
}

[data-bs-theme="dark"] .category-header {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%) !important;
    color: white;
    padding: 1rem 1.5rem !important;
    border-bottom: 1px solid var(--border-color) !important;
}

[data-bs-theme="dark"] .category-header h3 {
    color: #ffffff !important;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    margin: 0 !important;
}

[data-bs-theme="dark"] .category-header .badge {
    background: rgba(139, 92, 246, 0.2) !important;
    color: #8b5cf6 !important;
    border: 1px solid rgba(139, 92, 246, 0.3) !important;
    padding: 0.35rem 0.75rem !important;
    border-radius: 20px !important;
    font-size: 0.8rem !important;
}

[data-bs-theme="dark"] .category-content {
    background: var(--card-bg) !important;
    padding: 1.5rem !important;
}

/* Items de fichiers */
[data-bs-theme="dark"] .file-item {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    padding: 1rem !important;
    margin-bottom: 1rem !important;
}

[data-bs-theme="dark"] .file-item:hover {
    border-color: #8b5cf6 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
}

[data-bs-theme="dark"] .file-item.critical {
    border-left: 4px solid rgba(239, 68, 68, 0.5) !important;
}

[data-bs-theme="dark"] .file-item.danger {
    border-left: 4px solid rgba(245, 158, 11, 0.5) !important;
}

[data-bs-theme="dark"] .file-item.warning {
    border-left: 4px solid rgba(251, 191, 36, 0.5) !important;
}

[data-bs-theme="dark"] .file-name {
    color: var(--text-primary) !important;
    font-weight: 600 !important;
}

[data-bs-theme="dark"] .file-meta {
    color: var(--text-secondary) !important;
    font-size: 0.8rem !important;
}

/* Badges d'issues */
[data-bs-theme="dark"] .issue-badge {
    padding: 0.25rem 0.75rem !important;
    border-radius: 12px !important;
    font-size: 0.7rem !important;
    font-weight: 600 !important;
}

[data-bs-theme="dark"] .issue-critical {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
}

[data-bs-theme="dark"] .issue-danger {
    background: rgba(245, 158, 11, 0.15) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
}

[data-bs-theme="dark"] .issue-warning {
    background: rgba(251, 191, 36, 0.15) !important;
    color: #fde047 !important;
    border: 1px solid rgba(251, 191, 36, 0.3) !important;
}

[data-bs-theme="dark"] .issue-info {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #60a5fa !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
}

[data-bs-theme="dark"] .issue-success {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
}

/* Lignes de code */
[data-bs-theme="dark"] .issue-line {
    background: #0f0f0f !important;
    color: #e0e0e0 !important;
    font-family: monospace !important;
    padding: 0.5rem !important;
    border-radius: 4px !important;
    margin: 0.5rem 0 !important;
}

[data-bs-theme="dark"] .issue-context {
    background: #0a0a0a !important;
    color: #a0a0a0 !important;
    border-left: 3px solid #8b5cf6 !important;
    padding: 0.75rem !important;
    margin: 0.5rem 0 !important;
}

[data-bs-theme="dark"] .issue-context .current-line {
    color: #8b5cf6 !important;
    font-weight: bold !important;
}

[data-bs-theme="dark"] .recommendation {
    background: var(--bg-secondary) !important;
    border-left: 3px solid #8b5cf6 !important;
    padding: 0.75rem !important;
    color: var(--text-primary) !important;
    margin-top: 0.5rem !important;
}