/* =========================================
   LABOCOMPTA — QUIZ (CSS FINAL PRO)
========================================= */

/* ===== BASE ===== */
body {
  font-family: Arial, sans-serif;
  background: #f5f5f5;
}

.container {
  max-width: 725px;
  margin: 40px auto;
  background: #ffffff;
  padding: 30px;
  border-radius: 8px;
  text-align: center;
}

h1 {
  margin-bottom: 20px;
}

/* ===== QUESTION ===== */
.question {
  font-size: 22px;
  font-weight: bold;
  text-align: left;
  margin-bottom: 25px;
  line-height: 1.5;
  background: #f8f9fa;
  padding: 15px 18px;
  border-left: 4px solid #0a7cff;
  border-radius: 6px;
}

/* Numéro kestyon (1., 2., 3.) */
.question::first-letter {
  font-size: 22px;
  font-weight: bold;
  color: #0a7cff;
}

/* ===== BOUTONS (BASE) ===== */
button {
  display: block;
  width: 100%;
  margin: 10px 0;
  padding: 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
}

/* ===== MESSAGE ===== */
.message {
  margin-bottom: 20px;
  font-weight: bold;
}

/* ===== ACTIONS ===== */
.actions {
  margin-top: 20px;
}

.hidden {
  display: none;
}

/* ===== LIENS ===== */
a {
  display: inline-block;
  margin-top: 10px;
  text-decoration: none;
  color: #0a7cff;
  font-weight: bold;
}

/* =========================================
   BOUTONS D’ACTION (JAUNE)
========================================= */

.btn-secondary {
  background-color: #f1c40f;
  color: #222;
  font-weight: bold;
}

.btn-secondary:hover {
  background-color: #d4ac0d;
}

/* =========================================
   QUIZ — RÉPONSES
========================================= */

.question-block {
  text-align: left;
  margin-top: 10px;
}

.question-block button {
  background-color: #ffffff;
  color: #222;
  border: 1px solid #ccc;
  font-size: 15px;
  text-align: left;
  margin-bottom: 12px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Hover normal */
.question-block button:hover:not(:disabled) {
  background-color: #f1f1f1;
}

/* Clic (feedback) */
.question-block button:active {
  transform: scale(0.97);
}

/* ✅ Bonne réponse */
.question-block button.selected-correct {
  background-color: #2ecc71;
  color: #ffffff;
  border-color: #27ae60;
  animation: successPop 0.3s ease;
}

/* ❌ Mauvaise réponse */
.question-block button.selected-wrong {
  background-color: #e74c3c;
  color: #ffffff;
  border-color: #c0392b;
  animation: errorShake 0.35s ease;
}

/* Réponses non choisies */
.question-block button.disabled {
  background-color: #eeeeee;
  color: #888888;
  border-color: #dddddd;
  cursor: not-allowed;
}

/* Désactivation globale */
.question-block button:disabled {
  opacity: 0.95;
}

/* ===== BOUTONS DIVERS ===== */
#submitQuizBtn {
  display: block;
  margin-bottom: 10px;
}

#centreEvalBtn {
  display: block;
  margin-top: 5px;
}

/* =========================================
   ANIMATIONS
========================================= */

@keyframes successPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes errorShake {
  0%   { transform: translateX(0); }
  25%  { transform: translateX(-5px); }
  50%  { transform: translateX(5px); }
  75%  { transform: translateX(-4px); }
  100% { transform: translateX(0); }
}
