@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=Manrope:wght@400;600;800&family=Pixelify+Sans:wght@500;700&family=Press+Start+2P&family=Cinzel:wght@600;700&display=swap');

/* Lisibilité : dans la police pixel, le 9 ressemble à un 8 et le € à un B. Les chiffres et symboles numériques
   sont donc pris dans une police nette installée sur l'appareil ; les lettres gardent le style pixel. */
@font-face {
  font-family: 'Chiffres';
  src: local('Arial'), local('Helvetica Neue'), local('Helvetica'), local('Segoe UI'), local('Roboto'), local('Liberation Sans'), local('DejaVu Sans');
  font-weight: 100 900;
  unicode-range: U+0030-0039, U+002B, U+002C, U+002E, U+002F, U+003A, U+0025, U+00D7, U+20AC, U+2212, U+00B1, U+2264;
}

:root {
  /* Thème "salle d'arcade néon" : les anciens noms de variables sont conservés pour que
     toutes les pages existantes se recolorent automatiquement. */
  --felt-dark: #1b1040;
  --felt-darker: #0e0826;
  --felt-light: #2d1b63;
  --gold: #f5b82e;
  --gold-bright: #ffd84a;
  --cream: #f3ecff;
  --ink: #140a2a;
  --neon-cyan: #2de2ff;
  --neon-pink: #ff3fa4;
  --neon-purple: #9b5cff;
  --neon-green: #3dff8f;
  --font-pixel: 'Chiffres', 'Pixelify Sans', 'Manrope', sans-serif;
  --red: #b3452d;
  --win: #4caf7d;
  --lose: #c9584a;
  font-size: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% -10%, rgba(212,175,55,0.12), transparent 45%),
    radial-gradient(circle at 85% 110%, rgba(20,92,66,0.35), transparent 55%),
    linear-gradient(160deg, var(--felt-darker) 0%, #0d2e23 45%, var(--felt-dark) 100%);
  background-attachment: fixed;
  color: var(--cream);
  font-family: 'Manrope', sans-serif;
}

h1, h2, h3, .display {
  font-family: 'Playfair Display', serif;
  color: var(--gold-bright);
  letter-spacing: 0.02em;
}

a { color: var(--gold-bright); }

.wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: linear-gradient(180deg, var(--felt-darker), rgba(7,41,32,0.6));
  border-bottom: 2px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 1.4rem;
  color: var(--gold-bright);
  text-decoration: none;
}
.brand::before { content: "⚔️ "; }
.site-ticker {
  background: var(--felt-darker);
  border-bottom: 1px solid rgba(212,175,55,0.3);
  overflow: hidden;
  white-space: nowrap;
  padding: 6px 0;
  position: relative;
}
.site-ticker .ticker-track {
  display: inline-block;
  padding-left: 100%;
  color: var(--gold-bright);
  font-weight: 700;
  font-size: 0.9rem;
  animation: ticker-scroll 22s linear infinite;
}
@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

.nav-links { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.nav-links-center { justify-content: center; }
.nav-links-right { justify-self: end; }
.nav-links a { text-decoration: none; font-weight: 600; color: var(--cream); font-size: 0.92rem; }
.nav-links a:hover { color: var(--gold-bright); }

.wallet-pill {
  display: flex; gap: 14px; align-items: center;
  background: var(--ink);
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 6px 16px;
  font-weight: 800;
  color: var(--gold-bright);
}

.card-panel {
  background: rgba(20, 32, 25, 0.72);
  border: 1px solid rgba(212,175,55,0.35);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.35);
}

