/* ===================================================================
   exercises.css
   Styles pour le moteur d'exercices interactifs de théorie musicale.
   Conçu pour être autonome et facilement intégré dans le site.
   =================================================================== */

.exo-container {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  color: #1f2933;
}

/* Barre de progression / infos de session */
.exo-progression {
  font-size: 0.85rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.exo-score-courant {
  font-size: 0.9rem;
  color: #374151;
  margin-bottom: 16px;
  font-weight: 600;
}

/* Énoncé de la question */
.exo-enonce {
  font-size: 1.25rem;
  line-height: 1.4;
  margin: 0 0 20px 0;
  color: #111827;
}

/* Liste des choix QCM */
.exo-choix-liste {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.exo-choix-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  font-size: 0.98rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
  color: #1f2933;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.exo-choix-btn:hover:not(:disabled) {
  background: #eef2ff;
  border-color: #a5b4fc;
  transform: translateY(-1px);
}

.exo-choix-btn:active:not(:disabled) {
  transform: translateY(0);
}

.exo-choix-btn:disabled {
  cursor: default;
}

/* Feedback visuel vert / rouge après sélection */
.exo-choix-correct {
  background: #dcfce7 !important;
  border-color: #22c55e !important;
  color: #14532d;
  font-weight: 600;
}

.exo-choix-incorrect {
  background: #fee2e2 !important;
  border-color: #ef4444 !important;
  color: #7f1d1d;
  font-weight: 600;
}

/* Bloc de feedback (message + explication) */
.exo-feedback {
  margin-bottom: 16px;
  min-height: 20px;
}

.exo-feedback-ok {
  color: #15803d;
  font-weight: 700;
  margin: 0 0 6px 0;
}

.exo-feedback-ko {
  color: #b91c1c;
  font-weight: 700;
  margin: 0 0 6px 0;
}

.exo-explication {
  color: #4b5563;
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0;
  background: #f3f4f6;
  padding: 10px 12px;
  border-radius: 6px;
}

/* Bouton "Question suivante" / "Voir le résultat" */
.exo-bouton-suivant {
  display: inline-block;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  background: #4f46e5;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.exo-bouton-suivant:hover {
  background: #4338ca;
}

/* Écran de résultat final */
.exo-resultat-titre {
  font-size: 1.5rem;
  margin: 0 0 12px 0;
  color: #111827;
}

.exo-resultat-score {
  font-size: 1.15rem;
  font-weight: 700;
  color: #4f46e5;
  margin: 0 0 8px 0;
}

.exo-resultat-message {
  font-size: 1rem;
  color: #374151;
  margin: 0 0 20px 0;
}

.exo-bouton-rejouer {
  display: inline-block;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  background: #16a34a;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.exo-bouton-rejouer:hover {
  background: #15803d;
}

/* Responsive */
@media (max-width: 480px) {
  .exo-container {
    padding: 16px;
    border-radius: 0;
    box-shadow: none;
  }

  .exo-enonce {
    font-size: 1.1rem;
  }
}
