:root {
  --bg: #0a0b12;
  --panel: #141627;
  --panel-2: #1c1f33;
  --ink: #e9ecff;
  --muted: #8a8fb5;
  --accent: #37d0ff;
  --accent-2: #c46bff;
  --danger: #ff5470;
  --ok: #9dff3b;
}

* { box-sizing: border-box; }

/* utilitaire global : masque un élément quelle que soit sa valeur d'affichage */
.hidden { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  background: radial-gradient(1200px 800px at 50% -10%, #181b30 0%, var(--bg) 60%);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* ----- Écrans ----- */
.screen { display: none; position: fixed; inset: 0; align-items: center; justify-content: center; }
.screen.active { display: flex; }
#game.active { display: flex; }

/* ----- Panels (menu / lobby) ----- */
.panel {
  width: min(420px, 92vw);
  background: linear-gradient(180deg, var(--panel) 0%, #11131f 100%);
  border: 1px solid #2a2e49;
  border-radius: 18px;
  padding: 28px 26px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .04);
  text-align: center;
}

.logo {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 2px;
  margin: 4px 0 6px;
  text-shadow: 0 0 24px rgba(55, 208, 255, .35);
}
.logo span { color: var(--accent); }
.tagline { color: var(--muted); margin: 0 0 22px; font-size: 14px; }

h2 { margin: 0 0 16px; font-weight: 700; letter-spacing: .5px; }

.field { display: block; text-align: left; margin: 0 0 16px; }
.field span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 1px; }

input[type=text], input[type=password] {
  width: 100%;
  padding: 13px 14px;
  background: #0d0f1a;
  border: 1px solid #2c3050;
  border-radius: 11px;
  color: var(--ink);
  font-size: 16px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input[type=text]:focus, input[type=password]:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(55, 208, 255, .15); }

#code-input { text-transform: uppercase; letter-spacing: 6px; text-align: center; font-weight: 700; }

.btn {
  appearance: none;
  border: 1px solid #34385c;
  background: var(--panel-2);
  color: var(--ink);
  padding: 12px 18px;
  border-radius: 11px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .08s, background .15s, border-color .15s, opacity .15s;
}
.btn:hover { background: #262a44; border-color: #444a72; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.big { width: 100%; padding: 14px; font-size: 16px; background: linear-gradient(180deg, #2b6fff 0%, #1f55d8 100%); border-color: #3f74ff; }
.btn.big:hover { background: linear-gradient(180deg, #3a7bff 0%, #2a60e0 100%); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); margin-top: 10px; }
.btn.ghost:hover { color: var(--ink); background: #1a1d30; }
.btn.tiny { padding: 4px 10px; font-size: 12px; }

.sep { position: relative; text-align: center; margin: 20px 0; color: var(--muted); font-size: 12px; }
.sep::before { content: ""; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: #2a2e49; }
.sep span { position: relative; background: var(--panel); padding: 0 12px; }

.join-row { display: flex; gap: 10px; }
.join-row input { flex: 1; }

/* Liste des salons ouverts (menu) */
.rooms-block { margin-top: 20px; text-align: left; }
.rooms-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.rooms-head span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.rooms-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 216px; overflow-y: auto; }
.room-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: #14172a; border: 1px solid #2a2e49; border-radius: 10px; }
.room-item:hover { border-color: #3a3f63; }
.room-dots { display: flex; flex-shrink: 0; }
.rdot { width: 12px; height: 12px; border-radius: 50%; margin-left: -4px; border: 1.5px solid var(--panel); }
.rdot:first-child { margin-left: 0; }
.room-info { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; flex: 1; }
.room-info b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-info i { font-style: normal; font-size: 12px; color: var(--muted); letter-spacing: .5px; }
.room-join { flex-shrink: 0; }

/* Compte (auth optionnelle) */
.account { margin: 0 0 18px; padding: 12px; background: #14172a; border: 1px solid #2a2e49; border-radius: 12px; text-align: left; }
.acct-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.acct-tab { flex: 1; padding: 7px 4px; border-radius: 8px; background: transparent; border: 1px solid #2c3050; color: var(--muted); cursor: pointer; font-size: 13px; white-space: nowrap; }
.acct-tab.on { color: var(--ink); border-color: var(--accent); background: rgba(55, 208, 255, .08); }
.acct-form { display: flex; flex-direction: column; gap: 8px; }
.acct-form .btn { width: 100%; }
.linkbtn { display: inline-block; margin-top: 10px; background: none; border: none; color: var(--accent); cursor: pointer; font-size: 13px; padding: 0; }
.linkbtn:hover { text-decoration: underline; }
#acct-error { margin-top: 8px; min-height: 0; }
#acct-error:empty { display: none; }
#acct-in { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.acct-hi { font-size: 15px; }
.acct-hi b { color: var(--accent); }
.acct-actions { display: flex; gap: 6px; }

/* Modale stats / classement */
.modal { position: fixed; inset: 0; background: rgba(5, 6, 12, .75); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal-card { position: relative; background: var(--panel); border: 1px solid #2a2e49; border-radius: 16px; padding: 24px; max-width: 420px; width: 100%; max-height: 86vh; overflow-y: auto; }
.modal-close { position: absolute; top: 10px; right: 12px; background: none; border: none; color: var(--muted); font-size: 26px; line-height: 1; cursor: pointer; }
.modal-close:hover { color: var(--ink); }
.modal-card h2 { margin: 0 0 16px; }
.stat-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat-grid li { display: flex; flex-direction: column; gap: 2px; background: #14172a; border: 1px solid #2a2e49; border-radius: 10px; padding: 10px 12px; }
.stat-grid li span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.stat-grid li b { font-size: 20px; color: var(--accent); }
.board { width: 100%; border-collapse: collapse; }
.board th, .board td { text-align: left; padding: 7px 8px; border-bottom: 1px solid #20243c; font-size: 14px; }
.board th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; }
.board td:first-child { color: var(--muted); width: 28px; }

/* Chat de salon (lobby + en jeu) */
.chat { display: flex; flex-direction: column; gap: 8px; }
.chat-log {
  background: #0d0f1a; border: 1px solid #2c3050; border-radius: 10px;
  padding: 8px 10px; height: 140px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px; font-size: 13px; text-align: left;
}
.chat-log:empty::before { content: 'Pas encore de message.'; color: var(--muted); font-size: 12px; }
.chat-line { line-height: 1.35; overflow-wrap: anywhere; }
.chat-line b { font-weight: 700; margin-right: 2px; }
.chat-input { display: flex; gap: 6px; }
.chat-input input { flex: 1; padding: 9px 11px; font-size: 14px; }
.chat-input .btn.tiny { padding: 0 12px; }
.chat-game .chat-log { height: 120px; border: none; background: transparent; padding: 4px 2px; }

.error { color: var(--danger); min-height: 18px; font-size: 13px; margin: 12px 0 0; }
.hint { color: var(--muted); font-size: 13px; }
.screen > .hint { position: fixed; bottom: 16px; }

/* ----- Lobby ----- */
.code-box { font-size: 18px; margin-bottom: 16px; }
.code-box strong { color: var(--accent); letter-spacing: 4px; font-size: 24px; }
.player-list { list-style: none; padding: 0; margin: 0 0 18px; text-align: left; }
.player-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; margin-bottom: 8px;
  background: #0e1020; border: 1px solid #232746; border-radius: 10px;
}
.player-list .dot { width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 0 10px currentColor; }
.player-list .pname { flex: 1; font-weight: 600; }
.player-list .tag { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.player-list .tag.ready { color: var(--ok); }
.player-list .tag.host { color: var(--accent-2); }
.lobby-actions { display: flex; gap: 10px; }
.lobby-actions .btn { flex: 1; }

/* Sélecteurs du salon : couleur/style + objectif */
.lobby-section { text-align: left; margin: 0 0 14px; }
.lobby-label { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 7px; }
.lobby-label small { text-transform: none; letter-spacing: 0; color: var(--accent-2); }
.skin-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.skin {
  width: 30px; height: 30px; border-radius: 50%; padding: 0; cursor: pointer;
  border: 2px solid #2c3050; background-size: cover; transition: transform .1s, border-color .12s;
}
.skin:hover { transform: scale(1.12); }
.skin.on { border-color: #fff; box-shadow: 0 0 0 2px var(--accent), 0 0 10px rgba(255,255,255,.4); }
.skin.taken { opacity: .28; cursor: not-allowed; }
.skin.taken:hover { transform: none; }
.target-picker { display: flex; flex-wrap: wrap; gap: 7px; }
.target-opt {
  min-width: 42px; padding: 7px 10px; border-radius: 9px; cursor: pointer;
  background: #0d0f1a; border: 1px solid #2c3050; color: var(--ink); font-weight: 700; font-size: 14px;
}
.target-opt:disabled { cursor: default; }
.target-opt.on { background: linear-gradient(180deg, #2b6fff, #1f55d8); border-color: #3f74ff; }
.target-opt:not(.on):not(:disabled):hover { border-color: #444a72; }

/* ----- Jeu ----- */
/* mise en page : [ panneau joueurs ] [ zone de jeu ] côte à côte */
#game { background: #05060c; align-items: stretch; justify-content: flex-start; gap: 14px; padding: 12px; }
#stage-wrap { flex: 1 1 auto; min-width: 0; min-height: 0; display: flex; align-items: center; justify-content: center; }
.stage {
  position: relative;
  background: #070810;
  border-radius: 12px;
  box-shadow: 0 0 0 1px #1b1f38, 0 30px 90px rgba(0, 0, 0, .6);
  overflow: hidden;
  touch-action: none;
}
/* #view enveloppe les canvas : c'est lui qu'on agrandit (zoom) sans toucher au HUD */
#view { position: absolute; inset: 0; z-index: 1; transform-origin: 0 0; will-change: transform; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#trail { z-index: 1; }
#fx { z-index: 2; }

/* HUD */
.hud { position: absolute; inset: 0; z-index: 3; pointer-events: none; padding: 12px; display: flex; flex-direction: column; }
.hud-top { display: flex; justify-content: space-between; }
.badge {
  background: rgba(8, 10, 20, .7); border: 1px solid #2a2e49;
  padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 700;
  letter-spacing: 1px; backdrop-filter: blur(4px);
}
/* Bannière de mission (centrée en haut) */
.mission-banner {
  align-self: center; margin-top: 8px; overflow: hidden;
  background: rgba(8, 10, 20, .72); border: 1px solid #34385c;
  padding: 5px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
  backdrop-filter: blur(4px); pointer-events: none; max-height: 40px; max-width: 520px;
  transition: max-height .45s ease, max-width .45s ease, padding .45s ease,
    font-size .45s ease, transform .45s ease, background .3s, border-color .25s, color .25s;
}
.mission-banner .m-tag {
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px;
  color: var(--accent); margin-right: 8px;
}
.mission-banner.mb-success { border-color: var(--ok); color: var(--ok); animation: mbWin .6s ease; }
.mission-banner.mb-failed { border-color: var(--danger); color: var(--danger); animation: mbFail .45s ease; }
/* l'encart glisse vers le haut en se réduisant à une petite barre colorée */
.mission-banner.mb-collapsed {
  max-height: 6px; max-width: 74px; padding: 0; font-size: 0; border-color: transparent;
  transform: translateY(-7px);
}
.mission-banner.mb-collapsed.mb-success { background: var(--ok); }
.mission-banner.mb-collapsed.mb-failed { background: var(--danger); }
@keyframes mbWin { 0%, 100% { transform: scale(1); } 28% { transform: scale(1.14); } 52% { transform: scale(.97); } 74% { transform: scale(1.05); } }
@keyframes mbFail { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
/* Panneau joueurs : colonne autonome à gauche, hors de la zone de jeu */
.players-panel {
  flex: none; width: 212px; align-self: stretch;
  max-height: calc(100vh - 24px); overflow-y: auto; padding: 2px;
  display: flex; flex-direction: column;
}
.players-panel .chat-block { margin-top: auto; } /* chat collé en bas du panneau */
.panel-head {
  font-size: 11px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--muted); margin: 0 0 6px 2px;
}
.alive-count { color: var(--ok); font-weight: 700; }
.player-cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.pcard {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 9px;
  background: linear-gradient(180deg, rgba(18, 21, 38, .72), rgba(10, 12, 24, .72));
  border: 1px solid #262a48; border-left-width: 3px;
  border-radius: 11px; padding: 7px 11px 7px 9px; min-width: 198px;
  backdrop-filter: blur(5px); transition: opacity .2s, box-shadow .2s, border-color .2s;
}
.pcard.me { box-shadow: 0 0 0 1px #3f74ff inset, 0 0 14px rgba(63, 116, 255, .18); }
.pcard.lead { border-color: #ffd23b; }
.pcard.dead { opacity: .5; }
.pcard.out { opacity: .3; }
.pcard .pc-rank { flex: none; width: 16px; text-align: center; font-size: 13px; font-weight: 800; color: var(--muted); }
.pcard.lead .pc-rank { color: #ffd23b; text-shadow: 0 0 8px rgba(255, 210, 59, .5); }
.pcard .pc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pcard .pc-line { display: flex; align-items: center; gap: 6px; }
.pcard .pc-sub { gap: 8px; }
.pcard .dot { width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 8px currentColor; flex: none; }
.pcard.dead .dot, .pcard.out .dot { box-shadow: none; }
.pcard .pc-name { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard.dead .pc-name { text-decoration: line-through; }
.pcard .pc-tag { font-size: 9px; font-weight: 800; letter-spacing: .5px; color: var(--accent-2); }
.pcard .pc-tag:empty { display: none; }
.pcard .pc-powers { display: flex; gap: 5px; min-height: 14px; }
.pcard .pw { display: inline-flex; }
.pcard .pw .pw-svg { filter: drop-shadow(0 0 2px currentColor); }
.pcard .pw-none { color: #3a3f5e; font-size: 11px; }
.pcard .pc-meta { margin-left: auto; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.pcard .pc-star { font-size: 10px; font-weight: 800; color: #ffd23b; }
.pcard .pc-vd { font-size: 10px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.pcard .pc-vd b { color: var(--ok); }
.pcard .pc-score { flex: none; min-width: 26px; text-align: right; font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--accent); }
/* points flottants : apparaissent à droite (hors carte) puis glissent dessus vers le score */
.float-delta {
  position: fixed; z-index: 60; font-size: 16px; font-weight: 800; pointer-events: none;
  opacity: 0; transform: translateX(20px);
  transition: transform .42s cubic-bezier(.2, .85, .25, 1), opacity .42s ease;
}
.float-delta.pos { color: var(--ok); text-shadow: 0 0 9px rgba(157, 255, 59, .45); }
.float-delta.neg { color: var(--danger); text-shadow: 0 0 9px rgba(255, 84, 112, .45); }
.float-delta.show { opacity: 1; transform: translateX(0); }
.float-delta.merge { opacity: 0; transform: translateX(-52px); }

/* titre de catégorie pendant la séquence (à droite de la liste des joueurs) */
.round-phase {
  position: fixed; z-index: 60; pointer-events: none;
  background: rgba(8, 10, 20, .88); border: 1px solid #3a3f63; border-radius: 11px;
  padding: 9px 16px; font-size: 15px; font-weight: 800; letter-spacing: .3px;
  backdrop-filter: blur(6px); box-shadow: 0 10px 34px rgba(0, 0, 0, .55);
  opacity: 0; transform: translateX(-12px); transition: opacity .3s ease, transform .3s ease;
}
.round-phase.show { opacity: 1; transform: translateX(0); }
.round-phase.hidden { display: none; }

/* Légende des pouvoirs + contrôles (panneau de droite, hors zone de jeu) */
.legend {
  flex: none; width: 236px; align-self: center;
  max-height: calc(100vh - 24px); overflow-y: auto;
  display: flex; flex-direction: column; gap: 6px; padding: 2px;
}
.legend .panel-head { margin: 4px 0 4px 2px; }
/* mini-logo Neon Coil (en haut du panneau de droite) */
.game-logo { display: flex; align-items: center; gap: 9px; margin: 2px 0 10px 2px; }
.gl-coil { width: 28px; height: 28px; flex: none; filter: drop-shadow(0 0 5px rgba(55, 208, 255, .55)); }
.gl-text { font-size: 16px; font-weight: 800; letter-spacing: 1.5px; color: var(--ink); line-height: 1; }
.gl-text b { color: var(--accent); margin-left: 5px; }
.legend-list { list-style: none; margin: 0 0 4px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.legend-list li {
  display: flex; align-items: center; gap: 9px;
  background: rgba(8, 10, 20, .55); border: 1px solid #21253f;
  border-radius: 8px; padding: 5px 9px;
}
.legend-list .lg-cat {
  display: block; background: none; border: none; padding: 6px 2px 1px;
  font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--muted);
}
.legend-list .lg-cat.bonus { color: var(--ok); }
.legend-list .lg-cat.malus { color: var(--danger); }
.legend-list .lg-cat.neutre { color: var(--accent); }
.lg-ic { flex: none; display: inline-flex; filter: drop-shadow(0 0 3px currentColor); }
.lg-txt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.lg-txt b { font-size: 12px; font-weight: 700; }
.lg-txt i { font-size: 11px; font-style: normal; color: var(--muted); }
.controls-help { font-size: 12px; color: var(--ink); margin: 0 0 4px 2px; }
.controls-help p { margin: 3px 0; }
.controls-help .muted { color: var(--muted); font-size: 11px; }
kbd {
  display: inline-block; min-width: 16px; text-align: center;
  padding: 1px 5px; margin: 0 1px; font-size: 11px; font-family: inherit;
  background: #1c2036; border: 1px solid #34385c; border-bottom-width: 2px;
  border-radius: 5px; color: var(--ink);
}
.legend .quit, #quit-btn { margin-top: auto; width: 100%; border-color: #4a2030; color: #ff8097; }
#quit-btn:hover { background: #2a1620; color: #ff5470; }

/* écrans étroits : les panneaux passent au-dessus / en dessous de la zone de jeu */
@media (max-width: 820px) {
  #game { flex-direction: column; padding: 8px; gap: 8px; }
  .players-panel, .legend { width: auto; align-self: stretch; max-height: 24vh; padding: 0; }
  .player-cards, .legend-list { flex-direction: row; flex-wrap: wrap; }
  .pcard { min-width: 148px; flex: 1 1 auto; }
  .legend-list li { flex: 1 1 auto; min-width: 150px; }
}

.effects { list-style: none; margin: auto 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; align-self: flex-start; }
.fx-chip {
  position: relative;
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700;
  padding: 5px 12px 9px; border-radius: 10px;
  background: rgba(8, 10, 20, .72); border: 1px solid currentColor;
  backdrop-filter: blur(4px);
}
.pw-svg { display: block; flex: none; }
.fx-chip .pw-svg { filter: drop-shadow(0 0 2px currentColor); }
.fx-bar {
  position: absolute; left: 8px; right: 8px; bottom: 4px;
  height: 3px; background: rgba(255, 255, 255, .16);
  border-radius: 2px; overflow: hidden;
}
.fx-fill {
  display: block; height: 100%; width: 100%;
  background: currentColor; border-radius: 2px;
  transition: width .15s linear;
}

/* Overlays */
.overlay {
  position: absolute; inset: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5, 6, 12, .55); backdrop-filter: blur(2px);
}
.overlay.hidden { display: none; }
.overlay-card { text-align: center; padding: 24px 30px; }
.overlay-card h2 { font-size: 30px; margin: 0 0 12px; }
#overlay-body { color: var(--muted); margin-bottom: 16px; }
#overlay-body .win { color: var(--ok); font-size: 20px; font-weight: 800; }
.cd-number { font-size: 120px; font-weight: 800; line-height: 1; text-shadow: 0 0 40px rgba(55, 208, 255, .5); animation: pop .25s ease; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Récap animé de fin de partie */
.recap-card {
  width: min(640px, 94vw); max-height: 92vh; overflow-y: auto;
  background: linear-gradient(180deg, var(--panel) 0%, #11131f 100%);
  border: 1px solid #2a2e49; border-radius: 16px; padding: 20px 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55); text-align: center;
}
.recap-card h2 { margin: 0 0 8px; font-size: 24px; }
.recap-phase {
  font-size: 13px; font-weight: 800; letter-spacing: .5px; color: var(--accent);
  min-height: 20px; margin: 0 0 12px; transition: color .2s;
}
.recap-rows { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.recap-rows li {
  display: flex; align-items: center; gap: 10px;
  background: rgba(8, 10, 20, .5); border: 1px solid #21253f; border-radius: 9px;
  padding: 7px 12px; will-change: transform;
}
.recap-rows li.lead { border-color: var(--accent); background: rgba(55, 208, 255, .1); box-shadow: 0 0 0 1px var(--accent) inset; }
.recap-rows .rk { width: 18px; text-align: center; color: var(--muted); font-weight: 800; font-size: 13px; }
.recap-rows li.lead .rk { color: var(--accent); }
.recap-rows .dot { width: 13px; height: 13px; border-radius: 50%; box-shadow: 0 0 8px currentColor; flex: none; }
.recap-rows .nm { flex: 1; text-align: left; font-weight: 700; font-size: 15px; }
.recap-rows .rdelta { min-width: 38px; text-align: right; font-weight: 800; font-size: 14px; opacity: 0; }
.recap-rows .rdelta.show { animation: rdpop .45s ease both; }
.recap-rows .rdelta.pos { color: var(--ok); }
.recap-rows .rdelta.neg { color: var(--danger); }
.recap-rows .rdelta.zero { color: var(--muted); }
.recap-rows .rtot { min-width: 40px; text-align: right; font-variant-numeric: tabular-nums; color: var(--accent); font-size: 17px; font-weight: 800; }
@keyframes rdpop {
  0% { transform: translateY(-7px) scale(.5); opacity: 0; }
  55% { transform: translateY(0) scale(1.25); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.recap-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 4px; }

/* Commandes tactiles (mobile) */
.touch { position: absolute; bottom: 0; top: 0; width: 35%; z-index: 4; border: none; background: transparent; opacity: 0; cursor: pointer; }
.touch.left { left: 0; }
.touch.right { right: 0; }
@media (hover: hover) and (pointer: fine) { .touch { display: none; } }
