/* === Name overlay on collection grid thumbnails === */
.grid .thumb {
  position: relative;
}
.grid .thumb .name-overlay {
  position: absolute;
  top: 8px;
  left: 10px;
  z-index: 2;
  pointer-events: none;
  font-family: "KohLantaFont", Inter, system-ui, Segoe UI, Roboto, Helvetica,
    Arial, sans-serif;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 16px;
  color: #ffe3a3;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}
.booster-card .name-overlay {
  position: absolute;
  top: 18px;
  left: 22px;
  font-family: "KohLantaFont", sans-serif;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 26px;
  color: #ffe3a3;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
  pointer-events: none;
  z-index: 3;
}
@font-face {
  font-family: "KohLantaFont";
  src: url("/assets/fonts/font-kl-gras.ttf") format("truetype");
  font-display: swap;
}

body {
  font-family: "KohLantaFont", sans-serif;
}

.fs-title,
.card-title,
.booster-label {
  font-family: "KohLantaFont", sans-serif;
  letter-spacing: 0.5px;
}

:root {
  --bg: #081a17; /* jungle night */
  --fg: #f1f5f4; /* light sand */
  --muted: #b7c6c1; /* driftwood */
  --card: #0f241f; /* deep jungle */
  --accent: #f6b73c; /* tiki gold */
  --grid-gap: 14px;
  --radius: 14px;
}
:root {
  --tile-w: 330px; /* largeur d'une carte révélée */
  --tile-h: 465px; /* hauteur d'une carte révélée */
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  background: radial-gradient(
      120% 100% at 10% 0%,
      rgba(19, 55, 49, 0.6),
      transparent 60%
    ),
    radial-gradient(
      120% 100% at 120% 0%,
      rgba(7, 31, 45, 0.55),
      transparent 60%
    ),
    linear-gradient(180deg, #071613 0%, #0a201a 45%, #0b241e 100%);
  color: var(--fg);
  font-family: Inter, system-ui, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: saturate(140%) blur(8px);
  background: linear-gradient(
    180deg,
    rgba(10, 28, 24, 0.92),
    rgba(10, 28, 24, 0.6)
  );
  padding: 10px 16px;
  border-bottom: 1px solid #13332b;
  display: flex;
  align-items: center;
  gap: 16px;
}
.topbar h1 {
  margin: 0;
  width: 370px;
}
.controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
}
.controls input,
.controls select {
  background: #0f1420;
  color: var(--fg);
  border: 1px solid #1f2736;
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
}
.controls input::placeholder {
  color: #76839b;
}
.chk {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #cbd5e1;
}

main {
  padding: 16px;
}
.stats {
  display: flex;
  gap: 14px;
  color: var(--muted);
  margin-bottom: 8px;
  font-size: 14px;
  z-index: 1;
  position: relative;
}

.actions details {
  background: #0f1420;
  border: 1px solid #1f2736;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 14px;
}
.actions summary {
  cursor: pointer;
  color: #cfe3ff;
}
.booster {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.booster button {
  background: var(--accent);
  color: #001430;
  border: 0;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}
.pack-result {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--grid-gap);
}

.card {
  background: repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.02) 0 2px,
      rgba(0, 0, 0, 0.02) 2px 4px
    ),
    #0f241f;
  border: none;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.thumb {
  aspect-ratio: 63 / 88;
  background: #0f1420;
  display: grid;
  place-items: center;
  position: relative;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.meta {
  padding: 10px 12px;
  display: grid;
  gap: 6px;
}
.title {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
}
.sub {
  color: #a9b2c0;
  font-size: 12px;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #2a3650;
  color: #cfe3ff;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.qty {
  display: flex;
  align-items: center;
  gap: 6px;
}
.qty button {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid #2a3650;
  background: #0f1420;
  color: #e6f0ff;
  cursor: pointer;
}
.qty .n {
  min-width: 22px;
  text-align: center;
  color: #cfe3ff;
}
.badge {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid #36415e;
  color: #ffd28a;
}
footer {
  color: #8391a7;
  text-align: center;
  padding: 40px 0;
}

/* Booster stage */
.booster-stage {
  margin: 14px 0 20px;
  display: grid;
  gap: 14px;
}
.pack-area {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
#booster-set {
  background: #0f1420;
  color: #fff;
  border: 1px solid #1f2736;
  border-radius: 10px;
  padding: 8px 10px;
}

/* Booster visuel (SVG/CSS) */
.pack {
  width: 180px;
  height: 260px;
  border-radius: 16px;
  position: relative;
  cursor: pointer;
  background: radial-gradient(120% 150% at 50% -10%, #4dabf7 0%, #0b0e14 60%),
    #0b0e14;
  border: 1px solid #233045;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5),
    inset 0 0 40px rgba(255, 255, 255, 0.06);
  display: grid;
  place-items: center;
  user-select: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.pack:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6),
    inset 0 0 60px rgba(255, 255, 255, 0.08);
}
.pack:active {
  transform: translateY(0) scale(0.99);
}
.pack .foil {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.14),
      rgba(255, 255, 255, 0) 60%
    ),
    conic-gradient(
      from 0deg,
      rgba(255, 0, 128, 0.18),
      rgba(0, 255, 255, 0.18),
      rgba(255, 255, 0, 0.18),
      rgba(255, 0, 128, 0.18)
    );
  mix-blend-mode: screen;
  filter: blur(1px);
  opacity: 0.7;
  animation: shimmer 3s linear infinite;
}
@keyframes shimmer {
  0% {
    filter: hue-rotate(0deg) brightness(1);
  }
  100% {
    filter: hue-rotate(360deg) brightness(1);
  }
}
.pack .label {
  text-align: center;
  position: relative;
  z-index: 1;
  color: #e7f0ff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(15, 20, 32, 0.6);
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #2a3650;
}

