/* ====================================
   MODE SOMBRE - ForMyFlow CRM
   ==================================== */

/* Configuration du mode sombre */
.dark {
    color-scheme: dark;
}

/* Background principal */
.dark body {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 50%, #1a202c 100%);
}

/* Glass effect en mode sombre */
.dark .glass-effect {
    background: rgba(45, 55, 72, 0.85);
    backdrop-filter: blur(10px);
}

/* Cards et containers */
.dark .bg-white {
    background-color: #2d3748 !important;
}

.dark .bg-gray-50 {
    background-color: #1a202c !important;
}

.dark .bg-gray-100 {
    background-color: #2d3748 !important;
}

.dark .bg-gray-200 {
    background-color: #4a5568 !important;
}

/* Textes */
.dark .text-gray-900 {
    color: #f7fafc !important;
}

.dark .text-gray-800 {
    color: #e2e8f0 !important;
}

.dark .text-gray-700 {
    color: #cbd5e0 !important;
}

.dark .text-gray-600 {
    color: #a0aec0 !important;
}

.dark .text-gray-500 {
    color: #718096 !important;
}

.dark .text-gray-400 {
    color: #a0aec0 !important;
}

/* Bordures */
.dark .border-gray-200 {
    border-color: #4a5568 !important;
}

.dark .border-gray-300 {
    border-color: #718096 !important;
}

.dark .border-blue-100 {
    border-color: #2563eb !important;
}

.dark .border-blue-200 {
    border-color: #1e40af !important;
}

.dark .border-green-200 {
    border-color: #065f46 !important;
}

.dark .border-yellow-200 {
    border-color: #92400e !important;
}

.dark .border-red-200 {
    border-color: #991b1b !important;
}

.dark .border-purple-200 {
    border-color: #6b21a8 !important;
}

/* Backgrounds de couleur */
.dark .bg-blue-50 {
    background-color: #1e3a8a !important;
}

.dark .bg-blue-100 {
    background-color: #1e40af !important;
}

.dark .bg-green-50 {
    background-color: #064e3b !important;
}

.dark .bg-green-100 {
    background-color: #065f46 !important;
}

.dark .bg-yellow-50 {
    background-color: #78350f !important;
}

.dark .bg-yellow-100 {
    background-color: #92400e !important;
}

.dark .bg-red-50 {
    background-color: #7f1d1d !important;
}

.dark .bg-red-100 {
    background-color: #991b1b !important;
}

.dark .bg-purple-50 {
    background-color: #581c87 !important;
}

.dark .bg-purple-100 {
    background-color: #6b21a8 !important;
}

.dark .bg-indigo-50 {
    background-color: #312e81 !important;
}

.dark .bg-indigo-100 {
    background-color: #3730a3 !important;
}

/* Textes de couleur */
.dark .text-blue-600 {
    color: #60a5fa !important;
}

.dark .text-blue-700 {
    color: #3b82f6 !important;
}

.dark .text-green-600 {
    color: #34d399 !important;
}

.dark .text-green-700 {
    color: #10b981 !important;
}

.dark .text-yellow-600 {
    color: #fbbf24 !important;
}

.dark .text-yellow-700 {
    color: #f59e0b !important;
}

.dark .text-red-600 {
    color: #f87171 !important;
}

.dark .text-red-700 {
    color: #ef4444 !important;
}

.dark .text-purple-600 {
    color: #a78bfa !important;
}

.dark .text-purple-700 {
    color: #8b5cf6 !important;
}

.dark .text-indigo-600 {
    color: #818cf8 !important;
}

.dark .text-indigo-700 {
    color: #6366f1 !important;
}

/* Forms */
.dark input,
.dark textarea,
.dark select {
    background-color: #2d3748 !important;
    border-color: #4a5568 !important;
    color: #e2e8f0 !important;
}

.dark input:focus,
.dark textarea:focus,
.dark select:focus {
    border-color: #3b82f6 !important;
    background-color: #1a202c !important;
    ring-color: #3b82f6 !important;
}

.dark input::placeholder,
.dark textarea::placeholder {
    color: #718096 !important;
}

.dark input:disabled,
.dark textarea:disabled,
.dark select:disabled {
    background-color: #1a202c !important;
    color: #4a5568 !important;
}

/* Hover states */
.dark .hover\:bg-gray-50:hover {
    background-color: #2d3748 !important;
}

.dark .hover\:bg-gray-100:hover {
    background-color: #4a5568 !important;
}

.dark .hover\:bg-blue-50:hover {
    background-color: #1e40af !important;
}

.dark .hover\:bg-blue-100:hover {
    background-color: #2563eb !important;
}

.dark .hover\:bg-green-50:hover {
    background-color: #065f46 !important;
}

.dark .hover\:bg-red-50:hover {
    background-color: #991b1b !important;
}

.dark .hover\:text-gray-900:hover {
    color: #f7fafc !important;
}

.dark .hover\:text-blue-700:hover {
    color: #60a5fa !important;
}

