/*
 * FICHIER DE COMPATIBILITÉ POUR LES ANCIENNES PAGES
 * Ce fichier adapte les anciennes classes (.card, .btn, etc.) au nouveau thème clair.
 * L'objectif à long terme est de remplacer ces classes par des classes Tailwind directement dans le HTML.
*/

:root {
  --accent: #8b5cf6;
  --ok: #10b981;
  --warn: #f59e0b;
  --bad: #ef4444;
}

/* Styles de base pour les anciennes pages */
.card {
  background: #ffffff;
  border: 1px solid #e5e7eb; /* gray-200 */
  border-radius: 16px;
  padding: 16px;
  margin: 16px 0;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s;
}
.btn:hover { background-color: #7c3aed; }

.btn.secondary {
  background: #e5e7eb; /* gray-200 */
  color: #1f2937; /* gray-800 */
}
.btn.secondary:hover { background-color: #d1d5db; /* gray-300 */}

.btn.success { background: var(--ok); }
.btn.warn { background: var(--warn); }
.btn.danger { background: var(--bad); }

.input, textarea, select {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #d1d5db; /* gray-300 */
  background: #ffffff;
  color: #1f2937; /* gray-800 */
}
.input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  border-bottom: 1px solid #e5e7eb; /* gray-200 */
  padding: 10px;
  text-align: left;
}
.table th { font-weight: 600; color: #4b5563; /* gray-600 */ }

main .flex { display: flex; gap: 12px; align-items: center; }
.right { float: right; }
.mt { margin-top: 12px; }
.mb { margin-bottom: 12px; }
.center { text-align: center; }

/* Styles spécifiques aux composants */
.chat {
  max-height: 50vh;
  overflow: auto;
  background: #f9fafb; /* gray-50 */
  border: 1px solid #e5e7eb; /* gray-200 */
  border-radius: 12px;
  padding: 12px;
}
.msg { margin: 8px 0; }
.msg .who { font-weight: 700; color: #111827; /* gray-900 */ }