/*
 * City Collect, page d'accueil.
 *
 * Les jetons recopient `apps/mobile/src/theme/` : mêmes couleurs, même rôle pour chacune
 * (bleu = action, jaune = booster, vert = acquis, corail = à faire, violet = ce qui reste à gratter).
 * Rayons : pilule pour tout ce qui se touche, 22 px pour une carte de jeu, 40 px pour un panneau.
 * Mouvement : courbes d'Emil Kowalski, ressorts en `linear()` générés depuis une vraie physique.
 */

:root {
  --paper: #F5F6FB;
  --surface: #FFFFFF;
  --ink: #0F1633;
  --ink-800: #1C2650;
  --ink-700: #2E3A6B;
  --ink-600: #4A5787;
  --ink-500: #6F7CA8;
  --ink-400: #98A3C8;
  --ink-300: #BCC4DE;
  --ink-200: #D9DEEE;
  --ink-100: #EBEEF7;

  --blue: #2A5BFF;
  --blue-deep: #1B3FCC;
  --yellow: #FFC53D;
  --yellow-deep: #E5A81F;
  --green: #22D36B;
  --green-deep: #17A552;
  --green-wash: #DFF8E9;
  --coral: #FF4D6D;
  --coral-deep: #D63656;
  --violet: #6A4DFF;
  --violet-deep: #4F35D9;
  --sky: #5EB2FF;
  --pink: #FF6BC6;
  --orange: #FF8A3D;

  --stage: #1636C9;
  --stage-deep: #0E2597;

  --r-common: #8A96B8;
  --r-uncommon: var(--green);
  --r-rare: var(--blue);
  --r-epic: #B23BFF;
  --r-legendary: #FFAE1A;

  --shadow-float: 0 2px 0 rgba(42, 91, 255, .05), 0 18px 40px -18px rgba(27, 63, 204, .32);
  --shadow-card: 0 26px 50px -22px rgba(15, 22, 51, .55);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  /* Ressort doux (raideur 170, amortissement 18) : 820 ms pour se poser. */
  --spring: linear(0, 0.02, 0.061, 0.119, 0.189, 0.275, 0.355, 0.435, 0.514, 0.588, 0.666, 0.729, 0.786, 0.836, 0.885, 0.922, 0.953, 0.979, 0.999, 1.017, 1.029, 1.038, 1.043, 1.046, 1.048, 1.047, 1.046, 1.042, 1.038, 1.034, 1.029, 1.024, 1.019, 1.015, 1.011, 1.007, 1.004, 1.002, 1, 0.998, 0.997, 0.996, 0.996, 0.996, 0.996, 0.996, 0.996, 0.997, 0.997, 0.998, 0.998, 0.999, 0.999, 0.999, 1, 1, 1, 1, 1, 1, 1);
  --spring-duration: 820ms;

  --gutter: 16px;
  --max: 1200px;
  --radius-card: 22px;
  --radius-panel: 40px;

  color-scheme: light;
}

@media (min-width: 720px) {
  :root { --gutter: 32px; }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.55;
  overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
}

img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: var(--blue); text-decoration-thickness: 2px; text-underline-offset: 3px; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 12px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.display {
  font-family: 'Fredoka', 'Nunito', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: .95;
  margin: 0;
  text-wrap: balance;
}

h2.display { font-size: clamp(42px, 6.2vw, 88px); }

.lead {
  font-size: clamp(19px, 1.7vw, 22px);
  color: var(--ink-700);
  max-width: 34ch;
  margin: 22px 0 0;
  text-wrap: pretty;
}

/* ------------------------------------------------------------------ */
/* Boutons : épais, à tranche, qui s'enfoncent.                        */
/* ------------------------------------------------------------------ */

.btn {
  --face: var(--blue);
  --edge: var(--blue-deep);
  --text: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: var(--face);
  color: var(--text);
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 5px 0 var(--edge), 0 16px 30px -14px color-mix(in srgb, var(--edge) 80%, transparent);
  transition: transform 140ms var(--ease-out), box-shadow 140ms var(--ease-out), background-color 160ms ease;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.btn:disabled { cursor: default; }
.btn[data-swap-action]:disabled { --face: var(--green); --edge: var(--green-deep); --text: var(--ink); }

.btn:active {
  transform: translateY(4px) scale(.98);
  box-shadow: 0 1px 0 var(--edge), 0 6px 14px -10px color-mix(in srgb, var(--edge) 80%, transparent);
}

.btn-yellow { --face: var(--yellow); --edge: var(--yellow-deep); --text: var(--ink); }
.btn-white { --face: var(--surface); --edge: var(--ink-200); --text: var(--ink); }

@media (hover: hover) and (pointer: fine) {
  .btn:hover { filter: brightness(1.04); }
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-float);
  font-weight: 800;
  font-size: 16px;
  line-height: 1.2;
  color: var(--ink);
}

/* ------------------------------------------------------------------ */
/* Barre du haut                                                       */
/* ------------------------------------------------------------------ */

