/* Pika Capture — feuille de style unique du site public et du panel.
   Identité Poké Ball : rouge vif et blanc sur une nuit sombre, bande noire
   en accent. Or réservé aux PikaCoins ; les halos derrière les Pokémon
   prennent la couleur de leur type. */

@font-face { font-family: "Fredoka"; src: url("/fonts/fredoka-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url("/fonts/fredoka-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url("/fonts/fredoka-700.woff2") format("woff2"); font-weight: 700 900; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/fonts/nunito-500.woff2") format("woff2"); font-weight: 300 500; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/fonts/nunito-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/fonts/nunito-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/fonts/nunito-800.woff2") format("woff2"); font-weight: 800 1000; font-display: swap; }

:root, .island {
  color-scheme: dark;
  --fg: 255 255 255;
  --scrim: 11 10 14;
  --card: rgba(18, 15, 21, 0.92);
  --field: rgba(8, 7, 10, 0.6);
  --panel: linear-gradient(180deg, rgba(36, 30, 39, 0.9), rgba(20, 17, 23, 0.92));
  --scroll: #3a3138;
  --night-top: #0d0b10;
  color-scheme: dark;
  --night: #0b0a0e;
  --night-2: #121016;
  --coal: #18151c;
  --coal-2: #221d26;
  --red: #ff2f43;
  --red-2: #d9122a;
  --red-deep: #8c0d1c;
  --red-glow: #ff6b78;
  --white: #ffffff;
  --text: #f6f2f3;
  --muted: #b9afb4;
  --dim: #85797f;
  --ink: #16121a;
  --gold: #ffc93c;
  --green: #3fe0a0;
  --blue: #4ea0ff;
  --line: rgb(var(--fg) / 0.09);
  --line-strong: rgb(var(--fg) / 0.17);
  --line-red: rgba(255, 47, 67, 0.45);
  --glass: rgba(24, 20, 27, 0.66);
  --glass-strong: rgba(30, 25, 33, 0.86);
  --shadow-deep: 0 28px 60px -28px rgba(0, 0, 0, 0.95), 0 10px 26px -14px rgba(0, 0, 0, 0.7);
  --shadow-red: 0 16px 36px -14px rgba(255, 47, 67, 0.65);
  --radius-xl: 28px;
  --radius-l: 22px;
  --radius-m: 16px;
  --radius-s: 10px;
  --font-display: "Fredoka", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --gutter: clamp(16px, 2.6vw, 38px);
  --maxw: 1500px;
}

/* ---- Thème clair ----------------------------------------------------------
   Mêmes rouges, fond blanc cassé. Les zones « .island » (bandeau d'accueil,
   scène 3D, écran de chargement) gardent l'ambiance sombre dans les deux
   thèmes : l'illustration et la 3D y sont faites pour la nuit. */
