:root {
  --bg: #07110b;
  --bg-2: #0c1a11;
  --panel: #10231666;
  --panel-solid: #112417;
  --line: #ffffff14;
  --line-2: #ffffff26;
  --text: #ecf7ef;
  --muted: #9bb3a2;
  --green: #3dff7a;
  --green-2: #19c957;
  --green-ink: #04210f;
  --common: #c9d2cc;
  --rare: #4fb4ff;
  --epic: #ffc23d;
  --epic-2: #ff6bd5;
  --danger: #ff5d5d;
  --radius: 16px;
  --display: 'Anton', Impact, sans-serif;
  --body: 'Outfit', system-ui, sans-serif;
  --card-ratio: 1000 / 1395;
}

* { 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%, #19c95733, transparent 70%),
    radial-gradient(50vw 40vw at -10% 110%, #19c95722, 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(--green); color: var(--green-ink); border-color: transparent; box-shadow: 0 6px 24px #3dff7a40; }
.btn-primary:hover:not(:disabled) { background: #6bff9b; }
.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: #0b1a10e6; 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(--green); 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(--green); color: var(--green-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(--green); box-shadow: 0 0 0 3px #3dff7a33; }
.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: #07110bd9; 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(--green); 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(--green-ink); background: var(--green); }
.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; gap: 16px; margin-bottom: 28px; }
.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: #3dff7a22; border-color: #3dff7a66; color: var(--green); }
.daily-days span.next { border-color: var(--epic); color: var(--epic); }
.daily .grow { flex: 1; }
.daily h3, .pity 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(--green-2), var(--green)); 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 .desc { color: var(--muted); font-size: .9rem; margin: 0; min-height: 3em; }
.pack-card .btn { min-width: 70%; }

/* Visuel de booster */
.pack {
  --c1: #0f3d1f; --c2: #072212; --accent: var(--green);
  position: relative; width: 170px; aspect-ratio: 5 / 8; border-radius: 10px 10px 12px 12px;
  background:
    radial-gradient(120% 60% at 50% 0%, #ffffff22, transparent 60%),
    repeating-linear-gradient(115deg, #ffffff08 0 6px, transparent 6px 16px),
    linear-gradient(160deg, var(--c1), var(--c2));
  box-shadow: 0 24px 50px #000b, inset 0 0 0 2px #ffffff18;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  overflow: hidden; transition: transform .25s;
  user-select: none;
}
.pack::before, .pack::after {
  content: ''; position: absolute; left: 0; right: 0; height: 14px;
  background: repeating-linear-gradient(90deg, #ffffff30 0 6px, #ffffff10 6px 12px);
}
.pack::before { top: 0; }
.pack::after { bottom: 0; }
.pack .p-logo { font-family: var(--display); font-size: 2.3rem; line-height: .9; color: #fff; text-shadow: 0 3px 0 #0006; letter-spacing: .02em; }
.pack .p-x { color: var(--accent); font-family: var(--display); font-size: 1.4rem; line-height: 1; }
.pack .p-sub { font-family: var(--display); font-size: 1.1rem; color: var(--accent); letter-spacing: .1em; }
.pack .p-tag { position: absolute; bottom: 24px; font-size: .7rem; font-weight: 800; letter-spacing: .25em; text-transform: uppercase; color: #ffffffb0; }
.pack .p-shine { position: absolute; inset: -50%; background: linear-gradient(105deg, transparent 40%, #ffffff40 50%, transparent 60%); animation: packshine 4s infinite; }
@keyframes packshine { 0% { transform: translateX(-60%); } 60%, 100% { transform: translateX(60%); } }
.pack.premium { --c1: #3d2a05; --c2: #1a0f02; --accent: var(--epic); box-shadow: 0 24px 50px #000b, 0 0 40px #ffc23d33, inset 0 0 0 2px #ffc23d55; }
.pack.free { --c1: #0d2b3d; --c2: #06141f; --accent: var(--rare); }
.pack-card:hover .pack { transform: translateY(-6px) rotate(-2deg); }

.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: #0a1a0f;
}
.card.tilting .card-inner { transition: transform .06s linear; }
.card img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.012); }

/* Effet holographique : arc-en-ciel + reflet qui suivent le pointeur */
.card.holo .card-inner::before {
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    repeating-linear-gradient(110deg,
      #ff3b6b 0%, #ffd13b 7%, #3dff7a 14%, #3bd5ff 21%, #8a5bff 28%, #ff3b6b 35%);
  background-size: 300% 300%;
  background-position: var(--px) var(--py);
  mix-blend-mode: color-dodge;
  opacity: calc(.2 + var(--pa) * .3);
  filter: brightness(.75) contrast(1.4) saturate(1.3);
  -webkit-mask-image: linear-gradient(to bottom, #000, #000);
}
.card.holo .card-inner::after {
  content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background:
    radial-gradient(circle at var(--px) var(--py), #ffffffaa 0%, #ffffff33 18%, transparent 45%),
    repeating-linear-gradient(45deg, #ffffff10 0 1px, transparent 1px 4px);
  mix-blend-mode: overlay;
  opacity: calc(.35 + var(--pa) * .5);
}
/* Sans pointeur (grille, mobile) : le holo ondule tout seul */
.card.holo.auto .card-inner::before { animation: holoshift 6s ease-in-out infinite; }
@keyframes holoshift { 0%, 100% { background-position: 0% 30%; } 50% { background-position: 100% 70%; } }

/* 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 */
.card-back {
  position: absolute; inset: 0; border-radius: inherit; overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, #3dff7a33, transparent 55%),
    repeating-linear-gradient(45deg, #ffffff08 0 8px, transparent 8px 16px),
    linear-gradient(160deg, #0f3d1f, #04140a);
  box-shadow: inset 0 0 0 6px #0a2814, inset 0 0 0 8px #3dff7a55;
  display: grid; place-items: center;
}
.card-back b { font-family: var(--display); font-weight: 400; font-size: clamp(1rem, 4vw, 2.4rem); color: #fff; text-align: center; line-height: .9; text-shadow: 0 3px 0 #0007; }
.card-back b span { display: block; color: var(--green); font-size: .55em; letter-spacing: .3em; margin-top: .3em; }

/* ---------- 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: #3dff7a22; border-color: var(--green); color: var(--green); }
.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(--green); outline-offset: 4px; border-radius: 10px; }
.slot .card { transition: transform .2s; }
.slot:hover .card { transform: translateY(-4px); }
.slot.missing .card-inner { background: #0b150e; box-shadow: inset 0 0 0 2px #ffffff12; }
.slot.missing img { filter: grayscale(1) brightness(.18) blur(1px); }
.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 { 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.new { background: var(--green); color: var(--green-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: #3dff7a10; }
.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(--green); }
.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%, #12331e, #030805 70%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  padding: 20px 16px; overflow: hidden;
  --beam: #7fd0ff;
}
/* Mode Épique : l'écran plonge dans l'or */
.opening::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .8s;
  background: radial-gradient(circle at 50% 45%, #5a3a00 0%, #1a0f00 45%, #000 80%);
}
.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; }
.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; }

/* 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;
}
.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.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: 0 20px 50px #000b; }
.deck .flip.buried { visibility: hidden; }
.deck .flip.under .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: spin 3s linear infinite; }
@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 spin { to { filter: blur(10px) hue-rotate(360deg); } }
.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(--green); }

/* 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; } }
.ring { position: fixed; z-index: 4; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; pointer-events: none;
  border: 6px solid var(--ring); box-shadow: 0 0 30px var(--ring), inset 0 0 30px var(--ring); animation: ring 1.1s cubic-bezier(.1,.7,.3,1) backwards; }
@keyframes ring { from { transform: scale(.3); opacity: 1; } to { transform: scale(9); opacity: 0; border-width: 1px; } }
.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); animation: holo-text 1.5s linear infinite; }
.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)); } }
/* Achat groupé (collection ZEVENT complète) : quantité, case « Rares une à une », récapitulatif 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; }
#buy-panel .qty-presets { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 4px; }
.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: var(--green); cursor: pointer; margin: 0; }
.bulk-opt:hover { color: var(--text); }
.summary.bulk { grid-template-columns: repeat(var(--cols, 6), minmax(0, 1fr)); 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)); } }

/* ---------- 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(--green); }
/* Fenêtre simple (confirmation, recyclage…) : un seul panneau, centré sur toute la largeur */
.modal-body > .panel: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: #3dff7a88; }
.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; }
}

/* ---------- 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; } }

/* ---------- Saison 2 : collection ZUnivers (25/10/2026) ---------- */
:root { --zu: #8a5bff; --zu-2: #ff4fd8; }
.r-z3 { color: #c48bff; }
.r-z5 { color: var(--zu-2); text-shadow: 0 0 10px #ff4fd855; }
.dot.Z1 { background: var(--common); } .dot.Z2 { background: var(--rare); } .dot.Z3 { background: #c48bff; }
.dot.Z4 { background: var(--epic); box-shadow: 0 0 6px var(--epic); } .dot.Z5 { background: var(--zu-2); box-shadow: 0 0 8px var(--zu-2); }
.badge.gold { background: linear-gradient(90deg, #b8860b, #ffd76a, #b8860b); color: #2a1600; border: 0; }
.card.zu .card-inner { background: transparent; }
.card.zu.z5 .card-inner { box-shadow: 0 10px 30px #0009, 0 0 0 2px #ff4fd888, 0 0 30px #ff4fd855; }
.card.zu.z4 .card-inner { box-shadow: 0 10px 30px #0009, 0 0 0 2px #ffc23d77; }
.card-back.zu {
  background: radial-gradient(circle at 50% 45%, #8a5bff55, transparent 60%),
    repeating-linear-gradient(-45deg, #ffffff08 0 8px, transparent 8px 16px), linear-gradient(160deg, #24124a, #0b0618);
  box-shadow: inset 0 0 0 6px #1a0d36, inset 0 0 0 8px #8a5bff77;
}
.card-back.zu b { font-size: clamp(2rem, 9vw, 5rem); color: #fff; }
.card-back.zu b span { color: #c9b2ff; font-size: .3em; letter-spacing: .35em; }

/* Booster ZUnivers dessiné : bandeau + carte la plus rare du pack en illustration */
.pack.zu { --c1: #2a1658; --c2: #0d0720; --accent: #c9b2ff; justify-content: flex-start; }
.pack.zu.zu-classic { --c1: #3a1f0a; --c2: #120802; --accent: var(--epic); }
.pack.zu .p-art { position: absolute; left: 12%; right: 12%; top: 13%; aspect-ratio: 500 / 695; background: center / cover no-repeat;
  border-radius: 6px; box-shadow: 0 8px 20px #000a; transform: rotate(-4deg); }
.pack.zu .p-band { position: absolute; left: 0; right: 0; bottom: 14px; padding: 8px 6px 10px; background: linear-gradient(180deg, transparent, #000c 30%);
  display: flex; flex-direction: column; align-items: center; z-index: 2; }
.pack.zu .p-logo { font-size: 1.35rem; letter-spacing: .06em; }
.pack.zu .p-sub { font-size: 1rem; color: var(--accent); letter-spacing: .06em; line-height: 1.1; }
.pack.zu .p-year { font-size: .7rem; font-weight: 800; letter-spacing: .3em; color: #ffffffa0; }
.pack.zu .p-tag { display: none; }

.shop-section { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 34px 0 16px; font-size: 1.3rem; }
.shop-section:first-of-type { margin-top: 8px; }
.zu-packs { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.zu-packs .pack-card { padding: 18px 14px; gap: 10px; }
.zu-packs .pack { width: 136px; }
.zu-packs h3 { font-size: 1.05rem; }
.pack-card .set-progress { width: 100%; font-size: .85rem; color: var(--muted); }
.pack-card .set-progress .bar { margin-top: 6px; height: 7px; }
.season-tag { font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #fff;
  background: linear-gradient(90deg, var(--zu), var(--zu-2)); padding: .3em .75em; border-radius: 99px; }

.season-banner { display: flex; align-items: center; gap: 24px; margin-bottom: 24px; overflow: hidden;
  background: linear-gradient(120deg, #8a5bff2e, #ff4fd81f 55%, #3dff7a14); border-color: #8a5bff66; }
.sb-kicker { display: inline-block; font-size: .7rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: #fff;
  background: linear-gradient(90deg, var(--zu), var(--zu-2)); padding: .25em .75em; border-radius: 99px; }
.season-banner h3 { font-family: var(--display); font-weight: 400; font-size: 2rem; margin: .25em 0 .15em; }
.season-banner p { margin: 0 0 14px; }
.sb-text { flex: 1 1 280px; }
.sb-cards { display: flex; flex: 0 1 auto; }
.sb-cards img { width: 78px; border-radius: 6px; margin-left: -18px; box-shadow: 0 8px 18px #000a; }
.sb-cards img:first-child { margin-left: 0; }
.sb-cards img:nth-child(odd) { transform: rotate(-6deg); } .sb-cards img:nth-child(even) { transform: rotate(5deg) translateY(6px); }
@media (max-width: 700px) { .season-banner { flex-direction: column; align-items: stretch; } .sb-cards { justify-content: center; } .sb-cards img { width: 60px; } }
.season-gift { width: min(440px, 90vw); text-align: center; border-color: #8a5bff88; }
.season-gift .title { margin: .4em 0; }
.season-gift .gift-pts { font-size: 1.3rem; }
.season-gift .coin { vertical-align: middle; }

/* Collection : choix de la collection, puis du pack ZUnivers */
.coll-tabs, .pack-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.coll-tab, .pack-tab { text-decoration: none; border: 1px solid var(--line-2); background: #ffffff08; border-radius: 12px; font-weight: 700;
  color: var(--muted); display: flex; gap: .6em; align-items: baseline; }
.coll-tab { padding: .6em 1.2em; font-size: 1.05rem; }
.pack-tab { padding: .4em .85em; font-size: .88rem; }
.coll-tab small, .pack-tab small { font-weight: 600; opacity: .8; }
.coll-tab.active { background: #3dff7a22; border-color: var(--green); color: var(--text); }
.pack-tab.active { background: #8a5bff2e; border-color: var(--zu); color: var(--text); }
.pack-tab.done small { color: var(--epic); opacity: 1; }
.pack-tabs { margin-bottom: 20px; }
@media (max-width: 700px) {
  .pack-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 0 16px 4px; }
  .pack-tabs::-webkit-scrollbar { display: none; }
  .pack-tab { flex: none; }
}
.progress-grid.zu-grid { grid-template-columns: minmax(170px, 1fr) minmax(280px, 2fr) minmax(170px, 1fr); }
@media (max-width: 760px) { .progress-grid.zu-grid { grid-template-columns: 1fr 1fr; } .progress-grid.zu-grid .star-panel { grid-column: 1 / -1; order: 3; } }
.star-panel { display: grid; gap: 4px; align-content: center; padding: 12px 18px !important; }
.star-row { display: grid; grid-template-columns: 7em 1fr 4.5em; gap: 10px; align-items: center; font-size: .88rem; }
.star-row .bar { margin: 0; height: 6px; }
.star-row b { text-align: right; font-variant-numeric: tabular-nums; }
.odds h4 { margin: 24px 0 6px; font-size: 1rem; }
@media (max-width: 700px) { .coll-tabs { flex-wrap: nowrap; } .coll-tab { flex: 1; justify-content: center; padding: .55em .6em; font-size: .95rem; flex-wrap: wrap; } }

/* 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; }

/* 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; }

/* Classement dépliable (25/10/2026) : détail ZEVENT + chaque pack ZUnivers */
.lb-table td { vertical-align: middle; }
.lb-wide { min-width: 150px; }
.lb-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.lb-bar { margin-top: 6px; height: 6px; max-width: 220px; }
.bar.zu > i { background: linear-gradient(90deg, var(--zu), var(--zu-2)); }
.lb-row { cursor: pointer; }
.lb-row:hover td { background: #ffffff06; }
.lb-row:focus-visible { outline: 2px solid var(--green); 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(--green); }
.lb-row[aria-expanded="true"] td { border-bottom-color: transparent; }
.lb-detail > td { padding: 0 12px 20px !important; }
.lb-group { font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 10px 0 8px; }
.lb-group .muted { letter-spacing: 0; text-transform: none; font-weight: 600; margin-left: 6px; }
.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); min-width: 0; }
.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.lb-zevent { grid-column: span 2; border-color: #3dff7a44; }
.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; max-width: none; }
.lb-set .small { font-size: .8rem; }
.lb-rar { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .8rem; margin-bottom: 4px; }
@media (max-width: 700px) {
  .lb-detail .lb-sets, .lb-detail .lb-group { position: sticky; left: 0; width: calc(100vw - 66px); }
  .lb-detail .lb-sets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lb-set { padding: 9px 10px; }
}
.lb-row td:nth-child(2) { white-space: nowrap; }

/* Pendant une ouverture, les boutons sont en bas : les messages (succès, points…) passent en haut (29/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)); }
}
