/* ==========================================================================
   Patelin : vues « fonctionnalités » (Arène, combat, Guerre, Boutique, Classements).
   Reprend les jetons de css/app.css (:root). Préfixes : fb- (commun), ar- (Arène),
   bt- (combat), dk- (éditeur de deck), war- (Guerre), shop-/co-/sp-/dv- (Boutique),
   lb- (Classements).
   Couches : combat 50 (comme la scène d'ouverture) · livraison 55 · feuilles 60 · toasts 70.
   ========================================================================== */

/* ---------------------------------------------------------------- commun */
.fb { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.fb > * { min-width: 0; }
.fb--pad { width: 100%; max-width: 1180px; margin: 0 auto; padding: 20px var(--gutter) 48px; }

.fb-kicker {
  display: inline-flex; align-items: center; gap: 7px; width: fit-content;
  font-family: var(--font-display); font-weight: 700; font-size: 14px; line-height: 1;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--signal-hi);
}
.fb-kicker .ico { width: 16px; height: 16px; }
.fb-title {
  margin-top: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(36px, 9.4vw, 62px);
  line-height: 0.96; letter-spacing: -0.005em; text-wrap: balance;
}
.fb-lead { margin-top: 12px; max-width: 58ch; color: var(--ink-2); font-size: 15.5px; text-wrap: pretty; }

.fb-sec { margin-top: 44px; min-width: 0; }
.fb-sec__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.fb-sec__head > div { min-width: 0; }
.fb-sec__title {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: 26px; line-height: 1.05; letter-spacing: 0.005em;
}
.fb-sec__title .ico { width: 24px; height: 24px; }
.fb-sec__lead { margin-top: 4px; color: var(--ink-3); font-size: 14px; max-width: 60ch; }

.fb-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 0; border: 0; background: none; cursor: pointer;
  color: var(--ink-2); font: inherit; font-size: 14px;
  text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px;
}
.fb-link:hover { color: var(--ink); text-decoration-color: var(--ink-3); }
.fb-link .ico { width: 17px; height: 17px; }

.fb-plate {
  display: inline-grid; place-items: center; flex: none;
  min-width: 30px; padding: 4px 6px 3px; border-radius: 5px;
  background: oklch(0.42 0.16 262); color: white;
  font-family: var(--font-display); font-weight: 700; font-size: 14px; line-height: 1; letter-spacing: 0.02em;
  box-shadow: 0 0 0 1.5px oklch(0.3 0.02 262 / 0.55), inset 0 1px 0 rgb(255 255 255 / 0.18);
}
.fb-plate--lg { min-width: 46px; padding: 7px 9px 5px; border-radius: 7px; font-size: 22px; }

.fb-paves { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: 13px; font-variant-numeric: tabular-nums; }
.fb-paves .ico { width: 15px; height: 15px; color: oklch(0.8 0.04 75); }
.fb-paves b { font-weight: 600; }
.fb-paves.is-big { gap: 8px; }
.fb-paves.is-big .ico { width: 26px; height: 26px; }
.fb-paves.is-big b { font-family: var(--font-display); font-weight: 800; font-size: 34px; line-height: 1; }

.fb-skel { border-radius: 14px; }
.fb-empty {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px 14px;
  padding: 18px; border-radius: var(--r-panel); border: 1px dashed var(--line); color: var(--ink-2); font-size: 14.5px;
}
.fb-empty b { color: var(--ink); }
.fb-empty__ico { width: 30px; height: 30px; color: var(--ink-3); }
.fb-empty > .btn { grid-column: 1 / -1; justify-self: start; }
.fb-error {
  display: grid; justify-items: start; gap: 6px; padding: 18px; border-radius: var(--r-panel);
  background: color-mix(in srgb, var(--signal) 8%, var(--bg-elev)); border: 1px solid color-mix(in srgb, var(--signal) 40%, var(--line-soft));
}
.fb-error__title { font-weight: 600; }
.fb-error__text { color: var(--ink-2); font-size: 14px; margin-bottom: 6px; }

/* onglets segmentés */
.fb-seg {
  display: inline-flex; gap: 2px; padding: 3px; max-width: 100%; overflow-x: auto; scrollbar-width: none;
  border-radius: 999px; background: var(--bg-elev); border: 1px solid var(--line-soft);
}
.fb-seg::-webkit-scrollbar { display: none; }
.fb-seg__btn {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: none;
  color: var(--ink-3); font-weight: 600; font-size: 13.5px; white-space: nowrap;
  transition: background-color 0.2s var(--ease), color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.fb-seg__btn:hover { color: var(--ink); }
.fb-seg__btn[aria-selected="true"] { background: var(--bg-elev-2); color: var(--ink); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.06), 0 2px 8px -4px rgb(0 0 0 / 0.6); }
.fb-seg__btn:focus-visible { outline-offset: 1px; border-radius: 999px; }
.fb-seg__badge {
  display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
  background: var(--signal); color: var(--on-signal); font: 600 11px/1 var(--font-mono);
}

/* liste déroulante */
.fb-select { position: relative; display: inline-grid; min-width: 0; }
.fb-select__el {
  appearance: none; -webkit-appearance: none; width: 100%; min-height: 44px; padding: 0 40px 0 14px;
  border-radius: var(--r-field); background: var(--bg-elev); border: 1px solid var(--line);
  color: var(--ink); font: 500 15px var(--font-ui); cursor: pointer;
}
.fb-select__el:focus { outline: none; border-color: var(--ink-2); box-shadow: 0 0 0 3px color-mix(in oklch, var(--ink) 18%, transparent); }
.fb-select__el option { background: var(--bg-elev); color: var(--ink); }
.fb-select__caret { position: absolute; right: 13px; top: 50%; width: 15px; height: 15px; transform: translateY(-50%) rotate(90deg); color: var(--ink-3); pointer-events: none; }

/* stats de combat d'une carte */
.fb-stats { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.fb-stats li { display: grid; grid-template-columns: 15px minmax(0, 1fr) 25px; align-items: center; gap: 6px; color: var(--ink-2); }
.fb-stats .ico { width: 15px; height: 15px; color: var(--ink-3); }
.fb-stats__bar { display: block; height: 5px; border-radius: 3px; background: var(--bg); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line-soft); }
.fb-stats__bar i { display: block; height: 100%; width: calc(var(--v) * 1%); border-radius: inherit; background: linear-gradient(90deg, var(--ink-3), var(--ink-2)); }
.fb-stats b { font: 600 13px/1 var(--font-mono); text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
.fb-stats li.is-hl .fb-stats__bar i { background: linear-gradient(90deg, var(--signal-lo), var(--signal-hi)); }

.fb-power {
  display: inline-flex; align-items: center; gap: 5px; width: fit-content;
  padding: 3px 9px 3px 7px; border-radius: 999px; font-size: 12px; font-weight: 600;
}
.fb-power .ico { width: 15px; height: 15px; }
.fb-power.is-fou_rire { background: color-mix(in oklch, var(--t3) 16%, transparent); color: var(--t3); box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--t3) 40%, transparent); }
.fb-power.is-prestige { background: color-mix(in oklch, var(--t6) 14%, transparent); color: var(--t6); box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--t6) 40%, transparent); }
.fb-power.is-none { padding-left: 0; color: var(--ink-3); font-weight: 500; }

.fb-share-img { max-height: 58dvh; width: auto; margin: 0 auto; }

/* petits paquets (illustrations) */
.fb-packs { position: relative; width: 88px; height: 96px; flex: none; }
.fb-pack {
  container-type: inline-size;
  position: absolute; left: 50%; bottom: 0; width: 46px; margin-left: -23px; aspect-ratio: 0.66;
  display: grid; place-items: center; align-content: center; gap: 0; overflow: hidden;
  border-radius: 5px;
  background:
    repeating-radial-gradient(circle at 18% 112%, transparent 0 7px, rgb(255 255 255 / 0.06) 7px 8px),
    linear-gradient(162deg, var(--signal-hi) 0%, var(--signal) 40%, var(--signal-lo) 100%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.16), 0 10px 18px -8px rgb(0 0 0 / 0.7);
  transform-origin: 50% 130%;
  transform: rotate(calc((var(--k, 0) - (var(--n, 1) - 1) / 2) * 10deg));
}
.fb-pack::before, .fb-pack::after {
  content: ""; position: absolute; left: 0; right: 0; height: 8%;
  background: repeating-linear-gradient(90deg, rgb(0 0 0 / 0.18) 0 2px, rgb(255 255 255 / 0.12) 2px 4px);
}
.fb-pack::before { top: 0; }
.fb-pack::after { bottom: 0; }
.fb-pack__kick {
  font-family: var(--font-display); font-weight: 700; font-size: 10cqw; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgb(255 255 255 / 0.85); line-height: 1; white-space: nowrap;
}
.fb-pack__sign {
  margin-top: 8cqw; padding: 3cqw 7cqw 2cqw; border-radius: 4cqw;
  background: var(--sign-white); color: var(--sign-ink);
  border: 3.4cqw solid var(--signal); box-shadow: 0 0 0 2.6cqw var(--sign-white);
  font-family: var(--font-display); font-weight: 800; font-size: 16cqw; line-height: 1; text-transform: uppercase;
}
.fb-pack__plate {
  margin-top: 9cqw; padding: 3cqw 6cqw 2cqw; border-radius: 3cqw; background: oklch(0.42 0.16 262); color: white;
  font-family: var(--font-display); font-weight: 700; font-size: 17cqw; line-height: 1;
  box-shadow: 0 0 0 1.5cqw white;
}
.fb-pack.is-dept {
  background:
    repeating-radial-gradient(circle at 18% 112%, transparent 0 7px, rgb(255 255 255 / 0.06) 7px 8px),
    linear-gradient(162deg, oklch(0.56 0.15 262) 0%, oklch(0.45 0.16 262) 45%, oklch(0.34 0.13 262) 100%);
}
.fb-packs__n {
  position: absolute; right: -6px; bottom: -6px; z-index: 2;
  padding: 3px 8px 2px; border-radius: 999px; background: var(--ink); color: var(--bg);
  font-family: var(--font-display); font-weight: 800; font-size: 17px; line-height: 1;
  box-shadow: 0 6px 14px -6px rgb(0 0 0 / 0.7);
}
.fb-packs.is-sm { width: 64px; height: 70px; }
.fb-packs.is-sm .fb-pack { width: 34px; margin-left: -17px; }
.fb-packs.is-sm .fb-packs__n { font-size: 13px; }