.nav {
  position: sticky;
  top: 12px;
  z-index: 50;
  margin-top: 12px;
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
  padding: 0 10px 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow-float);
}

@supports (backdrop-filter: blur(1px)) {
  .nav-bar { background: rgba(255, 255, 255, .8); backdrop-filter: saturate(1.4) blur(14px); }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
  border-radius: 999px;
}

.brand svg { width: 44px; height: 44px; }

.wordmark {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 23px;
  letter-spacing: -0.01em;
  line-height: 1;
}

.wordmark b { color: var(--blue); font-weight: 700; }

.nav-links {
  display: none;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--ink-700);
  font-weight: 800;
  font-size: 16px;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover { background: var(--ink-100); color: var(--ink); }
}

.nav-soon {
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 900;
  font-size: 15px;
  white-space: nowrap;
}

@media (min-width: 900px) {
  .nav-links { display: flex; }
}

@media (max-width: 420px) {
  .nav-soon { display: none; }
}

/* ------------------------------------------------------------------ */
/* Cartes de jeu                                                       */
/* ------------------------------------------------------------------ */

.card {
  --r: var(--r-common);
  --px: 50%;
  --py: 50%;
  --gx: 50%;
  --gy: 30%;
  position: relative;
  width: var(--w, 240px);
  aspect-ratio: 5 / 7;
  text-align: left;
  border-radius: var(--radius-card);
  background: var(--r);
  box-shadow: 0 4px 0 color-mix(in srgb, var(--r) 72%, var(--ink)), var(--shadow-card);
  container-type: inline-size;
  flex: none;
  /* Le nom et la ligne région · habitants s'empilent dans le flux : un nom sur deux lignes
     (« Le Mont-Saint-Michel ») pousse la ligne du dessous au lieu de la recouvrir. */
  display: flex;
  flex-direction: column;
}

.card[data-rarity="uncommon"] { --r: var(--r-uncommon); }
.card[data-rarity="rare"] { --r: var(--r-rare); }
.card[data-rarity="epic"] { --r: var(--r-epic); }
.card[data-rarity="legendary"] { --r: var(--r-legendary); }

.card-art {
  position: absolute;
  inset: 3cqw;
  border-radius: calc(var(--radius-card) - 6px);
  overflow: hidden;
  background: var(--ink-700);
  isolation: isolate;
}

.card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.card-art::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(15, 22, 51, .66), rgba(15, 22, 51, 0) 44%, rgba(15, 22, 51, 0) 68%, rgba(15, 22, 51, .38));
  z-index: 1;
}

.card-name {
  position: relative;
  z-index: 3;
  /* En cqw sur les enfants : ils se mesurent à la carte, leur conteneur. */
  margin: 7cqw 8cqw 0;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 11.5cqw;
  line-height: 1;
  color: #fff;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 8px rgba(15, 22, 51, .35);
}

.card-sub {
  position: relative;
  z-index: 3;
  margin: 2cqw 8cqw 0;
  font-weight: 800;
  font-size: 4.9cqw;
  line-height: 1.25;
  color: rgba(255, 255, 255, .92);
  text-shadow: 0 1px 6px rgba(15, 22, 51, .45);
}

.card-rarity {
  position: absolute;
  left: 8cqw;
  bottom: 8cqw;
  z-index: 3;
  padding: 1.6cqw 4.4cqw;
  border-radius: 999px;
  background: var(--r);
  color: #fff;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 5.6cqw;
  line-height: 1;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.card[data-rarity="legendary"] .card-rarity,
.card[data-rarity="uncommon"] .card-rarity { color: var(--ink); }

/* Holographique : bandes arc-en-ciel qui glissent sous la lumière, reflet qui suit le doigt. */
.card-holo,
.card-glare {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.card-holo {
  background: repeating-linear-gradient(115deg,
    rgba(255, 107, 198, .0) 0%,
    rgba(255, 107, 198, .55) 5%,
    rgba(94, 178, 255, .55) 10%,
    rgba(34, 211, 107, .5) 15%,
    rgba(255, 197, 61, .5) 20%,
    rgba(178, 59, 255, .45) 25%,
    rgba(255, 107, 198, .0) 30%);
  background-size: 260% 260%;
  background-position: var(--px) var(--py);
  mix-blend-mode: color-dodge;
  opacity: .7;
}

.card-glare {
  background: radial-gradient(farthest-corner circle at var(--gx) var(--gy), rgba(255, 255, 255, .6), rgba(255, 255, 255, 0) 42%);
  mix-blend-mode: overlay;
}

.card-sparkle {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image:
    radial-gradient(circle, #fff 0 1.2px, transparent 1.6px),
    radial-gradient(circle, #fff 0 1px, transparent 1.4px);
  background-size: 37px 41px, 53px 47px;
  background-position: calc(var(--px) * .4) calc(var(--py) * .4), calc(var(--px) * -.3) calc(var(--py) * .6);
  opacity: .55;
  mix-blend-mode: overlay;
}

/* Le dos : la marque sur le bleu de l'action. */
.card-back {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-card);
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 55%),
    radial-gradient(circle, rgba(255, 255, 255, .14) 0 2px, transparent 2.5px) 0 0 / 18px 18px,
    var(--blue);
  border: 3cqw solid #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 0 var(--ink-200), var(--shadow-card);
}

.card-back svg { width: 58%; filter: drop-shadow(0 6px 10px rgba(14, 37, 151, .4)); }

/* ------------------------------------------------------------------ */
/* Ouverture de page                                                   */
/* ------------------------------------------------------------------ */

.hero {
  position: relative;
  padding-top: 40px;
  padding-bottom: 24px;
}

.hero-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(46px, 12.8vw, 104px);
  line-height: .9;
}

.hero h1 .line {
  display: block;
  overflow: hidden;
  padding-bottom: .06em;
  margin-bottom: -.06em;
}

.hero h1 .line > span {
  display: block;
  animation: rise 900ms var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 90ms + 80ms);
}

