/* ============================================================
   BRUTAL QUIZ — Design system brutalist
   Polices : Anton (display) + IBM Plex Mono (texte)
   ============================================================ */
:root {
  --paper: #FFFEF7;
  --app-bg: #FFFEF7;
  /* fond d'écran de l'app (derrière les cartes) — themable */
  --fd: 'Anton', sans-serif;
  /* police d'affichage (titres) — themable */
  --fb: 'IBM Plex Mono', monospace;
  /* police de corps — themable */
  --ink: #0A0A0A;
  --gray: #C8C8C8;
  --magenta: #FF2E93;
  --yellow: #FFD600;
  --cyan: #5BD8E5;
  --green: #5BE885;
  --red: #FF5252;
  --orange: #FF9F45;
  --purple: #9D4EDD;
  --blue: #4D7CFF;

  /* couleurs des 4 reponses facon Kahoot */
  --a1: #FF2E93;
  /* triangle  */
  --a2: #5BD8E5;
  /* losange   */
  --a3: #FFD600;
  /* cercle    */
  --a4: #5BE885;
  /* carre     */
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* html garde une hauteur de référence ; le body PEUT grandir (sinon le contenu
   est piégé et on ne peut pas scroller jusqu'en bas) */
html {
  height: 100%;
}

body {
  min-height: 100%;
}

body {
  font-family: var(--fb);
  background: var(--gray);
  color: var(--ink);
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ============================================================
   Ressenti « app » : pas de sélection de texte ni de menu natif.
   Sur mobile (Android/iOS), un appui long sur du texte ouvrait le
   menu « copier / rechercher Google ». On verrouille TOUT le contenu,
   SAUF les champs de saisie (pseudo, réponses…) — sinon plus moyen
   de taper. Les boutons/liens restent cliquables : on enlève juste
   la sélection + le surlignage tactile, pas les clics.
   ============================================================ */
html,
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  /* iOS : pas de bulle d'aperçu sur appui long */
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  /* coupe le double-tap-zoom (l'écran "zoomait" au tap) */
}

/* taille de l'affichage (réglage accessibilité, Réglages › Apparence) — zoom global */
html.ui-s {
  zoom: 0.9;
}

html.ui-l {
  zoom: 1.12;
}

/* images non « draggables » (évite le fantôme + le menu image sur appui long) */
img {
  -webkit-user-drag: none;
  user-drag: none;
}

/* on RÉACTIVE la saisie là où l'utilisateur doit écrire */
input,
textarea,
select,
[contenteditable],
[contenteditable] * {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

/* fond a pois facon trame imprimee */
.dotted-bg {
  background-image: radial-gradient(rgba(10, 10, 10, 0.10) 1.5px, transparent 1.5px);
  background-size: 22px 22px;
}

/* ---------- Typo ---------- */
.anton {
  font-family: var(--fd);
  letter-spacing: 1px;
}

h1,
h2,
h3,
.display {
  font-family: var(--fd);
  letter-spacing: 1px;
  line-height: 0.98;
}

/* ============================================================
   Bloc brutalist : bordure noire + ombre dure decalee
   ============================================================ */
.brutal {
  border: 4px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  background: var(--paper);
}

.brutal-sm {
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  background: var(--paper);
}

/* effet "tampon" via ::before pour les elements cliquables */
.stamp {
  position: relative;
}

.stamp::before {

  top: 6px;
  left: 6px;
  right: -6px;
  bottom: -6px;
  background: var(--ink);
  z-index: 0;
}

.stamp>* {
  position: relative;
  z-index: 1;
}

/* ---------- Boutons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--fd);
  font-size: 20px;
  letter-spacing: 2px;
  padding: 16px 26px;
  border: 4px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  cursor: pointer;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform .08s ease, box-shadow .08s ease, background .12s ease;
  -webkit-user-select: none;
  user-select: none;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--ink);
}

.btn:active {
  transform: translate(4px, 4px);
  box-shadow: 2px 2px 0 var(--ink);
}

.btn:disabled,
.btn[disabled],
.btn[data-disabled="true"] {
  opacity: .4;
  pointer-events: none;
}

.btn.magenta {
  background: var(--magenta);
  color: var(--paper);
}

.btn.yellow {
  background: var(--yellow);
}

.btn.cyan {
  background: var(--cyan);
}

.btn.green {
  background: var(--green);
}

.btn.red {
  background: var(--red);
  color: var(--paper);
}

/* bouton "sombre" : ombre coloree pour eviter le noir-sur-noir invisible */
.btn.ink {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 6px 6px 0 var(--magenta);
}

.btn.ink:hover {
  box-shadow: 8px 8px 0 var(--magenta);
}

.btn.ink:active {
  box-shadow: 2px 2px 0 var(--magenta);
}

.btn.block {
  display: flex;
  width: 100%;
}

.btn.lg {
  font-size: 28px;
  padding: 22px 32px;
}

.btn.sm {
  font-size: 14px;
  padding: 9px 14px;
  box-shadow: 4px 4px 0 var(--ink);
  border-width: 3px;
}

/* ---------- Stickers / pastilles ---------- */
.sticker {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--fd);
  letter-spacing: 1.5px;
  padding: 6px 14px;
  border: 3px solid var(--ink);
  background: var(--yellow);
  box-shadow: 4px 4px 0 var(--ink);
}

/* proto.css ajoute une pseudo-ombre NOIRE (.sticker::before) qui recouvre le fond
   coloré de brutal.css -> rectangle noir + texte invisible. On la neutralise ici
   (brutal a déjà sa propre box-shadow). */
.sticker::before {
  content: none;
}

.sticker.magenta {
  background: var(--magenta);
  color: var(--paper);
}

.sticker.cyan {
  background: var(--cyan);
}

.sticker.green {
  background: var(--green);
}

.sticker.red {
  background: var(--red);
  color: var(--paper);
}

.rot-1 {
  transform: rotate(-3deg);
}

.rot-2 {
  transform: rotate(2deg);
}

.rot-3 {
  transform: rotate(-1.5deg);
}

/* ---------- Champs ---------- */
.field {
  width: 100%;
  font-family: var(--fb);
  font-weight: 700;
  font-size: 18px;
  padding: 14px 16px;
  border: 4px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  box-shadow: inset 0 0 0 0 var(--ink);
  outline: none;
}

.field:focus {
  background: #fff;
  box-shadow: 5px 5px 0 var(--magenta);
}

.field::placeholder {
  color: color-mix(in srgb, var(--ink) 35%, transparent);
}

label.lbl {
  display: block;
  font-family: var(--fd);
  font-size: 12px;
  letter-spacing: 2px;
  margin-bottom: 6px;
  color: color-mix(in srgb, var(--ink) 65%, transparent);
}

/* ============================================================
   Couleurs des 4 reponses + formes (facon Kahoot)
   ============================================================ */
.ans-color-0 {
  background: var(--a1);
  color: var(--paper);
}

.ans-color-1 {
  background: var(--a2);
  color: var(--ink);
}

.ans-color-2 {
  background: var(--a3);
  color: var(--ink);
}

.ans-color-3 {
  background: var(--a4);
  color: var(--ink);
}

.shape {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: inline-block;
}

.shape svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* emoji Noto animés : la taille suit le font-size du conteneur */
.noto {
  width: 1em;
  height: 1em;
  display: inline-block;
  object-fit: contain;
  vertical-align: -0.14em;
}

/* emojis d'UI auto-convertis (emojify) : même rendu, repli statique propre */
.noto-em {
  width: 1em;
  height: 1em;
  display: inline-block;
  object-fit: contain;
  vertical-align: -0.14em;
}

.noto-wrap,
.noto-x {
  display: inline;
}

/* bouton muet (son) */
.mute-btn {
  border: 3px solid var(--ink);
  background: var(--paper);
  width: 38px;
  height: 38px;
  cursor: pointer;
  font-size: 18px;
  box-shadow: 3px 3px 0 var(--ink);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  line-height: 1;
}

.mute-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.mute-btn.off {
  background: var(--gray);
  /* coupé : chip grisé (l'emoji 🔇 reste lisible, vs noir sur noir) */
}

.mute-btn.quit {
  background: var(--red);
  color: var(--paper);
}

/* ===== GAMEPLAY — QUIZ vertical stack (games.html §1, à l'identique) ===== */
.options-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 0;
}

.opt {
  position: relative;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .08s;
}

.opt .sh {
  position: absolute;
  top: 5px;
  left: 5px;
  right: -5px;
  bottom: -5px;
  background: var(--ink);
}

.opt .bd {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 14px;
  border: 3px solid var(--ink);
}

.opt .letter-wrap {
  position: relative;
  flex-shrink: 0;
}

.opt .letter-wrap .lsh {
  position: absolute;
  top: 3px;
  left: 3px;
  right: -3px;
  bottom: -3px;
  background: var(--ink);
}

.opt .letter-wrap .lbox {
  position: relative;
  width: 38px;
  height: 38px;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--fd);
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.opt .text {
  font-family: var(--fd);
  font-size: clamp(18px, 4.8vw, 22px);
  letter-spacing: .3px;
  line-height: 1.15;
  flex: 1;
  word-break: break-word;
}

.opt .pava {
  width: 42px;
  height: 42px;
  font-size: 42px;
  flex-shrink: 0;
}

.opt.c-yellow .bd {
  background: #FFD600;
  color: var(--ink);
}

.opt.c-violet .bd {
  background: #9D4EDD;
  color: var(--paper);
}

.opt.c-red .bd {
  background: #FF5252;
  color: var(--paper);
}

.opt.c-teal .bd {
  background: #4ECDC4;
  color: var(--paper);
}

.opt:nth-child(4n+1) {
  transform: rotate(-1.5deg);
}

.opt:nth-child(4n+2) {
  transform: rotate(1.2deg);
}

.opt:nth-child(4n+3) {
  transform: rotate(-1deg);
}

.opt:nth-child(4n+4) {
  transform: rotate(1.5deg);
}

/* sélection : tampon "✓" en coin (sticker brutaliste incliné) — masqué sinon */
.opt .ocheck {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%) rotate(8deg);
  width: 30px;
  height: 30px;
  padding: 0;
  border: 3px solid var(--ink);
  background: var(--green);
  color: var(--ink);
  font-family: var(--fd);
  font-size: 17px;
  line-height: 26px;
  text-align: center;
  box-shadow: 2px 2px 0 var(--ink);
  display: none;
  z-index: 4;
}

.opt.selected .bd,
.opt.correct .bd,
.opt.wrong .bd {
  padding-right: 50px;
}

.opt.selected {
  transform: scale(1.03);
}

.opt.selected .bd {
  border-width: 4px;
}

.opt.selected .ocheck {
  display: block;
}

.opt.faded {
  opacity: .35;
  pointer-events: none;
}

.opt.correct {
  transform: scale(1.03);
}

.opt.correct .bd {
  border-width: 4px;
}

.opt.correct .ocheck {
  display: block;
  background: var(--green);
}

.opt.wrong .bd {
  border-width: 4px;
}

.opt.wrong .ocheck {
  display: block;
  background: var(--red);
  color: var(--paper);
}

.opt:active {
  transform: scale(.97);
}

.options-col.nontap .opt {
  cursor: default;
}

/* ============================================================
   Feedback « PRESSED » global — on doit sentir qu'on appuie (partout).
   Cible les éléments cliquables qui n'avaient aucun retour. (.btn/.opt/.mute-btn
   gardent leur effet brutaliste propre, défini ailleurs.)
   ============================================================ */
html {
  -webkit-tap-highlight-color: transparent;
}

.nav-item,
.cta-card,
.recent-card,
.cat-row,
.cr-fmt,
.close,
.sbtn,
.toggle-btn,
.app-ava,
.stat-mini,
.pk-card,
[data-sec],
[data-vue],
[data-game],
[data-fmt] {
  transition: transform .07s ease;
}

.nav-item:active,
.cta-card:active,
.recent-card:active,
.cat-row:active,
.cr-fmt:active,
.close:active,
.toggle-btn:active,
.app-ava:active,
.stat-mini:active,
.pk-card:active,
[data-sec]:active,
[data-vue]:active,
[data-game]:active,
[data-fmt]:active,
button:not(.btn):not(.sbtn):active {
  transform: scale(.95);
}

.sbtn:active {
  transform: scale(.85);
}

.opt .opt-count {
  display: none;
}

/* réactions emoji en jeu — bouton flottant 😀 (coin, au-dessus des pieds d'écran) */
/* Barre de réaction : LIGNE HORIZONTALE en bas, juste au-dessus du footer
   "ont répondu". Toggle 😀 (fermé) -> ✕ (ouvert). Popup scrollable si besoin. */
.react-fab {
  position: fixed;
  right: 10px;
  bottom: calc(env(safe-area-inset-bottom) + 62px);
  z-index: 55;
  display: none;
  flex-direction: row-reverse;                  /* toggle à droite, émotes vers la gauche */
  align-items: center;
  gap: 7px;
  max-width: calc(100vw - 20px);
}

.react-fab.show {
  display: flex;
}

.react-toggle {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 3px solid var(--ink);
  background: var(--yellow);
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 21px;
  cursor: pointer;
  line-height: 1;
}

.react-fab.open .react-toggle {
  background: var(--red);
  color: var(--paper);
}

.react-toggle:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.react-pop {
  display: none;
  flex-direction: row;                          /* LIGNE horizontale */
  gap: 6px;
  overflow-x: auto;
  max-width: calc(100vw - 74px);
  padding: 3px;
  scrollbar-width: none;
}

.react-pop::-webkit-scrollbar { display: none; }

.react-fab.open .react-pop {
  display: flex;
}

.react-pop button {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 3px solid var(--ink);
  background: var(--paper);
  box-shadow: 2px 2px 0 var(--ink);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  animation: react-popin .15s ease-out;
}

.react-pop button:active {
  transform: scale(1.15);
}