/* ==========================================================================
   ARÈNE
   ========================================================================== */
.ar-hero { display: grid; gap: 22px; align-items: center; }
.ar-id {
  position: relative; display: grid; gap: 16px; padding: 18px; border-radius: 22px; overflow: hidden;
  background:
    repeating-radial-gradient(circle at 112% -12%, transparent 0 11px, rgb(255 255 255 / 0.035) 11px 12px),
    repeating-radial-gradient(circle at -12% 112%, transparent 0 11px, rgb(255 255 255 / 0.025) 11px 12px),
    linear-gradient(165deg, var(--bg-elev-2), var(--bg-elev));
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -34px rgb(0 0 0 / 0.8);
}
.ar-id::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--signal-lo), var(--signal-hi), var(--signal-lo));
}
.ar-id__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ar-id__k, .ar-energy__k {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3);
}
.ar-energy__k .ico { width: 15px; height: 15px; color: var(--signal-hi); }
.ar-id__pass {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px;
  background: oklch(0.86 0.12 90 / 0.14); color: oklch(0.88 0.11 90); border: 1px solid oklch(0.86 0.12 90 / 0.4);
  font-size: 12px; font-weight: 600;
}
.ar-id__pass .ico { width: 14px; height: 14px; }
.ar-id__line { display: flex; align-items: baseline; gap: 8px; margin-top: -6px; }
.ar-id__elo { font-family: var(--font-display); font-weight: 800; font-size: 68px; line-height: 0.9; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.ar-id__u { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--ink-3); letter-spacing: 0.06em; }
.ar-energy { display: grid; gap: 8px; }
.ar-energy__head { display: flex; align-items: center; justify-content: space-between; }
.ar-energy__n { font-family: var(--font-mono); font-size: 14px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ar-energy__n b { color: var(--ink); font-weight: 600; font-size: 16px; }
.ar-energy__bar { display: flex; gap: 3px; }
.ar-energy__bar i {
  flex: 1; height: 9px; border-radius: 2px; background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--line-soft);
  transform: skewX(-14deg);
}
.ar-energy__bar i.is-on {
  background: linear-gradient(180deg, var(--signal-hi), var(--signal));
  box-shadow: 0 0 10px -3px var(--signal), inset 0 1px 0 rgb(255 255 255 / 0.25);
}
.ar-energy__note { font-size: 13px; color: var(--ink-3); }
.ar-energy__note .fb-link { font-size: 13px; color: oklch(0.88 0.11 90); }
.ar-cta { width: 100%; }
.ar-cta .ico { width: 22px; height: 22px; }
.ar-cta.is-resume { background: var(--ink); color: var(--bg); }
.ar-cta.is-busy { animation: fb-pulse 1.1s var(--ease-in-out) infinite; }
@keyframes fb-pulse { 50% { opacity: 0.75; } }
.ar-cta__note { margin-top: -8px; text-align: center; font-size: 13px; color: var(--ink-3); }
.ar-cta__note .fb-link { font-size: 13px; }

.ar-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: -4px 0 14px; color: var(--ink-3); font-size: 12.5px; }
.ar-legend span { display: inline-flex; align-items: center; gap: 5px; }
.ar-legend .ico { width: 15px; height: 15px; }
.ar-legend b { color: var(--ink-2); font-weight: 600; }

.ar-deck {
  display: grid; grid-auto-flow: column; grid-auto-columns: 138px; gap: 12px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin: 0 calc(var(--gutter) * -1); padding: 4px var(--gutter) 10px;
}
.ar-deck::-webkit-scrollbar { display: none; }
.ar-deck.is-empty { display: block; overflow: visible; margin: 0; padding: 0; }
.ar-deck__skel { height: 250px !important; }
.ar-dcard {
  display: grid; align-content: start; gap: 9px; padding: 10px 10px 12px; scroll-snap-align: start;
  border-radius: 16px; background: var(--bg-elev); border: 1px solid var(--line-soft);
}
.ar-dcard__card { display: block; padding: 0; border: 0; background: none; border-radius: 8px; transition: transform 0.25s var(--ease); }
.ar-dcard__card:hover { transform: translateY(-3px); }
.ar-dcard__name { font-weight: 600; font-size: 13.5px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-deck__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin-top: 8px; color: var(--ink-3); font-size: 13px; }
.ar-deck__total b { color: var(--ink); font-weight: 600; }

.ar-hist { display: grid; gap: 8px; }
.ar-hist__tabs { min-width: 0; }
.ar-hlist { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ar-hrow {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 12px 14px 12px 12px; border-radius: 14px; overflow: hidden;
  background: var(--bg-elev); border: 1px solid var(--line-soft);
}
.ar-hrow__res {
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 12px;
  font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--bg-elev-2); color: var(--ink-3);
}
.ar-hrow.is-won .ar-hrow__res { background: color-mix(in srgb, var(--signal) 20%, var(--bg-elev-2)); color: oklch(0.8 0.12 28); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--signal) 45%, transparent); }
.ar-hrow.is-draw .ar-hrow__res { color: var(--ink-2); }
.ar-hrow.is-new { border-color: color-mix(in srgb, var(--signal) 55%, var(--line)); background: color-mix(in srgb, var(--signal) 6%, var(--bg-elev)); }
.ar-hrow__title { font-weight: 600; font-size: 14.5px; line-height: 1.3; text-wrap: pretty; overflow-wrap: anywhere; }
.ar-hrow__new {
  display: inline-block; margin-left: 8px; padding: 2px 7px; border-radius: 999px; vertical-align: 2px;
  background: var(--signal); color: var(--on-signal); font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
}
.ar-hrow__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 5px; color: var(--ink-3); font-size: 12.5px; }
.ar-hrow__meta .fb-plate { font-size: 12px; min-width: 26px; padding: 3px 5px 2px; }
.ar-hrow__bot { display: inline-flex; align-items: center; gap: 4px; }
.ar-hrow__bot .ico { width: 15px; height: 15px; }
.ar-hrow__crown { color: oklch(0.88 0.11 90); display: inline-flex; }
.ar-hrow__crown .ico { width: 15px; height: 15px; }
.ar-hrow__ago::before { content: "·"; margin-right: 8px; }
.ar-hrow__side { display: grid; justify-items: end; gap: 3px; text-align: right; }
.ar-hrow__score { font-family: var(--font-display); font-weight: 800; font-size: 24px; line-height: 1; letter-spacing: 0.02em; }
.ar-hrow__gain { display: flex; align-items: center; gap: 8px; }
.ar-hrow__elo { font: 600 12.5px var(--font-mono); color: var(--ink-3); }
.is-up { color: var(--t1) !important; }
.is-down { color: oklch(0.72 0.15 28) !important; }

.ar-steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ar-step {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start;
  padding: 14px 16px; border-radius: 14px; background: var(--bg-elev); border: 1px solid var(--line-soft);
}
.ar-step__n {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  background: var(--sign-white); color: var(--sign-ink); box-shadow: inset 0 0 0 3px var(--signal), 0 0 0 2px var(--sign-white);
  font-family: var(--font-display); font-weight: 800; font-size: 20px;
}
.ar-step h3 { font-size: 15.5px; font-weight: 600; margin-bottom: 3px; }
.ar-step p { color: var(--ink-2); font-size: 14px; }
.ar-powers { display: grid; gap: 10px; margin: 12px 0; }
.ar-pw { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line-soft); }
.ar-pw__ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; }
.ar-pw__ico .ico { width: 24px; height: 24px; }
.ar-pw.is-fou_rire { background: color-mix(in oklch, var(--t3) 7%, var(--bg-elev)); }
.ar-pw.is-fou_rire .ar-pw__ico { background: var(--t3); color: oklch(0.22 0.04 350); }
.ar-pw.is-prestige { background: color-mix(in oklch, var(--t6) 6%, var(--bg-elev)); }
.ar-pw.is-prestige .ar-pw__ico { background: var(--t6); color: oklch(0.26 0.05 80); }
.ar-pw h3 { display: flex; align-items: baseline; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 1.1; }
.ar-pw h3 small { font-family: var(--font-ui); font-size: 12px; font-weight: 500; color: var(--ink-3); }
.ar-pw p { color: var(--ink-2); font-size: 14px; }

@media (min-width: 760px) {
  .ar-deck { grid-auto-flow: row; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: visible; margin: 0; padding: 0; }
  .ar-steps { grid-template-columns: 1fr 1fr; }
  .ar-powers { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .ar-hero { grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr); gap: 48px; padding-top: 12px; }
  .ar-id { padding: 24px; }
}