.hero h1 .line:nth-child(2) { color: var(--blue); }

@keyframes rise {
  from { transform: translateY(105%); }
  to { transform: translateY(0); }
}

.hero .lead {
  animation: fade-up 700ms var(--ease-out) 360ms both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin-top: 32px;
  animation: fade-up 700ms var(--ease-out) 460ms both;
}

.hero-soon {
  color: var(--ink-600);
  font-weight: 800;
  font-size: 16px;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* L'éventail : trois vraies cartes, qui se distribuent puis s'ouvrent. */
.fan-zone {
  position: relative;
  height: clamp(360px, 100vw, 520px);
  perspective: 1100px;
  touch-action: pan-y;
}

.fan {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  will-change: transform;
}

.fan .card {
  --w: clamp(170px, 46vw, 270px);
  position: absolute;
  left: 50%;
  top: 50%;
  margin: calc(var(--w) * -0.7) 0 0 calc(var(--w) * -0.5);
  transform-origin: 50% 120%;
  animation: deal var(--spring-duration) var(--spring) both;
}

.fan .card:nth-child(1) { --to: translate(-30%, 4%) rotate(-14deg); animation-delay: 420ms; }
.fan .card:nth-child(2) { --to: translate(30%, 4%) rotate(13deg); animation-delay: 480ms; }
.fan .card:nth-child(3) { --to: translate(0, -2%) rotate(-1.5deg); animation-delay: 540ms; }

@keyframes deal {
  from { transform: translateY(46%) scale(.92) rotate(0deg); opacity: 0; }
  12% { opacity: 1; }
  to { transform: var(--to); opacity: 1; }
}

.fan .card:nth-child(3) { transform: var(--to); }

.fan-chip {
  position: absolute;
  z-index: 5;
  animation: pop 520ms var(--spring) both;
}

.fan-chip.is-booster { right: 2%; top: 12%; animation-delay: 1050ms; background: var(--yellow); }
.fan-chip.is-visited { left: 0; bottom: 14%; animation-delay: 1180ms; }

.fan-chip .dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green);
  color: var(--ink);
}

.notif {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  border: 3px solid #fff;
  font-size: 13px;
  font-weight: 900;
  line-height: 20px;
  text-align: center;
  animation: beat 1.6s var(--ease-out) 1.8s infinite;
}

@keyframes beat {
  0%, 60%, 100% { transform: scale(1); }
  20% { transform: scale(1.18); }
  40% { transform: scale(.96); }
}

