/* Décors du jeu « devine le joueur » et les éléments venus avec les comptes.

   Le décor est un stade dessiné en CSS (projecteurs, tribune, pelouse en perspective) :
   aucune image à charger. Il se pose derrière le jeu, qui garde des panneaux presque
   opaques : le décor habille, il ne doit jamais gêner la lecture d'une case.

   Cinq décors, débloqués par les points : nuit au stade (offert), après-midi au soleil,
   années 70, sous la neige, tribune d'honneur. Chacun redéfinit les teintes du jeu à
   l'intérieur de #vue-jeu, sans toucher à la discussion. */

/* ------------------------------------------------------------------ socle */
#vue-jeu { position: relative; isolation: isolate; color: var(--text); }
/* Sous le décor fixe, la couleur du bas de la scène : rien de clair ne dépasse en défilant. */
#vue-jeu[class*="decor-"] { background: var(--bg); }
#vue-jeu > .jeu { position: relative; z-index: 1; }
.jeu-decor { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.jeu-decor > span { position: absolute; display: block; }

.projecteur {
  top: -8vh; width: 46vw; height: 82vh;
  background: linear-gradient(180deg, rgba(255, 252, 230, 0.32), rgba(255, 252, 230, 0) 82%);
  clip-path: polygon(44% 0, 56% 0, 100% 100%, 0 100%);
  filter: blur(8px);
  opacity: 0.5;
  transform-origin: top center;
}
.projecteur::before {
  /* la rampe de lampes en haut du pylône */
  content: ""; position: absolute; left: 50%; top: 2vh; width: 64px; height: 26px; transform: translateX(-50%);
  background: radial-gradient(circle, #fffdf0 0 3px, transparent 4px) 0 0 / 13px 13px;
  filter: drop-shadow(0 0 10px #fff8d0) drop-shadow(0 0 26px rgba(255, 245, 200, 0.8));
}
.projecteur.gauche { left: -8vw; transform: rotate(-26deg); }
.projecteur.droite { right: -8vw; transform: rotate(26deg); }

.tribune {
  left: -2vw; right: -2vw; bottom: 33vh; height: 19vh; opacity: 0.7;
  background:
    linear-gradient(180deg, rgba(4, 9, 21, 0.55) 0%, rgba(4, 9, 21, 0) 60%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.12) 0 1.6px, transparent 2.4px) 0 0 / 11px 9px,
    radial-gradient(circle at 50% 50%, rgba(207, 46, 46, 0.32) 0 1.8px, transparent 2.6px) 3px 4px / 17px 13px,
    radial-gradient(circle at 50% 50%, rgba(70, 130, 255, 0.28) 0 1.8px, transparent 2.6px) 8px 2px / 23px 11px,
    linear-gradient(180deg, #111a30 0%, #0c1324 100%);
  box-shadow: inset 0 10px 18px rgba(0, 0, 0, 0.55);
}
.tribune::after {
  /* les flashs des photographes */
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle, #fff 0 1.5px, transparent 2.5px) 12% 30% / 140px 60px,
    radial-gradient(circle, #fff 0 1.5px, transparent 2.5px) 63% 70% / 190px 70px;
  animation: flashs 7s steps(2, end) infinite;
  opacity: 0.45;
}
@keyframes flashs { 50% { opacity: 0; background-position: 40% 60%, 20% 20%; } }

.pelouse {
  left: -30vw; right: -30vw; bottom: -6vh; height: 46vh;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(255, 255, 255, 0.55) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    repeating-linear-gradient(90deg, #165f2f 0 7vw, #1b6d37 7vw 14vw);
  transform: perspective(520px) rotateX(58deg);
  transform-origin: 50% 100%;
  border-top: 2px solid rgba(255, 255, 255, 0.5);
}
.pelouse::before {
  content: ""; position: absolute; left: 50%; top: 42%; width: 22vw; height: 22vw;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255, 255, 255, 0.5); border-radius: 50%;
}
.flocons { display: none; inset: -20vh 0 0 0; }

/* ------------------------------------------------------------------ teintes communes */
#vue-jeu[class*="decor-"] .jeu-profil,
#vue-jeu[class*="decor-"] .jeu-missions,
#vue-jeu[class*="decor-"] #jeu-input,
#vue-jeu[class*="decor-"] .jeu-message,
#vue-jeu[class*="decor-"] .cellule.joueur,
#vue-jeu[class*="decor-"] .salon-carte,
#vue-jeu[class*="decor-"] .salon-joueur,
#vue-jeu[class*="decor-"] .salon-bandeau,
#vue-jeu[class*="decor-"] .jeu-indices li {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
/* Ce qui est écrit à même le décor garde un contour sombre, pour rester lisible sur la foule. */
#vue-jeu[class*="decor-"] .jeu-aide,
#vue-jeu[class*="decor-"] .jeu-legende,
#vue-jeu[class*="decor-"] .jeu-restants,
#vue-jeu[class*="decor-"] .jeu-en-jeu,
#vue-jeu[class*="decor-"] .salon-tete { text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75), 0 0 8px rgba(0, 0, 0, 0.5); }
#vue-jeu.decor-pelouse .jeu-aide,
#vue-jeu.decor-pelouse .jeu-legende,
#vue-jeu.decor-pelouse .jeu-restants,
#vue-jeu.decor-pelouse .jeu-en-jeu,
#vue-jeu.decor-pelouse .salon-tete { text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8); }

/* Nuit au stade : le décor par défaut. Bleu pour le jeu, et les trois teintes du verdict,
   pleines, que rien d'autre n'emprunte. */
#vue-jeu.decor-nuit, #vue-jeu.decor-neige, #vue-jeu.decor-or, #vue-jeu.decor-retro, #vue-jeu.decor-champion {
  --bg: #0b1426;
  --panel: rgba(15, 23, 43, 0.86);
  --panel-plein: #121c33;
  --raised: #16213b;
  --text: #f2f5fb;
  --muted: #a7b2c8;
  --border: rgba(255, 255, 255, 0.15);
  --border-soft: rgba(255, 255, 255, 0.08);
  --bubble-user: #1d2a46;
  --accent: #8fa6ff;
  --accent-wash: rgba(143, 166, 255, 0.16);
  --jeu-marque: #5b7cff;
  --jeu-marque-vif: #8a5cff;
  --jeu-marque-fond: rgba(107, 140, 255, 0.18);
  --jeu-exact: #1f9d57;
  --jeu-exact-fond: rgba(31, 157, 87, 0.22);
  --jeu-proche: #f5c83a;
  --jeu-proche-encre: #f5c83a;
  --jeu-proche-fond: rgba(245, 200, 58, 0.18);
  --jeu-faux: #cf4550;
  --jeu-faux-fond: rgba(207, 69, 80, 0.18);
}
#vue-jeu.decor-nuit .jeu-decor { background: linear-gradient(180deg, #040915 0%, #0a1630 40%, #0b2617 72%, #0a3a1f 100%); }

/* Après-midi au soleil : ciel clair, pelouse vive, teintes du jeu d'origine. */
#vue-jeu.decor-pelouse {
  --bg: #eef6ff;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-plein: #ffffff;
  --text: #13261a;
  --muted: #4a6152;
  --border: rgba(19, 38, 26, 0.14);
  --border-soft: rgba(19, 38, 26, 0.07);
  --jeu-proche-encre: #8a6200;
}
#vue-jeu.decor-pelouse .jeu-decor { background: linear-gradient(180deg, #7cc4ff 0%, #bfe3ff 38%, #d9f0c9 64%, #3f9d4f 100%); }
#vue-jeu.decor-pelouse .projecteur { display: none; }
#vue-jeu.decor-pelouse .jeu-decor::before {
  content: ""; position: absolute; top: 6vh; right: 10vw; width: 18vh; height: 18vh; border-radius: 50%;
  background: radial-gradient(circle, #fff7c2 0 35%, rgba(255, 236, 140, 0.55) 50%, transparent 70%);
}
#vue-jeu.decor-pelouse .tribune {
  background:
    radial-gradient(circle, rgba(207, 46, 46, 0.7) 0 1.8px, transparent 2.6px) 3px 4px / 15px 12px,
    radial-gradient(circle, rgba(40, 90, 220, 0.6) 0 1.8px, transparent 2.6px) 8px 2px / 21px 11px,
    radial-gradient(circle, rgba(255, 255, 255, 0.9) 0 1.6px, transparent 2.4px) 0 0 / 11px 9px,
    linear-gradient(180deg, #8d9db0 0%, #6f7f93 100%);
}
#vue-jeu.decor-pelouse .tribune::after { display: none; }
#vue-jeu.decor-pelouse .pelouse { background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(255, 255, 255, 0.75) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    repeating-linear-gradient(90deg, #2f9a45 0 7vw, #39ab51 7vw 14vw); }

/* Années 70 : sépia, tableau d'affichage à palettes, orange de l'époque. */
#vue-jeu.decor-retro {
  --bg: #241810;
  --panel: rgba(38, 26, 16, 0.9);
  --panel-plein: #2c1f13;
  --text: #f6e7cf;
  --muted: #c9ae88;
  --border: rgba(246, 231, 207, 0.18);
  --jeu-marque: #e0782b;
  --jeu-marque-vif: #c75f17;
  --jeu-marque-fond: rgba(224, 120, 43, 0.2);
  --jeu-exact: #5f9e32;
  --jeu-exact-fond: rgba(95, 158, 50, 0.2);
  --jeu-proche: #ffc35c;
  --jeu-proche-encre: #ffc35c;
  --jeu-faux: #c4493a;
  --jeu-faux-fond: rgba(196, 73, 58, 0.18);
}
#vue-jeu.decor-retro .jeu-decor {
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.06) 0 2px, transparent 2px 4px),
    linear-gradient(180deg, #1d130b 0%, #3b2716 45%, #4a4320 75%, #5a5326 100%);
  filter: sepia(0.35);
}
#vue-jeu.decor-retro .pelouse { background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(255, 240, 210, 0.5) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    repeating-linear-gradient(90deg, #5e6a2a 0 7vw, #6b7731 7vw 14vw); }
#vue-jeu.decor-retro .jeu-entete { background: #161009; border: 2px solid #3a2a18; box-shadow: inset 0 0 0 4px #000, 0 8px 22px rgba(0, 0, 0, 0.5); }
#vue-jeu.decor-retro .jeu-titre h2,
#vue-jeu.decor-retro .jeu-numero { color: #ffb24a; font-family: "Courier New", ui-monospace, monospace; letter-spacing: 0.06em; text-transform: uppercase; }
#vue-jeu.decor-retro .cellule:not(.joueur) { font-family: "Courier New", ui-monospace, monospace; text-transform: uppercase; letter-spacing: 0.03em; }