/* Ombres */
.dark .shadow {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2) !important;
}

.dark .shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2) !important;
}

.dark .shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3) !important;
}

.dark .shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3) !important;
}

.dark .shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6) !important;
}

.dark .card-shadow {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
}

.dark .card-shadow-hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
}

/* Dividers */
.dark hr {
    border-color: #4a5568 !important;
}

/* Tables */
.dark table {
    color: #e2e8f0;
}

.dark th {
    background-color: #2d3748 !important;
    border-color: #4a5568 !important;
    color: #e2e8f0 !important;
}

.dark td {
    border-color: #4a5568 !important;
}

.dark tbody tr:hover {
    background-color: #374151 !important;
}

.dark tbody tr:nth-child(even) {
    background-color: #2d3748;
}

/* Badges et labels */
.dark .badge {
    background-color: #4a5568;
    color: #e2e8f0;
}

/* Modals */
.dark .modal-content {
    background-color: #2d3748;
    border-color: #4a5568;
}

.dark .modal-overlay {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Dropdowns */
.dark .dropdown-menu {
    background-color: #2d3748;
    border-color: #4a5568;
}

.dark .dropdown-item:hover {
    background-color: #374151;
}

/* Tooltips */
.dark .tooltip {
    background-color: #1a202c;
    border-color: #4a5568;
    color: #e2e8f0;
}

/* Progress bars */
.dark .progress {
    background-color: #4a5568;
}

/* Alerts */
.dark .alert {
    border-color: #4a5568;
}

.dark .alert-info {
    background-color: #1e3a8a;
    border-color: #1e40af;
    color: #bfdbfe;
}

.dark .alert-success {
    background-color: #064e3b;
    border-color: #065f46;
    color: #a7f3d0;
}

.dark .alert-warning {
    background-color: #78350f;
    border-color: #92400e;
    color: #fde68a;
}

.dark .alert-danger {
    background-color: #7f1d1d;
    border-color: #991b1b;
    color: #fecaca;
}

/* Scrollbars */
.dark ::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.dark ::-webkit-scrollbar-track {
    background: #1a202c;
}

.dark ::-webkit-scrollbar-thumb {
    background: #4a5568;
    border-radius: 6px;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #718096;
}

/* Code blocks */
.dark code {
    background-color: #1a202c;
    color: #e2e8f0;
    border-color: #4a5568;
}

.dark pre {
    background-color: #1a202c;
    border-color: #4a5568;
}

/* Links */
.dark a:not(.btn):not(.nav-link):not(.mobile-nav-link) {
    color: #60a5fa;
}

.dark a:not(.btn):not(.nav-link):not(.mobile-nav-link):hover {
    color: #93c5fd;
}

/* Buttons - ajustements pour le mode sombre */
.dark .btn-outline {
    border-color: #4a5568;
    color: #e2e8f0;
}

.dark .btn-outline:hover {
    background-color: #4a5568;
    border-color: #718096;
}

/* Spécifique aux cartes de dashboard */
.dark .dashboard-card {
    background: rgba(45, 55, 72, 0.9);
    border-color: #4a5568;
}

.dark .dashboard-card:hover {
    border-color: #718096;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

/* Navigation active state en mode sombre */
.dark .nav-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.dark .mobile-nav-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Drag and drop zones */
.dark .drop-zone {
    border-color: #4a5568;
    background-color: #2d3748;
}

.dark .drop-zone.drag-over {
    border-color: #3b82f6;
    background-color: #1e3a8a;
}

/* Status badges spécifiques */
.dark .status-badge {
    border-width: 2px;
}

.dark .status-to-enrich {
    background-color: #4a5568;
    border-color: #718096;
    color: #e2e8f0;
}

.dark .status-ready-to-contact {
    background-color: #1e40af;
    border-color: #2563eb;
    color: #bfdbfe;
}

.dark .status-in-progress {
    background-color: #92400e;
    border-color: #b45309;
    color: #fde68a;
}

.dark .status-meeting-obtained {
    background-color: #065f46;
    border-color: #059669;
    color: #a7f3d0;
}

.dark .status-out-of-target {
    background-color: #991b1b;
    border-color: #b91c1c;
    color: #fecaca;
}

/* Animations - pas de changement nécessaire */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Transition douce pour le mode sombre */
* {
    transition: background-color 0.3s ease,
                border-color 0.3s ease,
                color 0.3s ease,
                box-shadow 0.3s ease;
}

/* Exceptions pour les transitions */
.no-transition,
button,
a,
input,
select,
textarea {
    transition: all 0.2s ease;
}

/* Images - ajustement de luminosité en mode sombre */
.dark img:not(.no-dark-adjust) {
    filter: brightness(0.9);
}

.dark img:not(.no-dark-adjust):hover {
    filter: brightness(1);
}

/* Logo - pas d'ajustement */
.dark .logo,
.dark [class*="logo"] {
    filter: none;
}