@keyframes pop {
  from { opacity: 0; transform: scale(.9) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@media (min-width: 960px) {
  .hero { padding-top: 24px; padding-bottom: 64px; min-height: calc(100dvh - 76px); display: grid; align-items: center; }
  .hero-grid { grid-template-columns: 1.12fr .88fr; gap: 24px; }
  .hero h1 { font-size: clamp(80px, 7.8vw, 112px); }
  .fan-zone { height: 580px; }
  .fan .card { --w: 280px; }
  .fan-chip.is-visited { left: -4%; }
}

/* ------------------------------------------------------------------ */
/* Sections                                                            */
/* ------------------------------------------------------------------ */

.section { padding: 72px 0; }

@media (min-width: 960px) {
  .section { padding: 140px 0; }
}

/* La carte à gratter, aux vraies limites des communes autour de Bordeaux. */
.fog-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

@media (min-width: 960px) {
  .fog-grid { grid-template-columns: .8fr 1.2fr; gap: 64px; }
}

.fog-panel {
  position: relative;
  padding: 10px;
  border-radius: var(--radius-panel);
  background: var(--surface);
  box-shadow: var(--shadow-float);
}

.fog-map {
  position: relative;
  border-radius: calc(var(--radius-panel) - 10px);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--violet);
}

.fog-map svg {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
  cursor: crosshair;
}

.fog-zones path {
  fill: var(--violet);
  stroke: rgba(255, 255, 255, .34);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
  transition: fill 420ms var(--ease-out), stroke 420ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .fog-zones path:not(.is-open):hover { fill: #7A60FF; }
}

.fog-zones path.is-open {
  fill: var(--green-wash);
  stroke: var(--green);
  stroke-width: 2;
}

.fog-rings path {
  fill: none;
  stroke: #fff;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
  transform-box: fill-box;
  transform-origin: center;
  animation: ring 700ms var(--ease-out) forwards;
}

@keyframes ring {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(1.12); }
}

.fog-labels text {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 13px;
  fill: var(--ink);
  text-anchor: middle;
  paint-order: stroke;
  stroke: var(--green-wash);
  stroke-width: 4px;
  stroke-linejoin: round;
  pointer-events: none;
  animation: label-in 360ms var(--ease-out) both;
}

@media (max-width: 719px) {
  .fog-map { aspect-ratio: 1; }
  .fog-labels text { font-size: 20px; stroke-width: 5px; }
  .fog-labels text.is-big { font-size: 30px !important; }
}

.fog-labels text.is-big { font-size: 22px; font-family: 'Fredoka', sans-serif; font-weight: 700; }

@keyframes label-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fog-me {
  position: absolute;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  background: var(--sky);
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(15, 22, 51, .3);
  pointer-events: none;
  opacity: 0;
  transform: scale(.9);
  transition: opacity 240ms var(--ease-out), transform 240ms var(--ease-out);
}

.fog-me.is-on { opacity: 1; transform: scale(1); }

.fog-me::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 3px solid var(--sky);
  animation: locate 2s var(--ease-out) infinite;
}

@keyframes locate {
  from { transform: scale(1); opacity: .8; }
  to { transform: scale(3.2); opacity: 0; }
}

.fog-toast {
  position: absolute;
  z-index: 4;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 900;
  font-size: 15px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 3px 0 var(--yellow-deep), 0 10px 20px -8px rgba(15, 22, 51, .4);
}

.fog-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 8px 4px;
}

.fog-count {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 17px;
}

.fog-count b {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--green);
  color: var(--ink);
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 20px;
}

.fog-count b.is-tick { animation: tick 360ms var(--spring); }

@keyframes tick {
  from { transform: scale(1.22); }
  to { transform: scale(1); }
}

.link-btn {
  border: 0;
  background: none;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--blue);
  font-weight: 900;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 160ms ease, transform 140ms var(--ease-out);
}

.link-btn:active { transform: scale(.97); }

@media (hover: hover) and (pointer: fine) {
  .link-btn:hover { background: var(--ink-100); }
}

.fog-hint {
  margin: 28px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--violet-deep);
  font-weight: 900;
}

.fog-hint i {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--violet);
  flex: none;
}

/* ------------------------------------------------------------------ */
/* La scène du booster : le seul décor sombre, bleu profond.           */
/* ------------------------------------------------------------------ */

.stage {
  position: relative;
  margin: 0 8px;
  border-radius: 48px;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(94, 178, 255, .28), rgba(94, 178, 255, 0) 60%),
    var(--stage);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}

@media (min-width: 720px) {
  .stage { margin: 0 16px; border-radius: 64px; }
}

.stage .display { color: #fff; font-size: clamp(40px, 5.4vw, 76px); }
.stage.section { padding-top: 88px; padding-bottom: 72px; }
.stage .lead { color: rgba(255, 255, 255, .78); margin-left: auto; margin-right: auto; }

.stage-head {
  text-align: center;
  display: grid;
  justify-items: center;
}

.opener {
  position: relative;
  margin-top: 28px;
  display: grid;
  justify-items: center;
}

.opener-stage {
  position: relative;
  width: 100%;
  height: clamp(430px, 116vw, 500px);
  display: grid;
  place-items: center;
  perspective: 1200px;
}

.pack {
  --w: min(250px, 62vw);
  position: relative;
  width: var(--w);
  aspect-ratio: 5 / 7.6;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  will-change: transform;
}

.pack:active { cursor: grabbing; }

.pack-top,
.pack-body {
  position: absolute;
  left: 0;
  right: 0;
  background: linear-gradient(160deg, #FFD978, var(--yellow) 40%, #FFB524);
  overflow: hidden;
}

.pack-top {
  top: 0;
  height: 13%;
  border-radius: 14px 14px 0 0;
}

.pack-body {
  top: 13%;
  bottom: 0;
  border-radius: 0 0 22px 22px;
  box-shadow: 0 6px 0 var(--yellow-deep), 0 30px 60px -24px rgba(5, 12, 60, .7);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  padding-bottom: 8%;
}

/* Dents du sachet, en haut et en bas. */
.pack-top::before,
.pack-body::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 10px;
  background: linear-gradient(135deg, var(--stage) 33%, transparent 33.5%) 0 0 / 14px 10px repeat-x,
              linear-gradient(225deg, var(--stage) 33%, transparent 33.5%) 0 0 / 14px 10px repeat-x;
}

.pack-top::before { top: 0; }

/* En bas, pas de dents : une soudure jaune striée, comme le bas d'un vrai sachet. */
.pack-body::after {
  bottom: 0;
  height: 16px;
  border-radius: 0 0 22px 22px;
  background: repeating-linear-gradient(90deg, rgba(15, 22, 51, .1) 0 2px, transparent 2px 7px), var(--yellow-deep);
}

.pack-sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, .55) 48%, rgba(255, 255, 255, 0) 58%);
  transform: translateX(-120%);
  animation: sheen 3.6s var(--ease-in-out) 1s infinite;
}