/* Couloir de révélation */
.reveal-lane {
  min-height: 280px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  perspective: 1200px;
}

/* Carte révélée (tuile animée) */
.reveal-card {
  width: var(--tile-w);
  height: var(--tile-h);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  border: 1px solid #26314a;
  background: #101522;
  transform-style: preserve-3d;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

/* face cachée */
.reveal-card .back,
.reveal-card .front {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 14px;
}
.reveal-card .back {
  background: repeating-linear-gradient(
    135deg,
    #0f1420 0 10px,
    #121b2b 10px 20px
  );
  color: #9fb7ff;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid #2a3650;
}
.reveal-card .front {
  transform: rotateY(180deg);
}

/* halos selon rareté */
.rarity-ring {
  position: absolute;
  inset: -2px;
  border-radius: 14px;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.85;
}
.rarity-ring.rarity-Common {
  box-shadow: inset 0 0 0 2px #3b4255, 0 0 20px rgba(59, 66, 85, 0.35);
}
.rarity-ring.rarity-Uncommon {
  box-shadow: inset 0 0 0 2px #4dabf7, 0 0 26px rgba(77, 171, 247, 0.45);
}
.rarity-ring.rarity-Rare {
  box-shadow: inset 0 0 0 2px #f5b942, 0 0 28px rgba(245, 185, 66, 0.55);
}
.rarity-ring.rarity-Ultra {
  box-shadow: inset 0 0 0 2px #d6336c, 0 0 32px rgba(214, 51, 108, 0.6);
}
.rarity-ring.rarity-Legendary {
  box-shadow: inset 0 0 0 2px #845ef7, 0 0 36px rgba(132, 94, 247, 0.7);
}

/* vignette face avant (SVG généré) */
/* vignette face avant (SVG généré) */
.card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* petite vibration lors de l’apparition */
.reveal-card.appear {
  animation: pop 0.22s ease;
}
@keyframes pop {
  0% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
  }
}

/* rendre les cartes cliquables et guider la “prochaine” */
.reveal-card.clickable {
  cursor: pointer;
}
.reveal-card.next {
  outline: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.06);
  animation: nextPulse 1.2s ease-in-out infinite;
}
@keyframes nextPulse {
  0% {
    outline-color: rgba(255, 255, 255, 0.25);
  }
  50% {
    outline-color: rgba(255, 255, 255, 0.05);
  }
  100% {
    outline-color: rgba(255, 255, 255, 0.25);
  }
}

/* état retourné + zoom */
.reveal-card.zoom {
  z-index: 5;
  transform: scale(1.22);
} /* zoom sur face avant */
.card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- FIX FLIP 3D STABLE --- */
.reveal-lane {
  perspective: 1200px;
} /* donne de la profondeur */

.reveal-card {
  width: var(--tile-w);
  height: var(--tile-h);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  border: 1px solid #26314a;
  background: #101522;
  transform-style: preserve-3d;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.reveal-card .back,
.reveal-card .front {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 14px;
}
.reveal-card .back {
  transform: rotateY(0deg);
  background: repeating-linear-gradient(
    135deg,
    #0f1420 0 10px,
    #121b2b 10px 20px
  );
  color: #9fb7ff;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid #2a3650;
  transition: transform 0.55s ease, opacity 0.3s ease;
}
.reveal-card .front {
  transform: rotateY(180deg);
  transition: transform 0.55s ease;
}
.reveal-card.flipped .front {
  transform: rotateY(0deg);
}
.reveal-card.flipped .back {
  transform: rotateY(180deg);
  opacity: 0;
}

/* ===== FX par rareté (sparkle/burst + balayage) ===== */
.fx-burst,
.fx-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 14px;
  overflow: hidden;
}
.fx-burst {
  animation: fxBurst 0.55s ease-out forwards;
  mix-blend-mode: screen;
  opacity: 0.9;
}
.fx-shine {
  animation: fxShine 1.1s ease-out forwards;
  mix-blend-mode: screen;
}

/* la couleur est injectée via --fx */
.fx-burst {
  background: radial-gradient(
      circle at 20% 30%,
      var(--fx) 0 12%,
      transparent 40%
    ),
    radial-gradient(circle at 80% 20%, var(--fx) 0 10%, transparent 38%),
    radial-gradient(circle at 60% 70%, var(--fx) 0 14%, transparent 42%),
    radial-gradient(circle at 30% 80%, var(--fx) 0 8%, transparent 36%);
}
.fx-shine {
  background: linear-gradient(
      120deg,
      transparent 0 40%,
      rgba(255, 255, 255, 0.65) 50%,
      transparent 60%
    ),
    linear-gradient(
      120deg,
      transparent 0 46%,
      rgba(255, 255, 255, 0.35) 50%,
      transparent 54%
    );
  opacity: 0;
}