/* Sous la neige : pelouse blanchie, flocons qui tombent. */
#vue-jeu.decor-neige .jeu-decor { background: linear-gradient(180deg, #0a1324 0%, #1a2a44 45%, #8aa0b6 72%, #dfe8ef 100%); }
#vue-jeu.decor-neige .pelouse { background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(40, 70, 110, 0.5) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    repeating-linear-gradient(90deg, #dce6ee 0 7vw, #eef3f7 7vw 14vw); border-top-color: #fff; }
#vue-jeu.decor-neige .flocons {
  display: block;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 2px, transparent 3px) 0 0 / 90px 90px,
    radial-gradient(circle, rgba(255, 255, 255, 0.7) 0 1.4px, transparent 2.4px) 30px 45px / 60px 70px,
    radial-gradient(circle, rgba(255, 255, 255, 0.5) 0 1px, transparent 2px) 10px 20px / 40px 45px;
  animation: neige 14s linear infinite;
}
@keyframes neige { to { background-position: 40px 900px, 90px 700px, 30px 500px; } }

/* Tribune d'honneur : noir et or. */
#vue-jeu.decor-or {
  --bg: #0d0b08;
  --panel: rgba(22, 18, 12, 0.88);
  --panel-plein: #19140c;
  --text: #fbf3df;
  --muted: #cdbb8f;
  --border: rgba(212, 175, 55, 0.3);
  --jeu-marque: #c99a2e;
  --jeu-marque-vif: #a77b14;
  --jeu-marque-fond: rgba(212, 175, 55, 0.18);
}
#vue-jeu.decor-or .jeu-decor { background:
    radial-gradient(ellipse at 50% 0%, rgba(212, 175, 55, 0.35), transparent 55%),
    linear-gradient(180deg, #0b0906 0%, #1a140a 50%, #0f2a1a 78%, #0c3a20 100%); }
#vue-jeu.decor-or .projecteur { background: linear-gradient(180deg, rgba(255, 220, 120, 0.4), rgba(255, 220, 120, 0) 82%); }
#vue-jeu.decor-or .jeu-entete { background: linear-gradient(135deg, #e7c45b 0%, #a77b14 100%); color: #1b1408; }
#vue-jeu.decor-or .jeu-titre p { color: rgba(27, 20, 8, 0.8); }

/* La fenêtre reste opaque, quel que soit le décor. */
#vue-jeu .jeu-fenetre-carte { background: var(--panel-plein, var(--panel)); color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  .tribune::after, #vue-jeu.decor-neige .flocons { animation: none; }
}