/* ---------------------------------------------------------------- éditeur de deck */
.sheet--deck .sheet__panel { max-width: 660px; }
.dk { display: grid; gap: 12px; }
.dk-top {
  position: sticky; top: -18px; z-index: 3;
  display: grid; gap: 10px; margin: -6px calc(var(--gutter) * -1) 0; padding: 8px var(--gutter) 12px;
  background: var(--bg-elev); box-shadow: 0 1px 0 var(--line-soft), 0 12px 16px -12px rgb(0 0 0 / 0.6);
}
.dk-slots { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.dk-slot {
  position: relative; display: block; padding: 0; border: 0; background: none; aspect-ratio: 63 / 88;
  border-radius: 7px; -webkit-tap-highlight-color: transparent;
}
.dk-slot.is-empty {
  display: grid; place-items: center; border: 1.5px dashed var(--line); color: var(--ink-3);
  font-family: var(--font-display); font-weight: 700; font-size: 22px;
}
.dk-slot .card { position: absolute; inset: 0; }
.dk-slot__sum {
  position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); z-index: 2;
  padding: 2px 7px 1px; border-radius: 999px; background: var(--ink); color: var(--bg);
  font-family: var(--font-display); font-weight: 800; font-size: 14px; line-height: 1.1;
}
.dk-slot__x {
  position: absolute; top: -6px; right: -6px; z-index: 2; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg-elev-2); border: 1px solid var(--line); color: var(--ink-2);
}
.dk-slot__x .ico { width: 12px; height: 12px; }
.dk-slot:hover .dk-slot__x { background: var(--signal); color: var(--on-signal); border-color: transparent; }
.dk-sum { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 6px; font-size: 13.5px; color: var(--ink-3); }
.dk-sum b { color: var(--ink); font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; }
.dk-diff { margin-left: 6px; font: 600 12.5px var(--font-mono); }
.dk-tools { display: grid; gap: 10px; }
.dk-tools .field__box .ico { left: 14px; }
.dk-search { min-height: 46px; }
.dk-count { font-size: 12.5px; color: var(--ink-3); }
.dk-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.dk-row {
  display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; grid-template-areas: "tier id check" "tier stats check";
  align-items: center; gap: 4px 12px; width: 100%; padding: 10px 12px; text-align: left;
  border-radius: 12px; border: 1px solid var(--line-soft); background: var(--bg); color: var(--ink);
  transition: border-color 0.15s, background-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.dk-row:hover { border-color: var(--line); }
.dk-row.is-on { border-color: color-mix(in srgb, var(--signal) 70%, transparent); background: color-mix(in srgb, var(--signal) 10%, var(--bg)); }
.dk-row__tier { grid-area: tier; align-self: stretch; width: 10px; border-radius: 3px; background: var(--c); }
.dk-row__id { grid-area: id; display: grid; min-width: 0; }
.dk-row__id b { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-row__id small { font-size: 12px; color: var(--ink-3); }
.dk-row__pw.is-fou_rire { color: var(--t3); }
.dk-row__pw.is-prestige { color: var(--t6); }
.dk-row__stats { grid-area: stats; display: flex; flex-wrap: wrap; gap: 4px 12px; font: 500 12.5px var(--font-mono); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.dk-row__stats span { display: inline-flex; align-items: center; gap: 4px; }
.dk-row__stats .ico { width: 13px; height: 13px; }
.dk-row__stats .is-hl { color: var(--ink); font-weight: 600; }
.dk-row__sum::before { content: "Σ "; color: var(--ink-3); font-weight: 400; }
.dk-row__check {
  grid-area: check; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  border: 1.5px solid var(--line); color: transparent;
}
.dk-row__check .ico { width: 15px; height: 15px; }
.dk-row.is-on .dk-row__check { background: var(--signal); border-color: var(--signal); color: var(--on-signal); }
.dk-none { padding: 18px; text-align: center; color: var(--ink-3); }
.dk-more { justify-self: center; }
.dk-auto { justify-self: center; font-size: 13.5px; color: var(--ink-3); }
@media (min-width: 560px) {
  .dk-row { grid-template-columns: 10px minmax(0, 1fr) auto auto; grid-template-areas: "tier id stats check"; }
}

/* ==========================================================================
   COMBAT (plein écran)
   ========================================================================== */
.bt {
  position: fixed; inset: 0; z-index: 50;
  display: grid; grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden; color: var(--ink);
  background: radial-gradient(120% 75% at 50% 42%, oklch(0.23 0.032 262), oklch(0.12 0.015 262) 72%);
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
  --duel-w: clamp(108px, min(calc((100vw - 2 * var(--gutter) - 14px) / 2), calc((100dvh - 500px) * 0.72)), 210px);
  --hand-w: clamp(54px, calc((100vw - 2 * var(--gutter) - 32px) / 5), 118px);
}
.bt:focus { outline: none; }
.bt__bg {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.55;
  background:
    radial-gradient(closest-side at 50% 52%, color-mix(in srgb, var(--signal) 22%, transparent), transparent 70%),
    repeating-conic-gradient(from 0deg at 50% 52%, rgb(255 255 255 / 0.018) 0 5deg, transparent 5deg 15deg);
}
.bt.is-won .bt__bg { opacity: 1; }
.bt__fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 8; }
.bt__flash { position: absolute; inset: 0; z-index: 7; background: white; opacity: 0; visibility: hidden; pointer-events: none; mix-blend-mode: overlay; }

.bt__top {
  position: relative; z-index: 6;
  display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 8px;
  padding: calc(var(--safe-t) + 8px) var(--gutter) 4px;
}
.bt__close { width: 40px; height: 40px; }
.bt__board { display: grid; justify-items: center; gap: 5px; }
.bt-score { display: flex; align-items: baseline; justify-content: center; gap: 9px; }
.bt-score__who { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.bt-score__n { display: inline-block; min-width: 0.6em; text-align: center; font-family: var(--font-display); font-weight: 800; font-size: 32px; line-height: 0.9; font-variant-numeric: tabular-nums; }
.bt-score__sep { color: var(--ink-3); font-family: var(--font-display); font-size: 22px; }
.bt-pips { display: flex; gap: 5px; margin: 0; padding: 0; list-style: none; }
.bt-pips li { width: 20px; height: 5px; border-radius: 3px; background: var(--line); transition: background-color 0.3s; }
.bt-pips li.is-now { background: var(--ink-2); box-shadow: 0 0 8px -2px var(--ink-2); }
.bt-pips li.is-won { background: var(--signal-hi); }
.bt-pips li.is-lost { background: var(--sign-white); opacity: 0.35; }
.bt-pips li.is-tie { background: var(--ink-3); }
.bt__energy { justify-self: end; display: inline-flex; align-items: center; gap: 3px; font: 500 12px var(--font-mono); color: var(--ink-3); }
.bt__energy .ico { width: 14px; height: 14px; color: var(--signal-hi); }

.bt__game {
  position: relative; z-index: 3; min-height: 0; width: 100%; max-width: 920px; margin: 0 auto;
  display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto auto; justify-items: center; align-items: center; gap: 8px;
  padding: 4px var(--gutter) calc(var(--safe-b) + 10px);
}
.bt.is-end .bt__game { visibility: hidden; }

/* adversaire */
.bt-opp {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px;
  width: 100%; max-width: 520px; padding: 8px 10px 8px 8px; border-radius: 14px;
  background: color-mix(in oklch, var(--bg-elev) 75%, transparent); border: 1px solid var(--line-soft);
}
.bt-opp.is-pass { border-color: oklch(0.86 0.12 90 / 0.6); box-shadow: inset 0 0 0 1px oklch(0.86 0.12 90 / 0.25), 0 0 26px -10px oklch(0.86 0.12 90 / 0.6); }
.bt-opp__bot { display: grid; place-items: center; width: 36px; height: 30px; border-radius: 7px; background: var(--bg-elev-2); color: var(--ink-2); }
.bt-opp__bot .ico { width: 20px; height: 20px; }
.bt-opp__id { min-width: 0; }
.bt-opp__name {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-display); font-weight: 700; font-size: 18px; line-height: 1.05; text-transform: uppercase; letter-spacing: 0.03em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bt-opp__crown { display: inline-flex; color: oklch(0.88 0.11 90); flex: none; }
.bt-opp__crown .ico { width: 16px; height: 16px; }
.bt-opp__meta { font: 500 12px var(--font-mono); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-opp__backs { display: flex; gap: 4px; }
.bt-back {
  width: 17px; aspect-ratio: 63 / 88; border-radius: 3px;
  background:
    repeating-radial-gradient(circle at 50% 50%, transparent 0 2px, oklch(0.8 0.09 85 / 0.18) 2px 2.5px),
    linear-gradient(160deg, oklch(0.32 0.05 262), oklch(0.2 0.04 262));
  box-shadow: inset 0 0 0 1px oklch(0.78 0.09 85 / 0.55);
  transition: opacity 0.3s, transform 0.3s var(--ease);
}
.bt-back.is-gone { opacity: 0.12; transform: scale(0.8); }

/* stat de la manche */
.bt-stat { display: grid; justify-items: center; gap: 5px; --reel-h: 46px; }
.bt-stat__kicker { font: 500 12px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); min-height: 16px; }
.bt-stat__sign {
  display: inline-grid; padding: 4px; border-radius: 12px; background: var(--sign-white);
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.4) inset, 0 14px 30px -12px rgb(0 0 0 / 0.7);
}
.bt-stat__window {
  display: block; height: var(--reel-h); overflow: hidden;
  border: 4px solid var(--signal); border-radius: 8px; padding: 0 16px;
}
.bt-stat__reel { display: grid; will-change: transform; }
.bt-stat__item {
  display: flex; align-items: center; justify-content: center; gap: 10px; height: calc(var(--reel-h) - 8px);
  font-family: var(--font-display); font-weight: 800; font-size: 34px; line-height: 1; letter-spacing: 0.02em; text-transform: uppercase;
  color: var(--sign-ink); white-space: nowrap;
}
.bt-stat__item .ico { width: 28px; height: 28px; color: var(--signal); }
.bt-stat__sub { font-size: 13.5px; color: var(--ink-2); text-align: center; min-height: 20px; }
.bt-stat__sub b { color: var(--ink); font-weight: 600; }

/* duel */
.bt-duel { position: relative; display: grid; grid-template-columns: var(--duel-w) var(--duel-w); align-items: start; gap: 4px 14px; }
.bt-side { position: relative; display: grid; justify-items: center; gap: 4px; }
.bt-slot { --glow: 0; position: relative; width: var(--duel-w); aspect-ratio: 63 / 88; border-radius: calc(var(--duel-w) * 0.046); }
.bt-slot .card { position: absolute; inset: 0; transition: filter 0.35s var(--ease); }
.bt-slot::after {
  content: ""; position: absolute; inset: -5px; border-radius: calc(var(--duel-w) * 0.07); pointer-events: none; z-index: 3;
  box-shadow: 0 0 0 3px oklch(0.86 0.14 92 / var(--glow)), 0 0 34px oklch(0.86 0.14 92 / calc(var(--glow) * 0.8));
}
.bt-slot__empty {
  position: absolute; inset: 0; display: grid; place-items: center; border-radius: inherit;
  border: 1.5px dashed var(--line); color: var(--ink-3);
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
}
.bt-backcard .card__inner { transform: rotateY(180deg); }
.bt-val {
  min-height: 46px; font-family: var(--font-display); font-weight: 800; font-size: 46px; line-height: 1;
  font-variant-numeric: tabular-nums; transition: color 0.3s, text-shadow 0.3s;
}
.bt-side.is-win .bt-val { color: var(--signal-hi); text-shadow: 0 0 26px color-mix(in srgb, var(--signal) 70%, transparent); }
.bt-side.is-lose .bt-val { color: var(--ink-3); }
.bt-side.is-win .card { filter: drop-shadow(0 0 16px color-mix(in srgb, var(--signal-hi) 75%, transparent)); }
.bt-side.is-lose .card { filter: saturate(0.3) brightness(0.62); }
.bt-tag {
  position: absolute; left: 50%; top: -14px; z-index: 4; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px 4px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 800; font-size: 15px; line-height: 1; text-transform: uppercase; letter-spacing: 0.04em;
  white-space: nowrap; opacity: 0; visibility: hidden; box-shadow: 0 8px 18px -8px rgb(0 0 0 / 0.8);
}
.bt-tag .ico { width: 16px; height: 16px; }
.bt-tag.is-on { opacity: 1; visibility: visible; }
.bt-tag.is-fou_rire { background: var(--t3); color: oklch(0.22 0.05 350); }
.bt-tag.is-prestige { background: var(--t6); color: oklch(0.26 0.05 80); }
.bt-minus {
  position: absolute; right: -6px; bottom: 50px; z-index: 4;
  padding: 3px 8px 2px; border-radius: 8px; background: var(--signal); color: var(--on-signal);
  font-family: var(--font-display); font-weight: 800; font-size: 20px; line-height: 1;
  opacity: 0; visibility: hidden;
}
.bt-vs {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line); color: var(--ink-3); background: var(--bg);
  font-family: var(--font-display); font-weight: 800; font-size: 15px; letter-spacing: 0.04em;
  position: absolute; left: 50%; top: calc(var(--duel-w) * 0.698); z-index: 5; transform: translate(-50%, -50%);
  box-shadow: 0 0 0 4px color-mix(in oklch, var(--bg) 70%, transparent);
}
.bt-msg {
  grid-column: 1 / -1; min-height: 26px; text-align: center;
  font-family: var(--font-display); font-weight: 800; font-size: 22px; line-height: 1.1; letter-spacing: 0.04em; text-transform: uppercase;
}

/* main */
.bt-hand { display: grid; grid-template-columns: repeat(5, var(--hand-w)); gap: 8px; justify-content: center; padding-top: 8px; }
.bt-hcard {
  position: relative; display: block; width: var(--hand-w); padding: 0; border: 0; background: none; border-radius: 6px;
  cursor: default; transition: transform 0.22s var(--ease), opacity 0.3s, filter 0.3s;
  -webkit-tap-highlight-color: transparent;
}
.bt-hcard .card { pointer-events: none; }
.bt-hand.is-open .bt-hcard:not(.is-used) { cursor: pointer; }
.bt-hand.is-open .bt-hcard:not(.is-used) .card { filter: drop-shadow(0 0 0 transparent); animation: bt-ready 1.6s var(--ease-in-out) infinite; }
@keyframes bt-ready { 50% { filter: drop-shadow(0 0 8px color-mix(in srgb, var(--signal-hi) 55%, transparent)); } }
.bt-hand.is-open .bt-hcard:not(.is-used):hover,
.bt-hand.is-open .bt-hcard:not(.is-used):focus-visible { transform: translateY(-9px); }
.bt-hcard:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 8px; }
.bt-hcard.is-used .card { opacity: 0.3; filter: grayscale(1); }
.bt-hcard.is-used .bt-hcard__val, .bt-hcard.is-used .bt-hcard__power { display: none; }
.bt-hcard__used {
  position: absolute; left: 0; right: 0; top: 42%; text-align: center;
  font-family: var(--font-display); font-weight: 800; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2);
  text-shadow: 0 1px 6px rgb(0 0 0 / 0.9);
}
.bt-hcard__used + .bt-hcard__used { display: none; }
.bt-hcard__val {
  position: absolute; left: 50%; bottom: -11px; z-index: 2; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 3px; padding: 4px 8px 3px 6px; border-radius: 999px;
  background: var(--ink); color: var(--bg); box-shadow: 0 6px 14px -6px rgb(0 0 0 / 0.8);
  font-family: var(--font-display); font-weight: 800; font-size: 18px; line-height: 1;
}
.bt-hcard__val .ico { width: 13px; height: 13px; color: var(--signal); }
.bt-hcard__power {
  position: absolute; top: -7px; right: -7px; z-index: 2; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  box-shadow: 0 0 0 2px var(--bg);
}
.bt-hcard__power .ico { width: 14px; height: 14px; }
.bt-hcard__power.is-fou_rire { background: var(--t3); color: oklch(0.22 0.05 350); }
.bt-hcard__power.is-prestige { background: var(--t6); color: oklch(0.26 0.05 80); }
.bt-hint { min-height: 20px; margin-top: 6px; text-align: center; font-size: 13.5px; color: var(--ink-3); }

