/* ══════════════════════════════════════════════════════════
   LA BORNE — la superposition de jeu, et le style des jeux.
   Toujours la nuit, teintée de la couleur de la passion. Archivo
   pour tout ce qui compte, en largeur étendue pour les chiffres.
   Trois états : l'accueil (règles et commandes), la partie (une
   interface flottante, rien en bas), le résultat.
   ══════════════════════════════════════════════════════════ */
.borne {
  position: fixed; inset: 0; z-index: 300;
  color: var(--lumiere);
  font-family: var(--sans);
  overscroll-behavior: contain;
}
.borne__cadre {
  position: absolute; inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: var(--nuit);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  overflow: hidden;
  isolation: isolate;
}
.borne__fond { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(70% 55% at 50% -10%, rgba(var(--accent-rgb, 115, 144, 255), .24), transparent 70%),
    radial-gradient(55% 45% at 50% 112%, rgba(var(--accent-rgb, 115, 144, 255), .12), transparent 70%);
}
.borne__fond::after {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(238, 241, 248, .09) 1px, transparent 1.3px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(75% 70% at 50% 45%, #000, transparent 85%);
          mask-image: radial-gradient(75% 70% at 50% 45%, #000, transparent 85%);
}

/* les touches, partout dans la borne */
.borne kbd {
  display: inline-grid; place-items: center;
  min-width: 30px; height: 30px; padding: 0 9px; margin: 0;
  border-radius: 8px;
  font-family: var(--sans); font-size: 12.5px; font-weight: 650; letter-spacing: .01em;
  color: var(--lumiere); opacity: 1;
  border: 1px solid rgba(238, 241, 248, .16);
  background: linear-gradient(180deg, rgba(238, 241, 248, .1), rgba(238, 241, 248, .03));
  box-shadow: 0 2px 0 rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .08);
}

/* ─────────── l'interface de partie ─────────── */
.hud {
  position: relative; z-index: 12;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start; gap: 16px;
  padding: 16px var(--g) 6px;
  pointer-events: none;
}
.hud > * { pointer-events: auto; }
.hud__id { padding-top: 8px; min-width: 0; transition: opacity .4s var(--ease); }
.hud__nom { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 650; font-variation-settings: 'wdth' 110; letter-spacing: -.005em; white-space: nowrap; }
.hud__nom::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px var(--accent); }
.hud__rec { margin-top: 4px; padding-left: 18px; font-size: 12.5px; color: var(--lumiere-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hud__centre { display: flex; flex-direction: column; align-items: center; gap: 10px; transition: opacity .4s var(--ease); }
.hud__score { display: flex; align-items: baseline; gap: 8px; line-height: .9; }
.hud__score b {
  display: inline-block;
  font-size: clamp(40px, min(6vw, 9vh), 72px); font-weight: 800; font-variation-settings: 'wdth' 125;
  letter-spacing: -.03em; font-variant-numeric: tabular-nums;
  text-shadow: 0 0 44px rgba(var(--accent-rgb, 115, 144, 255), .5);
  transform-origin: 50% 70%;
}
.hud__score span { font-size: 13px; font-weight: 500; color: var(--lumiere-2); white-space: nowrap; }
.hud__outils { justify-self: end; display: flex; align-items: center; gap: 10px; }
.hud__vies { display: flex; align-items: center; gap: 7px; height: 44px; padding: 0 15px; border-radius: 999px; background: rgba(238, 241, 248, .05); border: 1px solid rgba(238, 241, 248, .09); transition: opacity .4s var(--ease); }
.hud__vies:empty { display: none; }
.hud__vies i { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px rgba(var(--accent-rgb), .9); transition: background-color .3s, box-shadow .3s, transform .4s var(--ease); }
.hud__vies i:not(.on) { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(238, 241, 248, .28); transform: scale(.85); }
.hud__fermer {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(238, 241, 248, .05); border: 1px solid rgba(238, 241, 248, .1);
  transition: background-color .3s var(--ease), transform .45s var(--ease);
}
.hud__fermer:hover { background: rgba(238, 241, 248, .12); transform: rotate(90deg); }
.hud__fermer svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.7; fill: none; stroke-linecap: round; }
/* sur l'accueil et le résultat, seule la croix reste */
.borne.est-ecran :is(.hud__id, .hud__centre, .hud__vies) { opacity: 0; pointer-events: none; }

/* la jauge des paliers, sous le score */
.jauge { display: flex; align-items: center; gap: 12px; }
.jauge__piste { position: relative; width: clamp(130px, 16vw, 230px); height: 4px; border-radius: 4px; background: rgba(238, 241, 248, .1); }
.jauge__rempli { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 4px; background: linear-gradient(90deg, rgba(var(--accent-rgb), .5), var(--accent)); box-shadow: 0 0 14px rgba(var(--accent-rgb), .7); transition: width .4s var(--ease); }
.jauge__cran { position: absolute; top: 50%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--nuit); box-shadow: inset 0 0 0 1.5px rgba(238, 241, 248, .32); transition: background-color .4s, box-shadow .4s, transform .5s var(--ease); }
.jauge__cran[data-r="3"] { margin-left: -9px; }
.jauge__cran.on { transform: scale(1.25); }
.jauge__cran[data-r="1"].on { background: var(--bronze); box-shadow: 0 0 12px var(--bronze); }
.jauge__cran[data-r="2"].on { background: var(--argent); box-shadow: 0 0 12px var(--argent); }
.jauge__cran[data-r="3"].on { background: var(--or); box-shadow: 0 0 14px var(--or); }
.jauge__cible { font-size: 12px; color: var(--lumiere-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.jauge__cible b { color: var(--lumiere); font-weight: 650; }
.jauge__cible .or { color: var(--or); }

@media (max-width: 700px) {
  .hud { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; padding-top: 10px; }
  .hud__id { grid-column: 1; grid-row: 1; }
  .hud__outils { grid-column: 2; grid-row: 1; }
  .hud__centre { grid-column: 1 / -1; grid-row: 2; }
  .hud__vies { height: 40px; padding: 0 12px; }
  .hud__fermer { width: 40px; height: 40px; }
  .hud__score b { font-size: 44px; }
}

/* ─────────── la scène ─────────── */
.borne__scene {
  position: relative;
  display: grid; place-items: center;
  min-height: 0;
  padding-bottom: 16px;
  overflow: hidden;
  touch-action: none;
  user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.borne__scene > .toile { display: block; }
.toile--cadre { border-radius: 16px; background: linear-gradient(180deg, rgba(15, 19, 34, .6), rgba(8, 10, 18, .25)); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb, 115, 144, 255), .16), 0 40px 100px -40px rgba(0, 0, 0, .8); }
.borne__panne { max-width: 26em; text-align: center; color: var(--lumiere-2); padding: 0 var(--g); }
.borne__flash { position: absolute; inset: 0; pointer-events: none; animation: flash .45s var(--ease) forwards; z-index: 5; }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }
.borne__gain {
  position: absolute; z-index: 6; pointer-events: none;
  transform: translate(-50%, -50%);
  font-weight: 800; font-variation-settings: 'wdth' 118; font-size: 18px;
  color: var(--lumiere); white-space: nowrap;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .6);
  animation: gain 1.05s var(--ease) forwards;
}
.borne__gain.ok { color: #8FF0C0; }
.borne__gain.ko { color: #FF8E95; }
.borne__gain.or { color: var(--or); font-size: 22px; }
@keyframes gain { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.8); } 15% { opacity: 1; transform: translate(-50%, -60%) scale(1.08); } 100% { opacity: 0; transform: translate(-50%, -190%) scale(1); } }