@keyframes sheen {
  0% { transform: translateX(-120%); }
  45%, 100% { transform: translateX(120%); }
}

.pack-logo {
  width: 46%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 5px 0 var(--yellow-deep);
  margin-bottom: 10px;
}

.pack-logo svg { width: 82%; }

.pack-title {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: calc(var(--w) * .15);
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.pack-sub {
  font-weight: 900;
  font-size: calc(var(--w) * .06);
  color: var(--ink-700);
}

.pack-cut {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 13%;
  height: 0;
  border-top: 3px dashed rgba(15, 22, 51, .35);
  z-index: 3;
}

.pack-cut-fill {
  position: absolute;
  left: 0;
  right: 0;
  top: -3px;
  height: 3px;
  border-radius: 3px;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left;
  box-shadow: 0 0 10px #fff;
}

.pack-finger {
  position: absolute;
  top: -11px;
  left: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, .3);
  animation: finger 2.4s var(--ease-in-out) 1.2s infinite;
  opacity: 0;
}

@keyframes finger {
  0% { transform: translateX(0) scale(.9); opacity: 0; }
  12% { opacity: 1; transform: translateX(0) scale(1); }
  60% { transform: translateX(calc(var(--w) * .8)); opacity: 1; }
  75%, 100% { transform: translateX(calc(var(--w) * .8)); opacity: 0; }
}

.opener[data-state="pack"] .pack-finger { opacity: 1; }
.opener:not([data-state="pack"]) .pack-finger,
.pack.is-cutting .pack-finger { display: none; }

/* Une fois ouvert, le sachet invisible glisse sous la scène : il ne doit plus rien intercepter,
   sinon il couvre le bouton « Carte suivante ». */
.opener:not([data-state="pack"]) .pack { pointer-events: none; }
.opener[data-state="stack"] .pack,
.opener[data-state="done"] .pack { visibility: hidden; }