.btn {
  display: inline-block;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: var(--ink);
  border: none;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.1s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.secondary {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold-bright);
}
.btn.danger { background: linear-gradient(180deg, #d3684f, var(--red)); color: #fff; }

.btn.secondary.selected {
  background: var(--gold-bright);
  color: var(--ink);
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 3px rgba(242,207,91,0.35);
  transform: translateY(-1px);
}

input, select, textarea {
  background: var(--felt-darker);
  border: 1px solid rgba(212,175,55,0.4);
  color: var(--cream);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 1rem;
  width: 100%;
}
textarea { font-family: inherit; resize: vertical; min-height: 90px; }

label { font-size: 0.85rem; color: var(--gold-bright); font-weight: 700; display: block; margin-bottom: 6px; }
.field { margin-bottom: 16px; }

.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.game-tile {
  display: block;
  text-decoration: none;
  padding: 22px;
  border-radius: 14px;
  background: linear-gradient(160deg, var(--felt-light), var(--felt-darker));
  border: 1px solid rgba(212,175,55,0.3);
  text-align: center;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.game-tile:hover { transform: translateY(-4px); border-color: var(--gold); }
.game-tile .emoji { font-size: 2.4rem; display: block; margin-bottom: 8px; }
.game-tile .name { color: var(--cream); font-weight: 800; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid rgba(212,175,55,0.2); }
th { color: var(--gold-bright); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
tr:hover td { background: rgba(212,175,55,0.05); }

.rank-1 { color: var(--gold-bright); font-weight: 900; }
.rank-2 { color: #d8d8d8; font-weight: 800; }
.rank-3 { color: #c98a4b; font-weight: 800; }

.banner {
  background: linear-gradient(90deg, rgba(212,175,55,0.18), transparent);
  border-left: 4px solid var(--gold);
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-weight: 600;
}

.error-msg { color: var(--lose); font-weight: 700; margin-top: 10px; }
.success-msg { color: var(--win); font-weight: 700; margin-top: 10px; }

.slot-reels { display: flex; gap: 14px; justify-content: center; margin: 24px 0; }
.reel {
  width: 80px; height: 80px;
  background: var(--felt-darker);
  border: 2px solid var(--gold);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.6rem;
}

.card-item {
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  border: 1px solid rgba(212,175,55,0.3);
  background: var(--felt-darker);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
}
.card-item.locked { opacity: 0.3; filter: grayscale(1); cursor: default; }
.card-number {
  position: absolute; top: 6px; right: 8px;
  font-size: 0.7rem; opacity: 0.6; font-weight: 700;
}
.rarity-commune { border-color: #9aa0a6; }
.rarity-rare { border-color: #4c8fd1; }
.rarity-ultra_rare { border-color: #a24cd1; }
.rarity-legendaire { border-color: var(--gold-bright); box-shadow: 0 0 14px rgba(242,207,91,0.5); }

/* Effets brillants selon la rareté (désactivés pour les cartes non possédées) */
.card-item.rarity-rare:not(.locked)::before,
.card-item.rarity-ultra_rare:not(.locked)::before,
.card-item.rarity-legendaire:not(.locked)::before {
  content: "";
  position: absolute;
  top: -50%; left: -150%;
  width: 60%; height: 200%;
  transform: rotate(20deg);
  pointer-events: none;
  animation: shine-sweep 3.2s ease-in-out infinite;
}
.card-item.rarity-rare:not(.locked)::before {
  background: linear-gradient(90deg, transparent, rgba(140,190,255,0.35), transparent);
}
.card-item.rarity-ultra_rare:not(.locked)::before {
  background: linear-gradient(90deg, transparent, rgba(242,207,91,0.55), transparent);
  animation-duration: 2.6s;
}
.card-item.rarity-legendaire:not(.locked)::before {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), rgba(200,220,255,0.5), transparent);
  animation-duration: 2s;
}
@keyframes shine-sweep {
  0% { left: -150%; }
  50% { left: 150%; }
  100% { left: 150%; }
}

.card-item.wiggle { animation: card-wiggle 0.5s ease-in-out; }
@keyframes card-wiggle {
  0% { transform: translate(0, 0) rotate(0deg); }
  20% { transform: translate(-4px, -3px) rotate(-3deg); }
  40% { transform: translate(3px, 2px) rotate(2deg); }
  60% { transform: translate(-3px, 3px) rotate(-2deg); }
  80% { transform: translate(2px, -2px) rotate(1deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

/* ---------- Classeur façon vrai classeur à pochettes ---------- */
.binder {
  background:
    linear-gradient(160deg, #6b3a22, #4a2716 60%, #3a1d10);
  border: 10px solid #2a1710;
  border-radius: 18px;
  padding: 28px 22px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55), inset 0 0 50px rgba(0,0,0,0.45);
  position: relative;
}
.binder-section { margin-bottom: 28px; }
.binder-section:last-child { margin-bottom: 0; }
.binder-section-title {
  color: var(--gold-bright);
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(212,175,55,0.35);
}
.binder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 14px;
}
.binder-item { display: flex; flex-direction: column; align-items: center; }
.binder-item .slot-name-outer {
  font-size: 0.75rem; font-weight: 800; text-align: center;
  margin-bottom: 6px; color: var(--cream); min-height: 1.1em; height: 1.1em;
  width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.binder-item .slot-qty-outer { font-size: 0.7rem; opacity: 0.8; margin-top: 6px; min-height: 1em; }
.binder-item.locked .slot-name-outer { opacity: 0.4; }
.slot-name-outer.name-rare { color: #7db8ff; text-shadow: 0 0 6px rgba(125,184,255,0.6); }
.slot-name-outer.name-ultra_rare {
  background: linear-gradient(90deg, #d891ff, #f2cf5b, #d891ff);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: name-shimmer 2.5s linear infinite;
}
.slot-name-outer.name-legendaire {
  background: linear-gradient(90deg, #fff, #f2cf5b, #fff, #a8d8ff, #fff);
  background-size: 300% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: name-shimmer 1.8s linear infinite;
  text-shadow: 0 0 10px rgba(255,255,255,0.4);
}
@keyframes name-shimmer {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.binder-slot {
  aspect-ratio: 5 / 7;
  width: 100%;
  background: linear-gradient(160deg, rgba(255,255,255,0.04), rgba(0,0,0,0.35));
  border: 2px solid rgba(212,175,55,0.45);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.binder-slot:hover { transform: translateY(-3px); border-color: var(--gold-bright); }
.binder-slot.locked { opacity: 0.35; filter: grayscale(1); cursor: default; }
.binder-slot.locked:hover { transform: none; border-color: rgba(212,175,55,0.45); }
.binder-slot img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
}
.binder-slot .slot-number {
  position: absolute; top: 4px; right: 6px;
  font-size: 0.6rem; opacity: 0.85; font-weight: 700; z-index: 2;
  color: var(--cream); text-shadow: 0 0 4px rgba(0,0,0,0.9);
}

.binder-slot.rarity-rare { border-color: #4c8fd1; }
.binder-slot.rarity-ultra_rare { border-color: #a24cd1; }
.binder-slot.rarity-legendaire { border-color: var(--gold-bright); box-shadow: 0 0 14px rgba(242,207,91,0.4); }

.binder-slot.rarity-rare:not(.locked)::before,
.binder-slot.rarity-ultra_rare:not(.locked)::before,
.binder-slot.rarity-legendaire:not(.locked)::before {
  content: "";
  position: absolute;
  top: -50%; left: -150%;
  width: 60%; height: 200%;
  transform: rotate(20deg);
  pointer-events: none;
  animation: shine-sweep 3.2s ease-in-out infinite;
}
.binder-slot.rarity-rare:not(.locked)::before {
  background: linear-gradient(90deg, transparent, rgba(140,190,255,0.35), transparent);
}
.binder-slot.rarity-ultra_rare:not(.locked)::before {
  background: linear-gradient(90deg, transparent, rgba(242,207,91,0.55), transparent);
  animation-duration: 2.6s;
}
.binder-slot.rarity-legendaire:not(.locked)::before {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), rgba(200,220,255,0.5), transparent);
  animation-duration: 2s;
}

/* ---------- Modale de zoom avec bascule 3D ---------- */
.card-zoom-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 1000;
  flex-direction: column;
  align-items: center; justify-content: flex-start;   /* l'encart de titre reste en HAUT de l'écran */
  perspective: 900px;
  gap: 14px;
  padding: 14px 16px 12px;
  overflow-y: auto;
}
.card-zoom-overlay.open { display: flex; }
.card-zoom-content { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; justify-content: center; max-width: 96vw; margin: auto 0; }   /* centré s'il y a de la place, sinon la fenêtre défile */
.card-info-panel {
  background: var(--ink);
  border: 2px solid var(--gold);
  border-radius: 12px;
  padding: 18px 22px;
  max-width: 280px;
  min-width: 220px;
}
.card-info-panel h3 { margin: 0 0 8px; color: var(--gold-bright); font-size: 1.2rem; }
.card-info-panel .meta { opacity: 0.8; margin-bottom: 10px; font-size: 0.85rem; }
.card-info-panel .desc { font-size: 0.95rem; line-height: 1.45; opacity: 0.95; }
.card-info-panel .desc.empty { opacity: 0.5; font-style: italic; }
.card-zoom-header {
  --hb: #1d2430; --hc: #aab0bc; --ht: #e4e8ee; --hg: transparent;
  background: var(--hb);
  border: 2px solid var(--hc);
  border-radius: 10px;
  padding: 10px 22px;
  font-weight: 800;
  color: var(--ht);
  text-align: center;
  max-width: calc(100vw - 130px);
  box-shadow: 0 0 22px var(--hg);
  flex: 0 0 auto;
}
/* Couleurs de l'encart (fond / bordure / écriture) selon la rareté */
.card-zoom-header.rarity-commune    { --hb: #1d2430; --hc: #aab0bc; --ht: #e4e8ee; --hg: transparent; }
.card-zoom-header.rarity-rare       { --hb: #0e2347; --hc: #4c9aff; --ht: #a9d0ff; --hg: rgba(76,154,255,0.35); }
.card-zoom-header.rarity-ultra_rare { --hb: #2b1250; --hc: #b56cff; --ht: #e3c6ff; --hg: rgba(181,108,255,0.45); }
.card-zoom-header.rarity-legendaire { --hb: #3b2a06; --hc: #ffc23b; --ht: #ffe08a; --hg: rgba(255,194,59,0.55); }
.card-zoom-card {
  width: min(540px, 86vw, calc((100vh - 170px) * 5 / 7));   /* grande, mais toujours entière à l'écran */
  aspect-ratio: 5/7;
  border-radius: 16px;
  position: relative;
  perspective: 1400px;
  transition: transform 0.08s ease-out;
  box-shadow: 0 30px 70px rgba(0,0,0,0.7);
  cursor: pointer;
  outline: none;
}
.card-zoom-card:focus-visible { box-shadow: 0 0 0 3px var(--gold-bright), 0 30px 70px rgba(0,0,0,0.7); }
/* Retournement : le « flipper » pivote de 180° autour de l'axe vertical, chaque face cache son revers. */
.zoom-flipper {
  position: absolute; inset: 0;
  transform-style: preserve-3d; -webkit-transform-style: preserve-3d;
  transition: transform 0.75s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.card-zoom-card.flipped .zoom-flipper { transform: rotateY(180deg); }
.zoom-face {
  position: absolute; inset: 0;
  border-radius: 16px; overflow: hidden; background: #111;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.zoom-back { transform: rotateY(180deg); border: 3px solid var(--gold); box-sizing: border-box; background: #1a1f38; }
.zoom-back img { width: 100%; height: 100%; object-fit: cover; display: block; }
.zoom-back-fallback {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif; font-weight: 900; font-size: 1.6rem; letter-spacing: 0.1em; color: var(--gold-bright);
}
.zoom-front img { width: 100%; height: 100%; object-fit: cover; display: block; }
.zoom-front::after,
.reveal-stage::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}
.card-zoom-card.rarity-rare .zoom-front::after,
.reveal-stage.rarity-rare::after {
  background: linear-gradient(115deg, transparent 30%, rgba(140,190,255,0.55) 48%, transparent 65%);
  background-size: 250% 250%;
  animation: holo-sweep 2.6s ease-in-out infinite;
}
.card-zoom-card.rarity-ultra_rare .zoom-front::after,
.reveal-stage.rarity-ultra_rare::after {
  background: linear-gradient(115deg, transparent 25%, rgba(242,207,91,0.7) 48%, rgba(200,120,255,0.4) 60%, transparent 75%);
  background-size: 250% 250%;
  animation: holo-sweep 2.2s ease-in-out infinite;
}
.card-zoom-card.rarity-legendaire .zoom-front::after,
.reveal-stage.rarity-legendaire::after {
  background: linear-gradient(115deg, transparent 20%, rgba(255,255,255,0.9) 45%, rgba(180,220,255,0.7) 55%, transparent 80%);
  background-size: 250% 250%;
  animation: holo-sweep 1.8s ease-in-out infinite;
}
@keyframes holo-sweep {
  0% { background-position: 0% 0%; }
  50% { background-position: 100% 100%; }
  100% { background-position: 0% 0%; }
}
.card-zoom-close {
  position: absolute; top: 20px; right: 26px;
  background: none; border: 1px solid var(--gold); color: var(--cream);
  border-radius: 50%; width: 36px; height: 36px; font-size: 1.1rem; cursor: pointer;
}
.card-zoom-hint { opacity: 0.6; font-size: 0.85rem; flex: 0 0 auto; text-align: center; }

.collection-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.collection-tabs button {
  background: var(--felt-darker);
  border: 1px solid rgba(212,175,55,0.4);
  color: var(--cream);
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
}
.collection-tabs button.active { background: var(--gold-bright); color: var(--ink); border-color: var(--gold-bright); }

/* ---------- Pack de cartes : visuel, halo et ouverture ---------- */
.pack-visual {
  width: 180px; margin: 20px auto;
  cursor: pointer;
  text-align: center;
  transition: transform 0.2s ease;
  border-radius: 14px;
  padding: 16px;
}
.pack-visual:hover { transform: scale(1.04); }
.pack-visual img { width: 100%; aspect-ratio: 3/4; object-fit: contain; border-radius: 10px; }
.pack-visual .pack-fallback {
  width: 100%; aspect-ratio: 3/4;
  border-radius: 10px;
  background: linear-gradient(160deg, var(--felt-light), var(--felt-darker));
  border: 2px dashed var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
}
.pack-visual p { margin-top: 10px; font-weight: 700; color: var(--gold-bright); }

.pack-halo-rare { box-shadow: 0 0 45px 14px rgba(255,255,255,0.55); animation: halo-pulse 1.8s ease-in-out infinite; }
.pack-halo-ultra_rare { box-shadow: 0 0 50px 16px rgba(242,207,91,0.65); animation: halo-pulse 1.6s ease-in-out infinite; }
.pack-halo-legendaire { box-shadow: 0 0 60px 20px rgba(200,225,255,0.75); animation: halo-pulse 1.3s ease-in-out infinite; }
@keyframes halo-pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.35); }
}

.pack-visual.opening { animation: pack-shake 0.5s ease-in-out; }
@keyframes pack-shake {
  0% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.05) rotate(-4deg); }
  50% { transform: scale(1.1) rotate(4deg); }
  75% { transform: scale(1.05) rotate(-2deg); }
  100% { transform: scale(0) rotate(0deg); opacity: 0; }
}

.reveal-stage {
  width: min(240px, 70vw); aspect-ratio: 5/7;
  margin: 0 auto;
  border-radius: 16px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.reveal-stage.card-back {
  background: linear-gradient(160deg, var(--felt-light), var(--felt-darker));
  border: 3px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.6rem;
  animation: card-back-pulse 1.6s ease-in-out infinite;
}
@keyframes card-back-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}
.reveal-stage img { width: 100%; height: 100%; object-fit: cover; display: block; }
.reveal-progress { text-align: center; margin-top: 14px; opacity: 0.8; font-weight: 700; }
.reveal-stage.slide-out-left { animation: slide-out-left 0.25s ease forwards; }
.reveal-stage.slide-out-right { animation: slide-out-right 0.25s ease forwards; }
.reveal-stage.slide-in-left { animation: slide-in-left 0.3s ease; }
.reveal-stage.slide-in-right { animation: slide-in-right 0.3s ease; }
@keyframes slide-out-left { to { transform: translateX(-160%) rotate(-8deg); opacity: 0; } }
@keyframes slide-out-right { to { transform: translateX(160%) rotate(8deg); opacity: 0; } }
@keyframes slide-in-left { from { transform: translateX(-160%) rotate(-8deg); opacity: 0; } to { transform: translateX(0) rotate(0); opacity: 1; } }
@keyframes slide-in-right { from { transform: translateX(160%) rotate(8deg); opacity: 0; } to { transform: translateX(0) rotate(0); opacity: 1; } }
.reveal-stage .new-badge {
  position: absolute; top: 8px; left: 8px;
  background: var(--gold-bright); color: var(--ink);
  font-weight: 900; font-size: 0.7rem;
  padding: 3px 10px; border-radius: 999px;
  box-shadow: 0 0 10px rgba(242,207,91,0.7);
  z-index: 2;
}

/* ---------- Rangée d'achat de packs (classeur général) ---------- */
.pack-shop-row { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; margin: 10px 0 20px; }
.pack-shop-item {
  background: var(--felt-darker);
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  width: 150px;
}
.pack-shop-item img { width: 90px; height: 110px; object-fit: contain; margin: 0 auto 8px; display: block; }
.pack-shop-item .pack-fallback-small {
  width: 90px; height: 110px; margin: 0 auto 8px;
  border-radius: 8px; border: 2px dashed var(--gold);
  display: flex; align-items: center; justify-content: center; font-size: 2rem;
}
.pack-shop-item .name { font-weight: 800; margin-bottom: 4px; font-size: 0.9rem; }
.pack-shop-item .price { opacity: 0.8; font-size: 0.85rem; margin-bottom: 8px; }

.binder-slot.missing img.placeholder { opacity: 0.35; filter: grayscale(1); }
.binder-slot .collection-tag { position: absolute; bottom: 4px; left: 6px; font-size: 0.55rem; opacity: 0.6; z-index: 1; }

.hand { display: flex; gap: 10px; justify-content: center; margin: 20px 0; flex-wrap: wrap; }
.playing-card {
  width: 64px; height: 92px;
  background: var(--cream);
  color: var(--ink);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.3rem;
  border: 2px solid #00000020;
  cursor: pointer;
  user-select: none;
}
.playing-card.held { outline: 3px solid var(--gold-bright); transform: translateY(-8px); }
.playing-card.red-suit { color: var(--red); }

.center-form {
  max-width: 420px;
  margin: 60px auto;
}

footer { text-align: center; padding: 30px; opacity: 0.6; font-size: 0.85rem; }

/* ==========================================================================
   THÈME ARCADE NÉON — surcharges globales (toutes les pages)
   ========================================================================== */

body {
  background:
    radial-gradient(circle at 10% 0%, rgba(255,63,164,0.18), transparent 40%),
    radial-gradient(circle at 90% 100%, rgba(45,226,255,0.16), transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(155,92,255,0.10), transparent 60%),
    linear-gradient(170deg, #0e0826 0%, #160c36 50%, #0a0620 100%);
  background-attachment: fixed;
}
/* Légères lignes de balayage façon écran CRT */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,0.025) 0px, rgba(255,255,255,0.025) 1px, transparent 1px, transparent 3px);
}

h1, h2, h3, .display {
  font-family: var(--font-pixel);
  font-weight: 700;
  color: var(--gold-bright);
  letter-spacing: 0.04em;
  text-shadow: 0 0 8px rgba(255,216,74,0.45), 0 2px 0 rgba(0,0,0,0.6);
}
h1 { text-transform: uppercase; text-shadow: 0 0 10px rgba(255,63,164,0.7), 0 0 22px rgba(255,63,164,0.35), 0 3px 0 rgba(0,0,0,0.6); }

a { color: var(--neon-cyan); }

/* ---------- Barre de menu ---------- */
.topbar {
  background: linear-gradient(180deg, rgba(14,8,38,0.97), rgba(22,12,54,0.92));
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, var(--neon-pink), var(--neon-purple), var(--neon-cyan)) 1;
  box-shadow: 0 4px 24px rgba(155,92,255,0.25);
}
.brand {
  font-family: var(--font-pixel);
  color: var(--gold-bright);
  text-shadow: 0 0 10px rgba(255,216,74,0.7), 0 3px 0 #b3301f;
  letter-spacing: 0.05em;
}
.brand::before { content: "👑 "; }
.nav-links a {
  font-family: var(--font-pixel);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.85rem;
  padding: 6px 8px;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease, text-shadow 0.15s ease;
}
.nav-links a:hover {
  color: var(--neon-cyan);
  text-shadow: 0 0 8px rgba(45,226,255,0.8);
}
.nav-links a.active {
  color: var(--gold-bright) !important;
  background: linear-gradient(180deg, rgba(255,63,164,0.35), rgba(155,92,255,0.25));
  box-shadow: inset 0 -2px 0 var(--neon-pink), 0 0 12px rgba(255,63,164,0.4);
  text-shadow: 0 0 8px rgba(255,216,74,0.7);
}
.wallet-pill {
  background: linear-gradient(180deg, #1c1045, #0e0826);
  border: 2px solid var(--gold);
  box-shadow: 0 0 12px rgba(245,184,46,0.45), inset 0 0 8px rgba(245,184,46,0.15);
  font-family: var(--font-pixel);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}
.site-ticker {
  background: linear-gradient(90deg, rgba(255,63,164,0.18), rgba(14,8,38,0.9), rgba(45,226,255,0.18));
  border-bottom: 1px solid rgba(255,63,164,0.35);
}
.site-ticker .ticker-track {
  font-family: var(--font-pixel);
  color: var(--gold-bright);
  text-shadow: 0 0 6px rgba(255,216,74,0.5);
}

/* ---------- Panneaux ---------- */
.card-panel {
  background: linear-gradient(180deg, rgba(27,16,64,0.88), rgba(14,8,38,0.92));
  border: 2px solid rgba(45,226,255,0.55);
  border-radius: 12px;
  box-shadow: 0 0 18px rgba(45,226,255,0.18), inset 0 0 24px rgba(45,226,255,0.06), 0 10px 30px rgba(0,0,0,0.45);
}
.card-panel h2, .card-panel h3 { color: var(--neon-cyan); text-shadow: 0 0 8px rgba(45,226,255,0.55), 0 2px 0 rgba(0,0,0,0.6); }

/* ---------- Boutons façon borne d'arcade ---------- */
.btn {
  font-family: var(--font-pixel);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: linear-gradient(180deg, #ffe066, #f5a623);
  color: #2a1400;
  border: 2px solid #ffe79a;
  border-bottom: 4px solid #b36b00;
  border-radius: 8px;
  box-shadow: 0 0 12px rgba(255,216,74,0.35);
  transition: transform 0.08s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 0 18px rgba(255,216,74,0.6); }
.btn:active { transform: translateY(2px); border-bottom-width: 2px; }
.btn.secondary {
  background: rgba(14,8,38,0.6);
  color: var(--neon-cyan);
  border: 2px solid var(--neon-cyan);
  border-bottom: 2px solid var(--neon-cyan);
  box-shadow: 0 0 10px rgba(45,226,255,0.3), inset 0 0 8px rgba(45,226,255,0.1);
}
.btn.secondary:hover { background: rgba(45,226,255,0.12); box-shadow: 0 0 16px rgba(45,226,255,0.55); }
.btn.secondary.selected {
  background: var(--neon-cyan);
  color: var(--ink);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 16px rgba(45,226,255,0.7);
}
.btn.danger {
  background: linear-gradient(180deg, #ff6fbf, var(--neon-pink));
  color: #fff;
  border: 2px solid #ffb3dc;
  border-bottom: 4px solid #a3105e;
  box-shadow: 0 0 12px rgba(255,63,164,0.45);
}

/* ---------- Formulaires ---------- */
input, select, textarea {
  background: rgba(10,6,28,0.9);
  border: 2px solid rgba(155,92,255,0.55);
  border-radius: 8px;
  color: var(--cream);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(45,226,255,0.45);
}
label { color: var(--neon-cyan); font-family: var(--font-pixel); letter-spacing: 0.03em; }

/* ---------- Tuiles de jeu (façon façade de borne) ---------- */
.game-tile {
  background: linear-gradient(170deg, #2d1b63 0%, #1a0f40 60%, #0e0826 100%);
  border: 2px solid rgba(255,63,164,0.6);
  box-shadow: 0 0 14px rgba(255,63,164,0.2), inset 0 0 18px rgba(155,92,255,0.15);
}
.game-tile:hover {
  transform: translateY(-4px);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 22px rgba(45,226,255,0.5), inset 0 0 18px rgba(45,226,255,0.15);
}
.game-tile .name {
  font-family: var(--font-pixel);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold-bright);
  text-shadow: 0 0 6px rgba(255,216,74,0.5);
}

/* ---------- Tableaux ---------- */
th { color: var(--neon-cyan); font-family: var(--font-pixel); }
th, td { border-bottom: 1px solid rgba(155,92,255,0.25); }
tr:hover td { background: rgba(45,226,255,0.05); }

/* ---------- Barres de défilement ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0e0826; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--neon-pink), var(--neon-purple)); border-radius: 6px; }

/* ---------- Pastille Emmyella ---------- */
.emmyella-pill {
  text-decoration: none;
  border-color: var(--neon-pink);
  color: #ffc2e6;
  box-shadow: 0 0 12px rgba(255,63,164,0.45), inset 0 0 8px rgba(255,63,164,0.15);
}
.emmyella-pill:hover { box-shadow: 0 0 18px rgba(255,63,164,0.75); }

/* ---------- Menu adapté aux téléphones et petites tablettes ---------- */
@media (max-width: 900px) {
  .topbar {
    grid-template-columns: 1fr; justify-items: center; gap: 8px; padding: 10px 12px;
    position: static; /* empilé sur plusieurs lignes, il ne doit pas rester collé et occuper l'écran */
  }
  .nav-links { gap: 4px 10px; justify-content: center; }
  .nav-links a { font-size: 0.78rem; padding: 4px 6px; }
  .nav-links-right { justify-self: center; }
  .wallet-pill { padding: 4px 12px; font-size: 0.95rem; }
  .brand { font-size: 1.2rem; }
}

/* ---------- Mode concentration (Time Stop, Feu rouge) ----------
   Pendant une partie on ne garde que le jeu : pas de cloche posée sur le bouton (un toucher raté coûterait la mise),
   et surtout pas de bandeau défilant, qui serait une horloge visible dans un jeu de chrono caché. */
body.focus-mode .topbar,
body.focus-mode .site-ticker,
body.focus-mode #notif-bell-btn,
body.focus-mode h1,
body.focus-mode .wrap > a:first-child { display: none !important; }
body.focus-mode .wrap { padding-top: 10px; }

/* Petits textes d'interface : en pixel, un « C » ressemble à un « O » (« ARTIOLE »). On garde le pixel pour les gros titres. */
.btn, label, th, .jp-badge, .pk-step b, .jp-risk b {
  font-family: 'Chiffres', 'Manrope', sans-serif;
  font-weight: 800;
  letter-spacing: 0.04em;
}

/* ---------- En-tête compact ---------- */
/* Avant : 170 à 220 px de haut (le bloc de droite s'empilait sur 4 lignes). Une seule rangée sur grand écran. */
.topbar { padding: 6px 16px; gap: 10px; border-bottom-width: 2px; }
.brand { font-size: 1.1rem; white-space: nowrap; line-height: 1.1; }
.nav-links { gap: 2px 4px; }
.nav-links a { font-size: 0.72rem; padding: 4px 5px; letter-spacing: 0.02em; line-height: 1.2; }
.wallet-pill { padding: 2px 10px; font-size: 0.88rem; border-width: 1.5px; line-height: 1.3; }
.nav-links-right { flex-wrap: nowrap; gap: 6px; white-space: nowrap; }
.nav-links-right a { padding: 4px 4px; }

@media (min-width: 901px) {
  .topbar { display: flex; flex-wrap: nowrap; align-items: center; }
  .brand { flex: 0 0 auto; }
  .nav-links-center { flex: 1 1 auto; min-width: 0; justify-content: center; }
  .nav-links-right { flex: 0 0 auto; }
}
@media (max-width: 900px) {
  .topbar { gap: 4px; padding: 6px 10px; }
  .brand { font-size: 1.05rem; }
  .nav-links { gap: 0 2px; }
  .nav-links a { font-size: 0.7rem; padding: 3px 5px; }
  .nav-links-right { gap: 6px; flex-wrap: wrap; }
  .wallet-pill { padding: 2px 9px; font-size: 0.82rem; }
}
@media (max-width: 480px) {
  .nav-links-right > a:first-child span { display: none; }   /* téléphone : la photo de profil suffit, le nom prendrait une ligne de plus */
  .nav-links-right { justify-content: center; }
}
