/* Thème Arcade : borne d'arcade de nuit (direction tirée de Hallmark, thème « arcade : ember/grille »).
   Couleurs des plateformes inchangées (palette validée daltonisme, ordre fixe : ne pas permuter). */
:root {
  --bg: oklch(14% 0.04 312);          /* fond aubergine */
  --card: oklch(18.5% 0.042 312);     /* puits */
  --card-2: oklch(23% 0.045 312);
  --border: oklch(34% 0.05 312);      /* filets */
  --text: oklch(95% 0.014 315);
  --muted: oklch(71% 0.024 315);
  --accent: oklch(66% 0.215 40);      /* ember : action principale */
  --accent-text: oklch(66% 0.215 40); /* ember lisible en texte */
  --accent-2: oklch(88% 0.195 115);   /* acid : chiffres, ombres dures */
  --accent-ink: oklch(14% 0.04 312);  /* texte posé sur ember ou acid */
  --hard-shadow: oklch(88% 0.195 115);
  --crt-r: oklch(63% 0.24 25);
  --crt-c: oklch(78% 0.14 200);
  --shade: oklch(8% 0.02 315);
  --pf-steam: #338ced;
  --pf-overwatch: #e76624;
  --pf-psn: #00a888;
  --pf-xbox: #d28e05;
  --pf-riot: #e24d8b;
  --pf-fortnite: #0aac23;
  --me: #338ced;
  --friend: #e24d8b;
  --font-display: "Bungee", "Impact", sans-serif;
  --font-body: "Chivo", ui-sans-serif, system-ui, sans-serif;
  --font-figure: "Silkscreen", ui-monospace, monospace;
  --ok: oklch(80% 0.17 150);
  --error: oklch(72% 0.17 25);
  --button: var(--accent);
  --tip-bg: oklch(8% 0.02 315);
  --tip-text: oklch(95% 0.014 315);
  --intro-bg: oklch(18.5% 0.042 312);
  --notice-bg: oklch(25% 0.06 70);
  --notice-text: oklch(88% 0.12 85);
  --gold: oklch(88% 0.195 115);
  --shadow: oklch(8% 0.02 315);
  --white: oklch(99% 0.004 312);
  color-scheme: dark;
}

/* Thème clair : « borne en plein jour » — papier lilas très clair, encre aubergine, ombres dures à l'encre */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: oklch(96.5% 0.012 312); --card: oklch(99.5% 0.004 312); --card-2: oklch(93% 0.016 312);
    --border: oklch(80% 0.03 312); --text: oklch(21% 0.045 312); --muted: oklch(45% 0.03 312);
    --accent: oklch(62% 0.2 40); --accent-text: oklch(52% 0.19 40); --accent-2: oklch(50% 0.15 128);
    --hard-shadow: oklch(21% 0.045 312); --shade: oklch(21% 0.045 312);
    --pf-steam: #257de0; --pf-overwatch: #f47230; --pf-psn: #00b894; --pf-xbox: #f2a600; --pf-riot: #ee7fac; --pf-fortnite: #008a17;
    --ok: oklch(45% 0.13 150); --error: oklch(50% 0.19 25); --me: #257de0; --friend: #d94a86;
    --tip-bg: oklch(21% 0.045 312); --tip-text: oklch(97% 0.01 312); --intro-bg: oklch(99.5% 0.004 312);
    --notice-bg: oklch(95% 0.05 85); --notice-text: oklch(40% 0.1 70); --gold: oklch(52% 0.19 40); --shadow: oklch(21% 0.045 312);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: oklch(96.5% 0.012 312); --card: oklch(99.5% 0.004 312); --card-2: oklch(93% 0.016 312);
  --border: oklch(80% 0.03 312); --text: oklch(21% 0.045 312); --muted: oklch(45% 0.03 312);
  --accent: oklch(62% 0.2 40); --accent-text: oklch(52% 0.19 40); --accent-2: oklch(50% 0.15 128);
  --hard-shadow: oklch(21% 0.045 312); --shade: oklch(21% 0.045 312);
  --pf-steam: #257de0; --pf-overwatch: #f47230; --pf-psn: #00b894; --pf-xbox: #f2a600; --pf-riot: #ee7fac; --pf-fortnite: #008a17;
  --ok: oklch(45% 0.13 150); --error: oklch(50% 0.19 25); --me: #257de0; --friend: #d94a86;
  --tip-bg: oklch(21% 0.045 312); --tip-text: oklch(97% 0.01 312); --intro-bg: oklch(99.5% 0.004 312);
  --notice-bg: oklch(95% 0.05 85); --notice-text: oklch(40% 0.1 70); --gold: oklch(52% 0.19 40); --shadow: oklch(21% 0.045 312);
  color-scheme: light;
}

* { box-sizing: border-box; }
/* Rien ne doit élargir la page (info-bulles cachées, décor) : pas de défilement horizontal */
html, body { overflow-x: clip; }