@keyframes react-popin {
  from { transform: scale(.5); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.react-float {
  position: fixed;
  bottom: 64px;
  font-size: 42px;
  z-index: 56;
  pointer-events: none;
  animation: react-rise 1.9s ease-out forwards;
}

@keyframes react-rise {
  0% { transform: translateY(0) translateX(0) scale(.6); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translateY(-55vh) translateX(var(--rx, 0)) scale(1.25); opacity: 0; }
}

/* éditeur de profil (avatar + pseudo) — AVATARS.editProfile */
/* ÉDITEUR DE PROFIL = ÉCRAN plein (plus une popup flottante) */
.pe-ov {
  position: fixed;
  inset: 0;
  z-index: 1200;   /* au-dessus des bannières PWA/défis (z 1100) : le footer VALIDER reste visible */
  background: var(--paper);
  display: none;
}

.pe-ov.show {
  display: block;
}

.pe-card {
  background: var(--paper);
  border: 0;
  box-shadow: none;
  padding: 0;
  max-width: 560px;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  display: flex;              /* header fixe + milieu scrollable + footer fixe */
  flex-direction: column;
  overflow: hidden;
}
.pe-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 16px 16px; }
/* preview = "scène" de perso (rayons + dégradé), avatar mis en avant */
.pe-card .pe-row { position: relative; overflow: hidden; border: 4px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); background: linear-gradient(160deg, #5BD8E5, #4D7CFF); padding: 16px; margin-top: 10px; }
.pe-card .pe-row::before { content: ''; position: absolute; inset: 0; background: repeating-conic-gradient(from 0deg at 40% 40%, rgba(255,255,255,.10) 0deg 10deg, transparent 10deg 20deg); }
.pe-card .pe-row > * { position: relative; }

/* en-tête éditeur : bouton retour encadré + titre (même langage que .pd-top du détail joueur) */
.pe-top { flex-shrink: 0; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 3px solid var(--ink); background: var(--paper); }
.pe-back { width: 36px; height: 36px; flex-shrink: 0; border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); background: var(--paper); font-family: var(--fd); font-size: 22px; line-height: 30px; text-align: center; cursor: pointer; }
.pe-back:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.pe-title {
  font-family: var(--fd);
  font-size: 18px;
  letter-spacing: 1px;
}

.pe-sub {
  font-family: var(--fb);
  font-weight: 700;
  font-size: 11px;
  line-height: 1.45;
  color: color-mix(in srgb, var(--ink) 60%, transparent);
  margin-bottom: 12px;
}

.pe-sub b {
  background: var(--yellow);
  border: 2px solid var(--ink);
  padding: 0 4px;
  color: var(--ink);
}

.pe-shop {
  display: block; width: 100%; margin-top: 16px;
  border: 3px solid var(--ink); background: var(--green, #5BE885); color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink); padding: 12px; cursor: pointer;
  font-family: var(--fd); font-size: 15px; letter-spacing: 1px;
}
.pe-shop:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.pe-note {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--fb);
  font-weight: 700;
  font-size: 10.5px;
  color: color-mix(in srgb, var(--ink) 60%, transparent);
  margin-top: 12px;
}

.pe-row {
  display: flex;
  gap: 14px;
  align-items: stretch;
  margin-bottom: 12px;
}

.pe-preview {
  width: 88px;
  height: 88px;
  font-size: 88px;
  flex-shrink: 0;
  box-shadow: 5px 5px 0 var(--ink);
}

.pe-preview .ava-emo {
  border-width: 4px;
}

.pe-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 9px;
  min-width: 0;
}

.pe-dice {
  font-family: var(--fd);
  font-size: 13px;
  letter-spacing: 1px;
  border: 3px solid var(--ink);
  background: var(--yellow);
  padding: 9px;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
}

.pe-colors {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.pe-sw {
  width: 28px;
  height: 28px;
  border: 3px solid var(--ink);
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
}

.pe-sw.sel {
  transform: scale(1.18);
  box-shadow: 0 0 0 2px var(--ink), 3px 3px 0 var(--ink);
}

.pe-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  max-height: 168px;
  overflow-y: auto;
  border: 3px solid var(--ink);
  padding: 8px;
  box-shadow: 4px 4px 0 var(--ink);
}

.pe-opt {
  aspect-ratio: 1;
  border: 2px solid var(--ink);
  cursor: pointer;
  overflow: hidden;
  background: var(--paper);
}

.pe-opt .ava-emo {
  width: 100%;
  height: 100%;
  border: none;
}

.pe-opt.sel {
  outline: 4px solid var(--magenta);
  outline-offset: -4px;
}