.deck {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.deck-card {
  --w: min(260px, 64vw);
  container-type: inline-size;
  position: absolute;
  width: var(--w);
  aspect-ratio: 5 / 7;
  pointer-events: none;
  transition: transform 320ms var(--ease-out), opacity 240ms var(--ease-out);
  will-change: transform;
  touch-action: none;
}

.deck-card.is-top { pointer-events: auto; cursor: grab; }
.deck-card.is-dragging { transition: none; cursor: grabbing; }

.flip {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 700ms var(--spring);
}

.flip > * {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.flip .card { --w: 100%; width: 100%; }
.flip .card-back { transform: rotateY(180deg); }

/* La carte rare arrive de dos : c'est le seul suspense du booster. */
.deck-card[data-face="back"] .flip { transform: rotateY(180deg); }

.deck-card.is-teasing .flip {
  animation: tease 1.4s var(--ease-in-out) infinite;
}

.deck-card.is-teasing .card-back {
  box-shadow: 0 0 0 4px var(--r-epic), 0 0 60px 10px rgba(178, 59, 255, .75), var(--shadow-card);
}

@keyframes tease {
  0%, 70%, 100% { transform: rotateY(180deg) rotate(0deg); }
  76% { transform: rotateY(180deg) rotate(-3deg); }
  82% { transform: rotateY(180deg) rotate(3deg); }
  88% { transform: rotateY(180deg) rotate(-2deg); }
  94% { transform: rotateY(180deg) rotate(1deg); }
}

.burst {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 0;
}

.burst-rays {
  position: absolute;
  left: -380px;
  top: -380px;
  width: 760px;
  height: 760px;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, .5) 0deg 7deg, rgba(255, 255, 255, 0) 7deg 20deg);
  -webkit-mask: radial-gradient(circle, #000 12%, transparent 62%);
  mask: radial-gradient(circle, #000 12%, transparent 62%);
  opacity: 0;
}

.burst-bit {
  position: absolute;
  left: -6px;
  top: -6px;
  width: 12px;
  height: 12px;
  border-radius: 4px;
}

.reveal-word {
  position: absolute;
  left: 50%;
  top: -14px;
  z-index: 200;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: clamp(40px, 9vw, 64px);
  color: #fff;
  text-shadow: 0 4px 0 var(--r-epic), 0 10px 30px rgba(178, 59, 255, .7);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 0);
}

.opener-bar {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin-top: 8px;
}

.opener-hint {
  margin: 0;
  min-height: 1.5em;
  color: rgba(255, 255, 255, .78);
  font-weight: 800;
  text-align: center;
}

.recap {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: center;
  gap: clamp(8px, 2vw, 18px);
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 0 4px;
}

.recap[hidden] { display: none; }

.recap .card {
  --w: 100%;
  animation: recap-in 520ms var(--spring) both;
  animation-delay: calc(var(--i) * 50ms);
}

@keyframes recap-in {
  from { opacity: 0; transform: translateY(24px) scale(.94); }
  to { opacity: 1; transform: none; }
}

.recap .card-rarity { font-size: 7cqw; }
.recap .card-sub { display: none; }
.recap .card-name { font-size: 13cqw; }

/* ------------------------------------------------------------------ */
/* Les raretés                                                         */
/* ------------------------------------------------------------------ */

.rarity-head { text-align: center; display: grid; justify-items: center; }

.rarity-row {
  display: flex;
  gap: 18px;
  margin: 56px calc(var(--gutter) * -1) 0;
  padding: 24px var(--gutter) 32px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.rarity-row::-webkit-scrollbar { display: none; }

.rarity-item {
  flex: none;
  align-content: start;
  width: min(62vw, 230px);
  scroll-snap-align: center;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 18px;
}

.rarity-item .card { --w: 100%; }

.rarity-tilt {
  width: 100%;
  transition: transform 260ms var(--ease-out);
}

.rarity-label {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
  color: var(--c);
}

.rarity-odds {
  margin: -8px 0 0;
  color: var(--ink-600);
  font-size: 16px;
  max-width: 22ch;
}

@media (min-width: 1000px) {
  .rarity-row {
    justify-content: center;
    overflow: visible;
    margin: 64px 0 0;
    padding: 0;
    gap: 0;
  }
  .rarity-item { width: 216px; margin: 0 -6px; }
  .rarity-item:nth-child(1) { --arc: translateY(34px) rotate(-9deg); }
  .rarity-item:nth-child(2) { --arc: translateY(10px) rotate(-4.5deg); }
  .rarity-item:nth-child(3) { --arc: translateY(0) rotate(0deg); }
  .rarity-item:nth-child(4) { --arc: translateY(10px) rotate(4.5deg); }
  .rarity-item:nth-child(5) { --arc: translateY(34px) rotate(9deg); }
  .rarity-tilt { transform: var(--arc); margin-bottom: 36px; }
  .rarity-row.is-dealt .rarity-tilt { transition: transform 300ms var(--ease-out); }

  .js .rarity-row:not(.is-dealt) .rarity-tilt {
    transform: translateX(var(--from, 0)) translateY(60px) rotate(0deg) scale(.94);
    opacity: 0;
  }
  .js .rarity-row .rarity-tilt {
    transition: transform var(--spring-duration) var(--spring), opacity 300ms var(--ease-out);
    transition-delay: calc(var(--i) * 60ms);
  }
  .rarity-item:nth-child(1) { --from: 440px; --i: 4; }
  .rarity-item:nth-child(2) { --from: 220px; --i: 3; }
  .rarity-item:nth-child(3) { --from: 0px; --i: 2; }
  .rarity-item:nth-child(4) { --from: -220px; --i: 1; }
  .rarity-item:nth-child(5) { --from: -440px; --i: 0; }
}

@media (min-width: 1000px) and (hover: hover) and (pointer: fine) {
  .rarity-row.is-dealt .rarity-item:hover .rarity-tilt { transform: translateY(-18px) rotate(0deg) scale(1.04); transition-delay: 0ms; }
  .rarity-item:hover { position: relative; z-index: 2; }
}

.holo-note {
  margin: 40px auto 0;
  display: flex;
  justify-content: center;
}

/* ------------------------------------------------------------------ */
/* Le sablier, piloté par le défilement.                               */
/* ------------------------------------------------------------------ */

.walk { position: relative; }

/* Collant sur grand écran seulement ; sur téléphone la section défile normalement. */
.walk-sticky {
  position: relative;
  padding: 72px 0 150px;
  overflow: hidden;
}

@media (min-width: 960px) and (min-height: 640px) {
  .walk { height: 260vh; }
  .walk-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    padding: 0;
    display: grid;
    align-items: center;
  }
}

.walk-grid {
  display: grid;
  gap: 32px;
  align-items: center;
}

@media (min-width: 960px) {
  .walk-grid { grid-template-columns: 1fr 1fr; gap: 64px; }
}

.walk-panel {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 34px 20px;
  border-radius: var(--radius-panel);
  background: var(--surface);
  box-shadow: var(--shadow-float);
  z-index: 2;
}

.timer {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: clamp(46px, 11vw, 80px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.hourglass { width: .62em; height: .9em; flex: none; }
.hourglass .sand-top { transform-box: fill-box; transform-origin: 50% 100%; }
.hourglass .sand-bottom { transform-box: fill-box; transform-origin: 50% 100%; }

.steps {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--green-wash);
  color: var(--green-deep);
  font-weight: 900;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.steps b { color: var(--ink); }

.floor-badge {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 900;
  font-size: 15px;
  opacity: 0;
  transform: translateY(6px) scale(.96);
  transition: opacity 240ms var(--ease-out), transform 240ms var(--ease-out);
}

.floor-badge.is-on { opacity: 1; transform: none; }

.prints {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.prints svg { width: 100%; height: 100%; }

.prints .print {
  fill: var(--ink-300);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 200ms var(--ease-out);
}

.prints .print.is-on { opacity: .55; }
.prints .print.is-last { fill: var(--green); opacity: 1; }

.walk-facts {
  display: grid;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.walk-facts li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  color: var(--ink-700);
}

.walk-facts b {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  color: var(--ink);
  font-size: 22px;
  min-width: 2.6ch;
}

/* ------------------------------------------------------------------ */
/* La bataille de villes                                               */
/* ------------------------------------------------------------------ */

.battle-head { max-width: 760px; }

.arena {
  margin-top: 48px;
  padding: 12px;
  border-radius: var(--radius-panel);
  background: var(--surface);
  box-shadow: var(--shadow-float);
}

.arena-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 16px;
}

.side {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.side.is-red { flex-direction: row-reverse; text-align: right; }

.side img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--blue);
  flex: none;
}

.side.is-red img { border-color: var(--coral); }

@media (max-width: 560px) {
  .side img { display: none; }
  .side-name { font-size: 20px; }
  .side-count { font-size: 13px; }
  .vs { width: 40px; height: 40px; font-size: 16px; }
}

.side-name {
  display: block;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: clamp(20px, 3vw, 30px);
  line-height: 1;
}

.side-count {
  display: block;
  font-weight: 900;
  font-size: 15px;
  color: var(--ink-600);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.vs {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 20px;
}

.arena-field {
  position: relative;
  border-radius: calc(var(--radius-panel) - 12px);
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 60%),
    #E7F7EC;
  height: clamp(260px, 44vw, 380px);
}

.arena-field canvas { display: block; width: 100%; height: 100%; }

.arena-caption {
  position: absolute;
  left: 50%;
  top: 14px;
  transform: translateX(-50%);
  max-width: calc(100% - 24px);
  padding: 8px 16px;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow-float);
  font-weight: 900;
  font-size: 15px;
  text-align: center;
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
}

.arena-caption:empty { opacity: 0; transform: translateX(-50%) translateY(-6px); }

.arena-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 8px 8px;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 20px 0 12px;
  border: 3px solid var(--ink-100);
  border-radius: 999px;
  background: #fff;
  font-weight: 900;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--ink-200);
  transition: transform 140ms var(--ease-out), box-shadow 140ms var(--ease-out), border-color 160ms ease, background-color 160ms ease;
}