/* présentation */
.bt-intro {
  position: absolute; inset: 0; z-index: 6;
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr auto 1fr auto; justify-items: center; align-items: center; gap: 14px;
  padding: calc(var(--safe-t) + 60px) var(--gutter) calc(var(--safe-b) + 28px);
  background: radial-gradient(100% 70% at 50% 50%, oklch(0.2 0.035 262 / 0.97), oklch(0.1 0.015 262 / 0.98));
}
.bt-intro__id {
  display: flex; align-items: center; gap: 14px; width: min(100%, 360px); padding: 16px 18px; border-radius: 18px;
  background: var(--bg-elev); border: 1px solid var(--line); box-shadow: 0 24px 50px -24px rgb(0 0 0 / 0.9);
}
.bt-intro__id.is-them { align-self: end; }
.bt-intro__id.is-me { align-self: start; }
.bt-intro__id.is-pass { border-color: oklch(0.86 0.12 90 / 0.7); box-shadow: inset 0 0 0 1px oklch(0.86 0.12 90 / 0.3), 0 0 40px -14px oklch(0.86 0.12 90 / 0.7); }
.bt-intro__id > div { min-width: 0; }
.bt-intro__bot { display: grid; place-items: center; width: 50px; height: 44px; border-radius: 10px; background: var(--bg-elev-2); color: var(--ink-2); }
.bt-intro__bot .ico { width: 28px; height: 28px; }
.bt-intro__who { font-size: 11.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.bt-intro__name {
  font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 0.98; text-transform: uppercase; letter-spacing: 0.02em;
  text-wrap: balance; overflow-wrap: anywhere;
}
.bt-intro__meta { margin-top: 3px; font: 500 12.5px var(--font-mono); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-intro__vs { display: inline-grid; padding: 6px; border-radius: 16px; background: var(--sign-white); transform: rotate(-6deg); box-shadow: 0 20px 40px -16px rgb(0 0 0 / 0.8); }
.bt-intro__vs span {
  padding: 6px 22px 2px; border: 7px solid var(--signal); border-radius: 11px; color: var(--sign-ink);
  font-family: var(--font-display); font-weight: 800; font-size: 64px; line-height: 1;
}
.bt-intro__note { display: flex; gap: 8px; align-items: flex-start; max-width: 420px; color: var(--ink-2); font-size: 13.5px; text-align: center; justify-content: center; }
.bt-intro__note .ico { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--ink-3); }

/* fin */
.bt-end { position: absolute; inset: 0; top: calc(var(--safe-t) + 56px); z-index: 4; overflow-y: auto; overscroll-behavior: contain; }
.bt-end__inner { display: grid; justify-items: center; gap: 14px; max-width: 560px; margin: 0 auto; padding: 4px var(--gutter) calc(var(--safe-b) + 28px); text-align: center; }
.bt-end__kicker { font: 500 12.5px var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bt-end__sign { position: relative; display: inline-grid; padding: 7px; border-radius: 18px; background: var(--sign-white); box-shadow: 0 1px 0 rgb(255 255 255 / 0.4) inset, 0 24px 50px -18px rgb(0 0 0 / 0.85); transform: rotate(-2deg); }
.bt-end__sign span {
  padding: 8px 26px 3px; border: 8px solid var(--signal); border-radius: 12px; color: var(--sign-ink);
  font-family: var(--font-display); font-weight: 800; font-size: clamp(52px, 16vw, 92px); line-height: 1; letter-spacing: 0.02em; text-transform: uppercase; white-space: nowrap;
}
.bt-end__sign.is-lost { transform: rotate(2deg); }
.bt-end__sign.is-lost::after {
  content: ""; position: absolute; left: 8%; right: 8%; top: 50%; height: 12px; margin-top: -6px; border-radius: 6px;
  background: var(--signal); transform: rotate(-14deg); box-shadow: 0 0 0 3px var(--sign-white);
}
.bt-end__sign.is-draw span { border-color: var(--ink-3); }
.bt-end__score { display: flex; align-items: center; gap: 14px; font-family: var(--font-display); font-weight: 800; font-size: 60px; line-height: 1; }
.bt-end__score i { font-style: normal; color: var(--signal); }
.bt-end__sub { color: var(--ink-2); margin-top: -8px; }
.bt-end__gains { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; margin-top: 4px; }
.bt-gain {
  display: grid; align-content: start; gap: 4px; padding: 12px 10px; border-radius: 14px; text-align: left; min-width: 0;
  background: var(--bg-elev); border: 1px solid var(--line-soft); text-decoration: none;
}
.bt-gain.is-link { border-style: dashed; }
.bt-gain.is-link:hover { border-color: var(--ink-3); }
.bt-gain__k { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.bt-gain__v { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.bt-gain__v > b { font-family: var(--font-display); font-weight: 800; font-size: 32px; line-height: 1; font-variant-numeric: tabular-nums; }
.bt-gain__u { color: var(--ink-3); font-size: 13px; }
.bt-gain__s { font-size: 12px; color: var(--ink-3); line-height: 1.3; }
.bt-delta { font: 600 13px var(--font-mono); color: var(--ink-3); }
.bt-recap { display: grid; gap: 4px; width: 100%; margin: 4px 0 0; padding: 0; list-style: none; }
.bt-recap__row {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) auto minmax(0, 1fr) 24px; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 10px; background: var(--bg-elev); font-size: 13px;
}
.bt-recap__stat .ico, .bt-recap__mark .ico { width: 16px; height: 16px; color: var(--ink-3); }
.bt-recap__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.bt-recap__name.is-me { text-align: right; }
.bt-recap__name.is-them { text-align: left; }
.bt-recap__score { display: flex; gap: 5px; align-items: baseline; font-family: var(--font-display); font-weight: 800; font-size: 18px; }
.bt-recap__score i { font-style: normal; color: var(--ink-3); }
.bt-recap__row.is-me .bt-recap__score b:first-child { color: var(--signal-hi); }
.bt-recap__row.is-them .bt-recap__score b:last-child { color: var(--ink); }
.bt-recap__row.is-them .bt-recap__score b:first-child { color: var(--ink-3); }
.bt-recap__row.is-me .bt-recap__mark .ico { color: var(--signal-hi); }
.bt-end__actions { display: grid; gap: 10px; width: 100%; margin-top: 8px; }
.bt-end__energy { display: inline-flex; justify-content: center; align-items: center; gap: 5px; font: 500 12.5px var(--font-mono); color: var(--ink-3); }
.bt-end__energy .ico { width: 14px; height: 14px; color: var(--signal-hi); }
.bt-end__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

@media (max-height: 700px) {
  .bt-stat { --reel-h: 40px; }
  .bt-stat__item { font-size: 28px; }
  .bt-stat__item .ico { width: 22px; height: 22px; }
  .bt-val { font-size: 36px; min-height: 36px; }
  .bt-opp { padding-block: 5px; }
}
@media (min-width: 760px) {
  .bt-hand { gap: 14px; }
  .bt-stat { --reel-h: 58px; }
  .bt-stat__item { font-size: 44px; }
  .bt-stat__item .ico { width: 34px; height: 34px; }
  .bt-duel { column-gap: 72px; }
  .bt-val { font-size: 56px; min-height: 56px; }
  .bt-vs { width: 52px; height: 52px; font-size: 19px; }
  .bt-hcard__val { font-size: 22px; }
  .bt-end__gains { gap: 12px; }
}

/* ==========================================================================
   GUERRE DES DÉPARTEMENTS
   ========================================================================== */
.war-load { display: grid; gap: 14px; }
.war-hero { display: grid; gap: 22px; align-items: end; }
.war-hero__clock { display: grid; gap: 10px; }
.war-cd__k { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-3); }
.war-cd__k .ico { width: 16px; height: 16px; color: var(--signal-hi); }
.war-cd { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; max-width: 460px; }
.war-cd__u { display: grid; justify-items: center; gap: 6px; }
.war-cd__u b {
  position: relative; display: grid; place-items: center; width: 100%; padding: 10px 0 8px; border-radius: 12px;
  background: linear-gradient(180deg, oklch(0.24 0.016 262) 50%, oklch(0.21 0.016 262) 50%);
  box-shadow: inset 0 0 0 1px var(--line-soft), 0 12px 24px -14px rgb(0 0 0 / 0.8);
  font-family: var(--font-display); font-weight: 800; font-size: clamp(36px, 10vw, 54px); line-height: 1; font-variant-numeric: tabular-nums;
}
.war-cd__u b::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgb(0 0 0 / 0.45); }
.war-cd__u span { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.war-cd.is-hot b { color: var(--signal-hi); animation: fb-pulse 1s var(--ease-in-out) infinite; }
.war-cd.is-over b { color: var(--ink-3); }
.war-cd__note { font-size: 13.5px; color: var(--ink-2); min-height: 0; }
.war-cd__note:empty { display: none; }

.war-mine {
  display: grid; gap: 14px; margin-top: 26px; padding: 16px 18px; border-radius: 18px;
  background: linear-gradient(160deg, var(--bg-elev-2), var(--bg-elev)); border: 1px solid var(--line);
}
.war-mine.is-lead { border-color: oklch(0.86 0.12 90 / 0.55); box-shadow: 0 0 40px -18px oklch(0.86 0.12 90 / 0.6); }
.war-mine.is-none { grid-template-columns: auto minmax(0, 1fr); align-items: center; border-style: dashed; }
.war-mine.is-none .btn { grid-column: 1 / -1; justify-self: start; }
.war-mine.is-none h2 { font-family: var(--font-display); font-weight: 700; font-size: 24px; line-height: 1.1; }
.war-mine.is-none p { color: var(--ink-2); font-size: 14px; }
.war-mine__ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: color-mix(in srgb, var(--signal) 18%, var(--bg-elev-2)); color: var(--signal-hi); }
.war-mine__ico .ico { width: 26px; height: 26px; }
.war-mine__id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.war-mine__id > div { min-width: 0; }
.war-mine__k { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--signal-hi); }
.war-mine__name { font-family: var(--font-display); font-weight: 700; font-size: 28px; line-height: 1.05; overflow-wrap: anywhere; }
.war-mine__nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.war-mine__nums div { padding: 10px 12px; border-radius: 12px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-soft); min-width: 0; }
.war-mine__nums dt { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.war-mine__nums dd { margin: 2px 0 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 4px; font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.war-mine__nums small { font-family: var(--font-ui); font-weight: 500; font-size: 12px; color: var(--ink-3); }
.war-mine__rank { display: inline-block; }
.war-move { font: 600 12px var(--font-mono); }
.war-mine__note { color: var(--ink-2); font-size: 14px; }

.war-grid { display: grid; gap: 0 32px; }
.war-col { min-width: 0; }
.war-map { position: relative; margin-top: 24px; padding: 14px; }
.war-map__box { position: relative; }
.war-svg { width: 100%; height: auto; overflow: visible; touch-action: manipulation; }
.war-dep {
  stroke: var(--bg); stroke-width: 0.8; vector-effect: non-scaling-stroke; stroke-linejoin: round; cursor: pointer;
  transition: fill 0.8s var(--ease), filter 0.2s;
}
.war-dep.is-hover { filter: brightness(1.3); }
.war-dep.is-mine { stroke: var(--ink); stroke-width: 1.8; }
.war-dep.is-lead { stroke: var(--t6); stroke-width: 2; }
.war-dep.is-sel { stroke: var(--ink); stroke-width: 2.6; filter: brightness(1.25); }
.war-inset { fill: none; stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.war-mark circle { stroke: var(--bg); stroke-width: 3; }
.war-mark text { font-family: var(--font-display); font-weight: 800; font-size: 22px; fill: oklch(0.2 0.02 262); pointer-events: none; }
.war-mark.is-1 circle { fill: var(--t6); }
.war-mark.is-2 circle { fill: oklch(0.86 0.01 262); }
.war-mark.is-3 circle { fill: var(--t5); }
.war-mark { pointer-events: none; }
.war-tip {
  position: absolute; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px;
  border-radius: 12px; background: oklch(0.12 0.01 262 / 0.94); border: 1px solid var(--line); box-shadow: 0 12px 30px -12px rgb(0 0 0 / 0.8);
  pointer-events: none; opacity: 0; transform: translateY(6px); transition: opacity 0.18s, transform 0.18s var(--ease);
  white-space: nowrap;
}
.war-tip.is-on { opacity: 1; transform: none; }
.war-tip__name { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.war-tip__mine { padding: 1px 6px; border-radius: 999px; background: var(--signal); color: var(--on-signal); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.war-tip__meta { font: 500 12.5px var(--font-mono); color: var(--ink-3); }
.war-tip__meta b { color: var(--ink); }
.war-map__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 2px 0; font-size: 12.5px; color: var(--ink-3); }
.war-legend { display: flex; align-items: center; gap: 8px; font: 500 12px var(--font-mono); }
.war-legend i { width: 110px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, oklch(0.31 0.07 27), oklch(0.48 0.14 28), oklch(0.65 0.21 29)); }

.war-last {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px; margin-top: 14px;
  padding: 14px 16px; border-radius: 16px; background: var(--bg-elev); border: 1px solid var(--line-soft);
}
.war-last__ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: oklch(0.86 0.12 90 / 0.14); color: oklch(0.88 0.11 90); }
.war-last__ico .ico { width: 24px; height: 24px; }
.war-last__k { font-size: 12px; color: var(--ink-3); }
.war-last__t { font-weight: 600; }
.war-last__t span { font-weight: 400; color: var(--ink-2); }

.war-board { margin-top: 32px; }
.war-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 8px; margin-bottom: 16px; }
.war-podium > .fb-empty { grid-column: 1 / -1; }
.war-step {
  display: grid; justify-items: center; gap: 6px; min-width: 0; padding: 0; border: 0; background: none; color: var(--ink); text-align: center;
  -webkit-tap-highlight-color: transparent;
}
.war-step__medal {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  font-family: var(--font-display); font-weight: 800; font-size: 17px; color: oklch(0.22 0.03 262);
}
.war-step.is-1 .war-step__medal { background: var(--t6); box-shadow: 0 0 22px -4px var(--t6); }
.war-step.is-2 .war-step__medal { background: oklch(0.86 0.01 262); }
.war-step.is-3 .war-step__medal { background: var(--t5); }
.war-step__name { max-width: 100%; font-weight: 600; font-size: 13.5px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.war-step__pts { font-family: var(--font-display); font-weight: 800; font-size: 22px; line-height: 1; }
.war-step__pts small { font-family: var(--font-ui); font-size: 11.5px; font-weight: 500; color: var(--ink-3); }
.war-step__block {
  display: grid; place-items: start center; width: 100%; padding-top: 8px; border-radius: 12px 12px 4px 4px;
  font-family: var(--font-display); font-weight: 700; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: rgb(0 0 0 / 0.45);
}
.war-step.is-1 .war-step__block { height: 84px; background: linear-gradient(180deg, var(--t6), oklch(0.7 0.12 85)); }
.war-step.is-2 .war-step__block { height: 60px; background: linear-gradient(180deg, oklch(0.86 0.01 262), oklch(0.66 0.012 262)); }
.war-step.is-3 .war-step__block { height: 44px; background: linear-gradient(180deg, var(--t5), oklch(0.6 0.13 55)); }
.war-step.is-mine .war-step__name { color: var(--signal-hi); }
.war-step:hover .war-step__block { filter: brightness(1.08); }
.war-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.war-row {
  display: grid; grid-template-columns: 34px auto minmax(0, 1fr) minmax(28px, 70px) 44px; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 12px; background: var(--bg-elev); border: 1px solid transparent; cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}
.war-row:hover { border-color: var(--line); }
.war-row.is-mine { border-color: color-mix(in srgb, var(--signal) 60%, transparent); background: color-mix(in srgb, var(--signal) 9%, var(--bg-elev)); }
.war-row.is-gap { display: block; padding: 0; text-align: center; background: none; color: var(--ink-3); cursor: default; }
.war-row__rank { font: 600 13px var(--font-mono); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.war-row.is-1 .war-row__rank { color: var(--t6); }
.war-row.is-2 .war-row__rank { color: oklch(0.86 0.01 262); }
.war-row.is-3 .war-row__rank { color: var(--t5); }
.war-row__name { display: flex; align-items: center; gap: 6px; min-width: 0; font-weight: 500; font-size: 14px; }
.war-row__n { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.war-row__you { flex: none; padding: 1px 6px; border-radius: 999px; background: var(--signal); color: var(--on-signal); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; vertical-align: 1px; }
.war-row__bar { height: 4px; border-radius: 2px; background: var(--bg); overflow: hidden; }
.war-row__bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--signal-lo), var(--signal-hi)); transition: width 0.8s var(--ease); }
.war-row__pts { text-align: right; font-weight: 600; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.war-more { display: flex; margin: 12px auto 0; }
@media (max-width: 420px) {
  .war-row { grid-template-columns: 30px auto minmax(0, 1fr) 44px; }
  .war-row__bar { display: none; }
}

.war-how { margin-top: 36px; }
.war-ways { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.war-way {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: 14px; background: var(--bg-elev); border: 1px solid var(--line-soft);
}
.war-way__n { font-family: var(--font-display); font-weight: 800; font-size: 38px; line-height: 1; color: var(--signal-hi); text-align: center; }
.war-way__what { display: flex; align-items: center; gap: 7px; font-weight: 600; }
.war-way__what .ico { width: 18px; height: 18px; color: var(--ink-3); }
.war-way__sub { font-size: 13px; color: var(--ink-3); }
.war-way__go { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--ink-3); }
.war-way__go:hover { color: var(--ink); background: var(--bg-elev-2); }
.war-prize {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; margin-top: 12px; padding: 16px;
  border-radius: 16px; border: 1px solid oklch(0.8 0.09 85 / 0.35);
  background:
    repeating-radial-gradient(circle at 100% 0%, transparent 0 12px, oklch(0.8 0.09 85 / 0.06) 12px 13px),
    linear-gradient(160deg, oklch(0.26 0.035 262), oklch(0.2 0.025 262));
}
.war-prize__ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: oklch(0.86 0.12 90 / 0.16); color: oklch(0.88 0.11 90); }
.war-prize__ico .ico { width: 26px; height: 26px; }
.war-prize h3 { font-size: 16px; font-weight: 600; line-height: 1.3; }
.war-prize p { margin-top: 4px; font-size: 13.5px; color: var(--ink-2); }

@media (min-width: 900px) {
  .war-hero { grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr); gap: 40px; }
  .war-mine { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: center; column-gap: 28px; }
  .war-mine__note { grid-column: 1 / -1; }
  .war-mine.is-none { grid-template-columns: auto minmax(0, 1fr) auto; }
  .war-mine.is-none .btn { grid-column: auto; }
  .war-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
  .war-col--map { position: sticky; top: calc(var(--topbar-h) + 16px); }
}

