/* ============================================================
   QUIZ.CSS — Styles spécifiques au Quiz Bible
   ------------------------------------------------------------
   Ce fichier définit :
   - L'écran de démarrage (gros icône + titre + bouton)
   - La barre de progression
   - La carte de question
   - Les boutons de réponse (A/B/C/D)
   - Le feedback après réponse
   - L'écran de fin (médaille + score)

   Doit être chargé APRÈS base.css, composants.css et nav.css.
   ============================================================ */

/* ------------------------------------------------------------
   1. ÉCRAN DE DÉMARRAGE
   ------------------------------------------------------------ */
.quiz-start {
  text-align: center;
  padding: 2rem 1rem;
}

.quiz-start-icon {
  width: 84px;
  height: 84px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-gold);
  animation: bounceIn .6s cubic-bezier(.34, 1.56, .64, 1) both;
}

.quiz-start-icon .material-symbols-outlined {
  font-size: 2.75rem;
  font-variation-settings: 'FILL' 1;
}

@keyframes bounceIn {
  0%   { transform: scale(.3); opacity: 0; }
  60%  { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.quiz-start h2 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.03em;
  margin-bottom: .5rem;
  color: var(--text);
}

.quiz-start p {
  color: var(--text-soft);
  font-size: .95rem;
  margin-bottom: 1.75rem;
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

/* ------------------------------------------------------------
   2. BARRE DE PROGRESSION
   ------------------------------------------------------------ */
.quiz-progression {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 1rem;
}

.quiz-progress-text {
  font-size: .85rem;
  font-weight: 700;
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.quiz-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-dark));
  border-radius: 999px;
  transition: width .4s cubic-bezier(.4, 0, .2, 1);
  width: 0%;
}

/* ------------------------------------------------------------
   3. CARTE DE QUESTION
   ------------------------------------------------------------ */
.quiz-question-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  margin-bottom: 1.25rem;
  animation: fadeUp .45s cubic-bezier(.4, 0, .2, 1) both;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.quiz-question-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .35rem;
}

.quiz-question-label .material-symbols-outlined {
  font-size: 1rem;
  font-variation-settings: 'FILL' 1;
}

.quiz-question-texte {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}

/* ------------------------------------------------------------
   4. BOUTONS DE RÉPONSE
   ------------------------------------------------------------ */
.quiz-reponses {
  display: grid;
  gap: .75rem;
  margin-bottom: 1rem;
}

.quiz-reponse {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  text-align: left;
  font-family: inherit;
  font-size: .98rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all .25s cubic-bezier(.34, 1.56, .64, 1);
  display: flex;
  align-items: center;
  gap: .85rem;
}

.quiz-reponse .lettre {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: .9rem;
  flex-shrink: 0;
  transition: all .25s;
}

.quiz-reponse .texte {
  flex: 1;
  line-height: 1.4;
}

/* Hover (souris) */
.quiz-reponse:hover:not(:disabled) {
  transform: translateX(4px);
  border-color: var(--gold);
  box-shadow: var(--shadow-sm);
}

.quiz-reponse:hover:not(:disabled) .lettre {
  background: var(--gold);
  color: #fff;
}

/* Pression (mobile) */
.quiz-reponse:active:not(:disabled) {
  transform: scale(.98);
}

.quiz-reponse:disabled {
  cursor: default;
}

/* Bonne réponse */
.quiz-reponse.correct {
  background: var(--gold-soft);
  border-color: var(--gold);
  color: var(--gold-dark);
}

.quiz-reponse.correct .lettre {
  background: var(--gold);
  color: #fff;
}

/* Mauvaise réponse */
.quiz-reponse.incorrect {
  background: var(--danger-soft);
  border-color: var(--danger);
  color: var(--danger-dark);
}

.quiz-reponse.incorrect .lettre {
  background: var(--danger);
  color: #fff;
}

/* ------------------------------------------------------------
   5. FEEDBACK APRÈS RÉPONSE
   ------------------------------------------------------------ */
.quiz-feedback {
  padding: .85rem 1.1rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .92rem;
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  animation: fadeUp .3s ease both;
  margin-bottom: 1rem;
}

.quiz-feedback.bon {
  background: var(--gold-soft);
  color: var(--gold-dark);
}

.quiz-feedback.mauvais {
  background: var(--danger-soft);
  color: var(--danger-dark);
}

.quiz-feedback .material-symbols-outlined {
  font-size: 1.2rem;
  flex-shrink: 0;
  font-variation-settings: 'FILL' 1;
}

/* ------------------------------------------------------------
   6. ÉCRAN DE FIN
   ------------------------------------------------------------ */
.quiz-fin {
  text-align: center;
  padding: 1.5rem 0;
  animation: fadeUp .5s ease both;
}

/* --- Médaille (cercle coloré) --- */
.quiz-fin-medaille-wrap {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-gold);
  animation: bounceIn .6s cubic-bezier(.34, 1.56, .64, 1) both;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
}

.quiz-fin-medaille-wrap .material-symbols-outlined {
  font-size: 3rem;
  font-variation-settings: 'FILL' 1;
}

/* --- Variantes de couleur selon la performance --- */
.quiz-fin-medaille-wrap.argent {
  background: linear-gradient(135deg, #cbd5e1, #94a3b8);
  box-shadow: 0 12px 32px rgba(148, 163, 184, .4);
}

.quiz-fin-medaille-wrap.bronze {
  background: linear-gradient(135deg, #d4a373, #a16207);
  box-shadow: 0 12px 32px rgba(162, 98, 7, .4);
}

.quiz-fin-medaille-wrap.gris {
  background: linear-gradient(135deg, #64748b, #475569);
  box-shadow: 0 12px 32px rgba(100, 116, 139, .4);
}

/* --- Texte de la médaille --- */
.quiz-fin-titre {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.03em;
  margin-bottom: .35rem;
  color: var(--text);
}

.quiz-fin-score {
  font-size: 2.75rem;
  font-weight: 900;
  color: var(--gold-dark);
  letter-spacing: -.05em;
  line-height: 1;
  margin-bottom: .35rem;
  font-variant-numeric: tabular-nums;
}

.quiz-fin-detail {
  font-size: .92rem;
  color: var(--text-soft);
  margin-bottom: 1.75rem;
  font-weight: 500;
}

/* --- Boutons de fin --- */
.quiz-fin-actions {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  max-width: 320px;
  margin: 0 auto;
}

.quiz-fin-actions .btn {
  text-decoration: none;
}