:root {
  --bg: #0c0907;
  --panel: #131009;
  --panel-2: #1a1610;
  --line: rgba(255, 200, 100, .14);
  --text: #f5ede0;
  --muted: #9a8a76;
  --accent: #FFB03A;
  --pink: #FF5B8B;
  --gradient: linear-gradient(135deg, var(--accent), var(--pink));
  --r-C: #9aa5b5;
  --r-U: #3ecf8e;
  --r-R: #3b9cff;
  --r-E: #b46bff;
  --r-L: #ffb703;
  --r-M: #ff3d6e;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(950px 520px at 10% -8%, rgba(255, 176, 58, .08), transparent 60%) fixed,
    radial-gradient(950px 620px at 102% 104%, rgba(255, 91, 139, .08), transparent 55%) fixed,
    var(--bg);
  color: var(--text);
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }

/* ---------- En-tête ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 12px 20px;
  background: rgba(12, 9, 7, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { font-size: 1.35rem; font-weight: 800; letter-spacing: .5px; }
.brand span { color: var(--accent); }
.tabs { display: flex; gap: 6px; margin-right: auto; }
.tab {
  background: transparent; border: 1px solid transparent; border-radius: 999px;
  padding: 8px 16px; color: var(--muted); font-weight: 600;
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--panel-2); border-color: var(--line); color: var(--text); }
.stock {
  display: flex; align-items: baseline; gap: 4px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 14px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.stock-max { color: var(--muted); font-weight: 600; }
.stock-timer { color: var(--accent); font-weight: 600; font-size: .85rem; margin-left: 8px; }
.stock-timer:empty { display: none; }

main { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 24px 16px 40px; }
.view { display: none; }
.view.active { display: block; }

/* ---------- Boosters ---------- */
.hero { text-align: center; margin: 12px 0 28px; }
.hero h1 { margin: 0 0 8px; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.hero p { margin: 0; color: var(--muted); font-variant-numeric: tabular-nums; }

.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 18px; }
/* Le sachet : papier métallisé serti en haut et en bas (le dessin est dans .pack-foil). */
.pack {
  --c1: #33415c; --c2: #151b28;
  position: relative; display: block; padding: 0;
  aspect-ratio: 5 / 7.4; container-type: inline-size;
  background: none; border: 0; color: #fff;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .55));
  transition: transform .18s ease;
}
.pack:hover { transform: translateY(-6px) rotate(-1.5deg); }
.pack-all { --c1: #e0a100; --c2: #5a3200; }
.pack-foot { --c1: #1f9d55; --c2: #0b3a22; }
.pack-nba { --c1: #e8662a; --c2: #5a1d08; }
.pack-f1 { --c1: #d81f3c; --c2: #4a0612; }
.pack-tennis { --c1: #a4b814; --c2: #3c4706; }
.pack-combat { --c1: #6b4bd6; --c2: #1e1247; }
.pack-esport { --c1: #00b8d4; --c2: #1b1464; }
.pack-foil {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  background:
    linear-gradient(105deg, transparent 18%, rgba(255, 255, 255, .42) 30%, transparent 43%, transparent 62%, rgba(255, 255, 255, .18) 72%, transparent 82%),
    linear-gradient(90deg, rgba(0, 0, 0, .38), transparent 10%, transparent 90%, rgba(0, 0, 0, .38)),
    linear-gradient(172deg, var(--c1), var(--c2));
  -webkit-mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 4.4cqw 51% repeat-x,
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / 4.4cqw 51% repeat-x;
  mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 4.4cqw 51% repeat-x,
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / 4.4cqw 51% repeat-x;
}
.pack-seal {
  flex: none; height: 8.5%;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .3) 0 1.1cqw, rgba(0, 0, 0, .22) 1.1cqw 2.2cqw);
}
.pack-art {
  flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.4cqw;
  padding: 0 5cqw; text-align: center;
  border-top: 1px solid rgba(255, 255, 255, .35); border-bottom: 1px solid rgba(0, 0, 0, .35);
}
.pack-logo {
  display: inline-block; padding: .12em .55em; transform: rotate(-5deg) skewX(-8deg);
  background: #fff; color: #14100b; border-radius: .2em;
  font: italic 800 9.5cqw/1.1 "Space Grotesk", "DM Sans", sans-serif; letter-spacing: -.02em;
  box-shadow: .12em .12em 0 rgba(0, 0, 0, .45);
}
.pack-logo b { color: #e0002f; }
.pack-year { font-size: 3.6cqw; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; opacity: .9; }
.pack-ico {
  position: relative; z-index: 0; display: grid; place-items: center;
  width: 46cqw; aspect-ratio: 1; font-size: 24cqw; line-height: 1;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .5));
}
.pack-ico::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 255, 255, .3) 0 10deg, transparent 10deg 20deg);
  -webkit-mask: radial-gradient(closest-side, #000 30%, transparent); mask: radial-gradient(closest-side, #000 30%, transparent);
}
.pack-name {
  font-size: 10.5cqw; font-weight: 800; font-style: italic; text-transform: uppercase; line-height: 1;
  text-shadow: .08em .08em 0 rgba(0, 0, 0, .5);
}
.pack-info { font-size: 4.2cqw; font-weight: 600; opacity: .9; }
.pack-cta {
  margin-top: 1cqw; padding: 1.6cqw 6cqw; border-radius: 999px; transform: rotate(-2deg);
  background: #14100b; color: #fff; border: 2px solid rgba(255, 255, 255, .85);
  font-weight: 800; font-size: 5.4cqw;
}
.no-boosters .pack-main .pack, .no-coins .packs .pack { filter: grayscale(.85) brightness(.7); }
.no-boosters .pack-main .pack:hover, .no-coins .packs .pack:hover { transform: none; }

.pack-main { display: flex; justify-content: center; margin-bottom: 34px; }
.pack-main .pack { width: min(250px, 70vw); filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .55)) drop-shadow(0 0 22px rgba(255, 183, 3, .35)); }
.pack-main .pack-cta { font-variant-numeric: tabular-nums; border-color: #14100b; }
.shop-title { text-align: center; font-size: 1.1rem; margin: 0 0 16px; }
.shop-title > span { color: var(--muted); font-weight: 500; font-size: .92rem; }
.coin-ico { color: var(--accent); }
.stock.coins { align-items: center; gap: 6px; }

.odds { margin-top: 36px; text-align: center; }
.odds h2 { font-size: 1rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1.5px; }
.odds-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.odds-note { color: var(--muted); font-size: .9rem; }
.pill {
  border: 1px solid var(--rc); color: var(--rc);
  border-radius: 999px; padding: 5px 12px; font-size: .88rem; background: var(--panel);
}
.pill b { color: var(--text); margin-left: 4px; }

/* ---------- Raretés ---------- */
.r-C { --rc: var(--r-C); }
.r-U { --rc: var(--r-U); }
.r-R { --rc: var(--r-R); }
.r-E { --rc: var(--r-E); }
.r-L { --rc: var(--r-L); }
.r-M { --rc: var(--r-M); }

/* ---------- Carte ---------- */
.card {
  position: relative;
  aspect-ratio: 5 / 7;
  display: flex; flex-direction: column;
  border-radius: 12px; padding: 6px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--rc) 55%, #120e0a), #120e0a 70%);
  border: 2px solid var(--rc);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .4);
  overflow: hidden;
  user-select: none;
}
.card-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .8px;
  padding: 0 2px 5px;
}
.card-rarity { color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.card-img {
  position: relative; flex: 1; min-height: 0;
  border-radius: 8px; overflow: hidden;
  background: linear-gradient(145deg, color-mix(in srgb, var(--rc) 35%, #211a12), #0c0907);
}
.card-img::before {
  content: attr(data-initials);
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.6rem; font-weight: 800; color: rgba(255, 255, 255, .22);
}
.card-img img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 18%;
  opacity: 0; transition: opacity .35s ease;
}
.card.has-img .card-img img { opacity: 1; }
.card-body { padding: 6px 2px 2px; text-align: center; }
.card-name {
  font-weight: 800; font-size: .92rem; line-height: 1.15;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-sub {
  color: var(--muted); font-size: .74rem; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-foot {
  display: flex; justify-content: space-between; gap: 6px;
  font-size: .62rem; text-transform: uppercase; letter-spacing: .6px;
  color: var(--rc); padding: 4px 2px 0; white-space: nowrap; overflow: hidden;
}
.badge {
  position: absolute; z-index: 2;
  font-size: .68rem; font-weight: 800; border-radius: 999px; padding: 2px 8px;
}
.badge.count { top: 30px; right: 10px; background: rgba(0, 0, 0, .75); border: 1px solid var(--rc); }
.badge.new { top: 30px; left: 10px; background: var(--accent); color: #1a1200; }

.card.r-L { box-shadow: 0 0 18px rgba(255, 183, 3, .45), 0 6px 16px rgba(0, 0, 0, .4); }
.card.r-M {
  border-color: transparent;
  background:
    linear-gradient(160deg, #47162a, #120e0a 70%) padding-box,
    linear-gradient(var(--angle, 0deg), #ff3d6e, #ffb703, #3b9cff, #b46bff, #ff3d6e) border-box;
  box-shadow: 0 0 24px rgba(255, 61, 110, .55), 0 6px 16px rgba(0, 0, 0, .4);
  animation: spin 4s linear infinite;
}
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes spin { to { --angle: 360deg; } }

.card.locked { filter: grayscale(.7); opacity: .5; box-shadow: none; animation: none; }
.card.locked .card-img::before { font-size: 3rem; }

/* ---------- Collection ---------- */
.progress { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.prog {
  display: flex; flex-direction: column; gap: 8px; text-align: left;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
}
.prog.active { border-color: var(--accent); background: var(--panel-2); }
.prog-top { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; font-size: .88rem; }
.prog-top span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; }
.prog-bar { height: 6px; border-radius: 999px; background: #070504; overflow: hidden; }
.prog-bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }

.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.filters select, .filters input {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px;
}
.filters select { max-width: 220px; }
.filters input { flex: 1; min-width: 180px; }
.f-count { color: var(--muted); font-size: .88rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.grid .card { cursor: pointer; transition: transform .15s ease; }
.grid .card:not(.locked):hover { transform: translateY(-4px) scale(1.02); }
.grid-head {
  grid-column: 1 / -1; margin: 14px 0 0; padding-bottom: 6px;
  font-size: 1.05rem; border-bottom: 1px solid var(--line);
}
.grid-head:first-child { margin-top: 0; }
.grid-head span { color: var(--muted); font-weight: 500; font-size: .85rem; margin-left: 6px; }
.dupes-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 18px; color: var(--muted); font-size: .88rem; }
.dupes-bar .btn { padding: 8px 18px; }
.dupes-bar .btn .coin-ico { color: inherit; }
.dupes-bar .btn:disabled { background: var(--panel-2); color: var(--muted); cursor: default; filter: none; }
.empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- Fenêtres ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(6, 4, 3, .93);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; overflow-y: auto;
}
#detail { z-index: 60; }
.btn {
  background: var(--accent); color: #1a1200; border: 0; border-radius: 999px;
  padding: 11px 24px; font-weight: 800;
}
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn:hover { filter: brightness(1.1); }
.link-btn { background: none; border: 0; color: var(--muted); text-decoration: underline; margin-left: 12px; }

.opening-inner { width: 100%; max-width: 1100px; text-align: center; margin: auto; }
.opening-inner h2 { margin: 0 0 22px; font-size: 1.5rem; }
#opening { overflow-x: hidden; }
.opening-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.opening-actions { display: flex; justify-content: center; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.opening-hint { margin: 20px 0 0; min-height: 1.4em; color: var(--muted); }

/* Le sachet à déchirer : la bande du haut (.tp-top) pivote avec le doigt, le reste (.tp-body) tombe ensuite. */
.opening-pack { display: flex; justify-content: center; padding: 50px 0 6px; }
.tearpack {
  --tear: 0;
  width: min(270px, 66vw); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
  animation: packin .5s cubic-bezier(.2, .9, .3, 1.2) backwards;
}
.tearpack:hover { transform: none; }
.tearpack:focus-visible { outline: 2px solid var(--accent); outline-offset: 8px; }
@keyframes packin { from { opacity: 0; transform: translateY(60px) scale(.7) rotate(-8deg); } }
.tp-piece { position: absolute; inset: 0; }
.tp-top {
  clip-path: polygon(0 0, 100% 0, 100% 12%, 90% 11.2%, 80% 12.6%, 70% 11.4%, 60% 12.5%, 50% 11.2%, 40% 12.6%, 30% 11.5%, 20% 12.4%, 10% 11.3%, 0 12%);
  transform-origin: 100% 12%;
  transform: rotate(calc(var(--tear) * 26deg)) translateY(calc(var(--tear) * -5%));
}
.tearpack.rtl .tp-top { transform-origin: 0 12%; transform: rotate(calc(var(--tear) * -26deg)) translateY(calc(var(--tear) * -5%)); }
.tp-body { clip-path: polygon(0 12%, 10% 11.3%, 20% 12.4%, 30% 11.5%, 40% 12.6%, 50% 11.2%, 60% 12.5%, 70% 11.4%, 80% 12.6%, 90% 11.2%, 100% 12%, 100% 100%, 0 100%); }
.tearpack::after {
  content: "✂"; position: absolute; left: 2%; right: 2%; top: 12%; height: 0; z-index: 3;
  border-top: 2px dashed rgba(255, 255, 255, .75); line-height: 0; text-align: left; font-size: 1.1rem; text-indent: -4px;
  opacity: calc(1 - var(--tear) * 5); pointer-events: none;
}
.tp-cards { position: absolute; left: 8%; right: 8%; top: 5%; bottom: 6%; }
.tp-cards i {
  position: absolute; inset: 0; border-radius: 12px; border: 2px solid rgba(255, 176, 58, .45);
  background: repeating-linear-gradient(45deg, #1a1610 0 10px, #131009 10px 20px);
}
.tp-cards i:nth-child(1) { transform: translate(4px, -4px); }
.tp-cards i:nth-child(2) { transform: translate(2px, -2px); }
.tearpack.torn { cursor: default; }
.tearpack.torn::after { display: none; }
.tearpack.torn .tp-top { transition: transform .6s ease-in, opacity .5s ease-in .1s; transform: translate(45%, -70%) rotate(62deg); opacity: 0; }
.tearpack.torn.rtl .tp-top { transform: translate(-45%, -70%) rotate(-62deg); }
.tearpack.torn .tp-body { transition: transform .55s ease-in .2s, opacity .4s ease-in .35s; transform: translateY(22%) scale(.94); opacity: 0; }
.tearpack.torn .tp-cards { transition: transform .5s ease .15s; transform: translateY(-5%); }

.flip {
  width: min(190px, 42vw); aspect-ratio: 5 / 7; perspective: 1000px; cursor: pointer;
  animation: deal .45s ease backwards; animation-delay: calc(var(--i) * 90ms);
}
@keyframes deal { from { opacity: 0; transform: translateY(40px) scale(.8); } }
.flip-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.2, .8, .3, 1.1); }
.flip.flipped .flip-inner { transform: rotateY(180deg); }
.flip-back, .flip-front { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip-back {
  border-radius: 12px; border: 2px solid rgba(255, 176, 58, .45);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 176, 58, .2), transparent 62%),
    repeating-linear-gradient(45deg, #1a1610 0 10px, #131009 10px 20px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; font-size: 3rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .5), inset 0 0 0 5px #131009, inset 0 0 0 6px rgba(255, 176, 58, .3);
}
.flip-back .pack-logo { font-size: 1.15rem; }
.flip:not(.flipped):hover .flip-back { border-color: var(--accent); }
.flip-front { transform: rotateY(180deg); }
.flip-front .card { width: 100%; height: 100%; }
.flip.flipped.r-E, .flip.flipped.r-L, .flip.flipped.r-M { filter: drop-shadow(0 0 14px var(--rc)); }

/* Le paquet sorti du sachet : on retourne la carte du dessus, puis on la fait glisser pour voir la suivante. */
.opening-cards.stacked { display: block; position: relative; width: min(250px, 62vw); aspect-ratio: 5 / 7; margin: 26px auto 0; }
.stacked .flip {
  position: absolute; inset: 0; width: auto; z-index: calc(10 - var(--i));
  transform: translate(calc(var(--i) * 3px), calc(var(--i) * -3px));
  transition: transform .32s ease-in, opacity .32s ease-in;
  animation: rise .4s ease backwards; animation-delay: 0s;
}
@keyframes rise { from { opacity: 0; transform: translateY(40px) scale(.92); } }
.stacked .flip.dealt { transform: translate(115%, -6%) rotate(16deg); opacity: 0; pointer-events: none; }
.stacked .flip.flipped.r-E:not(.dealt), .stacked .flip.flipped.r-L:not(.dealt), .stacked .flip.flipped.r-M:not(.dealt) { animation: hit .7s ease .25s; }
@keyframes hit { 30% { transform: scale(1.12) rotate(-2deg); } 60% { transform: scale(1.04) rotate(1.5deg); } }

.detail-inner {
  position: relative; margin: auto;
  display: flex; gap: 24px; flex-wrap: wrap; justify-content: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  padding: 26px; max-width: 760px; width: 100%;
}
#detail-card { width: 260px; max-width: 100%; }
#detail-card .card-name { font-size: 1.1rem; }
.detail-info { flex: 1; min-width: 240px; }
.detail-info h2 { margin: 0 0 6px; }
.detail-meta { color: var(--muted); font-size: .88rem; margin: 0 0 14px; }
.detail-text { line-height: 1.55; }
.close {
  position: absolute; top: 10px; right: 12px;
  background: none; border: 0; color: var(--muted); font-size: 1.2rem;
}

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 80;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 20px; font-weight: 600; box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
}

.foot { text-align: center; color: var(--muted); font-size: .8rem; padding: 18px 16px; border-top: 1px solid var(--line); }

@media (max-width: 560px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
  .topbar { padding: 10px 12px; gap: 10px; }
}

/* ---------- Habillage Le Penta ---------- */
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--gradient); }
.brand, .hero h1, .pack-name, .shop-title, .opening-inner h2, .detail-info h2, .grid-head { font-family: "Space Grotesk", "DM Sans", sans-serif; }
.brand { display: flex; align-items: center; font-size: 1.15rem; }
.brand img { height: 32px; width: 32px; border-radius: 8px; object-fit: cover; margin-right: 9px; }
.brand span, .hero h1 { background: var(--gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.back-btn {
  display: flex; align-items: center; gap: 5px; white-space: nowrap;
  font-size: .8rem; color: var(--muted); text-decoration: none;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px;
}
.back-btn:hover { color: var(--text); }
.tab.active { background: rgba(255, 176, 58, .15); border-color: rgba(255, 176, 58, .35); color: var(--accent); }
.btn:not(.ghost):not(:disabled), .pack-main .pack-cta { background: var(--gradient); color: #000; }
.prog-bar span { background: var(--gradient); }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ---------- Compte ---------- */
[hidden] { display: none !important; }
.btn.small { padding: 7px 14px; font-size: .85rem; }
.btn:disabled { background: var(--panel-2); color: var(--muted); cursor: not-allowed; filter: none; }
.account { display: flex; align-items: center; gap: 4px; }
.account .link-btn { margin-left: 6px; font-size: .82rem; }
.player-chip {
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 12px; font-weight: 700; max-width: 160px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.auth-box {
  position: relative; margin: auto; width: 100%; max-width: 380px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 26px;
}
.auth-box h2 { margin: 0 0 6px; font-family: "Space Grotesk", "DM Sans", sans-serif; }
.auth-sub { margin: 0 0 16px; color: var(--muted); font-size: .88rem; }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.auth-tab {
  flex: 1; background: transparent; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 10px; color: var(--muted); font-weight: 600;
}
.auth-tab.active { background: rgba(255, 176, 58, .15); border-color: rgba(255, 176, 58, .35); color: var(--accent); }
#auth-form { display: flex; flex-direction: column; gap: 10px; }
#auth-form input, .trade-with select, .trade-col input {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--text);
}
.auth-error { margin: 0; min-height: 1.2em; color: var(--pink); font-size: .88rem; }

/* ---------- Échanges ---------- */
.tab-badge {
  display: inline-block; margin-left: 6px; min-width: 18px; padding: 1px 5px;
  background: var(--pink); color: #000; border-radius: 999px; font-size: .72rem; font-weight: 800; text-align: center;
}
.trade-title {
  margin: 26px 0 10px; font-size: 1rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1.5px;
  font-family: "Space Grotesk", "DM Sans", sans-serif;
}
.trade-title:first-child { margin-top: 0; }
.trade-box, .trade {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px;
}
.trade { margin-bottom: 10px; }
.trade-guest { text-align: center; max-width: 520px; margin: 30px auto; }
.trade-guest h2 { margin: 0 0 8px; font-family: "Space Grotesk", "DM Sans", sans-serif; }
.trade-guest p { color: var(--muted); margin: 0 0 16px; }
.trade-empty { color: var(--muted); margin: 0; }
.trade-who { margin-bottom: 10px; }
.trade-status { margin-left: 8px; color: var(--muted); font-size: .85rem; font-weight: 600; }
.trade-status.ok { color: var(--r-U); }
.trade-status.ko { color: var(--pink); }
.trade-sides, .trade-summary, .trade-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.trade-lbl {
  display: block; margin-bottom: 6px; color: var(--muted);
  font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
}
.trade-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.chip {
  display: inline-block; margin: 0 6px 6px 0; padding: 4px 10px;
  border: 1px solid var(--rc, var(--line)); border-radius: 999px;
  background: color-mix(in srgb, var(--rc, transparent) 14%, var(--panel-2)); font-size: .85rem; font-weight: 600;
}
.chip.none { color: var(--muted); font-weight: 400; }
.chip.missing { opacity: .45; text-decoration: line-through; }
.trade-with { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.trade-with label { font-weight: 700; }
.trade-with select { flex: 1; min-width: 180px; max-width: 320px; }
.trade-col { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.trade-col h3 { margin: 0; font-size: 1rem; }
.trade-col h3 span { color: var(--muted); font-weight: 600; font-size: .85rem; margin-left: 4px; }
.pick-list {
  height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 6px;
}
.pick {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; text-align: left; flex-shrink: 0;
  background: var(--panel); border: 1px solid transparent; border-left: 4px solid var(--rc);
  border-radius: 8px; padding: 7px 10px; color: var(--text);
}
.pick:hover { background: var(--panel-2); }
.pick.sel { border-color: var(--rc); background: color-mix(in srgb, var(--rc) 22%, var(--panel)); }
.pick.sel .pick-name::before { content: "✓ "; }
.pick-name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-sub { color: var(--rc); font-size: .75rem; font-weight: 700; white-space: nowrap; }
.pick-empty { color: var(--muted); text-align: center; margin: auto; padding: 12px; font-size: .9rem; }
.trade-summary { margin: 16px 0; }
@media (max-width: 640px) {
  .trade-sides, .trade-summary, .trade-cols { grid-template-columns: 1fr; }
  .pick-list { height: 220px; }
}
#a-forgot { margin: 2px 0 0; align-self: center; font-size: .85rem; }
#a-help { margin: 0; }

/* ---------- Équipes ---------- */
.team-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 16px; }
.team-tab {
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 16px; color: var(--muted); font-weight: 700;
}
.team-tab.active { background: rgba(255, 176, 58, .15); border-color: rgba(255, 176, 58, .35); color: var(--accent); }
.team-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; max-width: 860px; margin: 0 auto 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px;
}
.team-bar label { font-weight: 700; font-size: .9rem; }
.team-bar select { margin-left: 6px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; color: var(--text); }
.team-score { flex: 1; min-width: 150px; color: var(--muted); font-size: .85rem; }
.team-score b { color: var(--accent); font-size: 1.5rem; font-family: "Space Grotesk", "DM Sans", sans-serif; }
.team-layout { display: grid; grid-template-columns: 130px 1fr; gap: 14px; align-items: start; max-width: 860px; margin: 0 auto; }
.team-staff {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px 10px;
}
.field { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 16px; border-radius: 16px; padding: 20px 8px; }
.field-line { position: relative; z-index: 1; display: flex; justify-content: space-evenly; gap: 6px; }
.pitch {
  border: 2px solid rgba(255, 255, 255, .45);
  background: repeating-linear-gradient(0deg, #1b7a45 0 56px, #176b3c 56px 112px);
}
.pitch::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px solid rgba(255, 255, 255, .35);
}
.pitch::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 110px; height: 110px; transform: translate(-50%, -50%);
  border: 2px solid rgba(255, 255, 255, .35); border-radius: 50%;
}
.court {
  border: 3px solid rgba(255, 255, 255, .6); padding: 30px 8px; gap: 26px;
  background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .07) 0 2px, transparent 2px 38px), linear-gradient(#a8692f, #875021);
}
.court::before {
  content: ""; position: absolute; left: 50%; top: -70px; width: 240px; height: 240px; transform: translateX(-50%);
  border: 3px solid rgba(255, 255, 255, .45); border-radius: 50%;
}
.court::after {
  content: ""; position: absolute; left: 50%; bottom: 0; width: 150px; height: 120px; transform: translateX(-50%);
  border: 3px solid rgba(255, 255, 255, .45); border-bottom: 0; background: rgba(160, 30, 30, .35);
}
.stage {
  border: 2px solid rgba(0, 184, 212, .55); padding: 30px 8px; gap: 26px;
  background: repeating-linear-gradient(90deg, rgba(0, 184, 212, .06) 0 1px, transparent 1px 40px), repeating-linear-gradient(0deg, rgba(0, 184, 212, .06) 0 1px, transparent 1px 40px), linear-gradient(160deg, #101a3a, #1b1464 60%, #2a0f4a);
  box-shadow: inset 0 0 40px rgba(0, 184, 212, .18);
}
.slot {
  flex: 0 1 96px; min-width: 0; padding: 0; background: none; border: 0; color: var(--text);
  display: flex; flex-direction: column; align-items: center; gap: 4px; transition: transform .15s ease;
}
.slot:hover { transform: translateY(-3px); }
.team-staff .slot { flex: none; width: 96px; }
.slot-img {
  position: relative; overflow: hidden; width: 100%; aspect-ratio: 5 / 6; border-radius: 10px;
  display: grid; place-items: center; font-size: 1.5rem; font-weight: 700; color: rgba(255, 255, 255, .75);
  border: 2px dashed rgba(255, 255, 255, .5); background: rgba(0, 0, 0, .3);
}
.slot.filled .slot-img {
  border: 2px solid var(--rc); box-shadow: 0 0 12px color-mix(in srgb, var(--rc) 55%, transparent), 0 4px 10px rgba(0, 0, 0, .45);
  background: linear-gradient(160deg, color-mix(in srgb, var(--rc) 55%, #120e0a), #120e0a 80%);
}
.slot-img i { font-style: normal; color: rgba(255, 255, 255, .3); }
.slot-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; opacity: 0; transition: opacity .35s ease; }
.slot.has-img img { opacity: 1; }
.slot-name {
  max-width: 100%; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, .6);
  font-size: .72rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.slot:not(.filled) .slot-name { font-weight: 500; color: rgba(255, 255, 255, .8); }
.track {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 18px; max-width: 560px; margin: 0 auto; padding: 30px 14px 70px;
  background: repeating-linear-gradient(0deg, transparent 0 22px, rgba(255, 255, 255, .025) 22px 24px), #1c1c20;
  border-left: 8px solid #c9302c; border-right: 8px solid #c9302c;
  border-image: repeating-linear-gradient(0deg, #d7322d 0 18px, #f2f2f2 18px 36px) 8;
}
.grid-box {
  position: relative; display: flex; justify-content: center; gap: 8px; padding: 18px 8px 4px;
  border: 3px solid rgba(255, 255, 255, .75); border-bottom: 0;
}
.grid-box:nth-child(even) { transform: translateY(46px); }
.grid-box .slot { flex: 0 1 84px; }
.grid-pos {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: #fff; color: #111; border-radius: 4px; padding: 1px 9px; font-size: .74rem; font-weight: 800;
}
.team-note { max-width: 640px; margin: 16px auto 0; text-align: center; color: var(--muted); font-size: .86rem; }

#picker { z-index: 55; }
.picker-box {
  position: relative; margin: auto; width: 100%; max-width: 860px; max-height: calc(100vh - 40px);
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px;
}
.picker-box h2 { margin: 0 30px 12px 0; font-size: 1.15rem; font-family: "Space Grotesk", "DM Sans", sans-serif; }
.picker-bar { display: flex; gap: 10px; margin-bottom: 12px; }
.picker-bar input { flex: 1; min-width: 0; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--text); }
.picker-list { display: grid; grid-auto-rows: max-content; flex: 1; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 10px; overflow-y: auto; min-height: 140px; padding: 4px; }
.picker-list .card { cursor: pointer; }
.picker-list .card.current { outline: 3px solid var(--accent); outline-offset: 1px; }
@media (max-width: 640px) {
  .team-layout { grid-template-columns: 1fr; }
  .team-staff { flex-direction: row; justify-content: center; padding: 10px; }
  .field { padding: 14px 4px; gap: 12px; }
  .field-line { gap: 3px; }
  .slot-name { font-size: .62rem; padding: 2px 5px; }
  .track { gap: 24px 8px; padding: 26px 6px 66px; }
  .grid-box { gap: 4px; padding: 16px 4px 4px; }
  .picker-box { padding: 16px; }
  .picker-list { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
}
@media (max-width: 560px) {
  .tabs { width: 100%; order: 5; justify-content: space-between; gap: 2px; margin: 0; }
  .tab { padding: 8px 10px; font-size: .9rem; }
}

/* ---------- Missions ---------- */
.missions-board { max-width: 860px; margin: 0 auto; }
.mission-sub { font-size: .8rem; font-weight: 500; color: var(--muted); margin-left: 6px; }
.missions { display: flex; flex-direction: column; gap: 8px; }
.mission {
  display: flex; align-items: center; gap: 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px;
}
.mission.ready { border-color: rgba(255, 176, 58, .6); box-shadow: 0 0 14px rgba(255, 176, 58, .18); }
.mission.claimed { opacity: .5; }
.mission-ico { flex: none; width: 42px; height: 42px; display: grid; place-items: center; font-size: 1.4rem; background: var(--panel-2); border-radius: 12px; }
.mission-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mission-main span { color: var(--muted); font-size: .85rem; }
.mission-bar { height: 6px; margin-top: 4px; border-radius: 999px; background: var(--panel-2); overflow: hidden; }
.mission-bar i { display: block; height: 100%; border-radius: 999px; background: var(--gradient); }
.mission-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.mission-reward { font-weight: 700; font-size: .9rem; white-space: nowrap; }
.mission-count { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.mission-done { color: #5fd08a; font-size: .85rem; font-weight: 700; }
@media (max-width: 560px) {
  .tabs { overflow-x: auto; scrollbar-width: none; gap: 0; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { padding: 8px 4px; font-size: .76rem; white-space: nowrap; }
  .mission { gap: 10px; padding: 10px; }
  .mission-ico { width: 36px; height: 36px; font-size: 1.2rem; }
}

/* ---------- Onglets avec icônes ---------- */
.tab { display: inline-flex; align-items: center; gap: 6px; position: relative; }
.tab i { font-style: normal; }
@media (max-width: 1300px) {
  .tabs { order: 5; width: 100%; justify-content: center; margin: 0; }
}
/* Sur mobile, les onglets passent en barre fixe en bas de l'écran. */
@media (max-width: 760px) {
  .topbar { backdrop-filter: none; background: #0c0907; }
  .tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; order: 0; width: auto; margin: 0;
    gap: 0; justify-content: space-around; overflow: visible;
    background: rgba(12, 9, 7, .97); border-top: 1px solid var(--line);
    padding: 4px 2px calc(4px + env(safe-area-inset-bottom));
  }
  .tab { flex: 1; min-width: 0; flex-direction: column; gap: 1px; padding: 5px 0; font-size: .58rem; border-radius: 10px; white-space: nowrap; }
  .tab i { font-size: 1.25rem; line-height: 1.15; }
  .tab .tab-badge { position: absolute; top: 0; left: 54%; margin: 0; }
  body { padding-bottom: 62px; }
  .toast { bottom: 80px; }
}

/* ---------- Cartes : fond aux couleurs du club, silhouettes, cadres par rareté ---------- */
.card-img { background: linear-gradient(145deg, hsl(var(--hue, 30) 55% 30%), hsl(calc(var(--hue, 30) + 40) 60% 11%)); }
.card.has-crest .card-img img { opacity: 1; object-fit: contain; object-position: 50% 50%; padding: 16%; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .5)); }
.card.has-crest .card-img::before { content: none; }
.silhouette {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 4.2rem; line-height: 1; filter: brightness(0); opacity: .6;
}
.card.locked { opacity: .55; }
.card.locked .card-img { background: linear-gradient(145deg, #2a241c, #14100b); }
.grid .card.locked:hover { opacity: .8; }

.card.r-R { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 0 10px rgba(59, 156, 255, .3), 0 6px 16px rgba(0, 0, 0, .4); }
.card.r-E { border-width: 3px; padding: 5px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2), 0 0 16px rgba(180, 107, 255, .5), 0 6px 16px rgba(0, 0, 0, .4); }
.card.r-L {
  border: 3px solid transparent; padding: 5px;
  background:
    linear-gradient(160deg, #4d3806, #120e0a 70%) padding-box,
    conic-gradient(from var(--angle, 0deg), #ffb703, #fff4c9, #ffb703, #7a4f00, #ffb703, #fff4c9, #ffb703) border-box;
  animation: spin 5s linear infinite;
}
.card.r-M { border-width: 3px; padding: 5px; }
.card.locked { box-shadow: none; animation: none; }

/* Reflet arc-en-ciel des Mythiques et des brillantes : il suit la souris ou l'inclinaison du téléphone. */
.holo {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: inherit;
  mix-blend-mode: color-dodge; opacity: .5;
  background:
    radial-gradient(circle at var(--mx, 50%) var(--my, 30%), rgba(255, 255, 255, .6), transparent 42%),
    linear-gradient(115deg, transparent 20%, rgba(255, 60, 120, .5) 36%, rgba(255, 220, 80, .5) 44%, rgba(80, 220, 255, .5) 52%, rgba(160, 90, 255, .5) 60%, transparent 76%);
  background-size: 100% 100%, 260% 260%;
  background-position: 0 0, var(--mx, 50%) var(--my, 50%);
}
.card.locked .holo { display: none; }
.card.shiny { box-shadow: 0 0 20px rgba(255, 255, 255, .5), 0 6px 16px rgba(0, 0, 0, .4); }
.badge.shine { top: 54px; left: 10px; padding: 2px 6px; background: rgba(0, 0, 0, .75); border: 1px solid #fff; }

/* ---------- Boosters spéciaux et cartes du jour ---------- */
.specials { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.specials .pack { width: min(190px, 42vw); }
.pack-prestige { --c1: #d4a514; --c2: #1c1503; }
.pack-event { --c1: #ff5b8b; --c2: #3b0a4a; }
.pack-lucky { --c1: #19c37d; --c2: #052e1c; }
.pack.off { filter: grayscale(.85) brightness(.7); }
.pack.off:hover { transform: none; }
.shop { display: grid; grid-template-columns: repeat(3, minmax(0, 190px)); justify-content: center; gap: 14px; margin-bottom: 30px; }
.shop-item { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.shop-item .card { width: 100%; cursor: pointer; }

/* ---------- Ouverture : lueur de la rareté, récapitulatif ---------- */
.stacked .flip.top:not(.flipped) .flip-back {
  border-color: var(--rc);
  box-shadow: 0 0 26px var(--rc), inset 0 0 34px color-mix(in srgb, var(--rc) 40%, transparent);
  animation: glow 1.1s ease-in-out infinite alternate;
}
@keyframes glow { from { box-shadow: 0 0 10px var(--rc), inset 0 0 18px color-mix(in srgb, var(--rc) 25%, transparent); } }
.flip.is-shiny.flipped { filter: drop-shadow(0 0 16px #fff); }
.opening-cards:not(.stacked) .flip.flipped:not(.is-new) { opacity: .6; transition: opacity .2s ease; }
.opening-cards:not(.stacked) .flip.flipped:not(.is-new):hover { opacity: 1; }
.opening-recap { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 4px 0 14px; }
.opening-recap .pill[class*="r-"] { border-color: var(--rc); }

/* ---------- Détail : dos de la carte ---------- */
.turn { perspective: 1000px; cursor: pointer; }
.turn-inner { position: relative; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.2, .8, .3, 1.1); }
.turn.turned .turn-inner { transform: rotateY(180deg); }
.turn-front, .turn-back { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.turn-back {
  position: absolute; inset: 0; transform: rotateY(180deg);
  display: flex; flex-direction: column; gap: 5px; overflow: hidden;
  border-radius: 12px; border: 3px solid var(--rc); padding: 14px; font-size: .8rem;
  background: linear-gradient(160deg, color-mix(in srgb, var(--rc) 32%, #120e0a), #120e0a 70%);
}
.turn-back .pack-logo { font-size: 1rem; }
.turn-back h3 { margin: 4px 0 6px; font-size: 1rem; font-family: "Space Grotesk", "DM Sans", sans-serif; }
.turn-back div { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dashed var(--line); padding-bottom: 3px; }
.turn-back div span { color: var(--muted); white-space: nowrap; }
.turn-back div b { text-align: right; }
.turn-hint { margin: 8px 0 0; text-align: center; color: var(--muted); font-size: .78rem; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* ---------- Collection : albums, recyclage ---------- */
#col-modes { margin-bottom: 16px; }
.recycle-bar { display: flex; flex-wrap: wrap; gap: 6px; }
.dupes-bar .recycle { padding: 7px 12px; border-color: var(--rc); color: var(--text); }
.dupes-bar .recycle:disabled { border-color: var(--line); background: transparent; opacity: .55; }
.recycle span { opacity: .7; }
#albums .missions { max-width: 860px; margin: 14px auto 0; }
.trade-wish:empty { display: none; }
.trade-wish { margin: 10px 0 4px; }

/* ---------- Accueil ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; }
.tile {
  display: flex; align-items: center; gap: 12px; text-align: left;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px; color: var(--text);
  transition: transform .15s ease, border-color .15s ease;
}
.tile:hover { transform: translateY(-3px); border-color: rgba(255, 176, 58, .5); }
.tile.hot { border-color: rgba(255, 176, 58, .6); box-shadow: 0 0 14px rgba(255, 176, 58, .18); }
.tile-ico { flex: none; width: 52px; height: 52px; display: grid; place-items: center; font-size: 1.7rem; background: var(--panel-2); border-radius: 14px; }
.tile-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tile-txt b { font-family: "Space Grotesk", "DM Sans", sans-serif; font-size: 1.05rem; }
.tile-txt span { font-size: .9rem; }
.tile-txt small { color: var(--muted); font-size: .78rem; }
.streak, #home .profile { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-top: 14px; }
.streak-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.streak-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.streak-day {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 2px; font-size: .8rem; white-space: nowrap;
}
.streak-day small { color: var(--muted); font-size: .68rem; }
.streak-day.done { opacity: .5; border-color: #5fd08a; }
.streak-day.today { border-color: var(--accent); box-shadow: 0 0 12px rgba(255, 176, 58, .35); }

/* ---------- Profil ---------- */
.profile { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.profile-fav { flex: none; width: 170px; }
.profile-fav .card { cursor: pointer; }
.fav-empty {
  aspect-ratio: 5 / 7; display: grid; place-items: center; text-align: center; padding: 12px;
  border: 2px dashed var(--line); border-radius: 12px; color: var(--muted); font-size: .8rem;
}
.profile-info { flex: 1; min-width: 240px; }
.profile-info h2 { margin: 0 0 10px; font-family: "Space Grotesk", "DM Sans", sans-serif; }
.profile-info h3 { margin: 14px 0 6px; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1.2px; }
.stats, .medals { display: flex; flex-wrap: wrap; gap: 8px; }
.stat { display: flex; flex-direction: column; background: var(--panel-2); border-radius: 10px; padding: 8px 12px; font-size: .74rem; color: var(--muted); }
.stat b { font-size: 1.15rem; color: var(--text); font-variant-numeric: tabular-nums; }
.medal { width: 36px; height: 36px; display: grid; place-items: center; font-size: 1.1rem; background: var(--panel-2); border: 1px solid rgba(255, 176, 58, .5); border-radius: 50%; }
.profile-box { max-width: 720px; }
.duel-box { max-width: 460px; }
#duel, #profile { z-index: 52; }

/* ---------- Classement et duels ---------- */
#rank-app .trade-with { justify-content: center; }
.rank-list { display: flex; flex-direction: column; gap: 6px; max-width: 640px; margin: 14px auto 0; }
.rank-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; color: var(--text); font-size: .95rem;
}
.rank-row:hover { border-color: rgba(255, 176, 58, .6); }
.rank-row.me { border-color: rgba(255, 176, 58, .6); background: rgba(255, 176, 58, .1); }
.rank-pos { flex: none; width: 30px; text-align: center; font-weight: 800; }
.rank-name { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.duel-round {
  display: flex; align-items: center; gap: 10px; margin: 6px 0; padding: 10px 14px;
  background: var(--panel-2); border-left: 4px solid var(--line); border-radius: 12px; font-variant-numeric: tabular-nums;
  animation: deal .4s ease backwards; animation-delay: calc(var(--i) * .5s);
}
.duel-round span { margin-right: auto; color: var(--muted); }
.duel-round i { font-style: normal; color: var(--muted); }
.duel-round.win { border-color: #5fd08a; }
.duel-round.lose { border-color: var(--pink); }
.duel-end { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 14px; animation: deal .4s ease 1.5s backwards; }
.duel-end b { font-size: 1.4rem; }
.duel-end span { color: var(--muted); font-size: .9rem; }
.duel-box h2 small { color: var(--muted); font-weight: 500; }

/* ---------- Équipes sans club : tennis (terre battue) et combat (ring) ---------- */
.team-layout.solo { grid-template-columns: 1fr; max-width: 620px; }
.clay { background: linear-gradient(#c96a3f, #a84d28); }
.clay::before { content: ""; position: absolute; inset: 10px 14%; border: 2px solid rgba(255, 255, 255, .55); }
.clay::after { content: ""; position: absolute; left: 6%; right: 6%; top: 50%; height: 3px; background: rgba(255, 255, 255, .8); }
.ring { background: radial-gradient(ellipse at 50% 40%, #33456e, #111a30 75%); }
.ring::before { content: ""; position: absolute; inset: 10px; border: 3px double rgba(255, 91, 139, .7); border-radius: 10px; }

@media (max-width: 560px) {
  .shop { gap: 8px; }
  .streak-day { font-size: .66rem; padding: 6px 0; }
  .streak-day .coin-ico { display: none; }
  .profile-fav { width: 130px; margin: 0 auto; }
  .silhouette { font-size: 3.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .card.r-L, .card.r-M, .stacked .flip.top .flip-back { animation: none; }
}

/* ---------- Page Boosters : chaque sachet avec ses chances à côté ---------- */
.packs, .specials { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 16px; margin-bottom: 30px; }
.pack-main { display: block; max-width: 620px; margin: 0 auto 34px; }
.pack-row {
  display: grid; grid-template-columns: clamp(104px, 38%, 150px) 1fr; gap: 16px; align-items: center;
  padding: 14px; border-radius: 18px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08);
}
.pack-main .pack-row { grid-template-columns: clamp(130px, 42%, 220px) 1fr; gap: 22px; padding: 18px; border-color: rgba(255, 183, 3, .35); }
.pack-row .pack, .pack-main .pack-row .pack, .specials .pack-row .pack { width: 100%; }
.pack-side { display: flex; flex-direction: column; gap: 6px; min-width: 0; text-align: left; }
.pack-title { font-family: "Space Grotesk", "DM Sans", sans-serif; font-size: 1.05rem; }
.pack-main .pack-title { font-size: 1.3rem; }
.pack-desc { color: var(--muted); font-size: .82rem; line-height: 1.35; }
.pack-odds { display: flex; flex-direction: column; gap: 5px; margin-top: 4px; }
.odd { display: grid; grid-template-columns: 6.2em 1fr 3.4em; align-items: center; gap: 8px; font-size: .8rem; }
.odd span { white-space: nowrap; }
.odd b { text-align: right; font-variant-numeric: tabular-nums; }
.odd i { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.odd u { display: block; height: 100%; min-width: 3px; border-radius: 99px; background: var(--rc, #8a93a6); }
.odd.none { opacity: .4; }
.odd.none u { display: none; }
.odd.r-C { --rc: #9aa3b2; } .odd.r-U { --rc: #3ecf8e; } .odd.r-R { --rc: #4c9aff; }
.odd.r-E { --rc: #b06bff; } .odd.r-L { --rc: #ffb703; } .odd.r-M { --rc: #ff4d6d; }
.odd.r-L span, .odd.r-M span { color: var(--rc); font-weight: 700; }
@media (max-width: 760px) {
  .packs, .specials { grid-template-columns: 1fr; }
  .pack-row, .pack-main .pack-row { grid-template-columns: 36% 1fr; gap: 12px; padding: 12px; }
}