/* ==========================================================================
   BOUTIQUE
   ========================================================================== */
.shop-hero__links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 14px; }
.shop-banner {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; margin-top: 24px;
  padding: 16px 18px; border-radius: 16px; border: 1px solid oklch(0.86 0.12 90 / 0.4); background: oklch(0.86 0.12 90 / 0.07);
}
.shop-banner__ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: oklch(0.86 0.12 90 / 0.15); color: oklch(0.88 0.11 90); }
.shop-banner__t { font-weight: 600; color: oklch(0.9 0.1 90); }
.shop-banner p { font-size: 14px; color: var(--ink-2); }
.shop-banner p .ico { display: inline; vertical-align: -3px; width: 16px; height: 16px; margin-right: 4px; }

.shop-offers { display: grid; gap: 12px; }
.shop-offer {
  position: relative; display: grid; grid-template-columns: 88px minmax(0, 1fr) auto;
  grid-template-areas: "art t price" "art unit unit" "btn btn btn";
  align-items: center; gap: 2px 14px; padding: 18px 16px 16px; border-radius: 18px;
  background: var(--bg-elev); border: 1px solid var(--line-soft);
}
.shop-offer.is-best { border-color: color-mix(in srgb, var(--signal) 55%, var(--line)); background: linear-gradient(160deg, color-mix(in srgb, var(--signal) 9%, var(--bg-elev)), var(--bg-elev)); }
.shop-offer__flag {
  position: absolute; top: -10px; right: 14px; padding: 4px 10px; border-radius: 999px;
  background: var(--signal); color: var(--on-signal); font-size: 11.5px; font-weight: 700; letter-spacing: 0.02em;
}
.shop-offer .fb-packs { grid-area: art; }
.shop-offer__t { grid-area: t; font-family: var(--font-display); font-weight: 700; font-size: 26px; line-height: 1.05; }
.shop-offer__price { grid-area: price; font-family: var(--font-display); font-weight: 800; font-size: 28px; line-height: 1; white-space: nowrap; }
.shop-offer__unit { grid-area: unit; font-size: 13.5px; color: var(--ink-3); }
.shop-offer .btn { grid-area: btn; margin-top: 14px; }