.toggle:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink-200); }

.toggle .box {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--ink-200);
  display: grid;
  place-items: center;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.toggle .box svg { width: 16px; opacity: 0; transform: scale(.8); transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out); }

.toggle[aria-pressed="true"] { border-color: var(--green); background: var(--green-wash); box-shadow: 0 4px 0 var(--green-deep); }
.toggle[aria-pressed="true"] .box { background: var(--green); border-color: var(--green); }
.toggle[aria-pressed="true"] .box svg { opacity: 1; transform: none; }

.arena-result {
  margin: 0;
  padding: 6px 12px 12px;
  text-align: center;
  font-weight: 900;
  min-height: 2.2em;
  color: var(--ink-700);
}

.rules {
  display: grid;
  gap: 14px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 760px) {
  .rules { grid-template-columns: 1fr 1fr; gap: 16px 40px; }
}

.rules li {
  display: flex;
  gap: 16px;
  align-items: center;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: clamp(21px, 2.3vw, 27px);
  line-height: 1.15;
}

.rules i {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--c);
  color: #fff;
  font-style: normal;
  font-family: 'Fredoka', sans-serif;
  font-size: 19px;
  font-weight: 700;
  box-shadow: 0 4px 0 color-mix(in srgb, var(--c) 72%, var(--ink));
}

/* ------------------------------------------------------------------ */
/* Entre amis                                                          */
/* ------------------------------------------------------------------ */

.friends-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

@media (min-width: 960px) {
  .friends-grid { grid-template-columns: 1.1fr .9fr; gap: 64px; }
  .friends-grid > .friends-copy { order: 2; }
}

.swap {
  position: relative;
  padding: 26px 16px 22px;
  border-radius: var(--radius-panel);
  background: var(--surface);
  box-shadow: var(--shadow-float);
  display: grid;
  gap: 18px;
}

.hand {
  display: grid;
  gap: 10px;
}

.hand-who {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 16px;
}

.hand-who .avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  background: var(--c);
}

.hand-cards {
  display: flex;
  justify-content: center;
  gap: 10px;
  min-height: 150px;
}

.hand-cards .card { --w: clamp(84px, 24vw, 128px); }
.hand-cards .card-sub { display: none; }
.hand-cards .card-rarity { font-size: 7.5cqw; }
.hand-cards .card-name { font-size: 13cqw; }

