/* Tutoriel animé : le téléphone du jeu, une explication par étape par-dessus l'écran. */
main { position: relative; }

/* Le téléphone garde la même hauteur d'une étape à l'autre */
#screen { min-height: calc(100dvh - 40px); }
@media (min-width: 600px) { #screen { min-height: 0; } }

/* Explication : carte au centre de l'écran, le jeu figé et voilé derrière */
.explain {
  position: absolute; inset: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background: rgb(255 255 255 / 75%);
  backdrop-filter: blur(2px);
}
.explain-card {
  width: 100%;
  padding: 18px 20px 10px;
  border: var(--border); border-radius: 22px;
  background: var(--box);
  box-shadow: 0 4px 0 var(--ink);
}
.explain-card h2 { font-family: var(--logo); font-weight: 500; font-size: 1.8rem; line-height: 1.15; }
.explain-card p { font-size: 1.1rem; }
.explain-card .step-num { margin: 0; font-family: "Caveat", cursive; font-size: 1.4rem; color: var(--pink); }
.explain-card button { margin-top: 14px; }
.explain-nav { min-height: 1em; }
.explain-nav .link { margin: 0 auto; width: auto; font-size: 0.95rem; }

/* Apparition des éléments */
.in { animation: appear 0.35s ease-out both; }
@keyframes appear { from { opacity: 0; transform: translateY(8px); } }
.word-card.in { animation: deal 0.5s ease-out both; }
@keyframes deal { from { opacity: 0; transform: rotate(-12deg) translateY(30px); } }

/* Doigt qui « appuie » sur un bouton */
.tap { animation: tap 0.6s ease-out; }
@keyframes tap {
  0% { box-shadow: 0 0 0 0 rgb(224 67 106 / 70%); }
  100% { box-shadow: 0 0 0 18px rgb(224 67 106 / 0%); transform: scale(0.97); }
}

/* Curseur clignotant dans le champ de saisie simulé */
.typing::after { content: "|"; margin-left: 1px; animation: blink 1s steps(1) infinite; color: var(--muted); font-weight: 400; }
@keyframes blink { 50% { opacity: 0; } }
.fake-input {
  min-height: 2.4em; padding: 10px 12px;
  border: var(--border); border-radius: 12px; background: #fff;
  font-size: 1.4rem; white-space: pre-wrap; overflow-wrap: anywhere;
}
.fake-input.small { font-size: 1.1rem; min-height: 2.6em; flex: 1; }

.groups { display: flex; flex-direction: column; gap: 10px; }
.groups .pill { align-self: flex-start; font-size: 1rem; }
.groups .hidden-word { color: var(--muted); font-style: italic; }
.found { animation: pop 0.6s ease-out 2; }
.bar .timer { margin-left: auto; }

/* Les autres téléphones, en parallèle */
.others { padding: 10px 14px; margin: 12px 0; }
.others p { margin: 0 0 4px; }
.others ul { list-style: none; margin: 0; padding: 0; }
.others li { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.others strong { min-width: 3em; }
.mini-sms { padding: 2px 12px; border-radius: 14px 14px 14px 4px; background: var(--group); color: #fff; min-height: 1.6em; }
.dots { color: var(--muted); font-style: italic; }
.dots::after { content: "…"; display: inline-block; width: 1.2em; animation: blink 1s steps(1) infinite; }
.done { color: var(--vert); font-weight: 600; font-size: 0.95rem; }

/* Navigation rapide entre les étapes, sous le téléphone */
.jump { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 16px auto 24px; padding: 0 16px; }
.jump button {
  width: 40px; height: 40px; margin: 0; padding: 0;
  border: 2px solid var(--ink); border-radius: 50%;
  background: #fff; color: var(--ink); font-size: 1rem;
}
.jump button[aria-current="step"] { background: var(--ink); color: #fff; }

/* Liens en forme de bouton (fin du tutoriel) */
a.button {
  display: block; margin: 10px 0; padding: 11px 16px;
  border-radius: 999px; background: var(--orange); color: #fff;
  font-size: 1.1rem; font-weight: 600; text-align: center; text-decoration: none;
}
a.button.secondary { background: var(--bleu); }
.explain-card a.button:first-of-type { margin-top: 14px; }