.shop-duo { display: grid; gap: 0 16px; }
.shop-card { padding: 20px 18px; border-radius: 22px; background: var(--bg-elev); border: 1px solid var(--line-soft); }
.shop-duo .shop-card { margin-top: 16px; }
.shop-duo .shop-card:first-child { margin-top: 44px; }
.shop-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.shop-card__price { font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 1; white-space: nowrap; }
.shop-card__price small { font-family: var(--font-ui); font-size: 13px; font-weight: 500; color: var(--ink-3); }
.shop-card > .fb-sec__lead { margin-bottom: 16px; }
.shop-card .btn--block { margin-top: 14px; }
.shop-card .fineprint { margin-top: 12px; }
.shop-dept { display: grid; align-content: start; }
.shop-dept__art { display: grid; place-items: center; height: 150px; margin: 0 0 12px; border-radius: 16px; background: radial-gradient(closest-side, oklch(0.42 0.16 262 / 0.3), transparent 80%), var(--bg); }
.shop-dept__art .fb-packs { width: 110px; height: 124px; }
.shop-dept__art .fb-pack { width: 76px; margin-left: -38px; }
.shop-dept .fb-select { width: 100%; }
.shop-dept__info { margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.shop-pass {
  border-color: oklch(0.8 0.09 85 / 0.4);
  background:
    repeating-radial-gradient(circle at 100% 0%, transparent 0 12px, oklch(0.8 0.09 85 / 0.07) 12px 13px),
    linear-gradient(160deg, oklch(0.28 0.045 262), oklch(0.2 0.03 262));
}
.shop-pass__crown { color: oklch(0.88 0.11 90); }
.shop-pass .shop-card__price { color: oklch(0.88 0.11 90); }
.shop-pass__state { min-height: 0; margin: 10px 0 2px; }
.shop-pass__on { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: oklch(0.86 0.12 90 / 0.16); color: oklch(0.9 0.1 90); font-size: 13.5px; font-weight: 600; }
.shop-pass__on .ico { width: 16px; height: 16px; }
.shop-pass__off { font-size: 13.5px; color: var(--ink-3); }
.shop-perks { display: grid; gap: 12px; margin: 14px 0 0; padding: 0; list-style: none; }
.shop-perks li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; }
.shop-perks .ico { width: 20px; height: 20px; margin-top: 1px; color: oklch(0.86 0.12 90); }
.shop-perks b { display: block; font-weight: 600; }
.shop-perks span { color: var(--ink-2); font-size: 14px; }

