:root {
  --bg: #0a0f1f;
  --bg-2: #10172b;
  --panel: #141d3866;
  --panel-solid: #151e38;
  --line: #ffffff14;
  --line-2: #ffffff26;
  --text: #eef1fb;
  --muted: #9aa5c4;
  --accent: #ff4757;
  --accent-2: #d42e3e;
  --accent-ink: #ffffff;
  --common: #c9cfdf;
  --rare: #5fb0ff;
  --epic: #ffc23d;
  --epic-2: #ff6bd5;
  --danger: #ff5d5d;
  --radius: 16px;
  --display: 'Anton', Impact, sans-serif;
  --body: 'Outfit', system-ui, sans-serif;
  --card-ratio: 600 / 825;
  --red: #ef3b4b;
  --mid: #c48bff;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }

.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vw 40vw at 85% -10%, #3d6bff33, transparent 70%),
    radial-gradient(50vw 40vw at -10% 110%, #ef3b4b22, transparent 70%),
    repeating-linear-gradient(135deg, #ffffff05 0 2px, transparent 2px 14px);
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  border: 1px solid var(--line-2); background: #ffffff0d;
  padding: .7em 1.2em; border-radius: 999px; font-weight: 700;
  transition: transform .15s, background .15s, box-shadow .15s, opacity .15s;
}
.btn:hover:not(:disabled) { background: #ffffff1a; transform: translateY(-1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; box-shadow: 0 6px 24px #ff475740; }
.btn-primary:hover:not(:disabled) { background: #ff6371; }
.btn-gold { background: linear-gradient(135deg, var(--epic), #ff9b3d); color: #2a1600; border-color: transparent; box-shadow: 0 6px 24px #ffc23d40; }
.btn-block { width: 100%; }
.btn-sm { padding: .4em .9em; font-size: .9rem; }
.btn-danger { border-color: #ff5d5d66; color: #ffb3b3; }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; position: relative; overflow: hidden; }
.auth-fan { position: absolute; inset: 0; pointer-events: none; }
.auth-fan img {
  position: absolute; width: clamp(140px, 18vw, 240px); border-radius: 4.8% / 3.44%;
  box-shadow: 0 20px 60px #000a; opacity: .55; filter: saturate(.9);
}
.auth-box {
  position: relative; width: min(420px, 100%);
  background: #0d1430e6; backdrop-filter: blur(12px);
  border: 1px solid var(--line-2); border-radius: 24px; padding: 32px 28px;
  box-shadow: 0 30px 80px #000c;
}
.logo-big { font-family: var(--display); font-weight: 400; font-size: 3.2rem; line-height: .95; margin: 0; letter-spacing: .02em; text-align: center; }
.logo-big span { color: var(--accent); margin: 0 .15em; }
.logo-big small { display: block; font-size: 1.1rem; letter-spacing: .5em; color: var(--muted); margin-top: .4em; text-transform: uppercase; }
.auth-sub { text-align: center; color: var(--muted); margin: .6em 0 1.4em; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: #ffffff0a; border-radius: 999px; padding: 4px; margin-bottom: 18px; }
.tab { border: 0; background: none; padding: .55em; border-radius: 999px; font-weight: 700; color: var(--muted); }
.tab.active { background: var(--accent); color: var(--accent-ink); }
form label { display: block; font-weight: 600; font-size: .9rem; color: var(--muted); margin-bottom: 12px; }
form input, .input {
  display: block; width: 100%; margin-top: 6px; padding: .75em 1em;
  background: #00000040; border: 1px solid var(--line-2); border-radius: 12px; outline: none;
}
form input:focus, .input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #ff475733; }
.form-error { color: var(--danger); min-height: 1.4em; margin: 4px 0 10px; font-size: .9rem; }
.auth-hint { color: var(--muted); font-size: .9rem; text-align: center; margin: 16px 0 0; }

/* ---------- Barre du haut ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 12px clamp(16px, 3vw, 40px);
  background: #0a0f1fd9; backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.logo { font-family: var(--display); font-size: 1.6rem; text-decoration: none; letter-spacing: .02em; white-space: nowrap; }
.logo span { color: var(--accent); margin: 0 .1em; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { text-decoration: none; padding: .45em .9em; border-radius: 999px; font-weight: 600; color: var(--muted); }
.nav a:hover { color: var(--text); background: #ffffff0d; }
.nav a.active { color: var(--accent-ink); background: var(--accent); }
.me { display: flex; align-items: center; gap: 10px; position: relative; }
.points { display: inline-flex; align-items: center; gap: 8px; padding: .35em .9em .35em .4em; border-radius: 999px; background: #ffc23d1a; border: 1px solid #ffc23d55; font-weight: 800; color: var(--epic); }
.points.bump { animation: bump .5s; }
@keyframes bump { 40% { transform: scale(1.18); } }
.coin { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6c9, var(--epic) 45%, #b97a00); box-shadow: inset 0 0 0 2px #fff3, 0 0 10px #ffc23d88; display: inline-block; }
.user-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--panel-solid); font-weight: 800; text-transform: uppercase; }
.user-menu { position: absolute; right: 0; top: calc(100% + 8px); background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: 12px; padding: 6px; min-width: 220px; box-shadow: 0 20px 50px #000a; }
.user-menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: .6em .8em; border-radius: 8px; }
.user-menu button:hover { background: #ffffff10; }

main { padding: 28px clamp(16px, 3vw, 40px) 80px; max-width: 1400px; margin: 0 auto; }
h2.title { font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: .02em; margin: 0 0 4px; text-transform: uppercase; }
.lead { color: var(--muted); margin: 0 0 24px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }

/* ---------- Boutique ---------- */
.shop-top { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 16px; margin-bottom: 28px; }
@media (max-width: 1100px) { .shop-top { grid-template-columns: 1fr 1fr; } .shop-top .daily { grid-column: 1 / -1; } }
.daily { display: flex; align-items: center; gap: 18px; }
.daily-days { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.daily-days span { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: .8rem; font-weight: 800; background: #ffffff0a; border: 1px solid var(--line); color: var(--muted); }
.daily-days span.done { background: #ff475722; border-color: #ff475766; color: var(--accent); }
.daily-days span.next { border-color: var(--epic); color: var(--epic); }
.daily .grow { flex: 1; }
.daily h3 { margin: 0; font-size: 1.1rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.bar { height: 10px; border-radius: 99px; background: #ffffff12; overflow: hidden; margin-top: 10px; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width .6s; }
.bar.gold > i { background: linear-gradient(90deg, #ff9b3d, var(--epic)); }
.bar.blue > i { background: linear-gradient(90deg, #2a7fd4, var(--rare)); }
.bar.grey > i { background: linear-gradient(90deg, #7d8a82, var(--common)); }

.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.pack-card { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 24px 20px; text-align: center; }
.pack-card h3 { margin: 0; font-size: 1.25rem; }
.pack-card h3 .small { white-space: nowrap; }
.pack-card .desc { color: var(--muted); font-size: .9rem; margin: 0; min-height: 3em; flex: 1 1 auto; }  /* pousse progression + bouton en bas : alignés d’une carte à l’autre */
.pack-card .btn { min-width: 70%; }

/* Visuel de booster : une illustration de l'extension, recadrée, sous le nom du set */
.pack {
  --c1: #2a5bd7; --c2: #0d2a7a; --ink: #ffcb05;
  position: relative; width: 170px; aspect-ratio: 5 / 8; border-radius: 10px 10px 12px 12px;
  background: linear-gradient(160deg, var(--c1), var(--c2));
  box-shadow: 0 24px 50px #000b, inset 0 0 0 2px #ffffff22;
  overflow: hidden; transition: transform .25s;
  user-select: none;
}
.pack::before, .pack::after {
  content: ''; position: absolute; left: 0; right: 0; height: 14px; z-index: 3;
  background: repeating-linear-gradient(90deg, #ffffff40 0 6px, #ffffff14 6px 12px);
}
.pack::before { top: 0; }
.pack::after { bottom: 0; }
.pack .p-art { position: absolute; left: 9%; right: 9%; top: 15%; height: 47%; border-radius: 6px;
  background-size: 128% auto; background-position: 50% 17%; background-repeat: no-repeat;
  box-shadow: 0 0 0 3px var(--ink), 0 10px 20px #0008; }
.pack .p-band { position: absolute; left: 0; right: 0; top: 66%; text-align: center; z-index: 2; }
.pack .p-logo { font-family: var(--display); font-size: 1.05rem; letter-spacing: .3em; color: var(--ink); line-height: 1; }
.pack .p-sub.long { font-size: 1.25rem; }
.pack .p-sub { font-family: var(--display); font-size: 1.7rem; line-height: 1; color: #fff; text-shadow: 0 3px 0 #0007; margin-top: 4px; padding: 0 6px; }
.pack .p-tag { position: absolute; left: 0; right: 0; bottom: 22px; text-align: center; font-size: .66rem; font-weight: 800; letter-spacing: .25em; text-transform: uppercase; color: #ffffffb0; z-index: 2; }
.pack .p-shine { position: absolute; inset: -50%; z-index: 2; background: linear-gradient(105deg, transparent 40%, #ffffff40 50%, transparent 60%); animation: packshine 4s infinite; pointer-events: none; }
@keyframes packshine { 0% { transform: translateX(-60%); } 60%, 100% { transform: translateX(60%); } }
.pack.set-sv035 { --c1: #e8394a; --c2: #6a0e18; --ink: #ffffff; }
.pack.set-30th { --c1: #3a3324; --c2: #0c0a06; --ink: #e8c46a;
  box-shadow: 0 24px 50px #000b, 0 0 40px #e8c46a33, inset 0 0 0 2px #e8c46a66; }
.pack.set-30th::after, .pack.set-30th::before { background: repeating-linear-gradient(90deg, #e8c46a66 0 6px, #e8c46a22 6px 12px); }
.pack-card:hover .pack { transform: translateY(-6px) rotate(-2deg); }

/* Emballage réel : la photo du vrai booster remplace le visuel dessiné */
.pack.real { aspect-ratio: 5 / 9; border-radius: 3px; box-shadow: 0 24px 50px #000b;
  background: var(--pack-img) center / 100% 100% no-repeat; }
.pack.real::before, .pack.real::after { display: none; }
.pack.real .p-shine { background: linear-gradient(105deg, transparent 42%, #ffffff30 50%, transparent 58%); }
.pack.real .p-tag { left: auto; right: -4px; top: 26%; bottom: auto; padding: 4px 10px; border-radius: 4px 0 0 4px;
  background: #ffcb05; color: #1a1a1a; letter-spacing: .12em; box-shadow: 0 3px 8px #0007; transform: rotate(-4deg); }
.pack.real .pack-top, .big-pack.tear .pack.real .pack-top { background: var(--pack-img) center top / 100% 833.33% no-repeat; } /* 833 % = pack entier, le haut ne faisant que 12 % */

.odds { margin-top: 32px; }
.odds table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.odds th, .odds td { padding: .6em .8em; border-bottom: 1px solid var(--line); text-align: left; }
.odds th { color: var(--muted); font-weight: 600; }
.r-common { color: var(--common); }
.r-rare { color: var(--rare); }
.r-epic { color: var(--epic); }

/* ---------- Cartes ---------- */
.card {
  position: relative; aspect-ratio: var(--card-ratio);
  border-radius: 4.8% / 3.44%;
  transform-style: preserve-3d;
  --rx: 0deg; --ry: 0deg; --px: 50%; --py: 50%; --pa: 0;
}
.card-inner {
  position: absolute; inset: 0; border-radius: inherit; overflow: hidden;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .4s cubic-bezier(.2,.8,.2,1), box-shadow .3s;
  box-shadow: 0 10px 30px #0009;
  background: transparent;
}
.card.tilting .card-inner { transition: transform .06s linear; }
.card img { width: 100%; height: 100%; object-fit: contain; }

/* Finitions brillantes, calquées sur les vraies cartes (arc-en-ciel + reflet qui suivent le pointeur) :
   - holo (Rare holo du Set de Base) : seule l'illustration brille ;
   - reverse (version spéciale de 151) : toute la carte brille SAUF l'illustration ;
   - foil (belles cartes, et toute l'extension 30e Anniversaire) : la carte entière, gravée en diagonale.
   Zone de l'illustration par extension, en % de la carte. */
.card { --ax1: 5%; --ay1: 9%; --ax2: 95%; --ay2: 49%; }
.card.set-base1 { --ax1: 9.5%; --ay1: 12.5%; --ax2: 90.5%; --ay2: 52.5%; }
.card.set-30th { --ax1: 7%; --ay1: 9%; --ax2: 94.5%; --ay2: 49.5%; }

.card.r-HOLO .card-inner::before, .card.r-HOLO .card-inner::after,
.card.holo .card-inner::before, .card.holo .card-inner::after,
.card.foil .card-inner::before, .card.foil .card-inner::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
}
/* Couche 1 : arc-en-ciel métallique */
.card.r-HOLO .card-inner::before, .card.holo .card-inner::before, .card.foil .card-inner::before {
  z-index: 2;
  background:
    repeating-linear-gradient(0deg, #ff7773 5%, #ffed5f 10%, #a8ff5f 15%, #83fff7 20%, #7894ff 25%, #d875ff 30%, #ff7773 35%),
    repeating-linear-gradient(133deg, #0e152e 0%, #8fa3a3 3.8%, #93c4c4 4.5%, #8fa3a3 5.2%, #0e152e 10%, #0e152e 12%),
    radial-gradient(farthest-corner circle at var(--px) var(--py), #0000001a 12%, #00000026 20%, #00000040 120%);
  background-size: 200% 700%, 300% 300%, 200% 200%;
  background-position: 0% var(--py), var(--px) var(--py), var(--px) var(--py);
  background-blend-mode: screen, hue, hard-light;
  mix-blend-mode: color-dodge;
}
/* Couche 2 : éclat de lumière sous le pointeur */
.card.r-HOLO .card-inner::after, .card.holo .card-inner::after, .card.foil .card-inner::after {
  z-index: 3;
  background: radial-gradient(farthest-corner circle at var(--px) var(--py), #ffffffcc 0%, #ffffff40 22%, #0000 55%);
  mix-blend-mode: overlay;
  opacity: calc(.3 + var(--pa) * .6);
}

/* Holo : l'illustration seule, avec les paillettes « cosmos » du Set de Base */
.card.r-HOLO .card-inner::before {
  background:
    radial-gradient(circle at 30% 40%, #fff 0 .6px, #0000 1.4px) 0 0 / 9px 11px,
    radial-gradient(circle at 70% 60%, #fff 0 .5px, #0000 1.2px) 3px 5px / 13px 7px,
    repeating-linear-gradient(0deg, #ff7773 5%, #ffed5f 10%, #a8ff5f 15%, #83fff7 20%, #7894ff 25%, #d875ff 30%, #ff7773 35%) 0% var(--py) / 200% 700%,
    repeating-linear-gradient(133deg, #0e152e 0%, #8fa3a3 3.8%, #93c4c4 4.5%, #8fa3a3 5.2%, #0e152e 10%, #0e152e 12%) var(--px) var(--py) / 300% 300%;
  background-blend-mode: screen, screen, hue, normal;
  filter: brightness(.75) contrast(1.5) saturate(1.6);
  opacity: calc(.75 + var(--pa) * .25);
}
.card.r-HOLO .card-inner::before, .card.r-HOLO .card-inner::after {
  clip-path: polygon(var(--ax1) var(--ay1), var(--ax2) var(--ay1), var(--ax2) var(--ay2), var(--ax1) var(--ay2));
}

/* Reverse : le cadre brille, l'illustration reste mate */
.card.holo .card-inner::before {
  filter: brightness(.55) contrast(1.7) saturate(1.5);
  opacity: calc(.6 + var(--pa) * .25);
}
.card.holo .card-inner::before, .card.holo .card-inner::after {
  clip-path: polygon(evenodd, 0 0, 100% 0, 100% 100%, 0 100%, 0 0,
    var(--ax1) var(--ay1), var(--ax1) var(--ay2), var(--ax2) var(--ay2), var(--ax2) var(--ay1), var(--ax1) var(--ay1));
}

/* Évolutions Prismatiques : reverse à motif de Poké Balls, ou de Master Balls (violet) */
.card.holo.v-pokeball .card-inner::before, .card.holo.v-masterball .card-inner::before {
  background:
    var(--ball) 0 0 / 15% auto,
    repeating-linear-gradient(0deg, #ff7773 5%, #ffed5f 10%, #a8ff5f 15%, #83fff7 20%, #7894ff 25%, #d875ff 30%, #ff7773 35%) 0% var(--py) / 200% 700%,
    repeating-linear-gradient(133deg, #0e152e 0%, #8fa3a3 3.8%, #93c4c4 4.5%, #8fa3a3 5.2%, #0e152e 10%, #0e152e 12%) var(--px) var(--py) / 300% 300%;
  background-blend-mode: screen, hue, normal;
}
.card.holo.v-pokeball { --ball: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%23fff' stroke-width='2' opacity='.8'%3E%3Ccircle cx='20' cy='20' r='13'/%3E%3Cpath d='M7 20h8m10 0h8'/%3E%3Ccircle cx='20' cy='20' r='4'/%3E%3C/g%3E%3C/svg%3E"); }
.card.holo.v-masterball { --ball: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%23fff' stroke-width='2'%3E%3Ccircle cx='20' cy='20' r='13'/%3E%3Cpath d='M7 20h8m10 0h8M14 13l3 4 3-4 3 4 3-4'/%3E%3Ccircle cx='20' cy='20' r='4'/%3E%3C/g%3E%3C/svg%3E"); }
.card.holo.v-masterball .card-inner::before { filter: brightness(.6) contrast(1.6) saturate(1.8) hue-rotate(-40deg); opacity: calc(.75 + var(--pa) * .25); }
.card.holo.v-masterball .card-inner { box-shadow: 0 0 0 2px #b14bff, 0 0 24px #b14bff88; }

/* Foil : carte entière, plus discret */
.card.foil .card-inner::before {
  filter: brightness(.6) contrast(1.5) saturate(1.3);
  opacity: calc(.35 + var(--pa) * .4);
}

/* Sans pointeur (grille, mobile) : le reflet ondule tout seul */
.card.auto.r-HOLO .card-inner::before, .card.auto.holo .card-inner::before, .card.auto.foil .card-inner::before { animation: holoshift 6s ease-in-out infinite; }
.card.auto.r-HOLO .card-inner::after, .card.auto.holo .card-inner::after, .card.auto.foil .card-inner::after { animation: glareshift 6s ease-in-out infinite; }
/* Collection Classique : le cadre est une feuille d'or pailletée, comme sur les vraies rééditions.
   Masque par carte (public/cards/gold/, généré par scripts/gold-masks.py) : seul le cadre doré brille. */
.card .gold {
  position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: inherit;
  -webkit-mask: var(--gold-mask) center / 100% 100% no-repeat; mask: var(--gold-mask) center / 100% 100% no-repeat;
  background:
    linear-gradient(115deg, #0000 38%, #fff8 49%, #fffbe8 50%, #fff8 51%, #0000 62%) var(--px) var(--py) / 300% 300%,
    url('cards/gold/paillettes.png') calc(var(--px) * .25) calc(var(--py) * .25) / 90px 90px,
    url('cards/gold/paillettes.png') calc(var(--px) * -.4) calc(var(--py) * -.4) / 130px 130px,
    linear-gradient(135deg, #8a5a00, #f2c23c 16%, #b07a06 32%, #ffe07a 48%, #a06c05 64%, #f5c43e 80%, #8a5a00) var(--px) var(--py) / 250% 250%;
  background-blend-mode: overlay, normal, normal, normal;
  opacity: calc(.88 + var(--pa) * .12);
}
.card.auto .gold { animation: holoshift 6s ease-in-out infinite; }

@property --px { syntax: '<percentage>'; inherits: true; initial-value: 50%; }
@property --py { syntax: '<percentage>'; inherits: true; initial-value: 50%; }
@keyframes holoshift { 0%, 100% { --px: 20%; --py: 25%; } 50% { --px: 80%; --py: 75%; } }
@keyframes glareshift { 0%, 100% { opacity: .35; } 50% { opacity: .6; } }

/* Reflet doux sur toutes les cartes au survol */
.card .glare { position: absolute; inset: 0; z-index: 4; border-radius: inherit; pointer-events: none;
  background: radial-gradient(circle at var(--px) var(--py), #ffffff30, transparent 50%); opacity: var(--pa);
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .4s cubic-bezier(.2,.8,.2,1); }
.card.tilting .glare { transition: transform .06s linear; }

.card.epic .card-inner { box-shadow: 0 10px 30px #0009, 0 0 0 2px #ffc23d88, 0 0 30px #ffc23d55; }
.card.rare .card-inner { box-shadow: 0 10px 30px #0009, 0 0 0 1px #4fb4ff55; }

/* Dos de carte : le verso officiel, le même pour toutes les extensions (français comme anglais) */
.card-back {
  position: absolute; inset: 0; border-radius: inherit; overflow: hidden;
  background: #1d4a9a url('dos.webp') center / 100% 100% no-repeat;
}

/* ---------- Collection ---------- */
.progress-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.progress-grid .panel { padding: 16px 18px; }
.progress-grid .big { font-size: 1.8rem; font-weight: 800; line-height: 1.1; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 20px; }
.filters .input { width: auto; margin: 0; padding: .55em .9em; border-radius: 999px; }
.filters input.input { min-width: 200px; flex: 1; max-width: 320px; }
.chip { border: 1px solid var(--line-2); background: #ffffff08; padding: .45em .9em; border-radius: 999px; font-weight: 600; font-size: .9rem; color: var(--muted); }
.chip.active { background: #ff475722; border-color: var(--accent); color: var(--accent); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; }
.slot { position: relative; cursor: pointer; }
.slot:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 10px; }
.slot .card { transition: transform .2s; }
.slot:hover .card { transform: translateY(-4px); }
.slot.missing .card-inner { background: #0d1328; box-shadow: inset 0 0 0 2px #ffffff12; }
.slot.missing img { filter: grayscale(1) brightness(.18) blur(1px); }
.slot.missing .gold { display: none; }   /* pas de cadre doré sur une carte pas encore obtenue */
.slot.missing .num { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 2rem; color: #ffffff30; z-index: 5; }
.slot .badges { position: absolute; top: 6px; right: 6px; z-index: 6; display: flex; gap: 4px; }
.badge { white-space: nowrap; font-size: .72rem; font-weight: 800; padding: .15em .5em; border-radius: 999px; background: #000c; border: 1px solid var(--line-2); }
.badge.holo { background: linear-gradient(90deg, #ff3b6b, #ffd13b, #3dff7a, #3bd5ff, #8a5bff); color: #111; border: 0; }
.badge.holo.v-pokeball { background: linear-gradient(180deg, #ff4b4b 0 50%, #e23a3a 50%); color: #fff; }
.badge.holo.v-masterball { background: linear-gradient(90deg, #7a2bd6, #d24bd8); color: #fff; }
.badge.new { background: var(--accent); color: var(--accent-ink); border: 0; }
.slot .meta { display: flex; justify-content: space-between; gap: 6px; font-size: .8rem; margin-top: 6px; color: var(--muted); }
.slot .meta > span:first-child { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot .meta > span:last-child { flex-shrink: 0; }
.slot .meta b { color: var(--text); font-weight: 600; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.dot.COMMON { background: var(--common); } .dot.RARE { background: var(--rare); } .dot.EPIC { background: var(--epic); box-shadow: 0 0 6px var(--epic); }
.empty { text-align: center; color: var(--muted); padding: 60px 20px; }

/* ---------- Classement / historique / admin ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: .8em; border-bottom: 1px solid var(--line); text-align: left; }
.table th { color: var(--muted); font-weight: 600; font-size: .9rem; }
.table tr.me-row td { background: #ff475712; }
.table .rank { font-family: var(--display); font-size: 1.3rem; width: 3em; }
.table a { text-decoration: none; font-weight: 700; }
.table a:hover { color: var(--accent); }
.table-wrap { overflow-x: auto; }
.history-item { display: flex; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.history-item .when { width: 150px; color: var(--muted); font-size: .9rem; }
.history-item .thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.history-item .thumbs .card { width: 56px; }
.admin-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.admin-row label { margin: 0; }

/* ---------- Ouverture ---------- */
.opening {
  position: fixed; inset: 0; z-index: 50;
  background: radial-gradient(circle at 50% 45%, #18224a, #04060e 70%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  padding: 20px 16px; overflow: hidden;
  --beam: #7fd0ff;
  --epic-bg: radial-gradient(circle at 50% 45%, #5a3a00 0%, #1a0f00 45%, #000 80%);
}
/* Mode Épique : l'écran plonge dans l'or */
.opening::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .8s;
  background: var(--epic-bg);
}
.opening.epic-mode::before { opacity: 1; }
.opening.epic-mode .opening-hint, .opening.epic-mode .opening-actions { opacity: 0; }
.opening-stage { position: relative; width: 100%; flex: 1; display: grid; place-items: center; perspective: 1400px; min-height: 0; }
.opening-stage > * { grid-area: 1 / 1; }
.opening-hint { position: relative; color: var(--muted); margin: 0; min-height: 1.5em; text-align: center; font-weight: 600; transition: opacity .3s; }
.opening-actions { position: relative; z-index: 6; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; min-height: 48px; transition: opacity .3s; }
.bulk-opt { align-self: center; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .9rem; font-weight: 600; cursor: pointer; user-select: none; }
.bulk-opt input { width: 16px; height: 16px; accent-color: #f5c542; cursor: pointer; margin: 0; }
.bulk-opt:hover { color: var(--text); }
.fx-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-2); background: #ffffff0d; display: grid; place-items: center; color: var(--muted); padding: 0; }
.icon-btn:hover { color: var(--text); background: #ffffff1a; }
.op-sound { position: absolute; top: 16px; right: 16px; z-index: 7; }
/* Mode express (app.js) : allumé en cyan ; dans l'ouverture, à gauche du bouton son */
.express-btn.on { color: #7fe3ff; border-color: #7fe3ff88; background: #7fe3ff1f; box-shadow: 0 0 12px #7fe3ff33; }
.op-express { position: absolute; top: 16px; right: 62px; z-index: 7; }

/* Tremblements d'écran */
.opening.quake { animation: quake .45s; }
.opening.quake-big { animation: quake-big .9s; }
@keyframes quake { 20% { transform: translate(-6px, 3px); } 40% { transform: translate(5px, -4px); } 60% { transform: translate(-3px, 2px); } 80% { transform: translate(2px, -1px); } }
@keyframes quake-big {
  10% { transform: translate(-14px, 8px) rotate(-.6deg); } 20% { transform: translate(12px, -10px) rotate(.5deg); }
  30% { transform: translate(-10px, 6px); } 40% { transform: translate(8px, -6px) rotate(.3deg); }
  55% { transform: translate(-5px, 3px); } 70% { transform: translate(3px, -2px); } 85% { transform: translate(-1px, 1px); }
}

/* Booster à déchirer */
.big-pack { position: relative; z-index: 2; cursor: grab; transform: scale(1.5); animation: float 3s ease-in-out infinite; touch-action: none; }
.big-pack.grab { cursor: grabbing; animation-play-state: paused; }
@keyframes float { 50% { transform: scale(1.5) translateY(-10px); } }
.big-pack .tear-line { position: absolute; top: 9%; left: 4%; right: 4%; height: 3px; border-radius: 3px; background: #ffffff22; z-index: 4; pointer-events: none; overflow: hidden; }
.big-pack .tear-line i { display: block; width: 0; height: 100%; background: #fff; box-shadow: 0 0 12px #fff, 0 0 24px var(--beam); transition: width .08s; }
.big-pack .tear-line::after { content: '✂'; position: absolute; left: -2px; top: -9px; font-size: 14px; color: #fff; animation: hint-slide 1.8s ease-in-out infinite; }
.big-pack.grab .tear-line::after, .big-pack.shake .tear-line::after, .big-pack.tear .tear-line::after { display: none; }
@keyframes hint-slide { 0%, 15% { transform: translateX(0); opacity: 0; } 30% { opacity: 1; } 80% { transform: translateX(150px); opacity: 1; } 100% { transform: translateX(160px); opacity: 0; } }
.big-pack.shake { animation: shake .3s ease-in-out 3; }
@keyframes shake { 0%,100% { transform: scale(1.5) rotate(0); } 25% { transform: scale(1.56) rotate(-5deg); } 75% { transform: scale(1.56) rotate(5deg); } }
.big-pack.tear { animation: none; transform: scale(1.5); }
.big-pack.tear .pack { animation: tear .7s forwards; }
@keyframes tear { 30% { transform: scale(1.06); filter: brightness(2.2); } 100% { transform: translateY(140%) scale(.9); opacity: 0; } }
.big-pack.tear .pack-top { animation: teartop .7s forwards; background: inherit; }
.pack-top { position: absolute; top: 0; left: 0; right: 0; height: 12%; z-index: 3; }
@keyframes teartop { 100% { transform: translate(60px, -200px) rotate(35deg); opacity: 0; } }

/* Faisceau de lumière qui sort du booster */
.beam { position: absolute; left: 50%; top: 50%; margin: -60vh 0 0 -20px; z-index: 1; width: 40px; height: 120vh; opacity: 0; pointer-events: none;
  background: linear-gradient(to top, transparent, var(--beam) 40%, #fff 50%, var(--beam) 60%, transparent);
  filter: blur(14px); transform: scaleX(0); }
.beam.on { animation: beam 1s ease-out forwards; }
@keyframes beam { 0% { opacity: 0; transform: scaleX(0); } 25% { opacity: 1; transform: scaleX(3); } 100% { opacity: 0; transform: scaleX(12); } }

/* Rayons derrière la carte */
.rays {
  --ray: transparent;
  position: absolute; left: 50%; top: 50%; margin: -110vmax 0 0 -110vmax; z-index: 0; width: 220vmax; height: 220vmax; pointer-events: none; opacity: 0;
  background: repeating-conic-gradient(from 0deg, transparent 0deg, var(--ray) 2.5deg, transparent 5deg, transparent 15deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, #0007 7%, transparent 24%);
  mask-image: radial-gradient(circle, #000 0%, #0007 7%, transparent 24%);
  transition: opacity .5s; animation: rays-spin 18s linear infinite; will-change: transform;
}
.rays.on { opacity: .45; }
.rays.fast { animation-duration: 3s; opacity: .75; }
.rays.slow { animation-duration: 30s; }
@keyframes rays-spin { to { transform: rotate(360deg); } }

/* Paquet de cartes */
.deck-wrap { position: relative; z-index: 3; transition: transform .6s cubic-bezier(.2,.9,.3,1.2); }
.deck-wrap.lift { transform: scale(1.06) translateY(-6px); }
.deck-wrap.lift-big { transform: scale(1.14) translateY(-10px); transition-duration: 2.2s; }
.deck { position: relative; width: min(300px, 70vw, calc((100vh - 240px) * 0.717)); aspect-ratio: var(--card-ratio); --amp: 1.5px; }
.deck.charge { animation: vib .07s linear infinite; }
.deck.charge-2 { --amp: 3px; }
.deck.charge-3 { --amp: 5px; filter: brightness(1.3); }
@keyframes vib { 0% { transform: translate(var(--amp), 0); } 25% { transform: translate(0, var(--amp)); } 50% { transform: translate(calc(var(--amp) * -1), 0); } 75% { transform: translate(0, calc(var(--amp) * -1)); } }
.deck .flip { position: absolute; inset: 0; cursor: pointer; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.3,1.4,.5,1), opacity .4s; animation: dealin .55s cubic-bezier(.2,.9,.3,1.1) backwards; }
.deck .flip.fast { transition: transform .45s cubic-bezier(.2,1.6,.4,1), opacity .4s; }
@keyframes dealin { from { transform: translate(-30vw, 80vh) rotate(-25deg); opacity: 0; } }
.deck .flip .face, .deck .flip .back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 4.8% / 3.44%; }
.deck .flip .face { transform: rotateY(180deg); }
.deck .flip .face .card { width: 100%; height: 100%; }
.deck .flip.revealed { transform: rotateY(180deg); }
.deck .flip.buried { visibility: hidden; }
.deck .flip.under .back { box-shadow: none; }
.deck .flip.gone { transform: rotateY(180deg) translateX(-150%) rotate(-14deg); opacity: 0; pointer-events: none; }
/* L'aura annonce la rareté avant le retournement */
.deck .flip .back { box-shadow: none; }
.deck .flip.aura-RARE .back { box-shadow: 0 0 0 3px var(--rare), 0 0 40px #4fb4ffaa; animation: pulse-rare 1.4s infinite; }
.deck .flip.aura-EPIC .back { box-shadow: 0 0 0 3px var(--epic), 0 0 70px #ffc23dcc; animation: pulse-epic 1s infinite; }
.deck .flip.aura-holo .back::after { content: ''; position: absolute; inset: -4px; border-radius: inherit; z-index: -1;
  background: conic-gradient(#ff3b6b, #ffd13b, #3dff7a, #3bd5ff, #8a5bff, #ff3b6b); filter: blur(10px); animation: aura-glow 1.2s ease-in-out infinite; will-change: opacity; }
@keyframes pulse-rare { 50% { box-shadow: 0 0 0 3px var(--rare), 0 0 60px #4fb4ffdd; } }
@keyframes pulse-epic { 50% { box-shadow: 0 0 0 4px var(--epic), 0 0 110px #ffc23d; } }
@keyframes aura-glow { 50% { opacity: .55; } }
.deck .flip.epic-glow .face { animation: epic-glow 1.6s ease-in-out infinite; }
@keyframes epic-glow { 0%, 100% { box-shadow: 0 0 30px #ffc23d88, 0 0 0 2px #ffc23d; } 50% { box-shadow: 0 0 90px #ffc23d, 0 0 0 3px #fff1b8; } }
.reveal-label { position: absolute; left: 50%; bottom: -46px; transform: translateX(-50%); white-space: nowrap; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: .95rem; text-shadow: 0 2px 8px #000; }
.reveal-label .new-tag { color: var(--accent); }

/* Flash, ondes de choc, texte qui claque */
.flash { position: absolute; inset: 0; z-index: 6; pointer-events: none; background: radial-gradient(circle at 50% 45%, #fff, #ffffff00 60%); animation: flash .5s ease-out forwards; }
.flash.strong { background: #fff; animation-duration: .9s; }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }
/* Onde de choc : dessinée une fois à sa taille finale, puis seules l'échelle et l'opacité bougent
   (animer l'épaisseur du bord redessinait un grand cercle flouté à chaque image) */
.ring { position: fixed; z-index: 4; width: 1080px; height: 1080px; margin: -540px 0 0 -540px; border-radius: 50%; pointer-events: none;
  border: 3px solid var(--ring); box-shadow: 0 0 30px var(--ring), inset 0 0 30px var(--ring); will-change: transform, opacity;
  animation: ring 1.1s cubic-bezier(.1,.7,.3,1) backwards; }
@keyframes ring { from { transform: scale(.033); opacity: 1; } to { transform: scale(1); opacity: 0; } }
.slam { position: relative; z-index: 6; align-self: start; margin-top: 2vh; pointer-events: none; text-align: center; opacity: 0; }
.slam b { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(3rem, 9vw, 6.5rem); line-height: 1; letter-spacing: .03em; -webkit-text-stroke: 2px #0006; }
.slam small { display: block; font-weight: 700; font-size: 1.1rem; letter-spacing: .1em; text-transform: uppercase; color: #fff; text-shadow: 0 2px 10px #000; margin-top: 4px; }
.slam.rare b { color: var(--rare); text-shadow: 0 0 30px #4fb4ff, 0 4px 0 #0a3a66; }
.slam.holo b { background: linear-gradient(90deg, #ff3b6b, #ffd13b, #3dff7a, #3bd5ff, #8a5bff, #ff3b6b); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 18px #d68bff); }
.slam.epic b { color: var(--epic); text-shadow: 0 0 40px #ffc23d, 0 0 80px #ff9b3d, 0 5px 0 #6b3d00; }
.slam.go { animation: slam 2s cubic-bezier(.2,1.6,.4,1) forwards; }
@keyframes slam { 0% { opacity: 0; transform: scale(3.5) rotate(-6deg); } 14% { opacity: 1; transform: scale(1) rotate(-3deg); } 80% { opacity: 1; transform: scale(1.06) rotate(-3deg); } 100% { opacity: 0; transform: scale(1.1) rotate(-3deg); } }
@keyframes holo-text { to { background-position: 200% 0; } }

/* Récapitulatif */
.summary { position: relative; z-index: 3; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(8px, 1.5vw, 20px); width: min(1100px, 100%); }
.summary .slot { animation: pop .5s cubic-bezier(.2,1.5,.4,1) backwards; }
@keyframes pop { from { transform: scale(.5) translateY(40px); opacity: 0; } }
.summary .slot .meta { justify-content: center; text-align: center; }
.summary .slot.best .card { animation: best-float 3s ease-in-out infinite; }
.summary .slot.best-epic .card-inner { box-shadow: 0 0 0 2px var(--epic), 0 0 50px #ffc23daa; }
.summary .slot.best-rare .card-inner { box-shadow: 0 0 0 2px var(--rare), 0 0 40px #4fb4ff88; }
.summary .slot.best-common .card-inner { box-shadow: 0 0 0 2px #fff, 0 0 40px #d68bff88; }
@keyframes best-float { 50% { transform: translateY(-8px); } }
@media (max-width: 640px) { .summary { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Modal carte ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: #000c; backdrop-filter: blur(6px); }
.modal-body { position: relative; display: grid; grid-template-columns: auto minmax(0, 340px); gap: 32px; align-items: center; max-height: 100%; overflow: auto; padding: 8px; }
.modal-card { width: min(380px, 80vw, calc((100vh - 60px) * 0.717)); perspective: 1200px; }
.modal-info h3 { font-family: var(--display); font-weight: 400; font-size: 2.2rem; line-height: 1; margin: 6px 0 10px; text-transform: uppercase; }
.modal-info .row { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.version { padding: 12px 14px; border-radius: 12px; background: #ffffff08; border: 1px solid var(--line); margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.version.active { border-color: var(--accent); }
/* Fenêtre simple (confirmation, recyclage…) : un seul panneau, centré sur toute la largeur */
.modal-body > .panel:only-child, .modal-body > .season-gift:only-child { grid-column: 1 / -1; justify-self: center; }
.modal-close { position: absolute; top: 0; right: 0; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: #000a; font-size: 1.3rem; z-index: 2; }
@media (max-width: 760px) {
  .modal-body { grid-template-columns: 1fr; justify-items: center; gap: 16px; }
  .modal-card { width: min(300px, 72vw); }
}

/* ---------- Toasts ---------- */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(420px, calc(100% - 32px)); }
.toast { background: var(--panel-solid); border: 1px solid var(--line-2); padding: .8em 1.2em; border-radius: 12px; box-shadow: 0 10px 30px #000a; animation: toastin .3s; font-weight: 600; text-align: center; }
.toast.ok { border-color: #ff475788; }
.toast.err { border-color: #ff5d5d88; }
.toast.gold { border-color: var(--epic); color: var(--epic); }
@keyframes toastin { from { transform: translateY(20px); opacity: 0; } }

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  .shop-top { grid-template-columns: 1fr; }
  .topbar { flex-wrap: wrap; gap: 10px 16px; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; }
  .me { margin-left: auto; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; }
  .slot .meta { font-size: .72rem; }
  .history-item .when { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Pokémon : paliers de rareté, extensions, versions ---------- */
.r-t0 { color: var(--common); }
.r-t1 { color: var(--rare); }
.r-t2 { color: var(--mid); }
.r-t3 { color: var(--epic); }
.dot.t0 { background: var(--common); }
.dot.t1 { background: var(--rare); }
.dot.t2 { background: var(--mid); box-shadow: 0 0 5px var(--mid); }
.dot.t3 { background: var(--epic); box-shadow: 0 0 6px var(--epic); }
.bar.violet > i { background: linear-gradient(90deg, #7a4fd4, var(--mid)); }

.card.t1 .card-inner { box-shadow: 0 10px 30px #0009, 0 0 0 1px #5fb0ff44; }
.card.t2 .card-inner { box-shadow: 0 10px 30px #0009, 0 0 0 1px #c48bff66, 0 0 20px #c48bff33; }
.card.t3 .card-inner { box-shadow: 0 10px 30px #0009, 0 0 0 2px #ffc23d88, 0 0 30px #ffc23d55; }

/* Onglets d'extension */
.set-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.set-tab { text-decoration: none; border: 1px solid var(--line-2); background: #ffffff08; padding: .55em 1.1em; border-radius: 12px; font-weight: 700; color: var(--muted); display: flex; gap: .6em; align-items: baseline; }
.set-tab small { font-weight: 600; opacity: .8; }
.set-tab.active { background: #ff475722; border-color: var(--accent); color: var(--text); }

/* Collection (29/10/2026) : extensions rangées par série, une boîte par série */
.set-tabs:has(.series-group) { gap: 10px; align-items: stretch; }
/* Replié : seule la série de l'extension affichée reste visible */
.set-picker { position: relative; margin-bottom: 20px; }
.set-picker .set-tabs { margin-bottom: 0; }
.set-picker:not(.open) .series-group:not(:has(.set-tab.active)) { display: none; }
.set-picker.open .series-group:not(:has(.set-tab.active)) { animation: sp-in .3s ease-out backwards; }
@keyframes sp-in { from { opacity: 0; translate: 0 -6px; } }
.sp-toggle { position: absolute; z-index: 1; top: 6px; right: 8px; display: flex; align-items: center; gap: 6px; padding: .35em .5em .35em .85em;
  border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel-solid); color: var(--muted); font: inherit; font-size: .78rem; font-weight: 700;
  cursor: pointer; transition: color .15s, border-color .15s, background .15s; }
.sp-toggle:hover { color: var(--text); border-color: #ff475788; background: #22182c; }
.sp-toggle small { display: inline-grid; place-items: center; min-width: 1.6em; height: 1.6em; margin-left: 2px; border-radius: 999px; background: #ffffff14; font-size: .85em; }
.sp-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s; }
.set-picker.open .sp-toggle svg { transform: rotate(180deg); }
.set-picker.open .sp-more, .set-picker:not(.open) .sp-less { display: none; }
.series-group { flex: 1 1 auto; display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 16px;
  background: linear-gradient(180deg, #ffffff07, #ffffff02); border: 1px solid var(--line); }
.series-group .tab-series { margin: 0 4px; align-self: flex-start; display: flex; align-items: center; gap: 8px; }
.series-group .tab-series::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.series-group:has(.set-tab.active) { border-color: #ff475755; background: linear-gradient(180deg, #ff475712, #ffffff02); }
.series-group:has(.set-tab.active) .tab-series { color: var(--text); }
.sg-sets { display: flex; flex-wrap: wrap; gap: 6px; }
.series-group .set-tab { flex: 1 1 auto; flex-direction: column; align-items: stretch; gap: 5px; min-width: 128px; padding: .5em .8em .55em; border-radius: 11px;
  border-color: #ffffff14; transition: background .15s, border-color .15s, color .15s, transform .15s; }
.series-group .set-tab:hover { color: var(--text); border-color: var(--line-2); background: #ffffff0f; transform: translateY(-1px); }
.series-group .set-tab.active { background: #ff47571f; border-color: var(--accent); box-shadow: 0 6px 18px #ff475726; }
.st-name { display: flex; align-items: center; justify-content: space-between; gap: 8px; white-space: nowrap; font-size: .92rem; }
.st-prog { display: flex; align-items: center; gap: 8px; }
.st-prog i { flex: 1; height: 4px; border-radius: 4px; background: #ffffff14; overflow: hidden; position: relative; }
.st-prog i::after { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--p); border-radius: inherit; background: var(--muted); }
.set-tab.active .st-prog i::after { background: var(--accent); }
.set-tab.done .st-prog i::after { background: linear-gradient(90deg, var(--epic), #ff9b3d); }
.st-prog small { font-size: .72rem; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.set-tab.done { border-color: #ffc23d55; }
.set-tab.done .st-prog small { color: var(--epic); opacity: 1; }
/* Extension finie : onglet tout doré, avec un reflet qui passe */
.series-group .set-tab.done { position: relative; overflow: hidden; color: #ffe08a; border-color: #ffc23d99;
  background: linear-gradient(135deg, #ffc23d33, #ff9b3d14 60%, #ffc23d26); box-shadow: inset 0 1px 0 #ffe08a40, 0 4px 16px #ffc23d1f; }
.series-group .set-tab.done::before { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, #fff3c466 50%, transparent 65%); translate: -120% 0; animation: st-shine 5s ease-in-out infinite; }
@keyframes st-shine { 0%, 70% { translate: -120% 0; } 100% { translate: 120% 0; } }
.series-group .set-tab.done .set-code { color: #2a1600; background: linear-gradient(135deg, var(--epic), #ff9b3d); border-color: transparent; }
.series-group .set-tab.done .st-prog i { background: #ffc23d26; }
.series-group .set-tab.done:hover { background: linear-gradient(135deg, #ffc23d44, #ff9b3d22 60%, #ffc23d33); border-color: var(--epic); color: #fff1c2; }
.series-group .set-tab.done.active { border-color: var(--epic); box-shadow: 0 0 0 2px #ffc23d55, 0 6px 22px #ffc23d40, inset 0 1px 0 #ffe08a40; }
/* Série entièrement finie : la boîte passe aussi à l'or */
.series-group:not(:has(.set-tab:not(.done))) { border-color: #ffc23d66; background: linear-gradient(180deg, #ffc23d14, #ffffff02); }
.series-group:not(:has(.set-tab:not(.done))) .tab-series { color: var(--epic); }
.series-group:not(:has(.set-tab:not(.done))) .tab-series::before { background: var(--epic); box-shadow: 0 0 8px var(--epic); }
@media (prefers-reduced-motion: reduce) { .series-group .set-tab.done::before { animation: none; } }

/* Boutique : une carte par extension */
.pack-card .set-progress { width: 100%; font-size: .85rem; color: var(--muted); }
.pack-card .set-progress .bar { margin-top: 6px; height: 7px; }
.pack-card .btns { display: flex; flex-direction: column; gap: 8px; width: 100%; align-items: center; }
.free-panel { display: flex; align-items: center; gap: 18px; }
.free-panel h3 { margin: 0; font-size: 1.1rem; }
.free-panel .grow { flex: 1; }
.odds h4 { margin: 22px 0 6px; font-size: 1rem; }
.odds h4:first-of-type { margin-top: 8px; }

/* Récapitulatif : nombre de colonnes selon la taille du booster */
.summary { grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr)); padding: 10px 4px; }
/* Petit écran : le récapitulatif défile au lieu de déborder */
@media (max-width: 640px), (max-height: 700px) { .summary { max-height: 100%; overflow-y: auto; } }
.summary .slot.best-t1 .card-inner { box-shadow: 0 0 0 2px var(--rare), 0 0 40px #5fb0ff88; }
.summary .slot.best-t2 .card-inner { box-shadow: 0 0 0 2px var(--mid), 0 0 40px #c48bff88; }
.summary .slot.best-t3 .card-inner { box-shadow: 0 0 0 2px var(--epic), 0 0 50px #ffc23daa; }
@media (max-width: 640px) { .summary { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.deck .flip.aura-t1 .back { box-shadow: 0 0 0 3px var(--rare), 0 0 40px #5fb0ffaa; animation: pulse-rare 1.4s infinite; }
.deck .flip.aura-t2 .back { box-shadow: 0 0 0 3px var(--mid), 0 0 50px #c48bffaa; animation: pulse-mid 1.2s infinite; }
.deck .flip.aura-t3 .back { box-shadow: 0 0 0 3px var(--epic), 0 0 70px #ffc23dcc; animation: pulse-epic 1s infinite; }
@keyframes pulse-mid { 50% { box-shadow: 0 0 0 3px var(--mid), 0 0 80px #c48bffdd; } }
/* Auras de la carte du dessus : l'anneau est fixe et seule la lueur (un calque à part) pulse en opacité.
   Animer le box-shadow flouté redessinait la carte à chaque image (lag, surtout en violet). */
.deck .flip.aura-t1 .back { box-shadow: 0 0 0 3px var(--rare); animation: none; --glow: 0 0 50px #5fb0ffcc; }
.deck .flip.aura-t2 .back { box-shadow: 0 0 0 3px var(--mid); animation: none; --glow: 0 0 65px #c48bffdd; }
.deck .flip.aura-t3 .back { box-shadow: 0 0 0 4px var(--epic); animation: none; --glow: 0 0 90px #ffc23d; }
.deck .flip[class*=aura-t] .back::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: var(--glow); animation: aura-glow 1.2s ease-in-out infinite; will-change: opacity; }
.deck .flip.aura-t3 .back::before { animation-duration: 1s; }
/* Pas d'ombre noire autour de la carte retournée : sur le fond sombre, elle faisait une aura noire */
.deck .flip .face .card-inner { box-shadow: none; }
.slam.mid b { color: var(--mid); text-shadow: 0 0 30px #c48bff, 0 4px 0 #3d1a6b; }
.history-item .when small { display: block; }
@media (max-width: 640px) {
  .progress-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .progress-grid .panel { padding: 12px 14px; }
  .progress-grid .big { font-size: 1.4rem; }
}

/* ---------- Bascule entre les deux jeux Boosters (même compte) ---------- */
.switch-game {
  display: inline-flex; align-items: center; gap: .35em; text-decoration: none; white-space: nowrap;
  padding: .4em .9em; border-radius: 999px; font-weight: 700; font-size: .9rem;
  border: 1px solid var(--line-2); background: #ffffff0d; color: var(--text);
  transition: background .15s, transform .15s, border-color .15s;
}
.switch-game span { color: var(--muted); font-size: 1.05em; }
.switch-game:hover { background: #ffffff1a; border-color: #ffffff55; transform: translateY(-1px); }
.auth-switch { display: block; text-align: center; margin-top: 14px; font-weight: 700; font-size: .9rem; color: var(--muted); text-decoration: none; }
.auth-switch:hover { color: var(--text); }
@media (max-width: 480px) { .switch-game b { display: none; } .switch-game { padding: .4em .7em; } }

/* Achat de plusieurs boosters */
.qty { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 6px 0 10px; }
.qty .btn { width: 44px; height: 44px; padding: 0; font-size: 1.4rem; line-height: 1; }
.qty b { min-width: 2.2ch; font-size: 2.2rem; font-variant-numeric: tabular-nums; }
.qty-presets { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 4px; }

/* Récapitulatif de plusieurs boosters d'un coup (« Tout ouvrir sauf les rares ») : il défile */
.summary.bulk { align-self: stretch; max-height: 100%; overflow-y: auto; overscroll-behavior: contain; align-content: start; gap: clamp(6px, 1vw, 14px); padding: 14px 8px; }
.summary.bulk .slot .meta { font-size: .8rem; }
@media (max-width: 640px) { .summary.bulk { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- Statistiques de collection (24/10/2026) : un résumé + une liste compacte des raretés ---------- */
.coll-stats { display: grid; grid-template-columns: minmax(340px, 430px) 1fr; gap: 16px; margin-bottom: 24px; }
.coll-stats h4 { margin: 0 0 10px; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.cs-main { display: flex; gap: 20px; align-items: center; }
.cs-main.complete { border-color: #ffc23d66; box-shadow: 0 0 0 1px #ffc23d33, 0 10px 40px #ffc23d1a; }
.cs-ring { --p: 0; flex: none; width: 118px; height: 118px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), #ffffff12 0); }
.cs-main.complete .cs-ring { background: conic-gradient(var(--epic) calc(var(--p) * 1%), #ffffff12 0); }
.cs-ring > div { width: 94px; height: 94px; border-radius: 50%; background: var(--panel-solid); display: grid; place-content: center; text-align: center; }
.cs-ring b { font-size: 1.9rem; font-weight: 800; line-height: 1; }
.cs-ring b small { font-size: .9rem; color: var(--muted); }
.cs-ring span { font-size: .78rem; color: var(--muted); margin-top: 3px; }
.cs-side { flex: 1; min-width: 0; }
.cs-status { font-weight: 700; margin-bottom: 14px; }
.cs-main.complete .cs-status { color: var(--epic); }
.cs-side .cs-row { grid-template-columns: 6.5em minmax(50px, 1fr) 5.2em; }
.cs-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); column-gap: 32px; row-gap: 2px; }
.cs-row { display: grid; grid-template-columns: 10em minmax(50px, 1fr) 5.2em; align-items: center; gap: 10px; padding: 5px 0; font-size: .9rem; }
.cs-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-row .cs-bar { margin: 0; height: 6px; }
.cs-num { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.cs-num small { color: var(--muted); font-weight: 500; }
.cs-row.full .cs-num { color: var(--epic); }
@media (max-width: 760px) {
  .coll-stats { grid-template-columns: 1fr; }
  .cs-ring { width: 96px; height: 96px; }
  .cs-ring > div { width: 76px; height: 76px; }
  .cs-ring b { font-size: 1.5rem; }
}

/* ---------- Saison 2 (24/10/2026) ---------- */
.season-banner { display: flex; align-items: center; gap: 24px; margin-bottom: 24px; overflow: hidden; position: relative;
  background: linear-gradient(120deg, #ff475726, #ffc23d1f 55%, #5fb0ff1a); border-color: #ffc23d55; }
.sb-kicker { display: inline-block; font-size: .7rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: #2a1600;
  background: var(--epic); padding: .25em .7em; border-radius: 99px; }
.season-banner h3 { font-family: var(--display); font-weight: 400; font-size: 2rem; letter-spacing: .02em; margin: .25em 0 .15em; }
.season-banner p { margin: 0; }
.sb-text { flex: 1 1 260px; }
.sb-packs { display: flex; flex: 0 1 auto; }
.sb-packs a { display: block; width: 74px; margin-left: -14px; transition: transform .2s; }
.sb-packs a:first-child { margin-left: 0; }
.sb-packs a:nth-child(odd) { transform: rotate(-6deg); } .sb-packs a:nth-child(even) { transform: rotate(5deg) translateY(6px); }
.sb-packs a:hover { transform: translateY(-8px) scale(1.06); z-index: 2; }
.sb-packs .pack { width: 100%; box-shadow: 0 8px 18px #0009, inset 0 0 0 2px #ffffff22; }
@media (max-width: 700px) { .season-banner { flex-direction: column; align-items: stretch; } .sb-packs { justify-content: center; } .sb-packs a { width: 58px; } }
.pack-card { position: relative; }
.pack-card.is-new { border-color: #ffc23d44; }
.season-tag { position: absolute; top: 12px; left: 12px; z-index: 10; font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: #2a1600; background: var(--epic); padding: .3em .7em; border-radius: 99px; box-shadow: 0 4px 14px #ffc23d55; }
.pack-card.flash { animation: cardflash 1.4s ease-out; }
@keyframes cardflash { 0%, 30% { box-shadow: 0 0 0 3px var(--epic), 0 0 40px #ffc23d88; } 100% { box-shadow: 0 0 0 0 transparent; } }
.set-progress .done { color: var(--epic); }
.set-progress .v-line { white-space: nowrap; }
.season-gift { width: min(440px, 90vw); text-align: center; background: var(--panel-solid); border: 1px solid #ffc23d66; border-radius: 20px; padding: 28px 24px; }
.season-gift .title { margin: .4em 0; }
.season-gift .gift-pts { color: var(--epic); font-size: 1.3rem; }
.season-gift .coin { vertical-align: middle; }
.odds details { border-bottom: 1px solid var(--line); }
.odds summary { cursor: pointer; padding: 12px 4px; list-style-position: inside; }
.odds summary:hover b { color: var(--accent); }
.odds details[open] summary { padding-bottom: 6px; }
.odds details .table-wrap { margin-bottom: 14px; }

/* Zone d'illustration des cartes Wizards (même maquette que le Set de Base) */
.card.set-base2, .card.set-base3, .card.set-base5, .card.set-neo1 { --ax1: 9.5%; --ay1: 12.5%; --ax2: 90.5%; --ay2: 52.5%; }
/* 10 extensions : sur téléphone, les onglets défilent sur une ligne au lieu d'occuper l'écran */
@media (max-width: 700px) {
  .set-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 0 16px 4px; }
  .set-tabs::-webkit-scrollbar { display: none; }
  .set-tab { flex: none; }
  .series-group { flex: none; }
  .sg-sets { flex-wrap: nowrap; }
  .sp-toggle { position: static; margin: 0 0 8px auto; }
}

/* Transfert de points entre jeux (25/10/2026) */
.transfer .qty-presets { display: flex; gap: 8px; margin: -4px 0 12px; }
.transfer-sum { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px;
  background: #ffffff0a; border: 1px solid var(--line); font-size: .9rem; margin-bottom: 8px; }
.transfer-sum .burn { color: var(--danger, #ff5d5d); }
.transfer h4 { margin: 18px 0 6px; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.transfer-hist { display: grid; gap: 4px; font-size: .85rem; max-height: 160px; overflow: auto; }
.transfer-hist > div { display: flex; justify-content: space-between; gap: 10px; }

/* Classement lisible avec 10 extensions (25/10/2026) : vue générale + une extension à la fois */
.lb-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.lb-chips .chip { text-decoration: none; }
.lb-table td { vertical-align: middle; }
.lb-wide { min-width: 180px; }
.lb-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.lb-bar { margin-top: 6px; height: 6px; max-width: 260px; }
.badge.lb-done { background: #ffc23d22; color: var(--epic); border-color: #ffc23d66; }
@media (max-width: 700px) {
  .lb-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 0 16px 4px; }
  .lb-chips::-webkit-scrollbar { display: none; }
  .lb-chips .chip { flex: none; }
  .lb-wide { min-width: 130px; }
}

/* Classement général : ligne dépliable avec les stats du joueur par extension */
.lb-row { cursor: pointer; }
.lb-row:hover td { background: #ffffff06; }
.lb-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.lb-chev { display: inline-block; width: 1.1em; color: var(--muted); transition: transform .2s; }
.lb-row[aria-expanded="true"] .lb-chev { transform: rotate(90deg); color: var(--accent); }
.lb-row[aria-expanded="true"] td { border-bottom-color: transparent; }
.lb-detail > td { padding: 4px 12px 18px !important; }
.lb-sets { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 10px; }
.lb-set { display: block; text-decoration: none; color: inherit; padding: 10px 12px; border-radius: 12px; background: #ffffff08; border: 1px solid var(--line); }
.lb-set:hover { border-color: var(--line-2); background: #ffffff0d; }
.lb-set.done { border-color: #ffc23d66; background: #ffc23d10; }
.lb-set.none { opacity: .55; }
.lb-set-head { display: flex; justify-content: space-between; gap: 6px; margin-bottom: 4px; font-size: .9rem; }
.lb-set-head b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.lb-set-head span { white-space: nowrap; flex: none; }
.lb-set .lb-bar { margin: 3px 0 6px; height: 5px; }
.lb-set .small { font-size: .8rem; }
@media (max-width: 700px) {
  /* Le tableau défile en largeur : le détail reste calé sur l'écran */
  .lb-detail .lb-sets { position: sticky; left: 0; width: calc(100vw - 66px); grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lb-set { min-width: 0; padding: 9px 10px; }
}

/* Menu des points (25/10/2026) : transfert vers l'autre jeu + un petit mot */
.points-wrap { position: relative; }
button.points { font: inherit; font-weight: 800; cursor: pointer; }
button.points:hover { background: #ffc23d2e; }
.points-menu { min-width: 260px; padding: 10px; }
.pm-total { display: flex; align-items: center; gap: 8px; font-weight: 700; padding: 4px 8px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.pm-total b { color: var(--epic); font-size: 1.15rem; }
.pm-joke { margin: 8px 8px 2px; font-size: .8rem; font-style: italic; color: var(--muted); line-height: 1.4; }
.transfer-cap { font-size: .88rem; margin: 0 0 12px; padding: 8px 10px; border-radius: 10px; background: #ffc23d14; border: 1px solid #ffc23d44; }
.transfer-cap.full { color: var(--danger, #ff5d5d); background: #ff5d5d14; border-color: #ff5d5d55; }
.lb-row td:nth-child(2) { white-space: nowrap; }

/* Saison 2.1 (26/10/2026) : boutique rangée par série, extensions à venir avec compte à rebours, cagnotte */
.series { margin-bottom: 34px; }
/* auto-fill : une série d'une ou deux extensions garde des cartes de taille normale */
.series .packs { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.series-head { display: flex; align-items: baseline; gap: 10px; margin: 0 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line);
  font-family: var(--display); font-weight: 400; font-size: 1.6rem; letter-spacing: .02em; }
.series-head > span { font-family: inherit; font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--epic); }
.series-head small { font-family: system-ui, sans-serif; font-size: .8rem; letter-spacing: 0; }
/* Favoris et séries masquées (26/10/2026) */
.series-toggle { margin-left: auto; align-self: center; font: 600 .75rem system-ui, sans-serif; color: var(--muted); background: none;
  border: 1px solid var(--line); border-radius: 99px; padding: .3em .8em; cursor: pointer; }
.series-toggle:hover { color: var(--text); border-color: var(--muted); }
.fav-series .series-head > span { font-size: 1rem; letter-spacing: 0; }
.fav-btn { position: absolute; top: 8px; right: 10px; z-index: 10; font-size: 1.45rem; line-height: 1; background: none; border: 0;
  color: var(--muted); cursor: pointer; padding: 4px; transition: transform .15s; }
.fav-btn:hover { transform: scale(1.2); color: var(--epic); }
.fav-btn.on { color: var(--epic); text-shadow: 0 0 12px #ffc23d88; }
.hidden-series { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -14px 0 30px; }
.pack-card.locked .pack { filter: grayscale(.85) brightness(.55) blur(1.5px); pointer-events: none; }
.pack-card.locked .pack::after { content: '🔒'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.6rem; filter: none; }
.pack-card.locked .set-progress b, .season-banner .countdown { color: var(--epic); font-variant-numeric: tabular-nums; }
.tab-series { flex: none; align-self: center; font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 2px 0 8px; }
.tab-series:first-child { margin-left: 0; }
.commu-panel { display: flex; align-items: center; gap: 18px; }
.commu-panel h3 { margin: 0; font-size: 1.1rem; }
.commu-panel .grow { flex: 1; }
.commu-pot { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px; margin: 6px 0 12px; border-radius: 14px;
  background: #ffc23d14; border: 1px solid #ffc23d44; }
.commu-pot > b { font-size: 1.6rem; color: var(--epic); display: flex; align-items: center; gap: 8px; }
.commu-pot [data-countdown] { font-variant-numeric: tabular-nums; }

/* Happy hour et badge Généreux (26/10/2026) */
.hh-pill { align-self: center; white-space: nowrap; font-size: .75rem; font-weight: 800; padding: .35em .75em; border-radius: 999px;
  background: linear-gradient(90deg, #ff9b3d, #ffc23d); color: #2a1600; box-shadow: 0 0 18px #ffc23d55; }
.hh-banner { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; border-color: #ffc23d88;
  background: linear-gradient(90deg, #ffc23d22, #ff9b3d11); }
.hh-banner .hh-ico { font-size: 2rem; }
.hh-banner b[data-countdown], .hh-line b[data-countdown] { font-variant-numeric: tabular-nums; color: var(--epic); }
/* Prochaine happy hour (29/10/2026) : bandeau fin aligné sur les blocs de la boutique */
.hh-line { display: flex; align-items: center; gap: 14px; margin: 0 0 20px; padding: 10px 16px; border-radius: var(--radius);
  border: 1px solid #ffc23d2e; background: linear-gradient(90deg, #ffc23d12, transparent 70%), var(--panel); font-size: .9rem; }
.hh-line .hh-ico { flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem; background: #ffc23d1c; }
.hh-what { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.hh-what .muted { font-size: .82rem; }
.hh-when { flex: none; padding: .35em .85em; border-radius: 999px; background: #ffc23d14; border: 1px solid #ffc23d44; font-size: .82rem; white-space: nowrap; }
.hh-when b[data-countdown] { font-size: .95rem; }
@media (max-width: 560px) { .hh-line { flex-wrap: wrap; row-gap: 8px; } .hh-what { flex-basis: calc(100% - 50px); } .hh-when { margin-left: 50px; } }
.hh-tag { font-size: .7rem; font-weight: 800; color: var(--epic); }
.badge.generous { margin-left: 6px; background: #ff6bd51a; border-color: #ff6bd566; color: #ff9be4; font-size: .66rem; vertical-align: middle; }
.badge.generous.gold { background: #ffc23d22; border-color: #ffc23d88; color: var(--epic); }
@media (max-width: 700px) { .hh-pill span { display: none; } }

/* Achat direct depuis la collection (26/10/2026) */
.coll-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Dock de recyclage (29/10/2026) : fixé en bas de l'écran, toujours au même endroit */
@property --rd-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.recycle-dock { --rc: #3dffb0; --rc-2: #19c3ff;
  position: fixed; z-index: 40; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: flex; align-items: stretch; gap: 6px; padding: 6px; border-radius: 22px; width: max-content; max-width: calc(100% - 24px);
  background: linear-gradient(#0d1428ee, #0a0f1fee) padding-box,
    conic-gradient(from var(--rd-a), #ffffff1a, #ffffff1a 60%, var(--rc) 75%, var(--rc-2) 85%, #ffffff1a) border-box;
  border: 1.5px solid transparent; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 50px #000c, inset 0 1px 0 #ffffff12; animation: rd-in .45s cubic-bezier(.2, 1.3, .4, 1); }
.recycle-dock.has-dup { animation: rd-in .45s cubic-bezier(.2, 1.3, .4, 1), rd-spin 4s linear infinite; }
@keyframes rd-in { from { translate: 0 30px; opacity: 0; } }
@keyframes rd-spin { to { --rd-a: 360deg; } }

.rd-ico { flex: none; width: 46px; border-radius: 16px; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 25%, #3dffb033, transparent 70%), #ffffff08; color: var(--rc); }
.rd-ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 6px #3dffb088); }
.recycle-dock:not(.has-dup) .rd-ico { color: var(--muted); }
.recycle-dock:not(.has-dup) .rd-ico svg { filter: none; }
.recycle-dock:has(.rd-btn:hover:not(:disabled)) .rd-ico svg { animation: rd-turn 1.2s cubic-bezier(.5, 0, .3, 1) infinite; }
@keyframes rd-turn { to { transform: rotate(360deg); } }

.rd-btn { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; min-width: 160px; padding: 7px 14px 8px;
  border-radius: 16px; border: 1px solid #ffffff12; background: #ffffff08; color: var(--text); font: inherit; text-align: left; cursor: pointer;
  transition: background .2s, border-color .2s, transform .15s, box-shadow .2s, filter .2s; }
.rd-btn:hover:not(:disabled) { background: #3dffb014; border-color: #3dffb066; transform: translateY(-2px); box-shadow: 0 8px 22px #3dffb022; }
.rd-btn:active:not(:disabled) { transform: translateY(0) scale(.98); }
.rd-btn:disabled { opacity: .45; cursor: not-allowed; }
.rd-label { font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-val { display: flex; align-items: baseline; gap: 8px; }
.rd-val b { font-family: var(--display); font-size: 1.45rem; font-weight: 400; line-height: 1.05; letter-spacing: .02em; }
.rd-val small { font-size: .75rem; font-weight: 700; color: var(--rc); white-space: nowrap; }
.rd-btn:disabled .rd-val small { color: var(--muted); }
.rd-btn.rd-all:not(:disabled) { background: linear-gradient(135deg, #3dffb0, #19c3ff); border-color: transparent; color: #04241a;
  box-shadow: 0 6px 22px #19c3ff40, inset 0 1px 0 #ffffff80; }
.rd-btn.rd-all:not(:disabled) .rd-label, .rd-btn.rd-all:not(:disabled) .rd-val small { color: #04352a; }
.rd-btn.rd-all:hover:not(:disabled) { filter: brightness(1.08); box-shadow: 0 10px 28px #19c3ff66, inset 0 1px 0 #ffffff80; }
.rd-hh { display: grid; place-items: center; padding: 0 10px; border-radius: 14px; font-size: .75rem; font-weight: 800;
  color: var(--epic); background: #ffc23d14; border: 1px solid #ffc23d44; white-space: nowrap; }

/* La grille et les messages passent au-dessus du dock */
main:has(.recycle-dock) { padding-bottom: 130px; }
body:has(.recycle-dock) .toasts { bottom: calc(100px + env(safe-area-inset-bottom)); }
@media (max-width: 560px) {
  .recycle-dock { left: 12px; right: 12px; transform: none; width: auto; max-width: none; }
  .rd-ico { display: none; }
  .rd-btn { flex: 1; min-width: 0; padding: 7px 10px 8px; }
  .rd-label { max-width: 100%; }
  .rd-val { flex-direction: column; gap: 0; }
  .rd-hh { padding: 0 8px; }
}

/* ---------- Coffre rare et objets légendaires (27/10/2026) ---------- */
/* Le coffre reprend la mécanique du booster : .pack-top = couvercle qui s'envole à l'ouverture */
.pack.coffre { --c1: #5a3414; --c2: #2a1607; --accent: var(--epic); --w: 190px; width: var(--w); aspect-ratio: 5 / 4; border-radius: 14px 14px 10px 10px; overflow: visible;
  background: repeating-linear-gradient(90deg, #ffffff07 0 3px, transparent 3px 22px), linear-gradient(180deg, var(--c1), var(--c2));
  box-shadow: 0 24px 50px #000b, 0 0 40px #ffc23d33, inset 0 0 0 3px #d49b1a, inset 0 0 0 6px #0005; }
.pack.coffre::before, .pack.coffre::after { display: none; }
.pack.coffre .pack-top { height: 40%; border-radius: 14px 14px 4px 4px; z-index: 3;
  background: linear-gradient(180deg, #7a4a1c, #4a2a0e); box-shadow: inset 0 0 0 3px #d49b1a, inset 0 -6px 0 #0004, 0 3px 0 #0006; }
.pack.coffre .c-band { position: absolute; top: 0; bottom: 0; left: 18%; width: 9%; background: linear-gradient(90deg, #a87412, #ffd36b, #a87412);
  box-shadow: calc(var(--w) * .55) 0 0 #d49b1a; }
.pack.coffre .c-band-2 { top: 40%; }
.pack.coffre .c-lock { position: absolute; z-index: 4; top: 30%; left: 50%; width: 30px; height: 36px; margin-left: -15px; border-radius: 6px;
  background: radial-gradient(circle at 50% 38%, #2a1607 0 4px, transparent 5px), linear-gradient(180deg, #ffe08a, #c78b12); box-shadow: 0 3px 0 #0007, 0 0 16px #ffc23d88; }
.pack.coffre .c-lock::after { content: ''; position: absolute; left: 50%; top: 18px; width: 3px; height: 9px; margin-left: -1.5px; background: #2a1607; border-radius: 2px; }
.pack.coffre .p-tag { position: absolute; left: 0; right: 0; text-align: center; font-size: .7rem; font-weight: 800; letter-spacing: .25em; text-transform: uppercase; bottom: 10px; color: #ffe08a; text-shadow: 0 1px 0 #000; z-index: 2; }
.big-pack.big-coffre .tear-line { top: 39%; }
.big-pack.big-coffre .tear-line::after { content: '🗝'; }
.big-pack.big-coffre.tear .pack-top { animation: coffrelid .7s forwards; }
@keyframes coffrelid { 40% { transform: translateY(-30px) rotate(-8deg); } 100% { transform: translate(-40px, -220px) rotate(-40deg); opacity: 0; } }

.coffre-panel { display: flex; align-items: center; gap: 28px; margin-bottom: 24px; padding: 22px 26px; }
.coffre-panel .cp-text { flex: 1; min-width: 0; }
.coffre-panel h3 { font-family: var(--display); font-weight: 400; font-size: 1.9rem; margin: .25em 0 .2em; }
.coffre-panel p { margin: 0 0 10px; }
.coffre-panel .sb-kicker { background: linear-gradient(90deg, #c77a00, #ffd36b); color: #2a1607; }
.coffre-panel.ferme { opacity: .85; }
.coffre-panel.ferme .pack.coffre { --w: 130px; filter: grayscale(.6) brightness(.75); }
.coffre-panel.ouvert { border-color: var(--l1); background: radial-gradient(120% 140% at 0% 50%, color-mix(in srgb, var(--l2) 30%, transparent), transparent 60%), var(--panel);
  box-shadow: 0 0 0 1px var(--l1), 0 0 50px color-mix(in srgb, var(--l1) 35%, transparent); animation: coffre-pulse 2.4s ease-in-out infinite; }
@keyframes coffre-pulse { 50% { box-shadow: 0 0 0 1px var(--l1), 0 0 80px color-mix(in srgb, var(--l1) 55%, transparent); } }
.coffre-panel .cp-pack { cursor: pointer; padding: 10px; }
.coffre-panel .cp-pack:hover .pack { transform: translateY(-6px) rotate(-2deg); }
.coffre-panel .cp-item { display: flex; align-items: center; gap: 14px; margin: 10px 0 12px; }
.coffre-panel .btn { margin-top: 4px; }
@media (max-width: 700px) {
  .coffre-panel { flex-direction: column; text-align: center; gap: 14px; padding: 18px 16px; }
  .coffre-panel .cp-item { text-align: left; }
}

/* Coffre scellé compact (29/10/2026) : 1/4 de la largeur, la saison prend les 3/4 */
.shop-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: 16px; margin-bottom: 24px; }
.shop-hero > .panel { margin-bottom: 0; }
.coffre-panel.ferme { flex-direction: column; align-items: stretch; justify-content: center; gap: 8px; padding: 18px 20px; text-align: left; }
.coffre-panel.ferme .cp-head { display: flex; align-items: center; gap: 14px; }
.coffre-panel.ferme .pack.coffre { zoom: .5; flex: none; }
.coffre-panel.ferme h3 { font-size: 1.35rem; line-height: 1.05; margin: .3em 0 0; }
.coffre-panel.ferme p { margin: 0; }
.coffre-panel.ferme .cp-push { margin: 4px 0 0; }
.coffre-panel.ferme .cp-count { display: block; margin-top: 4px; font-size: .8rem; color: var(--muted); text-decoration: none; }
.coffre-panel.ferme .cp-count b { color: var(--epic); font-variant-numeric: tabular-nums; }
.coffre-panel.ferme .cp-count:hover { color: var(--text); }
.coffre-panel.ferme .cp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
/* Côte à côte s'il y a la place, sinon l'un sous l'autre sur toute la largeur */
.coffre-panel.ferme .cp-actions > .btn { flex: 1 0 auto; margin: 0; }
.coffre-panel.ferme .cp-actions .cp-push { flex: 999 1 190px; margin: 0; }
.coffre-panel.ferme .cp-actions .cp-push .btn { width: 100%; margin: 0; white-space: nowrap; }
.coffre-panel.ferme .cp-actions .cp-push span { display: none; }
.coffre-panel.ferme .cp-actions p.muted { flex-basis: 100%; }
.coffre-kicker { background: linear-gradient(90deg, #c77a00, #ffd36b); color: #2a1607; }
.shop-hero .season-banner { gap: 20px; }
.shop-hero .sb-packs a { width: 62px; margin-left: -12px; }
.shop-hero .sb-packs a:first-child { margin-left: 0; }
@media (max-width: 1100px) {
  .shop-hero { grid-template-columns: minmax(0, 1fr); }
}

/* Médaillon d'un objet légendaire */
.leg-badge { --s: 26px; position: relative; display: inline-grid; place-items: center; flex: none; width: var(--s); height: var(--s); border-radius: 50%; vertical-align: middle;
  background: radial-gradient(circle at 35% 30%, #ffffffaa, transparent 45%), linear-gradient(140deg, var(--l1, #ffd36b), var(--l2, #c77a00));
  box-shadow: 0 0 0 2px #ffffffcc, 0 0 0 3px var(--l2, #c77a00), 0 0 14px var(--l1, #ffd36b); }
.leg-badge i { font-style: normal; font-size: calc(var(--s) * .56); line-height: 1; filter: drop-shadow(0 1px 1px #0008); }
.leg-badge i img { display: block; width: calc(var(--s) * .74); height: calc(var(--s) * .74); }
.leg-badge.sm { --s: 20px; margin-left: 6px; box-shadow: 0 0 0 1.5px #ffffffcc, 0 0 8px var(--l1, #ffd36b); }
.leg-badge.sm + .leg-badge.sm { margin-left: 3px; }
.leg-badge.lg { --s: 52px; }
.leg-badge.xl { --s: min(42vw, 190px); box-shadow: 0 0 0 5px #ffffffdd, 0 0 0 9px var(--l2), 0 0 60px var(--l1), 0 0 140px var(--l2); }
.leg-badge.lg::after, .leg-badge.xl::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0 70%, #ffffffcc 80%, transparent 90%); animation: leg-spin 3s linear infinite;
  -webkit-mask: radial-gradient(circle, transparent calc(50% - 3px), #000 calc(50% - 2px)); mask: radial-gradient(circle, transparent calc(50% - 3px), #000 calc(50% - 2px)); }
@keyframes leg-spin { to { transform: rotate(1turn); } }

/* Vitrine (classement) */
.leg-vitrine { margin-bottom: 20px; }
.leg-vitrine h3 { margin-top: 0; }
.leg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.leg-slot { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 10px; text-align: center; border-radius: 14px; border: 1px solid var(--line-2); background: #ffffff06; }
.leg-slot b { line-height: 1.15; }
.leg-slot.trouve { border-color: #ffc23d66; background: #ffc23d10; }
.leg-slot.coffre { --l1: #ffc23d; border-color: var(--epic); animation: coffre-pulse 2.4s ease-in-out infinite; }
.leg-slot.nature .leg-badge { filter: saturate(.5) brightness(.8); }
.leg-slot.mystere .leg-badge { --l1: #2c3b31; --l2: #18241c; box-shadow: 0 0 0 2px #ffffff22; }
.leg-slot.mystere .leg-badge::after { display: none; }
.leg-slot.mystere .leg-badge i { color: #ffffff55; font-family: var(--display); font-size: 1.6rem; filter: none; }
@media (max-width: 700px) { .leg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Révélation d'un objet légendaire */
.opening.leg-mode::before { opacity: 1; background: radial-gradient(circle at 50% 42%, #3a2a55 0%, #120a1f 45%, #000 80%); }
.leg-reveal { position: relative; z-index: 5; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 16px; }
.leg-reveal .leg-orb { transform: scale(.15); opacity: 0; filter: brightness(0); transition: transform .9s, opacity .9s, filter .9s; }
.leg-reveal.charge .leg-orb { transform: scale(.35); opacity: .7; }
.leg-reveal.charge-2 .leg-orb { transform: scale(.55); opacity: 1; filter: brightness(0) drop-shadow(0 0 30px #fff); }
.leg-reveal.go .leg-orb { transform: scale(1); opacity: 1; filter: none; transition: transform .7s cubic-bezier(.2, 1.6, .4, 1), filter .4s; }
.leg-reveal > :not(.leg-orb) { opacity: 0; transform: translateY(14px); transition: opacity .6s .5s, transform .6s .5s; }
.leg-reveal.go > :not(.leg-orb) { opacity: 1; transform: none; }
.leg-kicker { margin-top: 34px; font-family: var(--display); font-size: clamp(2rem, 7vw, 4rem); line-height: 1; letter-spacing: .06em; text-transform: uppercase;
  background: linear-gradient(90deg, var(--l1), #fff, var(--l2), var(--l1)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 20px var(--l1)); animation: holo-text 2s linear infinite; }
.leg-name { margin: .2em 0 .1em; font-size: clamp(1.4rem, 4vw, 2.2rem); }
.leg-desc { margin: 0 0 6px; color: #ffffffcc; max-width: 34em; }
.leg-unique { margin: 0; font-weight: 700; color: var(--epic); }
.leg-won { display: inline-flex; align-items: center; gap: 14px; margin: 0 auto 16px; padding: 12px 18px; border-radius: 14px; background: #ffc23d18; border: 1px solid #ffc23d66; text-align: left; }

/* Booster trouvé dans le coffre, juste avant de l'ouvrir */
.coffre-loot { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 18px; animation: loot-in .6s cubic-bezier(.2, 1.6, .4, 1); }
.coffre-loot p { margin: 0; font-size: 1.3rem; }
@keyframes loot-in { from { transform: translateY(60px) scale(.6); opacity: 0; } }
.adm-head { margin: 28px 0 12px; }

/* Compteur de boosters : total + master set (27/10/2026) */
.lb-boost { display: flex; flex-direction: column; gap: 1px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lb-set .lb-boost { white-space: normal; }
.coffre-panel .cp-push { margin: 12px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }

/* Surnom de l'extension (EV3.5, EV8.5…) à côté de son nom (27/10/2026) */
.set-code { display: inline-block; font-family: inherit; font-size: .72em; font-weight: 800; letter-spacing: .04em; line-height: 1.3;
  padding: .08em .45em; border-radius: 6px; background: #ffffff16; border: 1px solid var(--line-2); color: var(--muted);
  vertical-align: .12em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chip.active .set-code, .set-tab.active .set-code { color: inherit; border-color: currentColor; background: transparent; }
.lb-set-head .set-code { margin-right: 2px; }
.set-meta { white-space: nowrap; }

/* ---------- Onglet Taux d'obtention (27/10/2026) ---------- */
.odds-link { display: flex; align-items: center; gap: 18px; margin-top: 32px; text-decoration: none; color: inherit; transition: border-color .2s, transform .2s; }
.odds-link:hover { border-color: var(--accent); transform: translateY(-2px); }
.odds-link .ol-ico { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font: 400 1.6rem var(--display);
  background: linear-gradient(135deg, var(--accent), #ff9a3d); color: #fff; box-shadow: 0 6px 18px #ff475755; }
.odds-link .ol-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.odds-link .ol-text b { font-size: 1.1rem; }
.odds-link .ol-go { font-size: 1.5rem; color: var(--accent); transition: transform .2s; }
.odds-link:hover .ol-go { transform: translateX(4px); }

.odds-hero { display: flex; gap: 34px; align-items: center; padding: 26px 30px; margin-bottom: 30px; position: relative; overflow: hidden;
  background: radial-gradient(120% 140% at 0% 0%, #ff475720, transparent 55%), var(--panel); }
.odds-hero .oh-pack { flex: none; width: 150px; }
.odds-hero .oh-pack .pack { width: 100%; }
.odds-hero .oh-text { flex: 1; min-width: 0; }
.odds-hero h3 { font-family: var(--display); font-weight: 400; font-size: 2.2rem; margin: .3em 0 .15em; line-height: 1.05; }
.odds-hero h3 .set-code { font-family: var(--body); font-size: .4em; vertical-align: .5em; margin-left: 6px; }
.odds-hero > .oh-text > p { margin: 0 0 16px; }
.oh-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.oh-facts > div { background: #ffffff08; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.oh-facts b { font-size: 1.35rem; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 6px; }
.oh-facts span { color: var(--muted); font-size: .8rem; }
.oh-note { margin: 14px 0 0; padding: 10px 14px; border-radius: 12px; background: #ffc23d14; border: 1px solid #ffc23d33; font-size: .9rem; }

.odds-h { font-size: 1.15rem; margin: 30px 0 12px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.odds-h .small { font-weight: 500; }

.oslots { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.oslot { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line);
  border-left: 4px solid var(--common); }
.oslot.t1 { border-left-color: var(--rare); }
.oslot.t2 { border-left-color: var(--mid); }
.oslot.t3 { border-left-color: var(--epic); }
.oslot-n { flex: none; font: 400 1.7rem/1 var(--display); min-width: 38px; }
.oslot-n small { font-family: var(--body); font-size: .5em; color: var(--muted); margin-left: 1px; }
.oslot-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding-top: 3px; }
.oslot-mix { display: flex; height: 8px; border-radius: 99px; overflow: hidden; gap: 2px; background: #ffffff10; }
.oslot-mix .mix { min-width: 3px; }
.mix.t0 { background: var(--common); } .mix.t1 { background: var(--rare); } .mix.t2 { background: var(--mid); } .mix.t3 { background: var(--epic); }
.oslot-keys { display: flex; flex-wrap: wrap; gap: 3px 12px; font-size: .82rem; color: var(--muted); }
.oslot-keys span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.oslot-keys b { color: var(--text); font-variant-numeric: tabular-nums; }
.oslot-keys .dot { width: 7px; height: 7px; }
.oslot-var { font-size: .8rem; color: var(--mid); font-weight: 600; }

.rts { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.rt { position: relative; padding: 16px 16px 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); overflow: hidden; --c: var(--common); }
.rt.t1 { --c: var(--rare); } .rt.t2 { --c: var(--mid); } .rt.t3 { --c: var(--epic); }
.rt::before { content: ''; position: absolute; inset: 0; background: radial-gradient(90% 70% at 100% 0%, color-mix(in srgb, var(--c) 16%, transparent), transparent 70%); pointer-events: none; }
.rt.t3 { border-color: color-mix(in srgb, var(--epic) 35%, transparent); }
.rt-head { display: flex; align-items: center; gap: 7px; position: relative; }
.rt-head b { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-big { font: 400 2.3rem/1 var(--display); margin: 12px 0 2px; color: var(--c); position: relative; font-variant-numeric: tabular-nums; }
.rt-sub { position: relative; }
.rt-bar { height: 6px; border-radius: 99px; background: #ffffff12; margin: 10px 0 12px; overflow: hidden; position: relative; }
.rt-bar i { display: block; height: 100%; border-radius: inherit; background: var(--c); box-shadow: 0 0 10px var(--c); }
.rt-eco { margin: 0; display: grid; gap: 4px; font-size: .82rem; position: relative; border-top: 1px solid var(--line); padding-top: 10px; }
.rt-eco > div { display: flex; justify-content: space-between; gap: 10px; }
.rt-eco dt { color: var(--muted); }
.rt-eco dd { margin: 0; text-align: right; font-weight: 600; }

.vars { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.var { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 14px; border: 1px dashed color-mix(in srgb, var(--mid) 50%, transparent);
  background: color-mix(in srgb, var(--mid) 7%, transparent); }
.var b { color: var(--mid); }
.odds-coffre { display: flex; align-items: center; gap: 14px; margin-top: 30px; background: linear-gradient(90deg, #ffc23d14, transparent 70%), var(--panel); }
.odds-coffre .oc-ico { font-size: 1.6rem; flex: none; }

@media (max-width: 720px) {
  .odds-hero { flex-direction: column; align-items: stretch; text-align: left; padding: 20px 18px; gap: 18px; }
  .odds-hero .oh-pack { width: 120px; align-self: center; }
  .odds-hero h3 { font-size: 1.8rem; }
  .oh-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .rt { padding: 12px; }
  .rt-big { font-size: 1.8rem; }
  .rt-eco > div { flex-direction: column; gap: 0; }
  .rt-eco dd { text-align: left; }
  .odds-link { gap: 12px; }
}
.oslots { align-items: start; }
.rt-head b { white-space: normal; overflow: visible; }
.rt-vars { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; position: relative; }
.rt-vars span { font-size: .74rem; padding: 2px 8px; border-radius: 99px; background: color-mix(in srgb, var(--mid) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--mid) 30%, transparent); color: var(--muted); white-space: nowrap; }
.rt-vars b { color: var(--text); font-weight: 700; }
.odds-hero .oh-text .oh-note { margin: 14px 0 0; }
@media (max-width: 720px) {
  .rt-head { flex-wrap: wrap; }
  .rt-head .small { flex-basis: 100%; padding-left: 14px; }
}

/* ---------- Onglet Inventaire (boosters du coffre rare, 27/10/2026) ---------- */
.nav-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 99px;
  background: var(--mid); color: #1b0b33; font-size: .72rem; font-weight: 800; vertical-align: 1px; }
.nav-n[hidden] { display: none; }
.nav a.active .nav-n { background: #fff; color: var(--accent); }
.inv-sum { margin: -4px 0 18px; color: var(--muted); }
.inv-sum b { color: var(--text); font-size: 1.15rem; }
.inv-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.inv-card { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 22px 16px 18px;
  background: radial-gradient(100% 70% at 50% 0%, #c48bff1c, transparent 70%), var(--panel); }
.inv-card h3 { margin: 8px 0 0; font-size: 1.05rem; }
.inv-card p { margin: 0 0 8px; }
.inv-card .btn { margin-top: auto; }
.inv-pack { background: none; border: 0; padding: 0; cursor: pointer; }
.inv-pack .pack { width: 130px; transition: transform .25s; }
.inv-pack:hover .pack, .inv-pack:focus-visible .pack { transform: translateY(-6px) rotate(-2deg); }
.inv-n { position: absolute; top: 12px; right: 12px; min-width: 34px; padding: 3px 9px; border-radius: 99px; background: var(--accent); color: #fff;
  font-weight: 800; font-size: .85rem; box-shadow: 0 3px 10px #0008; z-index: 1; }
.inv-card h3 .set-code { font-size: .7em; }
.inv-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 36px 20px; }

.inv-empty h3 { font-family: var(--display); font-weight: 400; font-size: 1.7rem; margin: 10px 0 0; }
.inv-empty p { max-width: 460px; margin: 0 0 8px; }
@media (max-width: 720px) {
  .inv-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .inv-card { padding: 16px 10px 14px; }
  .inv-pack .pack { width: 100px; }
}
.nav a { white-space: nowrap; }
.inv-card { min-width: 0; }
.inv-empty-ico { font-size: 3.4rem; line-height: 1; filter: drop-shadow(0 6px 16px #c48bff55); }
@media (max-width: 720px) {
  .inv-stock { display: none; }
  .inv-n { top: 8px; right: 8px; }
}
.inv-btns { margin-top: auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.inv-card .inv-btns .btn { margin-top: 0; }
.inv-btns { flex-direction: column; align-items: stretch; width: 100%; max-width: 220px; }

/* Classement d'une extension : complétée avec ou sans fabrication (27/10/2026) */
.lb-craft { display: inline-block; white-space: nowrap; padding: 2px 9px; border-radius: 99px; font-weight: 700; font-size: .8rem;
  background: #ffffff0d; border: 1px solid var(--line-2); color: var(--muted); }
.lb-craft.pure { color: var(--epic); border-color: color-mix(in srgb, var(--epic) 45%, transparent); background: color-mix(in srgb, var(--epic) 10%, transparent); }

/* Pendant une ouverture, les boutons sont en bas : les messages (succès, points…) passent en haut (27/10/2026) */
body:has(#opening:not([hidden])) .toasts { bottom: auto; top: calc(16px + env(safe-area-inset-top)); }
@media (max-width: 720px) {
  body:has(#opening:not([hidden])) .toasts { top: calc(64px + env(safe-area-inset-top)); }
}

/* Classement « sans fabrication » et hauts faits (29/10/2026) */
.lb-pure-n { color: var(--epic); font-weight: 800; text-shadow: 0 0 10px #ffc23d55; white-space: nowrap; }
.lb-pure-h { color: var(--epic); white-space: nowrap; }
.lb-pure { font-size: 1.05rem; }
.lb-pure .lb-pure-n { display: inline-block; padding: 2px 10px; border-radius: 99px; background: #ffc23d18; border: 1px solid #ffc23d66; }
.badge.lb-done.pure { background: linear-gradient(90deg, #ffc23d33, #ff9b3d22); border-color: var(--epic); box-shadow: 0 0 12px #ffc23d33; }
.lb-set.pure { border-color: var(--epic); box-shadow: 0 0 0 1px #ffc23d55 inset, 0 0 18px #ffc23d22; }
.hf-badge { display: inline-grid; place-items: center; width: 1.45em; height: 1.45em; margin-left: 4px; border-radius: 50%; font-size: .8rem;
  background: #ffc23d1f; border: 1px solid #ffc23d66; color: var(--epic); vertical-align: middle; cursor: help; }
.hf-vitrine { margin-bottom: 20px; background: radial-gradient(120% 140% at 0% 0%, #ffc23d14, transparent 55%), var(--panel); }
.hf-vitrine h3 { margin-top: 0; }
.hf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.hf-slot { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: #ffffff05; }
.hf-slot > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hf-slot .hf-ico { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem;
  background: #ffffff0a; color: var(--muted); filter: grayscale(1); opacity: .6; }
.hf-slot.won { border-color: #ffc23d66; background: linear-gradient(135deg, #ffc23d14, transparent 70%); }
.hf-slot.won .hf-ico { background: linear-gradient(135deg, #ffc23d33, #ff9b3d22); color: var(--epic); filter: none; opacity: 1; box-shadow: 0 0 16px #ffc23d33; }
.hf-who a { color: var(--epic); }
.hf-time { font-variant-numeric: tabular-nums; color: var(--epic); font-weight: 800; }
.craft-warn { margin: 8px 0 0; max-width: 320px; }
/* Hauts faits dans « Ma collection » : gagnés en or, les autres grisés */
.hf-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -6px 0 16px; }
.hf-strip-title { font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.hf-strip-title b { color: var(--epic); letter-spacing: 0; }
.hf-chip { display: inline-flex; align-items: center; gap: 6px; padding: .3em .75em .3em .4em; border-radius: 99px; font-size: .78rem; font-weight: 700;
  border: 1px solid var(--line-2); background: #ffffff06; color: var(--muted); cursor: help; }
.hf-chip i { font-style: normal; display: grid; place-items: center; width: 1.5em; height: 1.5em; border-radius: 50%; background: #ffffff0d; filter: grayscale(1); opacity: .55; }
.hf-chip.won { color: var(--epic); border-color: #ffc23d77; background: linear-gradient(90deg, #ffc23d1f, #ffc23d08); box-shadow: 0 0 14px #ffc23d1f; }
.hf-chip.won i { background: #ffc23d33; filter: none; opacity: 1; }
.hf-strip-pure { font-size: .78rem; font-weight: 800; color: var(--epic); margin-left: auto; }
@media (max-width: 700px) { .hf-strip { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 0 16px 4px; } .hf-chip, .hf-strip-pure { flex: none; } }

/* ---------- Mode speedrun (29/10/2026) ---------- */
/* Barre du chrono : deuxième ligne de l'en-tête, visible sur toutes les pages pendant un speedrun */
.speedrun-on .topbar { flex-wrap: wrap; row-gap: 8px; }
.sr-bar { order: 10; flex: 1 0 100%; display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; padding: 8px 14px; border-radius: 12px;
  background: linear-gradient(90deg, #ffc23d1f, #ff6bd512); border: 1px solid #ffc23d55; font-size: .92rem; }
.sr-bar[hidden] { display: none; }
.sr-tag { font-family: var(--display); letter-spacing: .04em; color: var(--epic); white-space: nowrap; }
.sr-time { margin-left: auto; font-variant-numeric: tabular-nums; font-size: 1.05rem; white-space: nowrap; }
.sr-bar.hurry .sr-time b { color: var(--danger); animation: sr-pulse 1s ease-in-out infinite; }
@keyframes sr-pulse { 50% { opacity: .55; } }
@media (max-width: 640px) { .sr-bar .sr-cards { display: none; } .sr-time { margin-left: 0; } }
/* Pendant un speedrun : rien qui fasse sortir ou entrer des points */
.speedrun-on #pm-transfer, .speedrun-on #pm-commu, .speedrun-on #btn-transfer, .speedrun-on .hh-pill { display: none !important; }
.sr-shop { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; border-color: #ffc23d55; }
/* Page du speedrun */
.sr-plaque { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; padding: 16px 20px; border-radius: var(--radius);
  border: 1px solid #ffc23d88; background: linear-gradient(120deg, #ffc23d26, #ff9b3d12 45%, transparent); box-shadow: 0 0 30px #ffc23d1a; }
.sr-plaque > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sr-plaque b { font-size: 1.3rem; }
.sr-plaque .sb-kicker { align-self: flex-start; }
.sr-plaque-ico { flex: none; width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 1.8rem; background: #ffc23d33; }
.sr-top { margin-bottom: 20px; }
.sr-rules h3 { margin-top: 0; }
.sr-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.sr-facts > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: #ffffff08; border: 1px solid var(--line); }
.sr-facts b { font-size: 1.35rem; color: var(--epic); }
@media (max-width: 640px) { .sr-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sr-now { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.btn-lg { padding: .75em 1.4em; font-size: 1.05rem; }
.sr-table h3, .table-wrap > h3 { margin-top: 0; }
.table-wrap + .table-wrap, .sr-top + .table-wrap, .table-wrap + .sr-mults { margin-top: 20px; }
.sr-table tr.sr-won td { background: #ffc23d0d; }
.badge.sr-st { margin-left: 6px; font-size: .66rem; vertical-align: middle; }
.badge.sr-st.temps { color: var(--muted); }
.badge.sr-st.abandon { color: var(--muted); border-style: dashed; }
.badge.sr-st.other { color: var(--mid); border-color: #c48bff66; background: #c48bff14; }
.sr-table tr.sr-other td { background: #c48bff0d; }
.sr-mults summary { cursor: pointer; }
.sr-mult-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 18px; font-size: .9rem; }
.sr-mult-grid span { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); padding: 4px 0; }
.sr-list { margin: 10px 0 0; padding-left: 1.2em; display: grid; gap: 6px; color: var(--muted); font-size: .92rem; }
.sr-list b { color: var(--text); }
.sr-result .sr-big { font-size: 3.4rem; line-height: 1; }
.sr-result.won { border-color: #ffc23d88; box-shadow: 0 0 60px #ffc23d33; }
.sr-result.won h3 { font-family: var(--display); font-size: 2.4rem; color: var(--epic); letter-spacing: .03em; }
/* Badge et haut fait du premier speedrunner */
.badge.first-sr { margin-left: 6px; vertical-align: middle; font-size: .66rem; color: #2a1600; border: 0;
  background: linear-gradient(90deg, #ffd36b, #ffc23d, #ff9b3d); box-shadow: 0 0 10px #ffc23d66; }
.hf-slot.special { grid-column: 1 / -1; border-color: #ffc23d99; background: linear-gradient(120deg, #ffc23d24, #ff6bd512 60%, transparent); }
.hf-slot.special .hf-ico { opacity: 1; filter: none; background: linear-gradient(135deg, #ffd36b55, #ff9b3d33); box-shadow: 0 0 18px #ffc23d55; }


/* ================================================================
   09/11/2026 : hauts faits regroupés, navigation mobile, en-tête plus léger
   ================================================================ */

/* Annonces de succès : un message qui résume quand il y en a plusieurs, la liste dans une fenêtre */
.toast.clickable { cursor: pointer; }
.toast.clickable:hover { background: #1b2647; }
.ach-list ul { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: min(52vh, 420px); overflow-y: auto; }
.ach-list li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; background: #ffffff07; border: 1px solid var(--line); }
.ach-list li > span:nth-child(2) { flex: 1; min-width: 0; font-weight: 600; }
.ach-ico { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #ffc23d22; }
.ach-pts { flex: none; color: var(--epic); font-size: .85rem; white-space: nowrap; }

/* Bande des hauts faits (collection) : les verrouillés repliés */
.hf-toggle { cursor: pointer; font: inherit; font-size: .78rem; }
.hf-toggle:hover { color: var(--text); border-color: #ffffff44; }
.hf-caret { display: inline-block; transition: transform .2s; }
.hf-strip.open .hf-caret { transform: rotate(180deg); }
.hf-todo { display: none; }
.hf-strip.open .hf-todo { display: contents; }
/* Icônes à côté du pseudo : 3 au plus, puis +N */
.hf-badge.hf-more { width: auto; padding: 0 .45em; border-radius: 99px; font-size: .7rem; font-weight: 800; }
/* Vitrine du classement repliable */
.hf-vitrine > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.hf-vitrine > summary::-webkit-details-marker { display: none; }
.hf-vitrine > summary h3 { margin: 0; display: flex; align-items: center; gap: 10px; }
.hf-vitrine > summary h3::after { content: "\25BE"; font-size: .9rem; color: var(--muted); transition: transform .2s; }
.hf-vitrine[open] > summary h3::after { transform: rotate(180deg); }
.hf-vitrine[open] > summary { margin-bottom: 14px; }
.hf-count { font-size: .72rem; font-weight: 800; letter-spacing: .04em; padding: .25em .7em; border-radius: 99px; background: #ffc23d1f; color: var(--epic); border: 1px solid #ffc23d55; }

/* En-tête sur PC un peu étroit : les onglets se resserrent, la pastille happy hour passe en icône */
@media (max-width: 1400px) {
  .topbar { gap: 16px; }
  .nav a { padding: .45em .7em; }
  .hh-pill span { display: none; }
}

/* Onglets du bas et panneau « Plus » : seulement sur téléphone */
.tabbar, .sheet { display: none; }

@media (max-width: 760px) {
  /* En-tête : une seule ligne (logo, points, profil) ; le reste est dans les onglets du bas */
  .topbar { flex-wrap: nowrap; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 14px 8px; }
  .topbar .logo { font-size: 1.2rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .topbar .nav, .topbar .me > .sound-btn, .topbar .me > .express-btn, .topbar .switch-game { display: none; }
  .me { gap: 6px; margin-left: 0; }
  .points { padding: .3em .75em .3em .35em; font-size: .95rem; }
  .points .coin { width: 18px; height: 18px; }
  .user-btn { width: 34px; height: 34px; font-size: .85rem; }
  .hh-pill { padding: .35em .55em; }
  .sr-bar { order: 10; flex-basis: 100%; }
  .topbar:has(.sr-bar:not([hidden])) { flex-wrap: wrap; }

  main { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }

  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: #0a0f1fef; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--line-2); box-shadow: 0 -10px 30px #0008;
  }
  .tabbar a, .tabbar button {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 6px 2px 4px; border: 0; background: none; border-radius: 14px;
    color: var(--muted); text-decoration: none; font-size: .68rem; font-weight: 700; letter-spacing: .01em;
    -webkit-tap-highlight-color: transparent;
  }
  .tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
  .tabbar [data-more] svg { fill: currentColor; stroke: none; }
  .tabbar .active { color: var(--text); }
  .tabbar .active svg { color: var(--accent); transform: translateY(-1px) scale(1.06); }
  .tabbar .active::before { content: ""; position: absolute; top: -6px; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
  .tabbar .nav-n { position: absolute; top: 0; left: calc(50% + 6px); margin: 0; min-width: 18px; height: 18px; font-size: .65rem; }

  /* Panneau « Plus » */
  .sheet { display: block; position: fixed; inset: 0; z-index: 45; }
  .sheet[hidden] { display: none; }
  .sheet-backdrop { position: absolute; inset: 0; background: #0009; animation: sheet-fade .2s; }
  .sheet-body {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 8px 12px calc(84px + env(safe-area-inset-bottom));
    background: var(--panel-solid); border-top: 1px solid var(--line-2); border-radius: 22px 22px 0 0;
    box-shadow: 0 -20px 50px #000a; animation: sheet-up .25s cubic-bezier(.2, .9, .3, 1);
    display: flex; flex-direction: column; gap: 2px;
  }
  .sheet-grip { width: 40px; height: 4px; border-radius: 4px; background: #ffffff33; margin: 2px auto 8px; }
  .sheet-body > a, .sheet-toggle {
    display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 12px; border: 0; border-radius: 14px;
    background: none; color: var(--text); text-decoration: none; text-align: left; font-weight: 700;
  }
  .sheet-body > a:active, .sheet-toggle:active { background: #ffffff10; }
  .sheet-body > a.active { background: #ff47571f; }
  .sheet-body i, .sheet-toggle > svg { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-style: normal; font-size: 1.2rem; background: #ffffff0d; }
  .sheet-toggle > svg { padding: 9px; color: var(--muted); }
  .sheet-body span { flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
  .sheet-body small { font-weight: 500; font-size: .78rem; color: var(--muted); }
  .sheet-sep { height: 1px; background: var(--line); margin: 6px 4px; }
  .sheet .sw { flex: none; width: 42px; height: 24px; border-radius: 99px; background: #ffffff1f; position: relative; transition: background .2s; }
  .sheet .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
  .sheet .sw.on { background: var(--accent); }
  .sheet .sw.on::after { transform: translateX(18px); }

  /* Ce qui était posé en bas de l'écran remonte au-dessus des onglets */
  .toasts { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .recycle-dock { bottom: calc(74px + env(safe-area-inset-bottom)); }
  /* Pendant une ouverture de booster, plein écran : pas d'onglets */
  body:has(#opening:not([hidden])) .tabbar { display: none; }

  /* Titres et marges un peu plus serrés */
  h2.title { font-size: 2rem; }
  .lead { font-size: .92rem; margin-bottom: 18px; }
  .panel { padding: 16px; }
  .hf-vitrine:not([open]) { padding: 14px 16px; }
}
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes sheet-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sheet-body, .sheet-backdrop { animation: none; } }

/* Téléphone : logo sur deux lignes, bande des hauts faits sur une ligne, classement réduit à l'essentiel */
@media (max-width: 760px) {
  .topbar .logo { flex: 1; font-size: 1.02rem; line-height: .95; overflow: visible; }
  .topbar .logo span { display: block; height: 0; overflow: hidden; }
  .hf-strip-title { flex: none; white-space: nowrap; }
  .lb-general th:nth-child(n+6), .lb-general td:nth-child(n+6) { display: none; }
  .lb-general .lb-detail td { display: table-cell; }
  .lb-one th:nth-last-child(2), .lb-one td:nth-last-child(2) { display: none; }
  .lb-table th, .lb-table td { padding-left: 8px; padding-right: 8px; }
  .lb-wide { min-width: 110px; }
  .lb-pure-h { white-space: nowrap; }
}

/* PC un peu étroit : Taux, Historique et Admin dans « Plus ▾ » ; en-têtes courts du classement sur téléphone */
.nav-more-wrap { display: none; position: relative; }
.nav-more { border: 0; background: none; padding: .45em .7em; border-radius: 999px; font-weight: 600; color: var(--muted); }
.nav-more:hover { color: var(--text); background: #ffffff0d; }
.nav-more.active { color: var(--accent-ink); background: var(--accent); }
.nav-more-menu { left: 0; right: auto; min-width: 210px; z-index: 25; }
.nav-more-menu a { display: block; padding: .6em .8em; border-radius: 8px; text-decoration: none; color: var(--text); background: none; font-weight: 600; }
.nav-more-menu a:hover { background: #ffffff10; }
.nav-more-menu a.active { background: #ff47571f; color: var(--text); }
@media (min-width: 761px) and (max-width: 1400px) {
  .nav > a[data-view="taux"], .nav > a[data-view="historique"], .nav > a[data-view="admin"] { display: none; }
  .nav-more-wrap { display: inline-block; }
}
.lb-short { display: none; }
@media (max-width: 760px) {
  .lb-long { display: none; }
  .lb-short { display: inline; }
}
@media (min-width: 761px) and (max-width: 860px) { .nav { overflow: visible; } }

/* Téléphone : objets légendaires sur une rangée qui défile (au lieu de 8 lignes avant le classement) */
@media (max-width: 760px) {
  .leg-grid { display: flex; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; gap: 10px; margin: 0 -16px; padding: 0 16px 6px; }
  .leg-grid::-webkit-scrollbar { display: none; }
  .leg-grid > .leg-slot { flex: 0 0 128px; scroll-snap-align: start; padding: 12px 8px; font-size: .9rem; }
  .leg-vitrine h3 { font-size: 1.05rem; }
}
.hf-badges { display: inline-flex; white-space: nowrap; vertical-align: middle; }
@media (max-width: 760px) {
  .lb-table td:nth-child(2) { min-width: 120px; line-height: 1.9; }
  .lb-table td:nth-child(2) .badge { font-size: .64rem; }
}
@media (max-width: 760px) {
  /* Pseudo sur la 1re ligne, icônes et badges en dessous : la colonne reste étroite */
  .lb-table td:nth-child(2) { line-height: 1.35; }
  .lb-table td:nth-child(2) .hf-badges { display: flex; margin: 4px 0 0 18px; }
  .lb-table td:nth-child(2) .hf-badge { width: 1.35em; height: 1.35em; font-size: .72rem; margin: 0 3px 0 0; }
  .lb-table td:nth-child(2) .hf-badge.hf-more { width: auto; }
  .lb-table td:nth-child(2) .badge { display: inline-block; margin: 4px 4px 0 0; }
  .lb-table td:nth-child(2) .hf-badges + .badge, .lb-table td:nth-child(2) > a + .badge { margin-left: 18px; }
  .lb-wide { min-width: 96px; }
  .lb-table th, .lb-table td { padding-left: 6px; padding-right: 6px; }
}
@media (max-width: 760px) {
  .lb-table td:nth-child(2) .badge { display: block; width: fit-content; margin: 4px 0 0 18px !important; }
  .lb-general th:nth-child(5), .lb-general td:nth-child(5) { display: none; }
  .lb-general .lb-detail td { display: table-cell; }
}