@keyframes fxBurst {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  25% {
    opacity: 1;
  }
  100% {
    transform: scale(1.2);
    opacity: 0;
  }
}
@keyframes fxShine {
  0% {
    transform: translateX(-80%);
    opacity: 0;
  }
  20% {
    opacity: 0.9;
  }
  100% {
    transform: translateX(80%);
    opacity: 0;
  }
}

/* Couleurs par rareté (fallback si JS oublie --fx) */
.fx-common {
  --fx: #8aa0ff;
}
.fx-uncommon {
  --fx: #4dabf7;
}
.fx-rare {
  --fx: #f5b942;
}
.fx-ultra {
  --fx: #d6336c;
}
.fx-legendary {
  --fx: #845ef7;
}

/* ===== Extra FX layers by rarity ===== */
.fx-ring {
  position: absolute;
  inset: -6px;
  border-radius: 14px;
  pointer-events: none;
  box-shadow: inset 0 0 0 3px var(--fx, #f5b942), 0 0 36px var(--fx, #f5b942);
  opacity: 0.9;
  animation: ringPulse 0.9s ease-out forwards;
}
@keyframes ringPulse {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  35% {
    opacity: 1;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

/* diagonal energy trail for Ultra */
.fx-trail {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    135deg,
    rgba(255, 255, 255, 0) 0 8px,
    rgba(255, 255, 255, 0.12) 8px 12px,
    rgba(255, 255, 255, 0) 12px 20px
  );
  mix-blend-mode: screen;
  opacity: 0;
  animation: trailSweep 0.9s ease-out forwards;
}
@keyframes trailSweep {
  0% {
    transform: translateX(-40%) skewX(-8deg);
    opacity: 0;
  }
  30% {
    opacity: 0.5;
  }
  100% {
    transform: translateX(40%) skewX(-8deg);
    opacity: 0;
  }
}

/* screen flash for Legendary */
.fx-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(255, 255, 255, 0.85) 0%,
    rgba(255, 255, 255, 0.35) 28%,
    rgba(255, 255, 255, 0) 60%
  );
  mix-blend-mode: screen;
  animation: flashPop 0.22s ease-out forwards;
}
@keyframes flashPop {
  0% {
    transform: scale(0.92);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: scale(1.02);
    opacity: 0;
  }
}

/* ghost burst: a lighter secondary burst */
.fx-burst-ghost {
  opacity: 0.5;
  filter: blur(0.5px);
}

/* ===== Fullscreen overlay (booster chooser + opening) ===== */
.hidden {
  display: none !important;
}
.fs-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
}
.fs-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 14, 0.85);
  backdrop-filter: blur(6px);
}
.fs-content {
  width: min(1100px, 96vw);
  max-height: 92vh;
  overflow: auto;
  padding: 20px;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  position: absolute !important;
}
h1,
h2,
h3,
h4,
h5,
h6,
.label,
.fs-title {
  font-family: "KohLantaFont", sans-serif !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em !important;
  margin: 0 0 12px;
  font-size: 28px !important;
  text-transform: uppercase !important;
}
.fs-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #101522;
  color: #cfe3ff;
  border: 1px solid #2a3650;
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
}

.fs-choices {
  position: relative;
  overflow: hidden;
  margin: 10px auto 16px;
  height: 260px; /* viewport height (matches .fs-pack height) */
}
.fs-rail {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px; /* little breathing room on sides */
  will-change: transform;
  transform: translate3d(0, 0, 0);
}
/* Ensure the rail renders above the vignette/center line */
.fs-rail {
  position: relative;
  z-index: 2;
}
.fs-choices::before,
.fs-choices::after {
  z-index: 1;
}
.fs-pack {
  flex: 0 0 180px; /* fixed width in the rail */
  width: 180px;
  height: 240px;
  position: relative;
  cursor: pointer;
  border: 1px solid #233045;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45),
    inset 0 0 40px rgba(255, 255, 255, 0.06);
  display: grid;
  place-items: center;
  user-select: none;
  overflow: hidden; /* prevent label from changing size */
  /* use CSS variables so per-item scale/opacity doesn't fight the rail translate */
  --scale: 1;
  --opacity: 1;
  transform: scale(var(--scale));
  opacity: var(--opacity);
  transition: transform 0.15s ease, box-shadow 0.12s ease,
    outline-color 0.12s ease, opacity 0.15s ease;
  transform-origin: center center;
}

/* Custom booster illustration (per set) */
.fs-pack .pack-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.95) contrast(1.05) brightness(0.9);
}
/* Keep label readable over art */
.fs-pack .label {
  position: relative;
  z-index: 2;
}
.fs-pack .foil {
  z-index: 1;
}

