/* Et ensuite? : le plateau du jeu. Chaque état se lit par la forme autant que par la couleur. */

.suite-jeu {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--e-4);
  width: 100%;
}

/* La suite vit dans le panneau sombre ; marges resserrées pour laisser la place à six cases. */
.panneau.suite-panneau {
  min-height: 0;
  padding: var(--e-5) var(--e-3);
}

.suite-rangee {
  container-type: inline-size;
  display: grid;
  grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  gap: 6px;
  width: min(100%, calc(var(--n) * 76px));
}

/* Une case : un carton à l'encre. Les chiffres rapetissent avec le nombre de cases et la longueur des nombres. */
.suite-case {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-width: 0;
  border-radius: 10px;
  background: var(--fiche);
  box-shadow: var(--ombre-tuile);
  color: var(--encre);
  line-height: 1;
  font-size: 1.25rem;
  font-size: clamp(0.875rem, calc((100cqi - (var(--n) - 1) * 6px) / var(--n) / (var(--chiffres, 2) * 0.78 + 0.7)), 1.875rem);
}

.suite-case svg {
  width: 80%;
  height: auto;
}

/* La case vide : un pointillé et un « ? », jamais une couleur seule. */
.suite-case.suite-trou {
  background: transparent;
  box-shadow: none;
  border: 2px dashed var(--studio-500);
  color: var(--texte-2);
}

/* La bonne réponse, une fois en place : cerclée à l'encre de la famille. */
.suite-case.suite-revele {
  box-shadow: inset 0 0 0 3px var(--fam-encre), var(--ombre-tuile);
  animation: suite-revele 280ms var(--ease-out);
}

@keyframes suite-revele {
  from {
    opacity: 0.3;
    transform: scale(0.8);
  }
}

/* La règle, en une phrase, après la réponse. */
.suite-explication {
  display: flex;
  align-items: flex-start;
  gap: var(--e-3);
  width: 100%;
  padding: var(--e-3) var(--e-4);
  border-radius: var(--r-moyen);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--trait);
  line-height: 1.4;
}

.suite-explication svg {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  color: var(--fam);
}

/* Les quatre choix, sous le pouce. */
.suite-reponses {
  margin-top: auto;
}

.reponse.suite-option {
  position: relative;
  min-height: 72px;
  font-size: 1.625rem;
}

.reponse.suite-option > svg {
  width: 48px;
  height: 48px;
}

.suite-marque {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--fam-encre);
  color: var(--fiche);
}

.reponse.faux .suite-marque {
  background: var(--erreur);
  color: var(--studio-50);
}

.reponse.suite-option .suite-marque svg {
  width: 13px;
  height: 13px;
}

.suite-suivante {
  flex: none;
}

/* L'aperçu de la fiche : « 2 · 5 · 8 · 11 · ? » et ses quatre choix. */
.suite-apercu {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--e-3);
}

.suite-rangee.suite-mini {
  width: 210px;
  gap: 5px;
}

.suite-mini .suite-case {
  border-radius: 8px;
}

.suite-mini-choix {
  display: flex;
  gap: 6px;
}

.suite-mini-option {
  display: grid;
  place-items: center;
  min-width: 40px;
  height: 30px;
  padding: 0 var(--e-2);
  border-radius: 8px;
  background: var(--fiche);
  box-shadow: var(--ombre-tuile);
  color: var(--encre);
  font-size: var(--t-corps);
}

@media (prefers-reduced-motion: reduce) {
  .suite-case.suite-revele {
    animation: none;
  }
}