html[data-mode="light"] {
  color-scheme: light;
  --fg: 34 16 26;
  --scrim: 255 255 255;
  --night: #f6f1f2;
  --night-2: #ffffff;
  --night-top: #fff7f7;
  --coal: #ffffff;
  --coal-2: #f4eeef;
  --white: #17111a;
  --text: #2a2027;
  --muted: #5f525a;
  --dim: #85767f;
  --red-glow: #d61c33;
  --gold: #b07800;
  --green: #0f9d63;
  --blue: #1f6fd6;
  --line: rgba(60, 20, 35, 0.12);
  --line-strong: rgba(60, 20, 35, 0.22);
  --line-red: rgba(214, 28, 51, 0.4);
  --glass: rgba(255, 255, 255, 0.82);
  --glass-strong: rgba(255, 255, 255, 0.95);
  --card: #ffffff;
  --field: #ffffff;
  --panel: linear-gradient(180deg, #ffffff, #fbf7f8);
  --scroll: #d6c9ce;
  --shadow-deep: 0 24px 50px -30px rgba(70, 20, 35, 0.35), 0 8px 20px -14px rgba(70, 20, 35, 0.2);
  --shadow-red: 0 14px 30px -14px rgba(255, 47, 67, 0.55);
}
.island { color: var(--text); }
html[data-mode="light"] body::before {
  background:
    radial-gradient(1100px 680px at 88% -12%, rgba(255, 47, 67, 0.13), transparent 62%),
    radial-gradient(900px 620px at -12% 30%, rgba(255, 47, 67, 0.06), transparent 62%),
    linear-gradient(180deg, #fff7f7, var(--night) 40%);
}
html[data-mode="light"] body::after { opacity: 0.35; }
html[data-mode="light"] .halo:not(.island .halo) {
  background:
    radial-gradient(58% 52% at 50% 50%, color-mix(in srgb, var(--t2) 70%, white) 0%, color-mix(in srgb, var(--t1) 45%, transparent) 40%, transparent 74%),
    linear-gradient(160deg, color-mix(in srgb, var(--t1) 16%, white) 0%, color-mix(in srgb, var(--t1) 38%, white) 100%);
}
html[data-mode="light"] .creature img { filter: drop-shadow(0 10px 12px rgba(60, 20, 35, 0.28)); }
html[data-mode="light"] .poke-card.missing .art .creature img { filter: brightness(0) opacity(0.28); }
html[data-mode="light"] .admin-link { background: var(--ink); color: #fff; border-color: var(--ink); }
html[data-mode="light"] .btn-white { border-color: var(--line-strong); box-shadow: var(--shadow-deep); }
html[data-mode="light"] ::selection { color: #fff; }

/* ---- Halos par type : 13 traitements réutilisables ---------------------- */
[data-theme="flamme"] { --t1: #ff7a2f; --t2: #ffc04a; --t3: #6b1606; }
[data-theme="ocean"] { --t1: #2f8bff; --t2: #43e2ff; --t3: #061c55; }
[data-theme="givre"] { --t1: #86ddff; --t2: #e4fbff; --t3: #12395c; }
[data-theme="jungle"] { --t1: #2fcf6a; --t2: #c1f24c; --t3: #06361b; }
[data-theme="foudre"] { --t1: #ffd31a; --t2: #fff38a; --t3: #4a3500; }
[data-theme="mystique"] { --t1: #b54dff; --t2: #ff72d8; --t3: #2c0752; }
[data-theme="tempete"] { --t1: #2cf5a6; --t2: #35c7ff; --t3: #04384a; }
[data-theme="ombre"] { --t1: #6a49ff; --t2: #2b1d8f; --t3: #0b0624; }
[data-theme="toxique"] { --t1: #b35cff; --t2: #8cff5a; --t3: #2a0b3d; }
[data-theme="roc"] { --t1: #d39542; --t2: #f1cf8a; --t3: #3a220b; }
[data-theme="acier"] { --t1: #9fb6cf; --t2: #e3eef9; --t3: #1e2b3a; }
[data-theme="combat"] { --t1: #ff4f4f; --t2: #ffa23d; --t3: #4a0b0b; }
[data-theme="neutre"] { --t1: #e2d6c4; --t2: #fff7ea; --t3: #3a3245; }

/* ---- Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--night); scrollbar-color: var(--scroll) var(--night); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font: 400 16px/1.55 var(--font-body);
  color: var(--text);
  background: var(--night);
  overflow-x: hidden;
}
body::before {
  /* décor fixe : lueurs rouges et grande Poké Ball en filigrane (fond uni, sans points) */
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(1100px 680px at 88% -12%, rgba(255, 47, 67, 0.2), transparent 62%),
    radial-gradient(900px 620px at -12% 30%, rgba(255, 47, 67, 0.09), transparent 62%),
    radial-gradient(900px 700px at 50% 125%, rgb(var(--fg) / 0.05), transparent 60%),
    linear-gradient(180deg, var(--night-top), var(--night) 40%);
}
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  pointer-events: none;
  width: min(90vw, 1100px);
  aspect-ratio: 1;
  right: -24vw;
  bottom: -38vw;
  border-radius: 50%;
  opacity: 0.045;
  background:
    radial-gradient(circle, transparent 0 13%, #fff 13% 17%, transparent 17% 21%, #fff 21% 23%, transparent 23%),
    linear-gradient(to bottom, transparent 47%, #fff 47% 53%, transparent 53%);
  border: 0.9vw solid #fff;
}
img { max-width: 100%; display: block; }
a { color: var(--red-glow); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--white); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--red-glow); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--red); color: #fff; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 650; line-height: 1.06; margin: 0; letter-spacing: -0.01em; text-wrap: balance; color: var(--white); }
h1 { font-size: clamp(2.3rem, 5vw, 4.1rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); }
h3 { font-size: 1.15rem; }
p { margin: 0; text-wrap: pretty; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.num { font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.coin { color: var(--gold); font-weight: 800; }
.coin-icon { display: inline-block; width: 1em; height: 1em; vertical-align: -0.14em; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6cf, var(--gold) 45%, #c98a00); box-shadow: inset 0 0 0 2px rgba(120, 70, 0, 0.35); flex: none; }
.accent { background: linear-gradient(100deg, #ff4357 10%, #ff8a5c 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---- Poké Ball (logo, chargement, décor) -------------------------------- */
.pokeball {
  --s: 96px;
  position: relative;
  flex: none;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: linear-gradient(to bottom, var(--red) 0 45%, #121016 45% 55%, #f9f6f6 55% 100%);
  box-shadow: inset calc(var(--s) * -0.08) calc(var(--s) * -0.1) 0 rgba(0, 0, 0, 0.2), inset calc(var(--s) * 0.06) calc(var(--s) * 0.06) 0 rgba(255, 255, 255, 0.28), 0 calc(var(--s) * 0.18) calc(var(--s) * 0.3) calc(var(--s) * -0.12) rgba(0, 0, 0, 0.8);
  animation: ball-wobble 1.4s var(--ease-out) infinite;
  transform-origin: 50% 90%;
}
.pokeball::after {
  content: "";
  position: absolute;
  inset: 35%;
  border-radius: 50%;
  background: #f9f6f6;
  box-shadow: 0 0 0 calc(var(--s) * 0.06) #121016, 0 0 0 calc(var(--s) * 0.1) #f9f6f6;
  animation: ball-glow 1.4s ease-in-out infinite;
}
.pokeball.small { --s: 26px; animation-duration: 1s; }
@keyframes ball-wobble {
  0%, 100% { transform: translateY(0) rotate(0); }
  15% { transform: translateY(-18px) rotate(-14deg); }
  30% { transform: translateY(0) rotate(10deg); }
  45% { transform: translateY(-6px) rotate(-6deg); }
  60% { transform: translateY(0) rotate(0); }
}
@keyframes ball-glow { 0%, 60%, 100% { background: #f9f6f6; } 75% { background: #ffe0e3; box-shadow: 0 0 0 calc(var(--s) * 0.06) #121016, 0 0 0 calc(var(--s) * 0.1) #f9f6f6, 0 0 24px 6px rgba(255, 90, 105, 0.9); } }

/* ---- Écran de chargement ----------------------------------------------- */
.boot {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: radial-gradient(620px 420px at 50% 45%, rgba(255, 47, 67, 0.28), transparent 70%), var(--night);
  transition: opacity 0.5s var(--ease-out), visibility 0.5s;
}
.boot.done { opacity: 0; visibility: hidden; }
.boot-inner { display: grid; justify-items: center; gap: 26px; text-align: center; padding: 24px; }
.boot-ring { position: relative; display: grid; place-items: center; width: 170px; height: 170px; }
.boot-ring::before, .boot-ring::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 3px solid transparent; border-top-color: var(--red); border-right-color: rgba(255, 255, 255, 0.5); animation: spin 1.6s linear infinite; }
.boot-ring::after { inset: 14px; border-top-color: rgba(255, 255, 255, 0.85); border-right-color: transparent; border-left-color: var(--red-glow); animation-duration: 2.4s; animation-direction: reverse; }
.boot-tip { color: var(--muted); font-size: 0.98rem; min-height: 1.6em; max-width: 34ch; transition: opacity 0.3s; }
.boot-title { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; }
.boot-title b { color: var(--red); font-weight: 700; }
.boot-bar { width: 220px; height: 6px; border-radius: 99px; background: rgb(var(--fg) / 0.08); overflow: hidden; }
.boot-bar span { display: block; height: 100%; width: 40%; border-radius: inherit; background: linear-gradient(90deg, var(--red), #fff); animation: boot-bar 1.3s var(--ease-out) infinite; }
@keyframes boot-bar { from { transform: translateX(-110%); } to { transform: translateX(260%); } }

/* ---- Structure ----------------------------------------------------------- */
.shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
main.screen { flex: 1; padding-block: 22px 64px; outline: none; }
.screen-enter { animation: screen-in 0.5s var(--ease-out) both; }
@keyframes screen-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.rise { animation: rise 0.6s var(--ease-out) both; animation-delay: calc(var(--d, 0) * 70ms); }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(0.985); } }

/* ---- En-tête ------------------------------------------------------------- */
.topbar-wrap {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(180deg, rgb(var(--scrim) / 0.98), rgb(var(--scrim) / 0.95));
  border-bottom: 1px solid var(--line);
}
.topbar { display: flex; align-items: center; gap: 18px; min-height: 82px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--white); flex: none; }
.brand .pokeball { --s: 46px; animation: none; transition: transform 0.6s var(--ease-spring); }
.brand:hover .pokeball { transform: rotate(-24deg) scale(1.06); }
.brand-text { display: grid; line-height: 1; }
.brand-word { font-family: var(--font-display); font-weight: 700; font-size: 1.85rem; letter-spacing: -0.02em; white-space: nowrap; color: var(--white); }
.brand-word b { color: var(--red); font-weight: 700; }
.brand-sub { margin-top: 5px; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.24em; color: var(--muted); white-space: nowrap; }
.nav { display: flex; gap: 4px; margin-inline: auto; }
.nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 15px;
  border-radius: 14px;
  border: 1px solid transparent;
  color: var(--text);
  font-weight: 800;
  font-size: 0.93rem;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s, background-color 0.2s, border-color 0.2s, transform 0.25s var(--ease-spring);
}
.nav a svg { color: var(--muted); transition: color 0.2s; }
.nav a:hover { background: rgb(var(--fg) / 0.05); transform: translateY(-1px); }
.nav a:hover svg { color: var(--white); }
.nav a[aria-current="page"] { background: linear-gradient(180deg, rgba(255, 47, 67, 0.22), rgba(255, 47, 67, 0.08)); border-color: var(--line-red); color: var(--white); box-shadow: inset 0 1px 0 rgb(var(--fg) / 0.08), 0 10px 24px -14px rgba(255, 47, 67, 0.9); }
.nav a[aria-current="page"] svg { color: var(--red-glow); }
.nav svg, .menu-sheet svg { width: 19px; height: 19px; flex: none; }
.account { display: flex; align-items: center; gap: 10px; flex: none; }
.user-pill { display: inline-flex; align-items: center; gap: 10px; padding: 5px 16px 5px 5px; border-radius: 999px; background: rgb(var(--fg) / 0.05); border: 1px solid var(--line-strong); text-decoration: none; color: var(--white); font-weight: 800; max-width: 240px; transition: background-color 0.2s, border-color 0.2s; }
.user-pill:hover { background: rgb(var(--fg) / 0.09); border-color: rgba(255, 255, 255, 0.3); color: var(--white); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(to bottom, var(--red) 0 50%, #f4f0f0 50%); color: var(--ink); font-family: var(--font-display); font-weight: 700; flex: none; box-shadow: 0 0 0 2px #121016, 0 0 0 3px rgba(255, 255, 255, 0.4); text-shadow: 0 0 6px #fff; }
.user-pill .who { display: grid; line-height: 1.15; min-width: 0; max-width: 150px; }
.user-pill .who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-pill .who small { font-weight: 800; color: var(--gold); font-size: 0.8rem; display: inline-flex; align-items: center; gap: 5px; }
.admin-link { border-color: rgba(255, 255, 255, 0.85); background: #fff; color: var(--ink); }
.admin-link:hover { background: #ffe9ec; color: var(--ink); }
.topbar .menu-toggle { display: none; }
.lbl-short { display: none; }
.menu-sheet { display: none; }

.footer { border-top: 1px solid var(--line); padding: 22px 0 30px; color: var(--dim); font-size: 0.84rem; }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; }
.footer a { color: var(--muted); }

/* ---- Boutons et contrôles -------------------------------------------------- */
.btn {
  --bg: rgb(var(--fg) / 0.05);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 11px 22px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.005em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease-spring), background-color 0.2s, box-shadow 0.2s, border-color 0.2s, color 0.2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); background-color: rgb(var(--fg) / 0.1); border-color: rgba(255, 255, 255, 0.32); color: var(--white); }
.btn:active { transform: translateY(0) scale(0.97); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary, .btn-twitch { background: linear-gradient(180deg, #ff4a5c, var(--red-2)); border-color: rgba(255, 140, 150, 0.45); box-shadow: var(--shadow-red), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.btn-primary:hover, .btn-twitch:hover { background: linear-gradient(180deg, #ff6271, #e8172f); border-color: rgba(255, 180, 186, 0.6); box-shadow: 0 20px 40px -14px rgba(255, 47, 67, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.btn-white { background: #fff; color: var(--ink); border-color: #fff; box-shadow: 0 14px 30px -16px rgba(255, 255, 255, 0.55); }
.btn-white:hover { background: #ffecee; color: var(--ink); border-color: #ffecee; }
.btn-gold { background: linear-gradient(135deg, #ffd96a, #f2a900); color: #2a1a00; border-color: transparent; box-shadow: 0 12px 26px -12px rgba(255, 201, 60, 0.8); }
.btn-gold:hover { background: linear-gradient(135deg, #ffe48f, #ffb81a); color: #2a1a00; }
.btn-danger { border-color: rgba(255, 77, 94, 0.55); color: #ffc9cf; }
.btn-danger:hover { background: rgba(255, 47, 67, 0.2); }
.btn-small { min-height: 36px; padding: 6px 14px; font-size: 0.9rem; border-radius: 11px; }
.btn-icon { width: 46px; padding: 0; }
.btn-lg { min-height: 54px; padding: 14px 28px; font-size: 1.08rem; border-radius: 16px; }
.btn svg { width: 19px; height: 19px; }
.btn.busy { pointer-events: none; opacity: 0.8; }
.btn.busy::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 0.86rem; color: var(--red-glow); text-decoration: none; white-space: nowrap; }
.link-more svg { width: 16px; height: 16px; transition: transform 0.2s var(--ease-spring); }
.link-more:hover svg { transform: translateX(3px); }

.field { display: grid; gap: 6px; }
.field > span { font-weight: 800; font-size: 0.88rem; color: var(--muted); }
.field small { color: var(--dim); }
.input, select.input, textarea.input {
  width: 100%;
  min-height: 48px;
  padding: 11px 16px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--field);
  color: var(--white);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
textarea.input { min-height: 96px; resize: vertical; }
.input::placeholder { color: var(--dim); }
.input:focus { outline: none; border-color: var(--red-glow); box-shadow: 0 0 0 4px rgba(255, 47, 67, 0.22); }
select.input {
  appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  text-overflow: ellipsis;
}
select.input option { background: var(--coal-2); color: var(--white); }
html[data-mode="light"] select.input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%235f525a' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.check { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--red); }

/* ---- Surfaces ---------------------------------------------------------- */
.glass {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-deep), inset 0 1px 0 rgb(var(--fg) / 0.05);
}
.panel { padding: clamp(18px, 2.2vw, 26px); }
.panel > h2, .panel > header { margin-bottom: 16px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-head h2 { display: flex; align-items: center; gap: 10px; font-size: clamp(1.2rem, 1.8vw, 1.42rem); }
.section-head h2 svg { width: 20px; height: 20px; color: var(--red-glow); }
.stack { display: grid; gap: 18px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }

/* En-tête de page commun (toutes les pages hors accueil) */
.page-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  margin-bottom: 22px;
  padding: clamp(24px, 3.4vw, 38px) clamp(22px, 3.4vw, 40px);
  border-left: 4px solid var(--red);
}
.page-hero::after {
  /* anneau de Poké Ball décoratif */
  content: "";
  position: absolute;
  z-index: -1;
  right: -60px;
  top: 50%;
  width: 330px;
  aspect-ratio: 1;
  translate: 0 -50%;
  border-radius: 50%;
  background: radial-gradient(circle, transparent 0 19%, rgb(var(--fg) / 0.08) 19% 24%, transparent 24%), linear-gradient(to bottom, rgba(255, 47, 67, 0.16) 0 46%, rgb(var(--fg) / 0.06) 46% 54%, rgb(var(--fg) / 0.03) 54%);
  border: 2px solid rgb(var(--fg) / 0.07);
  animation: slow-spin 60s linear infinite;
}
@keyframes slow-spin { to { rotate: 360deg; } }
.kicker { display: flex; width: fit-content; max-width: 100%; white-space: nowrap; justify-self: start; align-items: center; gap: 12px; font-size: 0.74rem; font-weight: 900; letter-spacing: 0.22em; text-transform: uppercase; color: var(--red-glow); }
.kicker::before { content: ""; flex: none; width: 26px; height: 2px; border-radius: 2px; background: var(--red); }
.kicker.kicker-dot::before { width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 12px var(--red); }
.page-hero h1 { margin-top: 14px; font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
.page-hero p { margin-top: 12px; color: var(--muted); font-size: 1.06rem; max-width: 70ch; }
.page-hero .hero-actions { margin-top: 18px; }
.page-head { display: grid; gap: 10px; margin-bottom: 22px; }
.page-head p { color: var(--muted); font-size: 1.06rem; max-width: 68ch; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 999px; font-size: 0.8rem; font-weight: 800; background: rgb(var(--fg) / 0.07); border: 1px solid var(--line); white-space: nowrap; color: var(--text); }
.chip.type { color: #fff; background: color-mix(in srgb, var(--t1) 40%, #120f14); border-color: color-mix(in srgb, var(--t1) 70%, transparent); }
.chip.r-common { color: #e9e3e6; }
.chip.r-rare { color: #a9d0ff; border-color: rgba(78, 160, 255, 0.55); background: rgba(78, 160, 255, 0.16); }
.chip.r-epic { color: #e6c6ff; border-color: rgba(181, 77, 255, 0.55); background: rgba(181, 77, 255, 0.18); }
.chip.r-legendary { color: var(--gold); border-color: rgba(255, 201, 60, 0.6); background: rgba(255, 201, 60, 0.14); }
.chip.r-mythical { color: #ffb7ea; border-color: rgba(255, 114, 216, 0.55); background: rgba(255, 114, 216, 0.16); }
.chip.owned { color: #b9ffe2; border-color: rgba(63, 224, 160, 0.5); background: rgba(63, 224, 160, 0.14); }
.chip.shiny { color: var(--gold); border-color: rgba(255, 201, 60, 0.5); }
.chip.live { color: #fff; background: var(--red); border-color: transparent; letter-spacing: 0.06em; }
.chip.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--dim); display: inline-block; flex: none; }
.dot.ok { background: var(--green); box-shadow: 0 0 10px var(--green); }
.dot.warn { background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.dot.bad { background: var(--red); box-shadow: 0 0 10px var(--red); }

/* ---- Créature : illustration officielle animée (secours : sprite) ---------- */
.creature { position: relative; display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 0; }
.stage-sprite > .creature, .capture-row .thumb > .creature { width: 100%; height: 100%; }
.creature img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; filter: drop-shadow(0 12px 14px rgba(0, 0, 0, 0.55)); }
.creature img:not(.pixel) { width: 100%; height: 100%; }
.creature img.pixel { image-rendering: pixelated; image-rendering: crisp-edges; width: auto; height: auto; max-width: 80%; max-height: 80%; min-width: 50%; }
/* Animation des illustrations HD : respiration, balancement et petit saut
   régulier ; chaque espèce a son propre décalage pour que la grille vive. */
/* Animation des illustrations HD, sans déformation (retours du 22/10) :
   flottement vertical au-dessus d'une ombre au sol, et un reflet lumineux
   qui balaie la silhouette (masque = l'illustration elle-même). */
.cr-body { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-width: 0; min-height: 0; }
.creature.alive .cr-body { animation: cr-float 4.6s ease-in-out infinite; animation-delay: var(--delay, 0s); will-change: transform; }
@keyframes cr-float { 0%, 100% { transform: translateY(2.5%); } 50% { transform: translateY(-3.5%); } }
.cr-shadow { display: none; }
.creature.alive .cr-shadow { display: block; position: absolute; left: 26%; right: 26%; bottom: 0; height: 7%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, 0.5), transparent); animation: cr-shadow 4.6s ease-in-out infinite; animation-delay: var(--delay, 0s); }
@keyframes cr-shadow { 0%, 100% { transform: scaleX(1); opacity: 0.85; } 50% { transform: scaleX(0.8); opacity: 0.5; } }
.cr-glint { display: none; }
.creature.alive .cr-glint { display: block; position: absolute; inset: 0; overflow: hidden; pointer-events: none; -webkit-mask: var(--art) center / contain no-repeat; mask: var(--art) center / contain no-repeat; }
.creature.alive .cr-glint::before { content: ""; position: absolute; top: -10%; bottom: -10%; left: 0; width: 45%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.5) 50%, transparent); transform: translateX(-120%) skewX(-12deg); animation: cr-glint 9s ease-in-out infinite; animation-delay: var(--glint, 0s); }
@keyframes cr-glint { 0%, 78% { transform: translateX(-120%) skewX(-12deg); } 92%, 100% { transform: translateX(260%) skewX(-12deg); } }
.creature img { transition: transform 0.35s var(--ease-spring); }
a:hover .creature img, .card:hover .creature img { transform: translateY(-3px) scale(1.03); }
html[data-mode="light"] .creature.alive .cr-shadow { background: radial-gradient(closest-side, rgba(60, 20, 35, 0.35), transparent); }
.creature .fallback-mark { width: 38%; height: auto; opacity: 0.5; }

/* Fond dramatique derrière la créature (cartes et fiche) */
.halo {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(58% 52% at 50% 50%, color-mix(in srgb, var(--t2) 72%, transparent) 0%, color-mix(in srgb, var(--t1) 58%, transparent) 36%, transparent 72%),
    radial-gradient(120% 90% at 50% 112%, var(--t3), transparent 70%),
    linear-gradient(160deg, color-mix(in srgb, var(--t1) 34%, #0b0a0e) 0%, color-mix(in srgb, var(--t3) 82%, #0b0a0e) 100%);
}
.halo::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: repeating-conic-gradient(from 0deg at 50% 50%, color-mix(in srgb, var(--t2) 24%, transparent) 0deg 6deg, transparent 6deg 22deg);
  mask: radial-gradient(circle at 50% 50%, #000 0 30%, transparent 62%);
  -webkit-mask: radial-gradient(circle at 50% 50%, #000 0 30%, transparent 62%);
  animation: rays 40s linear infinite;
}
.halo::after {
  content: "";
  position: absolute;
  left: 16%;
  right: 16%;
  bottom: 9%;
  height: 14%;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--t2) 72%, transparent), transparent);
  filter: blur(2px);
  animation: pulse 3.6s ease-in-out infinite;
}
@keyframes rays { to { transform: rotate(360deg); } }
.poke-card .halo::before, .mini-sprite .halo::before, .capture-row .halo::before, .variant .halo::before, .partner .halo::before { animation: none; }
.poke-card:hover .halo::before { animation: rays 40s linear infinite; }
.poke-card .halo::after { animation: none; }
.halo::before { will-change: transform; }
@keyframes pulse { 50% { opacity: 0.6; transform: scaleX(0.92); } }

/* ---- Accueil (mise en page de la référence) ------------------------------- */
.home { display: grid; grid-template-columns: minmax(0, 1fr) clamp(340px, 25vw, 360px); gap: 20px; align-items: start; }
.home-main, .home-side { display: grid; gap: 20px; min-width: 0; }
.hero {
  position: relative;
  isolation: isolate;
  min-height: clamp(440px, 34vw, 520px);
  display: flex;
  align-items: center;
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.hero-art {
  position: absolute;
  z-index: -1;
  inset: 0 0 0 34%;
  background: url("/img/hero-pikachu.webp") center 30% / cover no-repeat;
  -webkit-mask: linear-gradient(90deg, transparent 0, #000 26%, #000 92%, transparent), linear-gradient(180deg, #000 72%, transparent);
  -webkit-mask-composite: source-in;
  mask: linear-gradient(90deg, transparent 0, #000 26%, #000 92%, transparent) intersect, linear-gradient(180deg, #000 72%, transparent);
  animation: hero-drift 18s ease-in-out infinite alternate;
}
@keyframes hero-drift { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.07) translate(-1.2%, -1%); } }
.hero::before {
  /* voile sombre sous le texte, lueur rouge côté illustration */
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgb(var(--scrim) / 0.96) 0%, rgb(var(--scrim) / 0.82) 30%, rgb(var(--scrim) / 0.25) 52%, transparent 68%), radial-gradient(60% 70% at 78% 40%, rgba(255, 47, 67, 0.14), transparent 70%);
}
.hero-sparks { position: absolute; z-index: 0; inset: 0 0 0 30%; pointer-events: none; }
.hero-sparks i { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #ffe7a0; box-shadow: 0 0 10px 3px rgba(255, 210, 90, 0.8); opacity: 0; animation: spark 3.4s ease-in-out infinite; }
.hero-sparks i:nth-child(1) { left: 32%; top: 30%; animation-delay: 0s; }
.hero-sparks i:nth-child(2) { left: 54%; top: 58%; animation-delay: 0.7s; }
.hero-sparks i:nth-child(3) { left: 44%; top: 18%; animation-delay: 1.4s; background: #fff; box-shadow: 0 0 10px 3px rgba(255, 90, 105, 0.8); }
.hero-sparks i:nth-child(4) { left: 70%; top: 70%; animation-delay: 2.1s; }
.hero-sparks i:nth-child(5) { left: 22%; top: 64%; animation-delay: 2.7s; background: #fff; box-shadow: 0 0 10px 3px rgba(255, 90, 105, 0.8); }
@keyframes spark { 0% { opacity: 0; transform: translateY(10px) scale(0.6); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(-40px) scale(1.2); } }
.hero-copy { position: relative; z-index: 1; display: grid; gap: 20px; max-width: 600px; padding: clamp(10px, 2vw, 22px) clamp(4px, 1vw, 12px); }
.hero-copy h1 { font-size: clamp(2.6rem, 4.1vw, 4.4rem); line-height: 0.98; }
.hero-copy p { font-size: 1.12rem; color: #e6dde0; max-width: 46ch; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8); }
.hero-cmd { font-family: var(--font-display); font-weight: 600; color: var(--white); background: rgba(255, 47, 67, 0.22); border: 1px solid var(--line-red); padding: 1px 10px; border-radius: 8px; white-space: nowrap; }
.hero-features { display: flex; flex-wrap: wrap; gap: 14px 20px; margin-top: 6px; }
.hero-feature { display: flex; align-items: center; gap: 12px; }
.hero-feature .ic { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(18, 15, 20, 0.75); border: 1px solid var(--line-strong); color: var(--red-glow); flex: none; backdrop-filter: blur(6px); }
.hero-feature .ic svg { width: 21px; height: 21px; }
.hero-feature .ic .coin-icon { width: 22px; height: 22px; }
.hero-feature .ic .pokeball { --s: 24px; animation: none; }
.hero-feature strong { display: block; font-family: var(--font-display); font-weight: 600; font-size: 0.98rem; }
.hero-feature small { color: var(--muted); font-size: 0.8rem; }

.profile-card { padding: 20px; display: grid; gap: 16px; }
.panel-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 800; color: var(--text); }
.panel-label span { display: inline-flex; align-items: center; gap: 8px; }
.panel-label svg { width: 18px; height: 18px; color: var(--muted); }
.identity { display: flex; align-items: center; gap: 14px; min-width: 0; }
.identity > :not(.avatar) { min-width: 0; }
.profile-card > * { min-width: 0; }
.identity .avatar { width: 58px; height: 58px; font-size: 1.5rem; }
.identity .avatar.empty { background: rgb(var(--fg) / 0.06); border: 1px solid var(--line-strong); box-shadow: none; color: var(--muted); }
.identity .avatar.empty svg { width: 26px; height: 26px; }
.identity strong { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.identity small { color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.counters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.counter { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 14px; background: rgb(var(--fg) / 0.04); border: 1px solid var(--line); min-width: 0; }
.counter .coin-icon { width: 24px; height: 24px; }
.counter .pokeball { --s: 24px; animation: none; }
.counter svg { width: 24px; height: 24px; color: var(--gold); flex: none; }
.counter strong { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; line-height: 1.1; }
.counter small { display: block; color: var(--muted); font-size: 0.72rem; }
.progress-line { display: grid; gap: 8px; }
.progress-line .row { justify-content: space-between; font-size: 0.86rem; }
.progress-line .row strong { font-weight: 800; }
.progress-line .row span { color: var(--muted); }
.bar { flex: 1; height: 9px; border-radius: 99px; background: rgb(var(--fg) / 0.08); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--red), #ff8a96 70%, #fff); box-shadow: 0 0 12px rgba(255, 47, 67, 0.6); transition: width 0.8s var(--ease-out); }
.partner { display: grid; gap: 10px; padding: 14px; border-radius: 16px; background: rgb(var(--fg) / 0.035); border: 1px solid var(--line); text-decoration: none; color: var(--text); transition: border-color 0.2s, transform 0.25s var(--ease-spring); }
a.partner:hover { border-color: var(--line-red); transform: translateY(-2px); color: var(--text); }
.partner > small { color: var(--muted); font-weight: 700; }
.partner .inner { display: flex; align-items: center; gap: 14px; }
.partner .pic { position: relative; width: 78px; height: 78px; border-radius: 14px; overflow: hidden; flex: none; }
.partner .pic .creature { position: absolute; inset: 8%; }
.partner strong { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.partner p { color: var(--muted); font-size: 0.86rem; margin-top: 3px; }

.featured-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.feature-card { position: relative; display: grid; border-radius: 18px; overflow: hidden; text-decoration: none; color: var(--text); background: var(--card); border: 1px solid var(--line); transition: transform 0.3s var(--ease-spring), border-color 0.3s, box-shadow 0.3s; isolation: isolate; }
.feature-card:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--t1) 70%, white 10%); box-shadow: 0 26px 44px -22px color-mix(in srgb, var(--t1) 80%, black); color: var(--text); }
.feature-card .art { position: relative; aspect-ratio: 1.45; }
.feature-card .art .creature { position: absolute; inset: 7% 18% 5%; z-index: 1; transition: transform 0.4s var(--ease-spring); }
.feature-card:hover .art .creature { transform: scale(1.07); }
.feature-card .go { position: absolute; z-index: 2; right: 10px; bottom: 10px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgb(var(--scrim) / 0.7); border: 1px solid var(--line-strong); }
.feature-card .go svg { width: 16px; height: 16px; transform: scaleX(-1); }
.feature-card .meta { display: grid; gap: 7px; padding: 11px 12px 13px; }
.feature-card .meta .row { gap: 6px; justify-content: space-between; flex-wrap: nowrap; }
.feature-card .meta strong { font-family: var(--font-display); font-weight: 600; font-size: 1.04rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feature-card .meta .types { display: flex; gap: 4px; flex: none; }
.feature-card .meta .types .chip { font-size: 0.66rem; padding: 1px 7px; }
.feature-card .meta small { color: var(--muted); font-size: 0.74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feature-card .meta .rar { display: inline-flex; align-items: center; gap: 5px; font-size: 0.76rem; font-weight: 800; }
.feature-card .meta .rar::before { content: "✦"; color: var(--gold); }

.capture-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.capture-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) 46px; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 14px; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--line); transition: background-color 0.2s; }
.capture-list li:last-child .capture-row { border-bottom: 0; }
.capture-row:hover { background: rgb(var(--fg) / 0.04); color: var(--text); }
.capture-row .avatar { width: 34px; height: 34px; font-size: 0.95rem; }
.capture-row .txt { min-width: 0; font-size: 0.9rem; }
.capture-row .txt span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.capture-row .txt small { color: var(--dim); font-size: 0.78rem; display: flex; align-items: center; gap: 8px; margin-top: 3px; }
.capture-row .txt span strong, .capture-row .txt span b { font-weight: 800; }
.home-side .section-head h2 { font-size: 1.22rem; white-space: nowrap; }
.capture-row .thumb { position: relative; width: 44px; height: 44px; }
.capture-row .chip { font-size: 0.7rem; padding: 2px 9px; }
.capture-list li.new .capture-row { animation: feed-in 0.7s var(--ease-spring); background: rgba(255, 47, 67, 0.1); }
@keyframes feed-in { from { opacity: 0; transform: translateX(-14px) scale(0.98); } }
.empty { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 32px 18px; color: var(--muted); }
.empty strong { color: var(--white); font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }
.empty .pokeball { --s: 54px; animation: none; }

.how { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; counter-reset: step; }
.how li { list-style: none; position: relative; display: grid; justify-items: center; text-align: center; gap: 8px; padding: 22px 14px 18px; border-radius: 18px; background: rgb(var(--fg) / 0.03); border: 1px solid var(--line); counter-increment: step; transition: transform 0.3s var(--ease-spring), border-color 0.3s; }
.how li:hover { transform: translateY(-4px); border-color: var(--line-red); }
.how li::before { content: counter(step); position: absolute; top: 12px; left: 12px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 0.85rem; box-shadow: 0 0 14px rgba(255, 47, 67, 0.6); }
.how li:not(:last-child)::after { content: "›"; position: absolute; right: -12px; top: 50%; translate: 0 -50%; color: var(--muted); font-size: 1.5rem; font-weight: 700; z-index: 1; }
.how .ic { width: 50px; height: 50px; display: grid; place-items: center; color: var(--red-glow); }
.how .ic svg { width: 34px; height: 34px; }
.how .ic .coin-icon { width: 34px; height: 34px; }
.how .ic .pokeball { --s: 36px; animation: none; }
.how strong { font-family: var(--font-display); font-weight: 600; font-size: 1.04rem; }
.how p { color: var(--muted); font-size: 0.84rem; }
.ol-reset { margin: 0; padding: 0; }

.event-card .inner { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 14px; align-items: center; }
.event-card .pic { position: relative; aspect-ratio: 1.1; border-radius: 14px; overflow: hidden; }
.event-card .pic .creature { position: absolute; inset: 6%; }
.event-card strong { font-family: var(--font-display); font-weight: 600; font-size: 1.06rem; display: block; }
.event-card p { color: var(--muted); font-size: 0.85rem; margin-top: 4px; }
.event-card .when { font-size: 0.78rem; color: var(--muted); font-weight: 700; }
.boost-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.boost-pills .chip { font-size: 0.72rem; }
.points-card { display: flex; gap: 14px; align-items: center; padding: 16px 18px; }
.points-card .coin-icon { width: 38px; height: 38px; }
.points-card strong { font-family: var(--font-display); font-weight: 600; display: block; }
.points-card p { color: var(--muted); font-size: 0.85rem; }

/* ---- Pokédex ------------------------------------------------------------- */
.dex-tools { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 12px; padding: 14px; margin-bottom: 14px; }
.dex-tools .btn { min-height: 48px; }
.dex-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; margin: 4px 4px 18px; color: var(--muted); font-weight: 800; }
.dex-meta .progress { display: flex; align-items: center; gap: 10px; min-width: min(100%, 300px); }
.gen-block { margin-bottom: 32px; }
.gen-title { display: flex; align-items: baseline; gap: 12px; margin: 0 4px 14px; flex-wrap: wrap; }
.gen-title h2 { font-size: 1.4rem; }
.gen-title h2::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); vertical-align: 0.15em; }
.gen-title span { color: var(--dim); font-weight: 700; font-size: 0.9rem; }
.dex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 176px), 1fr)); gap: 14px; }
.poke-card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto;
  grid-template-columns: minmax(0, 1fr);
  border-radius: var(--radius-l);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 16px 30px -20px rgba(0, 0, 0, 0.95);
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s, border-color 0.3s;
  isolation: isolate;
  content-visibility: auto;
  contain-intrinsic-size: auto 180px auto 280px;
}
.poke-card:hover, .poke-card:focus-visible { transform: translateY(-6px); border-color: color-mix(in srgb, var(--t1) 70%, white 10%); box-shadow: 0 24px 42px -20px color-mix(in srgb, var(--t1) 75%, black); color: var(--text); }
.poke-card:focus-visible { outline-offset: 4px; }
.poke-card .art { position: relative; aspect-ratio: 1 / 0.88; }
.poke-card .art .creature { position: absolute; inset: 12% 15% 9%; z-index: 1; transition: transform 0.45s var(--ease-spring); }
.poke-card:hover .art .creature { transform: scale(1.08) translateY(-2%); }
.poke-card .dexno { position: absolute; z-index: 2; top: 9px; left: 10px; font-family: var(--font-display); font-weight: 600; font-size: 0.78rem; padding: 2px 9px; border-radius: 999px; background: rgb(var(--scrim) / 0.66); color: var(--white); }
.poke-card .own { position: absolute; z-index: 2; top: 9px; right: 10px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #052a1b; font-weight: 900; font-size: 0.85rem; box-shadow: 0 0 12px rgba(63, 224, 160, 0.7); }
.poke-card .own.shiny { background: var(--gold); color: #2a1a00; box-shadow: 0 0 12px rgba(255, 201, 60, 0.8); }
.poke-card.missing .art .creature img { filter: brightness(0.1) drop-shadow(0 0 1px rgba(255, 255, 255, 0.5)); }
.poke-card .body { display: grid; gap: 6px; padding: 10px 12px 13px; min-width: 0; border-top: 1px solid var(--line); }
.poke-card h3 { font-size: 1.06rem; overflow-wrap: anywhere; }
.poke-card .types { display: flex; flex-wrap: wrap; gap: 5px; }
.poke-card .types .chip { font-size: 0.7rem; padding: 1px 8px; }
.card-enter { animation: card-in 0.55s var(--ease-out) both; animation-delay: calc(min(var(--i, 0), 18) * 28ms); }
@keyframes card-in { from { opacity: 0; transform: translateY(18px) scale(0.96); } }
.dex-empty { grid-column: 1 / -1; }

/* ---- Fiche détail -------------------------------------------------------- */
.back-link { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px; font-weight: 800; text-decoration: none; color: var(--muted); }
.back-link svg { width: 18px; height: 18px; transition: transform 0.2s var(--ease-spring); }
.back-link:hover { color: var(--white); }
.back-link:hover svg { transform: translateX(-4px); }
.detail { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 36px); align-items: start; }
.stage {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--t1) 45%, transparent);
  box-shadow: var(--shadow-deep), 0 0 100px -30px color-mix(in srgb, var(--t1) 85%, transparent);
  isolation: isolate;
  touch-action: pan-y;
}
.stage-sprite { position: absolute; inset: 14%; z-index: 1; transition: opacity 0.5s; }
.stage canvas { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; opacity: 0; transition: opacity 0.7s; touch-action: none; cursor: grab; }
.stage canvas:active { cursor: grabbing; }
.stage.three-ready canvas { opacity: 1; }
.stage.three-ready .stage-sprite { opacity: 0; visibility: hidden; transition: opacity 0.5s, visibility 0s 0.5s; }
.stage-top { position: absolute; z-index: 3; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; gap: 8px; pointer-events: none; }
.stage-top .tag { padding: 5px 12px; border-radius: 999px; background: rgb(var(--scrim) / 0.7); border: 1px solid var(--line); font-family: var(--font-display); font-weight: 600; font-size: 0.9rem; backdrop-filter: blur(8px); }
.stage-bar { position: absolute; z-index: 3; left: 14px; right: 14px; bottom: 14px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; pointer-events: none; }
.stage-bar > * { pointer-events: auto; }
.seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; background: rgb(var(--scrim) / 0.74); border: 1px solid var(--line); backdrop-filter: blur(10px); }
.seg button { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; font-weight: 800; font-size: 0.86rem; color: var(--muted); cursor: pointer; transition: background-color 0.2s, color 0.2s; }
.seg svg { width: 16px; height: 16px; }
.seg button[aria-pressed="true"] { background: var(--red); color: #fff; box-shadow: 0 6px 16px -6px rgba(255, 47, 67, 0.9); }
.seg button:hover:not([aria-pressed="true"]) { color: var(--white); }
.stage-note { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; background: rgb(var(--scrim) / 0.74); border: 1px solid var(--line); font-size: 0.82rem; font-weight: 800; color: var(--text); backdrop-filter: blur(10px); }
.stage-note svg { width: 16px; height: 16px; color: var(--red-glow); flex: none; }
.stage-loading { position: absolute; z-index: 3; top: 52px; right: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px; background: rgb(var(--scrim) / 0.74); font-size: 0.82rem; font-weight: 800; }
.detail-info { display: grid; gap: 18px; }
.detail-info .no { font-family: var(--font-display); font-weight: 600; color: var(--red-glow); font-size: 1.02rem; }
.detail-info h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
.detail-info .genus { font-size: 1.1rem; color: var(--muted); font-weight: 700; }
.detail-info .desc { font-size: 1.06rem; line-height: 1.65; max-width: 58ch; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.fact { padding: 14px 16px; border-radius: var(--radius-m); background: rgb(var(--fg) / 0.04); border: 1px solid var(--line); display: grid; gap: 2px; }
.fact small { color: var(--dim); font-weight: 700; }
.fact strong { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }
.variants { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.variant { position: relative; border-radius: var(--radius-m); overflow: hidden; aspect-ratio: 1.6; border: 1px solid var(--line); }
.variant .creature { position: absolute; inset: 8% 24%; }
.variant figcaption { position: absolute; left: 10px; bottom: 8px; z-index: 2; font-weight: 800; font-size: 0.82rem; padding: 2px 10px; border-radius: 999px; background: rgb(var(--scrim) / 0.74); }

/* ---- Boutique, profil, classement --------------------------------------- */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.egg-card { position: relative; display: grid; gap: 14px; padding: 24px 20px; border-radius: var(--radius-l); overflow: hidden; isolation: isolate; text-align: center; justify-items: center; transition: transform 0.3s var(--ease-spring), border-color 0.3s; }
.egg-card::before { content: ""; position: absolute; z-index: -1; inset: -30% -30% 40%; background: radial-gradient(closest-side, color-mix(in srgb, var(--e2) 40%, transparent), transparent); }
.egg-card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--e2) 60%, transparent); }
.egg-card .egg { width: 92px; height: 116px; border-radius: 50% 50% 46% 46% / 60% 60% 40% 40%; background: radial-gradient(circle at 34% 28%, #fff 0 8%, transparent 22%), radial-gradient(circle at 30% 70%, var(--e2) 0 12%, transparent 13%), radial-gradient(circle at 70% 46%, var(--e2) 0 10%, transparent 11%), linear-gradient(160deg, var(--e1), var(--e3)); box-shadow: inset -10px -12px 0 rgba(0, 0, 0, 0.18), 0 18px 30px -14px rgba(0, 0, 0, 0.8); animation: egg-idle 4s ease-in-out infinite; transform-origin: 50% 90%; }
/* Repos : léger balancement continu (décalé d'un œuf à l'autre). Survol : l'œuf
   tremble trois fois puis se calme, sans à-coup à l'entrée ni à la sortie. */
.egg-wrap { transform-origin: 50% 92%; }
.egg-card:hover .egg-wrap, .egg-card:focus-within .egg-wrap { animation: egg-shake 0.6s ease-in-out 3; }
.egg-card[data-tier="rare"] .egg { animation-delay: -1s; }
.egg-card[data-tier="epic"] .egg { animation-delay: -2s; }
.egg-card[data-tier="legendary"] .egg { animation-delay: -3s; }
@keyframes egg-idle { 0%, 100% { rotate: 0deg; translate: 0 0; } 50% { rotate: -3deg; translate: 0 -3px; } }
@keyframes egg-shake { 0%, 100% { rotate: 0deg; } 20% { rotate: -10deg; } 45% { rotate: 8deg; } 70% { rotate: -5deg; } 88% { rotate: 2deg; } }
.egg-card[data-tier="common"] { --e1: #ffffff; --e2: #c9c1c4; --e3: #a59ca0; }
.egg-card[data-tier="rare"] { --e1: #9cc6ff; --e2: #2f74e6; --e3: #2b56b8; }
.egg-card[data-tier="epic"] { --e1: #e1b6ff; --e2: #8f2bdc; --e3: #6a2ab0; }
.egg-card[data-tier="legendary"] { --e1: #fff0a8; --e2: #ffb300; --e3: #d18900; }
.egg-card h3 { font-size: 1.28rem; }
.odds { width: 100%; display: grid; gap: 6px; font-size: 0.88rem; }
.odds div { display: grid; grid-template-columns: 1fr auto; gap: 8px; color: var(--muted); }
.odds b { color: var(--white); }
.price { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; color: var(--gold); display: inline-flex; align-items: center; gap: 8px; }
.wallet { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; padding: 18px 22px; margin-bottom: 20px; }
.wallet small { display: block; }
.wallet .amount { font-family: var(--font-display); font-weight: 700; font-size: 2rem; color: var(--gold); display: inline-flex; align-items: center; gap: 10px; }
.wallet .eggs { display: flex; flex-wrap: wrap; gap: 8px; }
.gift-hint { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; font-size: 0.9rem; background: rgba(255, 201, 60, 0.08); border: 1px solid rgba(255, 201, 60, 0.4); color: #ffe7a8; }
.gift-hint.bad { background: rgba(255, 47, 67, 0.1); border-color: var(--line-red); color: #ffd0d5; }
.gift-hint.ok { background: rgba(63, 224, 160, 0.08); border-color: rgba(63, 224, 160, 0.4); color: #c4ffe7; }
.table-wrap { overflow-x: auto; border-radius: var(--radius-m); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 800; font-size: 0.84rem; background: rgb(var(--fg) / 0.03); white-space: nowrap; }
tbody tr { transition: background-color 0.2s; }
tbody tr:hover { background: rgb(var(--fg) / 0.03); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; }
.amount-plus { color: var(--green); font-weight: 800; }
.amount-minus { color: #ff9aa6; font-weight: 800; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: end; margin-bottom: 22px; }
.podium-step { display: grid; justify-items: center; gap: 8px; padding: 22px 14px; border-radius: var(--radius-l); text-align: center; text-decoration: none; color: var(--text); transition: transform 0.3s var(--ease-spring); }
.podium-step:hover { transform: translateY(-4px); color: var(--text); }
.podium-step .medal { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; color: #1b1015; }
.podium-step:nth-child(1) { order: 2; padding-top: 34px; border-color: rgba(255, 201, 60, 0.4); }
.podium-step:nth-child(1) .medal { background: linear-gradient(135deg, #fff1a6, var(--gold)); width: 68px; height: 68px; box-shadow: 0 0 26px rgba(255, 201, 60, 0.5); }
.podium-step:nth-child(2) { order: 1; }
.podium-step:nth-child(2) .medal { background: linear-gradient(135deg, #ffffff, #c4bcc0); }
.podium-step:nth-child(3) { order: 3; }
.podium-step:nth-child(3) .medal { background: linear-gradient(135deg, #ffd2a6, #d38a4a); }
.podium-step strong { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; overflow-wrap: anywhere; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tabs button { border: 1px solid var(--line); background: rgb(var(--fg) / 0.04); padding: 9px 17px; border-radius: 12px; font-weight: 800; color: var(--muted); cursor: pointer; transition: background-color 0.2s, color 0.2s; }
.tabs button:hover { color: var(--white); }
.tabs button[aria-selected="true"] { background: var(--red); color: #fff; border-color: transparent; box-shadow: var(--shadow-red); }

/* Succès */
.achievements { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 12px; }
.achievement { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: center; padding: 14px; border-radius: 16px; background: rgb(var(--fg) / 0.035); border: 1px solid var(--line); }
.achievement .medal { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: rgb(var(--fg) / 0.06); color: var(--dim); }
.achievement .medal svg { width: 24px; height: 24px; }
.achievement.on { border-color: rgba(255, 201, 60, 0.45); background: linear-gradient(135deg, rgba(255, 201, 60, 0.1), rgba(255, 47, 67, 0.06)); }
.achievement.on .medal { background: radial-gradient(circle at 35% 30%, #fff6cf, var(--gold) 55%, #c98a00); color: #3a2200; box-shadow: 0 0 18px rgba(255, 201, 60, 0.5); }
.achievement strong { font-family: var(--font-display); font-weight: 600; display: block; }
.achievement small { color: var(--muted); font-size: 0.8rem; display: block; }
.achievement .bar { height: 6px; margin-top: 7px; }

/* Événements */
.events-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 16px; }
.event-tile { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; padding: 16px; align-items: center; }
.event-tile .pic { position: relative; aspect-ratio: 1; border-radius: 16px; overflow: hidden; }
.event-tile .pic .creature { position: absolute; inset: 8%; }
.event-tile h3 { font-size: 1.25rem; }
.event-tile p { color: var(--muted); font-size: 0.92rem; margin-top: 6px; }
.event-tile .when { margin-top: 8px; font-size: 0.84rem; font-weight: 800; color: var(--text); }
.event-tile.past { opacity: 0.6; }

/* Commandes */
/* ---- Page Commandes --------------------------------------------------- */
.cmd-tools { display: grid; gap: 12px; padding: 14px; margin-bottom: 26px; border-radius: var(--radius-l); }
.cmd-search { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 52px; border-radius: 14px; background: var(--field); border: 1px solid var(--line-strong); }
.cmd-search:focus-within { border-color: var(--red); box-shadow: 0 0 0 3px rgba(255, 47, 67, 0.18); }
.cmd-search svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.cmd-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--white); font: 700 1.05rem var(--font-body); outline: none; }
.cmd-search input::placeholder { color: var(--dim); font-weight: 600; }
.cmd-jump { display: flex; flex-wrap: wrap; gap: 8px; }
.cmd-jump a { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: rgb(var(--fg) / 0.04); color: var(--text); text-decoration: none; font-weight: 800; font-size: 0.9rem; }
.cmd-jump a:hover { border-color: var(--line-red); color: var(--white); }
.cmd-jump svg { width: 17px; height: 17px; color: var(--red-glow); }
.cmd-jump em { font-style: normal; font-size: 0.78rem; min-width: 22px; text-align: center; padding: 0 6px; border-radius: 99px; background: rgb(var(--fg) / 0.08); color: var(--muted); }
.cmd-group { margin-bottom: 34px; scroll-margin-top: 110px; }
.cmd-group > header { display: flex; align-items: center; gap: 14px; margin: 0 4px 14px; }
.cmd-group > header h2 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); }
.cmd-group > header p { margin: 2px 0 0; color: var(--muted); font-weight: 600; }
.cmd-ico { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(180deg, #ff4a5c, var(--red-2)); color: #fff; box-shadow: var(--shadow-red); }
.cmd-ico svg { width: 24px; height: 24px; }
.cmd-rows { border-radius: var(--radius-l); overflow: hidden; padding: 0; }
.cmd-row { display: grid; grid-template-columns: minmax(150px, 210px) minmax(0, 1fr) minmax(170px, 250px); gap: 18px 24px; align-items: center; padding: 18px 22px; border-top: 1px solid var(--line); }
.cmd-row:first-child { border-top: 0; }
.cmd-row:hover { background: rgb(var(--fg) / 0.03); }
.cmd-name { justify-self: start; display: inline-flex; align-items: center; gap: 10px; max-width: 100%; padding: 9px 14px; border-radius: 12px; border: 1px solid var(--line-red); background: rgba(255, 47, 67, 0.12); color: var(--white); font: 600 1.18rem/1.1 var(--font-display); cursor: pointer; transition: background 0.2s, transform 0.2s var(--ease-spring); }
.cmd-name span { overflow-wrap: anywhere; text-align: left; }
.cmd-name svg { width: 16px; height: 16px; flex: none; color: var(--red-glow); opacity: 0.7; }
.cmd-name:hover { background: rgba(255, 47, 67, 0.22); transform: translateY(-1px); }
.cmd-name:hover svg { opacity: 1; }
.cmd-body { min-width: 0; display: grid; gap: 8px; }
.cmd-help { margin: 0; color: var(--white); font-size: 1.06rem; font-weight: 700; line-height: 1.4; }
.cmd-examples { display: flex; flex-wrap: wrap; gap: 6px; }
.cmd-examples code { font: 600 0.92rem/1.3 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; padding: 5px 10px; border-radius: 8px; background: var(--field); border: 1px solid var(--line); color: var(--text); overflow-wrap: anywhere; }
.cmd-meta { display: grid; gap: 8px; justify-items: start; }
.perm { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 0.82rem; font-weight: 800; background: rgba(255, 201, 60, 0.14); color: var(--gold); border: 1px solid rgba(255, 201, 60, 0.35); }
.perm svg { width: 15px; height: 15px; }
.perm.all { background: rgb(var(--fg) / 0.05); color: var(--muted); border-color: var(--line); }
.aliases { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; font-size: 0.84rem; color: var(--dim); font-weight: 700; }
.aliases b { font-weight: 800; color: var(--muted); padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line); }
.cmd-none { padding: 26px; text-align: center; font-weight: 800; color: var(--muted); border-radius: var(--radius-l); }
@media (max-width: 860px) {
  .cmd-tools { position: static; }
  .cmd-row { grid-template-columns: 1fr; gap: 10px; padding: 16px; }
  .cmd-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
  .cmd-group { scroll-margin-top: 100px; }
}

/* Guide */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; counter-reset: step; }
.steps li { counter-increment: step; padding: 18px; border-radius: var(--radius-m); background: rgb(var(--fg) / 0.035); border: 1px solid var(--line); display: grid; gap: 8px; align-content: start; }
.steps li::before { content: counter(step); width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--red); color: #fff; font-family: var(--font-display); font-weight: 700; box-shadow: 0 0 14px rgba(255, 47, 67, 0.55); }
.steps strong { font-family: var(--font-display); font-weight: 600; font-size: 1.06rem; }
.steps p { color: var(--muted); font-size: 0.94rem; }
.subtle-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.subtle-list li { padding-left: 18px; position: relative; }
.subtle-list li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }

/* Connexion / erreurs */
.center-card { max-width: 580px; margin: 4vh auto 0; text-align: center; display: grid; gap: 18px; justify-items: center; }
.notice { padding: 14px 16px; border-radius: var(--radius-m); border: 1px solid var(--line-strong); background: rgb(var(--fg) / 0.04); text-align: left; }
.notice.error { border-color: var(--line-red); background: rgba(255, 47, 67, 0.1); }
.notice.success { border-color: rgba(63, 224, 160, 0.5); background: rgba(63, 224, 160, 0.1); }
.notice.warn { border-color: rgba(255, 201, 60, 0.5); background: rgba(255, 201, 60, 0.08); }
.notice strong { display: block; margin-bottom: 4px; }

/* Toasts et modale */
.toasts { position: fixed; z-index: 90; right: 16px; bottom: 16px; display: grid; gap: 10px; width: min(380px, calc(100% - 32px)); }
.toast { padding: 13px 16px; border-radius: var(--radius-m); background: var(--glass-strong); border: 1px solid var(--line-strong); backdrop-filter: blur(16px); box-shadow: var(--shadow-deep); font-weight: 700; animation: toast-in 0.4s var(--ease-spring); }
.toast.error { border-color: rgba(255, 47, 67, 0.75); }
.toast.success { border-color: rgba(63, 224, 160, 0.7); }
.toast.leaving { animation: toast-out 0.3s ease-in forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(0.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px); } }
dialog { border: 1px solid var(--line-strong); border-radius: var(--radius-l); background: var(--coal); color: var(--text); padding: 24px; width: min(520px, calc(100% - 32px)); box-shadow: var(--shadow-deep); }
dialog::backdrop { background: rgba(4, 3, 6, 0.72); backdrop-filter: blur(4px); }

/* ---- Panel d'administration -------------------------------------------- */
.admin { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 22px; align-items: start; }
.admin-nav { position: sticky; top: 100px; display: grid; gap: 4px; padding: 10px; }
.admin-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; text-decoration: none; color: var(--muted); font-weight: 800; font-size: 0.93rem; border: 1px solid transparent; }
.admin-nav a:hover { color: var(--white); background: rgb(var(--fg) / 0.05); }
.admin-nav a[aria-current="page"] { color: #fff; background: linear-gradient(180deg, rgba(255, 47, 67, 0.24), rgba(255, 47, 67, 0.1)); border-color: var(--line-red); }
.admin-nav .count { margin-left: auto; min-width: 22px; padding: 0 7px; border-radius: 99px; background: var(--red); color: #fff; font-size: 0.75rem; text-align: center; }
.admin-select { display: none; }
.admin-main { display: grid; gap: 20px; min-width: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.kpi { padding: 16px 18px; display: grid; gap: 6px; align-content: start; }
.kpi small { color: var(--muted); font-weight: 800; }
.kpi strong { font-family: var(--font-display); font-size: 1.6rem; font-weight: 650; }
.health { display: grid; gap: 10px; }
.health-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 14px; border-radius: var(--radius-m); background: rgb(var(--fg) / 0.035); border: 1px solid var(--line); }
.health-row .dot { margin-top: 7px; }
.health-row strong { display: block; }
.health-row p { color: var(--muted); font-size: 0.92rem; overflow-wrap: anywhere; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 14px; }
.copy-field { display: flex; gap: 8px; flex-wrap: wrap; }
.copy-field .input { flex: 1 1 260px; }
.copy-field .input[readonly] { font-size: 0.85rem; font-family: ui-monospace, Consolas, monospace; }
.mini-sprite { width: 44px; height: 44px; position: relative; border-radius: 12px; overflow: hidden; flex: none; }
.mini-sprite .creature { position: absolute; inset: 4px; }
.cell-flex { display: flex; align-items: center; gap: 10px; min-width: 0; }
details.box { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 12px 16px; background: rgb(var(--fg) / 0.03); }
details.box > summary { cursor: pointer; font-weight: 800; }
details.box[open] > summary { margin-bottom: 12px; }
.type-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.type-picks label { cursor: pointer; }
.type-picks input { position: absolute; opacity: 0; pointer-events: none; }
.type-picks .chip { cursor: pointer; opacity: 0.55; transition: opacity 0.2s, transform 0.2s; }
.type-picks input:checked + .chip { opacity: 1; box-shadow: 0 0 0 2px #fff; }
.type-picks input:focus-visible + .chip { outline: 3px solid var(--red-glow); outline-offset: 2px; }

/* ---- Adaptations ------------------------------------------------------- */
@media (max-width: 1780px) {
  body.is-admin .user-pill .who > span { display: none; }
  body.is-admin .user-pill { padding-right: 12px; }
  body.is-admin .nav a { padding: 10px 10px; gap: 6px; }
  body.is-admin .brand-word { font-size: 1.6rem; }
}
@media (max-width: 1500px) {
  body.is-admin .nav a span { display: none; }
  body.is-admin .nav a[aria-current="page"] span { display: inline; }
  body.is-admin .nav a svg { width: 21px; height: 21px; }
}
@media (max-width: 1640px) {
  .account .lbl-long { display: none; }
  .account .lbl-short { display: inline; }
}
@media (max-width: 1480px) {
  .user-pill .who > span { display: none; }
  .user-pill { padding-right: 12px; }
}
/* Menu : 8 rubriques + bascule clair/sombre. On resserre par paliers,
   puis on ne garde que les icônes (sauf la page en cours). */
@media (max-width: 1720px) {
  .nav { gap: 2px; }
  .nav a { padding: 10px 10px; gap: 6px; font-size: 0.9rem; }
}
@media (max-width: 1540px) {
  .topbar { gap: 12px; }
  .nav a { padding: 9px 8px; gap: 5px; font-size: 0.86rem; }
  .nav svg { width: 17px; height: 17px; }
  .brand-word { font-size: 1.6rem; }
}
@media (max-width: 1400px) {
  .nav a span { display: none; }
  .nav a[aria-current="page"] span { display: inline; }
  .nav a { padding: 10px 10px; }
  .nav a svg { width: 21px; height: 21px; }
}
@media (max-width: 1240px) {
  .featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .brand-sub { display: none; }
  .nav a { padding: 10px 8px; }
}
@media (max-width: 1100px) {
  .home { grid-template-columns: minmax(0, 1fr); }
  .home-side { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
  .hero-art { inset: 0 0 0 28%; }
}
@media (max-width: 980px) {
  .detail, .split { grid-template-columns: minmax(0, 1fr); }
  .dex-tools { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dex-tools .search { grid-column: 1 / -1; }
  .admin { grid-template-columns: minmax(0, 1fr); }
  .admin-nav { display: none; }
  .admin-select { display: block; }
  .detail .stage { max-width: 680px; width: 100%; justify-self: center; }
  .how { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .how li:nth-child(2)::after { display: none; }
}
@media (max-width: 860px) {
  .topbar { min-height: 70px; gap: 10px; }
  .nav { display: none; }
  .account { margin-left: auto; }
  .account .user-pill .who, .account .admin-link span, .account .btn-twitch span { display: none; }
  .account .btn-twitch { width: 46px; padding: 0; }
  .account .user-pill { padding: 4px; }
  .topbar .menu-toggle { display: inline-flex; }
  .menu-sheet {
    position: fixed;
    z-index: 39;
    inset: 0;
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 92px var(--gutter) 24px;
    background: rgb(var(--scrim) / 0.95);
    backdrop-filter: blur(18px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
    overflow-y: auto;
  }
  .menu-sheet.open { opacity: 1; visibility: visible; }
  .menu-sheet a { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 16px; font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; color: var(--white); text-decoration: none; background: rgb(var(--fg) / 0.04); border: 1px solid var(--line); transform: translateY(8px); transition: transform 0.35s var(--ease-spring), background-color 0.2s; }
  .menu-sheet.open a { transform: none; }
  .menu-sheet a[aria-current="page"] { background: linear-gradient(180deg, rgba(255, 47, 67, 0.3), rgba(255, 47, 67, 0.12)); border-color: var(--line-red); }
  .menu-sheet svg { width: 22px; height: 22px; color: var(--red-glow); }
  .brand .pokeball { --s: 38px; }
  .brand-word { font-size: 1.4rem; }
  .podium { grid-template-columns: minmax(0, 1fr); }
  .podium-step:nth-child(n) { order: initial; padding-top: 22px; }
  .wallet .amount { font-size: 1.6rem; }
  .hero { min-height: 0; flex-direction: column; align-items: stretch; }
  .hero-art { position: relative; inset: auto; order: -1; height: clamp(220px, 52vw, 360px); -webkit-mask: linear-gradient(180deg, #000 70%, transparent); mask: linear-gradient(180deg, #000 70%, transparent); border-radius: var(--radius-xl); }
  .hero-sparks { inset: 0; height: clamp(220px, 52vw, 360px); }
  .hero-copy { margin-top: -40px; }
  .event-tile { grid-template-columns: 110px minmax(0, 1fr); }
}
@media (max-width: 560px) {
  body { font-size: 15.5px; }
  .hide-sm { display: none; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .dex-tools { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .dex-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .poke-card h3 { font-size: 0.98rem; }
  .poke-card .body { padding: 9px 10px 11px; }
  .featured-grid { gap: 10px; }
  .feature-card .meta .types { display: none; }
  .variants { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .stage-bar { left: 10px; right: 10px; bottom: 10px; }
  .stage-top { left: 10px; right: 10px; top: 10px; }
  .brand-sub { display: none; }
  .brand-word { font-size: 1.25rem; }
  .brand .pokeball { --s: 32px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toasts { right: 12px; left: 12px; width: auto; }
  .how { grid-template-columns: minmax(0, 1fr); }
  .how li::after { display: none; }
  .counters { gap: 6px; }
  .counter { padding: 8px; gap: 6px; }
  .page-hero::after { width: 220px; right: -90px; }
  .hero-copy h1 { font-size: clamp(2.3rem, 11vw, 3rem); }
  .event-card .inner { grid-template-columns: 96px minmax(0, 1fr); }
}
@media (max-width: 360px) {
  .brand-text { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .screen-enter, .rise, .card-enter, .hero-art, .page-hero::after, .halo::before { animation: none !important; }
  /* Les Pokémon restent animés (demande du propriétaire) ; seuls les décors s'arrêtent. */
}
.gift-hint svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.gift-hint[hidden] { display: none; }
.avatar { position: relative; overflow: hidden; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; background: #121016; }
.avatar.sm { width: 28px; height: 28px; font-size: 0.8rem; }
.avatar.big { width: 64px; height: 64px; font-size: 1.6rem; }
.avatar.xl { width: clamp(56px, 6vw, 84px); height: clamp(56px, 6vw, 84px); font-size: 2rem; }
.hero-who { display: inline-flex; align-items: center; gap: 18px; }
td a.cell-flex { text-decoration: none; color: var(--text); font-weight: 800; }

/* ---- Interrupteur de thème (soleil / lune) ------------------------------- */
.mode-toggle { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: space-between; width: 68px; height: 36px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgb(var(--fg) / 0.06); color: var(--muted); cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.mode-toggle:hover { border-color: var(--line-red); }
.mode-toggle:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.mt-ico { position: relative; z-index: 1; display: grid; place-items: center; width: 20px; height: 20px; transition: color 0.3s; }
.mt-ico svg { width: 17px; height: 17px; }
.mt-knob { position: absolute; top: 3px; left: 3px; width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(180deg, #ff4a5c, var(--red-2)); box-shadow: 0 4px 12px -4px rgba(255, 47, 67, 0.8); transition: transform 0.35s var(--ease-spring); }
.mode-toggle .moon { color: #fff; }
html[data-mode="light"] .mt-knob { transform: translateX(32px); }
html[data-mode="light"] .mode-toggle .moon { color: var(--muted); }
html[data-mode="light"] .mode-toggle .sun { color: #fff; }
html.mode-anim body, html.mode-anim .glass, html.mode-anim .topbar-wrap, html.mode-anim .poke-card { transition: background-color 0.35s, color 0.35s, border-color 0.35s; }
html[data-mode="light"] .chip.r-common { color: #4d4148; }
html[data-mode="light"] .chip.r-rare { color: #1559b8; }
html[data-mode="light"] .chip.r-epic { color: #7a24c2; }
html[data-mode="light"] .chip.r-legendary { color: #8a5d00; }
html[data-mode="light"] .chip.r-mythical { color: #b0177f; }
html[data-mode="light"] .chip.owned { color: #0b7a4b; }
html[data-mode="light"] .chip.shiny { color: #8a5d00; }
html[data-mode="light"] .type-picks input:checked + .chip { box-shadow: 0 0 0 2px var(--ink); }
html[data-mode="light"] .admin-link:hover { background: #2a2030; color: #fff; }
html[data-mode="light"] .btn-danger { color: #c4122a; }
html[data-mode="light"] .gift-hint.bad { color: #a30f22; }
html[data-mode="light"] .amount-minus { color: #c4122a; }
html[data-mode="light"] .gift-hint { color: #6b4a00; }
html[data-mode="light"] .gift-hint.ok { color: #0b6b42; }

/* ---- Quêtes journalières ------------------------------------------------- */
.quest-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.quest-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.quest-top p { margin: 4px 0 0; }
.quest-total { display: grid; grid-template-columns: auto auto; column-gap: 10px; align-items: center; padding: 10px 16px; border-radius: 16px; background: rgba(255, 201, 60, 0.1); border: 1px solid rgba(255, 201, 60, 0.35); }
.quest-total .coin-icon { grid-row: span 2; font-size: 1.9rem; }
.quest-total strong { font-family: var(--font-display); font-size: 1.5rem; line-height: 1; color: var(--gold); }
.quest-total small { color: var(--muted); font-weight: 700; }
.quest-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.quest { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 18px; border-radius: var(--radius-m); background: rgb(var(--fg) / 0.035); border: 1px solid var(--line); transition: border-color 0.2s; }
.quest.ready { border-color: rgba(255, 201, 60, 0.6); background: rgba(255, 201, 60, 0.07); box-shadow: 0 0 0 1px rgba(255, 201, 60, 0.15), 0 14px 30px -20px rgba(255, 201, 60, 0.6); }
.quest.claimed { opacity: 0.72; }
.q-ico { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(180deg, #ff4a5c, var(--red-2)); color: #fff; box-shadow: var(--shadow-red); flex: none; }
.q-ico svg { width: 24px; height: 24px; }
.quest.ready .q-ico, .quest-bonus.ready .q-ico { background: linear-gradient(135deg, #ffd96a, #f2a900); color: #3a2200; }
.quest.claimed .q-ico { background: var(--green); color: #052a1b; box-shadow: none; }
.q-main { display: grid; gap: 6px; min-width: 0; }
.q-main strong { font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; color: var(--white); }
.q-main p { margin: 0; color: var(--muted); font-weight: 600; }
.q-main small { color: var(--dim); font-weight: 800; }
.q-bar { height: 8px; border-radius: 99px; background: rgb(var(--fg) / 0.08); overflow: hidden; }
.q-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--red), #ff8a96); transition: width 0.6s var(--ease-out); }
.quest.ready .q-bar span, .quest.claimed .q-bar span { background: linear-gradient(90deg, #f2a900, #ffd96a); }
.q-side { display: flex; justify-content: flex-end; }
.q-reward { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--gold); white-space: nowrap; }
.q-done { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--green); white-space: nowrap; }
.q-done svg { width: 18px; height: 18px; }
.quest-bonus { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; margin-top: 14px; padding: 16px 18px; border-radius: var(--radius-m); border: 1px dashed rgba(255, 201, 60, 0.5); }
.quest-bonus p { margin: 2px 0 0; color: var(--muted); font-weight: 600; }
.quest-bonus strong { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; color: var(--white); }
.quest-help .steps { grid-template-columns: 1fr; margin: 14px 0; }
.quest-help .steps li span { color: var(--muted); }
.quest.compact { padding: 10px 12px; gap: 12px; }
.quest.compact .q-ico { width: 36px; height: 36px; border-radius: 11px; }
.quest.compact .q-ico svg { width: 19px; height: 19px; }
.quest.compact .q-main strong { font-size: 0.98rem; }
.quest.compact .q-main small { display: none; }
.quest-mini .quest-list { gap: 8px; }
@media (max-width: 900px) { .quest-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .quest, .quest-bonus { grid-template-columns: auto minmax(0, 1fr); } .q-side, .quest-bonus > :last-child { grid-column: 1 / -1; justify-content: stretch; } .q-side .btn { width: 100%; } }
html[data-mode="light"] .q-reward, html[data-mode="light"] .quest-total strong { color: #8a5d00; }

/* ==== Refonte 2.3 : cartes Pokémon ======================================
   Fond sombre teinté de la couleur du type (validé sur toutes les cartes),
   bord et reflet holographiques pour les légendaires, fabuleux et shiny.
   Les cartes restent sombres dans les deux thèmes, comme des cartes à jouer. */
.pk { --r: 20px; position: relative; display: block; padding: 1px; border-radius: var(--r); border: 0; background: rgba(255, 255, 255, 0.1); color: #f6f2f3; text-decoration: none; text-align: left; font: inherit; cursor: pointer; isolation: isolate; transition: transform 0.3s var(--ease-spring), filter 0.3s; }
.pk:hover, .pk:focus-visible { transform: translateY(-6px) scale(1.03); filter: brightness(1.12); color: #f6f2f3; }
.pk:focus-visible { outline: 3px solid #ff6b78; outline-offset: 4px; }
.pk-in { position: relative; display: block; aspect-ratio: 0.88; border-radius: calc(var(--r) - 1px); overflow: hidden; background: radial-gradient(120% 85% at 50% 22%, color-mix(in srgb, var(--t1) 25%, transparent) 0%, color-mix(in srgb, var(--t3) 80%, transparent) 46%, #0d0b10 82%), #0d0b10; }
.pk-floor { position: absolute; left: 18%; right: 18%; bottom: 16%; height: 8%; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--t1) 30%, transparent), transparent); }
.pk-img { position: absolute; left: 9%; right: 9%; top: 11%; width: 82%; height: 66%; object-fit: contain; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.6)); transition: transform 0.45s var(--ease-spring); }
.pk:hover .pk-img { transform: scale(1.06) translateY(-2%); }
.pk-no { position: absolute; left: 11px; top: 9px; font-family: var(--font-display); font-weight: 600; font-size: 0.8rem; color: rgba(255, 255, 255, 0.62); }
.pk-name { position: absolute; left: 12px; right: 12px; bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.pk-name b { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-name.missing { font-weight: 600; font-size: 0.85rem; color: #85797f; }
.pk-dots { display: flex; gap: 4px; flex: none; }
.pk-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35); }
.pk-tag { position: absolute; right: 9px; top: 9px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-weight: 800; font-size: 0.72rem; color: #120d16; background: linear-gradient(90deg, #ffe48a, #ffc93c); }
.pk-tag.shiny { background: linear-gradient(90deg, #ff9de2, #9de7ff, #b9ffb0, #ffe48a); }
.pk-tag svg { width: 12px; height: 12px; }
.pk.holo { padding: 3px; background: linear-gradient(135deg, #ff9de2, #9de7ff, #b9ffb0, #ffe48a, #c9a2ff, #ff9de2); box-shadow: 0 0 26px -4px color-mix(in srgb, var(--t1) 60%, transparent); }
.pk.holo .pk-in { border-radius: calc(var(--r) - 3px); background: repeating-conic-gradient(from 0deg at 50% 40%, color-mix(in srgb, var(--t1) 12%, transparent) 0deg 6deg, transparent 6deg 18deg), radial-gradient(120% 85% at 50% 22%, color-mix(in srgb, var(--t1) 33%, transparent) 0%, color-mix(in srgb, var(--t3) 87%, transparent) 46%, #0d0b10 82%), #0d0b10; }
.pk.holo .pk-img { filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 16px color-mix(in srgb, var(--t1) 40%, transparent)); }
.pk-foil { position: absolute; inset: 0; z-index: 1; pointer-events: none; mix-blend-mode: screen; background: linear-gradient(180deg, transparent 18%, rgba(255, 255, 255, 0.26) 32%, rgba(140, 255, 240, 0.24) 41%, rgba(255, 150, 240, 0.22) 50%, rgba(255, 236, 140, 0.18) 58%, transparent 72%); background-size: 100% 220%; animation: pk-foil 5.5s linear infinite; }
@keyframes pk-foil { 0% { background-position: 0% 0%; } 100% { background-position: 0% 200%; } }
.pk.missing { background: rgba(255, 255, 255, 0.06); }
.pk.missing .pk-in { background: radial-gradient(120% 85% at 50% 22%, color-mix(in srgb, var(--t1) 8%, transparent) 0%, color-mix(in srgb, var(--t3) 33%, transparent) 46%, #0d0b10 82%), #0d0b10; }
.pk.missing .pk-img { filter: brightness(0) opacity(0.32); }
.pk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 16px; }
@media (prefers-reduced-motion: reduce) { .pk-foil { animation: none; } .pk, .pk-img { transition: none; } }
@media (max-width: 560px) { .pk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .pk-name b { font-size: 0.95rem; } }

/* ---- Pokédex 2.3 : en-tête, barre de filtres -------------------------- */
.dex-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px 30px; flex-wrap: wrap; margin-bottom: 20px; }
.dex-head h1 { font-size: clamp(2rem, 4vw, 2.9rem); line-height: 1; }
.dex-head p { margin-top: 8px; color: var(--muted); font-size: 1.05rem; max-width: 60ch; }
.dex-regions { display: grid; grid-template-columns: repeat(9, 86px); gap: 6px 8px; padding: 12px 14px; border-radius: 18px; }
.dex-regions > div { display: grid; gap: 5px; }
.dex-regions span:first-child { font-weight: 700; font-size: 0.86rem; }
.dex-regions .bar { height: 6px; flex: none; }
.dex-regions .bar > span { box-shadow: none; background: linear-gradient(90deg, var(--red), #ff6b78); }
.dex-regions small { color: var(--muted); font-size: 0.8rem; }
.dex-bar { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px; border-radius: 18px; margin-bottom: 12px; }
.dex-bar .field { display: block; }
.dex-bar .search { flex: 1 1 260px; position: relative; }
.dex-bar .search svg { position: absolute; left: 14px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.dex-bar .search .input { padding-left: 42px; }
.dex-bar select.input { min-width: 128px; }
.dex-seg { border-radius: 14px; }
.dex-seg button { border-radius: 11px; }
@media (max-width: 1100px) { .dex-regions { grid-template-columns: repeat(5, minmax(0, 1fr)); width: 100%; } }
@media (max-width: 560px) { .dex-regions { grid-template-columns: repeat(3, minmax(0, 1fr)); } .dex-bar select.input { flex: 1 1 40%; min-width: 0; } .dex-seg { width: 100%; } .dex-seg button { flex: 1; padding: 7px 6px; } }

/* ---- Fiche rapide (clic sur une carte du Pokédex) ----------------------
   Toujours sombre, comme les cartes. Le Pokémon jaillit avec un éclat de
   rayons, puis les informations arrivent de la droite. */
html.qf-open { overflow: hidden; }
.qf-host { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; }
.qf-scrim { position: absolute; inset: 0; background: rgba(5, 4, 7, 0.74); backdrop-filter: blur(6px); animation: qf-fade 0.25s ease-out both; }
.qf { --text: #f6f2f3; --muted: #b9afb4; --line: rgba(255, 255, 255, 0.1); position: relative; width: min(1180px, 100%); max-height: calc(100dvh - 32px); overflow: auto; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(20px, 3vw, 40px); padding: clamp(16px, 2.4vw, 30px); border-radius: 30px; color: var(--text); background: linear-gradient(180deg, rgba(26, 21, 29, 0.98), rgba(14, 12, 17, 0.98)); border: 1px solid var(--line); box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.9); overscroll-behavior: contain; }
.qf.enter { animation: qf-sheet 0.45s cubic-bezier(0.2, 1.25, 0.4, 1) both; }
.qf-close { position: absolute; right: 16px; top: 16px; z-index: 3; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.05); color: var(--text); cursor: pointer; }
.qf-close:hover { background: rgba(255, 255, 255, 0.12); }
.qf-close svg { width: 20px; height: 20px; }
.qf-art { position: relative; align-self: start; width: 100%; max-width: 480px; justify-self: center; }
.qf-art .pk { --r: 26px; cursor: default; }
.qf-art .pk:hover, .qf-art .pk:focus-visible { transform: none; filter: none; }
.qf-art .pk-in { aspect-ratio: 0.86; }
.qf-art .pk-img { left: 12%; right: 12%; top: 10%; width: 76%; height: 74%; animation: qf-float 4s 0.8s ease-in-out infinite; }
.qf-art .pk.holo { box-shadow: 0 0 50px color-mix(in srgb, var(--t1) 45%, transparent); }
.qf.enter .qf-art { animation: qf-art 0.55s 0.05s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
.qf.enter .qf-art .pk-img { animation: qf-pop 0.6s 0.12s cubic-bezier(0.2, 1.6, 0.45, 1) both, qf-float 4s 0.8s ease-in-out infinite; }
.qf-burst { position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: 26px; overflow: hidden; opacity: 0; }
.qf-burst::before { content: ""; position: absolute; left: 50%; top: 45%; width: 180%; aspect-ratio: 1; translate: -50% -50%; background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.5) 0deg 2deg, transparent 2deg 12deg); -webkit-mask: radial-gradient(circle, transparent 0 8%, #000 16%, transparent 48%); mask: radial-gradient(circle, transparent 0 8%, #000 16%, transparent 48%); }
.qf.enter .qf-burst { animation: qf-burst 0.7s 0.1s ease-out; }
.qf-info { display: flex; flex-direction: column; gap: 16px; min-width: 0; padding: 8px 44px 0 0; }
.qf.enter .qf-info > * { animation: qf-in 0.45s cubic-bezier(0.2, 1, 0.3, 1) both; }
.qf.enter .qf-info > :nth-child(2) { animation-delay: 0.05s; }
.qf.enter .qf-info > :nth-child(3) { animation-delay: 0.1s; }
.qf.enter .qf-info > :nth-child(4) { animation-delay: 0.15s; }
.qf.enter .qf-info > :nth-child(5) { animation-delay: 0.2s; }
.qf.enter .qf-info > :nth-child(6) { animation-delay: 0.25s; }
.qf.enter .qf-info > :nth-child(7) { animation-delay: 0.3s; }
.qf-num { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: #ff6b78; }
.qf-info h2 { margin-top: -4px; font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1; overflow-wrap: anywhere; }
.qf-chips { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; }
.qf-genus { font-size: 1.1rem; color: #d9d0d4; margin-right: 4px; }
.qf-desc { font-size: 1.05rem; line-height: 1.55; color: #e7e0e3; max-width: 62ch; }
.qf-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.qf-tiles > div { padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.09); background: rgba(255, 255, 255, 0.03); min-width: 0; }
.qf-tiles span { display: block; font-size: 0.82rem; color: var(--muted); }
.qf-tiles b { display: block; margin-top: 4px; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; line-height: 1.25; overflow-wrap: anywhere; }
.qf-seg { align-self: flex-start; border-radius: 16px; background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.12); }
.qf-seg button { border-radius: 12px; color: var(--muted); }
.qf-seg button:hover:not([aria-pressed="true"]) { color: #fff; }
.qf-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.qf-actions .btn:not(.btn-primary) { color: var(--text); background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.14); }
@keyframes qf-fade { from { opacity: 0; } }
@keyframes qf-sheet { from { opacity: 0; transform: translateY(40px) scale(0.92); } }
@keyframes qf-art { from { opacity: 0; transform: scale(0.7) rotate(-4deg); } }
@keyframes qf-pop { 0% { opacity: 0; transform: scale(0.3); } 60% { opacity: 1; } 100% { transform: scale(1); } }
@keyframes qf-burst { 0% { opacity: 0.9; transform: scale(0.4) rotate(0); } 100% { opacity: 0; transform: scale(1.4) rotate(10deg); } }
@keyframes qf-in { from { opacity: 0; transform: translateX(24px); } }
@keyframes qf-float { 50% { transform: translateY(-2.5%); } }
@media (max-width: 860px) {
  .qf-host { padding: 0; place-items: end stretch; }
  .qf { grid-template-columns: minmax(0, 1fr); max-height: 94dvh; border-radius: 26px 26px 0 0; gap: 16px; }
  .qf-art { width: min(340px, 78%); justify-self: center; }
  .qf-info { padding: 0; }
  .qf-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qf-actions .btn { flex: 1 1 auto; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .qf-scrim, .qf.enter, .qf.enter .qf-art, .qf.enter .qf-burst, .qf.enter .qf-info > *, .qf-art .pk-img, .qf.enter .qf-art .pk-img { animation: none; }
}

/* ---- Fiche complète 2.3 ------------------------------------------------ */
.pf-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.pf-top .back-link { margin: 0; }
.pf-nav { display: flex; gap: 8px; flex-wrap: wrap; }
.pf-nav .btn { gap: 6px; }
.pf-nav .flip { display: inline-flex; transform: scaleX(-1); }
.pf { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(22px, 3vw, 40px); align-items: start; }
.pf-art { position: sticky; top: 96px; display: grid; gap: 14px; justify-items: center; }
.pf-art #pf-card { width: 100%; max-width: 620px; }
.pf-art .pk { --r: 30px; cursor: default; }
.pf-art .pk:hover { transform: none; filter: none; }
.pf-art .pk-in { aspect-ratio: 1.03; }
.pf-art .pk-img { left: 10%; right: 10%; top: 8%; width: 80%; height: 76%; animation: qf-float 4.5s ease-in-out infinite; }
.pf-art .pk.holo { box-shadow: 0 0 60px color-mix(in srgb, var(--t1) 40%, transparent); }
.pf-seg { border-radius: 16px; }
.pf-seg button { border-radius: 12px; padding: 9px 20px; }
.pf-info { display: flex; flex-direction: column; gap: 18px; min-width: 0; padding-top: 6px; }
.pf-num { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; color: var(--red-glow, #ff6b78); }
.pf-info h1 { margin-top: -6px; font-size: clamp(2.6rem, 6vw, 4.25rem); line-height: 1; overflow-wrap: anywhere; }
.pf-chips { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; }
.pf-genus { font-size: 1.15rem; color: var(--muted); margin-right: 6px; }
.pf-chips .chip[style] { color: var(--text) !important; }
.pf-desc { font-size: 1.1rem; line-height: 1.55; max-width: 62ch; }
.pf-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pf-tiles > div { padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: rgb(var(--fg) / 0.03); min-width: 0; }
.pf-tiles span { display: block; font-size: 0.86rem; color: var(--muted); }
.pf-tiles b { display: block; margin-top: 4px; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; line-height: 1.2; overflow-wrap: anywhere; }
.pf-panel { display: flex; flex-direction: column; gap: 14px; padding: 20px 22px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); }
.pf-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.pf-panel-head strong { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; }
.pf-panel-head span { display: block; margin-top: 4px; color: var(--muted); }
.pf-owned { flex: none; display: inline-flex !important; align-items: center; gap: 8px; margin: 0 !important; padding: 6px 12px; border-radius: 999px; background: rgba(63, 224, 160, 0.12); border: 1px solid rgba(63, 224, 160, 0.45); color: var(--green, #3fe0a0) !important; font-weight: 700; font-size: 0.88rem; }
.pf-owned svg { width: 16px; height: 16px; }
.pf-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.pf-hint { font-size: 0.9rem; color: var(--muted); }
.pf-evo { display: flex; flex-direction: column; gap: 12px; }
.pf-evo h2 { font-size: 1.3rem; }
.pf-evo-row { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.pf-evo-stage { display: flex; gap: 10px; flex-wrap: wrap; max-width: 100%; }
.pf-evo-arrow { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 92px; margin-top: 44px; color: var(--dim); text-align: center; }
.pf-evo-arrow svg { width: 22px; height: 22px; }
.pf-evo-arrow small { font-size: 0.74rem; line-height: 1.2; color: var(--muted); }
.pf-evo-row.branch { flex-direction: column; align-items: flex-start; }
.pf-evo-row.branch .pf-evo-arrow { flex-direction: row; width: auto; margin: 0 0 0 52px; gap: 10px; }
.pf-evo-row.branch .pf-evo-arrow svg { rotate: 90deg; }
.pf-evo-item { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 132px; text-decoration: none; color: var(--text); text-align: center; }
.pf-evo-item .pk { --r: 18px; width: 100%; }
.pf-evo-item .pk-in { aspect-ratio: 1; }
.pf-evo-item .pk-img { left: 12%; right: 12%; top: 10%; width: 76%; height: 80%; }
.pf-evo-item b { font-family: var(--font-display); font-weight: 700; font-size: 1rem; }
.pf-evo-item small { font-size: 0.8rem; color: var(--muted); line-height: 1.25; }
.pf-evo-item.current .pk { outline: 2px solid var(--red); outline-offset: 3px; }
.pf-evo-item:hover .pk, .pf-evo-item:focus-visible .pk { transform: translateY(-4px); }
@media (max-width: 960px) {
  .pf { grid-template-columns: minmax(0, 1fr); }
  .pf-art { position: static; }
  .pf-art #pf-card { max-width: 440px; }
  .pf-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) { .pf-evo-row { gap: 8px; } .pf-evo-item { width: 92px; } .pf-evo-arrow { width: 22px; margin-top: 34px; } .pf-evo-arrow small { display: none; } .pf-evo-row.branch .pf-evo-arrow { margin-left: 36px; } .pf-evo-row.branch .pf-evo-arrow small { display: inline; } .pf-panel-head { flex-wrap: wrap; } }
@media (prefers-reduced-motion: reduce) { .pf-art .pk-img { animation: none; } }

/* ---- Carte de dresseur 2.3 ---------------------------------------------
   Dessinée à 1200 × 630 puis mise à l'échelle (unités de conteneur) ; sous
   700 px de large, elle passe en colonne lisible sur téléphone. */
.tc-wrap { container-type: inline-size; }
.tc { --u: calc(100cqw / 1200); position: relative; width: 100%; aspect-ratio: 1200 / 630; border-radius: calc(34 * var(--u)); overflow: hidden; color: #f6f2f3; background: radial-gradient(90% 120% at 100% 50%, rgba(255, 47, 67, 0.18), transparent 60%), linear-gradient(160deg, #1d1720, #0e0c11 60%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 40px 80px -40px rgba(0, 0, 0, 0.95); }
.tc-band { position: absolute; left: 0; top: 0; right: 0; height: calc(5 * var(--u)); background: linear-gradient(90deg, #ff2f43, #ff6b78 40%, transparent); }
.tc-ring { position: absolute; right: calc(-150 * var(--u)); top: calc(-150 * var(--u)); width: calc(560 * var(--u)); height: calc(560 * var(--u)); border-radius: 50%; border: calc(46 * var(--u)) solid rgba(255, 255, 255, 0.025); }
.tc-main { position: absolute; left: calc(56 * var(--u)); top: calc(54 * var(--u)); width: calc(680 * var(--u)); display: flex; flex-direction: column; gap: calc(26 * var(--u)); }
.tc-who { display: flex; align-items: center; gap: calc(28 * var(--u)); }
.tc-avatar { position: relative; flex: none; width: calc(164 * var(--u)); height: calc(164 * var(--u)); border-radius: 50%; padding: calc(4 * var(--u)); background: conic-gradient(from 200deg, #ff2f43, #ff6b78, #ffffff, #ff2f43); box-shadow: 0 14px 34px -14px rgba(255, 47, 67, 0.9); }
.tc-avatar-in { position: relative; display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: #2a2230; border: calc(3 * var(--u)) solid #121016; font-family: var(--font-display); font-weight: 700; font-size: calc(72 * var(--u)); }
.tc-avatar-in img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tc-twitch { position: absolute; right: calc(-2 * var(--u)); bottom: calc(4 * var(--u)); width: calc(43 * var(--u)); height: calc(43 * var(--u)); display: grid; place-items: center; border-radius: 50%; background: #9146ff; color: #fff; border: calc(3 * var(--u)) solid #121016; }
.tc-twitch svg { width: 52%; height: 52%; }
.tc-id { display: flex; flex-direction: column; gap: calc(10 * var(--u)); min-width: 0; }
.tc-name { font-family: var(--font-display); font-weight: 700; font-size: calc(52 * var(--u)); line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-level { display: inline-flex; align-items: center; gap: calc(10 * var(--u)); font-weight: 700; font-size: calc(20 * var(--u)); color: #d9d0d4; }
.tc-level .chip { font-size: calc(16 * var(--u)); padding: calc(3 * var(--u)) calc(12 * var(--u)); color: #fff; background: linear-gradient(180deg, rgba(255, 47, 67, 0.3), rgba(255, 47, 67, 0.12)); border-color: rgba(255, 47, 67, 0.55); }
.tc-xp { display: block; width: calc(300 * var(--u)); height: calc(8 * var(--u)); border-radius: 99px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.tc-xp span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #ff2f43, #ff8a95); }
.tc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: calc(12 * var(--u)); }
.tc-stat { padding: calc(12 * var(--u)) calc(14 * var(--u)); border-radius: calc(14 * var(--u)); background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.08); min-width: 0; }
.tc-stat b { display: block; font-family: var(--font-display); font-weight: 700; font-size: calc(28 * var(--u)); line-height: 1; }
.tc-stat span { display: block; margin-top: calc(6 * var(--u)); font-size: calc(14 * var(--u)); color: #b9afb4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-stat.gold { background: rgba(255, 201, 60, 0.1); border-color: rgba(255, 201, 60, 0.35); }
.tc-stat.gold b { color: #ffc93c; }
.tc-best { display: flex; flex-direction: column; gap: calc(10 * var(--u)); }
.tc-label { font-weight: 700; font-size: calc(16 * var(--u)); color: #b9afb4; }
.tc-best-row { display: flex; gap: calc(12 * var(--u)); }
.tc-best-row .pk { --r: calc(16 * var(--u)); width: calc(158 * var(--u)); cursor: default; }
.tc-best-row .pk:hover { transform: none; filter: none; }
.tc-best-row .pk-in { aspect-ratio: 158 / 128; }
.tc-best-row .pk-img { left: 12%; right: 12%; top: 7%; width: 76%; height: 64%; }
.tc-best-row .pk-name { left: calc(10 * var(--u)); right: calc(10 * var(--u)); bottom: calc(8 * var(--u)); }
.tc-best-row .pk-name b { font-size: calc(14 * var(--u)); }
.tc-best-row .pk-dots i { width: calc(8 * var(--u)); height: calc(8 * var(--u)); }
.tc-empty { font-size: calc(16 * var(--u)); color: #b9afb4; }
.tc-partner { position: absolute; right: calc(50 * var(--u)); top: calc(50 * var(--u)); width: calc(380 * var(--u)); display: flex; flex-direction: column; align-items: center; gap: calc(12 * var(--u)); }
.tc-partner .pk { --r: calc(26 * var(--u)); width: 100%; cursor: default; }
.tc-partner .pk:hover { transform: none; filter: none; }
.tc-partner .pk-in { aspect-ratio: 380 / 470; }
.tc-partner .pk-img { left: 7%; right: 7%; top: 9%; width: 86%; height: 82%; }
.tc-partner .pk.holo { padding: calc(4 * var(--u)); box-shadow: 0 0 calc(50 * var(--u)) color-mix(in srgb, var(--t1) 40%, transparent); }
.tc-partner-name { display: flex; align-items: baseline; gap: calc(10 * var(--u)); }
.tc-partner-name b { font-family: var(--font-display); font-weight: 700; font-size: calc(26 * var(--u)); }
.tc-partner-name span { font-size: calc(15 * var(--u)); color: #b9afb4; }
.tc-nopartner { width: 100%; aspect-ratio: 380 / 470; display: grid; place-content: center; justify-items: center; gap: 14px; border-radius: calc(26 * var(--u)); border: 2px dashed rgba(255, 255, 255, 0.14); color: #b9afb4; font-size: calc(18 * var(--u)); font-weight: 700; }
.tc-foot { position: absolute; left: calc(56 * var(--u)); bottom: calc(40 * var(--u)); display: flex; align-items: center; gap: calc(12 * var(--u)); }
.tc-ball { position: relative; width: calc(30 * var(--u)); height: calc(30 * var(--u)); border-radius: 50%; background: linear-gradient(to bottom, #ff2f43 0 45%, #121016 45% 55%, #f9f6f6 55% 100%); }
.tc-ball::after { content: ""; position: absolute; left: 50%; top: 50%; width: 34%; height: 34%; translate: -50% -50%; border-radius: 50%; background: #f9f6f6; box-shadow: 0 0 0 2px #121016; }
.tc-brand { font-family: var(--font-display); font-weight: 700; font-size: calc(22 * var(--u)); }
.tc-brand b { color: #ff2f43; }
.tc-domain { font-size: calc(15 * var(--u)); color: #85797f; }
@container (max-width: 700px) {
  .tc { --u: 1px; aspect-ratio: auto; display: flex; flex-direction: column; gap: 18px; padding: 22px 18px 18px; border-radius: 24px; }
  .tc-main, .tc-partner, .tc-foot { position: static; width: auto; }
  .tc-main { display: contents; }
  .tc-who { order: 1; gap: 14px; }
  .tc-avatar { width: 84px; height: 84px; padding: 3px; }
  .tc-avatar-in { font-size: 36px; }
  .tc-twitch { width: 26px; height: 26px; border-width: 2px; }
  .tc-name { font-size: 1.6rem; white-space: normal; overflow-wrap: anywhere; }
  .tc-level { font-size: 0.95rem; flex-wrap: wrap; }
  .tc-level .chip { font-size: 0.8rem; }
  .tc-xp { width: 100%; height: 7px; }
  .tc-partner { order: 2; width: min(300px, 100%); align-self: center; }
  .tc-partner-name b { font-size: 1.3rem; }
  .tc-partner-name span { font-size: 0.9rem; }
  .tc-stats { order: 3; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tc-stat b { font-size: 1.5rem; }
  .tc-stat span { font-size: 0.85rem; }
  .tc-best { order: 4; }
  .tc-label { font-size: 0.95rem; }
  .tc-best-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tc-best-row .pk { width: auto; }
  .tc-best-row .pk-name b { font-size: 0.9rem; }
  .tc-foot { order: 5; }
  .tc-domain { font-size: 0.8rem; overflow-wrap: anywhere; }
  .tc-brand { font-size: 1.1rem; }
  .tc-ball { width: 24px; height: 24px; }
  .tc-nopartner { font-size: 1rem; }
}
.tc-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px 24px; flex-wrap: wrap; margin-bottom: 20px; }
.tc-head h1 { font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1; }
.tc-head p { margin-top: 8px; color: var(--muted); font-size: 1.05rem; }
.tc-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.tc-picker { margin-top: 22px; }
.tc-picker-head { display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.tc-picker-head h2 { font-size: 1.35rem; }
.tc-picker-head .input { max-width: 260px; min-height: 42px; }
.tc-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; max-height: 420px; overflow: auto; padding: 4px; }
.tc-pick { padding: 3px; border-radius: 20px; border: 2px solid transparent; background: transparent; cursor: pointer; }
.tc-pick[aria-pressed="true"] { border-color: var(--red); box-shadow: 0 0 22px -6px rgba(255, 47, 67, 0.9); }
.tc-pick .pk { --r: 16px; pointer-events: none; }
.tc-pick .pk-in { aspect-ratio: 94 / 112; }
.tc-pick .pk-img { left: 10%; right: 10%; top: 8%; width: 80%; height: 62%; }
.tc-pick .pk-name { left: 8px; right: 8px; bottom: 7px; }
.tc-pick .pk-name b { font-size: 0.8rem; }
.tc-pick .pk-dots { display: none; }
.tc-pick:focus-visible { outline: 3px solid #ff6b78; outline-offset: 2px; }
.section-title { font-size: 1.5rem; margin: 6px 4px 16px; }
.profile-links { margin: 18px 0 22px; flex-wrap: wrap; gap: 10px; }
.profile-links .row { flex-wrap: wrap; gap: 8px; }

/* ---- Échanges ------------------------------------------------------------ */
.tr-block { margin-bottom: 18px; }
.tr-block h2 { font-size: 1.3rem; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.tr-block .count { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 99px; background: var(--red); color: #fff; font-size: 0.85rem; }
.tr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.tr-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 12px; border-radius: 16px; border: 1px solid var(--line); background: rgb(var(--fg) / 0.03); }
.tr-item:not(.pending) { opacity: 0.75; }
.tr-pair { display: flex; align-items: center; gap: 8px; }
.tr-pair .pk { --r: 14px; width: 86px; cursor: default; }
.tr-pair .pk:hover { transform: none; filter: none; }
.tr-pair .pk-in { aspect-ratio: 1; }
.tr-pair .pk-img { left: 12%; right: 12%; top: 8%; width: 76%; height: 62%; }
.tr-pair .pk-name { left: 7px; right: 7px; bottom: 6px; }
.tr-pair .pk-name b { font-size: 0.78rem; }
.tr-pair .pk-dots { display: none; }
.tr-swap { color: var(--muted); }
.tr-swap svg { width: 20px; height: 20px; }
.tr-text { display: grid; gap: 4px; min-width: 0; }
.tr-text q { color: var(--muted); font-style: italic; }
.tr-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.tr-new { display: grid; gap: 16px; }
.tr-new h2 { font-size: 1.4rem; }
.tr-step { display: grid; gap: 10px; }
.tr-step h3 { font-size: 1.05rem; }
.tr-step .input[type="search"] { max-width: 300px; min-height: 42px; }
.tr-step .tc-picks { max-height: 290px; }
.tr-who { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.tr-who .field { flex: 1 1 220px; max-width: 360px; }
.tr-summary { font-size: 1.02rem; }
#tr-send { justify-self: start; }
@media (max-width: 700px) { .tr-item { grid-template-columns: minmax(0, 1fr); } .tr-actions { justify-content: flex-start; } }

/* ---- Œufs 2.3 (dessins validés : une matière par événement) ------------- */
.egg-wrap.egg-wob { width: 128px; height: 180px; animation: egg-wob 3.4s ease-in-out infinite; }
.egg-wrap svg { width: 100%; height: 100%; display: block; }
.egg-card:hover .egg-wrap.egg-wob, .egg-card:focus-within .egg-wrap.egg-wob { animation: egg-shake 0.6s ease-in-out 3; }
@keyframes egg-wob { 0%, 62%, 100% { transform: rotate(0); } 68% { transform: rotate(-6deg); } 74% { transform: rotate(5deg); } 80% { transform: rotate(-2deg); } 86% { transform: rotate(0); } }
.egg7 .egg-holo { animation: egg-holo 4s linear infinite; }
@keyframes egg-holo { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-40px); } }
.egg-chip { padding-left: 4px; }
.egg-mini { display: inline-block; width: 18px; height: 25px; }
.egg-mini svg { width: 100%; height: 100%; display: block; }
.egg-season { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 10px 14px; border-radius: 14px; border: 1px solid rgba(255, 201, 60, 0.35); background: rgba(255, 201, 60, 0.08); }
.egg-season svg { width: 18px; height: 18px; color: var(--gold); flex: none; }
@media (prefers-reduced-motion: reduce) { .egg-wrap.egg-wob, .egg7 .egg-holo { animation: none; } }

/* ---- Revoir l'ouverture (même animation qu'OBS) --------------------------- */
.op-modal { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 16px; background: rgba(5, 4, 7, 0.86); backdrop-filter: blur(6px); }
.op-modal-stage { position: relative; width: min(1200px, 100%, calc((100dvh - 32px) * 16 / 9)); aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; background: radial-gradient(120% 90% at 50% 40%, #2b2333, #120e16 60%, #09070b); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
.op-modal-close { position: absolute; right: 18px; top: 18px; width: 44px; height: 44px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(14, 11, 16, 0.8); color: #fff; font-size: 1.1rem; cursor: pointer; }

/* ==== Panel d'administration du jeu (2.3) ================================
   Coque : menu latéral groupé + barre d'état ; contenu en cartes sobres.
   Une seule touche forte : l'icône de section et le rouge des actions. */
body.in-admin { background: var(--night); }
.cp-shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100dvh; }
.cp-side { position: sticky; top: 0; height: 100dvh; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 18px 14px; background: var(--coal); border-right: 1px solid var(--line); }
.cp-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 10px; text-decoration: none; color: var(--text); }
.cp-brand .pokeball { --s: 34px; animation: none; }
.cp-brand small { display: block; font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.cp-brand .brand-word { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.cp-brand .brand-word b { color: var(--red); }
.cp-nav { display: grid; gap: 14px; }
.cp-group p { margin: 0 0 4px; padding: 0 10px; font-size: 0.75rem; font-weight: 700; color: var(--dim); letter-spacing: 0.02em; }
.cp-group a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.94rem; }
.cp-group a svg { width: 18px; height: 18px; flex: none; }
.cp-group a:hover { background: rgb(var(--fg) / 0.05); color: var(--text); }
.cp-group a[aria-current="page"] { background: color-mix(in srgb, var(--red) 16%, transparent); color: var(--text); box-shadow: inset 3px 0 0 var(--red); }
.cp-group a[aria-current="page"] svg { color: var(--red-glow); }
.cp-group a[hidden] { display: none; }
.cp-badge[hidden] { display: none; }
.cp-badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; display: inline-grid; place-items: center; background: var(--red); color: #fff; font-style: normal; font-size: 0.75rem; font-weight: 800; }
.cp-back { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 600; }
.cp-back:hover { color: var(--text); background: rgb(var(--fg) / 0.05); }
.cp-back svg { width: 16px; height: 16px; }
.cp-body { min-width: 0; display: flex; flex-direction: column; }
.cp-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px clamp(16px, 3vw, 32px); background: color-mix(in srgb, var(--night) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.cp-status { display: flex; gap: 8px; flex-wrap: wrap; min-width: 0; }
.cp-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 99px; border: 1px solid var(--line); background: rgb(var(--fg) / 0.04); color: var(--text); text-decoration: none; font-weight: 700; font-size: 0.82rem; white-space: nowrap; }
.cp-pill.bad { border-color: rgba(255, 79, 79, 0.45); }
.cp-pill.warn { border-color: rgba(255, 201, 60, 0.45); }
.cp-top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.cp-burger { display: none; }
.cp-scrim { position: fixed; inset: 0; z-index: 39; background: rgba(5, 4, 7, 0.6); }
.cp-main { width: 100%; max-width: 1240px; margin: 0 auto; padding: clamp(18px, 3vw, 32px) clamp(16px, 3vw, 32px) 80px; outline: none; }
.cp-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.cp-head-ico { flex: none; width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #ff4a5c, #b30f22); box-shadow: 0 14px 30px -14px rgba(255, 47, 67, 0.9); }
.cp-head-ico svg { width: 26px; height: 26px; }
.cp-crumb { font-size: 0.82rem; font-weight: 700; color: var(--dim); }
.cp-head h1 { font-size: clamp(1.7rem, 3vw, 2.2rem); line-height: 1.05; }
.cp-lead { margin-top: 6px; color: var(--muted); max-width: 70ch; }
.cp-content { display: grid; gap: 18px; }
.cp-content > .notice, .cp-main > .notice { margin-bottom: 16px; }
.cp-stack { display: grid; gap: 18px; }
.cp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.cp-card { position: relative; display: grid; gap: 14px; padding: clamp(16px, 2vw, 22px); border-radius: 18px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow-deep); min-width: 0; }
.cp-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cp-card-head h2 { font-size: 1.2rem; line-height: 1.2; }
.cp-card-head p { margin-top: 4px; color: var(--muted); font-size: 0.92rem; max-width: 72ch; }
.cp-card-actions { display: flex; gap: 8px; flex-wrap: wrap; flex: none; }
.cp-card.cp-ok { border-color: rgba(63, 224, 160, 0.4); }
.cp-card.cp-bad { border-color: rgba(255, 79, 79, 0.45); }
.cp-card h3 { font-size: 1.05rem; }
.cp-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.cp-kpi { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.cp-kpi-ico { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: rgb(var(--fg) / 0.06); color: var(--muted); }
.cp-kpi-ico svg { width: 20px; height: 20px; }
.cp-kpi small { display: block; color: var(--muted); font-size: 0.82rem; font-weight: 600; }
.cp-kpi strong { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; line-height: 1.1; }
.cp-kpi em { display: block; font-style: normal; font-size: 0.8rem; color: var(--dim); }
.cp-kpi.gold strong, .cp-kpi.gold .cp-kpi-ico { color: var(--gold); }
.cp-kpi.warn { border-color: rgba(255, 201, 60, 0.45); }
.cp-todo { border-color: rgba(255, 201, 60, 0.4); }
.cp-todo-list { display: grid; gap: 8px; }
.cp-todo-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: rgb(var(--fg) / 0.03); }
.cp-todo-item p { color: var(--muted); font-size: 0.9rem; }
.cp-allgood { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 18px; border: 1px solid rgba(63, 224, 160, 0.4); background: rgba(63, 224, 160, 0.07); }
.cp-allgood > svg { width: 26px; height: 26px; color: var(--green); flex: none; }
.cp-allgood strong { display: block; }
.cp-allgood span { color: var(--muted); }
.cp-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cp-action { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: rgb(var(--fg) / 0.03); color: var(--text); text-decoration: none; text-align: left; font: inherit; cursor: pointer; }
.cp-action:hover { border-color: var(--line-strong); background: rgb(var(--fg) / 0.06); }
.cp-action > svg { width: 20px; height: 20px; flex: none; color: var(--red-glow); margin-top: 2px; }
.cp-action strong { display: block; font-size: 0.95rem; }
.cp-action small { display: block; color: var(--muted); font-size: 0.82rem; }
.cp-action.go { border-color: rgba(63, 224, 160, 0.45); }
.cp-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cp-feed li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.cp-feed li:last-child { border-bottom: 0; }
.cp-feed strong { display: block; font-size: 0.95rem; }
.cp-feed span { display: block; color: var(--muted); font-size: 0.84rem; overflow-wrap: anywhere; }
.cp-feed time { color: var(--dim); font-size: 0.8rem; white-space: nowrap; }
.cp-feed-ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: rgb(var(--fg) / 0.06); color: var(--muted); }
.cp-feed-ico svg { width: 16px; height: 16px; }
.pk.cp-thumb { --r: 10px; width: 44px; cursor: default; }
.pk.cp-thumb .pk-in { aspect-ratio: 1; }
.pk.cp-thumb .pk-img { left: 8%; right: 8%; top: 8%; width: 84%; height: 84%; }
.pk.cp-thumb:hover { transform: none; filter: none; }
.pk.cp-thumb.holo { padding: 2px; }
.cp-now { display: grid; gap: 12px; }
.cp-now > div { display: flex; align-items: center; gap: 12px; }
.cp-now > div > svg { width: 22px; height: 22px; color: var(--gold); flex: none; }
.cp-now strong { display: block; }
.cp-now span { color: var(--muted); font-size: 0.88rem; }
.cp-egg-mini { display: inline-grid; place-items: center; width: 28px; height: 39px; flex: none; }
.cp-egg-mini svg { width: 100%; height: 100%; display: block; overflow: visible; }
.cp-egg-mini.lg { width: 44px; height: 62px; }
.cp-egg-mini.none { color: var(--dim); }
.cp-egg-mini.none svg { width: 18px; height: 18px; }
.cp-chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cp-copy { display: flex; gap: 8px; flex-wrap: wrap; }
.cp-copy .input { flex: 1 1 260px; font-family: ui-monospace, monospace; font-size: 0.85rem; }
.cp-inline { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.cp-inline .field { flex: 1 1 260px; }
.cp-form { display: grid; gap: 14px; }
.cp-form.cp-editing { padding: 16px; border-radius: 14px; border: 1px dashed var(--line-strong); background: rgb(var(--fg) / 0.02); }
.cp-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 14px; align-items: start; }
.cp-input-suffix { position: relative; display: flex; align-items: center; }
.cp-input-suffix .input { padding-right: 86px; }
.cp-input-suffix em { position: absolute; right: 14px; font-style: normal; font-size: 0.82rem; color: var(--dim); pointer-events: none; }
.cp-switch { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.cp-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cp-switch-ui { position: relative; flex: none; width: 44px; height: 26px; border-radius: 99px; background: rgb(var(--fg) / 0.16); transition: background-color 0.2s; margin-top: 1px; }
.cp-switch-ui::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4); transition: transform 0.2s var(--ease-spring); }
.cp-switch input:checked + .cp-switch-ui { background: var(--red); }
.cp-switch input:checked + .cp-switch-ui::after { transform: translateX(18px); }
.cp-switch input:focus-visible + .cp-switch-ui { outline: 3px solid #ff8a95; outline-offset: 2px; }
.cp-switch-text strong { display: block; }
.cp-switch-text small { display: block; color: var(--muted); font-size: 0.86rem; }
.cp-presets { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.cp-preset { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgb(var(--fg) / 0.03); color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.cp-preset:hover { border-color: var(--line-strong); }
.cp-preset.on { border-color: var(--red); background: color-mix(in srgb, var(--red) 10%, transparent); }
.cp-preset strong { font-family: var(--font-display); font-weight: 700; }
.cp-preset small { color: var(--muted); font-size: 0.84rem; }
.cp-savebar { position: relative; bottom: 14px; z-index: 5; display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding: 10px 12px 10px 18px; border-radius: 14px; background: var(--coal-2); border: 1px solid var(--line-strong); box-shadow: var(--shadow-deep); }
.cp-savebar > span { display: none; }
form.dirty .cp-savebar { position: sticky; border-color: rgba(255, 201, 60, 0.55); }
form.dirty .cp-savebar > span { display: inline; margin-right: auto; color: var(--gold); }
.cp-row-edit { display: grid; grid-template-columns: 1.4fr 1fr 0.8fr 1.2fr 1.2fr auto; gap: 10px; align-items: end; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cp-row-edit.tight { grid-template-columns: 44px 1fr 1fr auto; }
.cp-place { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; padding-bottom: 12px; }
.cp-eggs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cp-egg-col { display: grid; gap: 10px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: rgb(var(--fg) / 0.02); align-content: start; }
.cp-egg-head { display: flex; align-items: center; gap: 12px; }
.cp-egg-art { width: 46px; height: 64px; flex: none; }
.cp-egg-art svg { width: 100%; height: 100%; overflow: visible; }
.cp-egg-head strong { display: block; font-family: var(--font-display); font-size: 1.1rem; }
.cp-odds { display: grid; gap: 6px; }
.cp-odds label { display: grid; grid-template-columns: 1fr 74px 56px; align-items: center; gap: 8px; font-size: 0.88rem; }
.cp-odds .input { min-height: 36px; padding: 6px 8px; }
.cp-odds em { font-style: normal; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.cp-odds.wide { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.cp-odds.wide label { grid-template-columns: 1fr 80px; }
.cp-egg-pick, .cp-tier-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.cp-egg-opt { position: relative; display: grid; justify-items: center; gap: 4px; width: 92px; padding: 10px 6px 8px; border-radius: 12px; border: 1px solid var(--line); background: rgb(var(--fg) / 0.03); cursor: pointer; font-size: 0.8rem; font-weight: 600; text-align: center; }
.cp-egg-opt input { position: absolute; opacity: 0; }
.cp-egg-opt .cp-egg-mini { width: 34px; height: 48px; }
.cp-egg-opt:has(input:checked) { border-color: var(--red); background: color-mix(in srgb, var(--red) 12%, transparent); }
.cp-egg-opt:has(input:focus-visible) { outline: 3px solid #ff8a95; outline-offset: 2px; }
.cp-egg-now { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.cp-egg-row { display: flex; gap: 10px; }
.cp-egg-big { width: 64px; height: 90px; }
.cp-egg-big svg { width: 100%; height: 100%; overflow: visible; }
.cp-egg-now strong { font-family: var(--font-display); font-size: 1.4rem; }
.cp-cal { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.cp-cal > div { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: rgb(var(--fg) / 0.03); }
.cp-cal .cp-egg-mini { grid-row: span 2; }
.cp-cal small { color: var(--muted); font-size: 0.8rem; }
.cp-specials { display: grid; gap: 10px; }
.cp-special { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: rgb(var(--fg) / 0.02); }
.cp-special strong { display: block; font-family: var(--font-display); }
.cp-special span { display: block; font-size: 0.86rem; }
.cp-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cp-btns.nowrap { flex-wrap: nowrap; }
.cp-empty { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 14px; border: 1px dashed var(--line-strong); color: var(--muted); }
.cp-empty > svg { width: 22px; height: 22px; flex: none; }
.cp-empty strong { display: block; color: var(--text); }
.cp-note { color: var(--muted); font-size: 0.88rem; }
.cp-foot { text-align: right; font-size: 0.82rem; }
.cp-progress { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.cp-progress .bar { width: 110px; flex: none; height: 7px; }
.cp-sub { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 0; }
.cp-sub legend { padding: 0 6px; font-weight: 700; color: var(--muted); font-size: 0.88rem; }
.cp-quests { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 8px; }
.cp-quest { display: grid; grid-template-columns: minmax(0, 1fr) 170px; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgb(var(--fg) / 0.03); }
.cp-quest strong { display: block; font-size: 0.94rem; }
.cp-quest small { display: block; color: var(--muted); font-size: 0.82rem; }
.cp-rank { margin: 0; padding: 0; list-style: none; counter-reset: r; display: grid; gap: 4px; }
.cp-rank li { counter-increment: r; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.cp-rank li::before { content: counter(r); grid-row: span 2; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--dim); text-align: center; }
.cp-rank li:nth-child(1)::before { color: var(--gold); }
.cp-rank span { grid-column: 2; color: var(--muted); font-size: 0.82rem; }
.cp-rank b { grid-column: 3; grid-row: 1 / span 2; font-family: var(--font-display); }
.cp-sets { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; max-height: 320px; overflow: auto; }
.cp-sets > div { padding: 10px 12px; border-radius: 12px; background: rgb(var(--fg) / 0.03); }
.cp-sets strong { display: block; font-size: 0.92rem; }
.cp-sets span { color: var(--muted); font-size: 0.82rem; }
.cp-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.cp-filters .field { flex: 1 1 180px; max-width: 280px; }
.cp-cat .input { min-height: 38px; padding: 6px 10px; }
.cp-cat select.input { min-width: 150px; padding-right: 36px; background-position: right 12px center; }
.cp-w { width: 86px; }
.cp-cell { display: flex; align-items: center; gap: 10px; }
.cp-cell strong, .cp-cell small { display: block; }
.cp-person { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.cp-person h2 { font-size: 1.6rem; }
.cp-seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; border: 1px solid var(--line); background: rgb(var(--fg) / 0.04); justify-self: start; }
.cp-seg label { cursor: pointer; }
.cp-seg input { position: absolute; opacity: 0; }
.cp-seg span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 10px; font-weight: 700; color: var(--muted); }
.cp-seg span svg { width: 16px; height: 16px; }
.cp-seg input:checked + span { background: var(--red); color: #fff; }
.cp-seg input:focus-visible + span { outline: 3px solid #ff8a95; outline-offset: 1px; }
.cp-targets { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px; }
.cp-target { position: relative; display: flex; gap: 10px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: rgb(var(--fg) / 0.03); cursor: pointer; }
.cp-target input { margin-top: 3px; accent-color: var(--red); }
.cp-target strong { display: block; font-size: 0.92rem; }
.cp-target small { display: block; color: var(--muted); font-size: 0.82rem; }
.cp-target:has(input:checked) { border-color: var(--red); }
.cp-preview { font-weight: 700; color: var(--gold); min-height: 1.2em; }
.cp-health { display: grid; gap: 10px; }
.cp-health > div { display: flex; align-items: flex-start; gap: 10px; }
.cp-health .dot { margin-top: 7px; }
.cp-health strong { display: block; font-size: 0.92rem; }
.cp-health span { color: var(--muted); font-size: 0.88rem; }
.cp-details summary { cursor: pointer; font-weight: 700; color: var(--muted); padding: 4px 0; }
.cp-details[open] summary { margin-bottom: 10px; }
.cp-subs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 0.9rem; }
.cp-subs li { display: flex; align-items: center; gap: 8px; }
.cp-state { position: absolute; right: 18px; top: 20px; font-size: 0.8rem; font-weight: 800; padding: 3px 10px; border-radius: 99px; }
.cp-state.ok { color: var(--green); background: rgba(63, 224, 160, 0.1); }
.cp-state.bad { color: #ff8a97; background: rgba(255, 79, 79, 0.1); }
.cp-team { display: grid; gap: 8px; }
.cp-member { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: rgb(var(--fg) / 0.03); }
.cp-member strong { display: block; }
.cp-member span { color: var(--muted); font-size: 0.86rem; }
.cp-avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; background: color-mix(in srgb, var(--red) 25%, var(--coal-2)); }
.cp-results { display: grid; gap: 4px; }
.cp-result { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgb(var(--fg) / 0.03); color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.cp-result span { color: var(--muted); }
.cp-perms { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
#team-hint.bad { color: #ff8a97; }
.cp-content.readonly .cp-savebar, .cp-content.readonly [data-write] { display: none; }
@media (max-width: 1100px) {
  .cp-eggs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cp-row-edit { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cp-row-edit > .btn-icon { justify-self: start; }
}
@media (max-width: 960px) {
  .cp-shell { grid-template-columns: minmax(0, 1fr); }
  .cp-side { position: fixed; z-index: 40; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform 0.25s var(--ease-out); }
  .cp-side.open { transform: none; }
  .cp-burger { display: inline-grid; }
  .cp-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .cp-top { flex-wrap: wrap; row-gap: 8px; }
  .cp-status { order: 3; width: 100%; }
  .cp-top-right .btn span { display: none; }
  .cp-status .cp-pill:nth-child(n + 3) { display: none; }
  .cp-actions { grid-template-columns: minmax(0, 1fr); }
  .cp-eggs { grid-template-columns: minmax(0, 1fr); }
  .cp-special { grid-template-columns: auto minmax(0, 1fr); }
  .cp-special > .chip, .cp-special > .cp-btns { grid-column: 2; }
  .cp-head-ico { width: 44px; height: 44px; }
  .cp-quest { grid-template-columns: minmax(0, 1fr); }
  .cp-row-edit, .cp-row-edit.tight { grid-template-columns: minmax(0, 1fr); }
  .cp-btns.nowrap { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { .cp-side, .cp-switch-ui::after { transition: none; } }
.special-shop { margin-top: 26px; }
.special-shop h2 { display: flex; align-items: center; gap: 10px; font-size: 1.4rem; margin-bottom: 14px; }
.special-shop h2 svg { width: 20px; height: 20px; color: var(--gold); }
.egg-card.special { --e1: #ffe48a; --e2: #c9a2ff; --e3: #7a3fe0; border-color: rgba(201, 162, 255, 0.4); }
.egg-card.special p { font-size: 0.86rem; }
.special-shop .shop-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 300px)); }


/* ==== 2.3.1 : alignement sur la refonte du bot Discord =======================
   Polices des scènes OBS (Fredoka pour les titres, Nunito pour le texte) et
   emoji 3D (Fluent, MIT) à la place des icônes plates dans les menus. */
h1, h2, h3, h4 { font-weight: 600; }
.emo { display: block; flex: none; object-fit: contain; user-select: none; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.35)); transition: transform 0.35s var(--ease-spring), opacity 0.2s; }
html[data-mode="light"] .emo { filter: drop-shadow(0 3px 4px rgba(90, 20, 30, 0.18)); }
.nav a .emo, .menu-sheet a .emo, .cp-nav a .emo { width: 22px; height: 22px; }
.nav a:not([aria-current]) .emo, .cp-nav a:not([aria-current]) .emo { opacity: 0.9; }
.nav a:hover .emo, .nav a[aria-current] .emo, .cp-nav a:hover .emo, .cp-nav a[aria-current] .emo, .menu-sheet a:hover .emo { transform: scale(1.14) rotate(-6deg); opacity: 1; }
.admin-link .emo { width: 20px; height: 20px; }
.cp-head-ico:has(.emo) { background: rgb(var(--fg) / 0.05); border: 1px solid var(--line); box-shadow: none; }
.cp-head-ico .emo { width: 40px; height: 40px; }
@media (max-width: 1100px) { body.is-admin .nav a .emo { width: 21px; height: 21px; } }
.hero-feature .ic .emo { width: 26px; height: 26px; }
.hero-feature:hover .ic .emo, .quest:hover .q-ico .emo, .cp-kpi:hover .emo-ico .emo { transform: translateY(-2px) rotate(-8deg) scale(1.1); }
.q-ico:has(.emo) { background: rgb(var(--fg) / 0.06); border: 1px solid var(--line); box-shadow: none; }
.quest.ready .q-ico:has(.emo) { background: rgba(255, 201, 60, 0.16); border-color: rgba(255, 201, 60, 0.5); }
.quest.claimed .q-ico:has(.emo) { background: rgba(63, 224, 160, 0.14); border-color: rgba(63, 224, 160, 0.45); }
.q-ico .emo { width: 28px; height: 28px; }
.quest.compact .q-ico .emo { width: 22px; height: 22px; }
.cp-kpi-ico.emo-ico { background: rgb(var(--fg) / 0.05); border: 1px solid var(--line); }
.cp-kpi-ico.emo-ico .emo { width: 28px; height: 28px; }
/* Bandeau d'accueil : affiche sombre dans les deux thèmes (texte blanc lisible sur mobile clair). */
html[data-mode="light"] .hero.island { background: linear-gradient(180deg, #16111a, #0b0a0e); box-shadow: 0 24px 50px -30px rgba(90, 20, 30, 0.45); }