.fs-pack.highlight {
  --scale: 1.15;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6),
    inset 0 0 60px rgba(255, 255, 255, 0.08);
  outline: 2px solid #ffe3a3;
}
.fs-pack .foil {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.14),
      rgba(255, 255, 255, 0) 60%
    ),
    conic-gradient(
      from 0deg,
      rgba(255, 0, 128, 0.18),
      rgba(0, 255, 255, 0.18),
      rgba(255, 255, 0, 0.18),
      rgba(255, 0, 128, 0.18)
    );
  mix-blend-mode: screen;
  filter: blur(1px);
  opacity: 0.7;
  animation: shimmer 3s linear infinite;
}
.fs-pack .label {
  position: relative;
  z-index: 1;
  color: #e7f0ff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(15, 20, 32, 0.6);
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #2a3650;
  text-align: center;
  max-width: 90%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fs-choices::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(-1px);
  pointer-events: none;
}
.fs-pack[data-theme="ORIG"] {
  background: radial-gradient(120% 150% at 50% -10%, #4dabf7 0%, #0b0e14 60%),
    #0b0e14;
}
.fs-pack[data-theme="NEON"] {
  background: radial-gradient(120% 150% at 50% -10%, #9f7aea 0%, #0b0e14 60%),
    #0b0e14;
}
.fs-pack.dim {
  opacity: 0.25;
  filter: grayscale(0.4);
}
.fs-pack.selected {
  --scale: 1.15;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6),
    inset 0 0 60px rgba(255, 255, 255, 0.08);
}

@keyframes focusPulse {
  0% {
    transform: scale(1.18);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.6), 0 0 0 0 rgba(255, 227, 163, 0);
  }
  50% {
    transform: scale(1.3);
    box-shadow: 0 22px 64px rgba(0, 0, 0, 0.7),
      0 0 0 6px rgba(255, 227, 163, 0.5);
  }
  100% {
    transform: scale(1.28);
    box-shadow: 0 22px 64px rgba(0, 0, 0, 0.7),
      0 0 0 3px rgba(255, 227, 163, 0.85);
  }
}

/* Fullscreen reveal lane (reuses reveal-card styles) */
.fs-lane {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  min-height: 320px;
  perspective: 1200px;
}

/* Optional opening emphasis */
.fs-opening {
  animation: fsOpen 0.28s ease;
}
@keyframes fsOpen {
  0% {
    transform: scale(0.98);
  }
  100% {
    transform: scale(1);
  }
}

/* ===== Responsive mobile ===== */
@media (max-width: 1024px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  }
  :root {
    /* grand tablette / petit laptop */
    --tile-w: 300px;
    --tile-h: 420px;
  }
}

@media (max-width: 720px) {
  .topbar {
    gap: 10px;
  }
  .controls {
    gap: 8px;
  }
  .fs-content {
    width: 100vw;
    max-height: 100vh;
    padding: 12px;
  }
  .fs-title {
    font-size: 18px;
  }

  /* *** Mobile portrait: cartes beaucoup plus grandes *** */
  :root {
    --tile-w: 260px;
    --tile-h: 370px;
  }

  .pack {
    width: 160px;
    height: 230px;
  }
}

@media (max-width: 420px) {
  :root {
    /* très petit téléphone */
    --tile-w: 220px;
    --tile-h: 315px;
  }
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Bonus: mobile paysage, on garde des cartes larges */
@media (max-height: 480px) and (orientation: landscape) {
  :root {
    --tile-w: 300px;
    --tile-h: 420px;
  }
}

.theme-koh::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.3;
  z-index: 0;
  background-repeat: no-repeat;
}

/* === Décors d'angle responsives + animation légère === */
/* Place les décors sous le contenu mais au-dessus du fond */
main {
  position: relative;
  z-index: 1;
}

.decor {
  position: fixed;
  z-index: 99; /* en-dessous des cartes/menus (qui n'ont pas de z-index explicite ou >0) */
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.35));
  will-change: transform;
}

/* Bas-gauche */
.decor-bl {
  left: clamp(-40px, -2vw, -12px);
  bottom: clamp(-48px, -3vw, -8px);
  width: clamp(180px, 24vw, 420px);
  transform-origin: left bottom;
  animation: floatBL 9s ease-in-out infinite;
}

/* Haut-droite */
.decor-tr {
  right: clamp(-36px, -2vw, -8px);
  top: clamp(-36px, -2vw, -8px);
  width: clamp(160px, 20vw, 360px);
  transform-origin: right top;
  animation: floatTR 11s ease-in-out infinite reverse;
}

@keyframes floatBL {
  0% {
    transform: translate3d(0, 0, 0) rotate(-2deg) scale(1);
  }
  50% {
    transform: translate3d(3px, -4px, 0) rotate(1.5deg) scale(1.02);
  }
  100% {
    transform: translate3d(0, 0, 0) rotate(-2deg) scale(1);
  }
}
@keyframes floatTR {
  0% {
    transform: translate3d(0, 0, 0) rotate(2deg) scale(1);
  }
  50% {
    transform: translate3d(-3px, 3px, 0) rotate(-1.5deg) scale(1.02);
  }
  100% {
    transform: translate3d(0, 0, 0) rotate(2deg) scale(1);
  }
}

/* Masquer/réduire un peu sur les très petits écrans pour éviter de gêner la lecture */
@media (max-width: 480px) {
  .decor-bl {
    width: clamp(140px, 36vw, 220px);
    bottom: -22px;
    left: -18px;
  }
  .decor-tr {
    width: clamp(120px, 30vw, 200px);
    top: -18px;
    right: -12px;
  }
}