/* ─────────── annonce ─────────── */
.borne__annonce {
  position: absolute; left: 50%; top: 46%; z-index: 20;
  transform: translate(-50%, -50%) scale(.9);
  pointer-events: none;
  font-size: clamp(30px, 6vw, 76px);
  font-weight: 800; font-variation-settings: 'wdth' 125;
  letter-spacing: -.02em; line-height: 1;
  text-align: center; white-space: nowrap;
  color: var(--lumiere);
  text-shadow: 0 6px 40px rgba(8, 10, 18, .9);
  opacity: 0;
}
.borne__annonce.est-la { animation: annonce 1.3s var(--ease) forwards; }
@keyframes annonce {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(.86); filter: blur(6px); }
  18% { opacity: 1; transform: translate(-50%, -50%) scale(1.04); filter: blur(0); }
  70% { opacity: 1; transform: translate(-50%, -52%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -64%) scale(.98); }
}
.annonce--bronze { color: var(--bronze); }
.annonce--argent { color: var(--argent); }
.annonce--or { color: var(--or); }
.annonce--rival, .annonce--record { font-size: clamp(22px, 4vw, 48px); white-space: normal; max-width: 90vw; }
.annonce--record { color: var(--bleu-pale); }
.annonce--petit { font-size: clamp(20px, 3.2vw, 38px); }
@media (max-width: 700px) { .borne__annonce { white-space: normal; width: 90vw; } }