body {
  margin: 0;
  font: 16px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(900px 420px at 15% -10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
    radial-gradient(700px 380px at 95% 0%, color-mix(in srgb, var(--accent-2) 14%, transparent), transparent 70%),
    var(--bg);
  background-repeat: no-repeat;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
}

.page { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
header { padding-top: 28px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; margin-bottom: 36px; }
.logo { width: 32px; height: 32px; }
header h1 { margin: 0 0 12px; font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.08; letter-spacing: -.02em; }
header h1 .hl {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
header p { margin: 0; color: var(--muted); max-width: 36rem; font-size: 1.05rem; }

h2 { font-family: var(--font-display); font-size: .95rem; margin: 0 0 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

.card {
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  margin: 16px 0;
}

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.grid .card { margin: 0; }

.account-row {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 8px;
  margin-bottom: 12px;
}
.select-wrap { position: relative; display: block; }
.select-wrap select { width: 100%; padding-left: 40px; }
.select-wrap .pf-icon { position: absolute; left: 12px; top: 50%; translate: 0 -50%; pointer-events: none; }
.pf-icon { width: 18px; height: 18px; flex: none; color: var(--pf, var(--accent)); }
.account-row .help { grid-column: 2 / 4; color: var(--muted); margin-top: -4px; }
.account-row .help:empty { display: none; }

input, select, button {
  font: inherit;
  color: inherit;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

button { cursor: pointer; background: var(--button); border-color: var(--button); color: #fff; font-weight: 600; transition: filter .15s, border-color .15s; }
button:hover:not(:disabled) { filter: brightness(1.1); }
#submit { padding-inline: 20px; }
button.secondary { background: transparent; color: var(--text); border-color: var(--border); font-weight: 500; }
button.remove { background: transparent; color: var(--muted); border-color: var(--border); }
button:disabled { opacity: .6; cursor: wait; }

.account-row .help a { color: var(--accent); }
.mini-avatar { width: 18px; height: 18px; border-radius: 4px; vertical-align: -4px; margin-right: 6px; }

.picker { grid-column: 1 / -1; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.picker p { margin: 0 0 8px; }
.picker-title { font-weight: 600; }
.small { font-size: .85rem; }
.candidates { display: grid; gap: 6px; margin-bottom: 8px; }
.candidate {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 12px;
  align-items: center;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 400;
  padding: 8px 12px;
}
.candidate:hover, .candidate:focus-visible { border-color: var(--accent); }
.candidate img { width: 40px; height: 40px; border-radius: 6px; grid-column: 1; }
.candidate .cand-text { grid-column: 2; display: flex; flex-direction: column; min-width: 0; }
.cand-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cand-meta { color: var(--muted); font-size: .85rem; }
.cand-badge { font-size: .85rem; color: var(--ok); white-space: nowrap; }
.candidate.private { opacity: .6; }
.candidate.private .cand-badge { color: var(--muted); }

.actions { display: flex; gap: 8px; justify-content: space-between; flex-wrap: wrap; }

.notice { margin: 16px 0 0; padding: 12px; border-radius: 8px; background: var(--notice-bg); color: var(--notice-text); }
.notice a { color: inherit; }

.status { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; margin: 8px 0; background: var(--card); border: 1px solid var(--border); }
.status.ok { border-color: color-mix(in srgb, var(--ok) 40%, transparent); color: var(--ok); }
.status.error { border-color: color-mix(in srgb, var(--error) 40%, transparent); color: var(--error); }

.total { text-align: center; }
.total { padding-block: 32px; }
.total-value { font-family: var(--font-display); font-size: clamp(3.2rem, 10vw, 5.5rem); font-weight: 700; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.total-label { color: var(--muted); }
.total-sub { color: var(--muted); font-size: .9rem; margin: 8px 0 16px; }

.bar { display: grid; grid-template-columns: minmax(0, 1.1fr) 2fr auto; gap: 10px; align-items: center; margin: 8px 0; }
.bar-label { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-label .pf-icon { color: var(--bar); }
.bar-track { height: 10px; background: var(--bg); border-radius: 5px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--bar, var(--accent)); border-radius: 5px; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.bar-value { font-variant-numeric: tabular-nums; color: var(--muted); }

#game-filter { width: 100%; margin-bottom: 12px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 500; font-size: .9rem; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.game-cell { display: flex; align-items: center; gap: 10px; }
.row-cover { width: 64px; height: 30px; flex: none; }
.row-cover img { object-fit: cover; }
.pf-chip { display: inline-flex; align-items: center; gap: 5px; margin: 2px 8px 2px 0; white-space: nowrap; color: var(--muted); font-size: .9rem; }
.pf-chip .pf-icon { width: 14px; height: 14px; }
.status .pf-icon { color: var(--pf); }

.muted { color: var(--muted); }
footer { padding-bottom: 40px; font-size: .85rem; }

/* ---------- Fond : trame de points + pictogrammes qui dérivent ---------- */
.bg-deco {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background-image: radial-gradient(color-mix(in srgb, var(--text) 9%, transparent) 1px, transparent 1.4px);
  background-size: 26px 26px;
  mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
}
.bg-icon {
  position: absolute;
  width: var(--size);
  height: var(--size);
  opacity: .07;
  color: var(--text);
  rotate: var(--rot);
  animation: drift var(--dur) ease-in-out var(--delay) infinite alternate;
}
@keyframes drift {
  from { transform: translate(0, 0) rotate(0deg); }
  to { transform: translate(24px, -36px) rotate(14deg); }
}

/* ---------- Accueil : texte à gauche, formulaire à droite ---------- */
.hero { display: grid; gap: 24px; align-items: start; padding-bottom: 8px; }
.hero header { padding-top: 28px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; padding: 0; margin: 20px 0 0; color: var(--text); font-size: .95rem; }
.hero-points li::before { content: "✓"; color: var(--accent-2); font-weight: 700; margin-right: 6px; }
.hero-platforms { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.hero-pf {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--pf) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--pf) 35%, transparent);
  font-size: .9rem;
}
.hero-pf .pf-icon { width: 16px; height: 16px; }
.form-card { margin: 0; box-shadow: 0 20px 60px -30px color-mix(in srgb, var(--accent) 60%, transparent); }

@media (min-width: 980px) {
  .hero { grid-template-columns: 1fr 1.05fr; gap: 48px; padding-top: 24px; min-height: 62vh; align-items: center; }
  .hero header { padding-top: 0; }
  .brand { position: absolute; top: 28px; }
  .hero h1 { margin-top: 40px; font-size: clamp(2.4rem, 3.4vw, 3rem); }
}

/* ---------- Résultats : tableau de bord en grille ---------- */
#results { display: grid; gap: 16px; margin-top: 24px; grid-template-columns: 1fr; }
#results[hidden] { display: none; }
#results > .card { margin: 0; }
.area-status { display: grid; gap: 8px; }
.area-status .status { margin: 0; }

@media (min-width: 900px) {
  #results {
    grid-template-columns: repeat(12, 1fr);
    grid-template-areas:
      "status status status status status status status status status status status status"
      "total total total total total plat plat plat plat plat plat plat"
      "top top top top top top top top top top top top"
      "support support support support support support support support support support support support"
      "acct acct acct acct acct genre genre genre genre genre genre genre"
      "games games games games games games games games games games games games"
      "compare compare compare compare compare compare compare compare compare compare compare compare";
  }
  .area-status { grid-area: status; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .area-total { grid-area: total; }
  .area-platform { grid-area: plat; }
  .area-account { grid-area: acct; }
  .area-top { grid-area: top; }
  .area-support { grid-area: support; }
  .area-genre { grid-area: genre; }
  .area-games { grid-area: games; }
  .area-compare { grid-area: compare; }
  #results:has(#genres-card[hidden]) .area-account { grid-column: 1 / -1; }
  .total { display: flex; flex-direction: column; justify-content: center; }
}
.total {
  background:
    radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
    color-mix(in srgb, var(--card) 92%, transparent);
}

/* ---------- Liste des jeux : onglets par plateforme ---------- */
.games-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.games-head h2 { margin: 0; }
.games-head #game-filter { width: min(100%, 320px); margin: 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tab {
  display: inline-flex; align-items: center; gap: 7px;
  background: transparent; color: var(--muted); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 12px; font-weight: 500; font-size: .9rem;
}
.tab .pf-icon { width: 15px; height: 15px; }
.tab:hover { color: var(--text); border-color: color-mix(in srgb, var(--pf, var(--accent)) 60%, transparent); filter: none; }
.tab[aria-selected="true"] {
  color: var(--text);
  background: color-mix(in srgb, var(--pf, var(--accent)) 16%, transparent);
  border-color: color-mix(in srgb, var(--pf, var(--accent)) 60%, transparent);
}
.tab-count { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .8rem; }
.pf-chip.dim { opacity: .45; }
[data-tip] { position: relative; cursor: help; border-radius: 6px; }
[data-tip]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  translate: -50% 4px;
  z-index: 20;
  width: max-content;
  max-width: 240px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--tip-bg);
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px -8px var(--shadow);
  color: #fff;
  font-size: .85rem;
  font-weight: 500;
  line-height: 1.35;
  white-space: normal;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity .12s, translate .12s;
}
[data-tip]:hover::after, [data-tip]:focus::after { opacity: 1; translate: -50% 0; }
.pf-chip.dim:hover, .pf-chip.dim:focus { opacity: 1; }
.games-note { margin: 4px 0 0; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 8%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }

/* ---------- Animation d'entrée ---------- */
body.intro-playing { overflow: hidden; }
#intro {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: radial-gradient(60% 60% at 50% 50%, var(--intro-bg), var(--bg));
  cursor: pointer;
  transition: opacity .5s ease, visibility .5s;
}
#intro[hidden] { display: none; }
#intro.leaving { opacity: 0; visibility: hidden; }
.intro-field { position: absolute; inset: 0; overflow: hidden; }
.intro-icon {
  position: absolute; left: 50%; top: 50%;
  width: 44px; height: 44px; margin: -22px 0 0 -22px;
  opacity: 0;
  animation: gather 1.9s cubic-bezier(.2,.7,.2,1) var(--d) forwards;
}
@keyframes gather {
  0% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(var(--s)); }
  15% { opacity: 1; }
  70% { opacity: 1; transform: translate(calc(var(--x) * .16), calc(var(--y) * .16)) rotate(0deg) scale(var(--s)); }
  100% { opacity: 0; transform: translate(0, 0) rotate(0deg) scale(.2); }
}
.intro-center { position: relative; display: grid; justify-items: center; gap: 14px; }
.intro-logo { width: 84px; height: 84px; opacity: 0; animation: pop .6s cubic-bezier(.3,1.6,.5,1) 1.3s forwards; filter: drop-shadow(0 10px 30px color-mix(in srgb, var(--accent) 60%, transparent)); }
.intro-hand { transform-origin: 16px 17px; animation: tick 1s linear 1.3s 2; }
.intro-title { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; opacity: 0; animation: rise .5s ease 1.55s forwards; }
.intro-bar { width: 160px; height: 4px; border-radius: 2px; background: var(--border); overflow: hidden; opacity: 0; animation: rise .3s ease 1.6s forwards; }
.intro-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); animation: fill .6s ease 1.65s forwards; }
@keyframes pop { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: scale(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fill { to { width: 100%; } }
@keyframes tick { to { transform: rotate(360deg); } }

/* Arrivée douce des blocs de la page après l'intro */
.page > * { animation: rise .6s ease both; }
.page > *:nth-child(2) { animation-delay: .08s; }

@media (prefers-reduced-motion: reduce) {
  .bg-icon, .page > * { animation: none; }
}

@media (max-width: 600px) {
  .account-row { grid-template-columns: 1fr auto; }
  .account-row .select-wrap { grid-column: 1 / -1; }
  .hero h1 br { display: none; }
  .bar { grid-template-columns: 1fr auto; row-gap: 4px; }
  .bar-label { grid-column: 1; }
  .bar-value { grid-column: 2; grid-row: 1; }
  .bar-track { grid-column: 1 / 3; }
  .pf-chip .chip-text { display: none; }
  .pf-chip { margin-right: 6px; }
  .pf-chip .pf-icon { width: 16px; height: 16px; }
  .account-row .help { grid-column: 1 / -1; }
  .total-value { font-size: 3rem; }
}

/* ---------- Étape 2 : répartition, statistiques, podium, jaquettes ---------- */
.share { display: flex; gap: 2px; height: 28px; margin: 4px 0 16px; border-radius: 8px; overflow: visible; }
.share[hidden] { display: none; }
.share-seg {
  display: grid; place-items: center; min-width: 6px;
  background: var(--bar); color: #fff; font-size: .78rem; font-weight: 600;
  white-space: nowrap; overflow: visible;
}
/* Pastille sombre : texte blanc lisible quelle que soit la couleur de la plateforme */
.dedup-mark { color: var(--muted); margin-left: 2px; }
.dedup-note { margin: 14px 0 0; }
.share-label { padding: 1px 7px; border-radius: 6px; background: #0b0d12b3; color: #fff; }
.share-seg:first-child { border-radius: 8px 0 0 8px; }
.share-seg:last-child { border-radius: 0 8px 8px 0; }
.share-seg:only-child { border-radius: 8px; }
.bar[data-tip] { cursor: default; }
.bar[data-tip]::after { left: 30%; }

.stat-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 4px 0 18px; text-align: left; }
.stat-tile {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 12px; border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 70%, transparent); border: 1px solid var(--border);
}
.stat-tile strong { font-family: var(--font-display); font-size: 1.35rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-tile span { color: var(--muted); font-size: .82rem; }
.total #share { align-self: center; }

/* Jaquette : image si disponible, sinon logo de la plateforme sur fond coloré */
.podium-cover, .row-cover {
  position: relative; overflow: hidden; border-radius: 8px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--pf) 35%, var(--card)), var(--bg));
  display: grid; place-items: center;
}
.podium-cover img, .row-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; }
.loaded img { opacity: 1; }
.cover-fallback { width: 40%; height: 40%; color: color-mix(in srgb, var(--pf) 80%, #fff); opacity: .85; }
.row-cover .cover-fallback { width: 16px; height: 16px; }

.podium { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.podium-item {
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 14px; border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 60%, transparent);
  transition: transform .2s, border-color .2s;
}
.podium-item:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.podium-cover { aspect-ratio: 460 / 215; border-radius: 0; }
.podium-body { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; padding: 10px 12px 12px; align-items: baseline; }
.podium-rank { font-family: var(--font-display); font-weight: 700; color: var(--muted); }
.podium-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-hours { grid-column: 1 / -1; font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.podium-meta { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .82rem; }
.podium-meta .pf-icon { width: 14px; height: 14px; }
.podium-meta .pf-icon:first-of-type { margin-left: auto; }
.podium-item.first { border-color: color-mix(in srgb, var(--gold) 55%, transparent); box-shadow: 0 10px 30px -18px var(--gold); }
.podium-item.first .podium-rank { color: var(--gold); }
@media (min-width: 900px) {
  .podium { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 600px) {
  .podium { grid-template-columns: 1fr 1fr; }
  .podium-item.first { grid-column: 1 / -1; }
  .row-cover { width: 44px; height: 22px; }
}

/* ---------- Étape 3 : récap en image ---------- */
.total-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
a.button {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 16px; border-radius: 8px; font-weight: 600; text-decoration: none;
  background: var(--button); color: #fff; cursor: pointer;
}
#recap-dialog {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
  padding: 16px; border: 1px solid var(--border); border-radius: 18px;
  background: var(--card); color: var(--text);
}
#recap-dialog::backdrop { background: #000a; backdrop-filter: blur(4px); }
#recap-dialog img { display: block; width: 100%; aspect-ratio: 1080 / 1350; max-height: calc(100vh - 160px); object-fit: contain; border-radius: 12px; background: var(--bg); }
.recap-close-form { display: flex; justify-content: flex-end; margin: 0 0 8px; }
.recap-close { padding: 4px 10px; }
.recap-status:empty { display: none; }
.recap-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }

/* ---------- Étape 4 : thème, squelettes, accessibilité ---------- */
.theme-toggle {
  position: fixed; top: 20px; right: 20px; z-index: 50;
  width: 42px; height: 42px; padding: 0; display: grid; place-items: center;
  border-radius: 50%; background: var(--card); color: var(--text); border: 1px solid var(--border);
  box-shadow: 0 6px 20px -10px var(--shadow);
}
.theme-toggle svg { width: 20px; height: 20px; }
.lang-toggle {
  position: fixed; top: 20px; right: 72px; z-index: 50;
  height: 42px; min-width: 42px; padding: 0 10px; border-radius: 21px;
  background: var(--card); color: var(--text); border: 1px solid var(--border);
  font-weight: 700; font-size: .85rem; letter-spacing: .04em;
  box-shadow: 0 6px 20px -10px var(--shadow);
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button:focus-visible, a.button:focus-visible, .tab:focus-visible { outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skel {
  display: block; border-radius: 8px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--text) 7%, transparent) 25%, color-mix(in srgb, var(--text) 14%, transparent) 50%, color-mix(in srgb, var(--text) 7%, transparent) 75%);
  background-size: 300% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
.skel-total { width: 220px; height: 72px; margin: 0 auto 10px; border-radius: 14px; }
.skel-line { height: 12px; margin: 14px 0; }
.skel-tile { height: 58px; border-radius: 12px; }
.skel-cover { aspect-ratio: 460 / 215; border-radius: 0; }
.skel-row td { padding: 12px 6px; }
.status.pending { color: var(--muted); }
.status.pending .skel { flex: 1; height: 10px; max-width: 160px; margin-left: auto; }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }

/* ---------- Comparer avec un ami ---------- */
.compare-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.compare-head h2 { margin-bottom: 4px; }
.compare-head p { margin: 0; }
#friend-form { margin-top: 16px; }
#compare-errors { margin-top: 12px; }
#compare-errors:empty { display: none; }
#compare-result { margin-top: 20px; display: grid; gap: 16px; }
#compare-result[hidden] { display: none; }
.vs-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.vs-side { display: flex; flex-direction: column; min-width: 0; }
.vs-side.friend { text-align: right; align-items: flex-end; }
.vs-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.vs-side.me .vs-name { color: var(--me); }
.vs-side.friend .vs-name { color: var(--friend); }
.vs-total { font-family: var(--font-display); font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1; font-variant-numeric: tabular-nums; }
.vs-unit { color: var(--muted); font-size: .9rem; }
.vs-badge {
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%;
  font-family: var(--font-display); font-weight: 700;
  background: linear-gradient(135deg, var(--me), var(--friend)); color: #fff;
  box-shadow: 0 10px 30px -12px var(--friend);
}
.vs-tug { display: flex; gap: 2px; height: 14px; }
.vs-tug span { min-width: 4px; }
.vs-tug .me { background: var(--me); border-radius: 7px 0 0 7px; }
.vs-tug .friend { background: var(--friend); border-radius: 0 7px 7px 0; }
.vs-verdict { margin: 0; text-align: center; font-weight: 600; }
.vs-stats { display: grid; gap: 6px; }
.vs-stat {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center;
  padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--bg) 60%, transparent); border: 1px solid var(--border);
}
.vs-label { color: var(--muted); font-size: .85rem; text-align: center; }
.vs-val { font-weight: 600; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-val.friend { text-align: right; }
.vs-val.lead.me { color: var(--me); }
.vs-val.lead.friend { color: var(--friend); }
.vs-val.lead::after { content: " ▲"; font-size: .7em; }
.vs-fav .vs-val { font-weight: 500; }
.vs-subtitle { margin: 8px 0 0; font-size: 1rem; font-family: var(--font-display); }
.vs-games { display: grid; gap: 6px; }
.vs-game { display: grid; grid-template-columns: 80px 1fr minmax(0, 1.6fr) 1fr 80px; gap: 10px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--border); }
.vs-gname { display: flex; align-items: center; gap: 10px; justify-content: center; min-width: 0; font-weight: 500; text-align: center; overflow: hidden; }
.vs-gname .row-cover { display: none; }
.vs-pf .pf-icon { width: 16px; height: 16px; }
.vs-h { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .9rem; white-space: nowrap; }
/* Info-bulles des colonnes extrêmes : alignées sur le bord pour ne pas sortir de la carte */
.vs-h.me[data-tip]::after { left: 0; translate: 0 4px; }
.vs-h.friend[data-tip]::after { left: auto; right: 0; translate: 0 4px; }
.vs-h[data-tip]:hover::after, .vs-h[data-tip]:focus::after { translate: 0 0; }
.vs-h.friend { text-align: right; }
.vs-h.lead.me { color: var(--me); font-weight: 600; }
.vs-h.lead.friend { color: var(--friend); font-weight: 600; }
.vs-bar { height: 8px; background: color-mix(in srgb, var(--text) 8%, transparent); border-radius: 4px; display: flex; overflow: hidden; }
.vs-bar.me { justify-content: flex-end; }
.vs-bar span { display: block; height: 100%; border-radius: 4px; }
.vs-bar.me span { background: var(--me); }
.vs-bar.friend span { background: var(--friend); }
@media (max-width: 600px) {
  .vs-game { grid-template-columns: 52px 1fr 52px; row-gap: 4px; }
  .vs-gname { grid-column: 1 / -1; grid-row: 1; }
  .vs-bar { display: none; }
  .vs-h.me { grid-row: 2; grid-column: 1; }
  .vs-h.friend { grid-row: 2; grid-column: 3; }
  .vs-badge { width: 42px; height: 42px; font-size: .85rem; }
}

