/* Mémoire flash — complète css/style.css */

[hidden] { display: none !important; }

.jeu {
  padding: clamp(1.5rem, 5vw, 3.5rem) var(--marge) 0;
}
.plateau {
  position: relative;
  max-width: 40rem;
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  border-radius: 28px;
  border: 2px solid var(--gold);
  background:
    radial-gradient(500px 260px at 50% 0%, rgba(255, 79, 163, .2), transparent 70%),
    linear-gradient(180deg, var(--bg-navy), #0a0820);
  box-shadow: 0 0 40px rgba(255, 210, 63, .22), inset 0 0 60px rgba(123, 92, 255, .25);
  text-align: center;
}

/* Tableau de bord */
.tableau {
  display: flex; justify-content: space-between; gap: .5rem;
  padding-bottom: 1rem; margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 210, 63, .25);
  font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--cream-doux);
}
.tableau p { margin: 0; display: flex; flex-direction: column; align-items: center; gap: .15rem; flex: 1; }
.tableau strong {
  font-family: var(--display); font-weight: 800; font-size: 1.35rem; letter-spacing: .04em;
  color: var(--gold-light);
}
#vies { color: #ff6b8a; letter-spacing: .15em; }

/* Écrans */
.ecran {
  min-height: 19rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.1rem;
}
.ecran h1 { font-size: clamp(2.2rem, 8vw, 3.6rem); }
.ecran .surtitre { margin: 0; }
.consigne { max-width: 30rem; margin: 0; color: var(--cream-doux); }
.etiquette {
  display: block;
  font-size: .8rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold);
}
.ecran .lien-fort { border: 0; cursor: pointer; margin-top: .5rem; }

/* Choix du mode */
.modes {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem;
  margin: 0; padding: 0; border: 0;
}
.modes legend { width: 100%; margin-bottom: .5rem; }
.modes legend { font-size: .8rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.modes label {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .45rem .9rem; border-radius: 999px; cursor: pointer;
  font-size: .9rem;
  border: 1px solid rgba(255, 210, 63, .35);
  background: rgba(12, 13, 28, .35);
}
.modes label:has(input:checked) { border-color: var(--gold); color: var(--gold-light); background: rgba(123, 92, 255, .35); }
.modes input { accent-color: var(--gold); margin: 0; }

/* La suite à mémoriser */
.sequence {
  --n: 2;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.8rem, calc(78vw / var(--n)), 5.5rem);
  letter-spacing: .12em;
  line-height: 1.1;
  color: var(--gold-light);
  text-shadow: 0 0 24px rgba(255, 230, 128, .45);
  word-break: break-all; font-weight: 800;}
@media (min-width: 46rem) {
  .sequence { font-size: clamp(1.8rem, calc(32rem / var(--n)), 5.5rem); }
}
@media (prefers-reduced-motion: no-preference) {
  .sequence.apparait { animation: flash .35s ease-out both; }
}
@keyframes flash { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }

/* Compte à rebours */
.barre {
  width: min(100%, 22rem); height: 8px; border-radius: 99px; overflow: hidden;
  background: rgba(233, 235, 243, .12);
}
.barre span {
  display: block; height: 100%; width: 100%;
  background: var(--or);
  transform-origin: left center;
}
.barre span.court { animation: rebours var(--duree, 2s) linear forwards; }
@keyframes rebours { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* Saisie */
#form-saisie { display: flex; flex-direction: column; align-items: center; gap: 1.1rem; width: 100%; }
.champ {
  width: min(100%, 24rem);
  padding: .9rem 1rem;
  border-radius: 14px;
  border: 2px solid rgba(255, 210, 63, .55);
  background: rgba(12, 13, 28, .6);
  color: var(--gold-light);
  font-family: var(--display);
  font-size: clamp(1.4rem, 6vw, 2.2rem);
  letter-spacing: .15em;
  text-align: center;
  text-transform: uppercase; font-weight: 800;}
.champ:focus { outline: none; border-color: var(--gold-light); box-shadow: 0 0 0 4px rgba(255, 210, 63, .25); }
#indice { color: var(--cream-doux); letter-spacing: .1em; text-transform: none; font-weight: 400; }

/* Résultat */
.verdict { margin: 0; font-family: var(--display); font-size: clamp(1.8rem, 7vw, 2.6rem); font-weight: 800;}
.verdict.ok { color: #7ee2a8; }
.verdict.rate { color: #ff6b8a; }
.comparaison { display: grid; gap: .75rem; }
.comparaison p { margin: 0; }
.code {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.3rem, 6vw, 2rem);
  letter-spacing: .15em;
  word-break: break-all; font-weight: 800;}
.code .bon { color: #7ee2a8; }
.code .faux { color: #ff6b8a; text-decoration: underline wavy; text-underline-offset: .2em; }
.code .manque { color: rgba(233, 235, 243, .35); }

/* Fin */
.score {
  margin: 0;
  display: flex; flex-direction: column; align-items: center;
  font-family: var(--display); font-size: clamp(4rem, 18vw, 7rem); line-height: 1;
  background: linear-gradient(180deg, #ffffff 8%, var(--gold-light) 30%, var(--gold) 62%, #b38a00 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 800;}
.score small {
  font-family: var(--texte); font-size: .9rem; font-weight: 600; letter-spacing: .15em; text-transform: uppercase;
  color: var(--cream-doux); -webkit-text-fill-color: var(--cream-doux); margin-top: .5rem;
}
