/* ==========================================================================
   MGXProduction — pmrs.css
   Pixel Mayhem: Roll Survivor : la page doit sembler sortir du jeu.
   Couleurs échantillonnées dans les captures. Bordures « pixel » (coins en
   escalier via box-shadow), ombres dures sans flou, aucun flou/glassmorphism.
   Thème sombre = couleurs exactes du jeu (référence) ; thème clair = « jour ».
   ========================================================================== */

:root {
  --font-head: "Pixelify Sans", "Noto Sans", system-ui, sans-serif;
  --font-body: "Noto Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Interface du jeu */
  --night: #161122;
  --ink: #0e0a17;            /* contour sombre */
  --panel-game: #261f37;     /* panneaux / pastilles (toujours sombres) */
  --btn-2: #342a49;          /* bouton secondaire */
  --lavender: #b2adc7;
  --white: #f5f1fc;
  --gold-title: #ffde66;
  --gold: #ffcc4d;
  --gold-line: #e2b549;
  --gold-hi: #ffd469;
  --gold-end: #9e661a;
  --green: #2a5730;
  --green-hover: #33693a;
  --tree-line: #38334c;
  --slot: #524c70;

  /* Variables de thème (sombre) */
  --bg: #161122;
  --surface: #261f37;
  --surface-2: #342a49;
  --border: #38334c;
  --text: #f5f1fc;
  --text-2: #b2adc7;
  --panel: #261f37;
  --panel-text: #f5f1fc;
  --px-bd: #0e0a17;
  --header-bg: #161122;
  --header-line: #40332a;
  --star: #5a5272;
  --gold-text: #ffcc4d;      /* or utilisé comme texte sur le fond de page */
  --chevron: #ffcc4d;
  --accent: #2a5730;
  --accent-hover: #33693a;
  --accent-text: #f5f1fc;
  --accent-light: #ffcc4d;
  --focus: #ffde66;
  --footer-bg: #120e1c;

  --hud-h: 30px;
  --header-h: 64px;

  --lb-backdrop: rgba(14, 10, 23, .95);
  --lb-text: #f5f1fc;
  --lb-btn-bg: #342a49;
  --lb-btn-bg-hover: #42365c;
  --lb-btn-border: #0e0a17;
  --lb-frame-border: transparent;
  --lb-radius: 0;

  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #ece6f5;
  --surface: #f8f5fd;
  --surface-2: #e2daf0;
  --border: #524c70;
  --text: #161122;
  --text-2: #4a4462;
  --panel: #f8f5fd;
  --panel-text: #161122;
  --px-bd: #524c70;
  --header-bg: #f8f5fd;
  --header-line: #524c70;
  --star: #b3a8cf;
  --gold-text: #7a5200;
  --chevron: #a06a00;
  --accent-light: #7a5200;
  --focus: #5b3fa0;
  --footer-bg: #f8f5fd;
  color-scheme: light;
}

body {
  position: relative;
  line-height: 1.65;
}
/* Fond étoilé fixe (écran Talents) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: var(--star);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' shape-rendering='crispEdges'%3E%3Cg fill='%23000'%3E%3Crect x='14' y='22' width='3' height='3'/%3E%3Crect x='70' y='96' width='2' height='2'/%3E%3Crect x='128' y='34' width='3' height='3'/%3E%3Crect x='196' y='70' width='2' height='2'/%3E%3Crect x='224' y='150' width='3' height='3'/%3E%3Crect x='160' y='186' width='2' height='2'/%3E%3Crect x='98' y='214' width='3' height='3'/%3E%3Crect x='30' y='160' width='2' height='2'/%3E%3Crect x='52' y='60' width='2' height='2'/%3E%3Crect x='176' y='126' width='2' height='2'/%3E%3Crect x='120' y='150' width='2' height='2'/%3E%3Crect x='8' y='108' width='2' height='2'/%3E%3Crect x='210' y='12' width='2' height='2'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' shape-rendering='crispEdges'%3E%3Cg fill='%23000'%3E%3Crect x='14' y='22' width='3' height='3'/%3E%3Crect x='70' y='96' width='2' height='2'/%3E%3Crect x='128' y='34' width='3' height='3'/%3E%3Crect x='196' y='70' width='2' height='2'/%3E%3Crect x='224' y='150' width='3' height='3'/%3E%3Crect x='160' y='186' width='2' height='2'/%3E%3Crect x='98' y='214' width='3' height='3'/%3E%3Crect x='30' y='160' width='2' height='2'/%3E%3Crect x='52' y='60' width='2' height='2'/%3E%3Crect x='176' y='126' width='2' height='2'/%3E%3Crect x='120' y='150' width='2' height='2'/%3E%3Crect x='8' y='108' width='2' height='2'/%3E%3Crect x='210' y='12' width='2' height='2'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-size: 240px 240px;
  mask-size: 240px 240px;
}

/* Icônes pixel : bords nets, échelle entière quand c'est possible */
.px-icon {
  width: 20px;
  height: 20px;
  flex: none;
  shape-rendering: crispEdges;
  image-rendering: pixelated;
}

:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }

/* ---------- HUD : barre d'XP = progression du scroll ---------- */
.xp-hud {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  height: var(--hud-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 var(--gutter);
  background: var(--night);
  border-bottom: 3px solid #e0a740;
  box-shadow: 0 3px 0 0 var(--ink);
  pointer-events: none;
}
.xp-hud__lv {
  min-width: 3.6em;
  font-family: "Pixelify Sans", monospace;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  color: #9ec7ff;
  text-shadow: 2px 2px 0 var(--ink);
  white-space: nowrap;
}
.xp-hud__lv.is-up { animation: lv-up .6s steps(4, end); }
@keyframes lv-up {
  0% { transform: scale(1); }
  30% { transform: scale(1.35) translateY(-2px); color: #ffde66; }
  100% { transform: scale(1); }
}
.xp-hud__track {
  position: relative;
  flex: 1;
  height: 12px;
  overflow: hidden;
  background: var(--ink);
  box-shadow: inset 0 0 0 2px #2a2440;
}
.xp-hud__fill {
  position: absolute;
  inset: 2px;
  background: linear-gradient(#a3c6ff 0 40%, #8cb8ff 40%);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* ---------- En-tête habillé ---------- */
.site-header--pmrs { border-bottom: 3px solid transparent; }
.site-header--pmrs.is-scrolled {
  background: var(--header-bg);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom-color: var(--header-line);
  box-shadow: 0 3px 0 0 rgba(14, 10, 23, .35);
}
.site-header--pmrs .back-link { font-family: var(--font-head); }
.site-header--pmrs .back-link:hover { background: color-mix(in srgb, var(--surface) 70%, transparent); }
.back-link__arrow { width: 12px; height: 20px; color: var(--chevron); }
.site-header--pmrs .brand__name { font-family: "Pixelify Sans", sans-serif; font-size: 1.0625rem; }

.site-header--pmrs .lang-switch,
.pm-footer .lang-switch {
  border: 0;
  border-radius: 0;
  background: var(--panel-game);
  box-shadow: 0 -3px 0 0 var(--ink), 0 3px 0 0 var(--ink), -3px 0 0 0 var(--ink), 3px 0 0 0 var(--ink);
  margin: 3px;
}
.site-header--pmrs .lang-switch button {
  border-radius: 0;
  min-height: 44px;
  font-family: "Pixelify Sans", sans-serif;
  font-size: .9375rem;
  color: var(--lavender);
}
.site-header--pmrs .lang-switch button::before { inset: 4px; border-radius: 0; }
.site-header--pmrs .lang-switch button:hover { color: var(--white); }
.site-header--pmrs .lang-switch button[aria-pressed="true"] { color: var(--ink); }
.site-header--pmrs .lang-switch button[aria-pressed="true"]::before { background: var(--gold); }
.site-header--pmrs .icon-btn {
  width: 44px; height: 44px;
  margin: 3px;
  border: 0;
  border-radius: 0;
  background: var(--btn-2);
  color: var(--gold);
  box-shadow: 0 -3px 0 0 var(--ink), 0 3px 0 0 var(--ink), -3px 0 0 0 var(--ink), 3px 0 0 0 var(--ink);
}
.site-header--pmrs .icon-btn:hover { background: #42365c; }
.site-header--pmrs .icon-btn svg { width: 22px; height: 22px; }
.site-header--pmrs .icon-btn .icon-moon { width: 16px; height: 20px; }

/* ---------- Boutons pixel ---------- */
.px-btn {
  --drop: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  margin: 4px 4px 8px;
  padding: 0 22px;
  font-family: "Pixelify Sans", sans-serif;
  font-weight: 600;
  font-size: 1.1875rem;
  line-height: 1.1;
  color: var(--white);
  text-decoration: none;
  text-shadow: 2px 2px 0 var(--ink);
  white-space: nowrap;
  background: var(--btn-2);
  border: 0;
  border-radius: 0;
  box-shadow:
    0 -4px 0 0 var(--ink), 0 4px 0 0 var(--ink), -4px 0 0 0 var(--ink), 4px 0 0 0 var(--ink),
    0 var(--drop) 0 0 var(--ink),
    inset 0 4px 0 0 rgba(255, 255, 255, .1),
    inset 0 -4px 0 0 rgba(0, 0, 0, .25);
  transition: transform .06s steps(1, end), box-shadow .06s steps(1, end), background-color .1s steps(1, end);
}
.px-btn .px-icon { width: 20px; height: 22px; }
.px-btn__star { color: var(--gold); width: 21px !important; height: 21px !important; }
.px-btn:hover { --drop: 6px; transform: translateY(2px); background: #42365c; }
.px-btn:active { --drop: 4px; transform: translateY(4px); }
.px-btn--green { background: var(--green); }
.px-btn--green:hover { background: var(--green-hover); }
.px-btn--xl { min-height: 64px; padding: 0 32px; font-size: 1.4375rem; }
.px-btn--xl .px-icon { width: 24px; height: 26px; }
.px-btn--bought,
.px-btn:disabled {
  --drop: 4px;
  cursor: not-allowed;
  transform: none;
  color: #8f8c9c;
  text-shadow: none;
  background: #120e1a;
}
.px-btn:disabled:hover { transform: none; background: #120e1a; }

/* ---------- Hero ---------- */
.pm-hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding: calc(var(--hud-h) + var(--header-h) + clamp(24px, 5vw, 56px)) 0 clamp(64px, 8vw, 104px);
}
.pm-stars {
  position: absolute;
  inset: -10% 0 0;
  z-index: -1;
  pointer-events: none;
}
.pm-stars i {
  position: absolute;
  width: var(--s, 4px);
  height: var(--s, 4px);
  background: var(--c, #f5f1fc);
  animation: px-twinkle var(--d, 2.4s) steps(2, jump-none) var(--dl, 0s) infinite alternate;
}
.pm-hero.is-paused .pm-stars i,
.pm-hero.is-paused .pm-platform { animation-play-state: paused; }
@keyframes px-twinkle { from { opacity: 1; } to { opacity: .15; } }
:root[data-theme="light"] .pm-stars i { --c: #8f84b3; }

.pm-hero__grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 920px) {
  .pm-hero__grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 56px; }
}
.pm-hero__text {
  display: grid;
  justify-items: center;
  gap: 22px;
  text-align: center;
}
@media (min-width: 920px) {
  .pm-hero__text { justify-items: start; text-align: left; }
  .res-pills { justify-content: flex-start !important; }
  .pm-hero__actions { justify-content: flex-start !important; }
}
.pm-badge {
  display: inline-block;
  margin: 3px;
  padding: 4px 16px;
  font-family: "Pixelify Sans", sans-serif;
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: .14em;
  color: var(--ink);
  background: var(--gold);
  box-shadow:
    0 -3px 0 0 var(--ink), 0 3px 0 0 var(--ink), -3px 0 0 0 var(--ink), 3px 0 0 0 var(--ink),
    inset 0 3px 0 0 var(--gold-hi), inset 0 -3px 0 0 var(--gold-line);
}
.pm-title {
  --o: .055em;
  font-family: "Pixelify Sans", sans-serif;
  font-weight: 700;
  font-size: clamp(2.5rem, 8.2vw, 5.6rem);
  line-height: 1.04;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--gold-title);
  text-shadow:
    var(--o) 0 0 var(--ink), calc(var(--o) * -1) 0 0 var(--ink),
    0 var(--o) 0 var(--ink), 0 calc(var(--o) * -1) 0 var(--ink),
    var(--o) var(--o) 0 var(--ink), calc(var(--o) * -1) var(--o) 0 var(--ink),
    var(--o) calc(var(--o) * -1) 0 var(--ink), calc(var(--o) * -1) calc(var(--o) * -1) 0 var(--ink),
    0 calc(var(--o) * 2.2) 0 var(--ink);
}
.pm-title__line { display: block; }
.pm-title__line--2 { font-size: .8em; color: var(--gold); }
.pm-tagline { max-width: 46ch; font-size: 1.125rem; color: var(--text-2); }

.res-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.res-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 6px 18px 6px 12px;
  border-radius: 999px;
  background: #1e1830;
  color: var(--white);
  font-family: "Pixelify Sans", sans-serif;
  font-weight: 600;
  font-size: 1.0625rem;
  box-shadow: inset 0 0 0 2px #2c2540, 0 3px 0 0 var(--ink);
}
.res-pill .px-icon { width: 22px; height: 20px; }
.res-pill__dl { color: #9ec7ff; height: 22px !important; }
.pm-hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 14px; }

/* Téléphone pixel posé sur la plateforme violette lumineuse */
.pm-phone-wrap { position: relative; display: grid; justify-items: center; margin: 0; }
.pm-phone {
  position: relative;
  z-index: 1;
  width: min(270px, 64vw);
  padding: 20px 10px 24px;
  background: var(--panel-game);
  cursor: crosshair;
  box-shadow:
    0 -5px 0 0 var(--ink), 0 5px 0 0 var(--ink), -5px 0 0 0 var(--ink), 5px 0 0 0 var(--ink),
    inset 5px 5px 0 0 #342a49, inset -5px -5px 0 0 #1b1528,
    0 15px 0 0 rgba(14, 10, 23, .45);
}
.pm-phone::before {
  content: "";
  position: absolute;
  top: 8px; left: 50%;
  width: 48px; height: 5px;
  translate: -50% 0;
  background: var(--ink);
}
.pm-phone::after {
  content: "";
  position: absolute;
  bottom: 8px; left: 50%;
  width: 30px; height: 6px;
  translate: -50% 0;
  background: #342a49;
  box-shadow: 0 0 0 2px var(--ink);
}
.pm-phone__screen {
  position: relative;
  aspect-ratio: 9 / 20;
  overflow: hidden;
  background: var(--ink);
  box-shadow: 0 0 0 3px var(--ink);
}
.pm-phone__screen img { width: 100%; height: 100%; object-fit: cover; }
.pm-platform {
  position: relative;
  z-index: 0;
  width: min(440px, 100%);
  aspect-ratio: 3.2 / 1;
  margin-top: -70px;
  border-radius: 50%;
  background: radial-gradient(closest-side,
    #57426b 0 34%, #4d3d63 34% 58%, #382b4a 58% 80%,
    rgba(158, 102, 26, .3) 80% 91%, transparent 91%);
  animation: platform-glow 2.4s steps(3, end) infinite alternate;
}
@keyframes platform-glow { from { opacity: .8; } to { opacity: 1; } }

/* Chiffre de dégâts (easter egg) */
.dmg {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  font-family: "Pixelify Sans", sans-serif;
  font-weight: 700;
  font-size: 2.25rem;
  line-height: 1;
  color: var(--gold-title);
  text-shadow: 3px 0 0 var(--ink), -3px 0 0 var(--ink), 0 3px 0 var(--ink), 0 -3px 0 var(--ink), 3px 3px 0 var(--ink), -3px -3px 0 var(--ink), 3px -3px 0 var(--ink), -3px 3px 0 var(--ink);
  animation: dmg-fly .9s steps(9, end) forwards;
}
.dmg--crit { color: #ff8a4d; font-size: 2.75rem; }
@keyframes dmg-fly {
  0% { transform: translate(-50%, -50%) scale(.6); opacity: 0; }
  15% { transform: translate(-50%, -80%) scale(1.25); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(-50%, -260%) scale(1); opacity: 0; }
}

/* ---------- Sections ---------- */
.pm-section {
  position: relative;
  padding-block: clamp(64px, 9vw, 112px);
}
.pm-sub { margin-top: 22px; text-align: center; color: var(--text-2); }

/* Ruban jaune aux extrémités en queue d'aronde */
.ribbon {
  position: relative;
  z-index: 0;
  width: fit-content;
  min-width: min(100%, 380px);
  max-width: 100%;
  margin-inline: auto;
  padding: 0 32px;
  text-align: center;
}
.ribbon > span {
  display: block;
  padding: 8px 28px 10px;
  font-family: "Pixelify Sans", sans-serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 3.8vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--ink);
  background: linear-gradient(var(--gold-hi) 0 16%, var(--gold) 16% 84%, var(--gold-line) 84%);
  box-shadow: 0 -3px 0 0 var(--ink), 0 3px 0 0 var(--ink), -3px 0 0 0 var(--ink), 3px 0 0 0 var(--ink);
}
.ribbon::before,
.ribbon::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 14px;
  bottom: -12px;
  width: 50px;
  background: var(--gold-end);
}
.ribbon::before { left: 0; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 40% 50%); }
.ribbon::after { right: 0; clip-path: polygon(0 0, 100% 0, 60% 50%, 100% 100%, 0 100%); }

/* Panneau pixel */
.px-panel {
  position: relative;
  margin: 4px;
  padding: clamp(22px, 4vw, 38px);
  background: var(--panel);
  color: var(--panel-text);
  box-shadow:
    0 -4px 0 0 var(--px-bd), 0 4px 0 0 var(--px-bd), -4px 0 0 0 var(--px-bd), 4px 0 0 0 var(--px-bd),
    0 12px 0 0 rgba(14, 10, 23, .4);
}
.pm-story { max-width: 820px; margin: 44px auto 0; font-size: 1.0625rem; }
.pm-story p + p { margin-top: 1em; }

/* Placeholders verrouillés (cadenas) */
.px-locked {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-2);
  font-family: "Pixelify Sans", sans-serif;
  font-weight: 500;
}
.px-locked__icon { width: 15px !important; height: 18px !important; color: currentColor; }
.px-locked-block { display: grid; justify-items: center; gap: 8px; padding: 8px 0; text-align: center; }
.px-locked-block__lock {
  display: grid;
  place-items: center;
  width: 76px; height: 76px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: #1e1830;
  color: #a8a4b8;
  box-shadow: 0 0 0 5px #4a4560, 0 0 0 10px var(--ink);
}
.px-locked-block__lock .px-icon { width: 30px; height: 36px; }
.px-locked-block__title {
  font-family: "Pixelify Sans", sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  text-transform: uppercase;
  color: var(--gold-text);
}
.px-locked-block__text { color: var(--text-2); }

/* ---------- But du jeu : arbre de talents ---------- */
.talent-tree {
  position: relative;
  max-width: 820px;
  margin: 52px auto 0;
  display: grid;
  justify-items: center;
}
.talent__node {
  position: relative;
  display: grid;
  place-items: center;
  width: 76px; height: 76px;
  border-radius: 50%;
  background: #1e1830;
  box-shadow: 0 0 0 5px #4a4560, 0 0 0 10px var(--ink);
}
.talent__icon { width: 34px; height: 34px; }
.talent.talent--root { position: relative; z-index: 1; display: grid; grid-template-columns: auto; justify-items: center; gap: 18px; }
.talent--root .talent__label { padding: 2px 12px; background: var(--bg); }
.talent--root .talent__node {
  width: 92px; height: 92px;
  box-shadow: 0 0 0 5px #d9d6e3, 0 0 0 10px var(--ink), 0 0 0 16px rgba(255, 222, 102, .12);
}
.talent--root .talent__icon { width: 42px; height: 42px; color: var(--gold); }
.talent--root .talent__label {
  font-family: "Pixelify Sans", sans-serif;
  font-weight: 700;
  font-size: 1.375rem;
  text-transform: uppercase;
  color: var(--gold-text);
}
.talent-body { width: 100%; display: grid; justify-items: center; }
.talent-list {
  position: relative;
  width: 100%;
  display: grid;
  gap: 40px;
  margin-top: 46px;
  padding-top: 6px;
}
.talent-list::before {
  content: "";
  position: absolute;
  top: -150px;
  bottom: 38px;
  left: 50%;
  width: 6px;
  translate: -50% 0;
  z-index: -1;
  background: var(--tree-line);
}
.talent {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 26px;
}
.talent-list .talent__node { grid-column: 2; grid-row: 1; }
.talent-list .talent__label { grid-column: 3; grid-row: 1; justify-self: start; text-align: left; }
.talent-list .talent:nth-child(even) .talent__label { grid-column: 1; justify-self: end; text-align: right; }
.talent-list .talent__label {
  position: relative;
  margin: 4px;
  padding: 10px 16px;
  background: var(--panel);
  color: var(--panel-text);
  font-size: 1rem;
  box-shadow: 0 -3px 0 0 var(--px-bd), 0 3px 0 0 var(--px-bd), -3px 0 0 0 var(--px-bd), 3px 0 0 0 var(--px-bd);
}
.talent.is-locked .talent__icon { color: var(--slot); opacity: .75; filter: grayscale(1) brightness(.75); }
.talent.is-locked .talent__label {
  font-family: "Pixelify Sans", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--text-2);
}
.talent__lock {
  position: absolute;
  right: -6px; bottom: -4px;
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #2b2640;
  color: #a8a4b8;
  box-shadow: 0 0 0 3px var(--ink);
}
.talent__lock .px-icon { width: 10px; height: 12px; }
.talent.is-unlocked .talent__node { box-shadow: 0 0 0 5px #d9d6e3, 0 0 0 10px var(--ink); }
.talent__num {
  font-family: "Pixelify Sans", sans-serif;
  font-weight: 700;
  font-size: 2rem;
  color: var(--gold);
  text-shadow: 2px 2px 0 var(--ink);
}
.talent-note {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 40px;
  color: var(--text-2);
  font-family: "Pixelify Sans", sans-serif;
  font-size: 1.0625rem;
}
.talent-note .px-icon { width: 15px; height: 18px; }
@media (max-width: 639px) {
  .talent { grid-template-columns: auto minmax(0, 1fr); gap: 20px; }
  .talent-list { padding-left: 6px; }
  .talent-list::before { left: 50px; }
  .talent-list .talent__node { grid-column: 1; }
  .talent-list .talent__label,
  .talent-list .talent:nth-child(even) .talent__label { grid-column: 2; justify-self: start; text-align: left; }
  .talent-tree .talent--root { justify-self: start; margin-left: 4px; }
}

/* ---------- Informations : pastilles de stats ---------- */
.stat-grid {
  display: grid;
  gap: 16px 18px;
  margin-top: 48px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
}
.stat-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 18px 10px 14px;
  border-radius: 14px;
  background: var(--panel-game);
  box-shadow: inset 0 0 0 2px #2f2744, 0 4px 0 0 var(--ink);
}
.stat-pill__icon { width: 22px; height: 22px; color: var(--gold); }
.stat-pill__label {
  flex: 1;
  min-width: 0;
  font-family: "Pixelify Sans", sans-serif;
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--lavender);
}
.stat-pill__value {
  max-width: 60%;
  text-align: right;
  font-family: "Pixelify Sans", sans-serif;
  font-weight: 700;
  font-size: 1.1875rem;
  color: var(--gold);
  overflow-wrap: anywhere;
}
.stat-pill .px-locked { color: var(--lavender); font-weight: 500; font-size: 1rem; }