/* ---------- Monétisation : prochain jeu (affiliation), dons ---------- */
.next-games { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.next-games .vs-subtitle { margin: 0 0 10px; }
.next-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.next-game {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 10%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  color: var(--text); text-decoration: none; font-weight: 500; font-size: .92rem;
}
.next-game::after { content: "↗"; color: var(--muted); font-size: .8em; }
.next-game:hover { border-color: var(--accent); }
.footer-links { margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-links[hidden] { display: none; }
.footer-links a { color: var(--accent); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

/* ---------- Carte de soutien (dons) ---------- */
.support-card[hidden] { display: none; }
.support-card {
  display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center;
  background:
    radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, #f2a600 18%, transparent), transparent 60%),
    color-mix(in srgb, var(--card) 92%, transparent);
  border-color: color-mix(in srgb, #f2a600 35%, var(--border));
}
.support-icon {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; font-size: 1.6rem;
  background: color-mix(in srgb, #f2a600 18%, transparent);
}
.support-title { margin: 0 0 2px; color: var(--text); text-transform: none; letter-spacing: 0; font-size: 1.05rem; }
.support-text p { margin: 0; color: var(--muted); font-size: .92rem; }
.support-btn { white-space: nowrap; padding: 12px 20px; font-size: 1rem; }
@media (max-width: 600px) {
  .support-card { grid-template-columns: auto 1fr; }
  .support-btn { grid-column: 1 / -1; }
}

/* ---------- Wrapped de l'année ---------- */
.wrapped-banner {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 4px;
  padding: 7px 14px; border-radius: 999px; font-size: .9rem; font-weight: 600; text-decoration: none; color: var(--text);
  background: linear-gradient(90deg, color-mix(in srgb, #338ced 22%, transparent), color-mix(in srgb, #e24d8b 22%, transparent));
  border: 1px solid color-mix(in srgb, #e24d8b 40%, transparent);
}
.wrapped-banner[hidden] { display: none; }
.wrapped-banner::before { content: "🎉"; }
.wrapped-btn { background: linear-gradient(90deg, #1f6fd1, #c2386f); border: 0; }
@media (min-width: 980px) { .hero h1 { margin-top: 24px; } }

/* =====================================================================
   COUCHE ARCADE — remplace l'habillage « généré » (halos, dégradés de
   texte, flou, petits titres en capitales espacées, cartes imbriquées).
   ===================================================================== */

body {
  font: 400 16px/1.6 var(--font-body);
  background: var(--bg);
  min-height: 100dvh;
}

/* Texture d'écran : grille RGB verticale + lignes de balayage, statique, très légère */
.bg-deco {
  background-image:
    repeating-linear-gradient(to right, color-mix(in oklab, var(--crt-r) 4%, transparent) 0 1px, color-mix(in oklab, var(--accent-2) 3%, transparent) 1px 2px, color-mix(in oklab, var(--crt-c) 4%, transparent) 2px 3px),
    repeating-linear-gradient(to bottom, transparent 0 2px, color-mix(in oklab, var(--shade) 14%, transparent) 2px 3px);
  background-size: auto;
  mask-image: none;
}
.bg-icon { display: none; }

/* Marque et titre principal : Bungee, capitales, léger décalage RGB façon écran cathodique */
.brand { font-family: var(--font-display); font-weight: 400; font-size: 1.1rem; letter-spacing: 0; text-transform: uppercase; }
.logo rect { fill: var(--accent); }
header h1 {
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase; letter-spacing: 0;
  line-height: 1.02; overflow-wrap: break-word; min-width: 0;
  text-shadow: -1.5px 0 0 var(--crt-r), 1.5px 0 0 var(--crt-c);
}
header h1 .hl { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--accent-2); }
:root[data-theme="light"] header h1 .hl { color: var(--accent-text); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) header h1 .hl { color: var(--accent-text); } }
header p { font-size: 1.1rem; max-width: 34rem; }

/* Titres de section : Chivo 900, casse normale, assez grands pour structurer la page */
h2 { font-family: var(--font-body); font-weight: 900; font-size: 1.45rem; line-height: 1.1; letter-spacing: -0.02em; text-transform: none; color: var(--text); margin: 0 0 16px; }
.vs-subtitle, .picker-title { font-family: var(--font-body); font-weight: 900; letter-spacing: -0.01em; }

/* Puits : un seul niveau de contenant, bord épais, coins presque droits, pas de flou */
.card {
  background: var(--card);
  backdrop-filter: none;
  border: 2px solid var(--border);
  border-radius: 4px;
  padding: 24px;
}
.form-card { box-shadow: 8px 8px 0 var(--hard-shadow); }
.total { background: var(--card); }

/* Champs : carrés, 2px, hauteur confortable */
input, select { border: 2px solid var(--border); border-radius: 4px; background: var(--bg); min-height: 48px; }
input:focus, select:focus { outline: 2px solid var(--accent-2); outline-offset: 1px; }

/* Boutons « borne » : fond ember, bord épais, ombre dure qui se plaque au clic */
button, a.button {
  font-family: var(--font-body); font-weight: 700;
  background: var(--accent); color: var(--accent-ink);
  border: 2px solid var(--text); border-radius: 4px;
  min-height: 48px; padding: 10px 18px;
  box-shadow: 4px 4px 0 var(--hard-shadow);
  transition: translate 90ms ease-out, box-shadow 90ms ease-out;
  filter: none;
}
button:hover:not(:disabled), a.button:hover { translate: -1px -1px; box-shadow: 5px 5px 0 var(--hard-shadow); filter: none; }
button:active:not(:disabled), a.button:active { translate: 3px 3px; box-shadow: 1px 1px 0 var(--hard-shadow); }
button.secondary, a.button.secondary { background: transparent; color: var(--text); border-color: var(--text); font-weight: 700; }
button:disabled { opacity: .55; box-shadow: none; translate: 0 0; }

/* Boutons utilitaires : pas d'ombre (croix, onglets, choix de compte, bascules) */
button.remove, .tab, .candidate, .theme-toggle, .lang-toggle, .recap-close {
  box-shadow: none; min-height: 0;
}
button.remove { background: transparent; color: var(--muted); border: 2px solid var(--border); min-height: 48px; }
button.remove:hover, .tab:hover, .candidate:hover, .theme-toggle:hover, .lang-toggle:hover { translate: 0 0; box-shadow: none; }
.theme-toggle, .lang-toggle { border-radius: 4px; border: 2px solid var(--border); background: var(--card); color: var(--text); }
.lang-toggle { font-family: var(--font-body); font-weight: 900; letter-spacing: 0; }

/* Choix d'un compte : lignes de menu, la ligne survolée s'allume (« curseur ») */
.picker { border: 2px solid var(--border); border-radius: 4px; background: var(--bg); }
.candidate { border: 2px solid var(--border); border-radius: 4px; background: var(--card); color: var(--text); font-weight: 400; }
.candidate:hover, .candidate:focus-visible { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); transition: background-color 90ms steps(1); }
.candidate:hover .cand-meta, .candidate:hover .cand-badge, .candidate:focus-visible .cand-meta, .candidate:focus-visible .cand-badge { color: var(--accent-ink); }
.candidate img { border-radius: 2px; }

/* Messages de statut : carrés, bord coloré */
.status { border-radius: 4px; border-width: 2px; background: var(--card); }

/* Accueil : liste à cocher et plateformes en étiquettes carrées */
.hero-points li::before { color: var(--accent-2); }
.hero-pf { border-radius: 4px; border-width: 2px; background: transparent; font-weight: 700; }
.wrapped-banner {
  border-radius: 4px; background: var(--accent-2); color: var(--accent-ink); border: 2px solid var(--accent-2); font-weight: 700;
}
.wrapped-banner::before { content: none; }
:root[data-theme="light"] .wrapped-banner { color: var(--white); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .wrapped-banner { color: var(--white); } }

/* Grand total : chiffres pixel (Silkscreen, 40px et plus seulement) */
.total-value { font-family: var(--font-figure); font-weight: 700; letter-spacing: 0; color: var(--accent-2); font-size: clamp(3rem, 9vw, 5rem); }
.total-label { font-weight: 700; color: var(--text); }

/* Statistiques en « ligne de score » : séparées par des barres verticales, plus de cartes dans la carte */
.stat-tiles { gap: 0; margin: 12px 0 20px; border-top: 2px solid var(--border); border-bottom: 2px solid var(--border); }
.stat-tile { background: none; border: 0; border-radius: 0; padding: 12px 14px; }
.stat-tile:nth-child(odd) { border-right: 2px solid var(--border); }
.stat-tile:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
.stat-tile strong { font-family: var(--font-body); font-weight: 900; font-size: 1.6rem; }
.stat-tile span { font-size: .9rem; }
.wrapped-btn { background: var(--accent-2); color: var(--accent-ink); border: 2px solid var(--text); }
:root[data-theme="light"] .wrapped-btn { color: var(--white); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .wrapped-btn { color: var(--white); } }

/* Barres : carrées, pistes en relief inverse */
.share { border-radius: 2px; height: 30px; }
.share-seg, .share-seg:first-child, .share-seg:last-child, .share-seg:only-child { border-radius: 0; }
.share-label { border-radius: 2px; font-family: var(--font-body); font-weight: 700; }
.bar-track { background: var(--card-2); border-radius: 0; height: 12px; }
.bar-fill { border-radius: 0; transition: none; }
.bar-value { font-weight: 700; color: var(--text); }

/* Podium : plus de cartes imbriquées, la jaquette porte le cadre, le n°1 est la ligne « curseur » */
.podium-item { background: none; border: 0; border-radius: 0; gap: 0; transition: none; }
.podium-item:hover { transform: none; }
.podium-cover { border: 2px solid var(--border); border-radius: 2px; }
.podium-body { padding: 10px 2px 0; }
.podium-rank { font-family: var(--font-body); font-weight: 900; color: var(--muted); }
.podium-name { font-weight: 700; }
.podium-hours { font-family: var(--font-body); font-weight: 900; font-size: 1.7rem; letter-spacing: -0.02em; }
.podium-item.first { box-shadow: none; border: 0; }
.podium-item.first .podium-cover { border-color: var(--accent-2); box-shadow: 6px 6px 0 var(--accent-2); }
.podium-item.first .podium-rank { color: var(--accent-2); }
:root[data-theme="light"] .podium-item.first .podium-cover { border-color: var(--accent-text); box-shadow: 6px 6px 0 var(--hard-shadow); }
:root[data-theme="light"] .podium-item.first .podium-rank { color: var(--accent-text); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .podium-item.first .podium-cover { border-color: var(--accent-text); box-shadow: 6px 6px 0 var(--hard-shadow); }
  :root:not([data-theme="dark"]) .podium-item.first .podium-rank { color: var(--accent-text); }
}
.row-cover { border-radius: 2px; }

/* Liste des jeux : onglets carrés, l'onglet choisi s'allume */
.tab { border-radius: 4px; border-width: 2px; font-weight: 700; }
.tab[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.tab[aria-selected="true"] .tab-count { color: var(--accent-ink); }
th { font-weight: 700; color: var(--muted); font-size: .9rem; }
td, th { border-bottom-color: var(--border); }
tbody tr:hover td { background: var(--card-2); }
.games-note { border-radius: 4px; border-width: 2px; background: var(--card-2); border-color: var(--border); }

/* Info-bulles : carrées, encre */
[data-tip]::after { border-radius: 2px; background: var(--tip-bg); color: var(--tip-text); box-shadow: 4px 4px 0 var(--hard-shadow); }

/* Carte de soutien : un bandeau ember plein, texte sombre, bouton contour encre */
.support-card { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); grid-template-columns: 1fr auto; }
.support-icon { display: none; }
.support-title { color: var(--accent-ink); font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: 1.35rem; }
.support-text p { color: var(--accent-ink); font-size: 1rem; }
.support-btn { background: var(--accent-ink); color: var(--white); border-color: var(--accent-ink); box-shadow: 4px 4px 0 color-mix(in oklab, var(--accent-ink) 45%, transparent); }
@media (max-width: 600px) { .support-card { grid-template-columns: 1fr; } }

/* Prochain jeu : étiquettes carrées, soulignées acid */
.next-game { border-radius: 4px; border-width: 2px; background: transparent; border-color: var(--border); font-weight: 700; }
.next-game:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.next-game:hover::after { color: var(--accent-ink); }

/* Comparaison : deux joueurs, un « VS » carré façon écran de sélection */
.vs-badge { border-radius: 4px; background: var(--accent); color: var(--accent-ink); font-family: var(--font-display); font-weight: 400; box-shadow: 4px 4px 0 var(--hard-shadow); }
.vs-total { font-family: var(--font-figure); font-weight: 700; letter-spacing: 0; }
.vs-tug { height: 16px; }
.vs-tug .me, .vs-tug .friend { border-radius: 0; }
.vs-stat { background: none; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 10px 2px; }
.vs-bar, .vs-bar span { border-radius: 0; }

/* Liens */
.footer-links a, .account-row .help a { color: var(--accent-text); text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--accent-2); text-underline-offset: 3px; }

/* Intro : même écran que la borne */
#intro { background: var(--bg); }
.intro-title { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; text-shadow: -1.5px 0 0 var(--crt-r), 1.5px 0 0 var(--crt-c); }
.intro-logo { filter: none; }
.intro-logo rect { fill: var(--accent); }
.intro-bar { border-radius: 0; height: 6px; }
.intro-bar span { background: var(--accent-2); }

/* Fenêtre du récap */
#recap-dialog { border-radius: 4px; border: 2px solid var(--border); box-shadow: 8px 8px 0 var(--hard-shadow); }
#recap-dialog img { border-radius: 2px; }

/* Squelettes : carrés */
.skel, .skel-total, .skel-tile { border-radius: 2px; }

:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; transition: none; }
:root[data-theme="light"] :focus-visible { outline-color: var(--accent-text); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) :focus-visible { outline-color: var(--accent-text); } }

@media (prefers-reduced-motion: reduce) {
  button, a.button { transition: none; }
  button:hover:not(:disabled), button:active:not(:disabled), a.button:hover, a.button:active { translate: 0 0; }
}

/* Retouches Arcade : marque dans le flux (plus de chevauchement), titre équilibré, texture adoucie en clair */
@media (min-width: 980px) {
  .brand { position: static; margin-bottom: 28px; }
  .hero h1 { margin-top: 18px; font-size: clamp(2.2rem, 3.2vw, 2.9rem); }
}
header h1 { text-wrap: balance; }
.wrapped-banner { margin-bottom: 14px; }
:root[data-theme="light"] .bg-deco { opacity: .45; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .bg-deco { opacity: .45; } }

/* Couleurs des joueurs en texte : variantes plus foncées en thème clair (contraste ≥ 4,5:1) */
:root { --me-text: var(--me); --friend-text: var(--friend); }
:root[data-theme="light"] { --me-text: #1c5fb0; --friend-text: #a82a60; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --me-text: #1c5fb0; --friend-text: #a82a60; } }
.vs-side.me .vs-name, .vs-val.lead.me, .vs-h.lead.me { color: var(--me-text); }
.vs-side.friend .vs-name, .vs-val.lead.friend, .vs-h.lead.friend { color: var(--friend-text); }