/* parrainage */
.sp {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px;
  grid-template-areas: "search" "name" "preview" "status" "go";
}
.sp-search { grid-area: search; }
.sp-namef { grid-area: name; }
.sp-preview { grid-area: preview; min-width: 0; }
.sp-status { grid-area: status; }
.sp-go { grid-area: go; align-self: start; white-space: normal; text-align: center; height: auto; padding-block: 10px; line-height: 1.25; }
.sp.is-compact { grid-template-areas: "preview" "name" "status" "go"; }
@media (max-width: 899px) { .sp-preview:has(.sp-preview__empty) { display: none; } }
.sp-search .results { margin-top: 6px; }
.sp-results:empty { display: none; }
.sp-none { padding: 10px 4px; color: var(--ink-3); font-size: 14px; }
.field__box.is-plain .input { padding-left: 16px; }
.sp-name { font-weight: 600; }
.field__help.is-bad { color: oklch(0.75 0.14 28); }
.sp-status { display: flex; align-items: flex-start; gap: 8px; min-height: 22px; font-size: 14px; color: var(--ink-3); }
.sp-status:empty { display: none; }
.sp-status .ico { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.sp-status.is-free { color: oklch(0.82 0.13 152); }
.sp-status.is-taken { color: oklch(0.76 0.14 28); }
.sp-status.is-held { color: oklch(0.88 0.11 90); }
.sp-dot { width: 9px; height: 9px; margin: 6px 4px 0 3px; border-radius: 50%; background: var(--ink-3); animation: fb-pulse 0.8s infinite; flex: none; }
.sp-preview { display: grid; justify-items: center; align-content: start; gap: 12px; }
.sp-preview__card { width: min(64vw, 240px); }
.sp-preview__ribbon {
  display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 6px 14px; border-radius: 999px;
  background: oklch(0.86 0.12 90 / 0.14); color: oklch(0.9 0.1 90); border: 1px solid oklch(0.86 0.12 90 / 0.35);
  font-size: 13.5px;
}
.sp-preview__ribbon span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-preview__ribbon .ico { width: 16px; height: 16px; flex: none; }
.sp-preview__empty {
  display: grid; justify-items: center; align-content: center; gap: 10px; width: min(64vw, 240px); aspect-ratio: 63 / 88;
  border-radius: 12px; border: 1.5px dashed var(--line); color: var(--ink-3); text-align: center; padding: 20px; font-size: 14px;
}
.sp-preview__empty .ico { width: 30px; height: 30px; }
.sp.is-compact .sp-preview__card { width: min(52vw, 200px); }
.sheet--sponsor .sheet__panel { max-width: 620px; }
.sp-sheet { display: grid; gap: 16px; }
.sp-sheet__lead { color: var(--ink-2); }
.sp-sheet__lead b { color: var(--ink); }

.shop-promise__list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.shop-promise__list li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--bg-elev); border: 1px solid var(--line-soft); }
.shop-promise__list .ico { width: 22px; height: 22px; color: var(--signal-hi); margin-top: 1px; }
.shop-promise__list b { font-weight: 600; }
.shop-promise__list p { color: var(--ink-2); font-size: 14px; }
.shop-legal { margin-top: 16px; }
.shop-legal a { color: var(--ink-2); }

@media (min-width: 760px) {
  .shop-offers { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .shop-offer { grid-template-columns: minmax(0, 1fr); grid-template-areas: "art" "t" "price" "unit" "btn"; justify-items: center; text-align: center; gap: 6px; padding: 26px 20px 20px; }
  .shop-offer .fb-packs { width: 120px; height: 120px; margin-bottom: 8px; }
  .shop-offer .fb-pack { width: 62px; margin-left: -31px; }
  .shop-offer__price { font-size: 40px; margin-top: 4px; }
  .shop-offer .btn { justify-self: stretch; }
  .shop-promise__list { grid-template-columns: 1fr 1fr; }
  .shop-card { padding: 24px; }
}
@media (min-width: 900px) {
  .shop-duo { grid-template-columns: 1fr 1fr; align-items: stretch; }
  .shop-duo .shop-card { margin-top: 44px; }
  .sp {
    grid-template-columns: minmax(0, 1fr) 260px; grid-template-rows: auto auto auto 1fr; column-gap: 32px;
    grid-template-areas: "search preview" "name preview" "status preview" "go preview";
  }
  .sp.is-compact { grid-template-columns: minmax(0, 1fr) 200px; grid-template-rows: auto auto 1fr; grid-template-areas: "name preview" "status preview" "go preview"; }
}

/* feuille de paiement */
.sheet--checkout .sheet__panel { max-width: 480px; }
.co { display: grid; gap: 16px; color: var(--ink-2); }
.co-item { display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: center; gap: 14px; padding: 12px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line-soft); }
.co-item__art { display: grid; place-items: center; min-height: 72px; }
.co-item__t { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.co-item__d { font-size: 13.5px; color: var(--ink-3); overflow-wrap: anywhere; }
.co-crown { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: oklch(0.86 0.12 90 / 0.16); color: oklch(0.88 0.11 90); }
.co-crown .ico { width: 32px; height: 32px; }
.co-card { width: 52px; }
.co-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.co-price b { font-family: var(--font-display); font-weight: 800; font-size: 44px; line-height: 1; color: var(--ink); }
.co-price span { font-size: 12.5px; color: var(--ink-3); }
.co-cap { display: grid; gap: 6px; font-size: 13px; color: var(--ink-3); }
.co-cap__bar { display: flex; height: 5px; border-radius: 3px; background: var(--bg); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line-soft); }
.co-cap__bar i { display: block; height: 100%; background: var(--ink-3); }
.co-cap__bar i.is-new { background: var(--signal-hi); }
.co-check {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start;
  padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-elev-2); color: var(--ink); cursor: pointer; font-size: 14.5px; line-height: 1.4;
}
.co-check__box { position: absolute; opacity: 0; width: 24px; height: 24px; margin: 0; left: 14px; top: 14px; }
.co-check__ui {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--ink-3); color: transparent;
  transition: background-color 0.15s, border-color 0.15s;
}
.co-check__ui .ico { width: 16px; height: 16px; }
.co-check__box:checked + .co-check__ui { background: var(--signal); border-color: var(--signal); color: var(--on-signal); }
.co-check__box:focus-visible + .co-check__ui { outline: 2px solid var(--ink); outline-offset: 3px; }
.co-check:has(.co-check__box:checked) { border-color: color-mix(in srgb, var(--signal) 60%, var(--line)); }
.co-fine { font-size: 12.5px; color: var(--ink-3); }
.co-fine a { color: var(--ink-2); }
.co-err { font-size: 14px; color: oklch(0.78 0.14 28); }
.co-err:empty { display: none; }
.co-secure { display: flex; justify-content: center; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-3); }
.co-secure .ico { width: 14px; height: 14px; }

