/* =========================================================
   PokéTracker — design system « Rayquaza × Master Ball »
   Fond lavande très clair / nuit violette pour laisser les cartes respirer.
   Violet Master Ball = actions · magenta = niveaux, hits · vert Rayquaza = collection, progression.
   Tous les couples texte / fond sont ≥ 4,5:1.
   ========================================================= */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fonts/inter-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Unbounded"; font-weight: 500; font-display: swap; src: url("/fonts/unbounded-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Unbounded"; font-weight: 700; font-display: swap; src: url("/fonts/unbounded-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Unbounded"; font-weight: 900; font-display: swap; src: url("/fonts/unbounded-latin-900-normal.woff2") format("woff2"); }

/* DA « Rayquaza × Master Ball » — couleurs relevées sur le logo :
   violet Master Ball (#4b2a73 → #7446b0) = actions · magenta du « M » (#b2366e) = niveaux, hits, souhaits
   vert Rayquaza (#3f8a46 → #a5dd8f) = collection, progression, gains · lavande (#a99cc8) = surfaces douces. */
:root {
  --white: #ffffff;
  --deep: #24123a;
  --sea: #4b2a73;
  --jungle: #5a3586; /* fin du dégradé des bandeaux : même famille de violet, sans troisième teinte */
  --moss: #4f9d55;
  --lime: #a5dd8f;
  --ball: #4b2a73;
  --ball-2: #a99cc8;
  --rayquaza: #3f8a46;
  --magenta: #b2366e;
  --brand: #5b3592;
  --violet: #5b3592;
  --violet-soft: rgba(91, 53, 146, 0.1);
  --ink-dark: #1c1027;

  --bg: #f6f4f9;
  --bg-2: #eeeaf4;
  --surface: #ffffff;
  --surface-2: #f4f1f8;
  --surface-3: #e8e2f0;
  --border: rgba(40, 20, 60, 0.09);
  --border-strong: rgba(40, 20, 60, 0.18);
  --text: #1c1424;
  --text-2: #4d4458;
  --text-3: #6b6276;
  --primary: #5b3592;
  --on-primary: #ffffff;
  --accent: #5b3592;
  --ring: rgba(116, 70, 176, 0.35);
  --good: #2a7d34;
  --bad: #c42b4c;
  --warn: #9a6200;
  --grad: linear-gradient(135deg, #3a1f5c 0%, #4b2a73 100%); /* quasi uni : l'énergie est réservée au carrousel et aux factions */
  --grad-btn: linear-gradient(135deg, #7446b0 0%, #53308a 100%);
  --grad-soft: linear-gradient(135deg, #f7f2fc 0%, #eee5f8 55%, #e4f1df 100%);
  --grad-text: linear-gradient(100deg, #4b2a73, #8a3a9a 50%, #b2366e);
  --grad-violet: linear-gradient(135deg, #c23f7e, #8a2a62);
  --progress: linear-gradient(90deg, #3f8a46, #7cc46a);
  --glow-a: rgba(116, 70, 176, 0.13);
  --glow-b: rgba(79, 157, 85, 0.10);
  --shadow-sm: 0 1px 2px rgba(40, 20, 60, 0.05), 0 2px 8px -2px rgba(40, 20, 60, 0.08);
  --shadow: 0 2px 4px rgba(40, 20, 60, 0.04), 0 18px 40px -18px rgba(40, 20, 60, 0.28);
  --tint-shadow: rgba(40, 18, 64, 0.75);
  --scrim: rgba(22, 12, 32, 0.84);
  --radius: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Unbounded", "Inter", system-ui, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --nav-h: 64px;
  --btn-bg: linear-gradient(135deg, #7446b0 0%, #53308a 100%);
  --btn-ink: #ffffff;
  --p0: #5b3592; --p1: #b2366e; --p2: #2f6fb0; --p3: #b0761f; --p4: #3f8a46; --p5: #c0532b; --p6: #1f8a8a; --p7: #7a3d8f;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --btn-bg: linear-gradient(135deg, #d4c2f5, #ac8fe3);
  --btn-ink: #1c0f2b;
  --brand: #c4b0ee;
  --violet: #c4b0ee;
  --violet-soft: rgba(196, 176, 238, 0.12);
  --moss: #6cc276;
  --bg: #0f0b14;
  --bg-2: #130e19;
  --surface: #18121f;
  --surface-2: #1f1828;
  --surface-3: #2a2135;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f1edf6;
  --text-2: #bdb3c9;
  --text-3: #918799;
  --primary: #c9b6f2;
  --on-primary: #1c0f2b;
  --accent: #cdb9f4;
  --ring: rgba(201, 182, 242, 0.35);
  --good: #7fd88a;
  --bad: #ff7a8f;
  --warn: #f2b44c;
  --grad-soft: linear-gradient(135deg, #1a1323 0%, #231833 60%, #1b2620 100%);
  --grad-text: linear-gradient(100deg, #f3ecff, #c9b6f2 45%, #f08fbf);
  --grad-violet: linear-gradient(135deg, #e06aa0, #a03a78);
  --progress: linear-gradient(90deg, #5fbf6a, #a6e08f);
  --glow-a: rgba(116, 70, 176, 0.18);
  --glow-b: rgba(63, 138, 70, 0.10);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.8);
  --tint-shadow: rgba(0, 0, 0, 0.75);
  --p0: #c9b6f2; --p1: #f08fbf; --p2: #8fb0ff; --p3: #ffcf6e; --p4: #8fd890; --p5: #ffb27a; --p6: #74d3e8; --p7: #d9a3ec;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --btn-bg: linear-gradient(135deg, #d4c2f5, #ac8fe3); --btn-ink: #1c0f2b;
    --brand: #c4b0ee; --violet: #c4b0ee; --violet-soft: rgba(196, 176, 238, 0.12); --moss: #6cc276;
    --bg: #0f0b14; --bg-2: #130e19; --surface: #18121f; --surface-2: #1f1828; --surface-3: #2a2135;
    --border: rgba(255, 255, 255, 0.07); --border-strong: rgba(255, 255, 255, 0.14);
    --text: #f1edf6; --text-2: #bdb3c9; --text-3: #918799;
    --primary: #c9b6f2; --on-primary: #1c0f2b; --accent: #cdb9f4; --ring: rgba(201, 182, 242, 0.35);
    --good: #7fd88a; --bad: #ff7a8f; --warn: #f2b44c;
    --grad-soft: linear-gradient(135deg, #1a1323 0%, #231833 60%, #1b2620 100%);
    --grad-text: linear-gradient(100deg, #f3ecff, #c9b6f2 45%, #f08fbf);
    --grad-violet: linear-gradient(135deg, #e06aa0, #a03a78);
    --progress: linear-gradient(90deg, #5fbf6a, #a6e08f);
    --glow-a: rgba(116, 70, 176, 0.18); --glow-b: rgba(63, 138, 70, 0.10);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35); --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.8); --tint-shadow: rgba(0, 0, 0, 0.75);
    --p0: #c9b6f2; --p1: #f08fbf; --p2: #8fb0ff; --p3: #ffcf6e; --p4: #8fd890; --p5: #ffb27a; --p6: #74d3e8; --p7: #d9a3ec;
    color-scheme: dark;
  }
}
/* Bouton principal : piloté par des variables (chaque thème du site les redéfinit). */
.btn--primary, .navlink.is-active { background: var(--btn-bg); color: var(--btn-ink); }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0; min-height: 100vh; font-family: var(--font); font-size: 15px; line-height: 1.55;
  color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(700px 500px at 0% -10%, var(--glow-a), transparent 70%),
    radial-gradient(700px 520px at 100% 0%, var(--glow-b), transparent 70%),
    radial-gradient(600px 500px at 50% 120%, var(--glow-a), transparent 70%);
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--moss); color: #1c1027; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; padding: 10px 14px; background: var(--primary); color: var(--on-primary); border-radius: 10px; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.noscript { padding: 40px; text-align: center; }

.boot { min-height: 100vh; display: grid; place-items: center; }
.boot__ball, .spinner {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(to bottom, var(--brand) 0 46%, var(--text) 46% 54%, var(--surface) 54%);
  box-shadow: inset 0 0 0 3px var(--text); animation: spin 1s cubic-bezier(.5,.1,.5,.9) infinite;
}
.spinner { width: 22px; height: 22px; box-shadow: inset 0 0 0 2px var(--text); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Layout ---------- */
.shell { min-height: 100vh; display: flex; flex-direction: column; }

.main { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 24px 16px 110px; overflow-x: clip; }
.main:focus { outline: none; }
@media (min-width: 768px) { .main { padding: 32px 32px 80px; } }
.view { animation: rise .45s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* Sidebar (desktop) */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 30;
  display: none; flex-direction: column; gap: 6px; padding: 22px 16px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: blur(20px) saturate(1.3); -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border-right: 1px solid var(--border);
}
@media (min-width: 1024px) { .sidebar { display: flex; } }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: -.02em; padding: 4px 8px 18px; }
.logo__img {
  width: 38px; height: 38px; flex-shrink: 0; object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(60,30,90,.35));
  transition: transform .6s var(--ease);
}
.logo:hover .logo__img { transform: rotate(-12deg) scale(1.08); }
.logo span b { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav__link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  color: var(--text-2); text-decoration: none; font-weight: 550; font-size: 14.5px; transition: background .2s, color .2s;
}
.nav__link svg { width: 20px; height: 20px; flex-shrink: 0; }
.nav__link:hover { background: var(--surface-2); color: var(--text); }
.nav__link.is-active { background: var(--grad); color: #fff; box-shadow: 0 10px 24px -12px rgba(40,18,64,.8); }
.sidebar__foot { margin-top: auto; display: grid; gap: 8px; }
.me-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); text-decoration: none; }
.me-card:hover { border-color: var(--border-strong); }
.me-card__name { font-weight: 650; font-size: 14px; line-height: 1.2; }
.me-card__user { font-size: 12.5px; color: var(--text-3); }

/* Topbar (mobile + visiteurs) */
.topbar {
  position: sticky; top: 0; z-index: 25; display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid var(--border);
}
.topbar .logo { padding: 0; font-size: 16px; }
.topbar__links { display: none; gap: 4px; margin-left: 16px; }
.topbar__links a { padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--text-2); font-weight: 550; font-size: 14.5px; }
.topbar__links a:hover, .topbar__links a.is-active { color: var(--text); background: var(--surface-2); }
@media (min-width: 820px) { .topbar__links { display: flex; } }
.topbar__end { margin-left: auto; display: flex; align-items: center; gap: 8px; }


/* Bottom nav (mobile) */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px 6px max(6px, env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
}
@media (min-width: 900px) { .bottomnav { display: none; } }
.bottomnav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 12px; text-decoration: none; color: var(--text-3); font-size: 11px; font-weight: 600; }
.bottomnav a svg { width: 22px; height: 22px; }
.bottomnav a.is-active { color: var(--text); }
.bottomnav a.is-active svg { color: var(--brand); }


/* Footer */
.footer { border-top: 1px solid var(--border); padding: 28px 16px 120px; color: var(--text-3); font-size: 13.5px; }
@media (min-width: 900px) { .footer { padding-bottom: 32px; } }
.footer__inner { max-width: 1240px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; justify-content: space-between; }
.footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer a, .footer button { color: var(--text-2); text-decoration: none; background: none; border: 0; padding: 0; font-size: 13.5px; }
.footer a:hover, .footer button:hover { color: var(--text); text-decoration: underline; }

/* ---------- Typo & sections ---------- */
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.display { font-family: var(--display); font-weight: 900; letter-spacing: -.035em; line-height: 1.02; font-size: clamp(36px, 6.5vw, 72px); }
.grad-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.h1 { font-family: var(--display); font-weight: 700; letter-spacing: -.03em; font-size: clamp(26px, 4vw, 38px); }
.h2 { font-family: var(--display); font-weight: 700; letter-spacing: -.02em; font-size: 19px; }
.h3 { font-weight: 700; font-size: 16px; }
.lead { color: var(--text-2); font-size: 17px; max-width: 620px; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.section { margin-top: 36px; }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.stack { display: grid; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }

/* ---------- Surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card--pad { padding: 20px; }
@media (min-width: 768px) { .card--pad { padding: 24px; } }
.card--glass { background: color-mix(in srgb, var(--surface) 70%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.grid { display: grid; gap: 16px; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.grid-3 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.split { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .split { grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); align-items: start; } }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  padding: 10px 18px; border-radius: 12px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font-weight: 650; font-size: 14.5px; text-decoration: none;
  transition: transform .15s, box-shadow .2s, background .2s, border-color .2s, opacity .2s;
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--btn-bg); color: #fff; border-color: transparent; box-shadow: 0 12px 28px -14px rgba(40,18,64,.9); background-size: 140% 140%; background-position: 0% 50%; }
.btn--primary:hover { background-position: 100% 50%; box-shadow: 0 16px 32px -14px rgba(40,18,64,.95); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn--ghost:hover { background: var(--surface-2); color: var(--text); border-color: transparent; }
.btn--danger { color: var(--bad); }
.btn--danger:hover { border-color: var(--bad); }
.btn--sm { padding: 7px 12px; font-size: 13.5px; border-radius: 10px; }
.btn--lg { padding: 14px 24px; font-size: 16px; border-radius: 14px; }
.btn--block { width: 100%; }
.icon-btn {
  width: 40px; height: 40px; display: inline-grid; place-items: center; flex-shrink: 0;
  border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); transition: all .2s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn--sm { width: 32px; height: 32px; border-radius: 10px; }
.icon-btn--sm svg { width: 16px; height: 16px; }

.seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 13px; background: var(--surface-2); border: 1px solid var(--border); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg button, .seg a { border: 0; background: none; padding: 7px 14px; border-radius: 10px; font-size: 13.5px; font-weight: 650; color: var(--text-2); white-space: nowrap; text-decoration: none; }
.seg .is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); white-space: nowrap; }
.chip--grad { background: var(--grad); color: #fff; border-color: transparent; }
.chip--good { color: var(--good); }
.chip--bad { color: var(--bad); }
.tag { font-family: var(--display); font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 3px 7px; border-radius: 7px; background: var(--grad); color: #fff; }

/* ---------- Formulaires ---------- */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field > span, .label { font-size: 13px; font-weight: 650; color: var(--text-2); }
.input, .select, .textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font-size: 15px; transition: border-color .2s, box-shadow .2s;
}
.textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--bad); }
.field__error { font-size: 12.5px; color: var(--bad); font-weight: 600; min-height: 0; }
.field__hint { font-size: 12.5px; color: var(--text-3); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-2); }
input[type="range"] { width: 100%; accent-color: var(--brand); }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); flex-shrink: 0; }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.form-error { padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); font-weight: 600; font-size: 14px; }
.search-input { position: relative; }
.search-input svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-3); pointer-events: none; }
.search-input .input { padding-left: 42px; }
.pw-meter { height: 5px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.pw-meter span { display: block; height: 100%; width: 0; border-radius: 99px; transition: width .3s, background .3s; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---------- Avatars ---------- */
.avatar {
  --pc: var(--p0);
  width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; flex-shrink: 0;
  font-family: var(--display); font-weight: 700; font-size: 13px; color: #fff; text-decoration: none;
  background: linear-gradient(135deg, var(--pc), color-mix(in srgb, var(--pc) 55%, #1c1027));
  box-shadow: 0 0 0 2px var(--surface);
}
.avatar--sm { width: 28px; height: 28px; font-size: 11px; }
.avatar--lg { width: 72px; height: 72px; font-size: 26px; }
.avatar--xl { width: 96px; height: 96px; font-size: 34px; box-shadow: 0 0 0 4px rgba(255,255,255,.85), 0 12px 30px -10px rgba(0,0,0,.5); }

/* ---------- KPI ---------- */
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .kpis--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1480px) { .kpis--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.kpi { padding: 16px 18px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border); position: relative; overflow: hidden; transition: transform .2s, border-color .2s; }
.kpi:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.kpi__label { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.kpi__value { font-family: var(--display); font-weight: 700; font-size: clamp(20px, 2.6vw, 26px); letter-spacing: -.02em; margin-top: 6px; line-height: 1.1; }
.kpi__sub { font-size: 12.5px; color: var(--text-2); margin-top: 4px; }
.kpi--grad { background: var(--grad); border-color: transparent; color: #fff; }
.kpi--grad .kpi__label, .kpi--grad .kpi__sub { color: rgba(255,255,255,.78); }
.kpi--soft { background: var(--grad-soft); border-color: transparent; }

/* ---------- Hero ---------- */
.hero {
  --h-from: var(--deep); --h-via: var(--sea); --h-to: var(--jungle); --h-angle: 135deg; --h-accent: var(--lime);
  --h-ink: #ffffff; --h-inv: #1c1027; --h-scrim: rgba(20,10,30,.45);
  position: relative; overflow: hidden; border-radius: 28px; color: var(--h-ink); padding: 28px 22px;
  background: linear-gradient(var(--h-angle), var(--h-from), var(--h-via), var(--h-to));
  box-shadow: 0 30px 60px -30px rgba(40,18,64,.8);
}
@media (min-width: 768px) { .hero { padding: 36px 36px; } }
/* Voile côté texte : garantit un contraste lisible quel que soit le dégradé choisi. */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, var(--h-scrim) 0%, var(--h-scrim) 30%, transparent 85%);
}
.hero::after {
  content: ""; position: absolute; right: -70px; top: -70px; width: 280px; height: 280px; border-radius: 50%; pointer-events: none; opacity: .14;
  background:
    radial-gradient(circle, transparent 0 34px, var(--h-ink) 34px 52px, transparent 52px),
    linear-gradient(to bottom, transparent 0 46%, var(--h-ink) 46% 54%, transparent 54%);
  -webkit-mask: radial-gradient(circle, #000 0 139px, transparent 140px); mask: radial-gradient(circle, #000 0 139px, transparent 140px);
  box-shadow: inset 0 0 0 18px var(--h-ink);
}
.hero > * { position: relative; z-index: 1; }
.hero__top { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.hero__name { font-family: var(--display); font-weight: 900; font-size: clamp(26px, 4.6vw, 42px); letter-spacing: -.03em; }
.hero__sub { color: color-mix(in srgb, var(--h-ink) 88%, transparent); font-size: 14.5px; margin-top: 4px; }
.hero__value { font-family: var(--display); font-weight: 900; font-size: clamp(32px, 6vw, 52px); letter-spacing: -.04em; line-height: 1; margin-top: 22px; }
.hero__stats { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 16px; font-size: 14px; color: color-mix(in srgb, var(--h-ink) 90%, transparent); }
.hero__stats b { color: var(--h-ink); font-weight: 700; }
.hero .btn { background: color-mix(in srgb, var(--h-ink) 16%, transparent); color: var(--h-ink); border-color: color-mix(in srgb, var(--h-ink) 32%, transparent); backdrop-filter: blur(8px); }
.hero .btn:hover { background: color-mix(in srgb, var(--h-ink) 26%, transparent); }
.hero .btn--light { background: var(--h-ink); color: var(--h-inv); border-color: transparent; }
.hero .chip { background: color-mix(in srgb, var(--h-ink) 16%, transparent); color: var(--h-ink); border-color: color-mix(in srgb, var(--h-ink) 26%, transparent); }
.hero .accent-pill { background: var(--h-accent); color: var(--h-accent-ink, #1c1027); border-color: transparent; }
.hero a:not(.btn):not(.chip) { color: var(--h-ink); }

/* ---------- Landing ---------- */
.landing-hero { display: grid; gap: 40px; align-items: center; padding: 30px 0 10px; grid-template-columns: 1fr; }
@media (min-width: 960px) { .landing-hero { grid-template-columns: 1.1fr 1fr; padding: 60px 0 30px; } }
.landing-hero .lead { margin: 18px 0 28px; }
.fan { position: relative; height: 380px; max-width: 460px; margin: 0 auto; width: 100%; }
.fan img {
  position: absolute; left: 50%; top: 50%; width: 46%; height: auto; border-radius: 14px; box-shadow: 0 30px 50px -20px rgba(40,18,64,.7);
  transform-origin: 50% 120%; transition: transform .6s var(--ease);
}
.fan img:nth-child(1) { transform: translate(-50%, -50%) rotate(-14deg) translateX(-34%); }
.fan img:nth-child(2) { transform: translate(-50%, -50%) rotate(0deg) translateY(-6%); z-index: 2; }
.fan img:nth-child(3) { transform: translate(-50%, -50%) rotate(14deg) translateX(34%); }
.fan:hover img:nth-child(1) { transform: translate(-50%, -50%) rotate(-19deg) translateX(-44%); }
.fan:hover img:nth-child(3) { transform: translate(-50%, -50%) rotate(19deg) translateX(44%); }
.features { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1050px) { .features { grid-template-columns: repeat(4, 1fr); } }
.feature { padding: 22px; }
.feature__icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--grad); color: #fff; margin-bottom: 14px; }
.feature__icon svg { width: 22px; height: 22px; }
.feature h3 { font-size: 16px; margin-bottom: 6px; }
.feature p { color: var(--text-2); font-size: 14px; }

/* ---------- Auth ---------- */
.auth { min-height: calc(100vh - 140px); display: grid; place-items: center; padding: 20px 0; }
.auth__card { width: 100%; max-width: 440px; padding: 28px 22px; }
@media (min-width: 560px) { .auth__card { padding: 36px; } }
.auth__head { text-align: center; margin-bottom: 22px; }
.auth__head .logo__img { margin: 0 auto 14px; width: 72px; height: 72px; }
.gsi { display: flex; justify-content: center; min-height: 44px; }
.legal-note { font-size: 12.5px; color: var(--text-3); text-align: center; }
.legal-note a { color: var(--text-2); }

/* ---------- Grilles de cartes Pokémon ---------- */
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px; } }
.tcg { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: inherit; }
.tcg__img {
  position: relative; aspect-ratio: 63 / 88; border-radius: 4.5% / 3.3%; overflow: hidden;
  background: var(--surface-2); box-shadow: 0 10px 24px -14px rgba(40,18,64,.7);
  transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .25s ease, box-shadow .25s;
}
.tcg__img img { width: 100%; height: 100%; object-fit: cover; }
.tcg__img::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.55), transparent 45%),
              linear-gradient(115deg, transparent 25%, rgba(165,221,143,.35) 45%, rgba(158,131,182,.35) 55%, transparent 75%);
  mix-blend-mode: overlay;
}
.tcg:hover .tcg__img { box-shadow: 0 22px 40px -18px rgba(40,18,64,.85); }
.tcg:hover .tcg__img::after { opacity: 1; }
.tcg__noimg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 12px; font-size: 13px; color: var(--text-3); background: var(--grad-soft); }
.tcg__meta { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; padding: 0 2px; }
.tcg__name { font-weight: 650; font-size: 13.5px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcg__num { font-size: 12px; color: var(--text-3); }
.tcg__price { font-family: var(--display); font-weight: 700; font-size: 13.5px; white-space: nowrap; }
.tcg__price.is-loading { width: 46px; height: 14px; border-radius: 6px; }
.tcg__badge { position: absolute; top: 6px; right: 6px; z-index: 1; padding: 3px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: rgba(22,12,32,.86); color: #fff; }

.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Marché ---------- */
.serie { margin-top: 34px; }
.serie__head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.serie__head img { height: 30px; width: auto; }
.sets { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.set-tile {
  display: flex; flex-direction: column; gap: 10px; padding: 16px; text-decoration: none; color: inherit;
  border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border); transition: transform .2s, border-color .2s, box-shadow .2s;
}
.set-tile:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.set-tile__logo { height: 64px; display: grid; place-items: center; }
.set-tile__logo img { max-height: 64px; max-width: 100%; object-fit: contain; }
.set-tile__logo span { font-family: var(--display); font-weight: 700; color: var(--text-3); text-align: center; }
.set-tile__name { font-weight: 650; font-size: 14px; line-height: 1.3; }
.set-tile__foot { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--text-3); }
.set-hero { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.set-hero__logo { height: 90px; max-width: 260px; object-fit: contain; }
.progress { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--progress); border-radius: 99px; transition: width .3s; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar .search-input { flex: 1; min-width: 200px; }

/* ---------- Fiche carte ---------- */
.card-detail { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .card-detail { grid-template-columns: minmax(250px, 360px) minmax(0, 1fr); align-items: start; } }
.card-visual { position: relative; max-width: 320px; width: 100%; margin: 0 auto; }
@media (min-width: 900px) { .card-visual { position: sticky; top: calc(var(--nav-h) + 20px); max-width: none; } }
.card-visual .tcg__img { border-radius: 4.5% / 3.3%; box-shadow: 0 40px 70px -30px rgba(40,18,64,.9); }
.card-visual .tcg__img::after { opacity: .9; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1px; background: var(--border); border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--border); }
.fact__value { overflow-wrap: anywhere; }
.fact { background: var(--surface); padding: 12px 14px; }
.fact__label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.fact__value { font-weight: 650; margin-top: 2px; font-size: 14.5px; }
.price-main { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.sources { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.source { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.source__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.source__name { font-weight: 750; display: flex; align-items: center; gap: 8px; }
.source__dot { width: 10px; height: 10px; border-radius: 50%; }
.source dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 0; font-size: 14px; }
.source dt { color: var(--text-2); }
.source dd { margin: 0; font-weight: 650; text-align: right; }
.source a { font-size: 13px; font-weight: 600; color: var(--accent); }
.attack { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.attack__head { display: flex; justify-content: space-between; gap: 10px; font-weight: 700; }
.owned-box { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: var(--radius-md); background: var(--grad-soft); }

/* ---------- Graphiques ---------- */
.chart-wrap { position: relative; }
.chart-svg { width: 100%; height: 240px; display: block; overflow: visible; }
.chart-svg .grid-line { stroke: var(--border); stroke-dasharray: 3 4; }
.chart-svg .axis-label { fill: var(--text-3); font-size: 11px; font-family: var(--font); }
.chart-svg .line { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart-svg .dot { stroke: var(--surface); stroke-width: 2; }
.chart-tip { position: absolute; pointer-events: none; padding: 8px 10px; border-radius: 10px; background: var(--text); color: var(--bg); font-size: 12.5px; font-weight: 600; transform: translate(-50%, -110%); white-space: nowrap; opacity: 0; transition: opacity .15s; }
.chart-tip.is-on { opacity: 1; }
.legend-inline { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); }
.legend-inline span { display: inline-flex; align-items: center; gap: 6px; }
.legend-inline i { width: 12px; height: 3px; border-radius: 2px; display: inline-block; }
.bars { display: grid; gap: 10px; }
.bar { display: grid; grid-template-columns: minmax(80px, 140px) 1fr auto; gap: 12px; align-items: center; font-size: 14px; }
.bar__label { display: flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; }
.bar__label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar__track { height: 10px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bar__fill { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--progress); transition: width .9s var(--ease); }
.bar__val { font-weight: 650; min-width: 64px; text-align: right; }

/* ---------- Classement ---------- */
.board { overflow-x: auto; }
.board table { width: 100%; border-collapse: collapse; min-width: 720px; }
.board th { text-align: right; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); padding: 12px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.board th:nth-child(-n+2) { text-align: left; }
.board th button { border: 0; background: none; padding: 0; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; }
.board th button.is-sorted { color: var(--accent); }
.board td { padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.board td:nth-child(-n+2) { text-align: left; }
.board tr:last-child td { border-bottom: 0; }
.board tbody tr { transition: background .15s; }
.board tbody tr:hover { background: var(--surface-2); }
.board .rank { font-family: var(--display); font-weight: 700; color: var(--text-3); width: 40px; }
.board .rank--1 { color: #c8901a; }
.board .who { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 650; }
.board .me-row { background: color-mix(in srgb, var(--moss) 14%, transparent); }

.awards { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .awards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .awards { grid-template-columns: repeat(4, 1fr); } }
.award { display: flex; gap: 14px; align-items: center; padding: 16px; }
.award__icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: var(--grad-soft); flex-shrink: 0; }
.award__title { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.award__who { font-family: var(--display); font-weight: 700; font-size: 16px; }

/* ---------- Clans ---------- */
.clan-tile { display: flex; gap: 14px; align-items: center; padding: 16px; text-decoration: none; color: inherit; transition: border-color .2s, transform .2s; }
.clan-tile:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.clan-badge {
  --pc: var(--p0);
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; flex-shrink: 0;
  font-family: var(--display); font-weight: 900; font-size: 14px; color: #fff; letter-spacing: -.02em;
  background: linear-gradient(135deg, var(--pc), color-mix(in srgb, var(--pc) 45%, #1c1027));
}
.clan-badge--lg { width: 76px; height: 76px; border-radius: 22px; font-size: 20px; }
.code-box { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; border: 1px dashed var(--border-strong); font-family: var(--display); font-weight: 700; letter-spacing: .12em; }

/* ---------- Social ---------- */
.feed { display: grid; gap: 14px; }
.post { padding: 18px; }
.post__head { display: flex; align-items: center; gap: 10px; }
.post__author { font-weight: 700; text-decoration: none; }
.post__meta { font-size: 12.5px; color: var(--text-3); }
.post__body { margin-top: 12px; white-space: pre-wrap; word-wrap: break-word; font-size: 15px; }
.post__card { display: flex; gap: 12px; align-items: center; margin-top: 12px; padding: 10px; border-radius: 14px; background: var(--surface-2); text-decoration: none; color: inherit; }
.post__card img { width: 54px; border-radius: 5px; }
.post__actions { display: flex; gap: 6px; margin-top: 12px; }
.post__actions .btn { padding: 6px 10px; font-size: 13.5px; }
.post__actions .is-liked { color: #d43d78; }
.post__actions .is-liked svg { fill: currentColor; }
.comments { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); display: grid; gap: 10px; }
.comment { display: flex; gap: 10px; font-size: 14px; }
.comment__bubble { background: var(--surface-2); padding: 8px 12px; border-radius: 14px; flex: 1; min-width: 0; word-wrap: break-word; }
.composer { padding: 16px; display: grid; gap: 12px; }
.composer .textarea { min-height: 70px; border: 0; background: var(--surface-2); }
.attached { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; background: var(--surface-2); font-size: 14px; }
.attached img { width: 36px; border-radius: 4px; }
.picker-results { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); max-height: 340px; overflow-y: auto; padding: 2px; }
.picker-results button { border: 0; background: none; padding: 0; text-align: left; font-size: 12px; }
.picker-results img { width: 100%; border-radius: 5px; aspect-ratio: 63/88; object-fit: cover; background: var(--surface-2); }

/* ---------- Tracker (produits scellés) ---------- */
.products { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
.product { overflow: hidden; display: flex; flex-direction: column; transition: transform .25s, border-color .25s, opacity .25s; }
.product.is-empty { opacity: .7; }
.product.is-empty:hover { opacity: 1; }
.product:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.product.is-owned { border-color: color-mix(in srgb, var(--moss) 60%, transparent); }
.product__media { position: relative; aspect-ratio: 4/3; background: radial-gradient(circle at 50% 40%, #fff, #f1edf6 75%); display: grid; place-items: center; overflow: hidden; }
.product__media img { width: 100%; height: 100%; object-fit: contain; padding: 14px; transition: transform .5s var(--ease); }
.product:hover .product__media img { transform: scale(1.05); }
.product__noimg { font-family: var(--display); font-weight: 900; font-size: 34px; color: #ab9fc0; }
.product__badge { position: absolute; top: 10px; left: 10px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgba(22,12,32,.85); color: #fff; }
.product__badge--hits { left: auto; right: 10px; background: var(--grad-violet); }
.product__body { padding: 16px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.product__title { font-weight: 700; font-size: 15px; line-height: 1.3; }
.steppers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.stepper { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 2px; border-radius: 12px; background: var(--surface-2); min-width: 0; }
.stepper__label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.stepper__ctrl { display: flex; align-items: center; gap: 2px; }
.stepper__btn { width: 26px; height: 26px; flex-shrink: 0; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); display: grid; place-items: center; font-weight: 700; color: var(--text-2); line-height: 1; transition: all .15s; }
.stepper__btn:hover:not(:disabled) { color: var(--text); border-color: var(--accent); }
.stepper__btn:active:not(:disabled) { transform: scale(.9); }
.stepper__btn:disabled { opacity: .3; cursor: not-allowed; }
.stepper__val { min-width: 24px; text-align: center; font-family: var(--display); font-weight: 700; font-size: 16px; }
.stepper--hits .stepper__val { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.product__foot { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); padding-top: 12px; border-top: 1px dashed var(--border); margin-top: auto; }
.product__foot b { color: var(--text); }
.pop { animation: bump .35s var(--ease); }
@keyframes bump { 40% { transform: scale(1.35); } }

/* ---------- Thème perso ---------- */
.presets { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
.preset { border: 2px solid transparent; border-radius: 14px; padding: 0; overflow: hidden; background: none; text-align: left; }
.preset.is-active { border-color: var(--text); }
.preset__swatch { height: 52px; }
.preset__name { display: block; padding: 6px 8px; font-size: 12px; font-weight: 650; background: var(--surface-2); }
.color-row { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .color-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.color-field { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface); }
.color-field input[type="color"] { width: 34px; height: 34px; border: 0; padding: 0; background: none; border-radius: 8px; cursor: pointer; }
.color-field span { font-size: 12px; color: var(--text-3); display: block; }
.color-field b { font-size: 13px; font-family: ui-monospace, monospace; }
.colors { display: flex; gap: 8px; flex-wrap: wrap; }
.colors label { position: relative; }
.colors input { position: absolute; opacity: 0; pointer-events: none; }
.colors span { display: block; width: 32px; height: 32px; border-radius: 50%; background: var(--pc); cursor: pointer; border: 3px solid transparent; transition: transform .15s; }
.colors input:checked + span { border-color: var(--text); transform: scale(1.1); }
.colors input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.switch input { position: absolute; opacity: 0; }
.switch i { width: 42px; height: 24px; border-radius: 99px; background: var(--surface-3); position: relative; transition: background .2s; flex-shrink: 0; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s; }
.switch input:checked + i { background: var(--brand); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---------- Dialog, toast, bannière cookies ---------- */
.dialog { border: 1px solid var(--border-strong); border-radius: 22px; padding: 0; background: var(--surface); color: var(--text); width: min(480px, calc(100vw - 24px)); box-shadow: var(--shadow); max-height: calc(100vh - 40px); }
.dialog--wide { width: min(720px, calc(100vw - 24px)); }
.dialog::backdrop { background: rgba(14,8,20,.55); backdrop-filter: blur(4px); }
.dialog[open] { animation: pop .2s ease-out; }
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(6px); } }
.dialog__body { padding: 24px; display: grid; gap: 16px; }
.dialog__actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.toast { position: fixed; left: 50%; bottom: 90px; z-index: 80; transform: translate(-50%, 20px); padding: 12px 18px; border-radius: 14px; background: var(--text); color: var(--bg); font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: all .3s var(--ease); max-width: calc(100vw - 32px); box-shadow: var(--shadow); }
@media (min-width: 1024px) { .toast { bottom: 28px; } }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast--bad { background: var(--bad); color: #fff; }
.cookie {
  position: fixed; z-index: 90; left: 12px; right: 12px; bottom: 12px; max-width: 560px; margin-left: auto;
  padding: 20px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow);
  display: grid; gap: 14px; animation: rise .4s ease-out;
}
.cookie p { font-size: 14px; color: var(--text-2); }
.cookie__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cookie__actions .btn { flex: 1; }

/* ---------- Divers ---------- */
.empty { text-align: center; padding: 40px 16px; color: var(--text-2); }
.empty__icon { font-size: 40px; margin-bottom: 8px; }
.empty h3 { font-family: var(--display); font-size: 18px; color: var(--text); margin-bottom: 6px; }
.legal { max-width: 780px; }
.legal h1 { margin-bottom: 8px; }
.legal h2 { font-family: var(--display); font-size: 18px; margin: 30px 0 10px; }
.legal p, .legal li { color: var(--text-2); margin: 0 0 10px; }
.legal ul { padding-left: 20px; }
.legal table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 10px 0; }
.legal th, .legal td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.notfound { text-align: center; padding: 60px 0; }
.notfound__code { font-family: var(--display); font-weight: 900; font-size: clamp(90px, 20vw, 180px); line-height: 1; letter-spacing: -.06em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.list { display: grid; gap: 8px; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: inherit; }
.list-item:hover { border-color: var(--border-strong); }
.mini-card { display: flex; gap: 12px; align-items: center; text-decoration: none; color: inherit; padding: 8px; border-radius: 14px; transition: background .15s; }
.mini-card:hover { background: var(--surface-2); }
.mini-card img { width: 44px; border-radius: 4px; flex-shrink: 0; }
.trend-up { color: var(--good); }
.trend-down { color: var(--bad); }
.banner-info { padding: 12px 16px; border-radius: 14px; background: var(--surface-2); color: var(--text-2); font-size: 13.5px; border: 1px solid var(--border); }
.banner-info a { color: var(--accent); font-weight: 600; }
details.more summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 14px; }

/* Mouvement réduit demandé par le système : on garde les fondus et transitions de couleur,
   on retire seulement les grands déplacements. data-motion="full" force toutes les animations,
   data-motion="reduced" les coupe toutes (réglage dans Paramètres). */
@media (prefers-reduced-motion: reduce) {
  :root:not([data-motion="full"]) .ctile--in,
  :root:not([data-motion="full"]) .product--in,
  :root:not([data-motion="full"]) .view { animation-name: fadeOnly; }
  :root:not([data-motion="full"]) .tcg__img { transform: none !important; }
  :root:not([data-motion="full"]) { scroll-behavior: auto; }
}
:root[data-motion="reduced"] *, :root[data-motion="reduced"] *::before, :root[data-motion="reduced"] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
@keyframes fadeOnly { from { opacity: 0; } }

/* =========================================================
   Catalogue & collection
   ========================================================= */
/* Grille de collection : nombre de cartes par ligne selon la taille choisie */
.cgrid { display: grid; gap: 14px 12px; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); --cols: 3; }
.cgrid--lg { --cols: 3; } .cgrid--md { --cols: 4; } .cgrid--sm { --cols: 5; }
@media (min-width: 600px)  { .cgrid--lg { --cols: 4; } .cgrid--md { --cols: 5; } .cgrid--sm { --cols: 6; } }
@media (min-width: 900px)  { .cgrid--lg { --cols: 6; } .cgrid--md { --cols: 7; } .cgrid--sm { --cols: 9; } }
@media (min-width: 1280px) { .cgrid--lg { --cols: 8; } .cgrid--md { --cols: 10; } .cgrid--sm { --cols: 12; } }
.cgrid--sm .ctile__meta, .cgrid--sm .ctile__num { display: none; }
.cgrid--sm .ctile__wish { display: none; }

.ctile { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ctile__frame { position: relative; }
.ctile__img { display: block; border-radius: 4.5% / 3.3%; }
.ctile.is-missing .ctile__img img { filter: grayscale(1) contrast(.9) brightness(1.05); opacity: .42; transition: filter .25s, opacity .25s; }
.ctile.is-missing:hover .ctile__img img { filter: grayscale(.4); opacity: .85; }
.ctile.is-owned .ctile__img { box-shadow: 0 0 0 2px var(--moss), 0 10px 24px -14px rgba(40,18,64,.7); }
.ctile__wish, .ctile__btn {
  position: absolute; z-index: 2; display: grid; place-items: center; border: 0;
  background: rgba(22,12,32,.82); color: #fff;
  transition: transform .15s, background .15s;
}
.ctile__wish { top: 6px; left: 6px; width: 28px; height: 28px; border-radius: 50%; }
.ctile__wish svg { fill: none; stroke: currentColor; stroke-width: 2; }
.ctile__wish.is-on { background: #e0457b; }
.ctile__wish.is-on svg { fill: currentColor; }
.ctile__ctrl { position: absolute; top: 6px; right: 6px; z-index: 2; display: flex; align-items: center; gap: 2px; border-radius: 999px; }
.ctile__ctrl.has-qty { background: rgba(22,12,32,.86); padding: 2px; }
.ctile__btn { position: static; width: 28px; height: 28px; border-radius: 50%; font-size: 18px; font-weight: 700; line-height: 1; }
.ctile__btn--add { background: var(--lime); color: #1c1027; }
.ctile__btn:hover { transform: scale(1.1); }
.ctile__btn:active { transform: scale(.92); }
.ctile__qty { min-width: 18px; text-align: center; color: #fff; font-family: var(--display); font-weight: 700; font-size: 13px; }
.ctile__num { position: absolute; left: 6px; bottom: 6px; z-index: 2; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 4px; border-radius: 999px; background: rgba(22,12,32,.78); color: #fff; font-size: 11px; font-weight: 700; }
.ctile__meta { display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.25; padding: 0 2px; }
.ctile__name { font-size: 12.5px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctile__price { font-size: 12px; color: var(--text-3); font-weight: 600; min-height: 15px; }
.ctile__price.is-loading { width: 40px; height: 12px; border-radius: 6px; }
.ctile.is-missing .ctile__name { color: var(--text-3); }

/* Symboles de rareté */
.rsym { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 3px; border-radius: 9px; font-size: 11px; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.r-common { background: #3a2f45; color: #eee8f4; }
.r-rare { background: #251d2e; color: #ffffff; }
.r-holo { background: linear-gradient(135deg, #3a4a6a, #6a5a8a); color: #fff; }
.r-silver { background: linear-gradient(135deg, #cfd6dc, #8d99a3); color: #1c1027; }
.r-gold { background: linear-gradient(135deg, #ffe08a, #c8901a); color: #3a2400; }
.r-shiny { background: linear-gradient(135deg, #2d2d2d, #6a6a6a); color: #ffe08a; }
.r-rainbow { background: linear-gradient(135deg, #ff8e9b, #ffcf6e, #c5e063, #74d3e8, #c7a4ff); color: #1c1027; }
.r-ace { background: linear-gradient(135deg, #e0457b, #8a1f4a); color: #fff; }
.r-classic { background: linear-gradient(135deg, #f2c94c, #b9831a); color: #3a2400; }
.rchips { display: flex; gap: 8px; flex-wrap: wrap; }
.rchip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 6px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); font-size: 13px; font-weight: 700; color: var(--text-2); transition: all .15s; }
.rchip:hover { border-color: var(--accent); }
.rchip.is-active { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 14%, var(--surface)); color: var(--text); box-shadow: 0 0 0 1px var(--primary); }
.seg--wide { display: flex; width: 100%; }
.seg--wide button { flex: 1; }

/* En-tête d'extension */
.set-head { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.set-head__logo { width: 150px; height: 90px; object-fit: contain; flex-shrink: 0; }
.set-head__badge, .set-row__badge { display: inline-grid; place-items: center; font-family: var(--display); font-weight: 900; color: #fff; background: var(--grad); border-radius: 14px; flex-shrink: 0; }
.set-head__badge { width: 150px; height: 90px; font-size: 28px; }
.abbr { display: inline-block; padding: 1px 6px; border-radius: 5px; border: 1.5px solid currentColor; font-size: 11px; font-weight: 800; letter-spacing: .04em; line-height: 1.4; color: var(--text-2); }
.collection-progress { display: grid; gap: 8px; }
.collection-progress .progress { height: 9px; }
.tabs-line { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs-line button { border: 1px solid var(--border); background: var(--surface); padding: 7px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 650; color: var(--text-2); }
.tabs-line button.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }

/* Catalogue (séries repliables) */
.catalog { display: grid; gap: 14px; }
.serie-panel { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); overflow: hidden; }
.serie-panel > summary { list-style: none; display: flex; align-items: center; gap: 16px; padding: 14px 18px; cursor: pointer; }
.serie-panel > summary::-webkit-details-marker { display: none; }
.serie-panel > summary:hover { background: var(--surface-2); }
.serie-panel__logo { width: 110px; height: 40px; object-fit: contain; flex-shrink: 0; }
.serie-panel__chev { margin-left: auto; transition: transform .2s; color: var(--text-3); }
.serie-panel[open] .serie-panel__chev { transform: rotate(180deg); }
.set-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) 20px; gap: 16px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--border); text-decoration: none; color: inherit; transition: background .15s; }
.set-row:hover { background: var(--surface-2); }
.set-row__logo { width: 76px; height: 46px; object-fit: contain; }
.set-row__badge { width: 76px; height: 46px; font-size: 13px; border-radius: 10px; }
.set-row__top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.set-row__name { font-weight: 700; }
.set-row__en { font-size: 12.5px; color: var(--text-3); }
.set-row__line { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.set-row__line .progress { flex: 1; height: 5px; }
.set-row__pct { font-size: 12.5px; color: var(--text-2); font-weight: 600; white-space: nowrap; }
.chip--soon { border-color: var(--accent); color: var(--accent); }
.set-row[hidden], .serie-panel[hidden] { display: none; }

/* Liste « Mes extensions » */
.set-progress-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.set-progress { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; padding: 12px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: inherit; }
.set-progress:hover { border-color: var(--border-strong); }
.set-progress img { width: 64px; height: 38px; object-fit: contain; }

/* Logo de clan */
.clan-badge--img { background: var(--surface-2); padding: 0; overflow: hidden; box-shadow: inset 0 0 0 1px var(--border); }
.clan-badge--img img { width: 100%; height: 100%; object-fit: cover; }
.logo-picker { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* Checklist imprimable */
.print-only { display: none; }
@media print {
  body::before, .sidebar, .topbar, .bottomnav, .footer, .cookie, .toast, .no-print, .ctile__wish, .ctile__ctrl { display: none !important; }
  .shell--app { padding-left: 0 !important; }
  body { background: #fff; color: #000; font-size: 11px; }
  .main { padding: 0; max-width: none; }
  .print-only { display: block; }
  .screen-only { display: none !important; }
  .checklist { columns: 3; column-gap: 18px; font-size: 11px; }
  .checklist div { break-inside: avoid; padding: 2px 0; border-bottom: .5px solid #ccc; }
}
.clan-badge--sm { width: 40px; height: 40px; border-radius: 12px; font-size: 11px; }
.tcg__noimg { color: var(--text-2); font-weight: 600; line-height: 1.35; }
/* Cartes étroites (mobile, tailles Moyen/Petit) : boutons plus compacts pour ne pas chevaucher le cœur */
@media (max-width: 899px) {
  .ctile__btn, .ctile__wish { width: 24px; height: 24px; font-size: 16px; }
  .ctile__wish, .ctile__ctrl { top: 4px; }
  .ctile__wish { left: 4px; }
  .ctile__ctrl { right: 4px; }
  .ctile__qty { min-width: 14px; font-size: 12px; }
  .ctile__num { left: 4px; bottom: 4px; padding: 1px 6px 1px 3px; font-size: 11px; }
}
.cgrid--md .ctile__btn, .cgrid--md .ctile__wish, .cgrid--sm .ctile__btn { width: 24px; height: 24px; font-size: 16px; }
.cgrid--md .ctile__qty, .cgrid--sm .ctile__qty { min-width: 14px; font-size: 12px; }

/* =========================================================
   Navigation du haut
   ========================================================= */
.topnav {
  position: sticky; top: 0; z-index: 40; height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}
.topnav__inner { max-width: 1320px; height: 100%; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 18px; }
@media (min-width: 768px) { .topnav__inner { padding: 0 28px; } }
.topnav .logo { padding: 0; font-size: 16px; flex-shrink: 0; }
.topnav__links { display: none; align-items: center; gap: 2px; margin: 0 auto; }
@media (min-width: 900px) { .topnav__links { display: flex; } }
.navlink {
  position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px;
  color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 14px;
  transition: color .2s var(--ease), background-color .2s var(--ease), transform .2s var(--ease);
}
.navlink svg { width: 17px; height: 17px; }
.navlink:hover { color: var(--text); background: var(--surface-2); }
.navlink:active { transform: scale(.97); }
.navlink.is-active { color: var(--btn-ink); background: var(--btn-bg); box-shadow: 0 8px 20px -10px rgba(83,48,138,.7); }
/* Écrans moyens : icônes seules, sauf la page active qui garde son nom (rien n’est coupé). */
@media (max-width: 1360px) { .navlink:not(.is-active) span { display: none; } .navlink:not(.is-active) { padding: 9px; } }
@media (max-width: 1020px) { .navlink span { display: none; } .navlink { padding: 9px; } }
.topnav__end { display: flex; align-items: center; gap: 8px; margin-left: auto; }
@media (min-width: 900px) { .topnav__end { margin-left: 0; } }
.usermenu { position: relative; }
.usermenu__btn { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); transition: border-color .2s var(--ease); }
.usermenu__btn:hover { border-color: var(--border-strong); }
.usermenu__name { font-weight: 650; font-size: 13.5px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .usermenu__name, .usermenu__btn .lvl { display: none; } .usermenu__btn { padding: 3px; } }
.usermenu__panel {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 230px; padding: 6px; z-index: 50;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 16px; box-shadow: var(--shadow);
  transform-origin: top right; animation: menuIn .22s var(--ease);
}
.usermenu__panel a, .usermenu__panel button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; background: none; border-radius: 10px; text-decoration: none; font-size: 14px; font-weight: 550; text-align: left; color: var(--text); }
.usermenu__panel a:hover, .usermenu__panel button:hover { background: var(--surface-2); }
.usermenu__panel svg { width: 17px; height: 17px; color: var(--text-3); }
.usermenu__panel hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px) scale(.97); } }
.bottomnav { z-index: 40; }
.main { max-width: 1320px; }

/* Barre de chargement de page */
.routebar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100; pointer-events: none; transform: scaleX(0); transform-origin: left; background: linear-gradient(90deg, var(--jungle), var(--lime), var(--ball-2)); opacity: 0; }
.routebar.is-on { opacity: 1; animation: routebar 2.2s var(--ease) forwards; }
.routebar.is-done { animation: none; transform: scaleX(1); opacity: 0; transition: transform .2s var(--ease), opacity .3s .15s; }
@keyframes routebar { 0% { transform: scaleX(0); } 60% { transform: scaleX(.7); } 100% { transform: scaleX(.88); } }
.page-skeleton { display: grid; gap: 16px; padding-top: 8px; }
.page-skeleton .skeleton { border-radius: 16px; }

/* Transitions de page (View Transitions API) */
@supports (view-transition-name: none) {
  ::view-transition-old(root) { animation: vtOut .18s var(--ease) both; }
  ::view-transition-new(root) { animation: vtIn .32s var(--ease) both; }
  .topnav { view-transition-name: topnav; }
  .bottomnav { view-transition-name: bottomnav; }
}
@keyframes vtOut { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vtIn { from { opacity: 0; transform: translateY(10px); } }

/* =========================================================
   Fluidité des grilles
   ========================================================= */
.ctile { content-visibility: auto; contain-intrinsic-size: auto 260px; }
.ctile--in { animation: tileIn .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 14ms); }
@keyframes tileIn { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.ctile__frame { transition: transform .3s var(--ease); }
.ctile:hover .ctile__frame { transform: translateY(-4px); }
.ctile__img { transition: box-shadow .3s var(--ease); }
.ctile:hover .ctile__img { box-shadow: 0 18px 34px -16px rgba(0, 0, 0, .55); }
.ctile.is-owned .ctile__img { box-shadow: 0 0 0 2px var(--moss), 0 10px 24px -14px rgba(0, 0, 0, .5); }
.ctile__btn, .ctile__wish { transition: transform .18s var(--ease-spring), background-color .18s var(--ease); }
.ctile.is-missing .ctile__img img { transition: filter .35s var(--ease), opacity .35s var(--ease); }
.card, .kpi, .set-tile, .clan-tile, .list-item, .product { transition: transform .3s var(--ease), border-color .25s var(--ease), box-shadow .3s var(--ease), opacity .3s var(--ease); }
.btn { transition: transform .18s var(--ease), box-shadow .25s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), opacity .2s; }
.btn:active { transform: scale(.97); }
.pop { animation: bump .4s var(--ease-spring); }
.progress span { transition: width .8s var(--ease); }
html { scroll-behavior: smooth; }

/* Niveaux et avatars */
.lvl { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .02em; color: #fff; background: var(--grad-violet); white-space: nowrap; vertical-align: middle; }
.avatar--img { padding: 0; overflow: hidden; background: var(--surface-3); }
.avatar--img img { width: 100%; height: 100%; object-fit: cover; }
.xpbar { height: 6px; border-radius: 99px; background: color-mix(in srgb, var(--h-ink, var(--text)) 18%, transparent); overflow: hidden; width: 180px; }
.xpbar span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #c3aee6, #e2d6f5); transition: width .9s var(--ease); }

/* =========================================================
   Carrousels
   ========================================================= */

.hcarousel { position: relative; }
.htrack { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 6px 2px 14px; scrollbar-width: none; overscroll-behavior-x: contain; }
.htrack::-webkit-scrollbar { display: none; }
.htrack > * { scroll-snap-align: start; flex-shrink: 0; }
.hcarousel__nav { position: absolute; top: 50%; z-index: 3; width: 40px; height: 40px; margin-top: -26px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); display: none; place-items: center; box-shadow: var(--shadow); transition: opacity .2s var(--ease), transform .2s var(--ease); }
.hcarousel__nav:hover { transform: scale(1.08); }
.hcarousel__nav[disabled] { opacity: 0; pointer-events: none; }
.hcarousel__nav--prev { left: -14px; } .hcarousel__nav--next { right: -14px; }
@media (min-width: 900px) and (hover: hover) { .hcarousel__nav { display: grid; } }

/* Tuile d'extension (carrousels du catalogue et de l'accueil) */
.setcard {
  width: 220px; display: flex; flex-direction: column; gap: 10px; padding: 14px; text-decoration: none; color: inherit;
  border-radius: 18px; background: var(--surface); border: 1px solid var(--border);
  transition: transform .3s var(--ease), border-color .25s var(--ease), box-shadow .3s var(--ease);
}
.setcard:hover { transform: translateY(-5px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.setcard__logo { height: 84px; display: grid; place-items: center; border-radius: 12px; background: radial-gradient(circle at 50% 40%, var(--surface-2), transparent 75%); }
.setcard__logo img { max-height: 76px; max-width: 92%; object-fit: contain; transition: transform .35s var(--ease); }
.setcard:hover .setcard__logo img { transform: scale(1.06); }
.setcard__logo .set-row__badge { width: 96px; height: 56px; font-size: 16px; }
.setcard__name { font-weight: 700; font-size: 14.5px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 36px; }
.setcard__en { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: -6px; }
.setcard__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--text-2); }
.setcard .progress { height: 5px; }
.serie-block { margin-top: 30px; }
.serie-block__head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.serie-block__head img { height: 28px; width: auto; max-width: 120px; object-fit: contain; }
.serie-block[hidden], .setcard[hidden] { display: none; }

/* =========================================================
   Produits scellés (visuels sans fond blanc)
   ========================================================= */
.product__media { background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--moss) 18%, var(--surface-2)), var(--surface-2) 72%); }
.product__media img { filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .28)); padding: 18px; }
.pvisual { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; background: linear-gradient(140deg, var(--pv-a, #2f5a3a), var(--pv-b, #3f7f45) 60%, var(--pv-c, #6eb257)); }
.pvisual::before { content: ""; position: absolute; width: 140%; height: 60%; top: -10%; left: -20%; background: radial-gradient(ellipse, rgba(255,255,255,.22), transparent 65%); transform: rotate(-8deg); }
.pvisual__box { position: relative; width: 62%; aspect-ratio: 1.3; border-radius: 12px; background: linear-gradient(160deg, rgba(255,255,255,.95), rgba(244,240,248,.92)); box-shadow: 0 18px 30px -12px rgba(0,0,0,.55), inset 0 -10px 0 rgba(0,0,0,.06); display: grid; place-items: center; padding: 10px; transform: perspective(500px) rotateY(-12deg) rotateX(4deg); transition: transform .45s var(--ease); }
.product:hover .pvisual__box { transform: perspective(500px) rotateY(-4deg) rotateX(2deg) scale(1.04); }
.pvisual__box img { max-width: 92%; max-height: 70%; object-fit: contain; filter: none; padding: 0; }
.pvisual__kind { position: absolute; bottom: 8px; right: 8px; padding: 3px 9px; border-radius: 999px; font-family: var(--display); font-size: 11px; font-weight: 800; letter-spacing: .04em; color: #1c1027; background: var(--lime); }
.pvisual--display .pvisual__box { aspect-ratio: 1.6; }
.pvisual--booster .pvisual__box { width: 40%; aspect-ratio: .62; }
.pvisual--tin .pvisual__box { width: 46%; aspect-ratio: 1; border-radius: 22%; }
.set-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.set-chips::-webkit-scrollbar { display: none; }
.set-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); font-size: 13px; font-weight: 650; white-space: nowrap; color: var(--text-2); transition: all .2s var(--ease); }
.set-chip img { height: 22px; width: 44px; object-fit: contain; }
.set-chip.is-active { border-color: var(--primary); color: var(--text); box-shadow: 0 0 0 1px var(--primary); background: color-mix(in srgb, var(--primary) 12%, var(--surface)); }
.chip--btn { cursor: pointer; }
.chip--btn:hover { border-color: var(--accent); }

/* Classement des clans */
.rank-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--border); text-decoration: none; color: inherit; transition: background-color .2s var(--ease); }
.rank-row:first-child { border-top: 0; }
.rank-row:hover { background: var(--surface-2); }
.rank-row.is-mine { background: color-mix(in srgb, var(--moss) 10%, transparent); }
.rank-row__pos { font-family: var(--display); font-weight: 800; font-size: 16px; text-align: center; color: var(--text-3); }
.rank-row__pos--1 { color: #d4a017; } .rank-row__pos--2 { color: #9aa7b0; } .rank-row__pos--3 { color: #b87333; }
.rank-row__val { font-family: var(--display); font-weight: 700; text-align: right; }
.product--in { animation: tileIn .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 25ms); }
/* Coffret stylisé (produits sans photo) : boîte sombre brillante, logo de l'extension en façade */
.pvisual { background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--moss) 28%, var(--surface-2)), var(--surface-2) 75%); }
.pvisual::before { background: radial-gradient(ellipse, rgba(255,255,255,.12), transparent 65%); }
.pvisual__box {
  background: linear-gradient(155deg, #33244a 0%, #1c1328 55%, #120c1a 100%);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 22px 34px -14px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255,255,255,.18), inset 0 -14px 24px rgba(0,0,0,.35);
  overflow: hidden;
}
.pvisual__box::before { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.14) 48%, transparent 60%); transform: translateX(-60%); transition: transform .8s var(--ease); }
.product:hover .pvisual__box::before { transform: translateX(60%); }
.pvisual__box::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 22%; background: linear-gradient(90deg, var(--jungle), var(--lime)); opacity: .9; }
.product__media .pvisual__box img { position: relative; z-index: 1; width: auto; height: auto; max-width: 86%; max-height: 62%; padding: 0; margin-bottom: 14%; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .5)); transform: none; }
.product:hover .product__media .pvisual__box img { transform: none; }
.pvisual__box .product__noimg { position: relative; z-index: 1; color: #eef2ee; }
.pvisual--booster .pvisual__box::after { height: 14%; }
.setcard__logo img.set-row__logo { width: auto; height: auto; max-width: 92%; max-height: 76px; }

/* =========================================================
   Garde-fous contre les débordements de texte
   ========================================================= */
/* Les colonnes de grille / flex peuvent rétrécir (sinon un contenu long élargit toute la page). */
.stack > *, .grid > *, .grid-2 > *, .grid-3 > *, .split > *, .kpis > *, .card-detail > *, .landing-hero > *, .hero__top > *, .phead > *, .set-head > *, .page-head > *, .section__head > * { min-width: 0; }
/* Pastilles et boutons des rangées défilantes : jamais compressés. */
.set-chip, .seg button, .seg a, .tabs-line button, .rchip, .chip, .btn, .navlink, .pchip, .tag, .abbr, .lvl { flex-shrink: 0; }
.seg { flex-wrap: nowrap; }
.btn { max-width: 100%; }
/* Titres et textes longs : retour à la ligne plutôt que débordement. */
h1, h2, h3, .h1, .h2, .h3, .hero__name, .phead__name, .display, .product__title, .set-row__name, .award__who, .post__body, .comment__bubble, .kpi__sub, .fact__value, .legal p, .legal li { overflow-wrap: break-word; }
.hero__name, .h1 { hyphens: auto; }
/* Grands nombres : taille adaptée à la largeur de la tuile. */
.kpi { container-type: inline-size; }
.kpi__value { font-size: clamp(17px, 13cqi, 26px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi__label { overflow-wrap: break-word; }
.hero__value { font-size: clamp(30px, 6vw, 52px); overflow-wrap: anywhere; }
.price-main .kpi__value { font-size: clamp(16px, 14cqi, 24px); }
.sealed-panel .kpi__value { white-space: nowrap; }
/* Lignes qui doivent pouvoir passer à la ligne sur petit écran */
.row { min-width: 0; }
.row > span, .row > b, .row > div { min-width: 0; }
.section__head .h2, .page-head .h1 { flex: 1 1 auto; }
.toolbar > * { min-width: 0; }
.toolbar .select { flex: 0 0 auto; }
/* Tuiles d'extension : texte toujours contenu */
.setcard__foot { flex-wrap: wrap; row-gap: 4px; }
.setcard__foot > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Produits */
.product__title { line-height: 1.25; }
.product .row .chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.product__foot { gap: 8px; flex-wrap: wrap; }
/* Barre du haut : le nom d'utilisateur se tronque proprement */
.usermenu__btn { max-width: 230px; min-width: 0; }
.usermenu__name { min-width: 0; }
.topnav__inner { min-width: 0; }
.topnav__links { min-width: 0; overflow: hidden; }
/* Tableaux de classement : nombres sur une ligne, noms tronqués */
.board .who { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row > * { min-width: 0; }
.rank-row b { overflow-wrap: anywhere; }
.chart-svg { width: 100%; height: auto; max-width: 100%; }
/* Tableau d'infos de la fiche carte : pas de cases vides en fin de ligne */
.facts { gap: 0; background: var(--surface); }
.fact { box-shadow: inset -1px -1px 0 var(--border); }
/* Grands écrans : un peu plus de largeur utile */
@media (min-width: 1600px) { .main, .topnav__inner { max-width: 1480px; } }
.kpi__value:has(a) { white-space: normal; font-size: 15px; line-height: 1.3; }
.kpi__value a { overflow-wrap: anywhere; }
@media (max-width: 600px) { .product__media { aspect-ratio: 16 / 9; } }
/* Noms de cartes : jusqu'à 2 lignes au lieu de « … » */
.ctile__name, .tcg__name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: clip; line-height: 1.25; overflow-wrap: anywhere; }
.ctile__name { min-height: 2.5em; display: -webkit-box; align-content: center; }
.tcg__meta { align-items: flex-start; }
/* Visiteurs sur mobile : la recherche est dans la barre du bas, on libère la barre du haut */
@media (max-width: 899px) { .shell:not(.shell--app) .topnav__end a[href="/recherche"] { display: none; } }
@media (max-width: 380px) { .topnav .logo span { font-size: 14px; } .topnav__inner { gap: 10px; } }
/* Le cadre d'une carte garde toujours le format 63:88, quelle que soit la taille de l'image chargée */
.tcg__img { min-height: 0; contain: layout paint; }
.tcg__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tcg { min-width: 0; }
.tcg__meta > div { min-width: 0; }

/* =========================================================
   Tracker — cartes produit épurées
   ========================================================= */
.products { grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 18px; }
.product { border-radius: 20px; }
.product__media {
  aspect-ratio: 5 / 4; margin: 10px 10px 0; border-radius: 14px; overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f1edf6 100%);
}
.product__media img { filter: none; padding: 16px; object-fit: contain; transition: transform .5s var(--ease); }
.product:hover .product__media img { transform: scale(1.04); }
.product__badge { top: 8px; left: 8px; font-size: 11.5px; padding: 3px 9px; }
.product__badge--hits { left: auto; right: 8px; }
.product__body { padding: 14px 16px 16px; gap: 12px; }
.product__title { font-size: 15px; font-weight: 700; }
.product__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 6px; font-size: 13px; color: var(--text-2); }
.product__meta > span + span::before, .product__meta > button + span::before { content: "·"; margin-right: 10px; color: var(--text-3); }
.product__price { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--text); display: inline-flex; align-items: center; gap: 5px; border-radius: 6px; }
.product__price span { font-size: 11px; color: var(--text-3); transition: color .2s var(--ease); }
.product__price:hover span { color: var(--accent); }
.product__price small { font-size: 11px; font-weight: 600; color: var(--accent); }
.product .steppers { gap: 6px; }
.product .stepper { padding: 7px 4px 8px; gap: 5px; border-radius: 12px; background: var(--surface-2); }
.product .stepper__label { font-size: 11px; letter-spacing: .08em; }
.product .stepper__btn { width: 24px; height: 24px; border-radius: 50%; font-size: 14px; border-color: var(--border-strong); background: transparent; }
.product .stepper__btn:hover:not(:disabled) { background: var(--surface); }
.product .stepper__val { min-width: 20px; font-size: 15px; }
.product__foot { padding-top: 10px; font-size: 12.5px; }
.product__foot b { font-size: 14px; }
.product.is-empty { opacity: 1; }
.product.is-empty .product__media img { opacity: .92; }
.product.is-owned { box-shadow: 0 0 0 1.5px var(--moss); border-color: transparent; }
@media (max-width: 600px) { .product__media { aspect-ratio: 16 / 10; } }

/* =========================================================
   Thèmes du site (Paramètres → Thème du site) — data-skin sur <html>
   ========================================================= */
/* Jungle : l’ancienne DA verte, conservée en thème. */
:root[data-skin="jungle"] {
  --white: #ffffff;
  --deep: #2f5a3a;
  --sea: #3f7f45;
  --jungle: #4aad52;
  --moss: #6eb257;
  --lime: #c5e063;
  --ball: #5c3473;
  --ball-2: #9e83b6;
  --brand: #3f7f45;
  --violet: #6b4b8a;
  --violet-soft: rgba(107, 75, 138, 0.1);
  --ink-dark: #14200f;

  --bg: #f7f8f5;
  --bg-2: #eef1ec;
  --surface: #ffffff;
  --surface-2: #f2f5f0;
  --surface-3: #e5eae2;
  --border: rgba(20, 32, 22, 0.09);
  --border-strong: rgba(20, 32, 22, 0.18);
  --text: #141b16;
  --text-2: #46534a;
  --text-3: #68756c;
  --primary: #2f6f36;
  --on-primary: #ffffff;
  --accent: #2f6f36;
  --ring: rgba(74, 173, 82, 0.35);
  --good: #2f8a3a;
  --bad: #c42b3c;
  --warn: #a76a00;
  --grad: linear-gradient(135deg, #2f5a3a 0%, #3a7a3f 100%);
  --grad-btn: linear-gradient(135deg, #3f8545 0%, #2f6f36 100%);
  --grad-soft: linear-gradient(135deg, #f3f8ec 0%, #e6f1d6 60%, #d9ebb6 100%);
  --grad-text: linear-gradient(100deg, #2f5a3a, #3a7a3f 50%, #6b4b8a);
  --grad-violet: linear-gradient(135deg, #7d5ba0, #5c3473);
  --progress: linear-gradient(90deg, #4aad52, #8fc653);
  --glow-a: rgba(110, 178, 87, 0.16);
  --glow-b: rgba(158, 131, 182, 0.14);
  --shadow-sm: 0 1px 2px rgba(20, 32, 22, 0.05), 0 2px 8px -2px rgba(20, 32, 22, 0.07);
  --shadow: 0 2px 4px rgba(20, 32, 22, 0.04), 0 18px 40px -18px rgba(20, 40, 25, 0.25);
  --radius: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Unbounded", "Inter", system-ui, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --nav-h: 64px;
  --btn-bg: linear-gradient(135deg, #3f8545 0%, #2f6f36 100%);
  --btn-ink: #ffffff;
  --p0: #3a7a3f; --p1: #8a5cc4; --p2: #2f6fb0; --p3: #b0761f; --p4: #5c3473; --p5: #c0532b; --p6: #1f8a8a; --p7: #b33a4a;
  color-scheme: light;
}

:root[data-skin="jungle"][data-theme="dark"] {
  --btn-bg: linear-gradient(135deg, #d2e97a, #b3d957);
  --btn-ink: #14200f;
  --brand: #8fc653;
  --violet: #c3aee6;
  --violet-soft: rgba(195, 174, 230, 0.12);
  --bg: #0c100e;
  --bg-2: #101512;
  --surface: #141a17;
  --surface-2: #1a221e;
  --surface-3: #232d27;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #eef2ee;
  --text-2: #b6c2b9;
  --text-3: #8a978e;
  --primary: #c5e063;
  --on-primary: #14200f;
  --accent: #9fd47a;
  --ring: rgba(197, 224, 99, 0.35);
  --good: #7fd88a;
  --bad: #ff7a85;
  --warn: #f2b44c;
  --grad-soft: linear-gradient(135deg, #17201a 0%, #1c2a1f 60%, #24361f 100%);
  --grad-text: linear-gradient(100deg, #eef6c8, #c5e063 45%, #c3aee6);
  --grad-violet: linear-gradient(135deg, #a98bd0, #7d5ba0);
  --glow-a: rgba(74, 173, 82, 0.13);
  --glow-b: rgba(158, 131, 182, 0.12);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.8);
  --p0: #c5e063; --p1: #c7a4ff; --p2: #8fb0ff; --p3: #ffcf6e; --p4: #b58fd6; --p5: #ffb27a; --p6: #74d3e8; --p7: #ff8e9b;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-skin="jungle"]:not([data-theme="light"]) {
    --btn-bg: linear-gradient(135deg, #d2e97a, #b3d957); --btn-ink: #14200f;
    --brand: #8fc653; --violet: #c3aee6; --violet-soft: rgba(195, 174, 230, 0.12);
    --bg: #0c100e; --bg-2: #101512; --surface: #141a17; --surface-2: #1a221e; --surface-3: #232d27;
    --border: rgba(255, 255, 255, 0.07); --border-strong: rgba(255, 255, 255, 0.14);
    --text: #eef2ee; --text-2: #b6c2b9; --text-3: #8a978e;
    --primary: #c5e063; --on-primary: #14200f; --accent: #9fd47a; --ring: rgba(197, 224, 99, 0.35);
    --good: #7fd88a; --bad: #ff7a85; --warn: #f2b44c;
    --grad-soft: linear-gradient(135deg, #17201a 0%, #1c2a1f 60%, #24361f 100%);
    --grad-text: linear-gradient(100deg, #eef6c8, #c5e063 45%, #c3aee6);
    --grad-violet: linear-gradient(135deg, #a98bd0, #7d5ba0);
    --glow-a: rgba(74, 173, 82, 0.13); --glow-b: rgba(158, 131, 182, 0.12);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35); --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.8);
    --p0: #c5e063; --p1: #c7a4ff; --p2: #8fb0ff; --p3: #ffcf6e; --p4: #b58fd6; --p5: #ffb27a; --p6: #74d3e8; --p7: #ff8e9b;
    color-scheme: dark;
  }
}
:root[data-skin="pokeball"] { --deep:#7a1010; --sea:#b71c1c; --jungle:#e3350d; --moss:#f2683f; --lime:#ffcb05; --brand:#c62828; --primary:#b71c1c; --accent:#b71c1c; --ring:rgba(227,53,13,.3); --grad:linear-gradient(135deg,#7a1010,#b71c1c); --btn-bg:linear-gradient(135deg,#d32f2f,#b71c1c); --btn-ink:#fff; --progress:linear-gradient(90deg,#e3350d,#ffcb05); --glow-a:rgba(227,53,13,.13); --glow-b:rgba(255,203,5,.14); --grad-text:linear-gradient(100deg,#7a1010,#c62828 50%,#e3350d); --grad-soft:linear-gradient(135deg,#fff6f3,#ffe7df 60%,#ffd9cc); --bg:#faf7f6; --bg-2:#f3ecea; --surface-2:#f7f1ef; --surface-3:#ede3e0; }
:root[data-skin="pokeball"][data-theme="dark"] { --bg:#100b0b; --bg-2:#150f0f; --surface:#191212; --surface-2:#221818; --surface-3:#2d2020; --brand:#ff7a66; --primary:#ff6b57; --on-primary:#2a0805; --accent:#ff8a73; --ring:rgba(255,107,87,.35); --btn-bg:linear-gradient(135deg,#ff8a73,#ff5a43); --btn-ink:#2a0805; --grad-soft:linear-gradient(135deg,#1f1414,#2a1916 60%,#3a1f17); --grad-text:linear-gradient(100deg,#ffe1d9,#ff8a73 50%,#ffcb05); --glow-a:rgba(227,53,13,.16); --glow-b:rgba(255,203,5,.08); --progress:linear-gradient(90deg,#ff6b57,#ffcb05); }
@media (prefers-color-scheme: dark) { :root[data-skin="pokeball"]:not([data-theme="light"]) { --bg:#100b0b; --bg-2:#150f0f; --surface:#191212; --surface-2:#221818; --surface-3:#2d2020; --brand:#ff7a66; --primary:#ff6b57; --on-primary:#2a0805; --accent:#ff8a73; --ring:rgba(255,107,87,.35); --btn-bg:linear-gradient(135deg,#ff8a73,#ff5a43); --btn-ink:#2a0805; --grad-soft:linear-gradient(135deg,#1f1414,#2a1916 60%,#3a1f17); --grad-text:linear-gradient(100deg,#ffe1d9,#ff8a73 50%,#ffcb05); --glow-a:rgba(227,53,13,.16); --glow-b:rgba(255,203,5,.08); --progress:linear-gradient(90deg,#ff6b57,#ffcb05); } }
:root[data-skin="ocean"] { --deep:#0f2a47; --sea:#1f5f99; --jungle:#2a7fc1; --moss:#5aa9e6; --lime:#9fe3ff; --brand:#1f5f99; --primary:#1f5f99; --accent:#1f5f99; --ring:rgba(42,127,193,.35); --grad:linear-gradient(135deg,#0f2a47,#1f5f99); --btn-bg:linear-gradient(135deg,#2a72b0,#1f5f99); --btn-ink:#fff; --progress:linear-gradient(90deg,#2a7fc1,#74d3e8); --glow-a:rgba(42,127,193,.16); --glow-b:rgba(116,211,232,.16); --grad-text:linear-gradient(100deg,#0f2a47,#1f5f99 50%,#2a9fc1); --grad-soft:linear-gradient(135deg,#f1f8fd,#dff0fb 60%,#c9e6f8); --bg:#f5f8fa; --bg-2:#eaf0f4; --surface-2:#eff4f8; --surface-3:#e1e9ef; }
:root[data-skin="ocean"][data-theme="dark"] { --bg:#0a0f15; --bg-2:#0e141b; --surface:#121820; --surface-2:#18202b; --surface-3:#212b38; --brand:#74c3f5; --primary:#8cd0ff; --on-primary:#06192a; --accent:#8cd0ff; --ring:rgba(140,208,255,.35); --btn-bg:linear-gradient(135deg,#a6dcff,#6bbcf5); --btn-ink:#06192a; --grad-soft:linear-gradient(135deg,#121c27,#152536 60%,#183049); --grad-text:linear-gradient(100deg,#e3f5ff,#8cd0ff 50%,#74e8d6); --glow-a:rgba(42,127,193,.2); --glow-b:rgba(116,232,214,.08); --progress:linear-gradient(90deg,#4aa3e0,#74e8d6); }
@media (prefers-color-scheme: dark) { :root[data-skin="ocean"]:not([data-theme="light"]) { --bg:#0a0f15; --bg-2:#0e141b; --surface:#121820; --surface-2:#18202b; --surface-3:#212b38; --brand:#74c3f5; --primary:#8cd0ff; --on-primary:#06192a; --accent:#8cd0ff; --ring:rgba(140,208,255,.35); --btn-bg:linear-gradient(135deg,#a6dcff,#6bbcf5); --btn-ink:#06192a; --grad-soft:linear-gradient(135deg,#121c27,#152536 60%,#183049); --grad-text:linear-gradient(100deg,#e3f5ff,#8cd0ff 50%,#74e8d6); --glow-a:rgba(42,127,193,.2); --glow-b:rgba(116,232,214,.08); --progress:linear-gradient(90deg,#4aa3e0,#74e8d6); } }
:root[data-skin="pikachu"] { --deep:#6b4a00; --sea:#8a6100; --jungle:#c99700; --moss:#f2c300; --lime:#ffe066; --brand:#8a6100; --primary:#7a5600; --accent:#7a5600; --ring:rgba(242,195,0,.35); --grad:linear-gradient(135deg,#6b4a00,#8a6100); --btn-bg:linear-gradient(135deg,#8f6600,#6b4a00); --btn-ink:#fff; --progress:linear-gradient(90deg,#e0a800,#ffe066); --glow-a:rgba(242,195,0,.18); --glow-b:rgba(224,68,40,.08); --grad-text:linear-gradient(100deg,#6b4a00,#a07000 50%,#d08a00); --grad-soft:linear-gradient(135deg,#fffbea,#fff3c4 60%,#ffe88f); --bg:#fbfaf5; --bg-2:#f4f1e6; --surface-2:#f8f5ea; --surface-3:#eeead9; }
:root[data-skin="pikachu"][data-theme="dark"] { --bg:#100f09; --bg-2:#15130c; --surface:#17150d; --surface-2:#201d12; --surface-3:#2b2718; --brand:#ffd84d; --primary:#ffd84d; --on-primary:#2a2000; --accent:#ffd84d; --ring:rgba(255,216,77,.35); --btn-bg:linear-gradient(135deg,#ffe27a,#ffcc33); --btn-ink:#2a2000; --grad-soft:linear-gradient(135deg,#1f1c10,#2a2512 60%,#3a3113); --grad-text:linear-gradient(100deg,#fff6cc,#ffd84d 50%,#ff9f5a); --glow-a:rgba(255,204,51,.14); --glow-b:rgba(255,120,60,.07); --progress:linear-gradient(90deg,#ffcc33,#ff9f5a); }
@media (prefers-color-scheme: dark) { :root[data-skin="pikachu"]:not([data-theme="light"]) { --bg:#100f09; --bg-2:#15130c; --surface:#17150d; --surface-2:#201d12; --surface-3:#2b2718; --brand:#ffd84d; --primary:#ffd84d; --on-primary:#2a2000; --accent:#ffd84d; --ring:rgba(255,216,77,.35); --btn-bg:linear-gradient(135deg,#ffe27a,#ffcc33); --btn-ink:#2a2000; --grad-soft:linear-gradient(135deg,#1f1c10,#2a2512 60%,#3a3113); --grad-text:linear-gradient(100deg,#fff6cc,#ffd84d 50%,#ff9f5a); --glow-a:rgba(255,204,51,.14); --glow-b:rgba(255,120,60,.07); --progress:linear-gradient(90deg,#ffcc33,#ff9f5a); } }
:root[data-skin="mono"] { --deep:#1a1a1a; --sea:#333333; --jungle:#555555; --moss:#888888; --lime:#e5e5e5; --brand:#222222; --primary:#111111; --accent:#111111; --ring:rgba(0,0,0,.2); --grad:linear-gradient(135deg,#1a1a1a,#333333); --btn-bg:linear-gradient(135deg,#2b2b2b,#111111); --btn-ink:#fff; --progress:linear-gradient(90deg,#111111,#777777); --glow-a:transparent; --glow-b:transparent; --grad-text:linear-gradient(100deg,#111111,#555555); --grad-soft:linear-gradient(135deg,#f6f6f6,#ececec 60%,#e2e2e2); --bg:#f7f7f7; --bg-2:#eeeeee; --surface-2:#f3f3f3; --surface-3:#e6e6e6; --border:rgba(0,0,0,.09); --border-strong:rgba(0,0,0,.18); }
:root[data-skin="mono"][data-theme="dark"] { --bg:#0b0b0b; --bg-2:#101010; --surface:#141414; --surface-2:#1c1c1c; --surface-3:#262626; --brand:#e5e5e5; --primary:#f2f2f2; --on-primary:#111111; --accent:#f2f2f2; --ring:rgba(255,255,255,.25); --btn-bg:linear-gradient(135deg,#fafafa,#d9d9d9); --btn-ink:#111111; --grad-soft:linear-gradient(135deg,#171717,#1e1e1e 60%,#262626); --grad-text:linear-gradient(100deg,#ffffff,#bbbbbb); --glow-a:transparent; --glow-b:transparent; --progress:linear-gradient(90deg,#f2f2f2,#8a8a8a); --border:rgba(255,255,255,.08); --border-strong:rgba(255,255,255,.16); --text-2:#c4c4c4; --text-3:#929292; }
@media (prefers-color-scheme: dark) { :root[data-skin="mono"]:not([data-theme="light"]) { --bg:#0b0b0b; --bg-2:#101010; --surface:#141414; --surface-2:#1c1c1c; --surface-3:#262626; --brand:#e5e5e5; --primary:#f2f2f2; --on-primary:#111111; --accent:#f2f2f2; --ring:rgba(255,255,255,.25); --btn-bg:linear-gradient(135deg,#fafafa,#d9d9d9); --btn-ink:#111111; --grad-soft:linear-gradient(135deg,#171717,#1e1e1e 60%,#262626); --grad-text:linear-gradient(100deg,#ffffff,#bbbbbb); --glow-a:transparent; --glow-b:transparent; --progress:linear-gradient(90deg,#f2f2f2,#8a8a8a); --border:rgba(255,255,255,.08); --border-strong:rgba(255,255,255,.16); --text-2:#c4c4c4; --text-3:#929292; } }
/* Choix du thème du site */
.skins { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
.skin { display: grid; gap: 4px; text-align: left; padding: 12px; border-radius: 16px; border: 1px solid var(--border-strong); background: var(--surface); transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease); }
.skin:hover { transform: translateY(-2px); }
.skin.is-active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.skin__swatch { display: flex; height: 40px; border-radius: 10px; overflow: hidden; margin-bottom: 6px; }
.skin__swatch i { flex: 1; }
.skin__name { font-weight: 700; font-size: 14px; }
.skin__desc { font-size: 12px; color: var(--text-3); }
.product__meta { justify-content: space-between; flex-wrap: nowrap; gap: 10px; }
.product__meta > span + span::before, .product__meta > button + span::before { content: none; }
.product__specs { color: var(--text-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* =========================================================
   Marketplace
   ========================================================= */


/* Mise en page recherche */
.mp { display: grid; gap: 20px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1100px) { .mp { grid-template-columns: 290px minmax(0, 1fr); } }
.mp__filters { padding: 18px; position: sticky; top: calc(var(--nav-h) + 16px); max-height: calc(100vh - var(--nav-h) - 32px); overflow-y: auto; scrollbar-width: thin; }
.mp__filters-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.mp__filters-head .h3 { flex: 1; }
.mp__close, .mp__open { display: none; }
@media (max-width: 1099px) {
  .mp__filters { position: fixed; inset: 0 auto 0 0; z-index: 60; width: min(340px, 88vw); max-height: none; border-radius: 0 20px 20px 0; transform: translateX(-105%); transition: transform .35s var(--ease); box-shadow: var(--shadow); }
  .mp__filters.is-open { transform: none; }
  .mp__close, .mp__open { display: inline-flex; }
}
.mp__bar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.mp__bar #count { flex: 1; }
.chips-select { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-opt { padding: 5px 10px; border-radius: 9px; border: 1px solid var(--border-strong); background: var(--surface); font-size: 12.5px; font-weight: 700; color: var(--text-2); transition: all .15s var(--ease); }
.chip-opt.is-on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.select--sm { padding: 6px 10px; font-size: 13px; width: auto; }

/* Vignettes d'annonce */
.lgrid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.lgrid--compact { grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); }
.lcard { display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: inherit; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .25s var(--ease); content-visibility: auto; contain-intrinsic-size: auto 400px; }
.lcard:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.lcard--in { animation: tileIn .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 25ms); }
.lcard__media { position: relative; aspect-ratio: 4 / 5; background: var(--surface-2); overflow: hidden; }
.lcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.lcard:hover .lcard__media img { transform: scale(1.04); }
.lcard__media--card { background: radial-gradient(circle at 50% 40%, var(--surface-3), var(--surface-2)); }
.lcard__media--card img { object-fit: contain; padding: 12% 16%; filter: drop-shadow(0 12px 18px rgba(0,0,0,.35)); }
.lcard__status { position: absolute; top: 10px; left: 10px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: rgba(22,12,32,.85); color: #fff; }
.lcard__status--sold { background: var(--bad); }
.lcard__nophoto { position: absolute; bottom: 8px; right: 8px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: rgba(22,12,32,.7); color: #fff; }
.lcard__body { padding: 12px 14px 14px; display: grid; gap: 8px; }
.lcard__price { font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.lcard__name { font-weight: 700; font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lcard__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.chip--xs { padding: 1px 7px; font-size: 11px; }
.chip--grade { background: var(--grad-violet); color: #fff; border-color: transparent; }
.lcard__set { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1 1 80px; }
.lcard__seller { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; min-width: 0; padding-top: 8px; border-top: 1px solid var(--border); }
.lcard__seller > span:first-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.lcard__ago { margin-left: auto; font-weight: 500; color: var(--text-3); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.lcard__seller > .avatar, .lcard__seller > .lvl { flex-shrink: 0; }

/* Page annonce */
.listing { display: grid; gap: 28px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 960px) { .listing { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.listing__gallery { position: relative; }
@media (min-width: 960px) { .listing__gallery { position: sticky; top: calc(var(--nav-h) + 20px); } }
.gallery__main { position: relative; aspect-ratio: 4 / 5; border-radius: 22px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); }
.gallery__main img { width: 100%; height: 100%; object-fit: contain; background: var(--surface-2); }
.gallery__main--card img { padding: 8% 14%; filter: drop-shadow(0 20px 30px rgba(0,0,0,.4)); }
.gallery__thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.gallery__thumbs button { flex: 0 0 72px; height: 72px; border-radius: 12px; overflow: hidden; border: 2px solid transparent; padding: 0; background: var(--surface-2); }
.gallery__thumbs button.is-on { border-color: var(--primary); }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.listing__amount { font-family: var(--display); font-weight: 900; font-size: clamp(30px, 4vw, 40px); letter-spacing: -.03em; line-height: 1.05; }
.specs { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: 14px; }
.specs dt { color: var(--text-3); font-weight: 600; }
.specs dd { margin: 0; overflow-wrap: anywhere; }
.listing__desc { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); }
.seller { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.seller:hover { border-color: var(--border-strong); }
.mine-row { align-items: center; }
.mine-row__img { width: 54px; height: 70px; object-fit: cover; border-radius: 8px; background: var(--surface-2); flex-shrink: 0; }
.mine-row__side { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

/* Formulaire de vente */
.sell { display: grid; gap: 16px; max-width: 860px; }
.sell__empty { width: 100%; display: grid; place-items: center; gap: 6px; padding: 30px 16px; border-radius: 16px; border: 2px dashed var(--border-strong); background: var(--surface-2); color: var(--text); transition: border-color .2s var(--ease); }
.sell__empty:hover { border-color: var(--primary); }
.sell__empty svg { width: 28px; height: 28px; color: var(--accent); }
.sell__chosen { display: flex; gap: 16px; align-items: flex-start; margin-top: 12px; }
.sell__chosen img { width: 120px; border-radius: 8px; box-shadow: var(--shadow); flex-shrink: 0; }
.cond-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); }
.cond { position: relative; }
.cond input { position: absolute; opacity: 0; }
.cond span { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border-strong); font-size: 13.5px; cursor: pointer; height: 100%; transition: all .15s var(--ease); }
.cond small { font-size: 11.5px; color: var(--text-3); }
.cond input:checked + span { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--surface)); box-shadow: 0 0 0 1px var(--primary); }
.cond input:focus-visible + span { outline: 2px solid var(--primary); }
.input--big { font-family: var(--display); font-size: 22px; font-weight: 700; }
.sell__estimate { padding: 14px; border-radius: 14px; background: var(--surface-2); }
.photo-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.photo-grid:empty { display: none; }
.photo-thumb { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-thumb .icon-btn { position: absolute; top: 6px; right: 6px; background: rgba(22,12,32,.8); color: #fff; border: 0; }
.photo-thumb__cover { position: absolute; bottom: 6px; left: 6px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--primary); color: var(--on-primary); }

/* Messagerie */
.icon-btn--badge { position: relative; }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 800; display: inline-grid; place-items: center; }
.icon-btn--badge .badge { position: absolute; top: -4px; right: -4px; box-shadow: 0 0 0 2px var(--bg); }
.inbox { display: grid; gap: 16px; grid-template-columns: 1fr; min-height: 60vh; }
@media (min-width: 900px) { .inbox { grid-template-columns: 340px minmax(0, 1fr); } }
.inbox__list { padding: 6px; max-height: 75vh; overflow-y: auto; }
.inbox__thread { display: flex; flex-direction: column; min-height: 60vh; max-height: 75vh; overflow: hidden; }
@media (max-width: 899px) { .inbox.has-thread .inbox__list { display: none; } .inbox:not(.has-thread) .inbox__thread { display: none; } }
.thread__back { display: none; } @media (max-width: 899px) { .thread__back { display: inline-flex; } }
.conv { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 14px; text-decoration: none; color: inherit; transition: background-color .15s var(--ease); }
.conv:hover, .conv.is-on { background: var(--surface-2); }
.conv__main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.conv__top { display: flex; justify-content: space-between; gap: 8px; }
.conv__card, .conv__last { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv__card { color: var(--text-2); }
.conv__last { color: var(--text-3); }
.thread__head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.thread__msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 78%; align-self: flex-start; animation: tileIn .3s var(--ease) both; }
.msg p { margin: 0; padding: 10px 14px; border-radius: 16px 16px 16px 4px; background: var(--surface-2); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; }
.msg time { display: block; font-size: 11px; color: var(--text-3); margin: 3px 6px 0; }
.msg--mine { align-self: flex-end; text-align: right; }
.msg--mine p { background: var(--btn-bg); color: var(--btn-ink); border-radius: 16px 16px 4px 16px; text-align: left; }
.thread__form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); align-items: flex-end; }
.thread__form .textarea { min-height: 44px; resize: none; }
.bottomnav { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.bottomnav a span { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
@media (max-width: 600px) {
  .lgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .lcard { border-radius: 14px; }
  .lcard__body { padding: 9px 10px 10px; gap: 6px; }
  .lcard__price { font-size: 16px; }
  .lcard__name { font-size: 12.5px; }
  .lcard__set, .lcard__ago, .lcard__seller .lvl { display: none; }
  .lcard__seller { font-size: 11.5px; padding-top: 6px; }
}

/* =========================================================
   Carrousel en perspective (mur incurvé, défilement automatique)
   ========================================================= */
.curve {
  --cw: 140px;
  position: relative; overflow: hidden; padding: 24px 0 18px;
  /* Pleine largeur : le tambour sort de la colonne et occupe tout l’écran. */
  width: var(--vw, 100vw); margin-inline: calc(50% - var(--vw, 100vw) / 2);
  perspective: 1100px; perspective-origin: 50% 45%;
  mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
}
@media (min-width: 600px) { .curve { --cw: 164px; } }
@media (min-width: 1100px) { .curve { --cw: 190px; } }
.main:has(.curve) { overflow-x: visible; } /* la page reste protégée par body { overflow-x: hidden } */
.curve__stage { position: relative; height: calc(var(--cw) * 1.396 + 30px); transform-style: preserve-3d; opacity: 0; transition: opacity .7s var(--ease); }
.curve__stage.is-ready { opacity: 1; }
.curve__item {
  position: absolute; top: 0; left: calc(50% - var(--cw) / 2); width: var(--cw);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; text-decoration: none; color: inherit;
  will-change: transform, opacity; backface-visibility: hidden;
}
.curve__img {
  display: block; aspect-ratio: 245 / 342; border-radius: 6% / 4.3%; overflow: hidden; background: var(--surface-3);
  box-shadow: 0 22px 34px -18px var(--tint-shadow), 0 0 0 1px var(--border);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.curve__img img { width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; user-select: none; }
.curve__item:hover .curve__img, .curve__item:focus-visible .curve__img { transform: translateY(-10px) scale(1.04); box-shadow: 0 30px 44px -20px var(--tint-shadow), 0 0 0 2px var(--primary); }
.curve__item:focus-visible { outline: none; }
.curve__meta { display: flex; justify-content: space-between; gap: 6px; min-width: 0; font-size: 12.5px; padding: 0 2px; }
.curve__meta span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.curve__meta b { font-family: var(--display); color: var(--accent); white-space: nowrap; }

/* Boutons du bandeau : une seule ligne sur mobile (le bouton icône ne passe plus seul à la ligne). */
@media (max-width: 600px) {
  .hero__actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; width: 100%; gap: 8px; }
  .hero__actions .btn { min-width: 0; justify-content: center; padding-inline: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hero__actions .btn:only-child { grid-column: 1 / -1; }
}

/* Catalogue : grille sur plusieurs lignes (plus de défilement à boutons) */
.setgrid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 168px), 1fr)); }
@media (max-width: 480px) { .setgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.setgrid .setcard { width: auto; min-width: 0; }
.serie-jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 18px; }
.serie-jump .chip { text-decoration: none; transition: background-color .2s var(--ease), color .2s var(--ease); }
.serie-jump .chip:hover { background: var(--violet-soft); color: var(--primary); }
.serie-block { scroll-margin-top: calc(var(--nav-h) + 16px); }

/* Emblème des extensions sans logo */
.emblem { position: relative; display: grid; place-items: center; align-content: center; gap: 2px; width: 100%; height: 76px; text-align: center; padding: 0 6px; }
.emblem img { position: absolute; inset: 6px 20%; width: 60%; height: calc(100% - 12px); object-fit: contain; opacity: .14; filter: grayscale(1); }
.emblem b { position: relative; font-family: var(--display); font-weight: 900; font-size: 19px; line-height: 1.05; letter-spacing: -.02em; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emblem small { position: relative; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emblem--mcdo b { background: linear-gradient(100deg, #d62828, #f2a900); -webkit-background-clip: text; background-clip: text; font-size: 26px; }
.emblem--kit b { font-size: 17px; }

/* Annonce : prix + cote neutre */
.lcard__top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; }
.lcard__ref { font-size: 11.5px; font-weight: 600; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* =========================================================
   Factions — Groudon (Terre) · Kyogre (Océan) · Rayquaza (Ciel)
   ========================================================= */
:root { --f-groudon: #c8401f; --f-kyogre: #2f6fd0; --f-rayquaza: #377a3d; }
:root[data-theme="dark"] { --f-groudon: #ff7a52; --f-kyogre: #6aa8ff; --f-rayquaza: #74cf7c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --f-groudon: #ff7a52; --f-kyogre: #6aa8ff; --f-rayquaza: #74cf7c; } }

.fchip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; border: 1px solid transparent; vertical-align: middle; }
.fchip--groudon { color: var(--f-groudon); background: color-mix(in srgb, var(--f-groudon) 12%, transparent); }
.fchip--kyogre { color: var(--f-kyogre); background: color-mix(in srgb, var(--f-kyogre) 12%, transparent); }
.fchip--rayquaza { color: var(--f-rayquaza); background: color-mix(in srgb, var(--f-rayquaza) 12%, transparent); }

/* Choix de faction */
.fpick { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; min-width: 0; }
.fpick__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fpick__opt { position: relative; }
.fpick__opt input { position: absolute; opacity: 0; pointer-events: none; }
.fpick__card { display: grid; justify-items: center; gap: 2px; padding: 12px 6px; border-radius: 14px; border: 1.5px solid var(--border-strong); background: var(--surface-2); cursor: pointer; text-align: center; transition: transform .25s var(--ease), border-color .2s var(--ease), background-color .2s var(--ease); }
.fpick__card:hover { transform: translateY(-2px); }
.fpick__emoji { font-size: 26px; line-height: 1.1; transition: transform .35s var(--ease-spring); }
.fpick__card b { font-size: 13.5px; }
.fpick__card small { font-size: 11px; color: var(--text-3); }
.fpick__opt input:focus-visible + .fpick__card { outline: 2px solid var(--primary); outline-offset: 2px; }
.fpick__opt input:checked + .fpick__card .fpick__emoji { transform: scale(1.18); }
.fpick__opt--groudon input:checked + .fpick__card { border-color: var(--f-groudon); background: color-mix(in srgb, var(--f-groudon) 12%, var(--surface)); }
.fpick__opt--kyogre input:checked + .fpick__card { border-color: var(--f-kyogre); background: color-mix(in srgb, var(--f-kyogre) 12%, var(--surface)); }
.fpick__opt--rayquaza input:checked + .fpick__card { border-color: var(--f-rayquaza); background: color-mix(in srgb, var(--f-rayquaza) 12%, var(--surface)); }

/* Guerre des factions */
.fwar {
  position: relative; overflow: hidden; border-radius: 28px; padding: 24px 20px; color: #fff; margin-top: 4px;
  background: linear-gradient(135deg, #1c1027, #3a1f5c 55%, #4b2a73);
  box-shadow: 0 30px 60px -30px rgba(40,18,64,.8);
}
@media (min-width: 768px) { .fwar { padding: 30px 32px; } }
.fwar--groudon { background: linear-gradient(135deg, #2a0a06, #7a1f10 50%, #c4471f); }
.fwar--kyogre { background: linear-gradient(135deg, #06142e, #123f86 50%, #2378c8); }
.fwar--rayquaza { background: linear-gradient(135deg, #08190e, #1d4d28 50%, #367a3d); }
.fwar::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5; background: radial-gradient(600px 220px at 85% -10%, rgba(255,255,255,.18), transparent 70%); }
/* Météo animée de la faction en tête */
.fwar--kyogre::before, .fwar--rayquaza::before, .fwar--groudon::before { content: ""; position: absolute; inset: -50%; pointer-events: none; opacity: .16; animation: weather 9s linear infinite; }
.fwar--kyogre::before { background: repeating-linear-gradient(105deg, transparent 0 22px, rgba(255,255,255,.55) 22px 23px); }
.fwar--rayquaza::before { background: repeating-radial-gradient(circle at 70% 30%, transparent 0 40px, rgba(255,255,255,.4) 40px 41px); animation-name: swirl; animation-duration: 18s; }
.fwar--groudon::before { background: radial-gradient(circle at 80% 0%, rgba(255,200,80,.9), transparent 45%); animation-name: heat; animation-duration: 4s; animation-direction: alternate; }
@keyframes weather { to { transform: translate(-60px, 120px); } }
@keyframes swirl { to { transform: rotate(360deg); } }
@keyframes heat { from { opacity: .1; } to { opacity: .28; } }
:root[data-motion="reduced"] .fwar::before { animation: none; }
.fwar > * { position: relative; z-index: 1; }
.fwar__head { display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.fwar__head > div:first-child { flex: 1 1 320px; }
.fwar__eyebrow { color: rgba(255,255,255,.75); }
.fwar__title { color: #fff; margin-top: 6px; font-size: clamp(22px, 3.4vw, 32px); }
.fwar__sub { color: rgba(255,255,255,.82); font-size: 14px; margin-top: 6px; max-width: 620px; }
.fwar__me { display: grid; justify-items: end; padding: 10px 14px; border-radius: 16px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); backdrop-filter: blur(8px); line-height: 1.2; }
.fwar__me b { font-family: var(--display); font-size: 26px; }
.fwar__me .xs { color: rgba(255,255,255,.8); }
.fwar__bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; margin: 20px 0 16px; gap: 3px; background: rgba(255,255,255,.12); }
.fwar__seg { display: block; min-width: 6px; transition: flex-grow 1s var(--ease); }
.fwar__seg--groudon { background: linear-gradient(90deg, #ff8a4c, #d2452b); }
.fwar__seg--kyogre { background: linear-gradient(90deg, #4aa8ff, #2f6fd0); }
.fwar__seg--rayquaza { background: linear-gradient(90deg, #8fdc7a, #3f8a46); }
.fwar__grid { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { .fwar__grid { grid-template-columns: minmax(0, 1fr); } }
.fcard { position: relative; padding: 14px; border-radius: 18px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(6px); min-width: 0; transition: transform .3s var(--ease), background-color .3s var(--ease); }
.fcard:hover { transform: translateY(-3px); background: rgba(255,255,255,.15); }
.fcard.is-leader { border-color: rgba(255,255,255,.55); box-shadow: 0 0 0 1px rgba(255,255,255,.25), 0 20px 40px -20px rgba(0,0,0,.6); }
.fcard__top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.fcard__emoji { font-size: 30px; line-height: 1; }
.fcard__name { display: block; font-family: var(--display); font-size: 16px; }
.fcard__el { display: block; font-size: 12px; color: rgba(255,255,255,.75); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fcard__crown { margin-left: auto; font-size: 20px; animation: bump 2.4s var(--ease) infinite; }
.fcard__pts { font-family: var(--display); font-weight: 900; font-size: 28px; margin-top: 10px; letter-spacing: -.02em; }
.fcard__pts small { font-size: 13px; font-weight: 600; opacity: .75; }
.fcard__meta { font-size: 12.5px; color: rgba(255,255,255,.8); }
.fcard__motto { font-size: 12.5px; font-style: italic; color: rgba(255,255,255,.72); margin-top: 8px; }
.fcard__top-clan { display: block; margin-top: 8px; font-size: 12.5px; color: #fff; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fcard__top-clan:hover { text-decoration: underline; }
.fwar__rules { margin-top: 14px; font-size: 13.5px; color: rgba(255,255,255,.88); }
.fwar__rules summary { cursor: pointer; font-weight: 700; width: max-content; max-width: 100%; }
.fwar__rules ul { margin: 10px 0 6px; padding-left: 18px; display: grid; gap: 4px; }
.fwar__rules .faint, .fwar__rules .xs { color: rgba(255,255,255,.7); }

.rank-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.rank-filter .chip { cursor: pointer; }
.rank-filter .chip.is-on { background: var(--btn-bg); color: var(--btn-ink); border-color: transparent; }

/* Objectifs du clan */
.goals { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .goals { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.goal { padding: 14px 16px; display: grid; gap: 6px; min-width: 0; }
.goal__head { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; padding-right: 64px; position: relative; min-height: 24px; }
.goal__head b { min-width: 0; line-height: 1.2; }
.goal__icon { font-size: 20px; }
.goal__tier { position: absolute; right: 0; top: 2px; padding: 1px 8px; border-radius: 99px; font-size: 11px; font-weight: 800; letter-spacing: .03em; flex-shrink: 0; }
.goal--t1 .goal__tier { background: linear-gradient(135deg, #e3a76f, #a0612c); color: #2a1400; }
.goal--t2 .goal__tier { background: linear-gradient(135deg, #e4e8ec, #9aa6b0); color: #1c1027; }
.goal--t3 .goal__tier { background: linear-gradient(135deg, #ffe08a, #c8901a); color: #3a2400; }
.goal--t3 { box-shadow: 0 0 0 1.5px #e0b44a; }
.goal__val { font-family: var(--display); font-weight: 800; font-size: clamp(16px, 4.2vw, 20px); letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.goal__bar { height: 6px; }

/* Tags de clan de 4-5 caractères : police réduite pour rester dans le badge */
.clan-badge--long { font-size: 11px; letter-spacing: -.03em; }
.clan-badge--sm.clan-badge--long { font-size: 8.5px; }
.clan-badge--lg.clan-badge--long { font-size: 16px; }
@media (max-width: 520px) {
  .goal__head { padding-right: 0; flex-wrap: wrap; row-gap: 4px; }
  .goal__head b { flex: 1 1 100%; order: 2; overflow-wrap: anywhere; }
  .goal__tier { position: static; order: 1; margin-left: auto; }
}

/* Dos de carte : cartes dont aucun visuel n'existe encore */
.cardback {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 4px; padding: 10% 8%;
  text-align: center; color: #f3ecff; border-radius: inherit; overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(255,255,255,.16), transparent 42%),
    linear-gradient(160deg, #2a1544 0%, #4b2a73 55%, #2a1544 100%);
  box-shadow: inset 0 0 0 4px #1c1027, inset 0 0 0 6px rgba(201,182,242,.45);
}
.cardback__ball {
  width: 38%; aspect-ratio: 1; border-radius: 50%; margin-bottom: 6px;
  background: linear-gradient(#7446b0 0 46%, #1c1027 46% 54%, #e9e3f2 54%);
  box-shadow: 0 0 0 3px #1c1027, 0 8px 18px -6px rgba(0,0,0,.6);
  position: relative;
}
.cardback__ball::after { content: ""; position: absolute; inset: 37%; border-radius: 50%; background: #f3ecff; box-shadow: 0 0 0 3px #1c1027; }
.cardback b { font-size: clamp(11px, 1.1vw, 14px); line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 100%; }
.cardback small { font-size: 11px; font-weight: 700; opacity: .75; }
.cardback em { font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #c9b6f2; margin-top: 2px; }
.ctile.is-missing .cardback { filter: grayscale(.6) brightness(.85); }

/* =========================================================
   Panneau d'administration
   ========================================================= */
.admin-tabs { max-width: 100%; }
.admin-users { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.admin-user { padding: 14px 16px; display: grid; gap: 6px; min-width: 0; }
.admin-user.is-banned { border-color: color-mix(in srgb, var(--bad) 45%, transparent); background: color-mix(in srgb, var(--bad) 5%, var(--surface)); }
.admin-user__head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.admin-user__name { font-weight: 750; text-decoration: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.admin-user__mail { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-user__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.admin-banned { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); border-color: transparent; }
.admin-banned-reason { color: var(--bad); }
.admin-row { align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.admin-row__body { font-size: 14px; margin-top: 2px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }


/* =========================================================
   Corrections de la revue HIG (accessibilité)
   ========================================================= */
/* Boutons + / − / ♡ des cartes : zone tactile de 44 px autour d'un visuel de 24-28 px
   (accessibility.md › Mobility : 44×44 recommandé, 28×28 minimum). */
.ctile__btn { position: relative; }
.ctile__btn::before, .ctile__wish::before { content: ""; position: absolute; inset: -10px; }
/* − et + sont côte à côte : leurs zones ne se chevauchent pas horizontalement. */
.ctile__ctrl .ctile__btn::before { inset: -10px -2px; }

/* Mouvement réduit (accessibility.md › Cognitive) : si le système le demande, plus d'animation
   automatique ni répétitive, sauf si la personne a choisi « Toujours fluides » sur le site. */
@media (prefers-reduced-motion: reduce) {
  :root:not([data-motion="full"]) .fwar::before,
  :root:not([data-motion="full"]) .fcard__crown { animation: none; }
}
:root[data-motion="reduced"] .fcard__crown { animation: none; }