.pe-nick {
  width: 100%;
  margin-top: 12px;
  font-family: var(--fb);
  font-weight: 700;
  font-size: 16px;
  border: 3px solid var(--ink);
  padding: 10px;
  outline: none;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 var(--ink);
}
.pe-nick:disabled { background: color-mix(in srgb, var(--ink) 8%, var(--paper)); color: color-mix(in srgb, var(--ink) 45%, transparent); box-shadow: 4px 4px 0 color-mix(in srgb, var(--ink) 30%, transparent); cursor: not-allowed; }
/* compteur de changements de pseudo (limite = 3) */
.pe-nicknote { margin-top: 7px; font-family: var(--fb); font-weight: 700; font-size: 11px; line-height: 1.35; letter-spacing: .3px; color: color-mix(in srgb, var(--ink) 60%, transparent); }
.pe-nicknote.locked { color: var(--red, #FF5252); }

/* sélecteur de pays (drapeaux) dans l'éditeur de profil */
.pe-clbl {
  font-family: var(--fb);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1px;
  margin: 12px 0 6px;
  color: color-mix(in srgb, var(--ink) 70%, transparent);
}

.pe-flags {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 0 6px;
  scrollbar-width: none;
}

.pe-flags::-webkit-scrollbar {
  display: none;
}

.pe-flag {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 52px;
  border: 2.5px solid var(--ink);
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
  padding: 6px 4px;
  cursor: pointer;
}

.pe-flag:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.pe-flag img {
  width: 28px;
  height: 19px;
  border: 1px solid var(--ink);
  display: block;
}

.pe-flag .pe-fglobe {
  font-size: 19px;
  line-height: 19px;
}

.pe-flag .pe-fc {
  font-family: var(--fd);
  font-size: 9px;
  letter-spacing: .5px;
}

.pe-flag.sel {
  background: var(--magenta);
  color: var(--paper);
}

.pe-actions {
  flex-shrink: 0;               /* footer FIXE : ANNULER / VALIDER toujours visibles, sans chevaucher */
  display: flex;
  gap: 10px;
  background: var(--paper);
  padding: 12px 16px 16px;
  border-top: 3px solid var(--ink);
}

.pe-actions button {
  flex: 1;
  font-family: var(--fd);
  font-size: 14px;
  letter-spacing: 1px;
  border: 4px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  padding: 11px;
  cursor: pointer;
}

.pe-cancel {
  background: var(--paper);
}

.pe-ok {
  background: var(--green);
}

/* overlay reconnexion */
.rc-ov {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.rc-ov.show {
  display: flex;
}

.rc-card {
  background: var(--paper);
  border: 5px solid var(--ink);
  box-shadow: 10px 10px 0 var(--ink);
  padding: 24px 30px;
  text-align: center;
  font-family: var(--fd);
  font-size: 22px;
  letter-spacing: 2px;
  transform: rotate(-2deg);
}

.rc-emoji {
  font-size: 48px;
  margin-bottom: 8px;
}

.rc-sub {
  font-family: var(--fb);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .5px;
  color: color-mix(in srgb, var(--ink) 60%, transparent);
  margin-top: 8px;
}

/* popup de confirmation brutaliste (QZ.confirm) */
.bc-ov {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: color-mix(in srgb, var(--ink) 70%, transparent);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.bc-ov.show {
  display: flex;
}

.bc-card {
  background: var(--paper);
  border: 5px solid var(--ink);
  box-shadow: 10px 10px 0 var(--ink);
  padding: 24px;
  max-width: 340px;
  width: 100%;
  text-align: center;
  transform: rotate(-1deg);
}

.bc-emoji {
  width: 58px;
  height: 58px;
  margin: 0 auto 10px;
}

.bc-emoji .noto {
  width: 100%;
  height: 100%;
}

.bc-msg {
  font-family: var(--fd);
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: .5px;
}

.bc-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.bc-btn {
  flex: 1;
  font-family: var(--fd);
  font-size: 15px;
  letter-spacing: 1px;
  border: 4px solid var(--ink);
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--ink);
  padding: 12px;
  cursor: pointer;
}

.bc-btn.bc-yes {
  background: var(--yellow);
}

.bc-btn.bc-yes.danger {
  background: var(--red);
  color: var(--paper);
}

.bc-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

/* header gameplay compact + type-pill + q-card (games.html) */
/* header de jeu (brutalist) : tous les éléments à la MÊME hauteur, largeur libre */
.ghdr {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 3px solid var(--ink);
  font-family: var(--fd);
  letter-spacing: 1.5px;
  background: var(--paper);
  flex-shrink: 0;
}

.ghdr .close,
.ghdr .manche,
.ghdr .timer,
.ghdr .score {
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2.5px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  box-sizing: border-box;
}

.ghdr .close {
  width: 32px;
  padding: 0;
  background: #FF5252;
  color: var(--paper);
  font-size: 20px;
  flex-shrink: 0;
  cursor: pointer;
}

.ghdr .manche {
  padding: 0 13px;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
}

.ghdr .timer {
  margin-left: auto;
  padding: 0 12px;
  background: #FFD600;
  font-size: 16px;
}

.ghdr .timer.warn {
  background: #FF5252;
  color: var(--paper);
}

.ghdr .score {
  padding: 0 12px;
  background: #5BE885;
  font-size: 16px;
}

.type-pill {
  display: inline-block;
  align-self: flex-start;
  margin: 12px 14px 8px;
  position: relative;
  transform: rotate(-1deg);
}

.type-pill .sh {
  position: absolute;
  top: 3px;
  left: 3px;
  right: -3px;
  bottom: -3px;
  background: var(--ink);
}

.type-pill .bd {
  position: relative;
  padding: 8px 16px;
  border: 3px solid var(--ink);
  font-family: var(--fd);
  font-size: 16px;
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.type-pill .bd .noto {
  width: 20px;
  height: 20px;
}

.q-card {
  margin: 8px 14px 14px;
  position: relative;
}

.q-card .sh {
  position: absolute;
  top: 6px;
  left: 6px;
  right: -6px;
  bottom: -6px;
  background: var(--ink);
}

.q-card .bd {
  position: relative;
  padding: 16px 16px;
  border: 4px solid var(--ink);
  background: var(--paper);
  font-family: var(--fd);
  font-size: clamp(20px, 5.4vw, 27px);
  line-height: 1.18;
  color: var(--ink);
}

.micro-lbl {
  padding: 0 14px;
  font-size: 10px;
  letter-spacing: 2px;
  font-family: var(--fd);
  margin-bottom: 4px;
  color: color-mix(in srgb, var(--ink) 60%, transparent);
}

/* fond de l'écran de jeu — neutre : la couleur du type reste sur le type-pill, jamais en plein écran */
.q-screen {
  background: var(--paper);
}

/* défaut : crème neutre */
body.gbg-dots .q-screen {
  background: transparent;
}

/* option pointillé : laisse voir le body */
body.gbg-cream .q-screen {
  background: var(--paper);
}

body.gbg-mode .q-screen {
  background: var(--paper);
}

/* thèmes boutique (clairs -> texte/cartes restent lisibles) */
body.gbg-bonbon .q-screen {
  background: linear-gradient(160deg, #FFE3F3, #E3F4FB);
}

body.gbg-menthe .q-screen {
  background: linear-gradient(160deg, #DCFCE7, #E5F6FF);
}

body.gbg-coucher .q-screen {
  background: linear-gradient(160deg, #FFE9C7, #FFD8E4);
}

body.gbg-grille .q-screen {
  background: var(--paper);
  background-image: repeating-linear-gradient(0deg, transparent 0 21px, rgba(10, 10, 10, .07) 22px), repeating-linear-gradient(90deg, transparent 0 21px, rgba(10, 10, 10, .07) 22px);
}

/* plus de fond plein couleur (cf. retour design) */

/* br-cream sticker (feedback) */
.br-cream {
  position: relative;
  display: inline-flex;
}

.br-cream .sh {
  position: absolute;
  top: 6px;
  left: 6px;
  right: -6px;
  bottom: -6px;
  background: var(--ink);
}

.br-cream .body {
  position: relative;
  background: var(--paper);
  border: 4px solid var(--ink);
  padding: 8px 22px;
  color: var(--ink);
}

/* overlays SUCCÈS / ÉCHEC plein écran (games.html — design-feedback-v3) */
/* couvre TOUT l'écran (sinon le pointillé du fond transparaît) */
#screen-feedback.active {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
}

.fb {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding-bottom: 24px;
}

.fb.ok { background: #5BE885; }
.fb.ko { background: #FF5252; }

/* WATERMARK DÉCORATIF */
.fb-watermark {
  position: absolute;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: clamp(300px, 90vw, 450px); height: clamp(300px, 90vw, 450px);
  font-size: clamp(200px, 80vw, 350px); line-height: 1; /* Fallback si texte */
  opacity: 0.15; pointer-events: none; z-index: 1; filter: grayscale(1);
}
.fb-watermark img, .fb-watermark .noto { width: 100%; height: 100%; object-fit: contain; }

/* RAYONS ANIMÉS */
.fb-rays {
  position: absolute; 
  top: -100%; left: -100%; right: -100%; bottom: -100%;
  background: repeating-conic-gradient(from 0deg, transparent 0deg 15deg, rgba(0,0,0,0.08) 15deg 30deg);
  animation: fb-spin 60s linear infinite; z-index: 0; pointer-events: none;
}
@keyframes fb-spin { 100% { transform: rotate(360deg); } }

/* STRUCTURE & RE-CENTRAGE (mix V1 et V3) */
.fb .top-meta { padding: 14px 20px 0; display: flex; gap: 8px; justify-content: space-between; flex-shrink: 0; width: 100%; box-sizing: border-box; position: relative; z-index: 10; }

.fb .hero { padding: 26px 20px 0; display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; z-index: 10; }
.fb .hero .emoji { width: clamp(140px, 25vw, 180px); height: clamp(140px, 25vw, 180px); font-size: clamp(140px, 25vw, 180px); line-height: 1; display: inline-flex; align-items: center; justify-content: center; filter: drop-shadow(0 6px 0 rgba(10,10,10,0.15)); }
.fb .hero .emoji img, .fb .hero .emoji .noto { width: 100%; height: 100%; object-fit: contain; }

.fb .hero .title-row { margin-top: 12px; position: relative; z-index: 10; display: inline-block; }
.fb.ok .hero .title-row { transform: rotate(-3deg); }
.fb.ko .hero .title-row { transform: rotate(2deg); }
.fb .hero .title-row .body { padding: 8px 28px; font-family: var(--fd); font-size: clamp(36px, 9vw, 46px); letter-spacing: 5px; line-height: 1; position: relative; white-space: nowrap; }
    
.fb.ok .hero .title-row .body { background: #138E3B !important; color: var(--paper) !important; border: 4px solid var(--ink) !important; }
.fb.ok .hero .title-row .sh { position: absolute; top: 6px; left: 6px; right: -6px; bottom: -6px; background: var(--ink); }
    
.fb.ko .hero .title-row .body { background: #C51111 !important; color: var(--paper) !important; border: 4px solid var(--ink) !important; }
.fb.ko .hero .title-row .sh { position: absolute; top: 6px; left: 6px; right: -6px; bottom: -6px; background: var(--ink); }

.fb .answer-block { padding: 32px 20px 0; display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; z-index: 5; margin-top: -12px; }
.fb .answer-block[hidden] { display: none !important; }
.fb .answer-block .fb-lab { font-weight: 700; font-size: 11px; letter-spacing: 2px; }
.fb.ko .answer-block .fb-lab { color: rgba(255, 254, 247, 0.85); background: #0A0A0A; padding: 4px 8px; border-radius: 4px; border: 2px solid rgba(255, 254, 247, 0.5); }
.fb .answer-block .ans { font-family: var(--fd); font-size: clamp(22px, 6vw, 28px); letter-spacing: 0.5px; line-height: 1.1; margin-top: 8px; }
.fb.ko .answer-block .ans { color: #FFFEF7; text-transform: uppercase; }

/* POINTS (V3) */
.fb .delta-row { margin-top: 20px; padding: 0 40px; display: flex; justify-content: center; position: relative; z-index: 4; }
.fb .delta-row .br-cream { position: relative; transform: rotate(2deg); }
.fb.ok .delta-row .br-cream { transform: rotate(4deg); }
.fb.ko .delta-row .br-cream { transform: rotate(-3deg); }
.fb .delta-row .br-cream .sh { position: absolute; top: 12px; left: 12px; right: -12px; bottom: -12px; border: 4px solid var(--ink); background: transparent !important; }
.fb.ok .delta-row .br-cream .sh { background: transparent !important; }
.fb.ko .delta-row .br-cream .sh { background: transparent !important; }
.fb .delta-row .br-cream .body { padding: 24px 20px; display: flex; flex-direction: column; align-items: center; gap: 0; background: var(--paper); border: 4px solid var(--ink); position: relative; }
.fb .delta-row .sign { display: none; }
.fb .delta-row .val { font-family: var(--fd); font-size: clamp(52px, 14vw, 72px); color: var(--ink); line-height: 0.9; }
.fb .delta-row .pts { font-weight: 700; font-size: 13px; letter-spacing: 3px; color: var(--ink); opacity: 0.8; margin-top: 4px; }

/* WAITING */
.fb .waiting { margin-top: 30px; padding: 20px 20px 30px; width: 100%; box-sizing: border-box; position: relative; z-index: 10; max-width: 500px; align-self: center; }
.fb .waiting .br-cream { display: flex; width: 100%; position: relative; border: 4px solid var(--ink); background: var(--paper); }
.fb .waiting .br-cream .sh { position: absolute; top: 4px; left: 4px; right: -4px; bottom: -4px; background: var(--ink); z-index: -1; }
.fb .waiting .br-cream .body { padding: 12px 16px; font-family: var(--fd); font-size: 14px; letter-spacing: 2px; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; box-sizing: border-box; color: var(--ink); }
.fb .waiting .dot { width: 12px; height: 12px; background: #5BE885; border: 3px solid var(--ink); border-radius: 50%; }
.fb .waiting { display: none !important; }

/* ANIMATIONS SIMPLES UTILES */
.anim-pop { animation: fb-pop 0.5s cubic-bezier(0.2, 1.5, 0.4, 1); }
@keyframes fb-pop { 0% { transform: scale(0.3) rotate(-14deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.anim-shake { animation: fb-shake 0.4s ease-out; }
@keyframes fb-shake { 0% { transform: translateY(20px); opacity: 0; } 100% { transform: none; opacity: 1; } }
.anim-slide-up { animation: fb-su 0.5s cubic-bezier(0.2, 1.2, 0.4, 1) both; }
@keyframes fb-su { 0% { transform: translateY(40px); opacity: 0; } 100% { transform: none; opacity: 1; } }


/* ===== ÉCRAN DE TRANSITION (reveal round_type + 3→2→1→GO) ===== */
#screen-transition.active {
  display: flex;
  flex-direction: column;
}

.trans {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 24px 22px calc(28px + env(safe-area-inset-bottom));
}

.trans-rounds {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.trans-seg {
  flex: 1;
  height: 9px;
  border: 2.5px solid var(--ink);
}

.trans-seg.done {
  background: var(--ink);
}

.trans-meta {
  align-self: flex-start;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.trans-mini {
  font-family: var(--fd);
  font-size: 11px;
  letter-spacing: 1.5px;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  padding: 5px 11px;
  box-shadow: 3px 3px 0 var(--ink);
}

.trans-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 22px;
}

.trans-emoji {
  font-size: 84px;
  line-height: 1;
}

.trans-emoji .noto {
  width: 1em;
  height: 1em;
}

.trans-label {
  margin-top: 16px;
  font-family: var(--fd);
  font-size: clamp(30px, 8vw, 42px);
  letter-spacing: 2px;
  line-height: 1.05;
  background: var(--paper);
  border: 4px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  padding: 9px 20px;
  transform: rotate(-3deg);
}

.trans-tick {
  font-family: var(--fb);
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 1.5px;
  opacity: .55;
  margin-top: 6px;
}

.trans-sub {
  margin-top: 22px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1.5px;
  max-width: 340px;
  line-height: 1.45;
}

.trans-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: auto;
}

.trans-dep {
  font-family: var(--fd);
  font-size: 14px;
  letter-spacing: 2px;
  line-height: 1.1;
}

.trans-count {
  width: 90px;
  height: 90px;
  border: 4px solid var(--ink);
  background: var(--paper);
  box-shadow: 6px 6px 0 var(--ink);
  display: grid;
  place-items: center;
  font-family: var(--fd);
  font-size: 60px;
}

.trans-count.go {
  background: var(--green);
  font-size: 36px;
  letter-spacing: 2px;
}

.trans.dark .trans-sub,
.trans.dark .trans-dep {
  color: var(--paper);
}

.trans.dark .trans-tick {
  color: rgba(255, 254, 247, .7);
  opacity: 1;
}

.trans.dark .trans-seg {
  border-color: var(--paper);
}

.trans.dark .trans-seg.done {
  background: var(--paper);
}

/* formes de réponse "vivantes" en jeu (légère oscillation, décalée par tuile) */
@keyframes shape-bob {

  0%,
  100% {
    transform: translateY(0) rotate(0);
  }

  50% {
    transform: translateY(-4px) rotate(-4deg);
  }
}

.tile .shape,
.abtn .shape {
  animation: shape-bob 2.6s ease-in-out infinite;
}

.ans-tiles .tile:nth-child(2) .shape,
.answer-grid .abtn:nth-child(2) .shape {
  animation-delay: .25s;
}

.ans-tiles .tile:nth-child(3) .shape,
.answer-grid .abtn:nth-child(3) .shape {
  animation-delay: .5s;
}

.ans-tiles .tile:nth-child(4) .shape,
.answer-grid .abtn:nth-child(4) .shape {
  animation-delay: .75s;
}

/* avatar emoji natif : carre brutalist + emoji centre (taille pilotee par .font-size du parent) */
.ava-emo {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 3px solid var(--ink);
  line-height: 1;
}

.ava-emo .ava-glyph {
  font-size: .62em;
  line-height: 1;
}

.ava-emo .dbimg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

/* média : image (URL) ou emoji géant (offline) — taille pilotée par le contexte */
.media-img {
  display: block;
  border: 4px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: var(--paper);
}

.media-emoji {
  display: grid;
  place-items: center;
  line-height: 1;
}

.media-emoji .noto-fill {
  width: 1em;
  height: 1em;
  object-fit: contain;
}

/* 4 IMAGES / 4 PHOTOS — chaque case est un CARRÉ identique (photo recadrée cover, emoji centré).
   Garantit des tailles uniformes quelle que soit la forme de la photo source. */
.fg-cell {
  aspect-ratio: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  background: var(--paper);
}

.fg-cell .media-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
  box-shadow: none;
  max-width: none;
  max-height: none;
  background: none;
}

.fg-cell .media-emoji {
  width: 100%;
  height: 100%;
  border: none;
  box-shadow: none;
  background: none;
  font-size: 48px;
}

.fg-cell .media-emoji .noto-fill {
  width: 60%;
  height: 60%;
}

/* lettres d'anagramme */
.letter-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.ltile {
  font-family: var(--fd);
  border: 4px solid var(--ink);
  background: var(--yellow);
  box-shadow: 4px 4px 0 var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.ltile.used {
  opacity: .25;
  pointer-events: none;
}

/* zone de réponse PARTAGÉE (anagramme / saisie texte) — hôte ET joueur */
.answer-zone {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 14px;
  gap: 12px;
  min-height: 0;
}

.answer-zone.options-col {
  padding: 14px;
  gap: 10px;
}

/* ESTIMATION — slider (réf. flux-gameplay.html) */
.nt-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 8px 2px 6px;
}

.nt-num {
  align-self: stretch;
  text-align: center;
  font-family: var(--fd);
  font-size: 60px;
  line-height: 1;
  border: 5px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  background: var(--yellow);
  color: var(--ink);
  padding: 6px 28px;
}

.nt-num small {
  font-family: var(--fb);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1px;
}

.nt-track {
  height: 22px;
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  background: var(--paper);
  position: relative;
  margin-top: 6px;
  touch-action: none;
  cursor: pointer;
}

.nt-track .fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 50%;
  background: var(--cyan);
  border-right: 3px solid var(--ink);
  pointer-events: none;
}

.nt-track .thumb {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 26px;
  height: 40px;
  border: 3px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  background: var(--magenta);
  pointer-events: none;
}

.nt-range {
  display: flex;
  justify-content: space-between;
  font-family: var(--fb);
  font-weight: 700;
  font-size: 11px;
  color: color-mix(in srgb, var(--ink) 50%, transparent);
  margin-top: 6px;
}

/* INTRUS — grille 2×2 */
.nt-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.nt-tile {
  position: relative;
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  background: var(--paper);
  padding: 22px 12px;
  text-align: center;
  cursor: pointer;
}

.nt-tile.out {
  background: var(--red);
  color: var(--paper);
  border-width: 5px;
}

.nt-tile.faded {
  opacity: .45;
}

.nt-tile .nm {
  font-family: var(--fd);
  font-size: 19px;
  letter-spacing: .5px;
}

.nt-tile .stamp {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border: 3px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  background: var(--paper);
  transform: rotate(8deg);
}

.nt-tile .stamp::before,
.nt-tile .stamp::after {
  content: '';
  position: absolute;
  left: 10px;
  top: 4px;
  width: 3px;
  height: 14px;
  background: var(--ink);
}

.nt-tile .stamp::before {
  transform: rotate(45deg);
}

.nt-tile .stamp::after {
  transform: rotate(-45deg);
}

/* PLUS / MOINS — cartes de référence + boutons */
.nt-ref {
  display: flex;
  gap: 12px;
}

.nt-refcard {
  flex: 1;
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  padding: 12px;
  text-align: center;
}

.nt-refcard.known {
  background: var(--cyan);
}

.nt-refcard.target {
  background: var(--yellow);
}

.nt-refcard .e {
  width: 40px;
  height: 40px;
  margin: 0 auto 4px;
}

.nt-refcard .e img {
  width: 100%;
  height: 100%;
}

.nt-refcard .nm {
  font-family: var(--fd);
  font-size: 15px;
}

.nt-refcard .v {
  font-family: var(--fd);
  font-size: 22px;
  margin-top: 2px;
}

.nt-pm {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

.nt-pmbtn {
  flex: 1;
  position: relative;
  cursor: pointer;
}

.nt-pmbtn::before {
  content: '';
  position: absolute;
  top: 5px;
  left: 5px;
  right: -5px;
  bottom: -5px;
  background: var(--ink);
}

.nt-pmbtn .bd {
  position: relative;
  border: 4px solid var(--ink);
  padding: 18px;
  text-align: center;
  font-family: var(--fd);
  font-size: 26px;
  letter-spacing: 1px;
}

.nt-pmbtn.up .bd {
  background: var(--green);
}

.nt-pmbtn.down .bd {
  background: var(--red);
  color: var(--paper);
}

.nt-pmbtn.faded {
  opacity: .4;
}

.nt-pmbtn.sel .bd {
  border-width: 6px;
}

/* TEXTE À TROU — blanc à compléter */
.nt-blank {
  display: inline-block;
  min-width: 90px;
  border-bottom: 5px solid var(--magenta);
}

/* RÉBUS — emojis */
.nt-rebus {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 4px 0;
  background: var(--paper);
  border: 4px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  padding: 16px;
}

.nt-rebus .e {
  width: 74px;
  height: 74px;
  border: 4px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nt-rebus .e img {
  width: 50px;
  height: 50px;
}

.nt-rebus .plus {
  font-family: var(--fd);
  font-size: 34px;
}

/* IMAGE FLOUTÉE */
.nt-sharp {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nt-sharp .bar {
  flex: 1;
  height: 14px;
  border: 3px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  background: var(--paper);
  overflow: hidden;
}

.nt-sharp .bar i {
  display: block;
  height: 100%;
  width: 0%;
  background: #4D7CFF;
  border-right: 3px solid var(--ink);
  transition: width .2s linear;
}

.nt-sharp .pct {
  font-family: var(--fd);
  font-size: 13px;
}

.nt-blur2 {
  width: auto;
  height: 160px;
  margin: 4px 0;
  border: 4px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  background: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.nt-blur2 img {
  width: 120px;
  height: 120px;
  filter: blur(12px);
}

/* MÉMOIRE */
.nt-memhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.nt-memhead .t {
  font-family: var(--fb);
  font-weight: 700;
  font-size: 11px;
  color: color-mix(in srgb, var(--ink) 60%, transparent);
}

.nt-memhead .clock {
  font-family: var(--fd);
  font-size: 18px;
  border: 3px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  background: var(--red);
  color: var(--paper);
  padding: 3px 10px;
}

.nt-memgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.nt-memcell {
  aspect-ratio: 1.5;
  border: 4px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nt-memcell img {
  width: 54px;
  height: 54px;
}

.nt-memcell.sel {
  background: var(--yellow);
}

.nt-memcell.faded {
  opacity: .5;
}

.nt-memcell .qmark {
  font-family: var(--fd);
  font-size: 34px;
}

.nt-memask {
  text-align: center;
  font-family: var(--fd);
  font-size: 16px;
  letter-spacing: .5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 24px;
}

.nt-memask img {
  width: 30px;
  height: 30px;
  vertical-align: middle;
}

/* CLASSER — liste à ordonner */
.nt-rank {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nt-rrow {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  background: var(--paper);
  padding: 13px 12px;
  touch-action: none;
  cursor: grab;
}

.nt-rrow.dragging {
  background: var(--yellow);
  cursor: grabbing;
}

.nt-rrow .pos {
  font-family: var(--fd);
  font-size: 22px;
  width: 26px;
  text-align: center;
}

.nt-rrow .nm {
  font-family: var(--fd);
  font-size: 17px;
  flex: 1;
}

.nt-rrow .grip {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nt-rrow .grip i {
  width: 18px;
  height: 3px;
  background: color-mix(in srgb, var(--ink) 40%, transparent);
}

.nt-hint {
  text-align: center;
  font-family: var(--fb);
  font-weight: 700;
  font-size: 11px;
  color: color-mix(in srgb, var(--ink) 50%, transparent);
}

.text-ans {
  font-size: 22px;
  text-align: center;
  text-transform: uppercase;
}

.ana-zone {
  align-items: center;
}

.ana-answer {
  font-family: var(--fb);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: 5px;
  min-height: 46px;
  border: 3px dashed var(--ink);
  width: 100%;
  text-align: center;
  padding: 8px;
  background: var(--paper);
}

.answer-zone .letter-tiles {
  margin: 8px 0;
}

.answer-zone .ltile {
  width: 46px;
  height: 58px;
  font-size: 28px;
}

.ana-actions {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-top: auto;
}

.ana-actions .btn {
  flex: 1;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-8px) rotate(-1deg);
  }

  40% {
    transform: translateX(8px) rotate(1deg);
  }

  60% {
    transform: translateX(-6px);
  }

  80% {
    transform: translateX(6px);
  }
}

.anim-shake {
  animation: shake .45s;
}

@keyframes pop {
  0% {
    transform: scale(0) rotate(-12deg);
  }

  70% {
    transform: scale(1.12) rotate(4deg);
  }

  100% {
    transform: scale(1) rotate(0);
  }
}

.anim-pop {
  animation: pop .35s cubic-bezier(.2, 1.3, .4, 1) both;
}

@keyframes slide-in-up {
  0% {
    transform: translateY(40px) scale(.9);
    opacity: 0;
  }

  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.anim-slide-up {
  animation: slide-in-up .4s cubic-bezier(.2, 1.1, .4, 1) both;
}

@keyframes slide-in-left {
  0% {
    transform: translateX(-60px) rotate(-6deg);
    opacity: 0;
  }

  100% {
    transform: translateX(0) rotate(0);
    opacity: 1;
  }
}

.anim-slide-left {
  animation: slide-in-left .4s cubic-bezier(.2, 1.1, .4, 1) both;
}

@keyframes wobble {

  0%,
  100% {
    transform: rotate(-2deg);
  }

  50% {
    transform: rotate(2deg);
  }
}

.anim-wobble {
  animation: wobble 2.4s ease-in-out infinite;
}

@keyframes float-y {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.anim-float {
  animation: float-y 3s ease-in-out infinite;
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 46, 147, .55);
  }

  100% {
    box-shadow: 0 0 0 24px rgba(255, 46, 147, 0);
  }
}

.anim-pulse {
  animation: pulse-ring 1.4s ease-out infinite;
}

@keyframes blink-bg {

  0%,
  100% {
    background: var(--magenta);
  }

  50% {
    background: var(--yellow);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.anim-spin {
  animation: spin 1s linear infinite;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* count-up helper */
.tabular {
  font-variant-numeric: tabular-nums;
}

/* bandeau marquee defilant */
.marquee {
  overflow: hidden;
  white-space: nowrap;
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.marquee .track {
  display: inline-block;
  padding: 8px 0;
  font-family: var(--fd);
  letter-spacing: 4px;
  font-size: 14px;
  animation: marquee 18s linear infinite;
}

.marquee .track span {
  padding: 0 22px;
}

/* utilitaires layout */
.center-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  gap: 22px;
}

.stack {
  display: flex;
  flex-direction: column;
}

.row {
  display: flex;
}

.hidden {
  display: none !important;
}

.muted {
  color: color-mix(in srgb, var(--ink) 55.00000000000001%, transparent);
}

.mono-700 {
  font-weight: 700;
}

/* scrollbars MASQUÉES partout (le scroll reste fonctionnel) — design épuré */
* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

/* ============================================================
   SPLASH / BOOT — texte HOMIES animé (brutaliste, sans image)
   partagé par l'accueil, le boot de l'hôte et l'onboarding
   ============================================================ */
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--paper);
  background-image: radial-gradient(rgba(10, 10, 10, .12) 2px, transparent 2px);
  background-size: 24px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 24px;
  overflow: hidden;
  transition: opacity .45s ease;
}

.splash-screen.hide {
  opacity: 0;
  pointer-events: none;
}

/* bandeau de couleur en biais derrière le logo */
.splash-screen::before {
  content: '';
  position: absolute;
  left: -10%;
  right: -10%;
  top: 42%;
  height: 122px;
  background: var(--cyan);
  border-top: 5px solid var(--ink);
  border-bottom: 5px solid var(--ink);
  transform: rotate(-5deg);
  z-index: 0;
}

.splash-logo {
  position: relative;
  z-index: 2;
  display: inline-block;
  transform: rotate(-3deg);
  animation: splash-pop .6s cubic-bezier(.2, 1.5, .4, 1) both;
}

.splash-logo::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 10px;
  right: -10px;
  bottom: -10px;
  background: var(--ink);
}

.splash-logo .body {
  position: relative;
  padding: 16px 32px;
  border: 6px solid var(--ink);
  background: var(--magenta);
  font-family: var(--fd);
  font-size: clamp(54px, 17vw, 92px);
  line-height: .9;
  letter-spacing: 3px;
  color: var(--paper);
  text-transform: uppercase;
}

.splash-sub {
  position: relative;
  z-index: 2;
  font-family: var(--fb);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--ink);
  background: var(--yellow);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  padding: 6px 14px;
  text-align: center;
  opacity: 0;
  animation: splash-fade 1s .45s ease both;
}

/* stickers brutalistes flottants (décor) */
.splash-deco {
  position: absolute;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  font-size: 30px;
  border: 4px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  opacity: 0;
  animation: splash-deco-in .5s ease both;
}

.splash-deco img {
  width: 34px;
  height: 34px;
}

.splash-deco.d1 {
  top: 12%;
  left: 12%;
  background: var(--yellow);
  transform: rotate(-12deg);
  animation-delay: .25s;
}

.splash-deco.d2 {
  top: 16%;
  right: 12%;
  background: var(--green);
  transform: rotate(10deg);
  animation-delay: .38s;
}

.splash-deco.d3 {
  bottom: 16%;
  left: 16%;
  background: var(--red);
  transform: rotate(8deg);
  animation-delay: .50s;
}

.splash-deco.d4 {
  bottom: 13%;
  right: 14%;
  background: var(--magenta);
  transform: rotate(-9deg);
  animation-delay: .62s;
}

@keyframes splash-pop {
  0% {
    transform: rotate(-3deg) scale(.4) translateY(40px);
    opacity: 0;
  }

  60% {
    transform: rotate(2deg) scale(1.1) translateY(-6px);
    opacity: 1;
  }

  100% {
    transform: rotate(-3deg) scale(1) translateY(0);
    opacity: 1;
  }
}

@keyframes splash-fade {

  0%,
  30% {
    opacity: 0;
    transform: translateY(12px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes splash-deco-in {
  0% {
    opacity: 0;
    transform: scale(.3);
  }

  70% {
    opacity: 1;
  }

  100% {
    opacity: 1;
  }
}

/* ---- header partagé : HOMIES (gauche) + avatar profil (droite) ---- */
.app-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(12px, env(safe-area-inset-top)) 16px 12px;
  border-bottom: 3px solid var(--ink);
  background: var(--paper);
  flex-shrink: 0;
}

.app-brand {
  position: relative;
  display: inline-block;
}

.app-brand::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  right: -4px;
  bottom: -4px;
  background: var(--ink);
}

.app-brand .body {
  position: relative;
  padding: 7px 14px;
  border: 3px solid var(--ink);
  background: var(--magenta);
  font-family: var(--fd);
  font-size: 18px;
  letter-spacing: 2px;
  color: var(--paper);
}

.app-ava {
  position: relative;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.app-ava::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 44px;
  height: 44px;
  background: var(--ink);
}

.app-ava .inner {
  position: relative;
  width: 44px;
  height: 44px;
  border: 3px solid var(--ink);
  background: var(--paper);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-ava .inner .ava-emo {
  width: 100%;
  height: 100%;
  border: 0;
}

.app-ava .inner img,
.app-ava .inner svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ---- avatar profil/onboarding : légère animation idle (vivant) ---- */
@keyframes ava-idle {

  0%,
  100% {
    transform: rotate(-2deg) translateY(0);
  }

  50% {
    transform: rotate(2deg) translateY(-2px);
  }
}

.pf-ava .ava-emo .dbimg,
.pf-ava .ava-emo .ava-glyph,
.pe-preview .ava-emo .dbimg,
.pe-preview .ava-emo .ava-glyph {
  animation: ava-idle 2.8s ease-in-out infinite;
  transform-origin: 50% 85%;
}

/* ============================================================
   PWA — bannières installation / mise à jour (brutaliste)
   ============================================================ */
.pwa-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 1100;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 12px 14px;
  border: 4px solid var(--ink);
  background: var(--paper);
  box-shadow: 6px 6px 0 var(--ink);
  transform: translateY(140%);
  transition: transform .3s cubic-bezier(.2, 1.4, .4, 1);
  max-width: 520px;
  margin: 0 auto;
}

.pwa-banner.show {
  transform: translateY(0);
}

#pwa-update {
  background: var(--green);
}

#pwa-install {
  background: var(--yellow);
}

.pwa-banner .pwa-msg {
  flex: 1;
  font-family: var(--fb);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.25;
}

.pwa-banner .pwa-btn {
  flex-shrink: 0;
  font-family: var(--fd);
  font-size: 13px;
  letter-spacing: 1px;
  padding: 9px 12px;
  border: 3px solid var(--ink);
  background: var(--magenta);
  color: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
}

.pwa-banner .pwa-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.pwa-banner .pwa-x {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border: 3px solid var(--ink);
  background: var(--paper);
  font-size: 13px;
  cursor: pointer;
  line-height: 1;
  display: grid;
  place-items: center;
}

/* overlay instructions iOS */
.pwa-ios-ov {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: color-mix(in srgb, var(--ink) 55.00000000000001%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  opacity: 0;
  transition: opacity .2s ease;
}

.pwa-ios-ov.show {
  opacity: 1;
}

.pwa-ios-card {
  width: 100%;
  max-width: 380px;
  background: var(--paper);
  border: 5px solid var(--ink);
  box-shadow: 9px 9px 0 var(--ink);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pwa-ios-title {
  font-family: var(--fd);
  font-size: 24px;
  letter-spacing: 1px;
}

.pwa-ios-step {
  font-family: var(--fb);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.5;
  border-left: 5px solid var(--magenta);
  padding-left: 10px;
}

.pwa-ios-warn {
  font-family: var(--fb);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.5;
  background: var(--yellow);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  padding: 10px 12px;
}

.pwa-ios-ic {
  display: inline-block;
  transform: translateY(2px);
}

.pwa-ios-ok {
  margin-top: 4px;
  align-self: stretch;
  font-family: var(--fd);
  font-size: 18px;
  letter-spacing: 1px;
  padding: 12px;
  border: 4px solid var(--ink);
  background: var(--green);
  box-shadow: 5px 5px 0 var(--ink);
  cursor: pointer;
}

/* ---- footer de l'écran de fin : boutons (PARTAGER top-3 + RETOUR) bien dimensionnés ---- */
.res-foot .btn {
  font-size: 16px;
  letter-spacing: .5px;
  padding: 14px 10px;
}

.res-foot .btn[hidden] {
  display: none;
}

/* ============================================================
   FORMATS — Battle Royale : grille survivants, spectateur, écran ÉLIMINÉ
   ============================================================ */
.fmt-hud {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 14px 13px;
}

.fmt-hud[hidden] {
  display: none;
}

.fmt-count {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--fd);
  font-size: 13px;
  letter-spacing: .5px;
  color: var(--paper);
  background: var(--red);
  border: 3px solid var(--ink);
  padding: 3px 8px;
  white-space: nowrap;
}

.fmt-count .noto {
  width: 18px;
  height: 18px;
}

.fmt-count b {
  font-size: 16px;
}

.fmt-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  overflow: visible;
  flex: 1;
  min-width: 0;
}

.fmt-sav {
  width: 30px;
  height: 30px;
  border: 2px solid var(--ink);
  flex: 0 0 auto;
  background: var(--paper);
  overflow: hidden;
  position: relative;
}

.fmt-sav>* {
  width: 100%;
  height: 100%;
  display: block;
}

/* SOI bien visible : bordure magenta + anneau crème + tag "TOI" (plus de simple outline) */
.fmt-sav.me {
  border: 3px solid var(--magenta);
  overflow: visible;
  box-shadow: 0 0 0 2px var(--paper);
  z-index: 2;
}

.fmt-sav.me .me-tag {
  position: absolute;
  width: auto;
  height: auto;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--fd);
  font-size: 8px;
  letter-spacing: .5px;
  line-height: 1;
  background: var(--magenta);
  color: var(--paper);
  border: 1.5px solid var(--ink);
  padding: 1px 3px;
  white-space: nowrap;
}

.fmt-sav.dead {
  filter: grayscale(1) brightness(.7);
  opacity: .55;
}

.fmt-sav.dead::after {
  content: "\2620";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--ink);
}

/* SPECTATEUR éliminé (hôte + joueur) : bandeau compact + options en lecture seule (grisées, non cliquables) */
.spectator-strip {
  margin: 4px 14px 10px;
  border: 3px solid var(--ink);
  background: var(--red);
  color: var(--paper);
  font-family: var(--fd);
  font-size: 14px;
  letter-spacing: 1px;
  text-align: center;
  padding: 8px 12px;
  box-shadow: 3px 3px 0 var(--ink);
}

.spectator-strip .noto {
  width: 18px;
  height: 18px;
  vertical-align: -3px;
}

.options-col .opt.ghost {
  opacity: .5;
  pointer-events: none;
  cursor: default;
}

.spectator-banner {
  position: relative;
  margin: 30px 14px;
}

.spectator-banner .sh {
  position: absolute;
  top: 6px;
  left: 6px;
  right: -6px;
  bottom: -6px;
  background: var(--ink);
}

.spectator-banner .bd {
  position: relative;
  border: 4px solid var(--ink);
  background: var(--red);
  color: var(--paper);
  font-family: var(--fd);
  font-size: 20px;
  text-align: center;
  padding: 18px 14px;
  letter-spacing: 1px;
}

.spectator-banner .bd .noto {
  width: 24px;
  height: 24px;
  vertical-align: -4px;
}

.elim-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 30px 20px;
  background: var(--red);
  text-align: center;
}

.elim-emoji {
  width: 96px;
  height: 96px;
}

.elim-emoji .noto {
  width: 100%;
  height: 100%;
}

.elim-title .body {
  background: var(--paper);
  font-family: var(--fd);
  font-size: 44px;
  letter-spacing: 2px;
  padding: 6px 28px;
}

.elim-sub {
  font-family: var(--fd);
  font-size: 18px;
  color: var(--paper);
  letter-spacing: 1px;
}

.elim-rank .body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--fb);
  font-weight: 700;
  font-size: 15px;
  padding: 8px 18px;
}

.elim-rank b {
  color: var(--yellow);
}

.elim-watch {
  margin-top: 8px;
  font-family: var(--fb);
  font-size: 12px;
  color: rgba(255, 254, 247, .75);
  letter-spacing: 1px;
}

/* lignes "éliminé" (Battle Royale) — carte ROUGE pleine et lourde (même poids que les autres cartes,
   gagne même quand la ligne est aussi .row-me / .me). Temporaire (.lb-row) + podium (.player-result). */
.lb-row.dead .bd,
.lb-row.dead.row-me .bd,
.lb-row.dead.row-1st .bd {
  background: var(--red);
  border-color: var(--ink);
}

.lb-row.dead .lb-nm {
  color: var(--paper);
}

.lb-row.dead .lb-delta {
  color: rgba(255, 254, 247, .85);
}

.lb-row.dead .lb-av {
  filter: grayscale(1);
}

.lb-row.dead .lb-rank,
.lb-row.dead.row-me .lb-rank,
.lb-row.dead.row-1st .lb-rank {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--paper);
}

.player-result.dead .bd,
.player-result.dead.me .bd {
  background: var(--red);
  border-color: var(--ink);
}

.player-result.dead .nm {
  color: var(--paper);
}

.player-result.dead .ava {
  filter: grayscale(1);
}

.player-result.dead .rk {
  color: var(--paper);
}

/* badge de la manche de sortie (sur fond rouge) */
.elim-out {
  font-family: var(--fd);
  font-size: 13px;
  letter-spacing: .5px;
  background: var(--ink);
  color: #FFD600;
  border: 2.5px solid var(--paper);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, .4);
  padding: 5px 9px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  transform: rotate(-2deg);
  flex-shrink: 0;
}

/* ============================================================
   FORMATS — Quitte ou double : écran de pari (DOUBLE / JE GARDE)
   ============================================================ */
.qod-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px 18px;
  background: var(--yellow);
  text-align: center;
}

.qod-pill {
  position: relative;
  display: inline-flex;
}

.qod-pill .sh {
  position: absolute;
  top: 5px;
  left: 5px;
  right: -5px;
  bottom: -5px;
  background: var(--ink);
}

.qod-pill .bd {
  position: relative;
  /* fond clair + texte noir (comme le badge MISE LIBRE) : plus de badge
     noir sur ombre noire — l'ombre décalée redevient visible et nette */
  background: var(--paper);
  color: var(--ink);
  border: 4px solid var(--ink);
  font-family: var(--fd);
  font-size: 18px;
  letter-spacing: 1.5px;
  padding: 6px 18px;
}

.qod-emoji {
  width: 84px;
  height: 84px;
}

.qod-emoji .noto {
  width: 100%;
  height: 100%;
}

.qod-score {
  font-family: var(--fb);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--ink);
  line-height: 1.25;
}

.qod-score b {
  display: block;
  font-family: var(--fd);
  font-size: 40px;
  letter-spacing: 1px;
}

.qod-q {
  font-family: var(--fd);
  font-size: 22px;
  letter-spacing: 1px;
  color: var(--ink);
}

.qod-btns {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 340px;
}

.qod-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  border: 4px solid var(--ink);
  padding: 14px 12px;
  cursor: pointer;
  box-shadow: 6px 6px 0 var(--ink);
  font-family: inherit;
  transition: transform .08s, box-shadow .08s;
}

.qod-btn:active {
  transform: translate(3px, 3px);
  box-shadow: 3px 3px 0 var(--ink);
}

.qod-btn .big {
  font-family: var(--fd);
  font-size: 26px;
  letter-spacing: 1px;
}

.qod-btn .sub {
  font-family: var(--fb);
  font-size: 11px;
  letter-spacing: .5px;
  opacity: .85;
}

.qod-btn.double {
  background: var(--magenta);
  color: var(--paper);
}

.qod-btn.keep {
  background: var(--green);
  color: var(--ink);
}

.qod-btn:disabled {
  cursor: default;
}

.qod-btn:disabled:not(.picked) {
  filter: grayscale(.8) opacity(.5);
  box-shadow: 4px 4px 0 var(--ink);
}

.qod-btn.picked {
  outline: 4px solid var(--ink);
  outline-offset: 2px;
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--ink);
}

.qod-timer {
  width: 100%;
  max-width: 340px;
  height: 12px;
  border: 3px solid var(--ink);
  background: var(--paper);
  overflow: hidden;
}

.qod-timer i {
  display: block;
  height: 100%;
  background: var(--ink);
  width: 100%;
}

.qod-chosen {
  font-family: var(--fd);
  font-size: 15px;
  letter-spacing: 1px;
  color: var(--ink);
  background: var(--paper);
  border: 3px solid var(--ink);
  padding: 8px 16px;
}

.qod-chosen[hidden] {
  display: none;
}

/* ============================================================
   FORMATS — La Bombe : HUD (mèche + vies), tour d'attente, explosion
   ============================================================ */
.bomb-fuse {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--fd);
  color: var(--paper);
  background: var(--red);
  border: 3px solid var(--ink);
  padding: 3px 9px;
  white-space: nowrap;
}

.bomb-fuse .noto {
  width: 20px;
  height: 20px;
}

.bomb-fuse b {
  font-size: 20px;
  min-width: 16px;
  text-align: center;
}

.fmt-hud.bomb .fmt-grid {
  gap: 7px;
  flex-wrap: wrap;
}

.fmt-hud.bomb .fmt-sav {
  width: 34px;
  height: 34px;
  overflow: visible;
}

.fmt-sav.holder {
  outline: 3px solid var(--red);
  outline-offset: 1px;
  box-shadow: 0 0 0 2px var(--yellow);
}

.fmt-sav .bomb-lives {
  position: absolute;
  bottom: -7px;
  right: -7px;
  width: auto;
  /* sinon .fmt-sav>* impose 100% -> le badge recouvre l'avatar */
  height: auto;
  font-size: 8px;
  line-height: 1;
  background: var(--paper);
  border: 2px solid var(--ink);
  padding: 1px 3px;
  color: var(--red);
  white-space: nowrap;
  z-index: 3;
  /* badge au-dessus de l'avatar, mais compact */
}

.bombe-wait {
  position: relative;
  margin: 24px 14px;
}

.bombe-wait .sh {
  position: absolute;
  top: 6px;
  left: 6px;
  right: -6px;
  bottom: -6px;
  background: var(--ink);
}

.bombe-wait .bd {
  position: relative;
  border: 4px solid var(--ink);
  background: var(--orange);
  color: var(--ink);
  font-family: var(--fd);
  font-size: 19px;
  text-align: center;
  padding: 18px 14px;
  letter-spacing: .5px;
}

.bombe-wait .bd .noto {
  width: 22px;
  height: 22px;
  vertical-align: -4px;
}

.bomb-flash {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  animation: bombFlash .85s ease-out forwards;
}

.bomb-flash.me {
  background: rgba(255, 82, 82, .35);
}

.bomb-flash .noto {
  width: 140px;
  height: 140px;
}

@keyframes bombFlash {
  0% {
    opacity: 0;
    transform: scale(.6);
  }

  18% {
    opacity: 1;
    transform: scale(1.12);
  }

  100% {
    opacity: 0;
    transform: scale(1.28);
  }
}

/* ============================================================
   BLIND TEST — lecteur d'extrait (vinyle + ▶ écouter + barre)
   posé dans la zone média ; les options restent un QCM normal.
   ============================================================ */
.bt-media {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 6px 0 2px;
}

/* vrai disque vinyle : sillons + label coloré + trou central, reflet fixe au-dessus */
.bt-disc {
  position: relative;
  width: 132px;
  height: 132px;
  flex: 0 0 auto;
}

.bt-vinyl {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  /* couche 1 (dessus) : label magenta + liseré, transparent au-delà pour révéler les sillons */
  /* couche 2 : sillons concentriques */
  background:
    radial-gradient(circle at 50% 50%, var(--magenta) 0 30%, var(--ink) 30% 33%, rgba(0, 0, 0, 0) 33% 100%),
    repeating-radial-gradient(circle at 50% 50%, #262626 0 1.5px, #0b0b0b 1.5px 5px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.bt-vinyl::after {
  /* trou central */
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--ink);
}

.bt-disc::after {
  /* reflet — reste fixe pendant que le disque tourne */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, .22) 0 13%, rgba(255, 255, 255, 0) 34% 70%, rgba(255, 255, 255, .07) 88% 100%);
  pointer-events: none;
}

.bt-vinyl.spin {
  animation: bt-spin 2.2s linear infinite;
}

@keyframes bt-spin {
  to {
    transform: rotate(360deg);
  }
}

.bt-play {
  font-family: var(--fd);
  letter-spacing: 1px;
  font-size: 16px;
  padding: 11px 18px;
  border: 4px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  background: var(--green);
  color: var(--ink);
  cursor: pointer;
  width: 100%;
  max-width: 320px;
}

.bt-play:active {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--ink);
}

.bt-play:disabled {
  filter: grayscale(.5) opacity(.6);
  cursor: default;
}

.bt-bar {
  width: 100%;
  max-width: 320px;
  height: 12px;
  border: 3px solid var(--ink);
  background: var(--paper);
  overflow: hidden;
}

.bt-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--magenta);
}

