/* Appliqué à toutes les bases (superuser, client, cabinet, compta autonome). */
.dark-theme {
    --ml2c-gray-50: #1f2937;
    --ml2c-gray-100: #374151;
    --ml2c-gray-200: #4b5563;
    --ml2c-gray-300: #6b7280;
    --ml2c-gray-400: #9ca3af;
    --ml2c-gray-500: #d1d5db;
    --ml2c-gray-600: #e5e7eb;
    --ml2c-gray-700: #f3f4f6;
    --ml2c-gray-800: #f9fafb;
    --ml2c-gray-900: #ffffff;
    color-scheme: dark;
}

.dark-theme .navbar-ml2c {
    background: rgba(31, 41, 55, 0.98);
    border-bottom-color: #4b5563;
}

.dark-theme .main-content {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: #f3f4f6;
}

.dark-theme .card-canva,
.dark-theme .module-card {
    background: rgba(31, 41, 55, 0.95);
    border-color: #4b5563;
    color: #f3f4f6;
}

body.dark-theme .modal-content {
    background: #1f2937;
    color: #f3f4f6;
    border: 1px solid #4b5563;
}

body.dark-theme .modal-header,
body.dark-theme .modal-footer {
    background: #111827;
    border-color: #4b5563;
}

body.dark-theme .modal-header .modal-title,
body.dark-theme .modal-body {
    color: #f3f4f6;
}

body.dark-theme .btn-close {
    filter: invert(1) grayscale(1);
}

body.dark-theme .bg-light,
body.dark-theme .bg-light-subtle,
body.dark-theme .text-bg-light {
    background-color: #111827 !important;
    color: #e5e7eb !important;
}

body.dark-theme .table-light {
    --bs-table-bg: #111827;
    --bs-table-color: #e5e7eb;
    color: #e5e7eb;
}

body.dark-theme .alert-success {
    background: rgba(16, 185, 129, 0.16);
    color: #a7f3d0;
    border-color: #065f46;
}

body.dark-theme .alert-danger {
    background: rgba(220, 38, 38, 0.16);
    color: #fecaca;
    border-color: #7f1d1d;
}

body.dark-theme .alert-warning {
    background: rgba(238, 108, 77, 0.16);
    color: #ffedd5;
    border-color: #9a3412;
}