/* livraison après paiement */
.dv {
  position: fixed; inset: 0; z-index: 55; display: grid; place-items: center; overflow: hidden;
  padding: calc(var(--safe-t) + 24px) var(--gutter) calc(var(--safe-b) + 24px);
}
.dv:focus { outline: none; }
.dv__bg { position: absolute; inset: 0; background: radial-gradient(110% 80% at 50% 40%, oklch(0.23 0.04 262), oklch(0.1 0.015 262) 75%); }
.dv.is-gold .dv__bg { background: radial-gradient(110% 80% at 50% 38%, oklch(0.3 0.06 80), oklch(0.12 0.02 262) 72%); }
.dv__rays {
  position: absolute; left: 50%; top: 38%; width: 180vmax; height: 180vmax; margin: -90vmax 0 0 -90vmax;
  background: repeating-conic-gradient(from 0deg, oklch(0.86 0.14 92 / 0.16) 0 6deg, transparent 6deg 18deg);
  -webkit-mask: radial-gradient(closest-side, #000 6%, transparent 60%); mask: radial-gradient(closest-side, #000 6%, transparent 60%);
  opacity: 0; pointer-events: none;
}
.dv__fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.dv__inner { position: relative; z-index: 2; display: grid; justify-items: center; gap: 12px; width: min(100%, 460px); text-align: center; }
.dv__art { position: relative; display: grid; place-items: center; width: 100%; height: min(46dvh, 340px); }
.dv__title { font-family: var(--font-display); font-weight: 800; font-size: clamp(34px, 9vw, 48px); line-height: 1; text-wrap: balance; }
.dv__text { color: var(--ink-2); max-width: 40ch; text-wrap: pretty; }
.dv__actions { display: grid; gap: 10px; width: 100%; margin-top: 10px; }
.dv__actions:empty { display: none; }
.dv-wait .fb-pack { position: relative; left: auto; margin: 0; width: 120px; transform: none; }
.dv-icon { display: grid; place-items: center; width: 96px; height: 96px; border-radius: 50%; background: var(--bg-elev-2); color: var(--ink-2); }
.dv-icon .ico { width: 48px; height: 48px; }
.dv-wallet { position: absolute; left: 50%; bottom: 6%; width: 210px; height: 136px; margin-left: -105px; transform-origin: 50% 100%; }
.dv-wallet__back {
  position: absolute; inset: 18px 0 0; border-radius: 20px;
  background: linear-gradient(180deg, oklch(0.24 0.03 262), oklch(0.19 0.025 262));
  box-shadow: inset 0 0 0 1px oklch(0.36 0.03 262), 0 30px 50px -20px rgb(0 0 0 / 0.9);
}
.dv-rain { position: absolute; left: 0; right: 0; bottom: 34px; height: 0; z-index: 1; }
.dv-rain .fb-pack {
  left: 50%; bottom: 0; width: 64px; margin-left: -32px;
  transform: none; translate: var(--x, 0) 0; rotate: var(--r, 0deg);
}
.dv-wallet__front {
  position: absolute; left: -6px; right: -6px; bottom: 0; height: 92px; z-index: 2;
  display: grid; place-items: center; border-radius: 16px 16px 22px 22px;
  background: linear-gradient(180deg, oklch(0.33 0.04 262), oklch(0.25 0.03 262));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.12), inset 0 0 0 1px oklch(0.4 0.03 262), 0 -10px 24px -10px rgb(0 0 0 / 0.8);
}
.dv-wallet__stitch { position: absolute; inset: 8px; border: 2px dashed oklch(0.8 0.09 85 / 0.45); border-radius: 12px; pointer-events: none; }
.dv-wallet__n {
  position: relative; display: inline-block;
  padding: 5px 16px 3px; border-radius: 999px; background: var(--signal); color: var(--on-signal);
  font-family: var(--font-display); font-weight: 800; font-size: 32px; line-height: 1.05; font-variant-numeric: tabular-nums;
  box-shadow: 0 10px 20px -10px var(--signal);
}
.dv-drop .fb-pack.is-big, .dv-drop .fb-pack { position: relative; left: auto; bottom: auto; margin: 0; width: 150px; transform: none; }
.dv-crown { position: relative; z-index: 2; display: grid; place-items: center; color: oklch(0.88 0.12 90); }
.dv-crown .ico { width: 150px; height: 150px; filter: drop-shadow(0 0 30px oklch(0.86 0.14 92 / 0.6)); }
.dv-ring {
  position: absolute; width: 230px; height: 230px; border-radius: 50%;
  border: 3px solid oklch(0.86 0.12 90 / 0.8); box-shadow: 0 0 60px -10px oklch(0.86 0.14 92 / 0.8), inset 0 0 40px -10px oklch(0.86 0.14 92 / 0.6);
}
.dv-card { position: relative; width: min(56vw, 220px); }
.dv-stamp {
  position: absolute; right: -14%; bottom: 14%; z-index: 4;
  display: grid; justify-items: center; gap: 2px; max-width: 120%; padding: 10px 16px 8px; border-radius: 12px;
  border: 4px solid var(--signal); background: rgb(255 255 255 / 0.92); color: var(--signal-lo);
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / 0.9), inset 0 0 0 4px var(--signal), 0 18px 34px -16px rgb(0 0 0 / 0.8);
  transform: rotate(-12deg);
  font-family: var(--font-display); text-transform: uppercase; text-align: center;
}
.dv-stamp small { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; }
.dv-stamp b { font-size: 26px; font-weight: 800; line-height: 1; max-width: 220px; overflow-wrap: anywhere; }
@media (min-width: 640px) { .dv__actions { grid-template-columns: 1fr 1fr; } .dv__actions > :only-child { grid-column: 1 / -1; } }

/* ==========================================================================
   CLASSEMENTS
   ========================================================================== */
.lb.fb--pad { max-width: 920px; }
.lb-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 24px; }
.lb-scope { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.lb-scope .fb-select { min-width: 220px; }
.lb-mine { margin-top: 16px; }
.lb-mine:empty { display: none; }
.lb-you {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 12px 16px; border-radius: 14px;
  background: color-mix(in srgb, var(--signal) 9%, var(--bg-elev)); border: 1px solid color-mix(in srgb, var(--signal) 45%, var(--line-soft));
}
.lb-you.is-muted { background: var(--bg-elev); border-color: var(--line-soft); color: var(--ink-2); font-size: 14px; }
.lb-you__k { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--signal-hi); }
.lb-you__rank { font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 1; }
.lb-you__v { font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; }
.lb-you__hint { font-size: 13px; color: var(--ink-3); }
.lb-body { display: grid; gap: 6px; margin-top: 16px; }
.lb-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.lb-row {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto minmax(72px, auto); align-items: center; gap: 10px;
  min-height: 52px; padding: 8px 14px 8px 10px; border-radius: 12px; background: var(--bg-elev); border: 1px solid transparent;
}
.lb-row.is-top { min-height: 60px; }
.lb-row.is-me { border-color: color-mix(in srgb, var(--signal) 60%, transparent); background: color-mix(in srgb, var(--signal) 10%, var(--bg-elev)); }
.lb-row.is-pass .lb-row__name b { color: oklch(0.9 0.1 90); }
.lb-row__rank { text-align: center; font: 600 13.5px var(--font-mono); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.lb-medal {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  font-family: var(--font-display); font-weight: 800; font-size: 17px; color: oklch(0.22 0.03 262);
}
.lb-row.is-1 .lb-medal { background: var(--t6); box-shadow: 0 0 18px -4px var(--t6); }
.lb-row.is-2 .lb-medal { background: oklch(0.86 0.01 262); }
.lb-row.is-3 .lb-medal { background: var(--t5); }
.lb-row__name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.lb-row__name b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-row.is-top .lb-row__name b { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: 0.01em; }
.lb-row__crown { display: inline-flex; color: oklch(0.88 0.11 90); flex: none; }
.lb-row__crown .ico { width: 16px; height: 16px; }
.lb-row__you { flex: none; padding: 1px 7px; border-radius: 999px; background: var(--signal); color: var(--on-signal); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.lb-row__v { text-align: right; font-weight: 600; font-size: 15.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lb-row__v small { font-family: var(--font-ui); font-weight: 500; font-size: 12px; color: var(--ink-3); }
.lb-spgrid { display: grid; gap: 0 32px; }
.lb-spgrid .fb-sec:first-child { margin-top: 8px; }
.lb-sp { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.lb-sp__row {
  display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 14px; width: 100%;
  padding: 8px 12px 8px 8px; border-radius: 14px; border: 1px solid var(--line-soft); background: var(--bg-elev); text-align: left; color: var(--ink);
  transition: border-color 0.15s, background-color 0.15s;
}
.lb-sp__row:hover { border-color: var(--line); background: var(--bg-elev-2); }
.lb-sp__row > .ico { color: var(--ink-3); width: 18px; height: 18px; }
.lb-sp__card { width: 46px; }
.lb-sp__txt { display: grid; min-width: 0; }
.lb-sp__txt b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-sp__txt span { font-size: 13.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-sp__txt em { font-style: normal; color: oklch(0.9 0.1 90); font-weight: 600; }
.lb-sp__txt small { font-size: 12px; color: var(--ink-3); }
.lb-list--sp .lb-row { grid-template-columns: 40px minmax(0, 1fr) 0 auto; }
.lb-cta {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; margin-top: 16px;
  padding: 14px 16px; border-radius: 16px; text-decoration: none;
  border: 1px solid oklch(0.8 0.09 85 / 0.4);
  background: repeating-radial-gradient(circle at 100% 0%, transparent 0 12px, oklch(0.8 0.09 85 / 0.07) 12px 13px), linear-gradient(160deg, oklch(0.27 0.04 262), oklch(0.2 0.03 262));
}
.lb-cta:hover { border-color: oklch(0.86 0.12 90 / 0.7); }
.lb-cta__ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: oklch(0.86 0.12 90 / 0.16); color: oklch(0.88 0.11 90); }
.lb-cta__ico .ico { width: 24px; height: 24px; }
.lb-cta b { display: block; font-weight: 600; }
.lb-cta small { font-size: 13px; color: var(--ink-2); }
.lb-cta > .ico { color: var(--ink-3); }
@media (min-width: 900px) {
  .lb-spgrid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; }
  .lb-spgrid .fb-sec { margin-top: 8px; }
}
@media (max-width: 420px) {
  .lb-row { grid-template-columns: 34px minmax(0, 1fr) auto auto; gap: 8px; padding-right: 10px; }
  .lb-row__v small { display: none; }
}

/* ---------------------------------------------------------------- mouvement réduit */
@media (prefers-reduced-motion: reduce) {
  .bt-hand.is-open .bt-hcard:not(.is-used) .card { animation: none; }
  .war-cd.is-hot b, .ar-cta.is-busy, .sp-dot { animation: none; }
}