/* ─────────── les écrans ─────────── */
.ecran {
  position: absolute; inset: 0; z-index: 10;
  display: grid;
  padding: calc(env(safe-area-inset-top) + 84px) var(--g) calc(env(safe-area-inset-bottom) + 36px);
  overflow-y: auto; overscroll-behavior: contain;
}
.ecran--fin {
  background: rgba(8, 10, 18, .82);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
          backdrop-filter: blur(16px) saturate(1.15);
}
.acc__sur, .res__mot {
  display: flex; align-items: center; gap: 12px;
  font-size: 13.5px; font-weight: 600; letter-spacing: .01em;
  color: var(--accent);
}
.acc__sur::before, .res__mot::before { content: ''; width: 24px; height: 1.5px; background: currentColor; }
.acc__jouer, .res__rejouer {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  width: 100%; height: 64px; border-radius: 999px;
  background: var(--accent); color: #07080E;
  font-size: 18px; font-weight: 750; font-variation-settings: 'wdth' 112;
  box-shadow: 0 26px 70px -24px rgba(var(--accent-rgb), 1), inset 0 1px 0 rgba(255, 255, 255, .4);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), filter .3s;
}
.acc__jouer:hover, .res__rejouer:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 34px 90px -24px rgba(var(--accent-rgb), 1), inset 0 1px 0 rgba(255, 255, 255, .5); }
.acc__jouer:active, .res__rejouer:active { transform: scale(.985); }
.acc__jouer kbd, .res__rejouer kbd { color: #07080E; border-color: rgba(7, 8, 14, .25); background: rgba(7, 8, 14, .08); box-shadow: none; height: 26px; font-size: 11.5px; }
.acc__play { width: 0; height: 0; border-left: 13px solid currentColor; border-top: 8px solid transparent; border-bottom: 8px solid transparent; }

/* l'accueil : à gauche le nom et le but, à droite la fiche du jeu */
.acc {
  align-self: center; justify-self: center;
  width: min(100%, 1120px);
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 104px); align-items: center;
}
.acc__tete { min-width: 0; }
.acc__titre {
  margin-top: 18px;
  font-weight: 800; font-variation-settings: 'wdth' 125;
  font-size: 110px;               /* recalculée par le script pour remplir la colonne */
  line-height: .9; letter-spacing: -.05em;
  white-space: nowrap;
}
.acc__titre span {
  display: inline-block; padding-right: .04em;
  background: linear-gradient(180deg, #FFFFFF 35%, rgba(var(--accent-rgb), 1) 150%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.acc__but { margin-top: clamp(16px, 3vh, 26px); font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2vw, 27px); line-height: 1.35; max-width: 20em; text-wrap: pretty; }
.acc__corps { min-width: 0; border-top: 1px solid var(--filet-nuit); }
.acc__bloc { display: grid; grid-template-columns: 7em minmax(0, 1fr); gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--filet-nuit); }
.acc__k { font-size: 12.5px; font-weight: 600; color: var(--lumiere-3); padding-top: 4px; }
.acc__regles { display: grid; gap: 10px; counter-reset: r; }
.acc__regles li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 8px; font-size: 15.5px; line-height: 1.45; }
.acc__regles li::before { counter-increment: r; content: counter(r, decimal-leading-zero); font-size: 11.5px; font-weight: 700; color: var(--accent); padding-top: 3px; font-variant-numeric: tabular-nums; }
.acc__touches { display: grid; gap: 10px; }
.acc__touches li { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; font-size: 15px; color: var(--lumiere-2); }
.acc__touches .k { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.acc__touches .k em { font-style: normal; font-size: 12px; color: var(--lumiere-3); }
.acc__touches .k--rangee { gap: 4px; flex-wrap: nowrap; }
.acc__touches .k--rangee kbd { min-width: 26px; padding: 0 6px; }
.acc__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: clamp(22px, 5vh, 44px); padding-top: 16px; border-top: 1px solid var(--filet-nuit); max-width: 30rem; }
.acc__stats > div { min-width: 0; }
.acc__stats > div + div { padding-left: 16px; border-left: 1px solid var(--filet-nuit); margin-left: 16px; }
.acc__stats dt { font-size: 12px; color: var(--lumiere-2); }
.acc__stats dd { margin: 6px 0 0; font-size: clamp(17px, 1.6vw, 20px); font-weight: 750; font-variation-settings: 'wdth' 115; letter-spacing: -.01em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.acc__stats dd small { display: block; margin-top: 3px; font-size: 12px; font-weight: 450; font-variation-settings: 'wdth' 100; color: var(--lumiere-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: 0; }
.acc__stats .vide { color: var(--lumiere-3); font-weight: 450; font-variation-settings: 'wdth' 100; }
.acc__jouer { margin-top: 24px; }
.acc__jouer:focus-visible, .res__rejouer:focus-visible { outline: 2px solid rgba(var(--accent-rgb), .55); outline-offset: 4px; }
.res__btn:focus-visible, .hud__fermer:focus-visible { outline: 2px solid rgba(238, 241, 248, .5); outline-offset: 3px; }

/* le résultat : à gauche le score et les médailles, à droite la suite */
.res {
  align-self: center; justify-self: center;
  width: min(100%, 1080px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 7vw, 112px); align-items: center;
}
.ecran--fin.est-record .res__mot { color: var(--or); }
.res__score { margin-top: 16px; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; line-height: .84; }
.res__score b { font-size: clamp(84px, min(13.5vw, 25vh), 210px); font-weight: 800; font-variation-settings: 'wdth' 125; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.est-record .res__score b {
  background: linear-gradient(100deg, var(--or) 0%, #FFF4D2 22%, var(--or) 44%, var(--or) 100%);
  background-size: 260% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: reflet 2.8s var(--ease) infinite;
}
@keyframes reflet { from { background-position: 100% 0; } to { background-position: -160% 0; } }
.res__score span { font-size: clamp(18px, 2vw, 24px); font-weight: 500; color: var(--lumiere-2); }
.res__detail { margin-top: 20px; font-size: 15px; line-height: 1.5; color: var(--lumiere-2); }
.res__medailles { margin-top: clamp(28px, 5vh, 48px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 400px; }
.res__medailles li { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.med-ico { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: var(--lumiere-3); box-shadow: inset 0 0 0 1.5px rgba(238, 241, 248, .16); transition: background-color .5s, box-shadow .5s, color .5s; }
.med-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.res__medailles li.on .med-ico { color: #1B1406; }
.res__medailles li.on:nth-child(1) .med-ico { background: var(--bronze); box-shadow: 0 0 26px rgba(201, 138, 85, .45); }
.res__medailles li.on:nth-child(2) .med-ico { background: var(--argent); box-shadow: 0 0 26px rgba(185, 195, 210, .45); }
.res__medailles li.on:nth-child(3) .med-ico { background: var(--or); box-shadow: 0 0 30px rgba(231, 195, 93, .55); }
.res__medailles li.est-neuf .med-ico { animation: neuf 1.1s var(--ease) .5s both; }
@keyframes neuf { 0% { transform: scale(.4); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
.res__medailles b { font-size: 13.5px; font-weight: 650; }
.res__medailles span { margin-top: -4px; font-size: 12.5px; color: var(--lumiere-2); font-variant-numeric: tabular-nums; }
.res__stats { border-top: 1px solid var(--filet-nuit); }
.res__stats > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--filet-nuit); }
.res__stats dt { font-size: 14px; color: var(--lumiere-2); }
.res__stats dd sup { font-size: .6em; vertical-align: .55em; margin-left: .04em; }
.res__stats dd { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 750; font-variation-settings: 'wdth' 115; letter-spacing: -.01em; font-variant-numeric: tabular-nums; text-align: right; }
.res__stats dd small { font-size: 11px; font-weight: 700; font-variation-settings: 'wdth' 100; letter-spacing: .02em; padding: 4px 9px; border-radius: 999px; background: rgba(231, 195, 93, .16); color: var(--or); }
.res__stats .vide { color: var(--lumiere-3); font-weight: 450; font-variation-settings: 'wdth' 100; }
.res__rang { margin-top: 28px; min-height: 1.5em; font-family: var(--serif); font-size: clamp(19px, 1.7vw, 23px); line-height: 1.5; max-width: 25em; text-wrap: pretty; }
.res__rang b { font-weight: 600; color: var(--accent); }
.res__actions { margin-top: 30px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.res__rejouer { grid-column: 1 / -1; }
.res__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 54px; padding: 0 16px; border-radius: 999px;
  border: 1px solid rgba(238, 241, 248, .16);
  font-size: 15px; font-weight: 550;
  transition: background-color .3s var(--ease), border-color .3s var(--ease);
}
.res__btn:hover { background: rgba(238, 241, 248, .07); border-color: rgba(238, 241, 248, .32); }
.res__btn svg { flex: none; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.res__connexion { margin-top: 22px; display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; font-size: 14px; line-height: 1.5; color: var(--lumiere-2); }
.res__connexion:empty { display: none; }
.res__connexion button { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 15px; border-radius: 999px; background: #0A66C2; color: #fff; font-size: 13.5px; font-weight: 600; transition: filter .3s; }
.res__connexion button:hover { filter: brightness(1.12); }
.res__connexion svg { width: 15px; height: 15px; fill: currentColor; }

@media (max-width: 860px) {
  .ecran { padding-top: calc(env(safe-area-inset-top) + 72px); }
  .acc, .res { grid-template-columns: minmax(0, 1fr); align-self: start; gap: 28px; }
  .acc__bloc { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 16px 0; }
  .acc__k { padding-top: 0; }
  .acc__stats > div + div { padding-left: 12px; margin-left: 12px; }
  .res__score b { font-size: clamp(76px, 24vw, 120px); }
  .res__medailles { margin-top: 26px; }
  .res__rang { margin-top: 22px; }
}
@media (max-width: 420px) {
  .res__actions { grid-template-columns: minmax(0, 1fr); }
}
/* les écrans bas (portables, fenêtres réduites) : tout reste visible d'un coup d'œil */
@media (min-width: 861px) and (max-height: 760px) {
  .ecran { padding-top: 76px; padding-bottom: 22px; }
  .acc__titre { margin-top: 12px; }
  .acc__bloc { padding: 12px 0; }
  .acc__regles { gap: 6px; }
  .acc__regles li { font-size: 14.5px; line-height: 1.4; }
  .acc__touches li { font-size: 14px; }
  .acc__jouer, .res__rejouer { height: 56px; font-size: 17px; }
  .acc__jouer { margin-top: 18px; }
  .res__score b { font-size: clamp(72px, min(12vw, 24vh), 180px); }
  .res__detail { margin-top: 12px; }
  .res__medailles { margin-top: 22px; }
  .med-ico { width: 36px; height: 36px; }
  .res__stats > div { padding: 10px 0; }
  .res__stats dd { font-size: 17px; }
  .res__rang { margin-top: 14px; font-size: 18px; }
  .res__actions { margin-top: 16px; gap: 8px; }
  .res__btn { height: 46px; }
  .res__connexion { margin-top: 12px; font-size: 13px; }
  .res__connexion button { height: 34px; }
}

/* ══════════════════════════════════════════════════════════
   LES JEUX
   ══════════════════════════════════════════════════════════ */

/* ── le clap ── */
.clap { width: min(92%, 720px, calc((100vh - 232px) * 2.2)); display: grid; gap: 18px; cursor: pointer; }
.clap__plateau { position: relative; aspect-ratio: 16 / 7.2; border-radius: 12px; overflow: hidden; background: linear-gradient(180deg, #11151F, #0B0E16); box-shadow: inset 0 0 0 1px rgba(238, 241, 248, .08); }
.clap__bras {
  position: absolute; left: 4%; right: 4%; top: 8%; height: 20%;
  transform-origin: 3% 100%; transform: rotate(-17deg);
  background: repeating-linear-gradient(115deg, #EEF1F8 0 26px, #0B0E16 26px 52px);
  border-radius: 6px 6px 2px 2px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .5);
}
.clap__bras.est-ferme { animation: clap-ferme .32s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes clap-ferme { 0% { transform: rotate(-17deg); } 40% { transform: rotate(0deg); } 100% { transform: rotate(-17deg); } }
.clap__ardoise {
  position: absolute; left: 4%; right: 4%; top: 30%; bottom: 8%;
  border-radius: 4px;
  background: #0E121C;
  border: 1.5px solid rgba(238, 241, 248, .7);
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr;
}
.clap__ardoise span { display: flex; flex-direction: column; justify-content: center; padding: 0 5%; border-right: 1px solid rgba(238, 241, 248, .35); border-bottom: 1px solid rgba(238, 241, 248, .35); }
.clap__ardoise span:nth-child(2n) { border-right: 0; }
.clap__ardoise span:nth-child(n+3) { border-bottom: 0; }
.clap__ardoise em { font-style: normal; font-size: clamp(9px, 1.3vw, 12px); color: var(--lumiere-2); letter-spacing: .04em; }
.clap__ardoise b { font-size: clamp(18px, 3.4vw, 38px); font-weight: 800; font-variation-settings: 'wdth' 125; line-height: 1; font-variant-numeric: tabular-nums; }
.clap__piste { position: relative; height: 22px; border-radius: 999px; background: rgba(238, 241, 248, .08); }
.clap__zone { position: absolute; top: -3px; bottom: -3px; border-radius: 999px; background: rgba(var(--accent-rgb), .30); box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 24px rgba(var(--accent-rgb), .35); }
.clap__zone.est-deplacee { transition: none; }
.clap__coeur { position: absolute; top: -1px; bottom: -1px; width: 2px; margin-left: -1px; background: var(--accent); opacity: .8; }
.clap__aiguille { position: absolute; top: -10px; bottom: -10px; width: 3px; margin-left: -1.5px; border-radius: 3px; background: var(--lumiere); box-shadow: 0 0 16px rgba(238, 241, 248, .8); }
.clap__pellicule { display: flex; gap: 4px; height: 26px; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.clap__pellicule i { flex: none; width: 34px; border-radius: 3px; background: rgba(238, 241, 248, .06); border: 1px solid rgba(238, 241, 248, .12); }
.clap__pellicule i.on { background: rgba(var(--accent-rgb), .35); border-color: var(--accent); }
.clap__pellicule i.parfait { background: rgba(231, 195, 93, .5); border-color: var(--or); }
.clap.est-rate .clap__plateau { animation: rate .32s var(--ease); }
@keyframes rate { 20% { box-shadow: inset 0 0 0 2px #F0606A, inset 0 0 80px rgba(240, 96, 106, .35); } }

/* ── la bulle ── */
.bulle { width: min(94%, 900px); display: grid; gap: 18px; }
.bulle__tete { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.bulle__mult { font-size: clamp(48px, min(10vw, 14vh), 120px); font-weight: 800; font-variation-settings: 'wdth' 125; letter-spacing: -.035em; line-height: .9; font-variant-numeric: tabular-nums; transition: color .2s; }
.bulle__mult small { font-size: .45em; margin-left: .06em; color: var(--lumiere-2); }
.bulle__proj { text-align: right; }
.bulle__proj b { display: block; font-size: clamp(22px, 3vw, 32px); font-weight: 700; font-variation-settings: 'wdth' 115; font-variant-numeric: tabular-nums; }
.bulle__proj em { font-style: normal; font-size: 13px; color: var(--lumiere-2); }
.bulle__histo { display: flex; gap: 6px; flex-wrap: wrap; min-height: 26px; }
.bulle__histo span { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; padding: 4px 9px; border-radius: 999px; background: rgba(238, 241, 248, .06); color: var(--lumiere-2); }
.bulle__histo span.haut { color: #8FF0C0; background: rgba(143, 240, 192, .1); }
.bulle__histo span.bas { color: #FF8E95; background: rgba(255, 142, 149, .1); }
.bulle__cv { width: 100%; height: clamp(140px, 30vh, 340px); display: block; border-radius: 12px; background: linear-gradient(180deg, rgba(15, 19, 34, .7), rgba(8, 10, 18, .4)); box-shadow: inset 0 0 0 1px rgba(238, 241, 248, .07); }
.bulle__go { width: 100%; min-height: 64px; font-size: 20px; font-weight: 700; font-variation-settings: 'wdth' 115; }
.bulle__go.est-vif { background: #8FF0C0; border-color: #8FF0C0; color: #06140D; animation: vif 1s ease-in-out infinite; }
@keyframes vif { 50% { box-shadow: 0 0 0 8px rgba(143, 240, 192, .12); } }
.bulle.est-eclatee .bulle__mult { color: #FF8E95; }
.bulle.est-sortie .bulle__mult { color: #8FF0C0; }

/* ── la phrase (piano) ── */
.phrase { width: min(96%, 980px); display: grid; gap: 22px; justify-items: center; }
.phrase__etat { font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2.6vw, 30px); text-align: center; min-height: 1.4em; }
.phrase__points { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; min-height: 12px; }
.phrase__points i { width: 10px; height: 10px; border-radius: 50%; background: rgba(238, 241, 248, .14); transition: background-color .2s, transform .3s var(--ease); }
.phrase__points i.on { background: var(--accent); transform: scale(1.15); }
.phrase__points i.ko { background: #F0606A; }
.clavier { position: relative; width: 100%; height: clamp(170px, 30vh, 260px); display: flex; touch-action: none; }
.touche { position: relative; flex: 1; margin: 0 2px; border-radius: 0 0 10px 10px; background: linear-gradient(180deg, #E9ECF4, #FFFFFF 70%); box-shadow: inset 0 -6px 0 rgba(8, 10, 18, .12); color: #5A6070; font-weight: 600; font-size: 13px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 12px; transition: transform .08s, background .12s; }
.touche.est-hors { opacity: .28; pointer-events: none; }
.touche.est-bas, .touche:active { transform: translateY(3px); background: linear-gradient(180deg, #B5C4FF, #E6ECFF 80%); }
.touche.est-montree { background: linear-gradient(180deg, var(--accent), #F1EAFF 85%); color: #fff; box-shadow: 0 0 44px rgba(var(--accent-rgb), .8), inset 0 -6px 0 rgba(8, 10, 18, .15); }
.touche.est-fausse { background: linear-gradient(180deg, #F0606A, #FFC3C7 85%); color: #fff; }
.touche--noire { position: absolute; top: 0; height: 60%; width: calc(100% / 14 * .62); margin: 0; z-index: 2; border-radius: 0 0 7px 7px; background: linear-gradient(180deg, #1A1F2E, #0B0E16); color: #8D93A1; font-size: 11px; box-shadow: inset 0 -4px 0 rgba(255, 255, 255, .06); }
.touche--noire.est-bas, .touche--noire:active { background: linear-gradient(180deg, #3A4A8A, #1F2A55); }
.phrase__modes { display: flex; gap: 8px; }
.phrase__modes .bouton { min-height: 40px; font-size: 14px; padding: 0 16px; }
.phrase__modes .bouton[aria-pressed="true"] { background: var(--lumiere); color: var(--nuit); }
@media (max-width: 700px) {
  .touche { font-size: 0; margin: 0 1px; }
  .touche--noire { font-size: 0; }
}

/* ── l'atlas : une carte qu'on manie comme une vraie ── */
.atlas { position: absolute; inset: 0; overflow: hidden; }
.atlas__cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.atlas__cv.est-glisse { cursor: grabbing; }
.atlas__haut, .atlas__bas { position: absolute; left: 0; right: 0; z-index: 2; pointer-events: none; text-align: center; padding: 0 var(--g); }
.atlas__haut { top: 0; padding-top: 4px; padding-bottom: 34px; background: linear-gradient(180deg, rgba(8, 10, 18, .92), rgba(8, 10, 18, .6) 55%, rgba(8, 10, 18, 0)); }
.atlas__palier { font-size: 12.5px; font-weight: 600; letter-spacing: .01em; color: var(--accent); }
.atlas__question { margin-top: 4px; font-family: var(--serif); font-weight: 350; font-size: clamp(24px, 3.6vw, 44px); letter-spacing: -.02em; line-height: 1.1; text-wrap: balance; }
.atlas__pips { display: flex; justify-content: center; gap: 5px; margin-top: 10px; }
.atlas__pips i { width: 16px; height: 3px; border-radius: 3px; background: rgba(238, 241, 248, .16); transition: background-color .4s var(--ease); }
.atlas__pips i.on { background: var(--accent); box-shadow: 0 0 10px rgba(var(--accent-rgb), .7); }
.atlas__bas { bottom: 0; padding-bottom: calc(14px + env(safe-area-inset-bottom)); padding-top: 30px; background: linear-gradient(0deg, rgba(8, 10, 18, .85), rgba(8, 10, 18, 0)); min-height: 76px; display: flex; justify-content: center; align-items: flex-end; }
.atlas__verdict {
  display: inline-flex; align-items: baseline; gap: 14px; flex-wrap: wrap; justify-content: center;
  padding: 10px 18px; border-radius: 999px;
  background: rgba(15, 19, 34, .88); border: 1px solid rgba(238, 241, 248, .1);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0; transform: translateY(10px); transition: opacity .35s var(--ease), transform .45s var(--ease);
}
.atlas__verdict.est-la { opacity: 1; transform: none; }
.atlas__verdict .mot { font-size: 18px; font-weight: 800; font-variation-settings: 'wdth' 120; }
.atlas__verdict.ok .mot { color: #8FF0C0; }
.atlas__verdict.ko .mot { color: #FF8E95; }
.atlas__verdict .val b { font-size: 15.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.atlas__verdict .val em { font-style: normal; font-size: 12.5px; color: var(--lumiere-2); }
.atlas__zoom { position: absolute; z-index: 3; right: 14px; bottom: calc(86px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; }
.atlas__zoom button {
  width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center;
  background: rgba(15, 19, 34, .82); border: 1px solid rgba(238, 241, 248, .12);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: background-color .25s var(--ease), transform .25s var(--ease);
}
.atlas__zoom button:hover { background: rgba(38, 50, 84, .9); }
.atlas__zoom button:active { transform: scale(.94); }
.atlas__zoom svg { width: 18px; height: 18px; fill: none; stroke: var(--lumiere); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.atlas__astuce {
  position: absolute; z-index: 2; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  padding: 8px 14px; border-radius: 999px; white-space: nowrap;
  font-size: 12.5px; color: var(--lumiere); background: rgba(15, 19, 34, .78);
  pointer-events: none; transition: opacity .6s var(--ease);
}
.atlas__astuce.est-cachee { opacity: 0; }

/* ── curseurs ── */
.borne[data-jeu="signal"] .borne__scene, .borne[data-jeu="vss"] .borne__scene { cursor: crosshair; }
.borne[data-jeu="tour"] .borne__scene { cursor: pointer; }