/* ---------- Captures : cartes façon boutique ---------- */
.rarity--basic     { --r-bg: #2c2c31; --r-bd: #686876; --r-label: #c3c3cf; }
.rarity--regular   { --r-bg: #1a3c1a; --r-bd: #3e8e3e; --r-label: #a6e8a6; }
.rarity--superior  { --r-bg: #162a4d; --r-bd: #3465b8; --r-label: #a9c6fa; }
.rarity--epic      { --r-bg: #4d2b69; --r-bd: #b866fa; --r-label: #cd94fb; }
.rarity--legendary { --r-bg: #493c0f; --r-bd: #ad8e25; --r-label: #ffde66; }
.rarity--mythic    { --r-bg: #49270b; --r-bd: #ad5e1a; --r-label: #ffb27a; }

.shot-grid {
  display: flex;
  gap: 16px;
  margin: 36px calc(var(--gutter) * -1) 0;
  padding: 8px var(--gutter) 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--slot) transparent;
}
.shot-card {
  position: relative;
  flex: 0 0 min(62vw, 260px);
  scroll-snap-align: center;
}
@media (min-width: 900px) {
  .shot-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    margin-inline: 0;
    padding-inline: 0;
    overflow: visible;
  }
}
.shot-card__btn {
  position: relative;
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 10px 12px 14px;
  border: 4px solid var(--r-bd);
  border-radius: 16px;
  background: var(--r-bg);
  box-shadow: 0 6px 0 0 var(--ink);
  text-align: center;
  cursor: zoom-in;
  transition: transform .12s steps(2, end), box-shadow .12s steps(2, end);
}
.shot-card__btn:hover { transform: translateY(-4px); box-shadow: 0 10px 0 0 var(--ink); }
.shot-card__btn:active { transform: translateY(2px); box-shadow: 0 2px 0 0 var(--ink); }
.shot-card__btn:focus-visible { outline-offset: 6px; }
.shot-card__rarity {
  font-family: "Pixelify Sans", sans-serif;
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--r-label);
}
.shot-card__new {
  position: absolute;
  top: 9px; right: 12px;
  font-family: "Pixelify Sans", sans-serif;
  font-weight: 700;
  font-size: .9375rem;
  color: var(--gold);
  text-shadow: 2px 0 0 var(--ink), -2px 0 0 var(--ink), 0 2px 0 var(--ink), 0 -2px 0 var(--ink);
}
.shot-card__media {
  display: block;
  aspect-ratio: 9 / 20;
  overflow: hidden;
  border-radius: 8px;
  background: var(--ink);
  box-shadow: 0 0 0 3px var(--ink);
}
.shot-card__media img { width: 100%; height: 100%; object-fit: cover; }
.shot-card__title {
  font-family: "Pixelify Sans", sans-serif;
  font-weight: 600;
  font-size: 1.1875rem;
  color: var(--white);
  text-shadow: 2px 2px 0 var(--ink);
}
/* Repli sans JS : pas de bouton, mais le cadre de rareté reste */
.shot-card > .shot-card__media { border: 4px solid var(--r-bd); border-radius: 16px; }

/* ---------- Téléchargement : Coffre Légendaire ---------- */
.chest-card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 16px;
  max-width: 760px;
  margin: 48px auto 0;
  padding: 30px clamp(16px, 4vw, 44px) 34px;
  text-align: center;
  color: var(--white);
  background: var(--r-bg);
  border: 4px solid var(--r-bd);
  border-radius: 18px;
  box-shadow: 0 8px 0 0 var(--ink);
}
.chest-card__art { position: relative; width: 128px; height: 108px; }
.chest-card__chest { width: 120px; height: 100px; margin: 4px auto 0; animation: chest-bob 2.4s steps(4, end) infinite alternate; }
@keyframes chest-bob { to { transform: translateY(-6px); } }
.chest-card__spark {
  position: absolute;
  width: 6px; height: 6px;
  background: var(--gold-title);
  animation: spark 1.8s steps(4, end) infinite;
}
.chest-card__spark--1 { left: -6px; top: 18px; }
.chest-card__spark--2 { right: -10px; top: 4px; animation-delay: .6s; }
.chest-card__spark--3 { right: 6px; bottom: 6px; width: 4px; height: 4px; animation-delay: 1.2s; }
@keyframes spark {
  0% { opacity: 0; transform: translateY(6px); }
  50% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-14px); }
}
.chest-card__name {
  --o: 3px;
  font-family: "Pixelify Sans", sans-serif;
  font-weight: 700;
  font-size: clamp(1.75rem, 4.4vw, 2.5rem);
  text-transform: uppercase;
  color: var(--gold-title);
  text-shadow: var(--o) 0 0 var(--ink), calc(var(--o) * -1) 0 0 var(--ink), 0 var(--o) 0 var(--ink), 0 calc(var(--o) * -1) 0 var(--ink), var(--o) var(--o) 0 var(--ink), calc(var(--o) * -1) var(--o) 0 var(--ink), var(--o) calc(var(--o) * -1) 0 var(--ink), calc(var(--o) * -1) calc(var(--o) * -1) 0 var(--ink);
}
.chest-card__lead { max-width: 44ch; color: #f1e9cf; }
.chest-card__action { margin-top: 6px; }
.dl-meta {
  width: 100%;
  display: grid;
  gap: 12px;
  margin-top: 8px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
}
.dl-meta .stat-pill {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  row-gap: 2px;
  min-height: 64px;
  text-align: left;
}
.dl-meta .stat-pill__icon { grid-row: span 2; }
.dl-meta .stat-pill__label { font-size: .875rem; }
.dl-meta .stat-pill__value { max-width: none; text-align: left; }
.dl-sha {
  max-width: 100%;
  font-size: .8125rem;
  color: #f1e9cf;
  overflow-wrap: anywhere;
}
.dl-sha code {
  display: block;
  margin-top: 4px;
  padding: 6px 10px;
  background: rgba(14, 10, 23, .55);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  color: var(--white);
}
.dl-qr {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-top: 8px;
}
.dl-qr__code {
  padding: 10px;
  background: #f5f1fc;
  box-shadow: 0 -4px 0 0 var(--ink), 0 4px 0 0 var(--ink), -4px 0 0 0 var(--ink), 4px 0 0 0 var(--ink);
  line-height: 0;
}
.dl-qr__code svg, .dl-qr__code img { width: 148px; height: 148px; image-rendering: pixelated; }
.dl-qr__label { font-family: "Pixelify Sans", sans-serif; color: #f1e9cf; }

/* Comment installer */
.howto { max-width: 760px; margin: 40px auto 0; }
.howto__title {
  font-family: "Pixelify Sans", sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  text-transform: uppercase;
  color: var(--gold-text);
}
.howto__steps { display: grid; gap: 16px; margin-top: 20px; }
.howto__steps li { display: flex; align-items: flex-start; gap: 16px; }
.howto__num {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  margin: 3px;
  font-family: "Pixelify Sans", sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--ink);
  background: var(--gold);
  box-shadow: 0 -3px 0 0 var(--ink), 0 3px 0 0 var(--ink), -3px 0 0 0 var(--ink), 3px 0 0 0 var(--ink);
}
.howto__steps li > span:last-child { padding-top: 7px; }
.howto__note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 24px;
  padding: 14px 16px;
  border-left: 4px solid var(--gold);
  background: color-mix(in srgb, var(--gold) 9%, transparent);
  color: var(--text-2);
}
:root[data-theme="light"] .howto__note { border-left-color: #a06a00; }
.howto__note .px-icon { width: 22px; height: 20px; margin-top: 2px; }

/* ---------- Pied de page thématisé ---------- */
.pm-footer {
  background: var(--footer-bg);
  border-top: 3px solid var(--header-line);
}
.pm-footer .footer-title {
  font-family: "Pixelify Sans", sans-serif;
  font-size: 1rem;
  letter-spacing: .08em;
  color: var(--gold-text);
}
.pm-footer__back {
  margin: 0 0 0 -8px;
  font-family: "Pixelify Sans", sans-serif;
  font-weight: 600;
  font-size: 1.125rem;
}
.pm-footer .footer-links a:hover { color: var(--gold-text); }
.pm-footer .footer-bottom { border-top: 2px solid var(--border); }
.pm-footer .to-top .px-icon { width: 14px; height: 16px; color: var(--chevron); }

/* ---------- Lightbox au cadre pixel ---------- */
.lightbox__frame {
  border: 0;
  box-shadow: 0 -6px 0 0 var(--gold-line), 0 6px 0 0 var(--gold-line), -6px 0 0 0 var(--gold-line), 6px 0 0 0 var(--gold-line), 0 14px 0 0 var(--ink);
  transform: scale(.9);
  transition: transform .2s steps(3, end), opacity .15s steps(2, end);
}
.lightbox__btn {
  border-radius: 0;
  border: 0;
  margin: 4px;
  color: var(--gold);
  box-shadow: 0 -3px 0 0 var(--ink), 0 3px 0 0 var(--ink), -3px 0 0 0 var(--ink), 3px 0 0 0 var(--ink);
}
.lightbox__counter { font-family: "Pixelify Sans", sans-serif; font-size: 1.25rem; color: var(--gold); }
.lightbox__cap-title { font-family: "Pixelify Sans", sans-serif; font-size: 1.25rem; color: var(--gold-title); }
.lightbox__img { max-height: calc(100dvh - 200px); }

/* ---------- Reveal 8-bit : par paliers, avec un petit rebond « pop » ---------- */
html.js [data-reveal] { transition: none; }
html.js [data-reveal].is-in { animation: px-pop .5s steps(5, end) var(--rv-delay, 0ms) both; }
@keyframes px-pop {
  0% { opacity: 0; transform: translate3d(var(--rv-x), calc(var(--rv-sign) * var(--rv-dy)), 0) scale(var(--rv-s)); }
  60% { opacity: 1; transform: translate3d(0, calc(var(--rv-sign) * -4px), 0) scale(1.04); }
  100% { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal].is-in { animation: none; }
  .pm-stars i, .pm-platform, .chest-card__chest, .chest-card__spark { animation: none !important; }
  .chest-card__spark { opacity: 1; }
}
