/* Système de thèmes pour LinkGuardian */

/* Variables globales */
:root {
  --transition-theme: all 0.3s ease;
}

/* Thème sombre (par défaut) */
[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-primary: #374151;
  --shadow-color: rgba(0, 0, 0, 0.3);
}

/* Thème clair */
[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #e2e8f0;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border-primary: #e2e8f0;
  --shadow-color: rgba(0, 0, 0, 0.1);
}

/* Classes adaptatives pour le thème clair */
[data-theme="light"] .bg-slate-900 { background-color: #f8fafc !important; }
[data-theme="light"] .bg-gray-900 { background-color: #ffffff !important; border-color: #e2e8f0 !important; }
[data-theme="light"] .bg-gray-800 { background-color: #f1f5f9 !important; }
[data-theme="light"] .bg-gray-700 { background-color: #e2e8f0 !important; }
[data-theme="light"] .bg-gray-600 { background-color: #cbd5e1 !important; }

/* Textes */
[data-theme="light"] .text-white { color: #1e293b !important; }
[data-theme="light"] .text-gray-200 { color: #475569 !important; }
[data-theme="light"] .text-gray-300 { color: #64748b !important; }
[data-theme="light"] .text-gray-400 { color: #64748b !important; }
[data-theme="light"] .text-gray-500 { color: #64748b !important; }

/* Bordures */
[data-theme="light"] .border-gray-700 { border-color: #e2e8f0 !important; }
[data-theme="light"] .border-gray-600 { border-color: #cbd5e1 !important; }

/* États hover */
[data-theme="light"] .hover\:bg-gray-800:hover { background-color: #f1f5f9 !important; }
[data-theme="light"] .hover\:bg-gray-700:hover { background-color: #e2e8f0 !important; }
[data-theme="light"] .hover\:bg-gray-600:hover { background-color: #cbd5e1 !important; }
[data-theme="light"] .hover\:text-white:hover { color: #1e293b !important; }

/* Boutons */
[data-theme="light"] .btn-secondary {
  background-color: #e2e8f0 !important;
  color: #475569 !important;
}

[data-theme="light"] .btn-secondary:hover {
  background-color: #cbd5e1 !important;
  color: #1e293b !important;
}

/* Navigation */
[data-theme="light"] nav {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Sidebar */
[data-theme="light"] aside {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
}

/* Cards et conteneurs */
[data-theme="light"] .bg-gray-900\/50 { background-color: rgba(248, 250, 252, 0.8) !important; }
[data-theme="light"] .bg-gray-800\/50 { background-color: rgba(241, 245, 249, 0.8) !important; }

/* Inputs et formulaires */
[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #1e293b !important;
}

[data-theme="light"] input::placeholder {
  color: #94a3b8 !important;
}

[data-theme="light"] input:focus,
[data-theme="light"] select:focus,
[data-theme="light"] textarea:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1) !important;
}

/* Badges et statuts */
[data-theme="light"] .badge-success { background-color: rgba(34, 197, 94, 0.1) !important; }
[data-theme="light"] .badge-warning { background-color: rgba(245, 158, 11, 0.1) !important; }
[data-theme="light"] .badge-danger { background-color: rgba(239, 68, 68, 0.1) !important; }
[data-theme="light"] .badge-info { background-color: rgba(56, 189, 248, 0.1) !important; }

/* Graphiques Plotly */
[data-theme="light"] .plotly-graph-div {
  background-color: transparent !important;
}

/* Scrollbars pour le thème clair */
[data-theme="light"] ::-webkit-scrollbar-track {
  background: #f1f5f9;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: #cbd5e1;
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Transitions fluides */
* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Amélioration des contrastes en mode clair */
[data-theme="light"] .text-primary { color: #0f172a !important; }
[data-theme="light"] .text-accent { color: #0ea5e9 !important; }
[data-theme="light"] .text-warn { color: #d97706 !important; }
[data-theme="light"] .text-danger { color: #dc2626 !important; }

/* Ombres adaptatives */
[data-theme="light"] .shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .shadow-xl {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}