/* ================================================================
   Styles personnalisés — SMA AI Projects
   Complète Tailwind CSS
   ================================================================ */

/* --- Fond dégradé (page de connexion) --- */
.gradient-bg {
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
  min-height: 100vh;
}

/* --- Carte avec animation au survol --- */
.card-hover {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

/* --- Sidebar admin : animation glissement --- */
.sidebar-transition {
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Limitation du texte à 2 lignes --- */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Alertes --- */
.alert-success {
  background-color: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}
.alert-error {
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}
.alert-warning {
  background-color: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fcd34d;
}

/* --- Liens de navigation (sidebar admin) --- */
.nav-link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #9ca3af;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
  cursor: pointer;
}
.nav-link:hover {
  background-color: #1f2937;
  color: #fff;
}
.nav-active {
  background-color: #2563eb !important;
  color: #fff !important;
}

/* --- Champs de formulaire (admin) --- */
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #d1d5db;
  margin-bottom: 0.375rem;
}
.form-input {
  width: 100%;
  padding: 0.625rem 1rem;
  background-color: #1f2937;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  color: #fff;
  font-size: 0.875rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  appearance: auto;
}
.form-input::placeholder {
  color: #6b7280;
}
.form-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px #3b82f6;
}

/* --- Scrollbar personnalisée --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #111827; }
::-webkit-scrollbar-thumb { background: #374151; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #4b5563; }

/* ================================================================
   Thème Clair — surcharges des classes Tailwind utilitaires
   ================================================================ */

/* Base */
.theme-light,
.theme-light body {
  background-color: #f1f5f9;
  color: #1e293b;
}

/* Arrière-plans */
.theme-light .bg-gray-950 { background-color: #f1f5f9; }
.theme-light .bg-gray-900 { background-color: #ffffff; }
.theme-light .bg-gray-800 { background-color: #f1f5f9; }
.theme-light .bg-gray-700 { background-color: #e2e8f0; }
.theme-light .hover\:bg-gray-800:hover { background-color: #e2e8f0; }
.theme-light .hover\:bg-gray-700:hover { background-color: #cbd5e1; }
.theme-light .bg-gray-950\/50 { background-color: rgba(241, 245, 249, 0.5); }

/* Textes */
.theme-light .text-white { color: #0f172a; }
.theme-light .hover\:text-white:hover { color: #0f172a; }
.theme-light .text-gray-100 { color: #1e293b; }
.theme-light .text-gray-300 { color: #334155; }
.theme-light .text-gray-400 { color: #475569; }
.theme-light .text-gray-500 { color: #64748b; }
.theme-light .text-gray-600 { color: #94a3b8; }
.theme-light .text-gray-700 { color: #94a3b8; }
.theme-light .text-gray-800 { color: #cbd5e1; }
.theme-light .hover\:text-red-400:hover { color: #ef4444; }

/* Bordures */
.theme-light .border-gray-800 { border-color: #e2e8f0; }
.theme-light .border-gray-700 { border-color: #cbd5e1; }
.theme-light .border-gray-900 { border-color: #e2e8f0; }
.theme-light .hover\:border-blue-600:hover { border-color: #2563eb; }

/* Nav */
.theme-light nav {
  background-color: rgba(255, 255, 255, 0.9);
  border-color: #e2e8f0;
}

/* Formulaires */
.theme-light .form-input {
  background-color: #f8fafc;
  border-color: #cbd5e1;
  color: #1e293b;
}
.theme-light .form-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px #3b82f6;
}
.theme-light .form-label { color: #374151; }
.theme-light .form-input::placeholder { color: #94a3b8; }

/* Nav sidebar admin */
.theme-light .nav-link { color: #475569; }
.theme-light .nav-link:hover { background-color: #f1f5f9; color: #0f172a; }

/* Fond dégradé login */
.theme-light .gradient-bg {
  background: linear-gradient(135deg, #e0e7ff 0%, #ede9fe 50%, #f0f9ff 100%);
}

/* Alertes (compatibles avec les deux thèmes) */
.theme-light .alert-success { color: #065f46; }
.theme-light .alert-error { color: #991b1b; }
.theme-light .alert-warning { color: #92400e; }

/* Scrollbar */
.theme-light ::-webkit-scrollbar-track { background: #f1f5f9; }
.theme-light ::-webkit-scrollbar-thumb { background: #cbd5e1; }
.theme-light ::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