/* reveal du morceau dans l'écran feedback (pochette + titre + artiste) */
.fb-song {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px auto 0;
  max-width: 360px;
  padding: 8px;
  border: 4px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  background: var(--paper);
  color: var(--ink);
}

.fb-song-art {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border: 3px solid var(--ink);
  flex: 0 0 auto;
}

.fb-song-txt {
  text-align: left;
  min-width: 0;
}

.fb-song-t {
  font-family: var(--fd);
  font-size: 18px;
  line-height: 1.05;
  letter-spacing: .5px;
}

.fb-song-a {
  font-size: 12px;
  opacity: .7;
  margin-top: 3px;
}

/* ============================================================
   NOUVEAUX MODES — Tu préfères / Multi / Titre emojis / Dézoom / Hotspot
   ============================================================ */
/* TU PRÉFÈRES : 2 gros boutons façon "versus" */
.answer-zone.versus .opt {
  min-height: 92px;
}

.answer-zone.versus .opt .text {
  font-size: 20px;
}

/* QCM MULTI-RÉPONSES : sélection multiple */
/* MULTI : la sélection ne change QUE la checkbox (case ✓), pas le fond de l'option */
.multi-zone .opt.multi {
  cursor: pointer;
}

.multi-zone .opt.multi .ocheck {
  opacity: 1;
  transform: none;
  color: transparent;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 6px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.multi-zone .opt.multi.picked .ocheck {
  color: var(--ink);
  background: var(--green);
}

.multi-zone .sub {
  margin-top: 12px;
}

/* DEVINE LE TITRE EN EMOJIS */
.nt-emojiseq {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--paper);
  border: 4px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  padding: 16px;
  margin: 4px 0;
}