.hand-cards .card.is-picked {
  outline: 4px solid var(--yellow);
  outline-offset: 3px;
}

.dup {
  position: absolute;
  top: -8px;
  right: -8px;
  z-index: 4;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  border: 3px solid #fff;
  font-size: 13px;
  font-weight: 900;
}

.swap-mid {
  display: flex;
  justify-content: center;
}

.friends-list {
  display: grid;
  gap: 18px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.friends-list li {
  display: grid;
  gap: 2px;
}

.friends-list strong {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 1.1;
}

.friends-list span { color: var(--ink-600); }

/* ------------------------------------------------------------------ */
/* La promesse                                                         */
/* ------------------------------------------------------------------ */

.promise { text-align: center; }

.promise .display {
  font-size: clamp(44px, 8vw, 120px);
  max-width: 13ch;
  margin: 0 auto;
}

.promise .w {
  display: inline-block;
  transition: transform 700ms var(--ease-out), opacity 500ms var(--ease-out);
  transition-delay: calc(var(--i) * 45ms);
}

.js .promise:not(.is-in) .w { opacity: 0; transform: translateY(.4em); }

.promise .w.is-walk { color: var(--green-deep); }

.promise-body {
  margin: 32px auto 0;
  max-width: 46ch;
  font-size: 20px;
  color: var(--ink-700);
}

/* ------------------------------------------------------------------ */
/* Fin de page                                                         */
/* ------------------------------------------------------------------ */

.outro {
  text-align: center;
  display: grid;
  justify-items: center;
  padding-bottom: 72px;
}

.outro-mark {
  width: clamp(150px, 30vw, 220px);
  margin-bottom: 18px;
}

.outro-mark .m-left,
.outro-mark .m-right {
  transform-box: view-box;
  transform-origin: 50px 70px;
  transition: transform var(--spring-duration) var(--spring);
}

.outro-mark .m-pin {
  transition: transform 700ms var(--spring), opacity 200ms var(--ease-out);
}

.js .outro:not(.is-in) .m-left { transform: rotate(18deg); }
.js .outro:not(.is-in) .m-right { transform: rotate(-16deg); }
.js .outro:not(.is-in) .m-pin { transform: translateY(-26px); opacity: 0; }

.outro h2 { font-size: clamp(48px, 8.5vw, 116px); }
.outro h2 b { display: block; color: var(--blue); font-weight: 700; }

.stores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.store {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 12px 24px;
  border-radius: 20px;
  background: var(--ink);
  color: #fff;
  line-height: 1.15;
  text-align: left;
}

.store small { font-size: 13px; color: var(--ink-300); font-weight: 800; }
.store span { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 22px; }

.footer {
  padding: 36px 0 48px;
  border-top: 2px solid var(--ink-100);
}

.footer-grid {
  display: grid;
  gap: 22px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 2px solid var(--ink-100);
  box-shadow: 0 3px 0 var(--ink-200);
  color: var(--ink);
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
  transition: transform 120ms var(--ease-out), box-shadow 120ms var(--ease-out), color 160ms ease;
}

.footer-links a:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink-200); }

@media (hover: hover) and (pointer: fine) {
  .footer-links a:hover { color: var(--blue); }
}

.fine { margin: 0; color: var(--ink-600); font-size: 15px; }

.credits summary {
  cursor: pointer;
  font-weight: 900;
  color: var(--ink-700);
  font-size: 15px;
  border-radius: 8px;
}

.credits ul {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  columns: 2 280px;
  column-gap: 32px;
  font-size: 14px;
  color: var(--ink-600);
}

.credits li { break-inside: avoid; margin-bottom: 6px; }
.credits a { color: var(--ink-700); }

/* ------------------------------------------------------------------ */
/* Mouvement réduit : on garde les fondus et les couleurs, on retire   */
/* tout déplacement.                                                   */
/* ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  .hero h1 .line > span,
  .hero .lead,
  .hero-actions,
  .fan-chip { animation: fade 300ms ease both; }
  .fan .card { animation: fade 300ms ease both; transform: var(--to); }
  .notif,
  .pack-sheen,
  .pack-finger,
  .fog-me::after,
  .deck-card.is-teasing .flip { animation: none; }
  .fog-rings path { animation: fade-out 400ms ease forwards; }
  .flip { transition: none; }
  .recap .card { animation: fade 300ms ease both; }
  .promise .w { transition: opacity 400ms ease; transform: none !important; }
  .js .rarity-row .rarity-tilt { transition: opacity 400ms ease; }
  .js .rarity-row:not(.is-dealt) .rarity-tilt { transform: var(--arc); }
  .outro-mark .m-left,
  .outro-mark .m-right,
  .outro-mark .m-pin { transition: opacity 300ms ease; }
  .js .outro:not(.is-in) .m-left,
  .js .outro:not(.is-in) .m-right,
  .js .outro:not(.is-in) .m-pin { transform: none; }
}

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }
