/* Composants partagés : accueil des jeux, participants, éditeur, roue, chrono, paliers, scores. */

/* ---------- Page d'accueil du site ---------- */

.heros {
  position: relative;
  padding: clamp(2rem, 6vw, 4.5rem) clamp(1rem, 3vw, 2.5rem) clamp(3rem, 7vw, 5.5rem);
  background: var(--bleu-nuit);
  color: var(--blanc);
  overflow: hidden;
}

.heros__contenu {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
}

/* En haut du héros : la signature en grand à gauche, « Les outils » à droite */
.heros__haut {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

/* Signature en grand (voir base.css) : logo de 55 px de haut, pastille de 43 px, nom de 26 px */
.heros__signature {
  min-width: 0;
  font-size: clamp(1.25rem, 2.2vw, 1.625rem);
}

/* « Les outils » un peu plus grand que dans le bandeau, à la mesure du héros */
.heros__outils {
  gap: 0.6rem;
  padding: 0.375rem 1rem 0.375rem 0.5rem;
  font-size: 1.0625rem;
}

.heros__outils .lien-outils__roue {
  width: 2rem;
  height: 2rem;
}

/* Sur téléphone, la roue seule (zone de toucher de 44 px), le nom reste lu par les lecteurs
   d'écran ; sous 400 px, la signature rapetisse un peu pour lui laisser la place */
@media (max-width: 700px) {
  .heros__outils {
    justify-content: center;
    min-width: 2.75rem;
    min-height: 2.75rem;
    margin-inline-end: -0.375rem;
    padding: 0;
  }

  .heros__outils .lien-outils__texte {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

@media (max-width: 400px) {
  .heros__signature {
    font-size: 1.125rem;
  }
}

.heros h1 {
  max-width: 18ch;
  color: var(--blanc);
  font-size: clamp(1.85rem, 5vw, 3.8rem);
  font-weight: 900;
}

.heros h1 em {
  font-style: normal;
  color: var(--vert);
}

.heros__accroche {
  max-width: 46ch;
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  color: rgb(255 255 255 / 85%);
}

.heros__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.75rem 0 0;
}

.heros__compte {
  font-weight: 700;
}

/* Points colorés décoratifs, comme sur formation.skazy.nc */
.points-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.points-deco span {
  position: absolute;
  border-radius: 50%;
  animation: flotter 7s ease-in-out infinite alternate;
}

.points-deco span:nth-child(1) {
  width: 90px;
  height: 90px;
  right: 12%;
  top: 18%;
  background: var(--vert);
}

.points-deco span:nth-child(2) {
  width: 40px;
  height: 40px;
  right: 30%;
  top: 60%;
  background: var(--jaune);
  animation-delay: -2s;
}

.points-deco span:nth-child(3) {
  width: 60px;
  height: 60px;
  right: 5%;
  top: 65%;
  background: var(--rose);
  animation-delay: -4s;
}

.points-deco span:nth-child(4) {
  width: 24px;
  height: 24px;
  right: 22%;
  top: 10%;
  background: var(--bleu);
  animation-delay: -1s;
}

.points-deco span:nth-child(5) {
  width: 30px;
  height: 30px;
  right: 40%;
  top: 25%;
  background: var(--violet);
  animation-delay: -3s;
}

@keyframes flotter {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-18px);
  }
}

.etapes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 1rem;
  margin: 0 0 2.5rem;
  padding: 0;
  list-style: none;
  counter-reset: etape;
}

.etapes li {
  counter-increment: etape;
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
}

.etapes li::before {
  content: counter(etape);
  flex: none;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  font-weight: 900;
  color: var(--bleu-nuit);
  background: var(--vert);
  border-radius: 50%;
}

.etapes p {
  margin: 0;
}

.etapes strong {
  display: block;
  color: var(--bleu-nuit);
}

.grille-jeux {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.carte-jeu {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--blanc);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.carte-jeu:hover,
.carte-jeu:focus-within {
  transform: translateY(-4px);
  box-shadow: var(--ombre-forte);
}

.carte-jeu__entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.25rem;
  background: var(--accent);
  color: var(--sur-accent);
}

/* Même pastille que sur la page du jeu : l'icône y est toujours centrée */
.carte-jeu__icone {
  display: grid;
  place-items: center;
  width: 4.2rem;
  height: 4.2rem;
  font-size: 2.1rem;
  line-height: 1;
  color: var(--bleu-nuit);
  background: var(--accent-clair);
  border-radius: 50%;
}

.carte-jeu__duree {
  font-size: 0.9rem;
  font-weight: 800;
  padding: 0.2rem 0.7rem;
  border-radius: var(--rayon-pilule);
  background: rgb(255 255 255 / 75%);
  color: var(--bleu-nuit);
}

.carte-jeu__corps {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.1rem 1.25rem 1.25rem;
}

.carte-jeu__titre {
  font-size: 1.35rem;
}

.carte-jeu__titre a {
  color: inherit;
  text-decoration: none;
}

/* Toute la carte est cliquable */
.carte-jeu__titre a::after {
  content: '';
  position: absolute;
  inset: 0;
}

.carte-jeu__preparation {
  margin-top: auto;
  font-size: 0.92rem;
  color: var(--texte-doux);
}

.carte-jeu__jouer {
  margin-top: 0.6rem;
  font-weight: 800;
  color: var(--bleu-nuit);
}

/* ---------- Accueil d'un jeu ---------- */

.intro {
  display: flex;
  gap: clamp(1.25rem, 2.6vw, 2.5rem);
  align-items: flex-start;
  border-top: 6px solid var(--accent);
}

.intro__icone {
  flex: none;
  display: grid;
  place-items: center;
  width: 5.5rem;
  height: 5.5rem;
  margin: 0;
  font-size: 3rem;
  background: var(--accent-clair);
  border-radius: 50%;
}

.intro__accroche {
  margin: 0 0 1.1rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.regles {
  margin: 0 0 1.1rem;
  padding-left: 1.3rem;
  line-height: 1.55;
}

.regles li {
  margin-bottom: 0.55rem;
}

.regles li::marker {
  font-weight: 800;
  color: var(--bleu-nuit);
}

.intro__duree {
  margin: 0;
  font-weight: 700;
  color: var(--texte-doux);
}

.ajout-prenom {
  margin-bottom: 1rem;
}

/* Boutons « Préparer le contenu » : un peu d'air sous le texte d'aide */
.bloc-contenu .groupe-boutons {
  margin-top: 1rem;
}

.bloc-participants__compte {
  font-weight: 700;
  color: var(--texte-doux);
}

.puces {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.puce {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.35rem 0.25rem 0.9rem;
  font-weight: 700;
  background: var(--accent-clair);
  border-radius: var(--rayon-pilule);
}

.puce__retirer {
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  font: inherit;
  font-size: 0.8rem;
  color: var(--bleu-nuit);
  background: rgb(255 255 255 / 80%);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.puce__retirer:hover {
  color: var(--blanc);
  background: var(--erreur);
}

.puce__modifier:hover {
  color: var(--blanc);
  background: var(--bleu-numerique);
}

.puce__info {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--texte-doux);
}

.puce__info::before {
  content: '·';
  margin-right: 0.3rem;
}

/* « Marie est déjà dans le groupe : voici « Marie 2 ». » */
.ajout-prenom__homonymes {
  margin: 0.4rem 0 0;
  font-weight: 700;
  color: var(--bleu-nuit);
}

.ajout-prenom__homonymes:empty {
  display: none;
}

.ajout-prenom__info-titre {
  margin: 0.9rem 0 0.3rem;
}

/* Le thème, puis l'info en dessous, sur toute la largeur : la colonne est trop étroite pour
   les deux côte à côte */
.ajout-prenom__info {
  flex-direction: column;
  align-items: stretch;
}

/* Thème puis info, l'un sous l'autre : sur téléphone, la base de largeur des champs (11rem)
   deviendrait leur hauteur */
.ajout-prenom__info > .champ__controle {
  flex: none;
}

.ajout-prenom__theme {
  flex: none;
  align-self: flex-start;
  width: auto;
  max-width: 14rem;
}

.roue-detail {
  min-height: 1.5em;
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
  color: var(--texte-doux);
}

.podium__info {
  max-width: 100%;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--texte-doux);
}

.etat {
  font-size: 1.15rem;
  font-weight: 800;
}

.etat--ko {
  color: var(--erreur);
}

.intro__lancer {
  flex: none;
  align-self: center;
  margin-left: auto;
  text-align: center;
}

.intro__lancer .champ__aide {
  max-width: 16rem;
}

.ecran__entete {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.barre-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding: 1rem 0;
  background: linear-gradient(to top, var(--fond) 75%, transparent);
}

/* ---------- Éditeur de contenu ---------- */

.editeur__outils {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.editeur__reglages {
  margin: 0 0 1.5rem;
  border: 0;
}

.editeur__reglages legend {
  float: left;
  width: 100%;
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--bleu-nuit);
}

.editeur__intertitre {
  margin-top: 0.5rem;
}

.editeur__elements {
  display: grid;
  gap: 1rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.editeur__element {
  border-left: 6px solid var(--accent);
}

.editeur__entete-element {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.editeur__titre-element {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}

.editeur__actions-element {
  display: flex;
  gap: 0.35rem;
}

.liste-champ {
  display: grid;
  gap: 0.5rem;
  margin: 0.5rem 0;
  padding: 0;
  list-style: none;
}

.liste-champ__ligne {
  display: grid;
  grid-template-columns: 6.5rem 1fr auto;
  gap: 0.5rem;
  align-items: center;
}

.liste-champ__numero {
  font-weight: 700;
  color: var(--texte-doux);
}

/* Téléphone : « Étape 1 » au-dessus de son champ, qui garde toute la largeur pour le texte */
@media (max-width: 480px) {
  .liste-champ__ligne {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 0.15rem;
  }

  .liste-champ__numero {
    grid-column: 1 / -1;
    font-size: 0.9rem;
  }
}

/* Réponses masquées : points à la place des lettres, flou sur le reste */
.editeur--masque input.secret,
.editeur--masque textarea.secret {
  -webkit-text-security: disc;
}

@supports not (-webkit-text-security: disc) {
  .editeur--masque input.secret,
  .editeur--masque textarea.secret {
    filter: blur(6px);
  }
}

/* Champ vide : le texte grisé n'est qu'un exemple, inutile de le masquer */
.editeur--masque input.secret:placeholder-shown,
.editeur--masque textarea.secret:placeholder-shown {
  -webkit-text-security: none;
  filter: none;
}

.champ__controle::placeholder {
  font-style: italic;
}

.editeur--masque select.secret,
.editeur--masque .champ-image__cadre.secret {
  filter: blur(10px);
}

.champ-image {
  display: grid;
  place-items: center;
  gap: 0.4rem;
  min-height: 9rem;
  padding: 1rem;
  text-align: center;
  border: 3px dashed var(--bord);
  border-radius: var(--rayon);
  background: var(--fond);
}

.champ-image:focus,
.champ-image--survol {
  border-color: var(--bleu);
  background: var(--bleu-clair);
  outline: none;
}

.champ-image__invite {
  margin: 0;
  font-weight: 800;
  color: var(--bleu-nuit);
}

.champ-image__ou {
  margin: 0;
  color: var(--texte-doux);
}

.champ-image__cadre {
  position: relative;
  max-width: 100%;
  line-height: 0;
  cursor: crosshair;
}

.champ-image__apercu {
  max-height: 260px;
  border-radius: 8px;
}

.champ-image__marqueur {
  position: absolute;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 4px solid var(--rouge);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--blanc);
  pointer-events: none;
}

.champ-image__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
  margin: 0;
}

/* ---------- Roue ---------- */

.roue {
  position: relative;
  width: min(100%, 420px);
  margin: 0 auto;
}

/* L'ombre de la roue, immobile sous le SVG qui tourne (un drop-shadow sur le SVG serait
   recalculé à chaque image de la rotation) : un disque de même rayon (96 sur 200) */
.roue::before {
  content: '';
  position: absolute;
  inset: 2%;
  border-radius: 50%;
  box-shadow: 0 6px 14px rgb(14 16 39 / 25%);
}

/* Rogne les coins du SVG tourné : une roue arrêtée en biais dépassait de son cadre et agrandissait
   la fenêtre (un rognage rectangulaire ne coûte rien à l'animation) */
.roue__plateau {
  position: relative;
  overflow: hidden;
}

.roue__svg {
  display: block;
  width: 100%;
  height: auto;
}

.roue__disque {
  font-family: var(--police);
}

.roue__moyeu {
  fill: var(--bleu-nuit);
  stroke: var(--blanc);
  stroke-width: 3;
}

.roue__pointeur {
  position: absolute;
  top: -6px;
  left: 50%;
  z-index: 1;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-top: 30px solid var(--bleu-nuit);
  filter: drop-shadow(0 2px 2px rgb(0 0 0 / 30%));
}

.roue-resultat {
  /* Une ligne réservée, vide pendant la rotation : la fenêtre garde sa hauteur (sinon elle
     grandissait à chaque résultat, et son ascenseur apparaissait ou sautait) */
  min-height: 1.2em;
  margin: 1rem 0 0.5rem;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  color: var(--bleu-nuit);
}

.dialogue--roue {
  width: min(94vw, 560px);
}

/* La fenêtre tient dans l'écran sans ascenseur : la roue prend la hauteur laissée par le titre,
   le résultat et les boutons (environ 20rem) */
.dialogue--roue .roue {
  width: min(100%, 420px, 50vh, calc(92vh - 20rem));
}

.dialogue--roue .roue-resultat {
  margin: 0.5rem 0 0.25rem;
}

/* Téléphone : les deux boutons toujours l'un sous l'autre. Côte à côte, « Relancer » tenait sur
   la ligne de « C'est parti ! » mais pas « Lancer la roue » : la fenêtre changeait de hauteur */
@media (max-width: 480px) {
  .dialogue--roue .dialogue__pied {
    flex-direction: column;
    align-items: stretch;
  }
}

.grille-prenoms {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.6rem;
}

.puce-prenom {
  font: inherit;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--bleu-nuit);
  padding: 0.75rem 0.5rem;
  background: var(--fond);
  border: 2px solid var(--bord);
  border-radius: var(--rayon);
  cursor: pointer;
}

.puce-prenom:hover {
  background: var(--accent-clair);
}

.puce-prenom[aria-pressed='true'] {
  color: var(--sur-accent);
  background: var(--accent);
  border-color: var(--bleu-nuit);
}

.puce-prenom__coche {
  display: none;
}

.puce-prenom[aria-pressed='true'] .puce-prenom__coche {
  display: inline-block;
}

.dialogue__sous-titre {
  margin: 0.75rem 0 0.4rem;
  font-weight: 800;
  color: var(--bleu-nuit);
}

.grille-equipes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: 0.6rem;
}

.puce-equipe {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  align-items: center;
  padding: 0.7rem 0.75rem;
  font: inherit;
  color: var(--bleu-nuit);
  text-align: center;
  background: var(--accent-clair);
  border: 2px solid var(--bord);
  border-radius: var(--rayon);
  cursor: pointer;
}

.puce-equipe:hover {
  border-color: var(--bleu-nuit);
}

.puce-equipe[aria-pressed='true'] {
  color: var(--sur-accent);
  background: var(--accent);
  border-color: var(--bleu-nuit);
}

.puce-equipe__nom {
  font-size: 1.15rem;
  font-weight: 800;
}

.puce-equipe__nom .icone {
  margin-right: 0.35rem;
}

.puce-equipe__membres {
  font-size: 0.9rem;
  font-weight: 600;
}

.puce-equipe[aria-pressed='true'] .puce-prenom__coche {
  display: inline-block;
}

/* ---------- Écran de jeu ---------- */

/* Respiration des écrans de jeu. Au vidéoprojecteur, les écarts grandissent avec la hauteur de
   l'écran : très aérés en 1920 × 1080, et l'écran tient toujours en 1280 × 720 sans défiler. Sur
   téléphone, ils suivent la largeur, pour garder la place au contenu. */
.ecran-jeu,
.ecran-fin {
  /* Entre deux blocs : question, plateau, boutons */
  --air: clamp(1rem, min(6vh - 1.5rem, 4.5vw), 3.5rem);
  /* Entre deux éléments voisins : lignes d'une liste, cases, puces */
  --air-serre: clamp(0.5rem, min(2.2vh - 0.4rem, 2.2vw), 1.25rem);
  /* Dans une case de texte (indice, étape, réponse) : en haut et en bas, puis sur les côtés */
  --case-v: clamp(0.45rem, min(2.2vh - 0.5rem, 2.4vw), 1.25rem);
  --case-h: clamp(0.9rem, min(2.2vh, 3vw), 1.75rem);
  /* Hauteur laissée au panneau du jeu sous le bandeau, la barre des points et les marges du cadre
   (avec de quoi accueillir des points sur deux lignes) : un panneau qui la prend en min-height
   occupe l'écran sans le faire défiler */
  --hauteur-jeu: calc(93vh - 9.5rem);
}

.ecran-jeu__barre {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(0.6rem, 3vh - 0.5rem, 1.75rem);
}

.tableau-points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tableau-points__entree {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  padding: 0.2rem 0.3rem 0.2rem 0.8rem;
  font-weight: 700;
  background: var(--blanc);
  border-radius: var(--rayon-pilule);
  box-shadow: var(--ombre);
}

.tableau-points__valeur {
  min-width: 1.8rem;
  padding: 0 0.4rem;
  font-weight: 900;
  text-align: center;
  color: var(--blanc);
  background: var(--bleu-nuit);
  border-radius: var(--rayon-pilule);
}

.tableau-points__entree--tete .tableau-points__valeur {
  color: var(--bleu-nuit);
  background: var(--jaune);
}

.ecran-jeu__points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  align-items: center;
  justify-content: flex-end;
}

.ecran-jeu__points .tableau-points {
  justify-content: flex-end;
}

/* Sur grand écran, les points restent à côté de « Quitter la partie », sur deux lignes au plus
   (équipes, puis personnes) : passer dessous coûterait une ligne de plus en 1280 × 720 */
@media (min-width: 900px) {
  .ecran-jeu__barre {
    flex-wrap: nowrap;
  }

  .ecran-jeu__barre > .bouton {
    flex: none;
  }

  .ecran-jeu__points {
    flex: 1 1 0;
    min-width: 0;
  }
}

.tableau-points__entree--equipe {
  font-weight: 800;
  color: var(--sur-accent);
  background: var(--accent);
}

.tableau-points__entree--equipe .icone {
  margin-right: -0.1rem;
}

.zone-jeu {
  font-size: clamp(1.1rem, 1.5vw, 1.45rem);
}

.panneau {
  padding: clamp(1rem, min(3vw, 6vh - 1.25rem), 3.5rem);
  text-align: center;
  background: var(--blanc);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
}

.panneau__surtitre {
  margin: 0 0 var(--air-serre, 0.5rem);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--texte-doux);
}

.panneau__texte {
  font-size: clamp(1.6rem, 3.2vw, 2.8rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--bleu-nuit);
}

.au-tour-de {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 var(--air-serre, 1rem);
  padding: 0.35rem 1.1rem;
  font-weight: 800;
  border-radius: var(--rayon-pilule);
  background: var(--accent-clair);
}

.reponse-revelee {
  margin: var(--air-serre, 1rem) auto 0;
  padding: calc(var(--case-v, 0.75rem) * 1.25) var(--case-h, 1.25rem);
  max-width: 50rem;
  border-radius: var(--rayon);
  background: var(--accent-clair);
}

.reponse-revelee__valeur {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  font-weight: 900;
  color: var(--bleu-nuit);
}

/* « Voir la réponse » pendant une pause : la réponse se pose sur la question, dans la même case, qui
   garde la taille de la plus grande des deux. Rien ne bouge : « Cacher la réponse » reste sous la
   souris. */
.case-reponse {
  display: grid;
  place-items: center;
}

.case-reponse > * {
  grid-area: 1 / 1;
}

.case-reponse > .reponse-apercu,
.case-reponse--vue > :not(.reponse-apercu) {
  visibility: hidden;
}

.case-reponse--vue > .reponse-apercu {
  visibility: visible;
}

.reponse-apercu {
  padding: var(--case-v, 0.5rem) var(--case-h, 1.25rem);
  text-align: center;
  border-radius: var(--rayon);
  background: var(--accent-clair);
}

.reponse-apercu .panneau__surtitre {
  margin-bottom: 0.15rem;
}

.reponse-apercu__valeur {
  margin: 0;
  font-size: clamp(1.4rem, 2.6vw, 2.2rem);
  font-weight: 900;
  line-height: 1.15;
  color: var(--bleu-nuit);
  text-wrap: balance;
}

.actions-jeu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(0.75rem, 1.6vh, 1.25rem);
  margin-top: var(--air, 1.5rem);
}

.raccourci {
  margin: var(--air-serre, 0.75rem) 0 0;
  font-size: 0.95rem;
  color: var(--texte-doux);
}

/* Manche terminée, ou réponse affichée (« Voir la réponse ») : on retire les aides devenues
   inutiles pour laisser la place au résultat */
.manche-finie .raccourci,
.reponse-vue .raccourci {
  display: none;
}

/* ---------- Chrono ---------- */

.chrono {
  margin: var(--air, 1.5rem) auto 0;
  max-width: 40rem;
}

.chrono__temps {
  display: block;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--bleu-nuit);
}

.chrono__barre {
  height: 14px;
  margin-top: 0.75rem;
  overflow: hidden;
  background: var(--fond);
  border-radius: var(--rayon-pilule);
}

.chrono__progression {
  height: 100%;
  width: 100%;
  background: var(--accent);
  border-radius: inherit;
  transform-origin: left;
  transition: transform 0.1s linear;
}

.chrono--urgent .chrono__temps {
  color: var(--erreur);
  animation: battement 0.5s ease-in-out infinite alternate;
}

.chrono--urgent .chrono__progression {
  background: var(--erreur);
}

/* Chrono terminé : plus petit pour laisser la place au résultat */
.chrono--compact {
  margin-top: 0.75rem;
}

.chrono--compact .chrono__temps {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  animation: none;
}

.chrono--compact .chrono__barre {
  display: none;
}

@keyframes battement {
  to {
    transform: scale(1.06);
  }
}

/* ---------- Paliers 5 4 3 2 1 ---------- */

.paliers {
  display: flex;
  justify-content: center;
  gap: clamp(0.6rem, min(1.8vw, 2.6vh), 1.75rem);
  margin: 0 0 var(--air, 1.5rem);
  padding: 0;
  list-style: none;
}

.paliers__chiffre {
  display: grid;
  place-items: center;
  width: clamp(3.5rem, min(8vw, 12vh), 7rem);
  aspect-ratio: 1;
  font-size: clamp(2rem, min(5vw, 7.2vh), 4.2rem);
  font-weight: 900;
  color: var(--sur-accent);
  background: var(--accent);
  border-radius: 50%;
  box-shadow:
    0 0 0 4px var(--blanc),
    0 6px 16px rgb(14 16 39 / 20%);
  transition:
    background-color 0.3s ease,
    opacity 0.3s ease,
    transform 0.3s ease;
}

.paliers__chiffre--actif {
  transform: scale(1.12);
}

.paliers__chiffre--eteint {
  color: var(--gris);
  background: var(--bord);
  opacity: 0.45;
  transform: scale(0.88);
}

/* ---------- Écran de fin ---------- */

.ecran-fin {
  position: relative;
  text-align: center;
}

.fin__titre {
  margin-bottom: var(--air-serre);
  font-size: clamp(2.2rem, min(5vw, 7vh), 4.25rem);
}

.fin__message {
  margin: 0 0 var(--air-serre);
  font-size: clamp(1.15rem, min(2vw, 2.6vh), 1.6rem);
  font-weight: 700;
}

.fin__equipes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.fin__equipe {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0.4rem 0.5rem 0.4rem 1rem;
  font-size: 1.15rem;
  font-weight: 800;
  background: var(--blanc);
  border-radius: var(--rayon-pilule);
  box-shadow: var(--ombre);
}

.fin__equipe-points {
  padding: 0.1rem 0.6rem;
  color: var(--blanc);
  background: var(--bleu-nuit);
  border-radius: var(--rayon-pilule);
}

.fin__equipe--tete .fin__equipe-points {
  color: var(--bleu-nuit);
  background: var(--jaune);
}

@media (min-width: 900px) {
  .fin__resultats--deux {
    display: grid;
    grid-template-columns: auto minmax(18rem, 34rem);
    gap: clamp(2rem, 5vw, 6rem);
    align-items: center;
    justify-content: center;
    margin: var(--air) 0;
  }

  .fin__resultats--deux .podium,
  .fin__resultats--deux .classement {
    margin: 0;
  }
}

/* Lien vers les scores du groupe, sous les boutons de fin de partie */
.fin__scores {
  margin: var(--air-serre) 0 0;
  font-weight: 700;
  text-align: center;
}

/* Icône et texte à la suite, comme une phrase : sur deux lignes, l'icône reste avec le texte */
.fin__scores a {
  color: var(--bleu-nuit);
}

.podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(0.6rem, 1.5vw, 1.5rem);
  margin: var(--air) 0;
  padding: 0;
  list-style: none;
}

.podium__marche {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  width: min(30vw, clamp(200px, 25vh, 290px));
  padding: var(--case-h) 0.5rem;
  border-radius: var(--rayon) var(--rayon) 0 0;
  background: var(--accent-clair);
}

.podium__marche--1 {
  order: 2;
  min-height: clamp(220px, 30vh, 340px);
  background: var(--jaune);
}

.podium__marche--2 {
  order: 1;
  min-height: clamp(170px, 23vh, 260px);
}

.podium__marche--3 {
  order: 3;
  min-height: clamp(130px, 17.5vh, 200px);
}

.podium__medaille {
  font-size: clamp(2.6rem, 5vh, 3.75rem);
  color: var(--bleu-nuit);
}

.podium__marche--2 .podium__medaille {
  color: var(--gris);
}

.podium__marche--3 .podium__medaille {
  color: var(--orange);
}

.podium__prenom {
  margin-top: 0.25rem;
  font-size: clamp(1.4rem, 2.8vh, 2.1rem);
  font-weight: 900;
  color: var(--bleu-nuit);
  word-break: break-word;
}

.podium__points {
  font-size: clamp(1rem, 2vh, 1.4rem);
  font-weight: 800;
}

.classement {
  max-width: 34rem;
  margin: 0 auto var(--air);
  font-size: clamp(1rem, 2vh, 1.35rem);
  padding: 0;
  list-style: none;
  text-align: left;
}

.classement__ligne {
  display: grid;
  grid-template-columns: 2.5em 1fr auto;
  gap: 0.5rem 1rem;
  padding: clamp(0.5rem, 1.4vh - 0.15rem, 0.9rem) 1rem;
  border-bottom: 1px solid var(--bord);
}

.classement__rang {
  font-weight: 900;
}

.classement__points {
  font-weight: 800;
}

.confettis {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.confettis span {
  position: absolute;
  top: -20px;
  width: 12px;
  height: 18px;
  border-radius: 3px;
  opacity: 0;
  animation: tomber 3.2s ease-in forwards;
}

.confettis span:nth-child(4n + 1) {
  background: var(--vert);
}
.confettis span:nth-child(4n + 2) {
  background: var(--jaune);
}
.confettis span:nth-child(4n + 3) {
  background: var(--rose);
}
.confettis span:nth-child(4n) {
  background: var(--bleu);
}

.confettis span:nth-child(1) {
  left: 4%;
  animation-delay: 0s;
}
.confettis span:nth-child(2) {
  left: 9%;
  animation-delay: 0.4s;
}
.confettis span:nth-child(3) {
  left: 14%;
  animation-delay: 0.1s;
}
.confettis span:nth-child(4) {
  left: 19%;
  animation-delay: 0.7s;
}
.confettis span:nth-child(5) {
  left: 24%;
  animation-delay: 0.2s;
}
.confettis span:nth-child(6) {
  left: 29%;
  animation-delay: 0.9s;
}
.confettis span:nth-child(7) {
  left: 34%;
  animation-delay: 0.3s;
}
.confettis span:nth-child(8) {
  left: 39%;
  animation-delay: 0.6s;
}
.confettis span:nth-child(9) {
  left: 44%;
  animation-delay: 0s;
}
.confettis span:nth-child(10) {
  left: 49%;
  animation-delay: 0.8s;
}
.confettis span:nth-child(11) {
  left: 54%;
  animation-delay: 0.15s;
}
.confettis span:nth-child(12) {
  left: 59%;
  animation-delay: 0.5s;
}
.confettis span:nth-child(13) {
  left: 64%;
  animation-delay: 0.25s;
}
.confettis span:nth-child(14) {
  left: 69%;
  animation-delay: 1s;
}
.confettis span:nth-child(15) {
  left: 74%;
  animation-delay: 0.35s;
}
.confettis span:nth-child(16) {
  left: 79%;
  animation-delay: 0.65s;
}
.confettis span:nth-child(17) {
  left: 84%;
  animation-delay: 0.05s;
}
.confettis span:nth-child(18) {
  left: 89%;
  animation-delay: 0.75s;
}
.confettis span:nth-child(19) {
  left: 94%;
  animation-delay: 0.45s;
}
.confettis span:nth-child(20) {
  left: 7%;
  animation-delay: 1.1s;
}
.confettis span:nth-child(21) {
  left: 37%;
  animation-delay: 1.2s;
}
.confettis span:nth-child(22) {
  left: 62%;
  animation-delay: 1.3s;
}
.confettis span:nth-child(23) {
  left: 87%;
  animation-delay: 1.15s;
}
.confettis span:nth-child(24) {
  left: 52%;
  animation-delay: 1.4s;
}

@keyframes tomber {
  0% {
    opacity: 1;
    transform: translateY(0) rotate(0);
  }
  100% {
    opacity: 0;
    transform: translateY(80vh) rotate(540deg);
  }
}

/* ---------- Illustrations des jeux (illustration.js) ---------- */

/* Même taille de référence, même ombre portée : chaque jeu peut ajuster --taille */
.illustration {
  --taille: clamp(5.5rem, min(12vw, 16vh), 9rem);
  flex: none;
  width: var(--taille);
}

/* L'ombre est sur le dessin et non sur .illustration, que les réactions font bouger : elle est
   ainsi calculée une fois, puis déplacée avec le reste (pas recalculée à chaque image) */
.illustration__dessin {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 8px 10px rgb(14 16 39 / 16%));
}

.illustration text {
  font-family: var(--police);
  font-weight: 900;
  text-anchor: middle;
  dominant-baseline: central;
}

/* Palette commune des dessins : les aplats de la charte, une ombre et un reflet identiques */
.ill-accent {
  fill: var(--accent);
}
.ill-accent-clair {
  fill: var(--accent-clair);
}
.ill-nuit {
  fill: var(--bleu-nuit);
}
.ill-blanc {
  fill: var(--blanc);
}
.ill-jaune {
  fill: var(--jaune);
}
.ill-orange {
  fill: var(--orange);
}
.ill-rouge {
  fill: var(--rouge);
}
.ill-rose {
  fill: var(--rose);
}
.ill-bleu {
  fill: var(--bleu);
}
.ill-violet {
  fill: var(--violet);
}
.ill-ombre {
  fill: rgb(14 16 39 / 16%);
}
.ill-reflet {
  fill: rgb(255 255 255 / 45%);
}
.ill-trait {
  fill: none;
  stroke: var(--bleu-nuit);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ill-texte-nuit {
  fill: var(--bleu-nuit);
}
.ill-texte-accent {
  fill: var(--sur-accent);
}

/* Réactions courtes, rejouées par illustration.reagir() */
.illustration--hop {
  animation: illustration-hop 0.5s ease-out;
}

.illustration--secousse {
  animation: secouer 0.4s ease;
}

.illustration--fete {
  animation: illustration-fete 0.8s ease-out;
}

@keyframes illustration-hop {
  35% {
    transform: translateY(-14%);
  }
  70% {
    transform: translateY(3%);
  }
}

@keyframes illustration-fete {
  25% {
    transform: scale(1.15) rotate(-6deg);
  }
  55% {
    transform: scale(0.96) rotate(4deg);
  }
  80% {
    transform: scale(1.04) rotate(-1deg);
  }
}

/* ---------- Animations courtes ---------- */

.secousse {
  animation: secouer 0.4s ease;
}

@keyframes secouer {
  20%,
  60% {
    transform: translateX(-8px);
  }
  40%,
  80% {
    transform: translateX(8px);
  }
}

.apparition {
  animation: apparaitre 0.35s ease-out;
}

@keyframes apparaitre {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
}

@media (max-width: 700px) {
  .intro {
    flex-direction: column;
  }
  /* Les points décoratifs restent dans les coins : sur un écran étroit, ils passaient sous le texte
     (le vert, dans le coin en haut à gauche : à droite, il passait sous « Les outils ») */
  .points-deco span:nth-child(1) {
    width: 56px;
    height: 56px;
    right: auto;
    left: -24px;
    top: -24px;
  }
  .points-deco span:nth-child(2) {
    width: 28px;
    height: 28px;
    right: 8%;
    top: auto;
    bottom: 16px;
  }
  .points-deco span:nth-child(3) {
    right: -24px;
    top: auto;
    bottom: -24px;
  }
  /* À droite du titre, pas contre le nom « Mini-jeux » de la signature */
  .points-deco span:nth-child(4) {
    width: 18px;
    height: 18px;
    right: 8%;
    top: 7.5rem;
  }
  .points-deco span:nth-child(5) {
    display: none;
  }
}

/* ---------- Écran de mot de passe (acces.js) ---------- */
.porte-acces {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 1rem;
  overflow-y: auto;
  background: var(--bleu-nuit);
  color: var(--blanc);
}

.porte-acces__carte {
  width: min(100%, 30rem);
  text-align: center;
}

.porte-acces__logo {
  display: block;
  width: 200px;
  height: auto;
  margin: 0 auto 2rem;
}

.porte-acces__titre {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 900;
  color: var(--blanc);
}

.porte-acces__titre .icone {
  color: var(--vert);
}

.porte-acces__formulaire {
  margin-top: 1.75rem;
  text-align: left;
}

.porte-acces__formulaire .champ__libelle {
  color: var(--blanc);
}

.porte-acces__ligne {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.4rem;
}

.porte-acces__ligne .champ__controle {
  flex: 1;
  min-width: 0;
}

.porte-acces__erreur {
  min-height: 1.5em;
  margin: 0.75rem 0 0;
  color: var(--rose);
  font-weight: 700;
}

/* ---------- Le groupe : page, plan de salle, fenêtre de consultation ---------- */

.groupe-colonnes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

@media (min-width: 1000px) {
  .groupe-colonnes {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    align-items: start;
  }
}

/* ---------- Équipes du groupe ---------- */

.bloc-equipes {
  margin: 1.5rem 0;
}

.bloc-equipes h3 {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin: 0;
}

.bloc-equipes h3 .fa-solid {
  color: var(--vert);
}

.bloc-equipes__former {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: flex-end;
  margin: 1rem 0;
}

.bloc-equipes__former .champ {
  margin: 0;
}

.bloc-equipes__etat {
  margin: 0 0 1rem;
  font-weight: 700;
}

.equipes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: 1rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.equipe {
  padding: 0.9rem;
  background: var(--fond);
  border: 2px solid var(--bord);
  border-radius: var(--rayon);
}

.equipe__entete {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.equipe__entete > .icone {
  color: var(--vert-logo);
}

.equipe__nom.champ__controle {
  flex: 1;
  min-width: 0;
  font-weight: 800;
}

.equipe__compte {
  margin: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--texte-doux);
}

.equipe__membres {
  margin: 0;
}

.equipes__seuls .puces {
  margin-top: 0.4rem;
}

/* Une personne d'une équipe : un bouton, qui la change d'équipe */
.puce--bouton {
  padding-right: 0.6rem;
  font: inherit;
  font-weight: 700;
  color: var(--bleu-nuit);
  border: 2px solid transparent;
  cursor: pointer;
}

.puce--bouton:hover {
  border-color: var(--bleu-nuit);
}

.puce__changer {
  font-size: 0.8rem;
  color: var(--texte-doux);
}

.bloc-scores__sous-titre {
  margin: 1.25rem 0 0;
  font-size: 1.1rem;
}

/* ---------- Scores du groupe (tous jeux confondus) ---------- */

.bloc-scores h3 {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin: 0;
}

.bloc-scores h3 .fa-solid {
  color: var(--vert);
}

.bloc-scores__etat {
  margin: 0.5rem 0 0;
  font-weight: 700;
}

.scores-groupe {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 24rem), 1fr));
  gap: 0.6rem 1.25rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.scores-groupe__ligne {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.55rem 0.75rem;
  background: var(--fond);
  border-radius: 10px;
}

.scores-groupe__ligne--tete {
  background: var(--jaune-clair);
}

.scores-groupe__ligne--absente .scores-groupe__prenom {
  color: var(--texte-doux);
}

.scores-groupe__rang {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--bleu-nuit);
  text-align: right;
}

.scores-groupe__qui {
  display: grid;
  min-width: 0;
}

.scores-groupe__prenom {
  overflow-wrap: anywhere;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--bleu-nuit);
}

.scores-groupe__detail {
  font-size: 0.85rem;
  color: var(--texte-doux);
}

.scores-groupe__morceau {
  white-space: nowrap;
}

.scores-groupe__commandes {
  display: flex;
  gap: 0.3rem;
  align-items: center;
}

.scores-groupe__bouton {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  /* Sans le rembourrage du navigateur : l'icône, plus large que la place restante, se calait à
     gauche et débordait à droite */
  padding: 0;
  font: inherit;
  color: var(--bleu-nuit);
  background: var(--blanc);
  border: 2px solid var(--bord);
  border-radius: 50%;
  cursor: pointer;
}

.scores-groupe__bouton:hover {
  border-color: var(--bleu-nuit);
}

/* Le total tapé va jusqu'à −9999 : le champ s'élargit avec son nombre au lieu de le couper.
   Sans field-sizing (Firefox, Safari), il a d'emblée la place de cinq caractères. */
.champ__controle.scores-groupe__total {
  width: calc(5ch + 2.2rem);
  padding-inline: 0.4rem;
  font-size: 1.2rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  text-align: center;
  /* Ni flèches haut / bas (les boutons − et + suffisent) : Chrome leur gardait une place à droite,
     et le nombre n'était plus au centre */
  appearance: textfield;
}

.champ__controle.scores-groupe__total::-webkit-inner-spin-button,
.champ__controle.scores-groupe__total::-webkit-outer-spin-button {
  appearance: none;
  margin: 0;
}

@media (max-width: 640px) {
  /* Le rang garde la place de deux chiffres (« 12. ») */
  .scores-groupe__ligne {
    grid-template-columns: 1.9rem minmax(0, 1fr) auto;
    gap: 0.5rem;
    padding-inline: 0.6rem;
  }

  .scores-groupe__rang {
    font-size: 1rem;
    white-space: nowrap;
  }

  .scores-groupe__bouton {
    width: 2rem;
    height: 2rem;
  }

  .champ__controle.scores-groupe__total {
    width: calc(5ch + 0.8rem);
  }
}

/* Téléphone : le détail (« Motus numérique : 3 · Correction : +1 ») passe sous le prénom et les
   boutons, sur toute la largeur, au lieu d'être coupé dans une colonne étroite */
@media (max-width: 480px) {
  .scores-groupe__ligne {
    grid-template-areas:
      'rang prenom commandes'
      '. detail detail';
    row-gap: 0.2rem;
  }

  .scores-groupe__rang {
    grid-area: rang;
  }

  .scores-groupe__qui {
    display: contents;
  }

  .scores-groupe__prenom {
    grid-area: prenom;
  }

  .scores-groupe__detail {
    grid-area: detail;
  }

  .scores-groupe__commandes {
    grid-area: commandes;
  }
}

/* Avec field-sizing, le champ prend juste la largeur de son nombre */
@supports (field-sizing: content) {
  .champ__controle.scores-groupe__total {
    field-sizing: content;
    width: auto;
    min-width: 4.5rem;
  }

  @media (max-width: 640px) {
    .champ__controle.scores-groupe__total {
      min-width: 3.4rem;
    }
  }
}

/* Avatar : un rond aux initiales, une couleur de la charte par personne (rang dans la liste),
   et un petit badge pour le thème de son info (cœur, film, dessert…) */
.avatar {
  position: relative;
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 2.4em;
  height: 2.4em;
  font-weight: 900;
  line-height: 1;
  color: var(--bleu-nuit);
  background: var(--vert);
  border-radius: 50%;
  box-shadow:
    0 0 0 0.12em var(--blanc),
    var(--ombre-avatar);
}

.avatar--c1 {
  background: var(--vert);
}
.avatar--c2 {
  background: var(--jaune);
}
.avatar--c3 {
  background: var(--rose);
}
.avatar--c4 {
  background: var(--bleu);
}
.avatar--c5 {
  background: var(--violet);
}
.avatar--c6 {
  background: var(--orange);
}
.avatar--c7 {
  background: var(--ciel);
}
.avatar--c8 {
  color: var(--blanc);
  background: var(--bleu-numerique);
}

.avatar--mini {
  width: 1.9em;
  height: 1.9em;
  font-size: 0.8em;
}

.avatar--libre {
  color: var(--texte-doux);
  background: var(--blanc);
  border: 2px dashed var(--gris);
  box-shadow: none;
}

.avatar__badge {
  position: absolute;
  right: -12%;
  bottom: -12%;
  display: grid;
  place-items: center;
  width: 46%;
  aspect-ratio: 1;
  font-size: 0.42em;
  color: var(--bleu-nuit);
  background: var(--blanc);
  border-radius: 50%;
  box-shadow: var(--ombre-avatar);
}

.avatar__badge .icone {
  margin: 0;
}

.avatar--mini .avatar__badge {
  display: none;
}

/* ---------- Réglages : dispositions en aperçus miniatures, taille, placement ---------- */

.plan-salle__reglages {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.plan-salle__dispositions {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.plan-salle__choix {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 8.5rem), 1fr));
  gap: 0.6rem;
}

.disposition {
  position: relative;
  display: grid;
  gap: 0.4rem;
  padding: 0.5rem 0.5rem 0.45rem;
  text-align: center;
  background: var(--blanc);
  border: 2px solid var(--bord);
  border-radius: var(--rayon);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.disposition__nom {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--bleu-nuit);
}

.disposition__apercu {
  position: relative;
  display: block;
  container-type: inline-size;
  aspect-ratio: 100 / 70;
  background: var(--fond);
  border-radius: 8px;
  overflow: hidden;
}

.disposition__table {
  position: absolute;
  background: var(--blanc);
  border: 1px solid var(--bord);
  border-radius: 2px;
}

.disposition__table--arrondie {
  border-radius: 6px;
}

.disposition__table--u {
  background: none;
  border: calc(var(--ep) * 1cqi) solid var(--blanc);
  border-top: 0;
  border-radius: 0 0 4px 4px;
  filter: var(--ombre-table-forme);
}

.disposition__point {
  position: absolute;
  background: var(--gris);
  border-radius: 50%;
}

.disposition:has(input:checked) {
  border-color: var(--bleu-nuit);
  box-shadow: 0 0 0 3px var(--accent-clair);
}

.disposition:has(input:checked) .disposition__apercu {
  background: var(--accent-clair);
}

.disposition:has(input:checked) .disposition__point {
  background: var(--bleu-nuit);
}

.disposition__coche {
  position: absolute;
  top: -0.55rem;
  right: -0.55rem;
  display: none;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  font-size: 0.75rem;
  color: var(--blanc);
  background: var(--bleu-nuit);
  border: 2px solid var(--blanc);
  border-radius: 50%;
}

.disposition__coche .icone {
  margin: 0;
}

.disposition:has(input:checked) .disposition__coche {
  display: grid;
}

.disposition:has(input:focus-visible) {
  outline: 3px solid var(--bleu);
  outline-offset: 3px;
}

@media (hover: hover) {
  .disposition:hover {
    transform: translateY(-2px);
    box-shadow: var(--ombre);
  }
}

/* Téléphone : les quatre dispositions sur une ligne */
@media (max-width: 600px) {
  .plan-salle__choix {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.4rem;
  }

  .disposition {
    padding: 0.3rem 0.3rem 0.35rem;
  }

  .disposition__nom {
    font-size: 0.72rem;
  }
}