/* Réduit l’animation pour les personnes sensibles au mouvement */
@media (prefers-reduced-motion: reduce) {
  .decor {
    animation: none !important;
  }
}
.btn.primary {
  background: var(--accent);
  color: #3c2600;
  border-color: #e3a118;
}
.pack {
  width: 180px;
  height: 260px;
  border-radius: 16px;
  position: relative;
  cursor: pointer;
  background: repeating-linear-gradient(
      90deg,
      rgba(255, 214, 143, 0.15) 0 6px,
      rgba(153, 102, 51, 0.08) 6px 12px
    ),
    radial-gradient(120% 150% at 50% -10%, #156f5a 0%, #0b1a16 60%), #0b1a16;
  border: 1px solid #274b3f;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5),
    inset 0 0 40px rgba(255, 255, 255, 0.06);
  display: grid;
  place-items: center;
  user-select: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.fs-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(
      60% 80% at 50% 0%,
      rgba(11, 50, 46, 0.9),
      rgba(8, 26, 23, 0.92) 60%
    ),
    linear-gradient(180deg, rgba(10, 28, 24, 0.9), rgba(8, 22, 19, 0.95));
  backdrop-filter: blur(6px);
}
.fs-pack[data-theme="ORIG"] {
  background: radial-gradient(120% 150% at 50% -10%, #1e8a72 0%, #0b1a16 60%),
    #0b1a16;
}
.fs-pack[data-theme="NEON"] {
  background: radial-gradient(120% 150% at 50% -10%, #0f6ea6 0%, #0b1a16 60%),
    #0b1a16;
}
.badge {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid #5b6d63;
  color: #ffe3a3;
}
.tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #355a4e;
  color: #d4efe8;
}

/* Badge quantité (doublons) dans la vignette */
.badge-count {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
  color: #0a1512;
  background: linear-gradient(180deg, #ffe3a3, #f5b942);
  border: 1px solid rgba(0, 0, 0, 0.25);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

/* État vide de la collection */
.empty {
  grid-column: 1 / -1;
  opacity: 0.85;
  color: #cfe3ff;
  background: #0f1420;
  border: 1px dashed #2a3650;
  border-radius: 12px;
  padding: 18px;
  text-align: center;
}
/* --- Cooldown booster --- */
.cooldown {
  color: #cfe3ff;
  opacity: 0.9;
  font-size: 14px;
  padding: 6px 10px;
  background: #0f1420;
  border: 1px solid #1f2736;
  border-radius: 10px;
}
.pack.locked {
  filter: grayscale(0.6) brightness(0.85);
  cursor: not-allowed;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
.pack.locked .label {
  background: rgba(15, 20, 32, 0.35);
}
/* --- Barre de filtre compacte --- */
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin: 12px 0 20px;
  padding: 10px;
  background: rgba(15, 20, 32, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  z-index: 1;
  position: relative;
}

.filters-bar select,
.filters-bar button {
  font-family: inherit;
  background: #162026;
  color: #e8f2ff;
  border: 1px solid #2d3945;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 14px;
}

.filters-bar button {
  cursor: pointer;
  background: linear-gradient(180deg, #ffe3a3, #f5b942);
  color: #0a1512;
  border: none;
  font-weight: 700;
}

.filters-bar button:hover {
  filter: brightness(1.1);
}

/* Place le timer *dans* le pack, sous le libellé */
.pack .cooldown {
  position: absolute;
  bottom: 12px;
  width: auto;
  max-width: calc(100% - 24px);
  text-align: center;
  background: rgba(15, 20, 32, 0.65);
  border-color: #2a3650;
}

/* --- Effet métallique et relief sur cartes rares --- */
.card .thumb img {
  transition: transform 0.3s ease, filter 0.3s ease;
}

/* Rares : contour doré-argenté subtil */
.card .badge:contains("Rare"),
.card .badge:contains("Ultra"),
.card .badge:contains("Legendary") {
  position: relative;
  z-index: 1;
}

.card .badge:contains("Rare")::before,
.card .badge:contains("Ultra")::before,
.card .badge:contains("Legendary")::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 6px;
  background: linear-gradient(135deg, #f5e6a3, #c5d0d9, #f5e6a3);
  background-size: 200% 200%;
  animation: metallicShift 3s linear infinite;
  z-index: -1;
}

/* Contour argent brillant autour de la vignette */
/* Metallic/relief effect for rare cards: always metallic silver, overrides type color */
.card .thumb img[data-rarity="Rare"] {
  position: relative;
  border-radius: 18px;
  border: 2px solid transparent;
  background: linear-gradient(
    135deg,
    #fee974,
    #e8b800,
    #a97b00,
    #e8b800,
    #fee974
  );
  background-size: 300% 300%;
  animation: metallicShift 5s linear infinite;
  padding: 2px;
  box-shadow: 0 0 12px rgba(200, 220, 255, 0.4),
    inset 0 0 6px rgba(255, 255, 255, 0.3);
  filter: brightness(1.05) contrast(1.05) saturate(0.9);
}

.card .thumb img[data-rarity="Ultra"] {
  position: relative;
  border-radius: 18px;
  border: 2px solid transparent;
  background: linear-gradient(
    135deg,
    #ffc16e,
    #d96500,
    #732e00,
    #d96500,
    #ffc16e
  );
  background-size: 300% 300%;
  animation: metallicShift 5s linear infinite;
  padding: 2px;
  box-shadow: 0 0 12px rgba(200, 220, 255, 0.4),
    inset 0 0 6px rgba(255, 255, 255, 0.3);
  filter: brightness(1.05) contrast(1.05) saturate(0.9);
}

.card .thumb img[data-rarity="Legendary"] {
  position: relative;
  border-radius: 18px;
  border: 2px solid transparent;
  background: linear-gradient(
    135deg,
    #b852ff,
    #9100f3,
    #3e0061,
    #9100f3,
    #b852ff
  );
  background-size: 300% 300%;
  animation: metallicShift 5s linear infinite;
  padding: 2px;
  box-shadow: 0 0 12px rgba(200, 220, 255, 0.4),
    inset 0 0 6px rgba(255, 255, 255, 0.3);
  filter: brightness(1.05) contrast(1.05) saturate(0.9);
}

/* Special glow accent for higher rarities */
.card .thumb img[data-rarity="Ultra"] {
  box-shadow: 0 0 16px rgba(255, 150, 200, 0.5),
    inset 0 0 10px rgba(255, 255, 255, 0.3);
  filter: brightness(1.08) contrast(1.1);
}

.card .thumb img[data-rarity="Legendary"] {
  box-shadow: 0 0 20px rgba(180, 160, 255, 0.7),
    inset 0 0 12px rgba(255, 255, 255, 0.4), 0 0 30px rgba(255, 255, 255, 0.25);
  filter: brightness(1.12) contrast(1.15);
}

@keyframes metallicShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* === SEQUENTIAL REVEAL ANIMATION === */
.reveal-card {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  perspective: 1200px;
}

.card-face {
  width: 260px;
  height: 360px;
  border-radius: 12px;
  background: linear-gradient(145deg, #1e2a44, #2d3f63);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  text-align: center;
  color: #fff;
  transform: scale(0.9);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.card-face.appear {
  transform: scale(1);
  opacity: 1;
}

.card-face.disappear {
  transform: scale(1.2) rotateY(20deg);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.card-rarity {
  margin-top: 12px;
  font-weight: bold;
  text-transform: uppercase;
}

.card-rarity.legendary {
  color: #ffe14c;
}
.card-rarity.ultra {
  color: #ff8a8a;
}
.card-rarity.rare {
  color: #60a3ff;
}
.card-rarity.uncommon {
  color: #8ef4a9;
}
.card-rarity.common {
  color: #d6d6d6;
}

.reveal-finish {
  text-align: center;
  font-size: 1.4rem;
  animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* === Fullscreen one-by-one reveal using classic card visual === */
.booster-card {
  width: var(--tile-w);
  height: var(--tile-h);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  border: 1px solid #26314a;
  background: #101522;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
/* front container for fullscreen booster card (hosts FX layers) */
.booster-card .front {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.booster-card .card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.booster-card.revealing {
  opacity: 0;
  transform: scale(0.9);
  transition: transform 0.4s ease, opacity 0.4s ease;
}
.booster-card.revealing.appear {
  opacity: 1;
  transform: scale(1);
}
.booster-card.revealing.disappear {
  opacity: 0;
  transform: scale(1.1) rotateY(12deg);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Focalisation quand la roulette s'arrête */
.fs-choices.stopped::before {
  content: none; /* remove vignette overlay that created the dark band */
}
/* Quand la roulette est arrêtée, on laisse respirer sous le titre */
.fs-choices.stopped {
  overflow: visible; /* pas de rognage du zoom */
  padding-top: 22px; /* espace sous “Choisis un booster” */
  padding-bottom: 8px;
  min-height: 300px; /* 240px * 1.22 ≈ 293 → marge OK */
}

/* Pas d’arrière-plan parasite sur la zone des choix */
.fs-choices {
  background: transparent;
}

/* Le pack focus passe au-dessus de tout */
.fs-pack.focus {
  --scale: 1.35 !important; /* zoom un peu moins fort */
  --opacity: 1; /* opacité pleine */
  opacity: 1;
  filter: none;
  /* on ajoute un léger décalage vers le bas pour éviter le titre */
  transform: scale(var(--scale)) translateY(8px);
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.7),
    0 0 0 3px rgba(255, 227, 163, 0.85), 0 0 60px rgba(255, 240, 180, 0.35),
    inset 0 0 80px rgba(255, 255, 255, 0.14);
  z-index: 4;
  animation: focusPulse 800ms ease-out;
}
@keyframes focusPulse {
  0% {
    transform: scale(1.12) translateY(6px);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.6), 0 0 0 0 rgba(255, 227, 163, 0);
  }
  50% {
    transform: scale(1.25) translateY(6px);
    box-shadow: 0 22px 64px rgba(0, 0, 0, 0.7),
      0 0 0 6px rgba(255, 227, 163, 0.5);
  }
  100% {
    transform: scale(1.22) translateY(8px);
    box-shadow: 0 22px 64px rgba(0, 0, 0, 0.7),
      0 0 0 3px rgba(255, 227, 163, 0.85);
  }
}

/* ==== Spinner packs: image only (no borders / no background) ==== */
.fs-choices .fs-pack,
.fs-rail .fs-pack {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  outline: none !important;
}

/* hide decorative layers and labels in the spinner */
.fs-choices .fs-pack .foil,
.fs-rail .fs-pack .foil,
.fs-choices .fs-pack .label,
.fs-rail .fs-pack .label {
  display: none !important;
}

/* remove any pseudo-element frames if present */
.fs-choices .fs-pack::before,
.fs-choices .fs-pack::after,
.fs-rail .fs-pack::before,
.fs-rail .fs-pack::after {
  display: none !important;
  content: none !important;
}

/* when focused/selected by the roulette, keep it clean (no outline/shadow) */
.fs-choices .fs-pack.selected,
.fs-choices .fs-pack.focus,
.fs-rail .fs-pack.selected,
.fs-rail .fs-pack.focus {
  box-shadow: none !important;
  outline: none !important;
  border: none !important;
}

/* === Animated rarity stars (reveal) === */
.rarity-stars {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  display: inline-flex;
  gap: 6px;
  pointer-events: none;
  z-index: 3;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45))
    drop-shadow(0 0 10px rgba(0, 0, 0, 0.35));
}
.rarity-stars .star {
  font-size: 18px;
  line-height: 1;
  opacity: 0;
  transform: scale(0.8) translateY(4px);
  animation: starPop 0.36s cubic-bezier(0.2, 0.8, 0.2, 1) forwards,
    starTwinkle 2.4s ease-in-out 0.4s infinite;
}
@keyframes starPop {
  0% {
    opacity: 0;
    transform: scale(0.6) translateY(6px) rotate(-8deg);
  }
  60% {
    opacity: 1;
    transform: scale(1.15) translateY(0) rotate(0deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
@keyframes starTwinkle {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.35);
  }
}
/* teinte/glow par rareté */
.rarity-stars.rarity-Common .star {
  color: #9aa3b2;
}
.rarity-stars.rarity-Uncommon .star {
  color: #4dabf7;
}
.rarity-stars.rarity-Rare .star {
  color: #f5b942;
  text-shadow: 0 0 8px rgba(245, 185, 66, 0.45);
}
.rarity-stars.rarity-Ultra .star {
  color: #ff6b9e;
  text-shadow: 0 0 10px rgba(255, 107, 158, 0.55);
}
.rarity-stars.rarity-Legendary .star {
  color: #b197fc;
  text-shadow: 0 0 12px rgba(177, 151, 252, 0.65);
}

/* petit breathing de la rangée pour Legendary */
.rarity-stars.rarity-Legendary {
  animation: rowPulse 1.8s ease-in-out infinite;
}
@keyframes rowPulse {
  0%,
  100% {
    transform: translateX(-50%) scale(1);
  }
  50% {
    transform: translateX(-50%) scale(1.06);
  }
}

/* --- Lock scroll specifically inside the fullscreen content --- */
.fs-content.locked {
  overflow: hidden !important;
  overscroll-behavior: none !important;
  touch-action: none !important;
}

/* === Koh-Lanta burn-out close for fullscreen overlay === */
.fs-overlay.burn {
  --burn-r: 0%; /* rayon du trou brûlé */
  position: fixed;
  inset: 0;

  /* On « perce » un trou transparent qui grandit, révélant la page en dessous */
  -webkit-mask-image: radial-gradient(
    circle at 50% 60%,
    transparent var(--burn-r),
    black calc(var(--burn-r) + 2%)
  );
  mask-image: radial-gradient(
    circle at 50% 60%,
    transparent var(--burn-r),
    black calc(var(--burn-r) + 2%)
  );
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;

  animation: burnHole 2.4s cubic-bezier(0.2, 0.8, 0.1, 1) forwards;
}

/* Halo/flammes au bord du trou */
.fs-overlay.burn::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  background: radial-gradient(
        closest-side,
        rgba(255, 140, 0, 0.85),
        rgba(255, 140, 0, 0) 70%
      )
      50% 60%/160% 160% no-repeat,
    radial-gradient(
        closest-side,
        rgba(255, 220, 120, 0.9),
        rgba(255, 220, 120, 0) 60%
      )
      52% 58%/140% 140% no-repeat,
    radial-gradient(
        closest-side,
        rgba(255, 80, 0, 0.5),
        rgba(255, 80, 0, 0) 65%
      )
      48% 62%/150% 150% no-repeat;
  filter: blur(1.2px) saturate(1.1);
  animation: flameFlicker 1s ease-in-out infinite;
}

/* Petites braises qui dérivent */
.fs-overlay.burn::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(
      2px 2px at 20% 70%,
      rgba(255, 200, 120, 0.8),
      transparent
    ),
    radial-gradient(2px 2px at 40% 55%, rgba(255, 170, 90, 0.8), transparent),
    radial-gradient(2px 2px at 60% 65%, rgba(255, 220, 160, 0.85), transparent),
    radial-gradient(2px 2px at 80% 50%, rgba(255, 160, 80, 0.75), transparent),
    radial-gradient(2px 2px at 35% 80%, rgba(255, 200, 120, 0.7), transparent),
    radial-gradient(2px 2px at 65% 40%, rgba(255, 170, 90, 0.75), transparent);
  opacity: 0.75;
  mix-blend-mode: screen;
  animation: emberDrift 2.2s ease-in-out infinite;
}

@keyframes burnHole {
  0% {
    --burn-r: 0%;
  }
  12% {
    --burn-r: 12%;
  }
  28% {
    --burn-r: 26%;
  }
  46% {
    --burn-r: 42%;
  }
  66% {
    --burn-r: 68%;
  }
  84% {
    --burn-r: 96%;
  }
  100% {
    --burn-r: 140%;
  }
}
@keyframes flameFlicker {
  0%,
  100% {
    opacity: 0.85;
    transform: translateY(0) scale(1);
  }
  40% {
    opacity: 1;
    transform: translateY(-1px) scale(1.02);
  }
  70% {
    opacity: 0.9;
    transform: translateY(1px) scale(0.99);
  }
}
@keyframes emberDrift {
  0% {
    transform: translateY(0);
    opacity: 0.9;
  }
  50% {
    transform: translateY(-6px);
    opacity: 0.7;
  }
  100% {
    transform: translateY(0);
    opacity: 0.9;
  }
}

/* === Lightweight (GPU-friendly) burn close ===
   Uses background-size on a radial-gradient instead of animating mask stops. */
.fs-overlay.burn-fast {
  position: fixed;
  inset: 0;
  /* on crée un trou transparent au centre en poussant la texture */
  background: radial-gradient(
    circle at 50% 60%,
    transparent 48%,
    rgba(5, 8, 14, 0.92) 50%
  );
  background-repeat: no-repeat;
  background-position: center;
  background-size: 0% 0%;
  contain: paint;
  will-change: background-size, opacity;
  animation: burnHoleSize 1200ms cubic-bezier(0.2, 0.8, 0.1, 1) forwards;
}
/* Lueur de flamme très légère (une seule couche, peu de blur) */
.fs-overlay.burn-fast::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  background: radial-gradient(
      closest-side,
      rgba(255, 170, 70, 0.55),
      rgba(255, 170, 70, 0) 70%
    )
    50% 60%/140% 140% no-repeat;
  filter: blur(0.6px);
  animation: flameFlickerLite 1200ms ease-in-out;
}

@keyframes burnHoleSize {
  0% {
    background-size: 0% 0%;
    opacity: 1;
  }
  100% {
    background-size: 260% 260%;
    opacity: 0;
  }
}
@keyframes flameFlickerLite {
  0%,
  100% {
    opacity: 0.7;
    transform: translateY(0) scale(1);
  }
  50% {
    opacity: 1;
    transform: translateY(-1px) scale(1.01);
  }
}

/* === Fond de forêt flou et tamisé pour l’overlay === */
.fs-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      ellipse at center,
      rgba(0, 0, 0, 0.05) 0%,
      rgba(0, 0, 0, 0.15) 100%
    ),
    url(/assets/background/fond-foret-kohlanta.avif) center / cover no-repeat;
  opacity: 0;
  filter: blur(18px) brightness(0.6);
  transform: scale(1.08);
  transition: opacity 0.8s ease, filter 0.8s ease;
  z-index: 0;
}

/* Quand l’overlay est actif ou en mode reveal */
.fs-overlay.active::before,
.fs-overlay.reveal-mode::before {
  opacity: 1;
  filter: blur(14px) brightness(0.5);
}

/* Le contenu reste au-dessus du fond */
.fs-overlay > * {
  position: relative;
  z-index: 1;
}

/* === Fond global : plage Koh-Lanta sur tout le site === */
html,
body {
  background-color: #081a17; /* fallback solide */
}

/* Image de fond en pseudo-élément fixé (meilleur que background-attachment: fixed) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1; /* derrière tout le contenu */
  background:
    /* voile sombre pour le contraste du texte */ radial-gradient(
      120% 100% at 50% 20%,
      rgba(0, 0, 0, 0.55),
      rgba(0, 0, 0, 0.85)
    ),
    url("/assets/background/fond-plage-kohlanta.avif") center / cover no-repeat;
  filter: saturate(0.9) brightness(0.7);
  transform: translateZ(0); /* hint GPU */
  will-change: transform, opacity;
}

/* Optionnel : un peu plus sombre sur mobile pour la lisibilité */
@media (max-width: 720px) {
  body::before {
    filter: saturate(0.9) brightness(0.6);
  }
}

/* Centrage parfait du contenu de l’overlay */
#fs-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) !important;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 10;
}

/* Transition douce d’apparition/disparition de la ligne */
.fs-lane {
  opacity: 1;
  transition: opacity 0.4s ease;
}

.fs-lane.hidden {
  opacity: 0;
  pointer-events: none;
}

.card-name {
  font-family: "KohLantaFont", sans-serif !important;
  font-size: 1.4em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: linear-gradient(90deg, #f4d03f, #f39c12);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.fs-content .fs-title {
  text-align: center !important;
}

/* Police personnalisée uniquement sur le prénom (nom affiché sur les cartes) */
.card .title .card-name {
  font-family: "KohLantaFont", sans-serif !important;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ===== Overlay du prénom sur la carte (HTML, pas dans le SVG) ===== */
.booster-card .front {
  position: relative;
}
.booster-card .name-overlay {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  text-align: left;
  font-family: "KohLantaFont", Inter, system-ui !important;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 20px;
  line-height: 1.1;
  color: #ffe3a3;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  z-index: 3;
}

/* ==== KL font on collection card titles (override generic body/html font) ==== */
@font-face {
  font-family: "KohLantaFont";
  src: url("/assets/fonts/font-kl-gras.ttf") format("truetype");
  font-display: swap;
}

/* Ensure the collection grid titles use the KL font even if html/body set another font */
.grid .card .meta .title .card-name {
  font-family: "KohLantaFont", Inter, system-ui, Segoe UI, Roboto, Helvetica,
    Arial, sans-serif !important;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Optional: keep regular body typography elsewhere */
.grid .card .meta .sub,
.grid .card .meta .tags,
.grid .card .meta .badge,
.grid .card .meta .qty,
.grid .card .meta .tag {
  font-family: Inter, system-ui, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}