/* ------------------------------------------------------------------ son */
.jeu-entete { position: relative; }
.jeu-sons { position: absolute; top: 12px; right: 12px; display: flex; gap: 6px; }
.jeu-sons button {
  width: 34px; height: 34px; padding: 0; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.14); color: #fff;
  font-size: 16px; line-height: 1;
}
.jeu-sons button:hover { background: rgba(255, 255, 255, 0.26); }
.jeu-sons button.coupe { opacity: 0.55; position: relative; }
.jeu-sons button.coupe::after {
  content: ""; position: absolute; left: 7px; right: 7px; top: 50%; height: 2px;
  background: #fff; transform: rotate(-35deg);
}
.jeu-titre { padding-right: 84px; }

/* ------------------------------------------------------------------ profil */
.jeu-profil-boutons { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.jeu-bouton-compte { font-weight: 600; }

/* ------------------------------------------------------------------ défis du jour */
.jeu-missions {
  padding: 12px 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.jeu-missions[hidden] { display: none; }
.jeu-missions-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.jeu-missions-tete strong { font-size: 14px; }
.jeu-missions-tete small { font-size: 12px; color: var(--muted); }
#jeu-missions-liste { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mission {
  position: relative; display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; align-items: start;
  padding: 9px 11px; border-radius: var(--radius-sm);
  background: var(--border-soft); font-size: 12.5px;
}
.mission.accomplie { background: var(--jeu-exact-fond); }
.mission-bonus { color: var(--jeu-proche-encre); font-size: 12.5px; white-space: nowrap; }
.mission.accomplie .mission-bonus { color: var(--jeu-exact); }
.mission-jauge { grid-column: 1 / -1; height: 5px; border-radius: 99px; background: var(--border); overflow: hidden; }
.mission-jauge > div { height: 100%; background: var(--jeu-exact); border-radius: inherit; transition: width 0.6s ease; }
.mission-compte { grid-column: 2; justify-self: end; margin-top: -2px; font-size: 10.5px; color: var(--muted); }

/* ------------------------------------------------------------------ bulles */
.jeu-toasts { position: fixed; z-index: 70; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.jeu-toast {
  padding: 11px 18px; border-radius: 999px;
  background: #13213b; color: #fff; font-weight: 600; font-size: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  animation: monte 0.35s ease-out;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.jeu-toast.toast-mission { background: linear-gradient(135deg, #2f8355, #1f6a42); }
.jeu-toast.part { opacity: 0; transform: translateY(8px); }

/* ------------------------------------------------------------------ compte */
.compte-onglets { display: flex; gap: 4px; flex-wrap: wrap; margin: 14px 0 12px; padding: 4px; border-radius: 999px; background: var(--border-soft); }
.compte-onglet { flex: 1; border: none; background: none; color: var(--muted); border-radius: 999px; padding: 7px 10px; font-size: 13px; white-space: nowrap; }
.compte-onglet.actif { background: var(--panel-plein, var(--panel)); color: var(--text); font-weight: 600; box-shadow: var(--shadow-soft); }
.compte-form { position: static; display: flex; flex-direction: column; gap: 10px; }
.compte-form .primary { background: var(--jeu-marque); color: #fff; border: none; padding: 11px; border-radius: var(--radius-sm); font-weight: 600; }
.compte-form .primary:disabled { opacity: 0.6; }
.compte-erreur { margin: 0; min-height: 1em; font-size: 13px; color: var(--jeu-faux); }
.code-secours {
  margin: 14px 0 4px; padding: 14px; text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 26px; font-weight: 700; letter-spacing: 0.12em;
  border: 2px dashed var(--jeu-proche); border-radius: var(--radius-sm); color: var(--jeu-proche-encre);
}
.compte-liens { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; font-size: 12.5px; }
.compte-liens a { color: var(--muted); }
/* Une zone de 37 px à toucher, sans écarter les lignes du texte qui l'entoure. */
.lien-danger, .lien { display: inline-block; background: none; border: none; padding: 8px 2px; margin: -8px 0; font-size: inherit; text-decoration: underline; cursor: pointer; }
.lien-danger { color: var(--jeu-faux); }
.lien { color: var(--jeu-marque); font-weight: 600; }

.decors { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.decor-carte {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 2px;
  min-height: 74px; padding: 9px; border-radius: var(--radius-sm);
  border: 2px solid transparent; color: #fff; text-align: left; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}
.decor-carte strong { font-size: 12.5px; }
.decor-carte small { font-size: 11px; opacity: 0.9; }
.decor-carte.actif { border-color: var(--jeu-proche-encre); box-shadow: 0 0 0 3px var(--jeu-proche-fond); }
.decor-carte:disabled { filter: grayscale(0.8) brightness(0.7); cursor: default; }
.apercu-nuit { background: linear-gradient(180deg, #050b1a 0%, #0b1730 55%, #165f2f 100%); }
.apercu-pelouse { background: linear-gradient(180deg, #7cc4ff 0%, #d9f0c9 55%, #39ab51 100%); }
.apercu-retro { background: linear-gradient(180deg, #1d130b 0%, #3b2716 55%, #6b7731 100%); }
.apercu-neige { background: radial-gradient(circle, #fff 0 1.5px, transparent 2.5px) 0 0 / 14px 14px, linear-gradient(180deg, #0a1324 0%, #8aa0b6 60%, #eef3f7 100%); }
.apercu-or { background: radial-gradient(ellipse at 50% 0%, rgba(231, 196, 91, 0.7), transparent 60%), linear-gradient(180deg, #1a140a 0%, #0c3a20 100%); }

/* ------------------------------------------------------------------ classements */
.classement { display: flex; flex-direction: column; gap: 4px; min-height: 120px; }
.classement-ligne {
  display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: var(--radius-sm); background: var(--border-soft);
}
.classement-ligne.moi { background: var(--jeu-marque-fond); outline: 1.5px solid var(--jeu-marque); }
.classement-rang { text-align: center; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.classement-valeur { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.classement-ecart { text-align: center; color: var(--muted); }

/* ------------------------------------------------------------------ QR code (salon) */
.fenetre-qr { text-align: center; }
.qr-image { display: block; width: min(260px, 70vw); height: auto; margin: 8px auto 4px; padding: 10px; background: #fff; border-radius: 16px; box-shadow: 0 8px 26px rgba(0, 0, 0, 0.3); }
.qr-ou { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.qr-lien { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.qr-code { margin: 2px 0 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 46px; font-weight: 800; letter-spacing: 0.22em; color: var(--jeu-marque); }
.qr-alerte { margin: 10px 0 0; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--jeu-proche-fond); font-size: 12.5px; text-align: left; }
.qr-joueurs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; min-height: 30px; }
.qr-joueur { padding: 5px 12px; border-radius: 999px; background: var(--jeu-exact-fond); color: var(--jeu-exact); font-weight: 600; font-size: 13px; animation: monte 0.35s ease-out; }
.qr-joueur.absent { opacity: 0.5; }

@media (max-width: 620px) {
  #jeu-missions-liste { grid-template-columns: 1fr; }
  .jeu-profil-boutons { margin-left: 0; width: 100%; }
  .jeu-profil-boutons button { flex: 1; }
  .qr-code { font-size: 38px; }
}

/* ------------------------------------------------------------------ réglages du son */
.jeu-panneau-son {
  position: absolute; top: 44px; right: 0; z-index: 30; width: 240px;
  display: flex; flex-direction: column; gap: 6px; padding: 10px;
  background: var(--panel-plein, var(--panel)); color: var(--text);
  border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  animation: monte 0.2s ease-out;
}
.jeu-panneau-son button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  width: auto; height: auto; padding: 8px 10px; border-radius: 10px;
  border: 1.5px solid var(--border); background: none; color: var(--text); font-size: 13px; text-align: left;
}
.jeu-panneau-son button small { font-size: 11px; color: var(--muted); }
.jeu-panneau-son button.actif { border-color: var(--jeu-marque); background: var(--jeu-marque-fond); }
.son-marche { font-weight: 600; }
.son-volume { display: flex; align-items: center; gap: 8px; padding: 4px 2px 0; font-size: 12.5px; color: var(--muted); }
.son-volume input { flex: 1; accent-color: var(--jeu-marque); }

/* ------------------------------------------------------------------ allure de jeu */
/* Titres et chiffres dans une police de stade : Bahnschrift (Windows), sinon une police
   étroite du système. Aucune police à télécharger. */
#vue-jeu .jeu-titre h2, #vue-jeu .fenetre-titre, #vue-jeu .hub-heros h3, #vue-jeu .fenetre-points,
#vue-jeu .hub-jouer, #vue-jeu .carte-maillot, #vue-jeu .jeu-rang-texte strong, #vue-jeu .podium-marche strong,
#vue-jeu .coffre-jour strong, #vue-jeu .hub-tuile strong {
  font-family: "Bahnschrift", "DIN Alternate", "Barlow Condensed", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
  font-stretch: condensed;
  letter-spacing: 0.01em;
}
#vue-jeu .jeu-titre h2 { font-size: 26px; text-transform: uppercase; letter-spacing: 0.04em; }
.jeu-zone-partie { display: flex; flex-direction: column; gap: 18px; }
.jeu-zone-partie[hidden], .jeu-accueil[hidden] { display: none; }
.jeu-modes #jeu-mode-accueil { font-size: 15px; padding: 6px 12px; }

/* ------------------------------------------------------------------ accueil */
.jeu-accueil { display: flex; flex-direction: column; gap: 16px; }

.hub-heros {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 26px;
  padding: 24px 26px;
  border-radius: 22px;
  background:
    radial-gradient(ellipse at 15% 20%, rgba(107, 140, 255, 0.35), transparent 55%),
    radial-gradient(ellipse at 90% 100%, rgba(138, 92, 255, 0.25), transparent 50%),
    linear-gradient(135deg, rgba(20, 30, 56, 0.94), rgba(12, 19, 38, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  color: #fff;
  position: relative; overflow: hidden;
}
.hub-heros::after {
  /* un reflet qui passe, comme sur une carte à collectionner */
  content: ""; position: absolute; top: -60%; left: -40%; width: 30%; height: 220%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  transform: rotate(18deg);
  animation: reflet 6s ease-in-out infinite;
}
@keyframes reflet { 0%, 60% { left: -40%; } 100% { left: 130%; } }
#vue-jeu.decor-pelouse .hub-heros { background: radial-gradient(ellipse at 15% 20%, rgba(107, 140, 255, 0.35), transparent 55%), linear-gradient(135deg, #1d3b6e, #12274a); }

/* la carte mystère : un maillot, son numéro (celui du jour), et le point d'interrogation */
.carte-mystere {
  position: relative; width: 150px; height: 190px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 18px;
  background: linear-gradient(160deg, #2a3a63, #121b33);
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5), 0 10px 30px rgba(0, 0, 0, 0.45);
  animation: flotte 4s ease-in-out infinite;
}
@keyframes flotte { 50% { transform: translateY(-6px) rotate(-1deg); } }
.carte-maillot {
  position: relative; width: 92px; height: 100px;
  display: grid; place-items: center;
  background: linear-gradient(180deg, var(--jeu-marque), var(--jeu-marque-vif));
  clip-path: polygon(22% 0, 38% 0, 50% 9%, 62% 0, 78% 0, 100% 14%, 92% 34%, 82% 30%, 82% 100%, 18% 100%, 18% 30%, 8% 34%, 0 14%);
  color: #fff; font-size: 38px; font-weight: 800;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
}
.carte-point {
  position: absolute; right: -12px; top: -12px;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: #ffd23f; color: #3b2a00; font-size: 26px; font-weight: 900;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 50% { transform: scale(1.12); } }
.jeu-accueil.joue .carte-point { animation: none; background: #4fc78d; color: #04230f; }

.hub-heros-texte { position: relative; z-index: 1; min-width: 0; }
.hub-surtitre { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #b9c6ff; }
.hub-heros h3 { margin: 4px 0 6px; font-size: 30px; line-height: 1.05; text-transform: uppercase; }
.hub-statut { margin: 0 0 16px; color: rgba(255, 255, 255, 0.82); font-size: 14.5px; }
.hub-jouer {
  padding: 14px 42px; border: none; border-radius: 999px;
  background: linear-gradient(180deg, #ffd23f, #f5a300); color: #2b1c00;
  font-size: 22px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
  box-shadow: 0 8px 0 #b77700, 0 14px 30px rgba(245, 163, 0, 0.45);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  animation: appel 2.4s ease-in-out infinite;
}
.hub-jouer:hover { transform: translateY(-2px); }
.hub-jouer:active { transform: translateY(6px); box-shadow: 0 2px 0 #b77700, 0 6px 14px rgba(245, 163, 0, 0.4); }
@keyframes appel { 50% { box-shadow: 0 8px 0 #b77700, 0 14px 40px rgba(255, 210, 63, 0.75); } }
.jeu-accueil.joue .hub-jouer { animation: none; background: linear-gradient(180deg, #ffffff, #dfe6f2); color: #13213b; box-shadow: 0 6px 0 #9aa6bb; font-size: 17px; padding: 12px 28px; }
.hub-minuteur { margin: 14px 0 0; font-size: 13px; color: rgba(255, 255, 255, 0.7); font-variant-numeric: tabular-nums; }

/* le coffre du jour */
.hub-coffre {
  display: flex; flex-direction: column; gap: 12px;
  padding: 16px 18px; border-radius: 18px;
  background: var(--panel); border: 1px solid var(--border);
}
.hub-coffre.pret { border-color: rgba(255, 210, 63, 0.55); box-shadow: 0 0 0 3px rgba(255, 210, 63, 0.12); }
.coffre-tete { display: flex; align-items: center; gap: 14px; }
.coffre-tete > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.coffre-tete small { color: var(--muted); font-size: 12.5px; }
.coffre-icone { font-size: 38px; line-height: 1; }
.hub-coffre.pret .coffre-icone { animation: secoue-coffre 2.2s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes secoue-coffre { 0%, 70%, 100% { transform: none; } 75% { transform: rotate(-10deg); } 80% { transform: rotate(9deg); } 85% { transform: rotate(-6deg); } 90% { transform: rotate(4deg); } }
.hub-coffre.ouverture .coffre-icone { animation: eclate 0.8s ease-out forwards; }
@keyframes eclate { 40% { transform: scale(1.5) rotate(-8deg); } 100% { transform: scale(0.2); opacity: 0; } }
.coffre-ouvrir {
  padding: 10px 22px; border: none; border-radius: 999px;
  background: linear-gradient(180deg, #ffd23f, #f5a300); color: #2b1c00; font-weight: 800;
  box-shadow: 0 5px 0 #b77700;
}
.coffre-ouvrir:active { transform: translateY(4px); box-shadow: 0 1px 0 #b77700; }
/* minmax(0, …) : sans lui, « +500 » imposait sa largeur à chaque case et la piste débordait
   de l'écran d'un petit téléphone (320 px, 29/10/2026). */
.coffre-piste { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.coffre-jour {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 7px 2px; border-radius: 10px;
  background: var(--border-soft); border: 1.5px solid transparent;
}
.coffre-jour small { font-size: 10.5px; color: var(--muted); }
.coffre-jour strong { font-size: 14px; }
.coffre-jour.fait { background: var(--jeu-exact-fond); color: var(--jeu-exact); }
.coffre-jour.aujourdhui { border-color: #ffd23f; background: rgba(255, 210, 63, 0.14); }
.coffre-jour:last-child strong { color: #ffd23f; }

/* les modes en tuiles */
.hub-tuiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.hub-tuile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 16px; border-radius: 18px; text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.14); color: #fff;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.hub-tuile:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(0, 0, 0, 0.35); }
.hub-tuile span { font-size: 30px; }
.hub-tuile strong { font-size: 19px; text-transform: uppercase; }
.hub-tuile small { font-size: 12.5px; opacity: 0.85; }
.tuile-libre { background: linear-gradient(135deg, #1f8a52, #126036); }
.tuile-groupe { background: linear-gradient(135deg, #3a5bd9, #24398f); }
.tuile-classement { background: linear-gradient(135deg, #c98a12, #8a5a05); }

/* le podium du jour */
.hub-podium { padding: 14px 16px 16px; border-radius: 18px; background: var(--panel); border: 1px solid var(--border); }
.hub-podium:empty { display: none; }
.hub-podium .fenetre-intertitre { margin-top: 0; text-align: center; }
.podium-marches { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 8px; max-width: 520px; margin: 0 auto; }
.podium-marche {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px;
  padding: 10px 6px; border-radius: 14px 14px 6px 6px;
  background: var(--panel); border: 1px solid var(--border); text-align: center; min-width: 0;
}
.podium-marche strong { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.podium-marche small { color: var(--muted); font-size: 12px; }
.podium-medaille { font-size: 28px; }
.podium-marche.place-1 { min-height: 128px; border-color: rgba(255, 210, 63, 0.6); background: linear-gradient(180deg, rgba(255, 210, 63, 0.18), var(--panel)); }
.podium-marche.place-2 { min-height: 104px; }
.podium-marche.place-3 { min-height: 88px; }
.podium-marche.moi { outline: 2px solid var(--jeu-marque); }

@media (prefers-reduced-motion: reduce) {
  .hub-heros::after, .carte-mystere, .carte-point, .hub-jouer, .hub-coffre.pret .coffre-icone { animation: none; }
}
@media (max-width: 620px) {
  .hub-heros { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 20px 16px; gap: 16px; }
  .hub-heros h3 { font-size: 24px; }
  .hub-tuiles { grid-template-columns: 1fr; }
  .coffre-piste { gap: 3px; }
  .coffre-jour strong { font-size: 12px; }
}
@media (max-width: 360px) {
  .hub-coffre { padding: 14px 12px; }
  .coffre-jour { padding: 6px 0; }
  .coffre-jour strong { font-size: 11px; }
}

/* ------------------------------------------------ l'inscription, comme sur les vrais sites */
.compte-champ .compte-saisie { position: relative; display: flex; }
.compte-champ .compte-saisie input { flex: 1; min-width: 0; }
.compte-champ .compte-saisie input[type="password"], .compte-champ .compte-saisie input[name="mot_de_passe"] { padding-right: 84px; }
.compte-oeil {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--jeu-marque); font-size: 12.5px; font-weight: 600; padding: 6px 8px; border-radius: 6px;
}
.compte-oeil:hover { background: var(--jeu-marque-fond); }
.compte-aide { font-size: 12px; color: var(--muted); min-height: 1.2em; line-height: 1.4; }
.compte-aide.ok { color: var(--jeu-exact); font-weight: 600; }
.compte-aide.ko { color: var(--jeu-faux); font-weight: 600; }
/* La solidité du mot de passe : une jauge fine, de rouge à vert, et les règles cochées à mesure. */
.compte-jauge { height: 5px; border-radius: 999px; background: var(--border-soft); overflow: hidden; margin-top: 2px; }
.compte-jauge span { display: block; height: 100%; width: 0; border-radius: 999px; transition: width 0.2s ease, background 0.2s ease; }
.compte-jauge .niveau-0 { background: var(--jeu-faux); }
.compte-jauge .niveau-1 { background: var(--jeu-faux); }
.compte-jauge .niveau-2 { background: var(--jeu-proche); }
.compte-jauge .niveau-3, .compte-jauge .niveau-4 { background: var(--jeu-exact); }
.compte-regles { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 12px; color: var(--muted); }
.compte-regles li::before { content: "○ "; }
.compte-regles li.ok { color: var(--jeu-exact); }
.compte-regles li.ok::before { content: "✓ "; font-weight: 700; }
.compte-case { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; color: var(--text); line-height: 1.4; cursor: pointer; }
.compte-case input { width: 18px; height: 18px; margin: 1px 0 0; flex: 0 0 18px; accent-color: var(--jeu-marque); }
.compte-conditions { font-size: 12.5px; color: var(--muted); margin: -4px 0 0 27px; }
.compte-conditions summary { cursor: pointer; color: var(--jeu-marque); font-weight: 600; }
.compte-conditions p { margin: 6px 0 0; line-height: 1.45; }
.compte-code {
  font: inherit; font-size: 26px; font-weight: 700; letter-spacing: 0.45em; text-align: center; font-variant-numeric: tabular-nums;
  padding: 12px; color: var(--text); background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--radius-sm);
}
.compte-code:focus-visible { outline: none; border-color: var(--jeu-marque); box-shadow: 0 0 0 3px var(--jeu-marque-fond); }
.compte-ferme { text-align: center; color: var(--muted); font-size: 14px; line-height: 1.5; margin: 6px 0; }
.compte-envoye { text-align: left; }
.compte-avantages { list-style: none; margin: 4px 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.compte-avantages li::before { content: "✓"; color: var(--jeu-exact); font-weight: 700; margin-right: 8px; }
.compte-liens .lien { background: none; border: none; color: var(--jeu-marque); font-size: 12.5px; padding: 4px 0; }
.compte-liens .lien:disabled { color: var(--muted); }
/* Une partie libre ou un salon, sans compte : le cadenas, ce que le compte ouvre, et ses deux boutons. */
.jeu-verrou {
  max-width: 460px; margin: 10px auto; padding: 22px 20px; text-align: center;
  background: var(--panel); border: 1px solid var(--border-soft); border-radius: var(--radius); box-shadow: var(--shadow-soft);
}
.jeu-verrou-icone { font-size: 34px; }
.jeu-verrou h3 { margin: 6px 0 4px; font-size: 19px; }
.jeu-verrou > p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.jeu-verrou .compte-avantages { text-align: left; display: inline-flex; }
.jeu-modes .verrouille::after { content: " 🔒"; font-size: 0.85em; }
.salon-pseudo { margin: 0; font-size: 13px; color: var(--muted); }
/* « Mon compte » : chaque réglage se déplie ; supprimer aussi, après le mot de passe. */
.compte-reglage, .compte-suppression {
  border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 10px 12px; margin-top: 8px;
}
.compte-reglage > summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.compte-reglage[open] > summary { margin-bottom: 10px; }
.compte-reglage .lien { margin-top: 6px; font-size: 12.5px; }
.compte-alerte { color: var(--jeu-proche-encre); font-weight: 600; }
.compte-suppression { border-color: color-mix(in srgb, var(--jeu-faux) 35%, var(--border-soft)); }
.compte-suppression > summary { cursor: pointer; list-style: none; font-size: 12.5px; }
.compte-suppression > summary::-webkit-details-marker { display: none; }
.compte-suppression .fenetre-note { text-align: left; margin: 8px 0; }
.compte-form .primary.danger { background: var(--jeu-faux); }

/* Fin de partie sans compte : l'invitation à s'inscrire. Le mois : la récompense du champion. */
#vue-jeu .fenetre-invitation, #vue-jeu .classement-recompense {
  margin: 14px 0 6px; padding: 12px 14px; border-radius: 12px; text-align: center;
  background: rgba(255, 196, 0, 0.10); border: 1px solid rgba(255, 196, 0, 0.35);
}
#vue-jeu .fenetre-invitation p { margin: 0 0 8px; }
#vue-jeu .fenetre-invitation .fenetre-note, #vue-jeu .classement-recompense .fenetre-note { margin: 6px 0 10px; font-size: 13px; }
#vue-jeu .classement-recompense { margin: 0 0 12px; }

/* Le champion du mois : son choix du joueur du jour, le palmarès. */
#vue-jeu .hub-champion:empty { display: none; }
#vue-jeu .hub-champion { margin: 12px 0; display: flex; flex-direction: column; gap: 10px; }
#vue-jeu .champion-choix, #vue-jeu .champion-choisi, #vue-jeu .champion-du-jour, #vue-jeu .palmares {
  padding: 12px 14px; border-radius: 12px; background: rgba(255, 196, 0, 0.10); border: 1px solid rgba(255, 196, 0, 0.35);
}
#vue-jeu .champion-choix p { margin: 6px 0 10px; }
#vue-jeu .champion-saisie { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--panel); color: var(--text); font: inherit; }
#vue-jeu .champion-suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
#vue-jeu .palmares-ligne { margin: 4px 0; font-size: 14px; }
#vue-jeu .champion-choisi, #vue-jeu .champion-du-jour { margin: 0; }

/* Le décor des champions : or et pourpre, le titre couronné. */
#vue-jeu.decor-champion {
  --bg: #120a1a;
  --panel: rgba(30, 16, 40, 0.88);
  --panel-plein: #1e1028;
  --text: #fdf4e3;
  --muted: #d9c2a0;
  --border: rgba(231, 196, 91, 0.35);
  --jeu-marque: #e7c45b;
  --jeu-marque-vif: #c99a2e;
  --jeu-marque-fond: rgba(231, 196, 91, 0.18);
}
#vue-jeu.decor-champion .jeu-decor { background:
    radial-gradient(ellipse at 50% 0%, rgba(231, 196, 91, 0.45), transparent 55%),
    radial-gradient(ellipse at 20% 30%, rgba(160, 60, 200, 0.25), transparent 50%),
    linear-gradient(180deg, #120a1a 0%, #24103a 50%, #0f2a1a 78%, #0c3a20 100%); }
#vue-jeu.decor-champion .projecteur { background: linear-gradient(180deg, rgba(255, 225, 140, 0.5), rgba(255, 225, 140, 0) 82%); }
#vue-jeu.decor-champion .jeu-entete { background: linear-gradient(135deg, #f3d77a 0%, #b07a12 55%, #6a2c8c 100%); color: #1b1408; }
#vue-jeu.decor-champion .jeu-titre p { color: rgba(27, 20, 8, 0.85); }
.apercu-champion { background: radial-gradient(ellipse at 50% 0%, rgba(243, 215, 122, 0.8), transparent 60%), linear-gradient(180deg, #24103a 0%, #0c3a20 100%); }
