/* Pages de quiz par thème (quiz-geographie, quiz-enfant, quiz-entre-amis...).
   L'habillage commun (body, #app, boutons, footer) vient de jeu.css : ne redéfinir ici
   aucune de ses classes. */

body.page-theme #app {
  max-width: 800px;
  text-align: left;
}

.fil-ariane {
  margin: 0 0 14px;
  font-size: 0.8rem;
  color: var(--texte-faible);
}

.fil-ariane a {
  display: inline-block;
  padding: 6px 0;
  color: var(--texte-doux);
}

.theme-tete {
  text-align: center;
}

.theme-tete h1 {
  margin: 0 0 8px;
  font-size: 1.7rem;
  line-height: 1.2;
}

.theme-accroche {
  margin: 0 0 18px;
  color: var(--texte-doux);
  line-height: 1.5;
}

/* --- Lancer une partie ------------------------------------------------------ */
.theme-lancer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 0 0 24px;
}

.theme-lancer .btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.theme-btn-principal {
  padding-left: 28px;
  padding-right: 28px;
  font-size: 1.02rem;
}

.theme-niveaux {
  flex: 1 0 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.theme-niveau {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 56px;
  padding: 8px;
  border: 1px solid var(--line-forte);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--texte);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
}

.theme-niveau:hover {
  border-color: var(--color-light);
}

.theme-niveau span {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--texte-doux);
}

.theme-lancer-bas {
  margin-top: 28px;
}

/* --- Textes ----------------------------------------------------------------- */
.theme-texte {
  margin: 0 0 8px;
  line-height: 1.65;
  color: var(--texte);
}

.theme-texte h2,
.theme-exemples h2,
.theme-autres h2 {
  margin: 26px 0 10px;
  font-size: 1.2rem;
}

.theme-texte p {
  margin: 0 0 12px;
}

.theme-points,
.theme-etapes {
  margin: 0 0 12px;
  padding-left: 22px;
}

.theme-points li,
.theme-etapes li {
  margin-bottom: 8px;
}

.theme-note {
  margin: 0 0 12px;
  font-size: 0.86rem;
  color: var(--texte-doux);
}

.theme-tableau-defile {
  overflow-x: auto;
}

.theme-tableau {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.theme-tableau th,
.theme-tableau td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.theme-tableau th {
  color: var(--texte-doux);
  font-size: 0.78rem;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.faq-ouverte h3 {
  margin: 14px 0 4px;
  font-size: 1rem;
}

.faq-ouverte p {
  margin: 0;
}

/* --- Questions d'exemple ---------------------------------------------------- */
.exemples {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: exemple;
}

.exemple {
  counter-increment: exemple;
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.exemple-question {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
}

.exemple-question::before {
  content: counter(exemple) '. ';
  color: var(--color-light);
}

.exemple-niveau {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border: 1px solid var(--line-forte);
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--texte-doux);
  vertical-align: middle;
}

.exemple-reponses {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.exemple-reponse {
  width: 100%;
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid var(--line-forte);
  border-radius: 6px;
  background: var(--surface-0);
  color: var(--texte);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.exemple-reponse:hover:not(:disabled) {
  border-color: var(--color-light);
}

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

.exemple-lettre {
  color: var(--color-light);
  font-weight: 800;
  margin-right: 4px;
}

.exemple-reponse.exemple-juste {
  background: #17603a;
  border-color: #3fbf78;
  color: #eafff1;
}

.exemple-reponse.exemple-fausse {
  background: #7a2530;
  border-color: #e0596b;
  color: #ffecec;
}

.exemple-solution {
  margin-top: 10px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.exemple-solution summary {
  display: inline-block;
  padding: 6px 0;
  color: var(--color-light);
  font-weight: 600;
  cursor: pointer;
}

.exemple-solution p {
  margin: 6px 0 0;
  color: var(--texte-doux);
}

.exemple-solution strong {
  color: #8ff0b1;
}

.exemples-score {
  min-height: 1.4em;
  margin: 0;
  font-weight: 700;
  color: var(--color-light);
  text-align: center;
}

/* --- Autres quiz ------------------------------------------------------------ */
.theme-autres-liens {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 6px;
}

.theme-autres-liens a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--texte);
  font-size: 0.88rem;
  text-decoration: none;
}

.theme-autres-liens a:hover {
  border-color: var(--color-light);
}

@media (max-width: 560px) {
  .theme-tete h1 { font-size: 1.35rem; }
  .theme-niveaux { grid-template-columns: 1fr 1fr; }
  .exemple-reponses { grid-template-columns: 1fr; }
  .theme-lancer .btn { flex: 1 0 100%; justify-content: center; }
}
