/* Faux Raccord - mise en page propre à chaque écran */
.hero { position: relative; display: grid; justify-items: center; gap: 4px; margin-bottom: 8px; }
.hero .sticker { position: absolute; top: -18px; right: -4px; }
.stack { display: grid; gap: 18px; }
.topbar { display: flex; justify-content: flex-start; }
.title { margin: 0; text-align: center; font: 400 2rem/1.1 var(--font-title); text-shadow: var(--outline); }
.note { margin: 0; text-align: center; font-size: .9rem; opacity: .85; }

/* Écran « Rejoindre » */
.field input.codeinput { font: 400 2.4rem var(--font-title); letter-spacing: .2em; text-indent: .2em; text-transform: uppercase; }

/* Écran « Salon » (données fictives à ce stade) */
.codecard {
  appearance: none; display: grid; gap: 2px; justify-items: center; padding: 14px 10px 12px;
  color: var(--ink); background: var(--yellow); cursor: pointer; touch-action: manipulation;
  border: 4px solid var(--ink); border-radius: 22px; box-shadow: 8px 8px 0 var(--pink);
  transform: rotate(-2deg); font-family: var(--font-body);
}
.codecard:active { transform: rotate(-2deg) translate(3px, 3px); box-shadow: 4px 4px 0 var(--pink); }
.codecard__label { font-weight: 700; }
.codecard__code { font: 400 3rem/1 var(--font-title); letter-spacing: .1em; text-indent: .1em; }
.codecard__hint { font-size: .85rem; font-weight: 600; opacity: .75; }

.players { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.player {
  display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px 10px;
  font-weight: 700; color: var(--ink); background: var(--paper);
  border: 4px solid var(--ink); border-radius: 16px; box-shadow: 0 4px 0 var(--ink);
}
.player:nth-child(odd)  { transform: rotate(-1deg); }
.player:nth-child(even) { transform: rotate(1deg); }
.player__avatar {
  flex: none; display: grid; place-items: center; width: 38px; height: 38px; font-size: 1.3rem;
  background: var(--c); border: 3px solid var(--ink); border-radius: 50%;
}
.player__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player--empty { color: rgba(255, 255, 255, .75); background: transparent; border: 4px dashed rgba(255, 255, 255, .5); box-shadow: none; }
.count { margin: 0; text-align: center; font: 400 1.1rem var(--font-title); text-shadow: 0 2px 0 var(--ink); }

/* Étape 2 : états des joueurs et boutons masqués */
.player--offline { opacity: .45; }
.player--me { box-shadow: 0 4px 0 var(--ink), 0 0 0 3px var(--yellow); }
.btn[hidden] { display: none; }

/* Étape 3 : réglages du salon et écran de partie */
.settings { display: grid; gap: 10px; padding: 12px 14px; background: rgba(25, 11, 58, .6); border: 4px solid var(--ink); border-radius: 18px; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; font-weight: 700; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper strong { min-width: 3.4ch; text-align: center; font: 400 1.3rem var(--font-title); }
.stepper .btn--icon { min-width: 44px; font-size: 1.4rem; }

.stage { display: flex; flex-direction: column; gap: 18px; }
.roundbar { display: flex; align-items: center; justify-content: space-between; }
.bigcount { margin: 0; text-align: center; font: 400 7rem/1 var(--font-title); color: var(--yellow); text-shadow: var(--outline), 0 8px 0 var(--pink); }
.prompt { font-size: 1.15rem; }
.photo { margin: 0; overflow: hidden; background: #fff; border: 4px solid var(--ink); border-radius: 18px; box-shadow: 0 6px 0 var(--ink); transform: rotate(-1deg); }
.photo img { display: block; width: 100%; height: auto; max-height: 38vh; object-fit: contain; }
.player__badge { flex: none; margin-left: auto; }

/* Chronomètre : anneau qui se vide (--p = pourcentage de temps restant) */
.timer {
  --p: 100; position: relative; display: grid; place-items: center; flex: none; width: 84px; height: 84px;
  background: conic-gradient(var(--pink) calc(var(--p) * 1%), rgba(255, 255, 255, .3) 0);
  border: 4px solid var(--ink); border-radius: 50%; box-shadow: 0 5px 0 var(--ink);
}
.timer::before { content: ""; position: absolute; inset: 8px; background: var(--paper); border: 3px solid var(--ink); border-radius: 50%; }
.timer span { position: relative; font: 400 1.9rem var(--font-title); color: var(--ink); }
.timer--urgent { animation: urgent .5s ease-in-out infinite alternate; }
.timer--urgent span { color: var(--pink); }
@keyframes urgent { to { transform: scale(1.12) rotate(4deg); } }