.plan-salle__barre {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.plan-salle__tailles {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1rem;
}

.plan-salle__tailles .champ,
.plan-salle__reglages > .champ__aide {
  margin: 0;
}

.champ__controle--court {
  max-width: 8rem;
}

/* ---------- La salle ---------- */

/* 100 × 70 unités carrées, l'écran en haut. Places et tables sont posées en pourcentages ;
   la taille des avatars et des prénoms suit la taille des places (--s, en unités cqi). */
.salle {
  position: relative;
  width: 100%;
  aspect-ratio: 100 / 70;
  container-type: inline-size;
  overflow: hidden;
  background-color: var(--fond);
  background-image: radial-gradient(var(--bord) 1.2px, transparent 1.6px);
  background-size: 22px 22px;
  border: 1px solid var(--bord);
  border-radius: 22px;
}

.salle__ecran {
  position: absolute;
  top: 2.2%;
  left: 36%;
  width: 28%;
  height: 5.5%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-size: clamp(0.6rem, 1.45cqi, 1rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blanc);
  background: var(--bleu-nuit);
  border-radius: var(--rayon-pilule);
  box-shadow: 0 0 0 4px var(--accent-clair);
}

.salle__ecran .icone {
  margin: 0;
  color: var(--accent);
}

/* La lumière du vidéoprojecteur, de l'écran vers la salle */
.salle__faisceau {
  position: absolute;
  top: 7%;
  left: 20%;
  width: 60%;
  height: 62%;
  background: linear-gradient(to bottom, var(--accent-clair), transparent 90%);
  clip-path: polygon(27% 0, 73% 0, 100% 100%, 0 100%);
  opacity: 0.75;
  pointer-events: none;
}

.salle__table {
  position: absolute;
  display: grid;
  place-items: center;
  background: var(--blanc);
  border: 1px solid var(--bord);
  border-radius: clamp(4px, 1cqi, 12px);
  box-shadow: var(--ombre-table);
}

.salle__table--arrondie {
  border-radius: clamp(10px, 3.5cqi, 48px);
}

/* Table en U d'un seul tenant : trois branches dessinées par la bordure (épaisseur --ep) ;
   l'ombre suit la forme du U */
.salle__table--u {
  background: none;
  border: calc(var(--ep) * 1cqi) solid var(--blanc);
  border-top: 0;
  border-radius: 0 0 clamp(8px, 3cqi, 36px) clamp(8px, 3cqi, 36px);
  box-shadow: none;
  filter: var(--ombre-table-forme);
}

.salle__table-libelle {
  font-size: clamp(0.55rem, 1.25cqi, 0.95rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--texte-doux);
}

/* Une place : l'avatar, le prénom en étiquette blanche, l'info en dessous */
.salle__place {
  --d: calc(var(--s) * 0.56cqi);
  position: absolute;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: calc(var(--s) * 0.05cqi);
  padding: 0;
  font: inherit;
  color: var(--bleu-nuit);
  background: none;
  border: 0;
  cursor: pointer;
}

/* Place au-dessus d'une table : l'avatar en bas, contre la table, le prénom au-dessus */
.salle__place--inverse {
  flex-direction: column-reverse;
}

.salle__avatar {
  width: var(--d);
  height: var(--d);
  font-size: calc(var(--d) * 0.42);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.salle__avatar.avatar--libre {
  font-size: calc(var(--d) * 0.34);
}

.salle__nom {
  max-width: calc(var(--s) * 1cqi + 2.5cqi);
  padding: 0.12em 0.6em;
  overflow: hidden;
  font-size: clamp(0.6rem, calc(var(--s) * 0.155cqi), 1.6rem);
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
  background: var(--blanc);
  border-radius: var(--rayon-pilule);
  box-shadow: var(--ombre-avatar);
}

.salle__info {
  max-width: calc(var(--s) * 1cqi + 2cqi);
  overflow: hidden;
  font-size: clamp(0.55rem, calc(var(--s) * 0.105cqi), 1.05rem);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--texte-doux);
}

/* Beaucoup de monde, ou petit écran : l'info disparaît, puis le prénom (gardé en info-bulle) */
.salle--serree .salle__info,
.salle--minuscule .salle__info,
.salle--minuscule .salle__nom {
  display: none;
}

.salle--minuscule .salle__place {
  --d: calc(var(--s) * 0.8cqi);
  justify-content: center;
}

/* Petit plan (téléphone) : des avatars plus grands dans chaque place, sans l'info ; au-delà
   d'une douzaine de places, les initiales seules (les prénoms sont dans la liste) */
@container (max-width: 560px) {
  .salle__place {
    --d: calc(var(--s) * 0.66cqi);
  }

  .salle__info,
  .salle--serree .salle__nom {
    display: none;
  }

  .salle--serree .salle__place {
    --d: calc(var(--s) * 0.8cqi);
    justify-content: center;
  }
}

.salle__place:focus-visible {
  outline: none;
}

.salle__place:focus-visible .salle__avatar {
  outline: 3px solid var(--bleu);
  outline-offset: 3px;
}

@media (hover: hover) {
  .plan-salle--modifiable .salle__place:hover .salle__avatar,
  .salle__place:hover .salle__avatar {
    transform: translateY(-2px) scale(1.05);
  }

  .salle__place:hover .avatar--libre {
    border-color: var(--bleu-nuit);
    background: var(--accent-clair);
  }
}

/* Place visée pendant un glisser, ou touchée en consultation */
.salle__place--visee .salle__avatar,
.salle__place--choisie .salle__avatar {
  transform: scale(1.12);
  box-shadow:
    0 0 0 calc(var(--d) * 0.06) var(--blanc),
    0 0 0 calc(var(--d) * 0.13) var(--jaune),
    var(--ombre-avatar);
}

.salle__place--visee .avatar--libre {
  border-color: var(--bleu-nuit);
  background: var(--jaune-clair);
}

/* Glisser-déposer : on saisit les personnes placées et les prénoms à placer au doigt */
.plan-salle--modifiable .salle__place:not(.salle__place--libre),
.plan-salle__puce {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.salle__fantome {
  position: fixed;
  z-index: 2000;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.9rem 0.3rem 0.35rem;
  font-weight: 900;
  color: var(--bleu-nuit);
  background: var(--blanc);
  border-radius: var(--rayon-pilule);
  box-shadow: var(--ombre-forte);
  pointer-events: none;
  transform: translate(-50%, -130%) rotate(-3deg);
}

/* ---------- À placer ---------- */

.plan-salle__a-placer {
  margin-top: 1.25rem;
}

.plan-salle__titre {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.6rem;
  font-size: 1.1rem;
}

.plan-salle__compte {
  min-width: 1.7rem;
  padding: 0 0.45rem;
  font-size: 0.9rem;
  text-align: center;
  color: var(--blanc);
  background: var(--bleu-nuit);
  border-radius: var(--rayon-pilule);
}

.plan-salle__puces {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.6rem;
  padding: 0;
  list-style: none;
}

.plan-salle__puce,
.puce-prenom--avatar {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.9rem 0.3rem 0.35rem;
  font: inherit;
  font-weight: 800;
  color: var(--bleu-nuit);
  background: var(--blanc);
  border: 2px solid var(--bord);
  border-radius: var(--rayon-pilule);
  box-shadow: var(--ombre);
  cursor: grab;
}

.puce-prenom--avatar {
  justify-content: flex-start;
  cursor: pointer;
}

.plan-salle__puce[aria-pressed='true'] {
  background: var(--accent-clair);
  border-color: var(--bleu-nuit);
}

.plan-salle__puce .avatar,
.puce-prenom--avatar .avatar {
  box-shadow: none;
}

/* ---------- Consultation ---------- */

.plan-salle__detail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.2em;
  margin: 0.75rem 0 0;
  font-size: 1.1rem;
  text-align: center;
}

.dialogue--groupe {
  width: min(96vw, 1100px);
}

/* Dans la fenêtre, le plan tient dans la hauteur de l'écran (vidéoprojecteur 1280 × 720) */
.dialogue--groupe .salle {
  width: min(100%, 52vh * 100 / 70);
  margin: 0 auto;
}

.liste-groupe {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  gap: 0.25rem 1rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.liste-groupe__ligne {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--bord);
}

.liste-groupe__ligne .avatar {
  font-size: 0.95rem;
  box-shadow: none;
}

.liste-groupe__texte {
  display: grid;
  flex: 1;
  min-width: 0;
}

.liste-groupe__prenom {
  font-size: 1.1rem;
  line-height: 1.2;
  color: var(--bleu-nuit);
}

.liste-groupe__info {
  overflow: hidden;
  font-size: 0.9rem;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--texte-doux);
}

.liste-groupe__place {
  flex: none;
  padding: 0.1rem 0.55rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--bleu-nuit);
  background: var(--fond);
  border-radius: var(--rayon-pilule);
}

/* Grand écran : la liste à côté du plan, qui peut alors être plus grand */
@media (min-width: 900px) {
  .dialogue--groupe .dialogue__corps:has(.liste-groupe) {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    align-items: start;
    gap: 1.5rem;
  }

  .dialogue--groupe .salle {
    width: min(100%, 66vh * 100 / 70);
  }

  .dialogue--groupe .liste-groupe {
    grid-template-columns: 1fr;
    margin: 0;
  }
}

/* ---------- Absences du jour ---------- */

.puce--absente {
  background: var(--fond);
  outline: 2px dashed var(--bord);
}

.puce--absente .puce__prenom {
  color: var(--texte-doux);
  text-decoration: line-through;
}

.puce__absence {
  padding: 0 0.45rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--texte-doux);
  background: var(--blanc);
  border-radius: var(--rayon-pilule);
}

.puce__basculer-absence[aria-pressed='true'] {
  color: var(--blanc);
  background: var(--bleu-nuit);
}

.avatar--absent {
  color: var(--texte-doux);
  background: var(--bord);
}

.salle__place--absente .salle__nom {
  color: var(--texte-doux);
  text-decoration: line-through;
}

.liste-groupe__ligne--absente .liste-groupe__prenom {
  color: var(--texte-doux);
  text-decoration: line-through;
}

/* ---------- Qui joue ? (accueil d'un jeu) ---------- */

.bloc-joueurs__entete {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
}

.bloc-joueurs__entete h3 {
  margin: 0;
}

.bloc-joueurs__corps {
  display: grid;
  gap: 0.85rem;
}

.bloc-joueurs__corps > p {
  margin: 0;
}

/* Sélecteur segmenté : Tout le groupe / Choisir / Au hasard */
.segments {
  display: inline-flex;
  flex-wrap: wrap;
  justify-self: start;
  gap: 0.25rem;
  margin: 0;
  padding: 0.25rem;
  background: var(--fond);
  border: 1px solid var(--bord);
  border-radius: var(--rayon-pilule);
}

.segment {
  padding: 0.4rem 1rem;
  font-weight: 800;
  color: var(--texte-doux);
  border-radius: var(--rayon-pilule);
  cursor: pointer;
}

.segment:has(input:checked) {
  color: var(--bleu-nuit);
  background: var(--blanc);
  box-shadow: var(--ombre);
}

/* Téléphone : trois segments sur une ligne, chacun à la largeur de son texte (« Tout le groupe »
   ne passe à la ligne que s'il le faut vraiment) */
@media (max-width: 600px) {
  .segments {
    display: grid;
    grid-template-columns: repeat(3, auto);
    justify-self: stretch;
  }

  .segment {
    display: grid;
    place-items: center;
    padding: 0.4rem 0.3rem;
    font-size: 0.85rem;
    line-height: 1.2;
    text-align: center;
  }
}

.segment:has(input:focus-visible) {
  outline: 3px solid var(--bleu);
  outline-offset: 2px;
}

.bloc-joueurs__tirage .champ__libelle {
  margin-bottom: 0.3rem;
}

.bloc-joueurs__liste {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.joueur {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.9rem 0.3rem 0.35rem;
  font: inherit;
  font-weight: 800;
  color: var(--bleu-nuit);
  background: var(--blanc);
  border: 2px solid var(--bleu-nuit);
  border-radius: var(--rayon-pilule);
  cursor: pointer;
}

.joueur .avatar {
  box-shadow: none;
}

/* Ne joue pas : grisé, en pointillés */
.joueur[aria-pressed='false'] {
  color: var(--texte-doux);
  background: var(--fond);
  border: 2px dashed var(--gris);
}

.joueur[aria-pressed='false'] .avatar {
  color: var(--texte-doux);
  background: var(--bord);
}

@media (hover: hover) {
  .joueur:hover {
    background: var(--accent-clair);
  }
}

.bloc-joueurs__compte {
  font-weight: 700;
  color: var(--texte-doux);
}

/* ---------- Blocs d’export et d’import JSON ---------- */

.bloc-fichier-groupe,
.bloc-fichier-contenus,
.bloc-consultation,
.bloc-thematiques {
  margin-top: 1.5rem;
}

.bloc-fichier-groupe__ligne,
.bloc-fichier-contenus__ligne {
  display: flex;
  margin-top: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: flex-end;
}

.bloc-fichier-groupe__nom,
.bloc-fichier-contenus__titre {
  flex: 1 1 18rem;
  margin: 0;
}

.bloc-fichier-contenus__ligne .groupe-boutons {
  margin-bottom: 1.6rem;
}

.bloc-fichier-groupe__ligne + .champ__aide {
  margin-top: 0.75rem;
}

/* ---------- Les contenus : thématiques, jeu de données, consultation ---------- */

.grille-thematiques {
  display: grid;
  /* 3 cartes par ligne au vidéoprojecteur : les 3 boutons tiennent sur une ligne */
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1.25rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.carte-thematique {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  height: 100%;
  border-top: 6px solid var(--accent);
}

.carte-thematique--exemples {
  border-top-color: var(--bord);
}

.carte-thematique__entete {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.carte-thematique__icone {
  display: grid;
  flex: none;
  place-items: center;
  width: 3.2rem;
  height: 3.2rem;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--bleu-nuit);
  background: var(--accent-clair);
  border-radius: 50%;
}

.carte-thematique__titre {
  margin: 0;
  font-size: 1.3rem;
}

.carte-thematique__description,
.carte-thematique__jeux,
.carte-thematique__chargee {
  margin: 0;
}

.carte-thematique__jeux {
  margin-top: auto;
  font-size: 0.92rem;
  color: var(--texte-doux);
}

.carte-thematique__chargee {
  font-weight: 800;
  color: var(--succes);
}

/* Trois boutons dans une carte étroite : plus compacts */
.carte-thematique .groupe-boutons {
  gap: 0.5rem;
}

.carte-thematique .bouton {
  padding: 0.45em 0.9em;
}

.carte-thematique__statut {
  margin: 0.25rem 0 0;
}

/* Modifier, JSON, Supprimer : une ligne de petits boutons sous Charger et Aperçu */
.carte-thematique__outils {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.carte-thematique .carte-thematique__outils .bouton {
  padding: 0.3em 0.7em;
  font-size: 0.9rem;
}

.bloc-thematiques__outils {
  margin-top: 1rem;
}

/* Fenêtre d'une thématique : assez large pour les icônes sur deux lignes (elle tient en 1280 × 720) */
.dialogue--fiche {
  width: min(94vw, 760px);
}

.choix-icones__grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(2.7rem, 1fr));
  gap: 0.35rem;
}

.choix-icone {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  font-size: 1.25rem;
  color: var(--bleu-nuit);
  background: var(--blanc);
  border: 2px solid var(--bord);
  border-radius: 10px;
  cursor: pointer;
}

.choix-icone .icone {
  margin: 0;
}

.choix-icone:has(input:checked) {
  background: var(--accent-clair);
  border-color: var(--bleu-nuit);
}

.choix-icone:has(input:focus-visible) {
  outline: 3px solid var(--bleu);
  outline-offset: 2px;
}

@media (hover: hover) {
  .choix-icone:hover {
    background: var(--accent-clair);
  }
}

/* Consultation d'une thématique : son nom, puis Modifier et Charger */
.consultation__thematique {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--fond);
  border-radius: var(--rayon);
}

.consultation__thematique-textes {
  flex: 1 1 16rem;
}

.consultation__thematique-titre {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--bleu-nuit);
}

.consultation__thematique .champ__aide {
  margin: 0;
}

.bloc-consultation__choix {
  max-width: 32rem;
}

.consultation__jeux {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.apercu-jeu {
  border: 2px solid var(--bord);
  border-radius: var(--rayon);
}

.apercu-jeu[open] {
  border-color: var(--accent);
}

.apercu-jeu__resume {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.7rem 1rem;
  list-style: none;
  cursor: pointer;
}

.apercu-jeu__resume::-webkit-details-marker {
  display: none;
}

.apercu-jeu__icone {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--bleu-nuit);
  background: var(--accent-clair);
  border-radius: 50%;
}

.apercu-jeu__textes {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.apercu-jeu__titre {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--bleu-nuit);
}

.apercu-jeu__etat {
  color: var(--texte-doux);
}

.apercu-jeu__etat .etiquette {
  margin-left: 0.4rem;
}

.apercu-jeu__etat--ko {
  font-weight: 700;
  color: var(--erreur);
}

.apercu-jeu__chevron {
  flex: none;
  transition: transform 0.15s ease;
}

.apercu-jeu[open] .apercu-jeu__chevron {
  transform: rotate(180deg);
}

.apercu-jeu__corps {
  padding: 0 1rem 1rem;
}

.apercu-jeu__elements {
  display: grid;
  gap: 0.6rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.apercu-element {
  padding: 0.7rem 1rem;
  background: var(--fond);
  border-radius: 10px;
}

.apercu-element__numero {
  margin: 0 0 0.35rem;
  font-weight: 800;
  color: var(--bleu-nuit);
}

.apercu-element__champs {
  display: grid;
  gap: 0.35rem;
  margin: 0;
}

.apercu-element__champ {
  display: grid;
  grid-template-columns: minmax(9rem, 16rem) minmax(0, 1fr);
  gap: 1rem;
}

.apercu-element__champ dt {
  font-weight: 700;
  color: var(--texte-doux);
}

.apercu-element__champ dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.apercu-element__liste {
  margin: 0;
  padding-left: 1.3rem;
}

.apercu-element__image {
  display: block;
  max-width: min(100%, 20rem);
  max-height: 12rem;
  border-radius: 6px;
}

/* Réponses floutées tant que l'animateur ne les affiche pas (l'éditeur a son propre bouton) */
.consultation--masque .apercu-jeu__elements .secret {
  filter: blur(7px);
  user-select: none;
}

/* Modification sur place, depuis la consultation */
.apercu-jeu__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.8rem;
}

.apercu-jeu__edition {
  display: grid;
  gap: 1rem;
}

.apercu-jeu__edition .barre-actions {
  margin-top: 0;
}

@media (max-width: 640px) {
  .apercu-element__champ {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
}