.nt-emojiseq .e {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nt-emojiseq .e img {
  width: 54px;
  height: 54px;
}

/* DÉZOOM : image qui s'élargit */
.nt-zoomwrap {
  height: 180px;
  margin: 4px 0;
  border: 4px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  background: #4D7CFF;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nt-zoom {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: center center;
  transition: transform .25s linear;
}

.nt-zoom .media-img,
.nt-zoom img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nt-zoom .media-emoji,
.nt-zoom .noto,
.nt-zoom .noto-fill {
  width: 120px;
  height: 120px;
}

/* HOTSPOT : tap sur l'image */
.nt-hotspot {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 340px;
  margin: 4px 0;
  border: 4px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  background: var(--cyan);
  overflow: hidden;
  cursor: crosshair;
}

.nt-hsimg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nt-hsimg .media-img,
.nt-hsimg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nt-hsimg .media-emoji,
.nt-hsimg .noto,
.nt-hsimg .noto-fill {
  width: 58%;
  height: 58%;
}

.nt-hsmark {
  position: absolute;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  border: 4px solid var(--magenta);
  box-shadow: 0 0 0 3px var(--paper);
  pointer-events: none;
  z-index: 3;
}

.nt-hstarget {
  position: absolute;
  border: 4px dashed var(--ink);
  background: rgba(91, 232, 133, .35);
  box-shadow: 0 0 0 2px var(--paper) inset;
  pointer-events: none;
  z-index: 2;
}

/* PAR ÉQUIPES — bandeau ROUGE vs BLEU */
.team-hud {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin: 10px auto 6px;
  max-width: 460px;
  width: 92%;
}

.team-hud .th-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 6px;
  border: 4px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  background: var(--paper);
}

.team-hud .th-red {
  background: #FF5252;
  color: var(--paper);
}

.team-hud .th-blue {
  background: #4D7CFF;
  color: var(--paper);
}

.team-hud .th-side.lead {
  box-shadow: 4px 4px 0 var(--ink), 0 0 0 4px var(--yellow);
}

.team-hud .th-side.me .th-nm::after {
  content: ' (TOI)';
  font-size: 9px;
}

.team-hud .th-nm {
  font-family: var(--fd);
  font-size: 14px;
  letter-spacing: 1px;
}

.team-hud .th-sc {
  font-family: var(--fd);
  font-size: 26px;
  line-height: 1;
}

.team-hud .th-vs {
  align-self: center;
  font-family: var(--fd);
  font-size: 16px;
}

/* DUEL (1v1) : variante du versus avec AVATAR + nom/score en ligne (cf. duelHud) */
.team-hud.duel .th-side { flex-direction: row; align-items: center; gap: 9px; text-align: left; padding: 8px 10px; }
.team-hud.duel .th-ava { width: 40px; height: 40px; border: 3px solid var(--ink); flex-shrink: 0; overflow: hidden; display: block; }
.team-hud.duel .th-ava .ava-emo { width: 100%; height: 100%; display: block; border: 0; box-shadow: none; }
.team-hud.duel .th-ava .ava-emo img { width: 100%; height: 100%; display: block; }
.team-hud.duel .th-tx { min-width: 0; display: flex; flex-direction: column; gap: 1px; line-height: 1; }
.team-hud.duel .th-nm { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-hud.duel .th-sc { font-size: 22px; }
/* 1v1 : pas d'anneau jaune "meneur" (les 2 scores le montrent déjà) */
.team-hud.duel .th-side.lead { box-shadow: 4px 4px 0 var(--ink); }

/* FIN DE DUEL : sur le podium HÔTE, on masque la barre de jeu (.hdr : son/steps/code SALLE)
   -> écran de fin propre et cohérent avec celui du joueur (qui n'a pas de barre). */
body:has(#screen-podium.active .duel-end) .hdr { display: none !important; }
/* FIN DE DUEL : face-à-face vainqueur/perdant, injecté dans #podium (play & host) */
/* #podium est une GRILLE 3-places (podium 1/2/3) -> le bloc duel/défi y était coincé dans
   une seule colonne (vide à droite, pastilles qui wrappent). On casse la grille -> pleine largeur. */
.podium:has(.duel-end), .podium:has(.daily-end) { display: block !important; grid-template-columns: none !important; gap: 0 !important; padding: 0 !important; }
/* centre verticalement l'écran de duel dans la zone dispo -> plus de gros vide sous "ÉCART" */
#screen-over .res-scroll:has(.duel-end),
#screen-podium .res-scroll:has(.duel-end) { display: flex; flex-direction: column; justify-content: center; }
.duel-end { position: relative; display: flex; flex-direction: column; gap: 15px; padding: 6px 4px 4px; width: 100%; }
/* HERO = bandeau jaune (DUEL TERMINÉ + VICTOIRE/DÉFAITE + sous-titre + chips), rayons — conforme maquette */
.duel-end .de-hero { position: relative; overflow: hidden; border: 4px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); background: var(--yellow); padding: 16px 14px; text-align: center; }
.duel-end .de-hero .de-rays { position: absolute; top: -55%; left: 50%; width: 165%; aspect-ratio: 1; transform: translateX(-50%); background: repeating-conic-gradient(from 0deg at 50% 42%, rgba(0,0,0,.10) 0 11deg, transparent 11deg 22deg); z-index: 0; animation: de-spin 22s linear infinite; }
.duel-end.lose .de-hero .de-rays { background: repeating-conic-gradient(from 0deg at 50% 42%, #E63946 0 11deg, transparent 11deg 22deg); opacity: .3; }
@media (prefers-reduced-motion: reduce) { .duel-end .de-hero .de-rays { animation: none; } }
.duel-end .de-hero > * { position: relative; z-index: 1; }
.duel-end .de-kick { font-family: var(--fd); font-size: 12px; letter-spacing: 3px; opacity: .7; }
.duel-end .de-vtxt { font-family: var(--fd); font-size: 46px; line-height: .92; letter-spacing: 1px; margin-top: 2px; -webkit-text-stroke: 2px var(--ink); color: var(--yellow); text-shadow: 4px 4px 0 var(--ink); }
.duel-end.lose .de-vtxt { color: #E63946; }
.duel-end.tie .de-vtxt { color: var(--paper); }
.duel-end .de-sub { font-family: var(--fb); font-weight: 800; font-size: 13px; letter-spacing: .3px; margin-top: 4px; }
.duel-end .de-rewards { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.duel-end .de-chip { font-family: var(--fd); font-size: 14px; letter-spacing: .5px; border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); padding: 4px 11px; background: var(--paper); color: var(--ink); }
.duel-end .de-chip.xp { background: var(--cyan, #5BD8E5); }
.duel-end .de-chip.dj { background: var(--green, #5BE885); }
/* face-à-face : gagnant dominant (piédestal + couronne), perdant plus bas + atténué */
.duel-end .de-face { display: flex; align-items: flex-end; justify-content: center; gap: 14px; padding: 0 8px; }
.duel-end .de-card { flex: 1; max-width: 160px; position: relative; }
.duel-end .de-card .sh { position: absolute; inset: 6px -5px -5px 5px; background: var(--ink); }
.duel-end .de-card .bd { position: relative; border: 4px solid var(--ink); background: var(--paper); padding: 16px 8px 12px; text-align: center; }
.duel-end .de-card.win .bd { background: var(--yellow); padding-top: 22px; }
.duel-end .de-card.lose { margin-top: 26px; opacity: .82; }
.duel-end .de-card.me .bd { box-shadow: inset 0 0 0 3px var(--magenta); }
.duel-end.tie .de-card.lose { margin-top: 0; opacity: 1; }
.duel-end.tie .de-card.win .bd { background: var(--paper); padding-top: 16px; }
.duel-end .de-crown { position: absolute; top: -28px; left: 50%; transform: translateX(-50%) rotate(-6deg); z-index: 3; }
.duel-end .de-crown img, .duel-end .de-crown .noto { width: 46px; height: 46px; display: block; }   /* la couronne animée (Noto GIF) */
.duel-end .de-card .ava { width: 82px; height: 82px; border: 3px solid var(--ink); background: var(--paper); overflow: hidden; margin: 0 auto; }
.duel-end .de-card.lose .ava { width: 66px; height: 66px; }
.duel-end .de-card .ava .ava-emo { width: 100%; height: 100%; }
.duel-end .de-card .ava img { width: 100%; height: 100%; display: block; }
.duel-end .de-nm { font-family: var(--fd); font-size: 17px; letter-spacing: .5px; margin-top: 9px; word-break: break-word; }
.duel-end .de-sc { font-family: var(--fd); font-size: 38px; line-height: 1; }
.duel-end .de-card.lose .de-sc { font-size: 28px; }
.duel-end .de-tag { display: inline-block; margin-top: 7px; font-family: var(--fd); font-size: 12px; letter-spacing: 1px; border: 3px solid var(--ink); padding: 2px 10px; box-shadow: 3px 3px 0 var(--ink); background: var(--green); }
.duel-end .de-tag.lose { background: #E63946; color: var(--paper); box-shadow: none; }
/* barre d'écart proportionnelle aux scores */
.duel-end .de-bar { display: flex; height: 24px; border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); overflow: hidden; margin: 0 8px; }
.duel-end .de-bar .w { background: var(--yellow); min-width: 4px; }
.duel-end .de-bar .l { background: #D9D9D9; min-width: 4px; }
.duel-end .de-recap { text-align: center; font-family: 'IBM Plex Mono', monospace; font-weight: 700; font-size: 12px; opacity: .65; }
/* manche par manche : une pastille gagnée/perdue par question, par joueur */
.duel-end .de-rounds { display: flex; flex-direction: column; gap: 8px; border: 3px solid var(--ink); background: var(--paper); box-shadow: 3px 3px 0 var(--ink); padding: 11px 13px; margin: 0 8px; }
.duel-end .de-rrow { display: flex; align-items: center; gap: 10px; }
.duel-end .de-rlbl { font-family: var(--fd); font-size: 12px; letter-spacing: .5px; width: 84px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* manche par manche = CARRÉS brutalist (vert gagné / rouge perdu, ombre noire) */
.duel-end .de-sqs { display: flex; gap: 7px; flex-wrap: wrap; }
.duel-end .de-sq { width: 20px; height: 20px; border: 2.5px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); background: #D9D9D9; }
.duel-end .de-sq.w { background: var(--green, #5BE885); }
.duel-end .de-sq.l { background: #E63946; }

/* ===== FIN DE DÉFI (Mix du jour) — écran de victoire, PAS un classement ===== */
.daily-end { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 30px 14px 18px; overflow: hidden; }
.daily-end .de-burst { position: absolute; top: -10%; left: 50%; width: 150%; aspect-ratio: 1; transform: translateX(-50%); z-index: 0;
  background: repeating-conic-gradient(from 0deg at 50% 42%, var(--yellow) 0deg 12deg, transparent 12deg 24deg); opacity: .5; animation: de-spin 22s linear infinite; }
.daily-end.fail .de-burst { background: repeating-conic-gradient(from 0deg at 50% 42%, #E63946 0deg 12deg, transparent 12deg 24deg); opacity: .22; }
@keyframes de-spin { to { transform: translateX(-50%) rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .daily-end .de-burst { animation: none; } }
.daily-end > *:not(.de-burst) { position: relative; z-index: 1; }
.daily-end .de-medal { font-size: 74px; line-height: 1; filter: drop-shadow(4px 4px 0 var(--ink)); animation: de-pop .5s cubic-bezier(.18,1.5,.4,1) both; }
@keyframes de-pop { from { transform: scale(0) rotate(-18deg); } to { transform: scale(1) rotate(0); } }
.daily-end .de-ttl { font-family: var(--fd); font-size: 34px; letter-spacing: 1px; text-align: center; -webkit-text-stroke: 1px var(--ink); text-shadow: 3px 3px 0 var(--ink); color: var(--paper); }
.daily-end.win .de-ttl { color: var(--yellow); }
.daily-end.fail .de-ttl { color: #E63946; }
.daily-end .de-reward { font-family: var(--fd); font-size: 30px; background: var(--green); color: var(--ink); border: 4px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); padding: 6px 20px; transform: rotate(-3deg); animation: de-pop .55s .15s cubic-bezier(.18,1.5,.4,1) both; }
.daily-end .de-reward span { font-size: 22px; }
.daily-end .de-plate { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 4px solid var(--ink); background: var(--paper); box-shadow: 5px 5px 0 var(--ink); padding: 10px 34px; }
.daily-end .de-plate .l { font-family: var(--fb); font-weight: 800; font-size: 11px; letter-spacing: 2px; opacity: .6; }
.daily-end .de-plate .n { font-family: var(--fd); font-size: 40px; line-height: 1; }
.daily-end .de-objline { font-family: 'IBM Plex Mono', monospace; font-weight: 700; font-size: 12px; text-align: center; opacity: .7; max-width: 260px; }

/* ===== ÉCRAN DÉTAIL du Mix du jour (avant lancement) ===== */
/* OPAQUE dès l'affichage (plus de fondu) -> l'écran "rejoindre" ne clignote plus derrière */
.daily-intro { position: fixed; inset: 0; z-index: 340; display: flex; align-items: center; justify-content: center; padding: 22px; overflow-y: auto;
  background: linear-gradient(165deg, #FF3EA5 0%, #7A2BE2 60%, #4D2BE2 100%); }
.daily-intro .di-inner { animation: di-pop .28s cubic-bezier(.2,1.3,.5,1) both; }
@keyframes di-pop { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
/* objectif RÉEL du jour, mis en avant */
.daily-intro .di-obj { width: 100%; display: flex; flex-direction: column; gap: 3px; align-items: center; border: 3px solid var(--ink); background: var(--yellow); color: var(--ink); box-shadow: 5px 5px 0 var(--ink); padding: 12px; margin-bottom: 16px; }
.daily-intro .di-obj-k { font-family: var(--fb); font-weight: 800; font-size: 10px; letter-spacing: 2px; opacity: .7; }
.daily-intro .di-obj-v { font-family: var(--fd); font-size: 20px; line-height: 1.1; letter-spacing: .5px; text-align: center; }
.daily-intro .di-inner { width: 100%; max-width: 400px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.daily-intro .di-badge { width: 86px; height: 86px; display: flex; align-items: center; justify-content: center; border: 4px solid var(--ink); background: var(--yellow); box-shadow: 6px 6px 0 var(--ink); transform: rotate(-4deg); margin-bottom: 14px; }
.daily-intro .di-badge img, .daily-intro .di-badge .noto { width: 52px; height: 52px; display: block; }
.daily-intro .di-kick { font-family: var(--fb); font-weight: 800; font-size: 12px; letter-spacing: 3px; color: var(--paper); background: var(--ink); padding: 3px 12px; }
.daily-intro .di-ttl { font-family: var(--fd); font-size: 40px; line-height: .95; letter-spacing: 1px; margin: 10px 0 8px; color: var(--paper); -webkit-text-stroke: 1.5px var(--ink); text-shadow: 4px 4px 0 var(--ink); }
.daily-intro .di-sub { font-family: var(--fb); font-weight: 600; font-size: 13px; line-height: 1.45; color: var(--paper); max-width: 320px; margin: 0 0 18px; }
.daily-intro .di-goals { width: 100%; display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.daily-intro .di-goal { display: flex; align-items: center; gap: 12px; text-align: left; border: 3px solid var(--ink); background: var(--paper); box-shadow: 4px 4px 0 var(--ink); padding: 10px 12px; }
.daily-intro .di-ic { flex: none; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.daily-intro .di-ic img, .daily-intro .di-ic .noto { width: 30px; height: 30px; display: block; }
.daily-intro .di-goal b { display: block; font-family: var(--fd); font-size: 15px; letter-spacing: .5px; }
.daily-intro .di-goal small { display: block; font-family: var(--fb); font-weight: 600; font-size: 11px; opacity: .6; }
.daily-intro .di-go { width: 100%; border: 4px solid var(--ink); background: var(--yellow); color: var(--ink); box-shadow: 6px 6px 0 var(--ink); padding: 16px; cursor: pointer;
  font-family: var(--fd); font-size: 22px; letter-spacing: 2px; transition: transform .08s ease, box-shadow .08s ease; }
.daily-intro .di-go:active { transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--ink); }
.daily-intro .di-later { margin-top: 12px; background: none; border: 0; color: var(--paper); font-family: var(--fb); font-weight: 700; font-size: 13px; text-decoration: underline; cursor: pointer; opacity: .85; }

/* MODE SOIRÉE — carte de gage */
.gage-card {
  margin: 10px auto 4px;
  max-width: 460px;
  width: 92%;
  border: 4px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  background: var(--orange);
  color: var(--ink);
  padding: 12px 14px;
  text-align: center;
}

/* ===== MODE SOIRÉE — ÉCRAN GAGE plein écran + vote de la table ===== */
.gage-ov { position: fixed; inset: 0; z-index: 4000; display: flex; flex-direction: column; opacity: 0; transition: opacity .2s ease; background: radial-gradient(120% 80% at 50% 0%, #3a1230, #16091b); color: #FFFEF7; }
.gage-ov.show { opacity: 1; }
.gage-ov .go-in { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: calc(18px + env(safe-area-inset-top)) 16px calc(18px + env(safe-area-inset-bottom)); max-width: 460px; width: 100%; margin: 0 auto; overflow-y: auto; }
.gage-ov .go-hd { text-align: center; font-family: var(--fd); font-size: 15px; letter-spacing: 2px; color: var(--yellow); }
.gage-ov .go-who { text-align: center; }
.gage-ov .go-lbl { font-family: var(--fb); font-weight: 700; font-size: 10px; letter-spacing: 1.5px; opacity: .7; }
.gage-ov .go-nm { font-family: var(--fd); font-size: 40px; line-height: 1; margin-top: 3px; color: #FF2E93; -webkit-text-stroke: 1.5px #000; text-shadow: 3px 3px 0 #000; }
.gage-ov .go-card { border: 4px solid #000; background: linear-gradient(135deg, #FFE36E, #FFC400); color: #0A0A0A; box-shadow: 5px 5px 0 #000; padding: 15px 14px; text-align: center; }
.gage-ov .go-em { font-size: 34px; line-height: 1; }
.gage-ov .go-tx { font-family: var(--fd); font-size: 20px; line-height: 1.15; margin-top: 6px; }
.gage-ov .go-timer { text-align: center; }
.gage-ov .go-t { font-family: var(--fd); font-size: 14px; letter-spacing: 1px; }
.gage-ov .go-bar { height: 12px; border: 3px solid #FFFEF7; margin-top: 6px; overflow: hidden; background: rgba(255,255,255,.08); }
.gage-ov .go-bar > span { display: block; height: 100%; background: #FF2E93; transition: width 1s linear; }
.gage-ov .go-body { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.gage-ov .go-mine { border: 4px solid #000; background: #FF2E93; color: #fff; box-shadow: 5px 5px 0 #000; padding: 16px; text-align: center; }
.gage-ov .go-mine .mv { font-family: var(--fd); font-size: 24px; }
.gage-ov .go-mine .ms { font-family: var(--fb); font-weight: 700; font-size: 11px; margin-top: 6px; opacity: .92; }
.gage-ov .go-vote { display: flex; gap: 12px; }
.gage-ov .go-btn { flex: 1; border: 4px solid #000; box-shadow: 4px 4px 0 #000; padding: 16px 6px; text-align: center; font-family: var(--fd); font-size: 17px; letter-spacing: .3px; color: #0A0A0A; cursor: pointer; }
.gage-ov .go-btn.ok { background: #5BE885; }
.gage-ov .go-btn.no { background: #FF5252; color: #fff; }
.gage-ov .go-btn .em { display: block; font-size: 22px; margin-bottom: 2px; }
.gage-ov .go-btn.picked { transform: translate(2px, 2px); box-shadow: 2px 2px 0 #000; outline: 3px solid var(--yellow); outline-offset: 2px; }
.gage-ov .go-ends { display: flex; justify-content: space-between; font-family: var(--fd); font-size: 15px; margin-bottom: 4px; }
.gage-ov .go-ends .ge.ok { color: #5BE885; }
.gage-ov .go-ends .ge.no { color: #FF5252; }
.gage-ov .go-jauge { display: flex; height: 22px; border: 3px solid #000; overflow: hidden; box-shadow: 3px 3px 0 #000; background: #2a1030; }
.gage-ov .go-jauge .jf.ok { background: #5BE885; transition: width .3s; }
.gage-ov .go-jauge .jf.no { background: #FF5252; transition: width .3s; }
.gage-ov .go-voters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 10px; min-height: 30px; }
.gage-ov .go-va { position: relative; width: 32px; height: 32px; border: 3px solid #000; }
.gage-ov .go-va img, .gage-ov .go-va svg, .gage-ov .go-va .av-emoji, .gage-ov .go-va .ava-emo { width: 100%; height: 100%; display: block; }
.gage-ov .go-va.ok { box-shadow: 0 0 0 2px #5BE885; }
.gage-ov .go-va.no { box-shadow: 0 0 0 2px #FF5252; }
.gage-ov .go-va .mk { position: absolute; bottom: -6px; right: -6px; width: 16px; height: 16px; border: 2px solid #000; border-radius: 50%; font-size: 9px; line-height: 12px; text-align: center; color: #000; }
.gage-ov .go-va.ok .mk { background: #5BE885; }
.gage-ov .go-va.no .mk { background: #FF5252; color: #fff; }
.gage-ov .go-note { text-align: center; font-family: var(--fb); font-weight: 700; font-size: 10px; opacity: .6; line-height: 1.4; }
.gage-ov .go-verdict { border: 4px solid #000; box-shadow: 5px 5px 0 #000; padding: 16px; text-align: center; margin-top: 4px; }
.gage-ov .go-verdict.ko { background: #E63946; color: #fff; }
.gage-ov .go-verdict.okv { background: #5BE885; color: #0A0A0A; }
.gage-ov .go-verdict .vv { font-family: var(--fd); font-size: 22px; }
.gage-ov .go-verdict .pts { font-family: var(--fd); font-size: 40px; line-height: 1; margin-top: 2px; }

/* ===== PAR ÉQUIPE — classement en 2 colonnes (provisoire + final) ===== */
.podium.pod-teams { display: block !important; padding: 6px 0 4px; }   /* le podium est une grille 3 colonnes -> bloc pour la vue équipe */
.lb-teams { display: flex; gap: 10px; align-items: stretch; padding: 4px 0 8px; }
.lb-teams .lb-tcol { flex: 1; border: 4px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); background: var(--paper); position: relative; min-width: 0; }
.lb-teams .lb-tcol.win { background: #FFF6D6; }
.lb-teams .lb-tcrown { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); font-size: 22px; }
.lb-teams .lb-tcap { font-family: var(--fd); font-size: 13px; letter-spacing: 1px; text-align: center; color: #fff; padding: 5px; }
.lb-teams .lb-tcol.red .lb-tcap { background: #FF5252; }
.lb-teams .lb-tcol.blue .lb-tcap { background: #4D7CFF; }
.lb-teams .lb-tscore { font-family: var(--fd); font-size: 30px; text-align: center; line-height: 1; padding: 6px 0 4px; color: var(--ink); }
.lb-teams .lb-trow { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-top: 2px dashed rgba(0, 0, 0, .12); font-family: var(--fb); font-weight: 700; font-size: 11px; color: var(--ink); }
.lb-teams .lb-trow.me { background: #FFE099; }
.lb-teams .lb-tav { width: 24px; height: 24px; border: 2px solid var(--ink); flex-shrink: 0; overflow: hidden; }
.lb-teams .lb-tav img, .lb-teams .lb-tav svg, .lb-teams .lb-tav .ava-emo, .lb-teams .lb-tav .av-emoji { width: 100%; height: 100%; display: block; }
.lb-teams .lb-tnm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-teams .lb-trow .psc { margin-left: auto; font-family: var(--fb); font-weight: 700; font-size: 12px; }
.lb-teams .lb-tvs { align-self: center; font-family: var(--fd); font-size: 18px; color: var(--ink); flex-shrink: 0; }
/* classement INDIVIDUEL sous les colonnes d'équipe */
.ti-wrap { margin-top: 14px; }
.ti-h { font-family: var(--fd); font-size: 12px; letter-spacing: 1px; text-align: center; opacity: .55; margin-bottom: 7px; }
.ti-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 2.5px solid var(--ink); background: var(--paper); margin-bottom: 5px; font-family: var(--fb); font-weight: 700; font-size: 12px; box-shadow: 2px 2px 0 var(--ink); color: var(--ink); }
.ti-row.me { background: #FFE099; }
.ti-rk { font-family: var(--fd); font-size: 14px; width: 20px; text-align: center; }
.ti-dot { width: 12px; height: 12px; border: 2px solid var(--ink); flex-shrink: 0; }
.ti-dot.red { background: #FF5252; }
.ti-dot.blue { background: #4D7CFF; }
.ti-nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ti-sc { margin-left: auto; font-family: var(--fb); font-weight: 700; }
/* classement complet de fin : liseré d'équipe sur chaque ligne */
.player-result.tm-red .bd { box-shadow: inset 6px 0 0 #FF5252; }
.player-result.tm-blue .bd { box-shadow: inset 6px 0 0 #4D7CFF; }

/* ===== CONQUÊTE — bandeau de capture + rangée des zones ===== */
.zone-cap { border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); padding: 9px 12px; text-align: center; font-family: var(--fd); font-size: 15px; letter-spacing: .5px; margin-bottom: 8px; color: #fff; }
.zone-cap.red { background: #FF5252; }
.zone-cap.blue { background: #4D7CFF; }
.zone-cap.neu { background: var(--ink); }
.zone-pips { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; margin-bottom: 10px; }
.zone-pips .zp { width: 16px; height: 16px; border: 2.5px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); background: var(--paper); }
.zone-pips .zp.red { background: #FF5252; }
.zone-pips .zp.blue { background: #4D7CFF; }
.zone-pips .zp.neu { background: repeating-linear-gradient(45deg, #ddd, #ddd 3px, #bbb 3px, #bbb 6px); }
/* SURVIE / ZONE CHAUDE — petite ligne d'info sous le team-hud en jeu */
.tm-line { text-align: center; font-family: var(--fb); font-weight: 700; font-size: 11px; letter-spacing: .3px; margin: 4px auto 0; max-width: 460px; width: 92%; padding: 6px 10px; border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); background: var(--paper); color: var(--ink); }
.tm-line.survie { background: #FFE7E7; }
.tm-line.zone { background: #FFF0DC; }
.tm-line.zone.hot { background: #FF9F45; color: #0A0A0A; font-size: 12.5px; }
.tm-line.conquete { background: #EDE3FF; }
.tm-line.clash { background: #E7F3FF; }
.zone-cap.hot { background: #FF9F45; color: #0A0A0A; }

.gage-card.lvl-soft {
  background: #5BE885;
}

.gage-card.lvl-normal {
  background: #FF9F45;
}

.gage-card.lvl-hard {
  background: #FF5252;
  color: var(--paper);
}

.gage-card.me {
  outline: 5px solid var(--yellow);
  outline-offset: 2px;
}

.gage-card.passed {
  opacity: .4;
}

.gage-card .gc-top {
  font-family: var(--fb);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 2px;
}

.gage-card .gc-who {
  font-family: var(--fd);
  font-size: clamp(20px, 6vw, 28px);
  line-height: 1.05;
  margin: 2px 0;
}

.gage-card .gc-text {
  font-family: var(--fd);
  font-size: clamp(22px, 7vw, 34px);
  line-height: 1.05;
}

.gage-card .gc-pass {
  margin-top: 8px;
  font-family: var(--fb);
  font-weight: 700;
  font-size: 12px;
  background: var(--paper);
  color: var(--ink);
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  padding: 6px 14px;
  cursor: pointer;
}

.gage-card .gc-pass:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

/* MODE SOIRÉE — options dans l'écran format */
.soiree-opts {
  margin: 10px 0 4px;
  border: 3px dashed var(--ink);
  padding: 12px;
  background: var(--paper);
}

.soiree-toggle {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  margin-top: 10px;
  cursor: pointer;
  line-height: 1.3;
}

.soiree-toggle input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  accent-color: var(--magenta);
}

.soiree-gate {
  font-family: var(--fb);
}

.soiree-note {
  font-size: 11px;
  opacity: .7;
  margin-top: 8px;
}

/* BADGE « NOUVEAU » — packs, formats */
.pk-tile,
.fmt2 {
  position: relative;
}

.new-badge {
  position: absolute;
  top: -8px;
  right: -6px;
  z-index: 5;
  background: var(--magenta);
  color: var(--paper);
  font-family: var(--fd);
  font-size: 10px;
  letter-spacing: 1px;
  padding: 3px 7px;
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  transform: rotate(6deg);
  pointer-events: none;
}

/* point « nouveautés » sur la carte CRÉER de l'accueil */
.cta-card.create {
  position: relative;
}

.news-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  background: var(--magenta);
  color: var(--paper);
  font-family: var(--fd);
  font-size: 10px;
  letter-spacing: 1px;
  padding: 3px 8px;
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  transform: rotate(4deg);
}

/* FOND D'EMOJIS ANIMÉS (host/play) — ambiance soirée, derrière le contenu */
.emoji-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.emoji-bg .eb {
  position: absolute;
  opacity: .12;
  animation: eb-float 9s ease-in-out infinite;
}

.emoji-bg .eb img,
.emoji-bg .eb .noto {
  width: 100%;
  height: 100%;
}

@keyframes eb-float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-16px);
  }
}

body.editor-mode .emoji-bg {
  display: none;
}

/* masqué pendant le choix des questions / préparation */
@media (prefers-reduced-motion: reduce) {
  .emoji-bg .eb {
    animation: none;
  }
}

/* ============================================================
   ÉCONOMIE djai — cadenas, prix, fiche de déblocage, solde
   ============================================================ */
/* pastille de solde djai (réutilisable) */
.djai-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--yellow);
  border: 3px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  padding: 3px 10px;
  font-family: var(--fd);
  font-size: 14px;
}

.djai-pill .co {
  display: inline-flex;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--ink);
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

/* voile "verrouillé" sur une tuile de pack/format */
.lock-veil {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: color-mix(in srgb, var(--ink) 60%, transparent);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--paper);
  pointer-events: none;
}

.lock-veil .lk {
  font-size: 22px;
}

.lock-veil .pr {
  font-family: var(--fd);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.lock-veil .pr .co {
  display: inline-flex;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--yellow);
  border: 2px solid var(--ink);
  align-items: center;
  justify-content: center;
  font-size: 9px;
}

.pk-tile.locked,
.fmt2.locked {
  position: relative;
}

.pk-tile.locked .pk-chk,
.fmt2.locked .pk-chk {
  display: none;
}

/* fiche de déblocage (modale) */
.fiche-ov {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: color-mix(in srgb, var(--ink) 55.00000000000001%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity .15s;
}

.fiche-ov.show {
  opacity: 1;
}

.fiche-card {
  position: relative;
  width: 100%;
  max-width: 330px;
  background: var(--paper);
  border: 4px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  transform: translateY(8px);
  transition: transform .15s;
  overflow: hidden;
}

.fiche-ov.show .fiche-card {
  transform: none;
}

.fiche-x {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  font-family: var(--fb);
  display: flex;
  align-items: center;
  justify-content: center;
}

.fiche-hd {
  padding: 18px 14px 14px;
  text-align: center;
  color: var(--paper);
  border-bottom: 4px solid var(--ink);
}

.fiche-hd .fe {
  line-height: 1;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fiche-hd .fe .noto {
  width: 50px;
  height: 50px;
}

.fiche-hd .fe .ferm {
  font-size: 42px;
  line-height: 1;
}

.fiche-hd .ft {
  font-family: var(--fd);
  font-size: 21px;
  margin-top: 6px;
  letter-spacing: .3px;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .25);
}

.fiche-hd .fcount {
  font-family: var(--fb);
  font-size: 11px;
  font-weight: 700;
  margin-top: 3px;
  opacity: .92;
}

.fiche-bd {
  padding: 16px;
  text-align: center;
}

.fiche-desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink);
  opacity: .9;
}

.fiche-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin: 16px 0 2px;
  font-family: var(--fd);
}

.fiche-price .lbl {
  font-size: 11px;
  opacity: .55;
  font-family: var(--fb);
  align-self: center;
}

.fiche-price .big {
  font-size: 30px;
  line-height: 1;
}

.fiche-price .big .co {
  font-size: 22px;
}

.fiche-bal {
  font-size: 11.5px;
  opacity: .72;
  font-family: var(--fb);
}

.fiche-bal b {
  font-weight: 700;
  opacity: 1;
}

.fiche-buy {
  display: block;
  width: 100%;
  margin: 14px 0 0;
  padding: 13px;
  font-family: var(--fd);
  font-size: 17px;
  letter-spacing: .5px;
  color: var(--ink);
  background: #2BD66A;
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;
  transition: transform .06s, box-shadow .06s;
}

.fiche-buy:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.fiche-buy.off {
  background: #E7E3D7;
  color: #8A8578;
  box-shadow: 4px 4px 0 #B8B3A4;
  border-color: #B8B3A4;
  cursor: not-allowed;
}

.fiche-hint {
  font-size: 12px;
  color: var(--red);
  font-weight: 700;
  margin-top: 9px;
  font-family: var(--fb);
}

.fiche-later {
  display: block;
  margin: 12px auto 0;
  font-size: 12px;
  text-decoration: underline;
  opacity: .6;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--fb);
}

/* gain de djai en fin de partie (toast) */
.djai-gain {
  position: fixed;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  z-index: 130;
  background: var(--green);
  border: 4px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  padding: 10px 18px;
  font-family: var(--fd);
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: dg-pop .5s cubic-bezier(.2, 1.5, .4, 1);
}

@keyframes dg-pop {
  0% {
    transform: translateX(-50%) scale(.4);
    opacity: 0;
  }

  100% {
    transform: translateX(-50%) scale(1);
    opacity: 1;
  }
}

/* ===== COSMÉTIQUES : cadres d'avatar + pseudo coloré + titre ===== */
.ava-fr {
  display: inline-block;
  line-height: 0;
  padding: 3px;
  box-shadow: 0 0 0 2px var(--ink);
}

.ava-fr>* {
  display: block;
}

.ava-fr.fr-gold {
  background: linear-gradient(135deg, #FFE259, #C99700);
}

.ava-fr.fr-neon {
  background: linear-gradient(135deg, #FF2E93, #5BD8E5);
  box-shadow: 0 0 8px rgba(91, 216, 229, .85), 0 0 0 2px var(--ink);
}

.ava-fr.fr-fire {
  background: linear-gradient(135deg, #FF3D00, #FFC400);
  box-shadow: 0 0 8px rgba(255, 90, 0, .75), 0 0 0 2px var(--ink);
}

.ava-fr.fr-ice {
  background: linear-gradient(135deg, #9BE7F2, #2BA7C4);
  box-shadow: 0 0 8px rgba(91, 216, 229, .7), 0 0 0 2px var(--ink);
}

.ava-fr.fr-rainbow {
  background: linear-gradient(120deg, #FF2E93, #FFD600, #5BE885, #5BD8E5, #9D4EDD);
}

/* cadre équipé dans un conteneur d'avatar de taille FIXE (réglages / topbar / profil / stats / classement)
   -> le cadre remplit le conteneur au lieu de s'effondrer (sinon l'avatar disparaît). */
#sec-reglages .profile-card .avatar .frame>.ava-fr,
.app-ava .inner>.ava-fr,
#pfAva>.ava-fr,
#sec-stats .hero .ava .fr>.ava-fr,
.cl-row .ava>.ava-fr,
.cl-pod .ava>.ava-fr {
  display: block;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

.cl-row .ava>.ava-fr .ava-emo,
.cl-pod .ava>.ava-fr .ava-emo {
  width: 100%;
  height: 100%;
}

/* TITRE (goat/chef/légende…) : badge ruban brutaliste, lisible et distinct du pseudo.
   inline-block -> passe à la ligne tout seul si le pseudo est trop long. */
.cos-title {
  display: inline-block;
  vertical-align: middle;
  margin-left: 7px;
  transform: translateY(-1px);
  font-family: var(--fd);
  font-weight: 400;
  font-size: 12px;
  line-height: 1.35;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink);
  background: linear-gradient(135deg, #FFE36E, #FFC400);
  border: 2.5px solid var(--ink);
  border-radius: 0;
  padding: 2px 8px;
  box-shadow: 2px 2px 0 var(--ink);
  white-space: nowrap;
}

/* dans les grandes en-têtes (accueil/profil/stats/réglages), le titre prend sa propre ligne sous le pseudo */
.bienvenue .name-row,
#pfName,
.profile-card .name,
#sec-stats .hero .nm {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
}

/* le PSEUDO prend toute la ligne -> le titre passe dessous, à la taille de son texte
   (badge encadré compact) au lieu de s'étirer sur toute la largeur. */
.bienvenue .name-row .cos-nick,
#pfName .cos-nick,
.profile-card .name .cos-nick,
#sec-stats .hero .nm .cos-nick {
  flex-basis: 100%;
}
.bienvenue .name-row .cos-title,
#pfName .cos-title,
.profile-card .name .cos-title,
#sec-stats .hero .nm .cos-title {
  margin-top: 5px;
  align-self: flex-start;
}

/* séparateur invisible émis par nickHtml : ne prend de la place que dans un conteneur
   flex-wrap (podium/classement de fin de partie) -> force le titre à passer sous le pseudo. */
.cos-br { flex-basis: 100%; height: 0; margin: 0; padding: 0; border: 0; }

/* PODIUM (top 3) + CLASSEMENT COMPLET de fin de partie : le titre passe SOUS le pseudo. */
.pod .pname,
.player-result .nm {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
}
.pod .pname { justify-content: center; }
.pod .pname .cos-title,
.player-result .nm .cos-title {
  margin-left: 0;
  margin-top: 4px;
}

/* sélecteur de cadre dans l'éditeur d'avatar */
.pe-frlbl {
  font-family: var(--fb);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: .5px;
  opacity: .6;
  margin: 12px 0 6px;
}

.pe-frames,
.pe-emotes {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.pe-fr {
  position: relative;
  flex: none;
  width: 46px;
  height: 46px;
  border: 2.5px solid var(--ink);
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.pe-fr.sel {
  outline: 3px solid #FF2E93;
  outline-offset: 1px;
}

.pe-fr .ava-fr {
  padding: 2px;
}

.pe-fr .ava-fr img,
.pe-fr .ava-fr .ava-emo {
  width: 32px;
  height: 32px;
}

.pe-frnone {
  font-size: 18px;
  opacity: .4;
}

.pe-frlk {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--ink) 45%, transparent);
  font-size: 15px;
}

/* sélecteurs pseudo/titre dans l'éditeur */
.pe-nicks,
.pe-titles {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.pe-ti {
  flex: none;
  font-family: var(--fb);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: .5px;
  border: 2.5px solid var(--ink);
  background: var(--paper);
  padding: 7px 9px;
  cursor: pointer;
  white-space: nowrap;
}

.pe-ti.sel {
  background: #FF2E93;
  color: var(--paper);
}

/* loading des packs (anti-flash) */
.packs-load {
  grid-column: 1/-1;
  text-align: center;
  padding: 30px 10px;
  font-family: var(--fb);
  font-weight: 700;
  font-size: 12px;
  color: color-mix(in srgb, var(--ink) 55.00000000000001%, transparent);
}

/* SKELETON de chargement des packs : mêmes dimensions que .pk-tile (héritées),
   placeholders animés (shimmer). Aucune interaction. */
.pk-skel { cursor: default; pointer-events: none; }
.pk-skel .sk {
  background: color-mix(in srgb, var(--ink) 10%, transparent);
  position: relative;
  overflow: hidden;
}
.pk-skel .sk::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .6), transparent);
  animation: sk-shimmer 1.15s ease-in-out infinite;
}
.pk-skel .sk-ic {
  width: 44px;
  height: 44px;
  border: 3px solid color-mix(in srgb, var(--ink) 16%, transparent);
  box-shadow: 3px 3px 0 color-mix(in srgb, var(--ink) 12%, transparent);
}
.pk-skel .sk-nm { height: 16px; width: 82%; }
.pk-skel .sk-ds { height: 10px; width: 46%; margin-top: auto; }
@keyframes sk-shimmer { 100% { transform: translateX(100%); } }

/* PANNEAU "INVITER MES POTES" (lobby) */
.inv-card { text-align: center; }
.inv-title { font-family: var(--fd); font-size: 22px; letter-spacing: 1px; color: var(--ink); }
.inv-sub { font-family: var(--fb); font-weight: 700; font-size: 12px; letter-spacing: 2px; color: var(--magenta); margin-top: 2px; }
.inv-list { margin: 14px 0 4px; max-height: 46vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.inv-empty { font-family: var(--fb); font-weight: 700; font-size: 12px; opacity: .6; padding: 22px 8px; }
.inv-row { display: flex; align-items: center; gap: 10px; border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); background: var(--paper); padding: 9px 11px; }
.inv-dot { flex: 0 0 auto; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ink); }
.inv-nm { flex: 1 1 auto; text-align: left; font-family: var(--fd); font-size: 15px; letter-spacing: .3px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-btn { flex: 0 0 auto; font-family: var(--fd); font-size: 12px; letter-spacing: .5px; border: 2.5px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); background: var(--magenta); color: var(--paper); padding: 6px 10px; cursor: pointer; }
.inv-btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.inv-btn.sent { background: var(--green); color: var(--ink); pointer-events: none; }
.inv-btn:disabled { opacity: .7; }

/* ESPACE CRÉATEUR (panneau) */
.cr-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0 4px;
}

.cr-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--fd);
  font-size: 15px;
}

.cr-row input {
  width: 55%;
  box-sizing: border-box;
  padding: 9px 10px;
  border: 3px solid var(--ink);
  font-family: var(--fb);
  font-weight: 700;
  font-size: 14px;
  text-align: right;
}

.bc-card .cr-max {
  display: block;
  width: 100%;
  margin-top: 10px;
  background: #FFD600;
}

.bc-card .cr-apply {
  display: block;
  width: 100%;
  margin-top: 8px;
}

.bc-card .cr-off {
  display: block;
  width: 100%;
  margin-top: 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--fb);
  font-weight: 700;
  font-size: 12px;
  color: var(--red);
  text-decoration: underline;
}

/* ============================================================
   THÈMES DE L'APP (Réglages › Apparence) — repeignent fond + surfaces.
   Variantes CLAIRES : l'encre reste sombre -> contraste garanti partout.
   data-theme posé sur <html> (cf. content.js + app.js).
   ============================================================ */
html[data-theme="bonbon"] {
  --app-bg: #FFE3F1;
  --paper: #FFF6FB;
  --magenta: #FF2E93;
}

html[data-theme="menthe"] {
  --app-bg: #DDF7EC;
  --paper: #F3FFFA;
  --magenta: #13B77B;
}

html[data-theme="ocean"] {
  --app-bg: #DBF1FB;
  --paper: #F1FBFE;
  --magenta: #1E9BD6;
}

html[data-theme="coucher"] {
  --app-bg: #FFE6D6;
  --paper: #FFF6EF;
  --magenta: #FF6B3D;
}

html[data-theme="lavande"] {
  --app-bg: #ECE3FB;
  --paper: #F8F4FF;
  --magenta: #7A3FE0;
}

html[data-theme="agrume"] {
  --app-bg: #FFF1C2;
  --paper: #FFFBEC;
  --magenta: #E8A200;
}

html[data-theme="pistache"] {
  --app-bg: #E8F5C8;
  --paper: #F6FCED;
  --magenta: #8CB814;
}

html[data-theme="glace"] {
  --app-bg: #E3EAEE;
  --paper: #F4F7F8;
  --magenta: #4C8DAE;
}

html[data-theme="flamant"] {
  --app-bg: #FFD4DB;
  --paper: #FFF0F2;
  --magenta: #FF144A;
}

html[data-theme="abime"] {
  --app-bg: #000000;
  --paper: #121212;
  --magenta: #5BD8E5;
  --ink: #FBFBFB;
  --gray: #2A2A2A;
}

/* ============================================================
   POLICES (Réglages › Apparence) — paire affichage + corps.
   data-font posé sur <html>. Défaut = BRUTAL (Anton + IBM Plex Mono).
   ============================================================ */
html[data-font="rondo"] {
  --fd: 'Fredoka', sans-serif;
  --fb: 'Nunito', sans-serif;
}

html[data-font="neon"] {
  --fd: 'Space Grotesk', sans-serif;
  --fb: 'Space Grotesk', sans-serif;
}

html[data-font="presse"] {
  --fd: 'Bebas Neue', sans-serif;
  --fb: 'DM Sans', sans-serif;
}

html[data-font="urbain"] {
  --fd: 'Oswald', sans-serif;
  --fb: 'DM Sans', sans-serif;
}

html[data-font="cyber"] {
  --fd: 'Chakra Petch', sans-serif;
  --fb: 'IBM Plex Mono', monospace;
}

/* aperçus de thème/police dans Apparence */
.theme-pick,
.font-pick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0 16px 11px;
}

.theme-pick button,
.font-pick button {
  position: relative;
  border: 3px solid var(--ink);
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
  padding: 0;
  cursor: pointer;
  overflow: hidden;
}

.theme-pick button:active,
.font-pick button:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.theme-pick .sw {
  display: block;
  height: 42px;
  border-bottom: 3px solid var(--ink);
  position: relative;
}

.theme-pick .sw::after {
  content: '';
  position: absolute;
  left: 8px;
  top: 9px;
  width: 22px;
  height: 22px;
  background: var(--paper);
  border: 2.5px solid var(--ink);
}

.theme-pick .k,
.font-pick .k {
  display: block;
  font-family: var(--fd);
  font-size: 12px;
  letter-spacing: .5px;
  padding: 7px 4px;
}

.theme-pick button.on,
.font-pick button.on {
  outline: 3px solid var(--magenta);
  outline-offset: 1px;
}

.theme-pick button.on::before,
.font-pick button.on::before {
  content: '✓';
  position: absolute;
  top: 3px;
  right: 5px;
  z-index: 2;
  font-family: var(--fd);
  font-size: 13px;
  color: var(--magenta);
}

.font-pick button .pa {
  display: block;
  font-size: 24px;
  padding: 12px 4px 2px;
  line-height: 1;
}

.font-pick button .pb {
  display: block;
  font-size: 10px;
  font-weight: 700;
  padding: 0 4px 8px;
  opacity: .65;
}

.theme-pick button.on,
.font-pick button.on {
  outline: 3px solid var(--magenta);
  outline-offset: 1px;
}

.theme-pick button.on::before,
.font-pick button.on::before {
  content: '✓';
  position: absolute;
  top: 3px;
  right: 5px;
  z-index: 2;
  font-family: var(--fd);
  font-size: 13px;
  color: var(--magenta);
}

.font-pick button .pa {
  display: block;
  font-size: 24px;
  padding: 12px 4px 2px;
  line-height: 1;
}

.font-pick button .pb {
  display: block;
  font-size: 10px;
  font-weight: 700;
  padding: 0 4px 8px;
  opacity: .65;
}

/* ===== MISE LIBRE (wager-bet & qod-bet height fix) ===== */
#screen-qod-bet.active,
#screen-wager-bet.active {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
}

.wag-pill {
  margin-bottom: 4px;
}
.wag-pill .bd {
  background: var(--paper) !important;
  color: var(--ink) !important;
}

.wag-emoji {
  width: 80px;
  height: 80px;
  margin: 8px auto;
  font-size: 64px;
  line-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wag-emoji img.noto {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.wag-desc {
  font-family: var(--fb);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--ink);
  line-height: 1.25;
  text-align: center;
  margin-bottom: 2px;
}
.wag-desc b {
  display: block;
  font-family: var(--fd);
  font-size: 44px;
  letter-spacing: 1px;
  margin-top: 2px;
}

.wag-q {
  font-family: var(--fd);
  font-size: 20px;
  letter-spacing: 1px;
  color: var(--ink);
  margin-bottom: 12px;
  text-align: center;
}

/* Boite Slider Brutaliste */
.wag-slider-box {
  position: relative;
  width: 100%;
  max-width: 320px;
  margin: 0 auto 16px;
}
.wag-slider-box .sh {
  position: absolute;
  top: 6px;
  left: 6px;
  right: -6px;
  bottom: -6px;
  background: var(--ink);
}
.wag-slider-box .bd {
  position: relative;
  padding: 20px 18px 16px;
  border: 4px solid var(--ink);
  background: var(--paper);
  text-align: center;
}

.val-huge {
  font-family: var(--fd);
  font-size: 52px;
  line-height: 1;
  letter-spacing: -1px;
  margin-bottom: 14px;
  color: var(--ink);
}
.val-huge span.pts {
  font-family: var(--fb);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  margin-left: 4px;
}

/* Track slider */
.wag-track {
  height: 24px;
  border: 3px solid var(--ink);
  background: color-mix(in srgb, var(--ink) 12%, transparent);
  position: relative;
  cursor: pointer;
  touch-action: none;
  margin: 12px 0 10px;
}
.wag-track .fill {
  height: 100%;
  background: var(--yellow);
  position: absolute;
  left: 0;
  top: 0;
  border-right: 3px solid var(--ink);
  pointer-events: none;
}
.wag-track .thumb {
  width: 30px;
  height: 30px;
  background: var(--paper);
  border: 3px solid var(--ink);
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-shadow: 2px 2px 0 var(--ink);
}

.limits {
  display: flex;
  justify-content: space-between;
  font-family: var(--fb);
  font-weight: 700;
  font-size: 11px;
  color: color-mix(in srgb, var(--ink) 55%, transparent);
  margin-top: 6px;
}

/* CTA area */
.wag-cta-area {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 320px;
  margin: auto auto 12px;
}

.wag-btn {
  position: relative;
  display: inline-flex;
  width: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  outline: none;
}
.wag-btn .sh {
  position: absolute;
  top: 5px;
  left: 5px;
  right: -5px;
  bottom: -5px;
  background: var(--ink);
  z-index: 0;
}
.wag-btn .bd {
  position: relative;
  z-index: 1;
  border: 3.5px solid var(--ink);
  padding: 12px 8px;
  color: var(--ink);
  width: 100%;
  font-family: var(--fd);
  font-size: 18px;
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.08s;
}
.wag-btn:active {
  transform: translate(2px, 2px);
}
.wag-btn:active .sh {
  top: 3px;
  left: 3px;
  right: -3px;
  bottom: -3px;
}

.wag-btn.green .bd {
  background: var(--green);
  color: var(--ink);
}
.wag-btn.red .bd {
  background: var(--red);
  color: var(--paper);
}
.wag-btn:disabled {
  cursor: default;
  opacity: 0.65;
}