/* ==== BASE ==== */
body {
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(to right, #667eea, #764ba2);
  color: white;
  margin: 0;
  padding: 2rem;
  text-align: center;
  font-size: 1.5rem;
}
.container {
  max-width: 800px;
  margin: auto;
}

/* ==== BOUTONS GÉNÉRIQUE ==== */
button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border: none;
  border-radius: 0.375rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
button:active {
  transform: translateY(0);
  box-shadow: 0 1px 6px rgba(0,0,0,0.12);
}

/* ==== BARRE DE CONTRÔLE ==== */
.status {
  margin: 0.5rem 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.status select {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  color: #fff;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 0.375rem;
  appearance: none;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.status select:hover {
  background: rgba(255,255,255,0.3);
  border-color: #fff;
}
/* garantir la lisibilité des <option> */
.status select option {
  background: #fff;
  color: #333;
}
.status button {
  font-size: 1rem;
  padding: 0.6rem 1.2rem;
  color: #fff;
  background: transparent;
  border: 2px solid rgba(255,255,255,0.6);
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.status button:hover {
  background: rgba(255,255,255,0.2);
  border-color: #fff;
  transform: translateY(-1px);
}

/* ==== STATS & SCORE ==== */
.stats,
.scoreboard {
  margin: 1rem 0;
  font-size: 1.1rem;
}
.scoreboard span {
  margin: 0 0.5rem;
}

/* ==== FLASHCARD — CONTENEUR & 3D FLIP ==== */
.flashcard-container {
  perspective: 1000px;
  margin: 2rem auto;
  width: 480px;
  height: 330px;
  position: relative;
}
.flashcard {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}
.flashcard.flip {
  transform: rotateY(180deg);
}
.front,
.back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  background-color: white;
  color: black;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.back {
  transform: rotateY(180deg);
  font-size: 1.8rem;  /* réponse légèrement plus grande */
}
/* masquer la face “back” tant que non flipée */
.flashcard:not(.flip) .back {
  visibility: hidden;
}
/* solution colorée */
.flashcard.flip .back {
  background-color: lightgreen;
}

/* ==== ÉTIQUETTE “Question” / “Réponse” ==== */
.card-label {
  font-weight: bold;
  background: rgba(255,255,255,0.9);
  color: #333;
  padding: 0.3rem 0.6rem;
  border-radius: 8px;
  position: absolute;
  top: -1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  font-size: 0.9rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* ==== BOUTONS FLASHCARD ==== */
.actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 1rem 0;
}
.actions button {
 min-width: 140px;
 padding: 0.75rem 1.25rem;
 font-size: 1.1rem;
 font-weight: 600;
 border: 2px solid #764ba2;
 border-radius: 0.375rem;
 background: #ffffff;
 color: #764ba2;
 cursor: pointer;
 box-shadow: 0 2px 6px rgba(0,0,0,0.1);
 transition: background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.actions button:hover {
 background: #764ba2;
 color: #ffffff;
 transform: translateY(-2px);
 box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}


/* ==== RÉSULTAT & RÉCAP ==== */
#result,
#recap {
  font-size: 1.2rem;
  font-weight: bold;
  text-align: center;
  margin-top: 1rem;
}

/* ==== QUIZZ — QUESTION ==== */
.quizz-question,
#quizzQuestion {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #f0f0f0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* ==== QUIZZ — OPTIONS VERTICALES ==== */
#quizzOptions {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 1rem 0;
}
.option-button {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 0.5rem 0;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  background: #ffffff;
  color: #333;
  border: 2px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}
.option-button:hover:not(:disabled) {
  background-color: #c8f7c5;
  transform: translateY(-4px);
}
.option-button:disabled {
  cursor: default;
  opacity: 0.7;
}
/* états après validation */
.option-button.correct {
  background-color: #00FF00 !important;
  border-color: #8bc34a !important;
}
.option-button.incorrect {
  background-color: #ff3333 !important;
  border-color: #e57373 !important;
  color: white;
}

/* ==== CONTRÔLE MUSIQUE ==== */
#toggleMusic {
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  background: rgba(255,255,255,0.2);
  color: #fff;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background 0.2s;
}
#toggleMusic:hover {
  background: rgba(255,255,255,0.3);
}

/* ==== LIENS ==== */
a {
  color: #ffefc2;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-bottom-color 0.2s;
}
a:hover,
a:focus {
  color: #ffe18d;
  border-bottom-color: #ffe18d;
  outline: none;
}
a:active {
  color: #d4b879;
  border-bottom-color: #d4b879;
}

/* ==== PIED DE PAGE FIXE ==== */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1rem;
  background: rgba(0,0,0,0.2);
  text-align: center;
  z-index: -1;  /* derrière le contenu */
}
.footer a {
  margin: 0 1rem;
}
