/* Party-Mix V3 : mobile d'abord (320 px), puis tablette et ordinateur. */
:root {
  --bg: #14121f;
  --bg-2: #1d1a2c;
  --surface: #252138;
  --surface-2: #2f2a47;
  --line: #3b3558;
  --text: #f3f1fa;
  --muted: #b3acd0;
  --accent: #ffc94a;
  --accent-ink: #231a00;
  --ok: #5fd69b;
  --warn: #ffb35c;
  --danger: #ff7a85;
  --info: #8ab4ff;
  --radius: 14px;
  --tap: 44px;
  --topbar-h: 56px;
  --tabbar-h: 62px;
  --elec: #4f8cff;
  --violet: #8b5cf6;
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --gutter: max(16px, var(--safe-l));
  --gutter-r: max(16px, var(--safe-r));
  /* Palette réservée à l'interface extérieure. Les scènes gardent leurs variables. */
  --ui-night: #141126;
  --ui-base: #1c1833;
  --ui-panel: #25203f;
  --ui-raised: #30294e;
  --ui-accent: #b09aff;
  --ui-ink: #201632;
  --ui-faint: #aaa4c3;
  --ui-edge: rgba(255, 255, 255, .08);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; } /* l'attribut hidden l'emporte sur display des composants */
/* Aucune barre de défilement visible sur le site (demande de Simon) : le défilement reste possible au doigt, à la molette et au clavier. */
* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { display: none; width: 0; height: 0; }
.is-dragging { cursor: grabbing; user-select: none; -webkit-user-select: none; scroll-snap-type: none !important; }
.cc-piste { cursor: grab; }
.is-dragging * { pointer-events: none; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-size: 16px; /* ≥ 16 px : Safari iOS ne zoome pas sur les champs */
  line-height: 1.5;
  overflow-wrap: anywhere;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; overflow-wrap: break-word; }
h1 { font-size: 1.6rem; }
h1:focus { outline: none; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .75em; }
a { color: var(--info); }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: 8px; }
.skip-link:focus { top: 8px; }
.noscript { padding: 24px; }

/* ---------- En-tête ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px;
  min-height: calc(var(--topbar-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) var(--gutter-r) 0 var(--gutter);
  background: var(--ui-night);
  border-bottom: 1px solid rgba(223, 213, 255, .08);
}
.icon-btn {
  flex: none; display: inline-grid; place-items: center;
  width: var(--tap); height: var(--tap);
  border: 0; border-radius: 12px; background: transparent; color: var(--text);
  font-size: 1.35rem; cursor: pointer;
}
.icon-btn:hover { background: var(--surface); }
.icon-btn:disabled { opacity: .5; }
.burger, .burger::before, .burger::after { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; position: relative; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -6px; }
.burger::after { top: 6px; }
.topbar .menu-btn { border-radius: 12px; color: #d9d1e9; }
.menu .menu-fermer { background: rgba(255, 255, 255, .05); border-radius: 12px; }
.avatar-lien { justify-self: start; display: grid; place-items: center; min-width: var(--tap); min-height: var(--tap); border-radius: 50%; text-decoration: none; color: var(--text); }
.avatar-lien .avatar { width: 34px; height: 34px; background: #34294c; color: #e3d2ff; box-shadow: inset 0 0 0 1px rgba(221, 198, 255, .20); }
.logo { display: grid; place-items: center; min-width: 0; min-height: var(--tap); color: var(--text); text-decoration: none; text-align: center; }
.logo-img { display: block; width: auto; height: 40px; max-width: 100%; object-fit: contain; }
@media (max-width: 340px) { .logo-img { height: 36px; } }
.topbar-right { justify-self: end; display: flex; align-items: center; gap: 4px; min-width: 0; }
.solde { display: inline-flex; align-items: baseline; gap: 4px; padding: 4px 8px; border-radius: 9px; background: #242033; font-size: .875rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.solde-valeur { font-weight: 700; }
.solde-unite { color: #f2c35b; font-size: .8rem; font-weight: 800; }
.avatar { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); font-weight: 700; font-size: .85rem; }
.avatar-avec-cadre { position: relative; border-radius: 9px; overflow: hidden; }
.avatar.avatar-avec-cadre { background: transparent; box-shadow: none; }
.avatar-cadre { position: absolute; inset: 0; width: 100%; height: 100%; mix-blend-mode: lighten; }
.avatar-avec-cadre .avatar-initiales { position: relative; transform: translateY(-18%); color: #fff; font-size: .8em; }
.avatar-photo { display: none; width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: cover; border-radius: 50%; }
.avatar-photo.chargee { display: block; }
.avatar-photo.chargee ~ .avatar-initiales { display: none; }
.avatar-avec-cadre .avatar-photo { width: 54%; height: 54%; transform: translateY(-18%); }

/* ---------- Mise en page et menu ---------- */
.layout { position: relative; }
.outlet { display: block; padding: 20px var(--gutter-r) calc(var(--tabbar-h) + 28px + var(--safe-b)) var(--gutter); max-width: 1100px; margin: 0 auto; }
.outlet:focus { outline: none; }

.menu-cadre { position: fixed; inset: 0; z-index: 50; overflow: hidden; pointer-events: none; }
.menu {
  position: absolute; top: 0; bottom: 0; right: 0; pointer-events: auto;
  width: min(92vw, 360px);
  display: flex; flex-direction: column; gap: 6px;
  overflow-y: auto; overscroll-behavior: contain;
  padding: calc(8px + env(safe-area-inset-top, 0px)) max(14px, var(--safe-r)) calc(20px + var(--safe-b)) 14px;
  background: var(--ui-base); border-left: 1px solid var(--ui-edge);
  box-shadow: -8px 0 24px rgba(0, 0, 0, .24);
  transform: translateX(100%); visibility: hidden;
  transition: transform .2s ease-out, visibility 0s linear .2s;
}
.menu-open .menu { transform: none; visibility: visible; transition: transform .2s ease-out; }
.menu-overlay { position: fixed; inset: 0; z-index: 40; background: rgba(6, 5, 14, .6); animation: voile .2s ease-out; }
@keyframes voile { from { opacity: 0; } }
.menu-open { overflow: hidden; } /* pas de défilement de la page sous le panneau */
.menu-tete { display: flex; align-items: center; justify-content: space-between; min-height: var(--tap); }
.menu-marque { font-size: 1.15rem; font-weight: 650; color: var(--text); letter-spacing: -.02em; }
.menu-section { padding: 8px 0; border-bottom: 1px solid var(--ui-edge); }
.menu-title { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: #bcb5cb; margin: 0 4px 8px; }
.menu ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.menu-link { position: relative; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 10px; border-radius: 10px; color: var(--text); text-decoration: none; font-size: .9rem; line-height: 1.25; }
.menu-link:hover { background: rgba(255, 255, 255, .08); }
.menu-link[aria-current="page"] { background: #353047; box-shadow: inset 0 0 0 1px rgba(202, 185, 255, .22); color: #eee7ff; font-weight: 650; }
.menu-ico { display: grid; place-items: center; flex: 0 0 20px; font-size: 1rem; line-height: 1; }
.menu-nom { min-width: 0; overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
@media (max-width: 360px) { .menu-link { gap: 6px; padding: 6px 8px; font-size: .84rem; } }
.menu-bientot { position: absolute; top: -6px; right: 4px; padding: 1px 6px; border-radius: 999px; background: #302b3d; border: 1px solid rgba(255, 255, 255, .08); color: #c5bed3; font-size: .62rem; font-weight: 600; }
.menu-separe { margin-top: 4px; }
.menu-separe ul { grid-template-columns: 1fr; }
.menu-actualiser { align-self: start; margin-top: auto; min-height: var(--tap); padding: 0 12px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font: inherit; cursor: pointer; }
.menu-actualiser:hover { background: rgba(255, 255, 255, .06); }

/* Barre de navigation du bas : toujours visible, zone de sécurité respectée. */
.tabbar {
  position: fixed; z-index: 35; left: max(10px, var(--safe-l)); right: max(10px, var(--safe-r)); bottom: calc(4px + var(--safe-b));
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px;
  padding: 4px 6px;
  background: #211e30; border: 1px solid rgba(223, 213, 255, .16); border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .24);
}
.tab { position: relative; display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 48px; border-radius: 12px; color: #bbb2cc; text-decoration: none; font-size: .75rem; font-weight: 500; line-height: 1.2; }
.tab svg { position: relative; width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab[aria-current="page"] { color: #e4d1ff; font-weight: 650; }
.tab[aria-current="page"]::before { content: ""; position: absolute; top: 3px; left: 50%; width: 42px; height: 26px; transform: translateX(-50%); border-radius: 9px; background: #3d3056; }
@media (hover: hover) and (pointer: fine) {
  .tab:hover { color: var(--text); background: rgba(255, 255, 255, .07); }
}
.topbar .menu-btn:active, .menu-link:active, .tab:active { background: rgba(199, 181, 255, .18); }
@media (min-width: 900px) { .tabbar { left: 50%; right: auto; width: 480px; transform: translateX(-50%); bottom: 12px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 20px; padding-bottom: 4px; } }
/* Verre limité à la navigation basse, sans animation de filtre.
   Le fond opaque ci-dessus reste la solution par defaut si le filtre est indisponible. */
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .tabbar { background: rgba(33, 30, 48, .93); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
}
/* Respect des preferences de lisibilite, sans toucher aux animations des contenus. */
@media (prefers-reduced-transparency: reduce), (prefers-reduced-motion: reduce) {
  .tabbar { background: #211e30; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.menu-open .tabbar { background: #211e30; -webkit-backdrop-filter: none; backdrop-filter: none; }


/* ---------- Transitions ---------- */
.view { animation: view-in .18s ease-out; }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.nav-progress { position: fixed; top: 0; left: 0; z-index: 60; height: 3px; width: 0; background: var(--accent); opacity: 0; }
.is-navigating .nav-progress { opacity: 1; width: 70%; transition: width 1.2s ease-out .1s, opacity .1s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Interface generale : perimetre explicite, hors scenes TCG et jeux. */
.layout:has(> .outlet > .ui-page) { background: var(--ui-night); }
.ui-page > h1 { font-size: 1.625rem; font-weight: 700; letter-spacing: -.025em; margin-bottom: 16px; }
.ui-page .btn, .vg-actions .btn { min-height: 44px; border-radius: 12px; font-weight: 650; background: var(--ui-accent); color: var(--ui-ink); }
.ui-page .btn-secondary, .vg-actions .btn-secondary { background: var(--ui-raised); color: var(--text); }
.ui-page .btn:disabled, .ui-page .btn[aria-disabled="true"], .vg-actions .btn:disabled { background: var(--ui-panel); color: var(--ui-faint); }
.ui-page .btn:not(:disabled):not([aria-disabled="true"]):active { background: #9b85e7; color: var(--ui-ink); }
.ui-page .btn-secondary:not(:disabled):not([aria-disabled="true"]):active { background: #453a67; color: var(--text); }
.ui-page :is(.btn, .select, .cl-onglet, .pr-date):focus-visible, .topbar :focus-visible, .tabbar :focus-visible, .menu :focus-visible {
  outline: 2px solid var(--ui-accent); outline-offset: 2px;
}
.ui-page .item, .ui-page .tile, .ui-page .stat, .ui-page .state { background: var(--ui-base); border: 1px solid var(--ui-edge); border-radius: 16px; }
.ui-page .stat-value { font-weight: 650; }
@media (hover: hover) and (pointer: fine) {
  .ui-page .tile:hover { background-color: var(--ui-panel); }
  .ui-page .btn:not(:disabled):not([aria-disabled="true"]):hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
}
.ui-page .select { background: var(--ui-base); border-color: var(--ui-edge); font-size: 16px; }
.ui-page .notice { border-left-width: 2px; background: var(--ui-base); }
.ui-page .lead a, .ui-page .section > a:not(.btn) { color: #d2beff; font-weight: 600; text-underline-offset: .2em; }
.ui-page .chips .chip { min-height: 44px; }
.ui-page .chip:not([class*="chip-"])[aria-current="true"], .ui-page .chip:not([class*="chip-"])[aria-pressed="true"] { background: #d5c5f5; border-color: #d5c5f5; color: #231a35; }
.ui-page .profil-carte + .stats { gap: 1px; overflow: hidden; background: var(--ui-edge); border: 1px solid var(--ui-edge); border-radius: 16px; }
.ui-page .profil-carte + .stats .stat { border: 0; border-radius: 0; }
.ui-page .profil-carte + .stats .stat:first-child { background: var(--ui-raised); }

/* ---------- Composants ---------- */
.lead { color: var(--muted); }
.notice { padding: 12px 14px; border-radius: var(--radius); background: var(--surface); border-left: 4px solid var(--info); margin: 0 0 16px; color: var(--muted); }
.notice strong { color: var(--text); }
.section { margin: 24px 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: var(--tap); padding: 0 18px; border: 0; border-radius: 12px;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn-secondary { background: var(--surface-2); color: var(--text); }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .72rem; font-weight: 700; vertical-align: middle; white-space: nowrap; }
.badge-valide { background: rgba(95, 214, 155, .16); color: var(--ok); }
.badge-provisoire { background: rgba(255, 179, 92, .16); color: var(--warn); }
.badge-hypothese { background: rgba(255, 122, 133, .16); color: var(--danger); }
.badge-squelette { background: rgba(138, 180, 255, .16); color: var(--info); }
.badge-conserve { background: rgba(179, 172, 208, .18); color: var(--muted); }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; padding: 0; margin: 0; list-style: none; }
.tile { display: block; height: 100%; padding: 16px; border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; border: 1px solid transparent; }
.tile:hover { border-color: var(--line); background: var(--surface-2); }
.tile-title { display: block; font-weight: 700; margin-bottom: 4px; }
.tile-text { display: block; color: var(--muted); font-size: .9rem; }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.inventaire-produits { gap: 6px; }
.inventaire-produit {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--ui-edge);
  border-radius: 12px;
  background: var(--surface);
}
.inventaire-produit .pv { width: 48px; }
.inventaire-produit .pv.pv-img img { filter: none; }
.inventaire-produit-texte { display: grid; justify-items: start; gap: 2px; line-height: 1.25; }
.inventaire-produit-texte .carte-origine { margin-top: 0; }
.inventaire-produit-texte small { color: var(--muted); }
.inventaire-produit .btn { padding-inline: 10px; }
.item { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 14px; border-radius: var(--radius); background: var(--surface); }
.item-main { flex: 1 1 180px; min-width: 0; }
.item-title { font-weight: 700; display: block; }
.item-sub { color: var(--muted); font-size: .9rem; display: block; }
.item-side { margin-left: auto; text-align: right; font-variant-numeric: tabular-nums; }
.meter { display: block; margin: 6px 0 2px; width: 100%; height: 8px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--ok); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; margin: 0 0 8px; -webkit-overflow-scrolling: touch; }
.chip { flex: none; display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--text); text-decoration: none; white-space: nowrap; cursor: pointer; }
.chip[aria-current="true"], .chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
/* Cases de rareté aux couleurs officielles (palette du 04/11, teintes provisoires). */
.chip-C { --rc: #e2e1ea; } .chip-PCm { --rc: #8d8a9b; } .chip-R { --rc: #c27c3a; } .chip-UR { --rc: #3d8cf2; }
.chip-E { --rc: #a865e6; } .chip-L { --rc: #e7b53c; }
.chip[class*="chip-"] { border: 2px solid var(--rc); color: var(--rc); font-weight: 700; }
.chip[class*="chip-"][aria-current="true"] { background: var(--rc); border-color: var(--rc); color: #15121f; }
.chip.chip-S { border: 2px solid transparent; color: #f3f1fa; background: linear-gradient(var(--bg), var(--bg)) padding-box, linear-gradient(90deg, #ff6b9a, #ffd36b, #7dffb2, #6bd0ff, #b48bff) border-box; }
.chip.chip-S[aria-current="true"] { background: linear-gradient(90deg, #ff6b9a, #ffd36b, #7dffb2, #6bd0ff, #b48bff) border-box; color: #15121f; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin: 0 0 16px; }
.stat { padding: 10px 12px; border-radius: var(--radius); background: var(--surface); min-width: 0; }
.stat-value { display: block; font-size: 1.2rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat-label { display: block; color: var(--muted); font-size: .85rem; overflow-wrap: normal; hyphens: auto; -webkit-hyphens: auto; }


/* ---------- Ouverture ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.center { text-align: center; justify-content: center; }
.btn-big { min-height: 52px; padding: 0 28px; font-size: 1.05rem; }
.toggle { display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); color: var(--muted); cursor: pointer; }
.toggle input { width: 20px; height: 20px; accent-color: var(--accent); }
/* Commandes de la révélation : juste sous la carte, au-dessus de la barre du bas (voir --scene-reserve). */
.scene-controls { display: grid; gap: 4px; margin: 2px 0 4px; }
.scene-controls .actions { margin: 0; }
.scene-controls .btn { min-height: 40px; }
.scene-options {
  flex-wrap: nowrap; gap: 0 12px; justify-content: center;
}
.scene-options .toggle {
  gap: 6px; font-size: .86rem; white-space: nowrap; min-height: 36px;
}
.scene-options .toggle input { width: 18px; height: 18px; flex: 0 0 auto; }
@media (max-width: 360px) {
  .scene-options { gap: 0 8px; }
  .scene-options .toggle { gap: 4px; font-size: .78rem; }
}
.lot-label ~ .scene { --scene-reserve: 420px; }
.dore-banner {
  text-align: center; font-weight: 900; font-size: 1.4rem; color: var(--accent-ink);
  background: linear-gradient(90deg, #f7c548, #fff1b0, #f7c548); border-radius: var(--radius); padding: 10px; margin: 0 0 14px;
  animation: dore-in .5s ease-out;
}
@keyframes dore-in { from { transform: scale(.9); opacity: 0; } }
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation: none !important; transition: none !important; }
.product .item-sub { margin-top: 2px; }
.product .price { font-size: 1.1rem; white-space: nowrap; }
.buy-actions { width: 100%; margin: 4px 0 0; }
.buy-actions .btn { flex: 1 1 140px; }
.product > div[aria-live] { width: 100%; }
.notice.success { border-left-color: var(--ok); color: var(--text); }
.notice.error { border-left-color: var(--danger); color: var(--text); }
.diamant-banner { background: linear-gradient(90deg, #7fe7ff, #e8fbff, #7fe7ff); }
.rare-banner { background: linear-gradient(90deg, #ffc94a, #ff8fd1, #ffc94a); }
/* Ouverture groupée : progression en tête, commandes sous la scène, jamais sous la barre du bas (atteignables au pouce sur iPhone). */
.group-head { display: grid; gap: 6px; margin-bottom: 8px; }
.group-progress { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.group .lot-label { margin: 6px 0; color: var(--muted); }
.group .scene { --scene-reserve: 470px; }
.group-controls {
  position: sticky; bottom: calc(var(--tabbar-h) + var(--safe-b)); z-index: 5; margin: 4px calc(-1 * var(--gutter-r)) 0 calc(-1 * var(--gutter));
  padding: 8px var(--gutter-r) 8px var(--gutter);
  background: rgba(20, 18, 31, .96); border-top: 1px solid var(--line);
}
.group-controls .actions { margin: 4px 0; }
.group-controls .actions:has(.toggle) {
  flex-wrap: nowrap; gap: 0 12px; justify-content: center;
}
.group-controls .toggle { gap: 6px; font-size: .86rem; white-space: nowrap; min-height: 36px; }
.group-controls .toggle input { width: 18px; height: 18px; flex: 0 0 auto; }
.group-controls .btn { flex: 1 1 140px; }
.group-controls .notice { margin: 0 0 8px; }
@media (max-width: 360px) {
  .group-controls .actions:has(.toggle) { gap: 0 8px; }
  .group-controls .toggle { gap: 4px; font-size: .78rem; }
}
.dev-panel { padding: 14px; border: 1px dashed var(--warn); border-radius: var(--radius); }
.dev-panel h2 { color: var(--warn); }

.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; list-style: none; padding: 0; margin: 0; }
.slot { aspect-ratio: 5 / 7; border-radius: 12px; border: 2px dashed var(--line); display: grid; place-items: center; color: var(--muted); text-align: center; padding: 8px; font-size: .85rem; }

/* ---------- États ---------- */
.state { padding: 24px 16px; border-radius: var(--radius); background: var(--surface); text-align: center; }
.state-title { font-weight: 700; margin-bottom: 4px; }
.state-text { color: var(--muted); }
.state-error { border: 1px solid rgba(255, 122, 133, .4); }
.state-loading { display: grid; gap: 10px; text-align: left; }
.skeleton { height: 56px; border-radius: 12px; background: linear-gradient(90deg, var(--surface-2) 0%, #3a3456 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ---------- Notifications ---------- */
.toasts { position: fixed; z-index: 70; left: 50%; bottom: calc(var(--tabbar-h) + 12px + var(--safe-b)); /* au-dessus de la barre du bas */ transform: translateX(-50%); display: grid; gap: 8px; width: min(92vw, 360px); pointer-events: none; }
.toast { padding: 12px 16px; border-radius: 14px; background: var(--ui-raised); border: 1px solid var(--ui-edge); box-shadow: 0 4px 16px rgba(0, 0, 0, .2); text-align: center; }
.toast-error { background: #4a1f2a; }

.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: .92rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }

/* Fidélité */
.fid-gain { margin: 4px 0; color: var(--muted); font-weight: 700; }
.delta-plus { color: var(--ok); white-space: nowrap; }
.delta-moins { color: var(--danger); white-space: nowrap; }

/* Recyclage : catalogue paginé, actions secondaires repliées, aperçu autonome. */
.recy-packs { margin-bottom: 16px; }
.recy-packs-nav { display: flex; gap: 4px; }
.recy-packs-nav .btn { width: 44px; padding: 0; font-size: 1.3rem; }
.recy-solde { color: #d2beff; font-size: .85rem; font-variant-numeric: tabular-nums; }
.recy-aide-selection { margin: 8px 0 0; font-size: .82rem; }
.recy-tete { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 8px; margin-bottom: 8px; }
.recy-tete h2 { margin: 0; }
.recy-tete .btn { padding-inline: 12px; font-size: .85rem; }
.recy-auto { width: 100%; }
.recy-cartes { margin-top: 8px; padding-inline: 12px; border: 1px solid var(--ui-edge); border-radius: var(--radius); }
.recy-cartes > summary { min-height: 44px; padding-block: 10px; color: var(--text); font-weight: 700; cursor: pointer; }
.recy-cartes[open] { padding-bottom: 10px; }
.recy-filtres { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; scroll-margin-top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px) + 12px); }
.recy-filtres .select { width: 100%; min-width: 0; padding-inline: 8px; }
.recy-recherche { grid-column: 1 / -1; width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--ui-edge); border-radius: 12px; background: var(--ui-base); color: var(--text); font: inherit; font-size: 16px; }
.recy-pages { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0; color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.recy-pages .btn { min-width: 44px; padding: 0; font-size: 1.3rem; }
.recy-pages.page-unique .btn { display: none; }
.ui-page .recy-ligne { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 4px 10px; padding: 8px 12px; }
.recy-thumb { width: 42px; }
.recy-ligne .item-title { font-size: .9rem; line-height: 1.3; }
.recy-ligne .item-sub { font-size: .77rem; line-height: 1.4; }
.recy-commandes { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px; }
.recy-options[open] { flex: 1 1 100%; order: 1; }
.recy-options > summary { display: list-item; width: fit-content; min-height: 44px; padding: 10px 0; cursor: pointer; color: #d2beff; font-size: .82rem; }
.recy-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.recy-actions .btn { padding-inline: 10px; font-size: .8rem; }
.recy-stepper { display: inline-flex; align-items: center; gap: 4px; }
.recy-qte { min-width: 2ch; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.btn-small { padding: 0 12px; }
.recy-stepper .btn-small { min-width: var(--tap); padding: 0; font-size: 1.2rem; }
.ui-page .recy-unique:not(:has(.recy-options[open])) {
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 8px; padding: 6px 8px;
}
.recy-unique .recy-thumb { width: 36px; }
.recy-unique:not(:has(.recy-options[open])) .recy-commandes { grid-column: auto; gap: 0; }
.recy-unique .recy-options > summary, .ui-page .recy-choisir {
  display: grid; place-items: center; width: 44px; min-height: 44px; padding: 0; font-size: 1.1rem;
}
.recy-unique .recy-options > summary::-webkit-details-marker { display: none; }
.ui-page .recy-choisir[aria-pressed="true"] { background: var(--ui-accent); color: var(--ui-ink); }
.recy-barre {
  position: fixed; bottom: calc(var(--tabbar-h) + var(--safe-b) + 10px); z-index: 34;
  left: var(--gutter); right: var(--gutter-r); max-width: 560px; margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px;
  background: var(--ui-raised); border: 1px solid var(--ui-edge); border-radius: 14px; font-size: .84rem; font-weight: 650;
}
.recy-barre .btn { flex: none; padding-inline: 12px; font-size: .85rem; }
.recy-page:has(.recy-cartes[open] .recy-barre:not([hidden])) { padding-bottom: 72px; }
dialog.recy-apercu { position: fixed; inset: auto 0 0; width: min(100%, 620px); max-width: none; max-height: 86vh; max-height: 86dvh; margin: 0 auto; padding: 16px max(16px, var(--safe-r)) calc(16px + var(--safe-b)) max(16px, var(--safe-l)); border-radius: 20px 20px 0 0; background: var(--ui-panel); border: 1px solid var(--ui-edge); color: var(--text); }
.recy-apercu[open] { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; gap: 10px; }
.recy-apercu::backdrop { background: rgba(9, 7, 18, .72); }
.recy-apercu h2, .recy-total { margin: 0; }
.recy-total { color: #dccbff; font-weight: 750; }
.recy-apercu-detail { min-height: 0; max-height: 46vh; max-height: 46dvh; overflow-y: auto; overscroll-behavior: contain; }
.recy-apercu-liste .item { padding: 8px 10px; background: var(--ui-base); }
.recy-apercu-liste .recy-apercu-ligne { flex-wrap: nowrap; gap: 8px; }
.recy-apercu-ligne .recy-thumb { flex: 0 0 36px; }
.recy-apercu-ligne .item-main { min-width: 0; overflow-wrap: anywhere; }
.recy-retirer { flex: 0 0 44px; padding-inline: 0; font-size: 1.25rem; }
.recy-apercu-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.recy-apercu-actions .btn { padding: 4px 8px; font-size: .88rem; }
.check { display: flex; align-items: center; gap: 10px; min-height: var(--tap); margin-top: 8px; color: var(--text); font-weight: 700; cursor: pointer; }
.check input { width: 22px; height: 22px; }
@media (min-width: 720px) {
  .ui-page .recy-ligne { grid-template-columns: 42px minmax(0, 1fr) minmax(190px, auto); }
  .recy-commandes { grid-column: auto; gap: 8px; }
  .recy-barre { bottom: calc(var(--tabbar-h) + var(--safe-b) + 20px); }
  dialog.recy-apercu { inset: 0; margin: auto; border-radius: 20px; }
}

/* Valeur & Revente : filtre de finition, explication de la cote repliable. */
.select { min-height: var(--tap); max-width: 100%; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit; }
.vente-filtres { align-items: center; margin: 0 0 12px; }
.cote-info summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: var(--tap); cursor: pointer; }
.cote-info p { margin: 8px 0 0; }
.stats-2 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

/* Jeux d'Arcade (coque commune) : plateau à la largeur de l'écran, aucun geste du doigt ne fait défiler la page. */
.jeu-entete { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; margin-bottom: 8px; }
.jeu-entete:empty { display: none; }
.jeu-entete h1 { flex: 1; margin: 0; }
.jeu-entete > a { display: inline-flex; align-items: center; min-height: 44px; font-size: .82rem; }
.jeu { display: grid; gap: 10px; max-width: 440px; margin: 0 auto 8px; scroll-margin-top: calc(var(--topbar-h) + 8px); scroll-margin-bottom: 8px; }
/* Mobile : plateau + commandes + croix tiennent ensemble dans l'écran (aucun défilement pour jouer). */
.jeu-hud { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; color: var(--muted); }
.jeu-hud-score, .jeu-hud-record { display: grid; font-size: .8rem; line-height: 1.15; white-space: nowrap; }
.jeu-hud-record { text-align: right; }
.jeu-hud-actions { display: flex; gap: 6px; }
.jeu-mini { min-height: 40px; padding: 0 10px; font-size: .9rem; white-space: nowrap; }
@media (max-width: 359px) { .jeu-mini { min-width: 44px; padding: 0 8px; } .jeu-mini-txt { display: none; } }
.jeu-hud strong { color: var(--text); font-size: 1.15rem; }
.jeu-plateau { position: relative; width: 100%; aspect-ratio: var(--ratio, 1); border-radius: 14px; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; outline-offset: 3px; }
.jeu-canvas { display: block; width: 100%; height: 100%; }
.jeu-voile { position: absolute; inset: 0; display: grid; place-content: center; gap: 6px; padding: 16px; text-align: center; background: rgba(15, 13, 26, .78); }
.jeu-voile-titre { margin: 0; font-size: 1.6rem; font-weight: 900; }
.jeu-voile-texte { margin: 0 0 6px; color: var(--muted); }
.jeu-voile .actions { justify-content: center; }
.snake-croix { display: grid; grid-template-columns: repeat(3, 64px); grid-template-rows: repeat(2, 56px); gap: 8px; justify-content: center; touch-action: none; user-select: none; -webkit-user-select: none; }
.snake-dir { min-height: 56px; padding: 0; font-size: 1.3rem; touch-action: none; }
.snake-haut { grid-column: 2; grid-row: 1; }
.snake-gauche { grid-column: 1; grid-row: 2; }
.snake-bas { grid-column: 2; grid-row: 2; }
.snake-droite { grid-column: 3; grid-row: 2; }
@media (hover: hover) and (pointer: fine) { .jeu { max-width: max(260px, min(440px, calc(100vh - 150px))); } }
.jeu.sans-croix .snake-croix { display: none; } /* réglage « Touches directionnelles » */
/* Roue de réglages sur le plateau et panneau par-dessus le jeu. */
.jeu-roue { position: absolute; top: 6px; right: 6px; z-index: 3; width: var(--tap); height: var(--tap); border: 0; border-radius: 50%; background: rgba(15, 13, 26, .72); color: var(--text); font-size: 1.35rem; cursor: pointer; }
.jeu-reglages { position: absolute; inset: 0; z-index: 4; display: grid; align-content: center; gap: 8px; padding: 16px; background: rgba(15, 13, 26, .94); }
.jeu-switch { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: var(--tap); padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.jeu-switch { text-align: left; }
.jeu-switch-etat { flex: none; color: var(--muted); font-weight: 600; }
.jeu-switch[aria-checked="true"] { border-color: var(--ok); }
.jeu-switch[aria-checked="true"] .jeu-switch-etat { color: var(--ok); }
/* Course Dino : plateau large et bas, gros bouton Sauter sous le pouce. */
.jeu.large { max-width: 640px; }
.dino-saut { width: 100%; min-height: 64px; font-size: 1.2rem; touch-action: none; user-select: none; -webkit-user-select: none; }
.jeu.sans-bouton .dino-saut { display: none; }

.jeu-plateau.masque .jeu-voile { background: #15121f; } /* pause du Taquin : puzzle masqué */
.jeu-roue.compacte { top: 0; right: 2px; width: var(--bandeau); height: var(--bandeau); background: transparent; font-size: 1.2rem; }

/* Sudoku : pavé de chiffres sous la grille (touches de 44 px au moins), outils et messages d'aide. */
.sudoku-pave { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.sudoku-pave .btn { min-height: 46px; padding: 0; font-size: 1.2rem; }
.sudoku-outils { margin: 0; }
.sudoku-outils .btn { flex: 1 1 90px; min-height: 42px; }
.sudoku-outils .btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.sudoku-message { margin: 0; min-height: 1.2em; color: var(--muted); font-size: .9rem; text-align: center; }
/* Mots cachés : liste des mots, mots trouvés barrés avec leur couleur. */
.mots-liste { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.mots-mot { padding: 4px 10px; border-radius: 999px; background: var(--surface-2); font-weight: 700; font-size: .95rem; }
.mots-mot.trouve { background: color-mix(in srgb, var(--couleur) 35%, transparent); text-decoration: line-through; color: var(--muted); }

/* Motus : clavier AZERTY intégré ; état des lettres par couleur ET symbole (lisible sans distinguer les couleurs). */
.motus-clavier { display: grid; gap: 6px; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.motus-rangee { display: flex; gap: 4px; justify-content: center; }
.motus-touche { position: relative; flex: 1 1 0; max-width: 44px; min-width: 0; min-height: 48px; padding: 0; border: 0; border-radius: 8px; background: var(--surface-2); color: var(--text); font: 800 1rem system-ui, sans-serif; cursor: pointer; }
.motus-touche.large { flex: 1.6 1 0; max-width: 72px; font-size: .85rem; }
.motus-touche.entree { background: var(--accent); color: var(--accent-ink); }
.motus-touche[data-marque="2"] { background: #d9435b; color: #fff; }
.motus-touche[data-marque="1"] { background: #e6b422; color: #15121f; }
.motus-touche[data-marque="0"] { background: #1a1730; color: #6d6590; }
.motus-touche[data-marque]::after { position: absolute; top: 2px; right: 4px; font-size: .6rem; }
.motus-touche[data-marque="2"]::after { content: "■"; }
.motus-touche[data-marque="1"]::after { content: "●"; }
.motus-touche[data-marque="0"]::after { content: "·"; }
/* Mot brouillé : tuiles de lettres à toucher. */
.brouille-tuiles { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.brouille-tuile { width: 42px; height: 46px; border: 0; border-radius: 10px; background: var(--surface-2); color: var(--text); font: 800 1.35rem system-ui, sans-serif; cursor: pointer; }
.brouille-tuile:disabled { opacity: .25; cursor: default; }
.brouille-outils { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 6px; }
.brouille-outils.deux { grid-template-columns: 1fr 1fr; }
.brouille-outils .btn { min-height: 44px; padding: 0 6px; font-size: .9rem; white-space: nowrap; }
.motus-touche.entree { font-size: 1.3rem; }

/* Quiz des Potes : grandes réponses à toucher ; correction par couleur ET symbole (✓ bonne, ✗ ta réponse fausse). */
.quiz-choix-liste { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quiz-choix-liste.cache { visibility: hidden; }
.quiz-choix { position: relative; display: flex; align-items: center; gap: 8px; min-height: 60px; padding: 6px 22px 6px 8px; font-size: .95rem; line-height: 1.2; border: 2px solid transparent; border-radius: 12px; background: var(--surface-2); color: var(--text); font: 700 1rem system-ui, sans-serif; text-align: left; cursor: pointer; touch-action: manipulation; }
.quiz-choix:disabled { cursor: default; }
.quiz-choix.retiree { opacity: .3; text-decoration: line-through; }
.quiz-lettre { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: #15121f; font-weight: 900; }
.quiz-choix[data-etat="juste"] { border-color: #4aa3ff; background: #1d3354; }
.quiz-choix[data-etat="faux"] { border-color: #ff6b7a; background: #4a1d2a; }
.quiz-choix[data-etat]::after { position: absolute; top: 4px; right: 6px; font-size: 1.3rem; font-weight: 900; }
.quiz-choix[data-etat="juste"]::after { content: "✓"; color: #4aa3ff; }
.quiz-choix[data-etat="faux"]::after { content: "✗"; color: #ff6b7a; }


/* Blocs des Potes : gros boutons sous le puits (≥ 52 px), maintenus = répétition. */
.blocs-touches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; touch-action: none; user-select: none; -webkit-user-select: none; }
.blocs-touche { min-height: 56px; border: 0; border-radius: 12px; background: var(--surface-2); color: var(--text); font: 800 1.4rem system-ui, sans-serif; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.blocs-touche:last-child { background: var(--ui-panel); border: 1px solid var(--ui-edge); }
.blocs-touche:active { background: #3b3460; }

/* Mot mystère : saisie confortable (16 px : pas de zoom automatique sur iPhone), liste des mots triable. */
.mystere-bloc.cache { visibility: hidden; }
.mystere-saisie { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.mystere-saisie .btn { white-space: nowrap; padding: 0 14px; }
.mystere-champ { min-height: 48px; padding: 0 12px; border: 2px solid var(--surface-2); border-radius: 12px; background: #15121f; color: var(--text); font: 600 16px system-ui, sans-serif; }
.mystere-champ:focus { outline: none; border-color: var(--accent); }
.mystere-liste { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.mystere-ligne { display: grid; grid-template-columns: 2.2em minmax(0, 1fr) 5.6em 1.6em 3.6em; grid-template-rows: auto 4px; align-items: center; gap: 2px 6px; padding: 6px 8px; border-radius: 10px; background: var(--surface-2); font-variant-numeric: tabular-nums; }
.mystere-ligne.dernier { outline: 2px solid var(--accent); }
.mystere-n { color: var(--muted, #b3acd0); font-size: .85rem; }
.mystere-mot { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mystere-temp, .mystere-milli { text-align: right; font-size: .9rem; }
.mystere-emoji { text-align: center; }
.mystere-barre { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: #15121f; overflow: hidden; }
.mystere-barre > span { display: block; height: 100%; background: linear-gradient(90deg, #ffb547, #ff5d7a); }
.mystere-indices { margin: 4px 0 0; font-size: .9rem; }

/* Après « Solution » : le message passe en bas du plateau pour laisser voir la réponse. */
.jeu-voile.bas { display: none; } /* « Solution » : la réponse reste entièrement visible sur le plateau */
.jeu.solution-vue > :not(.jeu-hud):not(.jeu-plateau):not(.jeu-resultat) { display: none; } /* commandes inutiles une fois la partie finie */
.jeu-resultat { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); font-size: .9rem; }
.jeu-resultat[hidden] { display: none; }
.jeu-resultat > strong { grid-column: 1; }
.jeu-resultat > span { grid-column: 1; color: var(--muted); font-size: .85rem; }
.jeu-resultat > .btn { grid-column: 2; grid-row: 1 / span 2; min-height: 44px; }

/* Tout le jeu tient dans l'écran (partie.js mesure la place et fixe la largeur maximale du plateau).
   Paysage bas (téléphone couché) : plateau à gauche, scores et commandes à droite. */
.jeu-plateau { margin-inline: auto; }
.jeu.paysage { max-width: none; grid-template-columns: auto minmax(200px, 1fr); align-items: start; column-gap: 12px; }
.jeu.paysage > * { grid-column: 2; }
.jeu.paysage > .jeu-plateau { grid-column: 1; grid-row: 1 / span 20; margin: 0; }
.mystere-liste { max-height: 32dvh; overflow-y: auto; overscroll-behavior: contain; } /* l'historique défile dans sa zone : le jeu reste entier à l'écran */
/* Paysage : pas d'espace entre les rangées de la grille (le plateau s'étend sur toutes) ; boutons du bandeau en icône seule. */
.jeu.paysage { row-gap: 0; }
.jeu.paysage > .jeu-plateau ~ * { margin-top: 8px; }
.jeu.paysage .jeu-mini-txt { display: none; }
/* Bandeau des scores : jamais plus large que l'écran. Trois boutons (avec « Solution ») : icônes seules sous 480 px. */
.jeu-hud { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.jeu-hud-score > span, .jeu-hud-record > span { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 479px) { .jeu-hud-actions.trois .jeu-mini-txt { display: none; } .jeu-hud-actions.trois .jeu-mini { min-width: 44px; padding: 0 8px; } }
/* Très petits écrans (≤ 300 px) : en-tête resserré, le solde se raccourcit au lieu de pousser ↻ hors de l'écran. */
@media (max-width: 300px) { .topbar { gap: 4px; padding-inline: 6px; } .solde { padding: 4px 6px; } .solde-unite { display: none; } .topbar-right { gap: 2px; } .avatar-lien .avatar { width: 30px; height: 30px; font-size: .75rem; } }
/* Paysage très bas (téléphone couché, ≤ 420 px de haut) : commandes resserrées pour que tout le jeu tienne à l'écran. */
@media (max-height: 420px) {
  .jeu.paysage .sudoku-message:empty { display: none; }
  .jeu.paysage .sudoku-message { min-height: 0; font-size: .8rem; }
  .jeu.paysage .sudoku-pave .btn, .jeu.paysage .motus-touche { min-height: 38px; }
  .jeu.paysage .sudoku-outils .btn, .jeu.paysage .brouille-outils .btn, .jeu.paysage .jeu-mini { min-height: 36px; }
  .jeu.paysage .quiz-choix { min-height: 42px; padding-block: 2px; }
  .jeu.paysage .brouille-tuile { height: 38px; }
  .jeu.paysage .motus-clavier, .jeu.paysage .sudoku-pave, .jeu.paysage .quiz-choix-liste { gap: 4px; }
}

/* Défis Arcade : une carte par défi, objectifs avec barre de progression et bouton « Jouer » sous le pouce. */
/* Défis : une ligne par défi (défi à gauche, bouton à droite), les 3 jeux se déplient sous la ligne. */
.defi-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.defi-item { display: grid; gap: 6px; }
.defi-ligne { border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.defi-ligne.reussie { border-color: var(--accent); }
.defi-resume { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px; cursor: pointer; list-style: none; }
.defi-resume::-webkit-details-marker { display: none; }
.defi-infos { display: grid; gap: 3px; min-width: 0; }
.defi-infos strong { font-size: 1rem; }
.defi-sous { margin: 0; color: var(--muted); font-size: .85rem; }
.defi-temps { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.defi-action { min-height: 44px; min-width: 104px; justify-content: center; }
.defi-action.fait { display: inline-flex; align-items: center; color: var(--accent); font-weight: 700; }
.defi-ligne[open] .defi-resume .btn-secondary { opacity: .6; }
.defi-objectifs { list-style: none; margin: 0; padding: 0 10px 10px; display: grid; gap: 8px; }
.defi-objectif { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: var(--surface-2); }
.defi-objectif.atteint { outline: 2px solid var(--accent); }
.defi-objectif .btn { min-height: 44px; }
.defi-objectif-texte { display: grid; gap: 4px; min-width: 0; }
.defi-objectif-texte > span { color: var(--muted); font-size: .85rem; }
.defi-barre { display: block; height: 6px; border-radius: 3px; background: #15121f; overflow: hidden; }
.defi-barre > span { display: block; height: 100%; background: linear-gradient(90deg, #ffb547, #ff5d7a); }
.defi-statut { margin: 0; font-size: .85rem; font-weight: 700; color: var(--muted); }
.defi-statut.reussi, .defi-statut.fait { color: var(--accent); }


/* Défis & classements : onglets, filtres, podium, Top 5 et rang personnel (mobile d'abord, aucun tableau large). */
.cl-onglets { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 0 16px; padding: 4px; border-radius: 16px; background: var(--ui-base); }
.cl-onglet { min-height: var(--tap); border: 0; border-radius: 12px; background: transparent; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.cl-onglet[aria-selected="true"] { background: var(--ui-raised); color: #efe7ff; }
.cl-filtres { display: grid; gap: 10px; margin: 0 0 16px; }
.cl-tete { display: flex; align-items: center; justify-content: space-between; }
.cl-tete h2 { margin: 0; font-size: 1.15rem; }
.cl-trophee { font-size: 1.1rem; opacity: .8; }
.cl-listes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.cl-ligne-aide { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cl-ligne-aide .cl-choix { display: flex; gap: 4px; padding: 0; background: none; }
.cl-ligne-aide .cl-choix button { min-height: 44px; padding: 0 14px; white-space: nowrap; }
@media (max-width: 360px) { .cl-ligne-aide .cl-choix button { padding: 0 9px; font-size: .9rem; } .cl-type { font-size: .74rem; } }
.cl-type { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.cl-filtres select { text-overflow: ellipsis; -webkit-appearance: none; appearance: none; background-color: var(--surface); background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; width: 100%; min-height: var(--tap); padding: 0 36px 0 12px; border-radius: 12px; border: 1px solid var(--line); color: var(--text); font: inherit; }
.cl-choix { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface); }
.cl-choix button { min-height: 44px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-weight: 700; cursor: pointer; }
.cl-choix button[aria-checked="true"] { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.cl-vide { margin: 0 0 12px; color: var(--muted); font-size: .88rem; }
.cl-podium { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 6px; margin: 8px 0 16px; text-align: center; }
.cl-podium > li { grid-row: 1; }
.cl-p1 { grid-column: 2; } .cl-p2 { grid-column: 1; } .cl-p3 { grid-column: 3; }
.cl-marche { display: grid; justify-items: center; gap: 4px; min-width: 0; }
.cl-marche strong { font-size: .9rem; overflow-wrap: anywhere; }
.cl-marche > span:last-child { color: var(--muted); font-size: .78rem; }
.cl-couronne { font-size: 1.8rem; line-height: 1; }
.cl-avatar { position: relative; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: #3a3260; color: var(--text); font-weight: 800; border: 3px solid #8a7fbf; }
.cl-p1 .cl-avatar { width: 74px; height: 74px; border-color: #ffc94a; font-size: 1.2rem; }
.cl-p2 .cl-avatar { border-color: #e9e6f5; }
.cl-p3 .cl-avatar { border-color: #ff8a3d; }
.cl-avatar b { position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; background: #ffc94a; color: #231a00; font-size: .72rem; }
.cl-p2 .cl-avatar b { background: #e9e6f5; }
.cl-p3 .cl-avatar b { background: #ff8a3d; }
.cl-marche.moi strong { color: #ffc94a; }
.cl-avatar.petit { width: 34px; height: 34px; border-width: 2px; font-size: .78rem; }
.cl-avatar.avatar-avec-cadre { overflow: visible; border: 0; border-radius: 9px; background: transparent; }
.cl-avatar .avatar-cadre { border-radius: inherit; }
.cl-avatar.avatar-avec-cadre b { right: -4px; bottom: -2px; left: auto; transform: none; }
.cl-liste { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.cl-ligne { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 52px; padding: 6px 14px; border-radius: 16px; background: var(--surface); }
.cl-ligne.moi { box-shadow: 0 0 0 3px #8ab4ff; }
.cl-rang { min-width: 2ch; font-weight: 800; text-align: center; }
.cl-rang small { display: block; font-size: .62rem; font-weight: 700; opacity: .8; }
.cl-pseudo { font-weight: 700; overflow-wrap: anywhere; }
.cl-pseudo small { font-weight: 600; opacity: .8; }
.cl-perf { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.cl-moi { margin-top: 4px; background: var(--surface-2); }
.cl-moi .btn { min-height: 40px; }

/* Casino · Blackjack : table sombre (pas de tapis vert), cartes légères, jetons, commandes au pouce. */
.bj-table { position: relative; display: grid; gap: 14px; min-height: 260px; padding: 16px 12px; border-radius: 20px; background: radial-gradient(120% 90% at 50% 0%, #2c2650 0%, #1a1730 70%); border: 1px solid #3b3558; }
.bj-table.vide { place-items: center; }
.bj-zone { display: grid; gap: 8px; justify-items: center; }
.bj-tete { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: .85rem; font-weight: 700; }
.bj-tete strong { min-width: 30px; padding: 2px 8px; border-radius: 999px; background: #0f0d1c; color: var(--text); text-align: center; font-variant-numeric: tabular-nums; }
.bj-mise { color: var(--accent); }
.bj-mains { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.bj-main { padding: 8px; border-radius: 14px; border: 2px solid transparent; }
.bj-main.active { border-color: var(--accent); }
.bj-cartes { display: flex; justify-content: center; min-height: 84px; }
.bj-carte { position: relative; display: grid; place-items: center; width: 56px; height: 80px; margin-left: -18px; border-radius: 8px; background: #fbfaff; color: #1d1830; box-shadow: 0 2px 6px rgba(0, 0, 0, .45); font-weight: 800; }
.bj-carte:first-child { margin-left: 0; }
.bj-carte b { position: absolute; top: 4px; left: 6px; font-size: .95rem; }
.bj-carte i { font-style: normal; font-size: 1.6rem; }
.bj-carte.rouge { color: #d9283f; }
.bj-carte.dos { background: repeating-linear-gradient(45deg, #5a3fb0 0 6px, #4a3396 6px 12px); border: 3px solid #fbfaff; }
.bj-carte.nouvelle { animation: bj-in .28s ease-out both; }
@keyframes bj-in { from { transform: translateY(-24px) rotate(-6deg); opacity: 0; } to { transform: none; opacity: 1; } }
.bj-bandeau { justify-self: center; padding: 6px 18px; border-radius: 999px; font-weight: 800; font-size: 1.1rem; animation: bj-pop .3s ease-out both; }
.bj-bandeau.gain { background: var(--accent); color: var(--accent-ink); }
.bj-bandeau.perte { background: #3a2333; color: #ff9aa5; }
.bj-bandeau.egal { background: var(--surface-2); color: var(--text); }
@keyframes bj-pop { from { transform: scale(.8); opacity: 0; } to { transform: none; opacity: 1; } }
.bj-res { padding: 1px 8px; border-radius: 999px; font-size: .78rem; }
.bj-res.gain { background: var(--accent); color: var(--accent-ink); }
.bj-res.perte { background: #3a2333; color: #ff9aa5; }
.bj-res.egal { background: var(--surface-2); color: var(--text); }
.bj-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 14px 0 0; }
.bj-actions .btn { min-height: 52px; padding: 0 4px; }
.bj-mise-zone { display: grid; gap: 12px; margin: 14px 0 0; }
.bj-jetons { display: flex; justify-content: center; gap: 8px; }
.bj-jeton { width: 52px; height: 52px; border-radius: 50%; border: 4px dashed rgba(255, 255, 255, .55); color: #fff; font: inherit; font-weight: 800; font-size: .9rem; cursor: pointer; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); transition: transform .12s; }
.bj-jeton:active { transform: scale(.92); }
.bj-jeton:disabled { opacity: .35; cursor: default; }
.bj-jeton.j10 { background: #4d6bd8; } .bj-jeton.j25 { background: #d9283f; } .bj-jeton.j50 { background: #e08a1e; }
.bj-jeton.j100 { background: #2a2540; } .bj-jeton.j250 { background: #8e44c9; }
.bj-ligne-mise { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px; }
.bj-ligne-mise > span { font-size: 1.05rem; }
.bj-ligne-mise strong { color: var(--accent); font-variant-numeric: tabular-nums; }
.bj-msg { margin: 8px 0 0; min-height: 1em; color: #ff9aa5; text-align: center; font-size: .9rem; }
.bj-msg:empty { display: none; }
.bj-histo { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bj-histo li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface); font-size: .9rem; }
.bj-histo-mise { color: var(--muted); }
.bj-histo strong { min-width: 4ch; text-align: right; font-variant-numeric: tabular-nums; }
.bj-histo strong.gain { color: var(--accent); } .bj-histo strong.perte { color: #ff9aa5; }
@media (max-width: 340px) { .bj-jeton { width: 46px; height: 46px; font-size: .82rem; } .bj-carte { width: 50px; height: 72px; } .bj-actions .btn { font-size: .85rem; } }
@media (prefers-reduced-motion: reduce) { .bj-carte.nouvelle, .bj-bandeau { animation: none; } }

/* ---------- Home de La collection des Potes ---------- */
.home-section { margin: 0 0 24px; }
.home-section[data-section="cartes"] { margin-bottom: 8px; }
.home-tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 6px; }
.home-titre { display: inline-flex; align-items: center; gap: 10px; min-height: var(--tap); color: var(--text); text-decoration: none; }
.home-titre h2 { margin: 0; font-size: 1.1rem; font-weight: 700; letter-spacing: -.015em; }
.ico { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.home-ico { color: #c5b2e9; }
.home-chevron { width: 18px; height: 18px; color: var(--muted); }
.home-action { min-height: 44px; padding: 0 8px; border: 0; border-radius: 10px; background: transparent; color: #dac8fa; font: inherit; font-weight: 650; font-size: .82rem; text-decoration: none; display: inline-grid; place-items: center; cursor: pointer; }
.home-action:hover { background: var(--surface); }
.home-reglages { display: grid; place-items: center; width: var(--tap); height: var(--tap); padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }
.home-reglages:hover { color: var(--text); background: var(--surface); }
.home-vide { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0 8px; margin: 0; padding: 0 12px; border: 1px solid var(--ui-edge); border-radius: 12px; background: var(--ui-base); color: var(--ui-faint); font-size: .875rem; }
.home-vide a { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; padding-inline: 4px; color: #e1ccff; font-weight: 650; text-decoration: none; }
.home-vide a::after { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 1px 1px 0 0; transform: rotate(45deg); }
.home-vide a:hover { text-decoration: underline; }
.home-vide a:active { color: #fff; }
.hp-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; background: rgba(255, 255, 255, .1); color: var(--text); font-size: .72rem; font-weight: 700; letter-spacing: .03em; }

/* Pass de saison : bandeau large, sobre, chemin de missions décoratif. */
.home-pass { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 8px 12px; margin: 0 0 16px; padding: 16px; border-radius: 20px; color: #f9f5ff; text-decoration: none;
  background: radial-gradient(ellipse at 95% 0%, #463466, transparent 75%), var(--ui-panel); border: 1px solid var(--ui-edge); }
.home-pass:has(.hp-lot) { grid-template-columns: minmax(0, 1fr) minmax(84px, 30%); }
.hp-lot { grid-column: 2; grid-row: 1 / 3; display: grid; justify-items: center; gap: 2px; text-align: center; }
.hp-lot .pv { width: 100%; max-width: 102px; aspect-ratio: 3 / 2; }
.hp-lot strong { color: #f0dbad; font-size: .75rem; line-height: 1.25; }
.hp-lot small { color: #c9bbdf; font-size: .69rem; }
.hp-chemin { position: relative; grid-row: 2; display: flex; align-items: center; justify-content: space-between; height: 24px; }
.hp-chemin::before { content: ""; position: absolute; inset-inline: 5px 12px; top: calc(50% - 1px); height: 2px; background: #554867; border-radius: 2px; }
.hp-chemin i { position: relative; display: grid; place-items: center; width: 10px; height: 10px; border-radius: 50%; background: #29223b; border: 1px solid #867499; }
.hp-chemin i:last-child { width: 24px; height: 24px; background: #332747; color: #d9c6f3; }
.hp-chemin .ico { width: 14px; height: 14px; }
.hp-texte { grid-row: 1; display: grid; justify-items: start; gap: 4px; }
.hp-kicker { grid-column: 1 / -1; color: #c7b9dc; font-size: .69rem; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; }
.hp-titre { display: inline-flex; align-items: center; gap: 8px; }
.hp-titre strong { font-size: clamp(1.125rem, 5vw, 1.625rem); font-weight: 700; line-height: 1.15; letter-spacing: -.025em; }
.hp-titre em { font-style: normal; }
.hp-couronne { width: 21px; height: 21px; flex: none; color: #e8cb89; }

/* Carrousel centré (Mes cartes, Mon inventaire). */
.cc { position: relative; margin: 0 calc(-1 * var(--gutter-r)) 0 calc(-1 * var(--gutter)); }
.cc-cadre { position: relative; }
.cc-piste { list-style: none; margin: 0; display: flex; gap: var(--cc-gap, 10px); padding: 10px calc(50% - var(--cc-w) / 2) 14px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.cc-piste::-webkit-scrollbar { display: none; }
.cc-item { flex: 0 0 var(--cc-w); scroll-snap-align: center; transform: scale(.84); opacity: .55; transition: transform .25s ease, opacity .25s ease; cursor: pointer; }
.cc-item.actif { transform: none; opacity: 1; }
.cc-saut .cc-item { transition: none; } /* retour invisible sur la copie du milieu */
.cc-arcade { --cc-w: min(34vw, 148px); --cc-gap: 10px; }
.cc-arcade .cc-item { transform: none; opacity: 1; }
.cc-arcade .cc-points { display: none; }
.cc-arcade .cc-piste { padding-block: 4px 6px; }
.cc-arcade .cc-fleche { top: -50px; margin-top: 0; width: 44px; filter: none; color: #d9caef; }
.cc-arcade .cc-fleche.g { left: auto; right: calc(var(--gutter-r) + 44px); }
.cc-arcade .cc-fleche.d { right: var(--gutter-r); }
.cc-arcade .cc-fleche .ico { width: 17px; height: 17px; }
.cc-arcade .home-jeu.home-produit { padding: 0 0 4px; gap: 8px; background: transparent; border: 0; border-radius: 16px; }
.cc-arcade .hpr-nom { display: grid; align-items: center; min-height: 2.5em; font-size: .78rem; font-weight: 650; line-height: 1.25; }
@media (min-width: 700px) {
  .cc-arcade .cc-fleche.g { right: 44px; }
  .cc-arcade .cc-fleche.d { right: 0; }
}
.cc-cartes { --cc-w: min(54vw, 220px); }
.cc-produits { --cc-w: min(44vw, 176px); }
.cc-fleche { position: absolute; top: 50%; z-index: 2; width: 36px; height: 44px; margin-top: -22px; display: grid; place-items: center; padding: 0; border: 0; background: none; color: rgba(255, 255, 255, .75); cursor: pointer; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .8)); }
.cc-fleche:hover { color: #fff; }
.cc-fleche .ico { width: 26px; height: 26px; stroke-width: 2.2; }
.cc-fleche.g { left: max(6px, var(--safe-l)); }
.cc-fleche.d { right: max(6px, var(--safe-r)); }
.cc-fleche:disabled { opacity: 0; pointer-events: none; }
.cc-points { display: flex; justify-content: center; gap: 4px; }
.cc-points button { width: 18px; height: 32px; /* zone tactile : point inchangé */ padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.cc-points button::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--line); transition: background .2s, width .2s; }
.cc-points button[aria-current="true"]::before { width: 18px; border-radius: 4px; background: var(--accent); }
@media (min-width: 700px) { .cc { margin-inline: 0; } }
.home-carte { display: block; border-radius: 10px; outline-offset: 3px; }
.home-ajout { display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 16px; border: 1px dashed var(--line); border-radius: 14px; background: var(--surface); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }

/* Produits (inventaire en grand, boutique en rangée). */
.home-produit { display: grid; gap: 6px; padding: 10px; height: 100%; border-radius: 16px; background: var(--surface); color: var(--text); text-decoration: none; border: 1px solid rgba(255, 255, 255, .05); }
.home-produit.grand { padding: 12px; text-align: center; }
.home-produit.grand .pv { height: clamp(96px, 26vw, 120px); width: 100%; aspect-ratio: auto; }
.home-produit.grand .hpr-nom { font-size: 1rem; }
.hpr-nom { font-weight: 700; font-size: .9rem; }
.hpr-info { color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; }
.hpr-info.prix { color: var(--accent); font-weight: 800; }
.carrousel { list-style: none; margin: 0 calc(-1 * var(--gutter-r)) 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter-r) 8px var(--gutter);
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(104px, 30%); gap: 10px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); -webkit-overflow-scrolling: touch; }
.carrousel > li { scroll-snap-align: start; min-width: 0; }
@media (min-width: 700px) { .carrousel { grid-auto-columns: 150px; margin-inline: 0; padding-inline: 0; scroll-padding-inline: 0; } }

/* Visuels des produits (CSS seul, même feuille métallisée que le booster d'ouverture). */
.pv { position: relative; aspect-ratio: 1; border-radius: 12px; background: #17142b; overflow: hidden; }
.pv-pack, .pv-boite { position: absolute; display: grid; place-content: center; justify-items: center; gap: 4px; color: #fff; text-align: center;
  background: linear-gradient(150deg, #2b1f63 0%, #5c3fc4 38%, #e8bb52 52%, #6f4ad8 64%, #1d1645 100%); box-shadow: 0 6px 14px rgba(0, 0, 0, .45); }
.pv-pack { width: 50%; height: 78%; top: 11%; left: 25%; border-radius: 5px; }
.pv-pack::before, .pv-pack::after { content: ""; position: absolute; left: 0; right: 0; height: 5%; background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .3) 0 3px, transparent 3px 6px); }
.pv-pack::before { top: 0; } .pv-pack::after { bottom: 0; }
.pv-pack b, .pv-boite b { font-size: .8rem; font-weight: 900; letter-spacing: .04em; }
.pv-pack small { padding: 1px 4px; border-radius: 3px; background: #e8bb52; color: #231a00; font-size: .42rem; font-weight: 900; letter-spacing: .06em; white-space: nowrap; }
.pv-pack3 .p0 { transform: translateX(-32%) rotate(-10deg); opacity: .85; }
.pv-pack3 .p1 { transform: translateX(32%) rotate(10deg); opacity: .85; }
.pv-pack3 .p2 { z-index: 1; }
.pv-boite { left: 14%; right: 14%; top: 24%; bottom: 14%; border-radius: 8px; }
.pv-boite i { font-style: normal; font-weight: 900; font-size: 1.4rem; }
.pv-display24 .pv-boite { top: 32%; border-radius: 4px 4px 10px 10px; }
.pv-mega50 .pv-boite { left: 9%; right: 9%; top: 16%; bottom: 10%; border: 2px solid #e8bb52; }
.home-produit.grand .pv-pack b { font-size: 1.1rem; }
.home-produit.grand .pv-pack small { font-size: .62rem; }
.home-produit.grand .pv-boite i { font-size: 2rem; }
.produit-cible { box-shadow: 0 0 0 2px var(--elec); border-radius: var(--radius); }

/* Paris sportifs (module à venir) et Casino. */
.hp-paris { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid rgba(255, 255, 255, .05); color: var(--text); text-decoration: none; }
.hpa-sports { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: #2a2450; color: var(--muted); }
.hpa-texte { display: grid; gap: 6px; justify-items: start; }
.hpa-texte strong { font-size: .95rem; }
.hpm-jour { margin: 0 0 8px; color: var(--muted); font-size: .8rem; font-weight: 700; }
.hpm-jour::first-letter { text-transform: uppercase; }
/* Toujours 3 petites tuiles côte à côte : tailles en clamp() pour tenir de 320 px (≈ 80 px utiles par tuile) au PC. */
.hpm-liste { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(6px, 2vw, 10px); margin: 0; padding: 0; list-style: none; }
.hpm-tuile { display: grid; gap: 6px; height: 100%; padding: clamp(6px, 2vw, 12px); border-radius: 14px; background: var(--surface); border: 1px solid rgba(255, 255, 255, .05); color: var(--text); text-decoration: none; }
.hpm-tuile:hover, .hpm-tuile:focus-visible { border-color: var(--ui-accent); }
.hpm-tete { display: grid; gap: 1px; min-width: 0; color: var(--muted); font-size: clamp(.58rem, 2.6vw, .72rem); font-weight: 700; }
.hpm-tete > span { overflow-wrap: anywhere; }
.hpm-tete strong { color: var(--text); font-variant-numeric: tabular-nums; }
.hpm-equipe { display: flex; align-items: center; gap: clamp(4px, 1.5vw, 8px); min-width: 0; font-weight: 700; font-size: clamp(.66rem, 3vw, .9rem); }
.hpm-equipe .pr-logo { width: clamp(16px, 5vw, 28px); height: clamp(16px, 5vw, 28px); }
.hpm-equipe > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hpm-cotes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2px, 1vw, 6px); }
.hpm-cotes > span { display: grid; justify-items: center; padding: 4px 0; border-radius: 8px; background: var(--bg-2); font-size: clamp(.56rem, 2.5vw, .8rem); font-weight: 750; font-variant-numeric: tabular-nums; }
.hpm-cotes small { color: var(--muted); font-weight: 700; }

/* Défis : un défi par diapositive (Facile, Moyen, Difficile), ses 3 jeux côte à côte. */
.cc-defis { --cc-w: min(calc(100vw - 2 * var(--gutter) - 16px), 640px); --cc-gap: 8px; }
.cc-defis .cc-item { transform: scale(.96); opacity: .45; cursor: default; }
.cc-defis .cc-item.actif { transform: none; opacity: 1; }
.cc-defis .cc-piste { padding-block: 2px 6px; }
.cc-defis .cc-fleche { top: -50px; margin-top: 0; width: 44px; filter: none; color: #d9caef; }
.cc-defis .cc-fleche.g { left: auto; right: calc(var(--gutter-r) + 44px); }
.cc-defis .cc-fleche.d { right: var(--gutter-r); }
.cc-defis .cc-fleche .ico { width: 17px; height: 17px; }
@media (min-width: 700px) { .cc-defis { --cc-w: min(100%, 640px); } .cc-defis .cc-fleche.g { right: 44px; } .cc-defis .cc-fleche.d { right: 0; } }
.hd-defi { --hd-c: #7fd6a0; display: grid; gap: 8px; height: 100%; padding: 12px; border-radius: 16px; background: var(--ui-base); border: 1px solid var(--ui-edge); border-top: 3px solid var(--hd-c); color: var(--text); }
.hd-defi.moyen { --hd-c: #f2c35b; }
.hd-defi.difficile { --hd-c: #ff8a8a; }
.hd-tete { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hd-niveau { padding: 2px 10px; border-radius: 999px; background: color-mix(in srgb, var(--hd-c) 18%, transparent); color: var(--hd-c); font-size: .78rem; font-weight: 800; }
.hd-periode { flex: 1; min-width: 0; color: var(--ui-faint); font-size: .78rem; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hd-statut { color: var(--ui-faint); font-size: .75rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; text-decoration: none; }
.hd-statut.reussi, .hd-statut.fait { color: #7fd6a0; }
.hd-consigne { margin: 0; color: var(--ui-faint); font-size: .78rem; }
.hd-jeux { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.hd-jeu { display: grid; grid-template-rows: auto auto 1fr auto; justify-items: center; gap: 4px; min-width: 0; padding: 8px 6px; border-radius: 12px; background: var(--ui-panel); text-align: center; }
.hd-jeu.atteint { box-shadow: inset 0 0 0 1px #7fd6a0; }
.hd-jeu .vignette-jeu { width: min(56px, 100%); }
.hd-jeu strong { max-width: 100%; font-size: .76rem; line-height: 1.2; overflow-wrap: break-word; hyphens: auto; }
.hd-texte { max-width: 100%; color: var(--ui-faint); font-size: .68rem; line-height: 1.25; overflow-wrap: break-word; hyphens: auto; }
.ui-page .hd-aller { width: 100%; min-height: 36px; padding: 0 6px; font-size: .82rem; }

/* Casino : petites tuiles côte à côte (glisser au doigt sur téléphone). */
.hcs-liste { grid-auto-columns: minmax(118px, 36%); }
.hcs-tuile { position: relative; /* nom masqué (sr-only) gardé dans la rangée */ display: grid; gap: 6px; height: 100%; padding: 6px 6px 8px; border-radius: 14px; background: var(--ui-base); border: 1px solid var(--ui-edge); text-align: center; }
.hcs-image { display: block; width: 100%; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 9px; }
.ui-page .hcs-jouer { min-height: 36px; padding: 0 8px; font-size: .82rem; }
@media (min-width: 700px) { .hcs-liste { grid-auto-columns: minmax(150px, 1fr); } }

/* Aperçu des classements : carrousel des 14 jeux, Top 3 compact. */
.cc-classements { --cc-w: min(80vw, 340px); }
.cc-classements .cc-item { transform: scale(.94); }
.cc-classements .cc-item.actif { transform: none; }
.hc-carte { display: grid; gap: 8px; height: 100%; padding: 12px; border-radius: 16px; background: var(--surface); border: 1px solid rgba(255, 255, 255, .05); color: var(--text); }
.hc-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.hc-tete strong { font-size: .98rem; }
.hc-diff { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .78rem; }
.hc-diff-points { display: inline-flex; gap: 3px; }
.hc-diff-points i { width: 5px; height: 5px; border-radius: 50%; background: var(--line); }
.hc-diff-points i.on { background: #f2c35b; }
.hc-corps { min-height: 124px; }
.hc-corps > * { animation: hc-in .3s ease-out; }
@keyframes hc-in { from { opacity: 0; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .hc-corps > * { animation: none; } }
.hc-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.hc-ligne { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 36px; padding: 4px 8px; border-radius: 10px; background: rgba(255, 255, 255, .03); }
.hc-ligne.moi { box-shadow: inset 0 0 0 1px var(--elec); }
.hc-rang { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line); font-weight: 800; font-size: .78rem; }
.hc-rang.r1 { border-color: #f2c35b; color: #f2c35b; }
.hc-rang.r2 { border-color: #cfd3e6; color: #cfd3e6; }
.hc-rang.r3 { border-color: #d98a4e; color: #d98a4e; }
.hc-pseudo { font-weight: 600; font-size: .9rem; overflow-wrap: anywhere; }
.hc-perf { font-weight: 800; font-size: .88rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hc-vide { margin: 0; padding: 18px 0; color: var(--muted); font-size: .88rem; text-align: center; }

/* Petits écrans : titres et actions sur une ligne, bandeau sans chevauchement. */
.home-action { white-space: nowrap; }
.pv-pack3 .p0 small, .pv-pack3 .p1 small, .pv-pack3 .p0 b, .pv-pack3 .p1 b { visibility: hidden; }
.cc-classements .cc-points button { width: 12px; }
@media (hover: none) { .cc-classements .cc-fleche { display: none; } } /* flèches du classement : sur PC seulement */
.cc-classements .cc-points button[aria-current="true"]::before { width: 12px; }
@media (max-width: 400px) {
  .home-titre { gap: 8px; }
  .home-titre h2 { font-size: 1.05rem; }
    .hp-titre strong { font-size: 1.3rem; }
}
@media (max-width: 340px) { .hp-titre { gap: 6px; } .home-chevron { width: 14px; height: 14px; } }

/* Boutique : grille de fiches (2 par ligne sur téléphone), informations détaillées repliées en bas. */
.bq-grille { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 700px) { .bq-grille { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); } }
.bq-produit { display: grid; gap: 8px; align-content: start; padding: 12px; border-radius: 18px; background: var(--ui-base); border: 1px solid var(--ui-edge); }
.bq-produit .pv { aspect-ratio: 1; }
.bq-nom { font-size: .98rem; }
.bq-prix { color: var(--accent); font-weight: 650; font-variant-numeric: tabular-nums; }
.bq-produit .buy-actions { display: grid; gap: 6px; margin: 2px 0 0; }
.bq-produit .buy-actions .btn { width: 100%; min-height: 44px; padding: 0 8px; font-size: .88rem; }
.bq-achete { display: grid; gap: 6px; margin: 4px 0 0; padding: 8px; font-size: .85rem; }
.bq-achete .actions { display: grid; gap: 6px; margin: 0; }
.bq-achete .btn { width: 100%; min-height: 44px; font-size: .82rem; }
.bq-infos summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; color: var(--muted); font-weight: 600; }

/* Choix des cartes mises en avant. */
.vg-ouvert { overflow: hidden; }
.vg { position: fixed; inset: 0; z-index: 60; display: grid; align-items: end; background: rgba(6, 5, 14, .65); animation: voile .2s ease-out; }
.vg-panneau { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto auto; gap: 10px; max-height: 92vh; max-height: 92dvh; width: min(100%, 720px); margin: 0 auto;
  padding: 16px max(16px, var(--safe-r)) calc(16px + var(--safe-b)) max(16px, var(--safe-l)); border-radius: 24px 24px 0 0; background: var(--ui-base); border-top: 1px solid var(--ui-edge); animation: monte .26s cubic-bezier(.2, .8, .2, 1); }
@keyframes monte { from { transform: translateY(40px); opacity: 0; } }
.vg-tete { display: flex; align-items: center; justify-content: space-between; }
.vg-tete h2 { margin: 0; font-size: 1.05rem; }
.vg-tete strong { color: #9cc3ff; }
.vg-selection { list-style: none; margin: 0; padding: 2px 0 4px; display: grid; grid-auto-flow: column; grid-auto-columns: 74px; gap: 8px; overflow-x: auto; min-height: 20px; }
.vg-selection li { display: grid; gap: 4px; }
.vg-ordre { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.vg-ordre button { min-height: 30px; padding: 0; border: 0; border-radius: 8px; background: var(--surface-2); color: var(--text); font: inherit; cursor: pointer; }
.vg-ordre button:disabled { opacity: .35; }
.vg-liste { overflow-y: auto; overscroll-behavior: contain; }
.vg-grille { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.vg-carte { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 8px; background: none; cursor: pointer; }
.vg-carte.choisie { box-shadow: 0 0 0 3px var(--elec); }
.vg-carte.choisie::after { content: "✓"; position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--elec); color: #fff; font-weight: 900; font-size: .8rem; }
.vg-carte:disabled { opacity: .4; cursor: default; }
.vg-erreur { margin: 0; color: #ff9aa5; }
.vg-erreur:empty { display: none; }
.vg-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* Profil */
.profil-carte { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; padding: 16px; border-radius: 18px; background: var(--ui-panel); }
.profil-photo { margin-top: 8px; }
.profil-photo-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.profil-photo-message { margin: 6px 0 0; color: var(--muted); font-size: .875rem; }
.profil-photo-message:empty { margin: 0; }
.profil-photo-dialogue { width: min(400px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 16px; border: 1px solid var(--ui-edge); border-radius: 16px; background: var(--ui-panel); color: var(--text); }
.profil-photo-dialogue::backdrop { background: rgba(0, 0, 0, .72); }
.profil-photo-dialogue h2 { margin: 0; }
.profil-photo-dialogue > p { margin: 8px 0; color: var(--muted); }
.profil-photo-dialogue > p:empty { display: none; }
.profil-photo-apercu { display: block; width: min(100%, 240px, 45dvh); height: auto; margin: 14px auto; border-radius: 50%; background: var(--ui-base); outline: 1px solid var(--ui-edge); touch-action: none; cursor: grab; }
.profil-photo-apercu:active { cursor: grabbing; }
.profil-photo-apercu:focus-visible { outline: 2px solid var(--ui-accent); }
.profil-photo-zoom { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.profil-photo-zoom input { flex: 1; min-width: 0; min-height: 44px; accent-color: var(--ui-accent); }
.profil-photo-dialogue .profil-photo-actions { justify-content: flex-end; }
.profil-avatar.avatar-avec-cadre { width: 66px; height: 66px; font-size: 1.35rem; }
.profil-succes { margin-bottom: 18px; border: 1px solid var(--ui-edge); border-radius: 16px; background: var(--ui-panel); }
.profil-succes > summary { padding: 12px 14px; cursor: pointer; font-weight: 750; min-height: 44px; }
.profil-succes > summary span { float: right; color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.succes-contenu { padding: 0 12px; }
.succes-liste { list-style: none; margin: 0; padding: 0; }
.succes-liste li { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 6px 10px; padding: 10px 0; border-top: 1px solid var(--ui-edge); }
.succes-liste img { display: block; width: 48px; height: 48px; border-radius: 8px; }
.succes-verrouille img { opacity: .68; }
.succes-detail p, .succes-message { margin: 3px 0; color: var(--muted); font-size: .83rem; }
.succes-progression { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; font-size: .78rem; color: var(--muted); }
.succes-etat { font-size: .8rem; color: var(--ui-accent); }
.succes-liste .btn { grid-column: 2; justify-self: start; min-height: 44px; }
@media (min-width: 480px) {
  .succes-liste li { grid-template-columns: 56px minmax(0, 1fr) auto; }
  .succes-liste img { width: 56px; height: 56px; }
  .succes-liste .btn { grid-column: 3; }
}
.profil-avatar { width: 60px; height: 60px; font-size: 1.4rem; color: #e5d7ff; background: var(--ui-raised); }
.profil-pseudo { font-size: 1.2rem; }
@media (prefers-reduced-motion: reduce) { .menu, .menu-open .menu { transition: none; } .menu-overlay, .vg, .vg-panneau { animation: none; } }

/* ---------- Salle des trophées : mur, lampe, cadre 5 × 6, zoom par ligne ---------- */
.ts-tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ts-tete h1 { margin: 0; }
.ts-onglets { display: flex; gap: 4px; width: fit-content; margin: 12px 0; padding: 4px; border-radius: 14px; background: var(--ui-base); }
.ts-onglets a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--ui-faint); text-decoration: none; font-size: .875rem; font-weight: 650; }
.ts-onglets a[aria-current="page"] { background: var(--ui-raised); color: var(--text); }
.ts-annuaire { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 264px), 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.ts-annuaire a { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 12px; height: 100%; padding: 10px; border: 1px solid var(--ui-edge); border-radius: 14px; background: var(--ui-base); color: var(--text); text-decoration: none; }
.ts-annuaire a:active { background: var(--ui-raised); }
.ts-annuaire .ico { flex: none; color: var(--ui-accent); }
.ts-annuaire small { display: block; color: var(--ui-faint); }
.ts-mini-salle { display: grid; align-items: center; aspect-ratio: 1; padding: 6px; border-radius: 8px; background: linear-gradient(#553724, #221711); }
.ts-mini-cadre { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px; padding: 3px; border: 1px solid #ad8551; border-radius: 3px; background: #171322; }
.ts-mini-place { display: block; aspect-ratio: 5 / 7; overflow: hidden; border-radius: 1px; background: #2e283a; }
.ts-mini-place.exposee { background: #c9a778; }
.ts-mini-place img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ts-visite-nav { margin: 8px 0 0; }
.ts-visite-nav .ts-retour { text-decoration: none; }
.ts-visite { width: min(100%, 620px); margin: 16px auto 0; text-align: center; color: #efe5ff; font-size: 1.2rem; font-weight: 750; }
.ts-partage { margin: 12px 0 0; color: var(--muted); font-size: .85rem; }
.ts-reglages { display: grid; place-items: center; width: var(--tap); height: var(--tap); padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }
.ts-reglages:hover { color: var(--text); background: var(--surface); }
.ts-vue { position: relative; margin: 12px calc(-1 * var(--gutter-r)) 0 calc(-1 * var(--gutter)); overflow: hidden; border-radius: 0;
  background: radial-gradient(70% 55% at 50% 12%, rgba(255, 196, 120, .28), transparent 70%),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .12) 0 2px, transparent 2px 90px), linear-gradient(180deg, #3a281c 0%, #261a13 60%, #170f0b 100%); }
@media (min-width: 700px) { .ts-vue { margin-inline: 0; border-radius: 20px; } }
.ts-scene { position: relative; display: grid; justify-items: center; padding: 34px 14px 24px; transition: transform .45s cubic-bezier(.2, .8, .2, 1); will-change: transform; }
.ts-lampe { position: absolute; top: 10px; left: 50%; width: 46%; max-width: 260px; height: 10px; transform: translateX(-50%); border-radius: 0 0 8px 8px; background: linear-gradient(180deg, #1b1310, #0d0907); box-shadow: 0 4px 18px rgba(255, 196, 120, .45); }
.ts-cadre { position: relative; width: min(100%, 620px); padding: 10px; border-radius: 6px; background: linear-gradient(145deg, #1c1c22, #09090c); box-shadow: 0 18px 40px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 255, 255, .06); }
.ts-passe { padding: 8px 8px 10px; border-radius: 3px; background: linear-gradient(180deg, #17142b, #100e1e); box-shadow: inset 0 0 0 2px #b9893a, inset 0 0 0 4px #17142b, inset 0 0 0 5px rgba(185, 137, 58, .5); }
.ts-cadre-tete { position: relative; display: grid; place-items: center; min-height: var(--tap); margin-bottom: 6px; }
.ts-logo { display: block; width: 44%; max-width: 220px; height: auto; }
.ts-cadre-tete .ts-reglages { position: absolute; inset-inline-end: 0; top: 50%; transform: translateY(-50%); }
.ts-scene.zoome .ts-reglages { visibility: hidden; }
.ts-grille { display: grid; gap: 5px; }
.ts-ligne { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; padding: 3px; border: 0; border-radius: 4px; background: none; cursor: zoom-in; }
.ts-ligne:hover, .ts-ligne:focus-visible { background: rgba(255, 210, 140, .08); }
.ts-place { display: block; aspect-ratio: 5 / 7; border-radius: 3px; overflow: hidden; }
.ts-place.vide { background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.ts-place .tc { box-shadow: 0 2px 4px rgba(0, 0, 0, .5); }
.ts-vide { margin: 12px 0 0; color: var(--muted); }
/* Zoom : la scène s'agrandit sur la ligne, puis les six emplacements passent en carrousel par-dessus. */
.ts-zoom { position: absolute; inset: 0; z-index: 3; display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; gap: 6px; padding: 10px 0; background: rgba(12, 9, 7, .82); opacity: 0; transition: opacity .25s ease .2s; }
.ts-zoom.visible { opacity: 1; }
.ts-zoom-tete { display: flex; align-items: center; justify-content: space-between; padding: 0 12px; }
.ts-retour { display: inline-flex; align-items: center; gap: 4px; min-height: var(--tap); padding: 0 10px 0 4px; border: 0; background: none; color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.ts-retour .ico, .ts-nav .ico { width: 22px; height: 22px; }
.ts-zoom-titre { display: inline-flex; align-items: center; gap: 2px; color: #f2c35b; font-weight: 800; }
.ts-nav { display: grid; place-items: center; width: 36px; height: var(--tap); padding: 0; border: 0; background: none; color: var(--text); cursor: pointer; }
.ts-nav:disabled { opacity: .25; }
.cc-trophees { --cc-w: min(50vw, 210px); margin: 0; min-width: 0; }
.ts-zcarte { display: block; border-radius: 10px; }
.ts-zcarte.vide { display: grid; place-items: center; aspect-ratio: 5 / 7; border: 1px dashed rgba(255, 255, 255, .25); color: var(--muted); font-size: .9rem; }
/* Réglages : cadre miniature 6 colonnes. */
.tg-mini { width: min(100%, 300px); margin: 0 auto; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; padding: 6px; border-radius: 8px; background: #100e1e; box-shadow: inset 0 0 0 1px rgba(185, 137, 58, .5); }
.tg-place { aspect-ratio: 5 / 7; padding: 0; border: 0; border-radius: 3px; background: rgba(255, 255, 255, .05); cursor: pointer; overflow: hidden; }
.tg-place.cible { box-shadow: 0 0 0 2px var(--elec); }
.tg-actions { display: grid; grid-template-columns: auto 1fr 1fr; gap: 8px; }
.tg-panneau { grid-template-rows: auto auto minmax(0, 1fr) auto auto; }
@media (prefers-reduced-motion: reduce) { .ts-scene, .ts-zoom { transition: none; } }

/* ---------- Coffres secrets ---------- */
.cf-tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.cf-tete h1 { margin: 0; }
.cf-solde { font-weight: 700; color: var(--muted); }
.cf-compteur { color: var(--text); font-variant-numeric: tabular-nums; }
.cf-liste { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 14px; }
@media (min-width: 900px) { .cf-liste { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cf-carte { display: grid; gap: 12px; padding: 16px; border-radius: 18px; background: var(--ui-base); border: 1px solid var(--ui-edge); }
.cf-haut { display: flex; align-items: center; gap: 14px; }
.cf-infos { display: grid; gap: 4px; min-width: 0; }
.cf-infos strong { font-size: 1.05rem; }
.cf-chiffres { color: var(--muted); font-size: .85rem; }
.cf-lot { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--accent); }
.cf-lot .pv { width: 34px; flex: none; background: none; }
.cf-lot.grand { font-size: 1.1rem; }
.cf-lot.grand .pv { width: 52px; }
.cf-saisie { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.cf-champ { min-height: 48px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: #100e1e; color: var(--text); font: inherit; font-size: 1.4rem; font-weight: 800; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; }
.cf-champ:focus { outline: 2px solid #c5b2e9; outline-offset: 1px; }
.cf-essayer { min-height: 48px; padding: 0 18px; }
.cf-msg { margin: 0; min-height: 1.2em; color: #ff9aa5; font-weight: 700; }
.cf-msg:empty { display: none; }
.cf-coffre {
  display: block; flex: none; width: 64px; height: 64px; object-fit: contain;
  transition: transform .5s cubic-bezier(.3, 1.4, .5, 1);
  /* Silhouette commune aux trois visuels carrés, y compris l’espace entre les pieds. */
  clip-path: polygon(
    21.21% 1.20%, 78.07% 1.20%, 80.94% 1.83%, 84.53% 3.99%, 87.08% 6.38%, 90.27% 9.97%, 93.06% 13.96%, 94.50% 17.94%, 94.82% 20.33%,
    94.82% 78.79%, 94.42% 81.66%, 93.62% 83.73%, 92.34% 85.73%, 90.43% 87.72%, 90.35% 88.76%, 90.83% 94.90%,
    90.59% 95.69%, 90.03% 96.49%, 88.36% 97.61%, 86.92% 97.93%, 72.57% 97.93%, 71.37% 97.61%, 70.41% 96.81%, 67.30% 90.67%,
    31.74% 90.67%, 28.63% 96.81%, 27.67% 97.61%, 26.56% 97.93%, 12.12% 97.93%, 10.69% 97.61%, 9.01% 96.49%, 8.45% 95.69%, 8.29% 94.90%,
    8.77% 88.76%, 8.61% 87.72%, 6.78% 85.73%, 5.58% 83.73%, 4.78% 81.66%, 4.39% 78.79%, 4.39% 20.33%, 4.63% 17.94%, 6.14% 13.96%,
    9.01% 9.97%, 12.28% 6.38%, 14.83% 3.99%, 18.18% 1.91%
  );
}
.cf-coffre.ouvert { transform: scale(1.08); }
.cf-victoire { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgba(6, 5, 14, .72); animation: voile .2s ease-out; }
.cf-victoire-panneau { display: grid; justify-items: center; gap: 12px; width: min(100%, 360px); padding: 24px 16px; border-radius: 20px; background: var(--ui-panel); border: 1px solid var(--ui-edge); text-align: center; }
.cf-victoire-panneau > strong { font-size: 1.4rem; }
.cf-victoire-coffre .cf-coffre { width: 110px; height: 110px; }
.cf-victoire-code { font-size: 1.3rem; font-weight: 900; letter-spacing: .3em; color: #f2c35b; font-variant-numeric: tabular-nums; }
.cf-victoire-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
/* Home : bandeau des trois coffres. */
.home-coffres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 12px 8px; border-radius: 18px; background: var(--ui-panel); border: 1px solid var(--ui-edge); color: var(--text); text-decoration: none; }
.home-coffres .hcf + .hcf { border-left: 1px solid var(--ui-edge); }
.hcf { display: grid; justify-items: center; gap: 8px; font-weight: 700; font-size: .9rem; }
@media (prefers-reduced-motion: reduce) { .cf-coffre { transition: none; } .cf-victoire { animation: none; } }
.cf-lot .pv { width: 30px; aspect-ratio: 3 / 4; }
.cf-lot .pv b, .cf-lot .pv small { display: none; }
.cf-lot .pv i { font-size: .7rem; }
@media (max-width: 380px) { .cf-victoire-actions { grid-template-columns: 1fr; } }

/* Visuels réels des produits : image entière, centrée, sans déformation. */
.pv.pv-img { position: relative; background: none; overflow: visible; }
.pv.pv-img img { position: absolute; inset: 4%; width: 92%; height: 92%; object-fit: contain; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .45)); }
.cf-lot .pv.pv-img { width: 34px; aspect-ratio: 1; }

/* ---------- Pass de saison ---------- */
.hp-chemin i.on { background: #f2c35b; border-color: #f2c35b; color: #231a00; }
.ps-tete h1 { margin: 0 0 12px; }
.ps-saison { display: grid; gap: 12px; padding: 16px; border-radius: 20px; background: var(--ui-panel); border: 1px solid var(--ui-edge); }
.ps-ligne { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ps-nom { font-size: 1.15rem; font-weight: 900; }
.ps-fin { margin-left: auto; color: var(--muted); font-size: .85rem; }
.ps-fin strong { color: var(--text); font-variant-numeric: tabular-nums; }
.ps-niveau { display: flex; align-items: center; gap: 14px; }
.ps-rond { flex: none; display: grid; place-items: center; align-content: center; gap: 2px; width: 52px; height: 52px; border-radius: 12px; background: var(--ui-raised); color: #e3d7ff; font-size: 1.25rem; font-weight: 700; line-height: 1; }
.ps-rond small { font-size: .62rem; font-weight: 700; color: var(--muted); }
.ps-xp { display: grid; gap: 6px; flex: 1; min-width: 0; }
.ps-barre { display: block; height: 10px; border-radius: 5px; background: #120f26; overflow: hidden; }
.ps-barre > span { display: block; height: 100%; border-radius: 5px; background: var(--ui-accent); transition: width .18s ease; }
.ps-chiffres { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.ps-attente { margin-top: 18px; }
.ps-attente h2 { font-size: 1rem; margin: 0 0 8px; }
.ps-paliers { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; }
.ps-attente .ps-paliers { margin: 0; }
.ps-palier { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 60px; padding: 8px 12px; border-radius: 14px; background: var(--surface); border: 1px solid rgba(255, 255, 255, .05); }
.ps-palier.verrouille { opacity: .55; }
.ps-palier.prochain { opacity: 1; border-color: rgba(242, 195, 91, .4); }
.ps-palier.disponible { border-color: #f2c35b; background: linear-gradient(90deg, rgba(242, 195, 91, .12), var(--surface)); }
.ps-palier.recupere .ps-num { background: var(--surface-2); color: var(--muted); }
.ps-num { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #1b1640; font-weight: 900; font-size: .9rem; }
.ps-pc { font-weight: 800; }
.ps-produit { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; }
.ps-produit .pv { width: 40px; flex: none; }
.ps-etat { min-width: 44px; text-align: center; font-size: 1.1rem; color: var(--muted); }
.ps-palier .btn { min-height: 40px; padding: 0 14px; }
.ps-msg { grid-column: 1 / -1; color: #ff9aa5; font-size: .85rem; }
.ps-msg:empty { display: none; }
.ps-ouvrir { grid-column: 1 / -1; justify-self: end; font-weight: 700; color: #9cc3ff; }
.ps-histo { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ps-histo li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface); font-size: .9rem; }
.ps-date { color: var(--muted); font-size: .8rem; }
.ps-histo strong { color: #f2c35b; font-variant-numeric: tabular-nums; }
/* Piste des récompenses façon battle pass : cases côte à côte, ligne de progression qui relie les niveaux. */
.ps-piste { position: relative; list-style: none; display: flex; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
  margin: 14px calc(-1 * var(--gutter-r)) 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter-r) 8px var(--gutter); }
.ps-piste::-webkit-scrollbar { display: none; }
.ps-case { position: relative; flex: 0 0 96px; display: grid; grid-template-rows: 96px 34px auto; justify-items: center; align-items: center; gap: 6px; scroll-snap-align: center; text-align: center; }
.ps-case::before { content: ""; position: absolute; top: 117px; left: 0; right: 0; height: 4px; background: #2a2550; }
.ps-case:first-child::before { left: 50%; }
.ps-case:last-child::before { right: 50%; }
.ps-case.atteint::before { background: #f2c35b; }
.ps-case-lot { display: grid; place-items: center; width: 86px; height: 96px; padding: 6px; border-radius: 14px; background: var(--ui-panel); border: 1px solid var(--ui-edge); font-size: .72rem; line-height: 1.15; overflow: hidden; }
.ps-case-lot .ps-produit { flex-direction: column; gap: 4px; }
.ps-case-lot .ps-produit .pv { width: 40px; }
.ps-case-lot .ps-pc { font-size: .85rem; }
.ps-case.disponible .ps-case-lot { border-color: #f2c35b; box-shadow: 0 0 0 2px rgba(242, 195, 91, .35); background: linear-gradient(180deg, rgba(242, 195, 91, .2), var(--surface)); }
.ps-case.verrouille .ps-case-lot { opacity: .6; }
.ps-case.recupere .ps-case-lot { opacity: .45; }
.ps-case-noeud { position: relative; z-index: 1; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #1b1640; border: 2px solid #3a3366; font-weight: 900; font-size: .85rem; }
.ps-case.atteint .ps-case-noeud { border-color: #f2c35b; background: #3b2a86; }
.ps-case .btn { min-height: 44px; padding: 0 10px; font-size: .8rem; }
.ps-case .ps-etat { min-width: 0; }
.ps-case .ps-msg { font-size: .7rem; }
.ps-case .ps-ouvrir { justify-self: center; font-size: .8rem; }

/* ---------- Récompense du jour (Inventaire) ---------- */
.qd-tete { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.qd-tete h2 { margin: 0; }
.qd-fin { margin-left: auto; color: var(--muted); font-size: .85rem; }
.qd-fin strong { color: var(--text); font-variant-numeric: tabular-nums; }
.qd-parts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.qd-part { display: grid; grid-template-rows: minmax(96px, auto) 1fr auto; align-items: center; justify-items: center; gap: 8px; padding: 12px; border-radius: 16px; background: var(--ui-panel); border: 1px solid var(--ui-edge); text-align: center; }
.qd-part.recupere { background: var(--surface); border-color: rgba(255, 255, 255, .06); }
.qd-part .pv { width: 64px; aspect-ratio: 2 / 3; }
.qd-piece { display: grid; place-items: center; width: 64px; height: 64px; font-size: 2.6rem; }
.qd-titre { font-weight: 800; }
.qd-part .btn { width: 100%; min-height: 44px; }
.qd-part .qd-ouvrir { background: var(--accent); color: var(--accent-ink); }
.qd-part .qd-ouvert { background: var(--surface-2); color: var(--muted); cursor: default; }
.qd-ok { min-height: 44px; display: grid; place-items: center; color: var(--muted); font-weight: 700; }

/* ---------- Gamme Doublons (Recyclage) ---------- */
.dbl-gamme { list-style: none; margin: 0; padding: 0 0 4px; display: grid; grid-auto-flow: column; grid-auto-columns: min(74%, 160px); gap: 8px; overflow-x: auto; overscroll-behavior-inline: contain; scroll-snap-type: x proximity; }
.dbl-gamme img { -webkit-user-drag: none; }
@media (hover: hover) and (pointer: fine) { .recy-packs:has(.recy-packs-nav:not([hidden])) .dbl-gamme { cursor: grab; } }
.dbl-produit { display: grid; grid-template-columns: 42px minmax(0, 1fr); grid-template-rows: auto auto auto auto 1fr auto; align-content: start; gap: 3px 8px; padding: 8px; border-radius: 14px; background: var(--ui-base); border: 1px solid var(--ui-edge); min-width: 0; scroll-snap-align: start; }
.dbl-produit.dispo { border-color: rgba(120, 180, 255, .55); background: linear-gradient(160deg, rgba(90, 150, 255, .16), var(--surface) 70%); }
.dbl-produit .pv { grid-column: 1; grid-row: 1 / 4; align-self: center; width: 42px; }
.dbl-nom { grid-column: 2; grid-row: 1; font-size: .83rem; font-weight: 750; line-height: 1.2; }
.dbl-cartes { grid-column: 2; grid-row: 2; color: var(--muted); font-size: .7rem; }
.dbl-prix { grid-column: 2; grid-row: 3; color: #d2beff; font-size: .8rem; font-variant-numeric: tabular-nums; }
.dbl-produit .meter { grid-column: 1 / -1; grid-row: 4; width: 100%; height: 4px; margin: 2px 0; }
.dbl-manque { grid-column: 1 / -1; grid-row: 5; color: var(--muted); font-size: .7rem; }
.dbl-manque:empty { display: none; }
.dbl-actions { grid-column: 1 / -1; grid-row: 6; display: grid; gap: 4px; width: 100%; margin-top: 4px; }
.dbl-actions .btn { width: 100%; min-height: 44px; padding: 0 6px; font-size: .8rem; }
@media (min-width: 760px) { .dbl-gamme { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-columns: auto; } }

/* ---------- Missions du Pass ---------- */
.ms-liste { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.ms-ligne { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 12px; border-radius: 14px; background: var(--ui-base); border: 1px solid var(--ui-edge); }
.ms-ligne.disponible { border-color: rgba(205, 186, 255, .22); background: var(--ui-panel); }
.ms-ligne.termine { opacity: .6; }
.ms-corps { display: grid; gap: 5px; min-width: 0; }
.ms-nom { font-weight: 650; line-height: 1.35; }
.ms-barre { display: block; height: 6px; border-radius: 3px; background: #120f26; overflow: hidden; }
.ms-barre > span { display: block; height: 100%; border-radius: 3px; background: #b5a1e1; }
.ms-chiffres { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; }
.ms-ligne .btn { min-height: 44px; padding: 0 12px; white-space: nowrap; }
.ms-ligne .ps-msg { grid-column: 1 / -1; }
@media (min-width: 900px) { .ms-liste { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Administration des cartes ---------- */
.adm-h1 { margin: 0 0 12px; }
.adm-chips { flex-wrap: wrap; overflow: visible; } /* les 7 raretés visibles sans défiler, Secrète comprise (14/11/2026) */
.adm-grille { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.adm-item { position: relative; }
.adm-rouage { position: absolute; left: 4px; top: 4px; z-index: 5; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 2px solid #15121f; background: var(--accent); color: var(--accent-ink); cursor: pointer; }
.adm-rouage .ico { width: 20px; height: 20px; }
/* Éditeur plein écran : la carte prend la place restante, le menu reste visible dessous, sans défilement. */
.adm-modal { position: fixed; inset: 0; z-index: 90; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 8px; height: 100dvh;
  padding: max(8px, env(safe-area-inset-top)) 12px max(8px, env(safe-area-inset-bottom)); background: rgba(10, 8, 20, .97); }
.adm-scene { min-height: 0; display: grid; place-items: center; }
.adm-cadre { height: 100%; max-height: 100%; aspect-ratio: 5 / 7; max-width: 100%; }
.adm-cadre .tc { width: 100%; }
.adm-menu { display: grid; gap: 8px; width: min(520px, 100%); justify-self: center; }
.adm-num { font-size: .85rem; color: var(--muted); }
.adm-tabs, .adm-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 3px; border-radius: 12px; background: var(--surface); }
.adm-tab, .adm-seg-btn { min-height: 36px; border: 0; border-radius: 9px; background: none; color: var(--muted); font: inherit; font-weight: 700; cursor: pointer; }
.adm-tab[aria-selected="true"], .adm-seg-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.adm-onglet { display: grid; gap: 6px; }
.adm-curseur { display: grid; grid-template-columns: 24px minmax(0, 1fr) 64px; align-items: center; gap: 8px; color: var(--muted); }
.adm-curseur input { width: 100%; min-height: 32px; accent-color: var(--accent); }
.adm-val { text-align: right; font-variant-numeric: tabular-nums; color: var(--text); }
.adm-curseur input.adm-val { min-height: 32px; padding: 0 6px; border: 1px solid var(--ui-edge); border-radius: 8px; background: var(--surface-2); font: inherit; font-size: 16px; }
.adm-couleur { display: grid; grid-template-columns: minmax(0, 1fr) 64px 44px; align-items: center; gap: 8px; }
.adm-couleur input { width: 64px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: none; }
.adm-texte { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: center; gap: 8px; }
.adm-champ { width: 100%; min-height: 38px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font: inherit; resize: none; }
.adm-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; }
.adm-actions .btn, .adm-onglet > .btn { min-height: 44px; }
@media (min-width: 700px) { .adm-grille { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* Filtres de rareté (06/11) : plus compacts, fond plein de la couleur de la rareté, compteur de cartes ; filtre actif cerclé. */
.chips .chip { min-height: 32px; padding: 0 10px; gap: 6px; font-size: .8rem; }
.chip[class*="chip-"] { background: var(--rc); border-color: var(--rc); color: #15121f; }
.chip[class*="chip-"][aria-current="true"], .chip[class*="chip-"][aria-pressed="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px #fff; }
.chip.chip-S, .chip.chip-S[aria-current="true"] { background: linear-gradient(90deg, #ff6b9a, #ffd36b, #7dffb2, #6bd0ff, #b48bff) border-box; color: #15121f; }
.chip-n { display: inline-grid; place-items: center; min-width: 20px; height: 18px; padding: 0 5px; border-radius: 99px; background: rgba(0, 0, 0, .28); color: #fff; font-size: .72rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.chip:not([class*="chip-"]) .chip-n { background: var(--surface-2); }
/* Éditeur compact (tient aussi sur un iPhone 320 × 568). */
.adm-menu { gap: 6px; }
.adm-tab, .adm-seg-btn { min-height: 32px; font-size: .85rem; }
.adm-seg { grid-auto-columns: minmax(0, 1fr); }
.adm-raz { grid-column: auto; max-width: 40px; font-size: 1.1rem; }
.adm-onglet { gap: 4px; }
.adm-curseur input { min-height: 26px; }
.adm-actions .btn { min-height: 40px; }
.adm-champ { min-height: 34px; padding: 5px 10px; }
.adm-couleur input { height: 32px; }
@media (max-height: 700px) { .adm-num { display: none; } .adm-tab, .adm-seg-btn { min-height: 30px; } }
/* Filtre actif : liseré blanc fin à l'intérieur (l'anneau extérieur était coupé par la bande défilante). */
.chip[class*="chip-"][aria-current="true"], .chip[class*="chip-"][aria-pressed="true"] { box-shadow: inset 0 0 0 2px #fff; }

/* ---------- Paris sportifs ---------- */
.pr-onglets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pr-onglets .cl-onglet { padding-inline: 4px; font-size: .85rem; }
.pr-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pr-match, .pr-pari { display: grid; gap: 8px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid rgba(255, 255, 255, .05); }
.pr-entete { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--muted); font-size: .78rem; }
.pr-entete strong { color: var(--text); font-size: .9rem; }
.pr-badge { padding: 2px 8px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: .72rem; }
.pr-badge.ferme { background: var(--surface-2); color: var(--muted); }
.pr-equipes { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; }
.pr-equipe { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 800; font-size: .92rem; }
.pr-equipe span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-equipe.ext { justify-content: flex-end; text-align: right; }
.pr-logo { flex: none; width: 28px; height: 28px; object-fit: contain; }
.pr-logo-vide { display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); font-size: .6rem; font-weight: 800; color: var(--muted); }
.pr-score { font-weight: 900; font-variant-numeric: tabular-nums; color: var(--muted); }
.pr-cotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pr-cote { display: grid; justify-items: center; gap: 1px; min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font: inherit; cursor: pointer; }
.pr-cote small { color: var(--muted); font-size: .7rem; font-weight: 700; }
.pr-cote strong { font-variant-numeric: tabular-nums; }
.pr-cote.actif { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pr-cote.actif small { color: var(--accent-ink); }
.pr-cote:disabled { opacity: .45; cursor: default; }
.pr-coupon { position: sticky; bottom: calc(var(--tabbar-h, 64px) + 8px); z-index: 20; display: grid; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--accent); box-shadow: 0 8px 24px rgba(0, 0, 0, .45); }
.pr-sel { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 26vh; overflow-y: auto; font-size: .82rem; }
.pr-sel li { display: grid; grid-template-columns: minmax(0, 1fr) auto 44px; align-items: center; gap: 6px; }
.pr-sel li span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.pr-retirer { width: 44px; height: 44px; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.pr-total { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; font-size: .85rem; }
.pr-mise { width: 100%; min-height: 44px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--ui-edge); background: var(--ui-night); color: var(--text); font: inherit; font-size: 16px; font-weight: 700; text-align: center; }
.pr-actions { display: grid; grid-template-columns: 48px 1fr; gap: 8px; }
.pr-actions .btn { min-height: 44px; }
.pr-statut { padding: 2px 8px; border-radius: 99px; font-weight: 800; font-size: .72rem; background: var(--surface-2); color: var(--text); }
.pr-statut.gagne { background: #2f9e5a; color: #fff; } .pr-statut.perdu { background: #8a2f3c; color: #fff; } .pr-statut.ouvert { background: var(--accent); color: var(--accent-ink); }
.pr-jambes { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; color: var(--muted); font-size: .8rem; }
.pr-montants { display: flex; justify-content: space-between; gap: 8px; font-size: .85rem; }
.pr-raison { margin: 0; color: var(--muted); font-size: .78rem; }
.pr-pari .btn-small { justify-self: end; }
.pr-classement { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pr-classement li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface); }
.pr-classement li.moi { border: 1px solid var(--accent); }
.pr-rang { font-weight: 900; color: var(--muted); text-align: center; }
.pr-pseudo { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-ratio { color: var(--muted); font-size: .8rem; }
.pos { color: #5fd38d; } .neg { color: #ff8a99; }
/* Cotes plus compactes (06/11) : libellé et cote sur une ligne ; double chance en dessous, encore plus discrète. */
.pr-cotes { gap: 5px; }
.pr-cote { display: flex; justify-content: space-between; align-items: center; gap: 4px; min-height: 44px; padding: 0 9px; border-radius: 8px; font-size: .85rem; }
.pr-cote small { font-size: .68rem; }
.pr-cotes.double { margin-top: -3px; }
.pr-cotes.double .pr-cote { min-height: 44px; font-size: .76rem; background: transparent; }
/* Carrousel des dates et menu des compétitions (06/11). */
.pr-dates { display: grid; grid-auto-flow: column; grid-auto-columns: 74px; gap: 6px; overflow-x: auto; padding: 2px 0 8px; margin: 0 0 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.pr-dates::-webkit-scrollbar { display: none; }
.pr-date { display: grid; justify-items: center; gap: 2px; min-height: 48px; padding: 4px 2px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: .8rem; font-weight: 800; cursor: pointer; text-transform: capitalize; }
.pr-date small { color: var(--muted); font-size: .68rem; font-weight: 700; }
.pr-date.vide { opacity: .55; }
.pr-date.actif { background: #d5c5f5; border-color: #d5c5f5; color: #231a35; opacity: 1; }
.pr-date.actif small { color: inherit; }
.pr-menu { width: 100%; min-height: 44px; margin: 0 0 10px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-weight: 800; }
.pr-comp { font-size: .95rem; margin: 6px 0 8px; }
.pr-dates { grid-auto-columns: 82px; }
.pr-date { white-space: nowrap; font-size: .76rem; }
/* Dates sur une ligne, cases plus petites ; menu des compétitions moins haut (06/11). */
.pr-dates { grid-auto-columns: max-content; gap: 5px; padding-bottom: 6px; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
.pr-date { scroll-snap-align: center; }
.pr-date { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; padding: 0 10px; border-radius: 99px; font-size: .74rem; }
.pr-date small { font-size: .66rem; }
.pr-menu { min-height: 44px; padding: 0 10px; border-radius: 10px; font-size: .85rem; margin-bottom: 8px; }
/* Accordéon des compétitions (06/11) : « Ligue 1 › » ouvre ou replie ses matchs. */
.pr-bloc { margin: 0 0 8px; background: var(--ui-base); border: 1px solid var(--ui-edge); border-radius: 12px; }
.pr-bloc > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 10px 12px; line-height: 1.2; font-weight: 650; font-size: .8rem; cursor: pointer; }
.pr-bloc .pr-liste { gap: 0; }
.pr-bloc .pr-match { background: none; border: 0; border-top: 1px solid rgba(255, 255, 255, .08); border-radius: 0; padding: 8px 10px; gap: 6px; }
.pr-bloc > summary::-webkit-details-marker { display: none; }
.pr-bloc > summary::after { content: "›"; display: inline-block; font-size: 1.1rem; line-height: 1; color: var(--muted); transition: transform .2s; }
.pr-bloc[open] > summary::after { transform: rotate(90deg); }

/* Tickets à gratter (Casino) : ticket coloré, grille 3 × 3 sous une couche argentée à gratter. */
.tk { display: grid; gap: 12px; justify-items: center; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.tk-histo { justify-self: stretch; }
.tk-ticket { width: min(100%, 340px); display: grid; gap: 10px; padding: 14px; border-radius: 18px; color: #1b1035;
  background: linear-gradient(150deg, #ffcf5a 0%, #ff8a5c 45%, #c2409a 100%); box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
.tk-tete { display: flex; justify-content: space-between; align-items: baseline; font-weight: 900; }
.tk-tete strong { font-size: 1.25rem; }
.tk-surface { position: relative; border-radius: 12px; overflow: hidden; background: #fff7e6; }
.tk-cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 8px; }
.tk-case { display: grid; place-items: center; aspect-ratio: 1.3; border-radius: 10px; background: #fff; color: #2b1f63; font-weight: 900; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.tk-case > span { display: grid; justify-items: center; line-height: 1.1; }
.tk-case small { font-size: .65rem; font-weight: 700; color: #7a6aa8; }
.tk-surface.fini .tk-case.gagnante { background: #ffe27a; box-shadow: inset 0 0 0 3px #f2a900; animation: tk-pulse 1s ease-in-out 2; }
@keyframes tk-pulse { 50% { transform: scale(1.06); } }
.tk-couche { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; transition: opacity .5s; }
.tk-couche.ferme { background: linear-gradient(135deg, #b9bccb, #e6e8f0, #a6a9ba); cursor: default; }
.tk-couche.gratte { opacity: 0; pointer-events: none; }
.tk-resultat { margin: 0; min-height: 1.4em; text-align: center; font-weight: 900; font-size: 1.15rem; }
.tk-msg { margin: 0; text-align: center; color: #ff9aa5; }
.tk-msg:empty { display: none; }
.tk-plus { color: var(--accent); }
.tk-zero { color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .tk-surface.fini .tk-case.gagnante { animation: none; } }
.tk-accordeon { border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.tk-accordeon > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 14px; font-weight: 800; cursor: pointer; }
.tk-accordeon > summary::-webkit-details-marker { display: none; }
.tk-accordeon > summary::after { content: "›"; font-size: 1.3rem; color: var(--muted); transition: transform .2s; }
.tk-accordeon[open] > summary::after { transform: rotate(90deg); }
.tk-accordeon .list { padding: 0 10px 10px; }

/* Vignettes des jeux d'Arcade (07/11/2026) : page Arcade (tuile avec image à gauche) et carrousel de la Home. */
.vignette-jeu { display: block; aspect-ratio: 1; }
.vignette-jeu svg { display: block; width: 100%; height: 100%; }
.tile.tile-visuel { display: grid; grid-template-columns: 64px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 12px; }
.tile.tile-visuel .vignette-jeu { grid-row: 1 / 3; width: 64px; }
.tile.tile-visuel .tile-title { align-self: end; margin: 0; }
.tile.tile-visuel .tile-text { align-self: start; }
.casino-jeux .tile.tile-visuel {
  position: relative; display: block; padding: 0; border: 0; background: transparent;
  aspect-ratio: 2172 / 542; border-radius: 4% / 16%; overflow: hidden;
}
.casino-jeux .casino-image { display: block; width: 100%; height: 100%; object-fit: cover; }
.arcade-catalogue .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 600px) {
  .arcade-catalogue .tiles { grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); }
}
.arcade-catalogue .tile.tile-visuel { grid-template: auto 1fr auto / minmax(0, 1fr); gap: 4px; padding: 8px; background: var(--ui-base); }
.arcade-catalogue .tile.tile-visuel .vignette-jeu { grid-row: auto; width: 100%; margin-bottom: 4px; }
.arcade-catalogue .tile-title, .arcade-catalogue .tile-text { padding-inline: 4px; }
.arcade-catalogue .tile-text { color: var(--ui-faint); font-size: .78rem; }
.home-jeu { text-align: center; }
.home-jeu .vignette-jeu { width: 100%; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cartes-entete { margin-bottom: 8px; }
.cartes-entete h1 { margin: 0; }
.cartes-entete .btn { flex-shrink: 0; padding-inline: 10px; font-size: .8rem; }
.cartes-contenu:has(.vente-cartes-barre:not([hidden])) { padding-bottom: 72px; }
.vente-cartes-message { color: var(--muted); }
.vente-cartes-message:empty { display: none; }
.vente-carte-bouton[aria-pressed="true"] { outline: 3px solid var(--ui-accent); outline-offset: 2px; border-radius: 10px; }
/* Pastilles du mode vente (10/11, Simon) : petits cercles pleins en haut à gauche de la carte, une par origine. */
.vente-carte { position: relative; }
.vente-carte-quantites { position: absolute; top: 4px; left: 4px; z-index: 4; display: flex; flex-wrap: wrap; gap: 3px; max-width: calc(100% - 8px); pointer-events: none; }
.vente-carte-quantites button, .vente-legende i { --pastille: #b4b0c2; --pastille-ink: #17141f; }
.vente-carte-quantites .origine-fidelite, .vente-legende .origine-fidelite { --pastille: #7f45d1; --pastille-ink: #fff; }
.vente-carte-quantites .origine-recyclage, .vente-legende .origine-recyclage { --pastille: #3fc9a6; --pastille-ink: #0e2620; }
.vente-carte-quantites button { position: relative; display: grid; place-items: center; min-width: 28px; height: 28px; margin: 0; padding: 0 5px; border-radius: 99px;
  border: 2px solid #15121f; background: var(--pastille); color: var(--pastille-ink); font-size: 12px; font-weight: 900; line-height: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .6); cursor: pointer; pointer-events: auto; }
.vente-carte-quantites button::after { content: ""; position: absolute; inset: -8px -2px; }
.vente-carte-quantites button[aria-pressed="false"] { border-color: var(--pastille); background: rgba(10, 8, 18, .78); color: var(--pastille); }
.vente-legende { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 10px; color: var(--muted); font-size: .8rem; }
.vente-legende span { display: inline-flex; align-items: center; gap: 6px; }
.vente-legende i { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #15121f; background: var(--pastille); }
.page-info { position: relative; flex: 0 0 auto; color: var(--text); }
.page-info > summary { display: grid; width: 44px; height: 44px; place-items: center; cursor: pointer; list-style: none; }
.page-info > summary::-webkit-details-marker { display: none; }
.page-info > summary span { display: grid; width: 24px; height: 24px; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-weight: 700; }
.page-info-contenu { position: absolute; z-index: 12; inset-inline-end: 0; top: 100%; width: min(360px, calc(100vw - 36px)); max-height: 55vh; overflow: auto; padding: 14px; border: 1px solid #4a405d; border-radius: 14px; background: #241f33; box-shadow: 0 8px 24px #0006; font-size: .9rem; }
.page-info-contenu p { margin: 0 0 8px; }
.page-info-contenu p:last-child { margin-bottom: 0; }
.profil-statistiques { margin-block: 16px; }
.profil-onglets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; margin: 0 0 12px; padding: 4px; border-radius: 14px; background: #201b2c; }
.profil-onglets button { min-height: 44px; padding: 4px 2px; border: 0; border-radius: 10px; background: transparent; color: #c4bad4; font: inherit; font-size: clamp(.72rem, 3.3vw, .92rem); font-weight: 650; cursor: pointer; }
.profil-onglets button[aria-selected="true"] { background: #3a3050; color: #fff; }
.profil-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.profil-stats .stat { min-width: 0; padding: 10px 12px; text-align: start; }
.profil-stats .stat-value { overflow-wrap: anywhere; font-size: clamp(.9rem, 4.2vw, 1.2rem); font-variant-numeric: tabular-nums; }
.profil-stats .stat-label { margin-top: 3px; }
.profil-bloc { margin-top: 18px; }
.profil-bloc h3 { margin-bottom: 8px; }
.profil-raretes { margin: 0; padding: 0; list-style: none; }
.profil-raretes li { padding: 10px 0; border-bottom: 1px solid #342b44; }
.profil-raretes li > div:first-child { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 5px; }
.profil-raretes li span { color: #c4bad4; text-align: end; font-size: .8rem; }
.profil-raretes .meter { height: 4px; }
.infos-tableau { margin-block: 12px; padding: clamp(10px, 2vw, 20px); border: 1px solid var(--ui-edge); border-radius: 16px; background: var(--ui-base); }
.infos-tableau h3 { margin: 0 0 8px; font-size: clamp(1rem, 3vw, 1.3rem); letter-spacing: .02em; text-transform: uppercase; }
.infos-tableau table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: .84rem; line-height: 1.5; }
.infos-tableau th, .infos-tableau td { padding: 6px; border-bottom: 1px solid var(--ui-edge); text-align: start; vertical-align: top; overflow-wrap: anywhere; }
.infos-tableau th:first-child { width: 24%; }
.infos-tableau thead { color: var(--muted); font-size: .68rem; letter-spacing: .03em; text-transform: uppercase; }
.infos-tableau tbody tr:nth-child(odd) { background: var(--ui-edge); }
.infos-tableau tbody td { color: var(--muted); }
.infos-taux { display: inline-block; max-width: 100%; }
.infos-rarete { color: var(--rc, #f8baf4); font-weight: 700; }
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .infos-rarete.chip-S { color: transparent; background: linear-gradient(90deg, #ff6b9a, #ffd36b, #7dffb2, #6bd0ff, #b48bff); background-clip: text; -webkit-background-clip: text; }
}

/* Première connexion */
.bienvenue { width: min(100%, 480px); margin: clamp(16px, 5vh, 48px) auto; padding: clamp(14px, 4vw, 28px); border: 1px solid var(--ui-edge); border-radius: 22px; background: var(--ui-base); }
.bienvenue-logo { display: block; width: min(52%, 180px); height: auto; margin: 0 auto 20px; }
.bienvenue h1 { margin: 0 0 14px; font-size: clamp(1.5rem, 5vw, 2rem); line-height: 1.15; text-align: center; }
.bienvenue-nouveautes { display: grid; gap: 8px; list-style: none; margin: 0 0 16px; padding: 0; }
.bienvenue-nouveautes li { display: flex; align-items: start; gap: 10px; padding: 8px; border-radius: 10px; background: var(--ui-panel); }
.bienvenue-nouveautes p, .bienvenue-form p { margin: 2px 0 0; color: var(--muted); font-size: .84rem; }
.bienvenue-form { display: grid; gap: 8px; }
.bienvenue-form label { font-weight: 750; }
.bienvenue-form input { width: 100%; min-height: 46px; padding: 8px 12px; border: 1px solid var(--ui-edge); border-radius: 10px; background: var(--ui-night); color: var(--text); font: inherit; font-size: 16px; }
.bienvenue-form .bienvenue-erreur { color: #ff9aa5; }
.bienvenue-mdp { display: grid; gap: 8px; }
.bienvenue-mdp-champ { display: flex; align-items: center; min-height: 46px; padding: 0 0 0 12px; border: 1px solid var(--ui-edge); border-radius: 10px; background: var(--ui-night); }
.bienvenue-prefixe { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 16px; user-select: none; }
.bienvenue-form .bienvenue-mdp-champ input { flex: 1 1 6ch; min-width: 6ch; min-height: 44px; padding: 8px 12px 8px 1px; border: 0; background: none; letter-spacing: .12em; }
.bienvenue-mdp-champ:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.bienvenue-mdp-champ input:focus, .bienvenue-mdp-champ input:focus-visible { outline: none; }
.bienvenue-form .btn { width: 100%; }
.bienvenue-form .bienvenue-oubli { min-height: 36px; font-size: .84rem; }
.bienvenue-form .bienvenue-info { color: var(--text); }
.site-ferme { text-align: center; }
.site-ferme p { color: var(--muted); }

/* Administration */
.admin-panneau { display: grid; gap: 12px; max-width: 760px; }
.admin-bloc { padding: 14px; border: 1px solid var(--ui-edge); border-radius: 16px; background: var(--ui-panel); }
.admin-bloc h2 { margin: 0; font-size: 1rem; }
.admin-bloc summary { min-height: 30px; padding-block: 4px; font-weight: 750; cursor: pointer; }
.admin-site { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.admin-site [role="switch"] { min-width: 74px; font-weight: 800; }
.admin-site [role="switch"][aria-checked="true"] { background: var(--ui-accent); color: var(--ui-ink); }
.admin-commandes { display: grid; gap: 8px; }
.admin-recherche, .admin-action { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.admin-action label { grid-column: 1 / -1; }
.admin-commandes label { font-size: .87rem; font-weight: 650; }
.admin-commandes input, .admin-commandes select { min-width: 0; width: 100%; min-height: 44px; padding: 7px; border: 1px solid var(--ui-edge); border-radius: 9px; background: var(--ui-base); color: var(--text); font: inherit; font-size: 16px; }
.admin-info { margin: 0; color: var(--muted); font-size: .85rem; }
.admin-info:empty { display: none; }
.admin-lignes { display: grid; margin: 0; padding: 0; list-style: none; }
.admin-lignes li { display: grid; gap: 3px; padding: 9px 0; border-top: 1px solid var(--ui-edge); overflow-wrap: anywhere; }
.admin-lignes small { color: var(--muted); }
.admin-bloc details + .btn, .admin-bloc > .admin-info + .btn { margin-top: 8px; }
@media (max-width: 359px) { .admin-action { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 640px) {
  .profil-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Revue visuelle du 12/11/2026 (demandes de Simon) ---------- */
/* Filtres de rareté et jours des Paris : plus compacts. shortcut: cible tactile de 30 px au lieu de 44, à remonter si les appuis ratent sur mobile. */
.ui-page .chips { gap: 5px; }
.ui-page .chips .chip { min-height: 30px; padding: 0 9px; gap: 5px; font-size: .72rem; border-width: 1px; }
.ui-page .chips .chip .chip-n { font-size: .66rem; }
.pr-dates { gap: 4px; }
.pr-date { min-height: 30px; padding: 0 8px; gap: 4px; font-size: .68rem; }
.pr-date small { font-size: .62rem; }
/* Paris : nombre de matchs juste devant la flèche. */
.pr-comp-nom { flex: 1; min-width: 0; }
.pr-nb { margin-right: 8px; min-width: 22px; padding: 2px 7px; border-radius: 999px; background: var(--ui-raised); font-size: .72rem; font-weight: 750; text-align: center; font-variant-numeric: tabular-nums; }
/* Barre du bas : une couleur par onglet (icône seulement, le libellé garde la couleur d'état). */
.tab[data-tab="/"] svg { color: #ffc94a; }
.tab[data-tab="/tcg/cartes"] svg { color: #a78bff; }
.tab[data-tab="/tcg/boutique"] svg { color: #ff7fb5; }
.tab[data-tab="/profil"] svg { color: #6bd0ff; }
.tab:not([aria-current="page"]) svg { opacity: .8; }
/* Salle des trophées : le cadre est borné par la hauteur de l'écran pour tenir sans défilement sur mobile (cadre ≈ 1,4 × sa largeur ; 376 px = barres, titre, onglets et marges). */
@media (max-width: 699px) {
  .ts-cadre { width: min(100%, calc((100dvh - 376px - env(safe-area-inset-top, 0px) - var(--safe-b)) / 1.4)); min-width: 210px; }
  .ts-scene { padding: 26px 14px 16px; }
}
/* Boutique : nombre impair de produits → le dernier (le plus gros) devient une fiche « vedette » pleine largeur, visuel à gauche. */
.bq-grille { gap: 10px; }
.bq-produit { padding: 10px; gap: 6px; border-radius: 20px; }
.bq-produit .pv { width: 82%; margin: 0 auto; }
.bq-nom { font-size: 1rem; font-weight: 750; }
.bq-prix { font-size: .95rem; font-weight: 800; }
.bq-grille > .bq-produit:last-child:nth-child(odd) {
  grid-column: 1 / -1; grid-template-columns: minmax(0, 42%) minmax(0, 1fr); column-gap: 14px; align-items: center; padding: 14px;
  border-color: rgba(255, 201, 74, .55); background: linear-gradient(120deg, rgba(255, 201, 74, .16), rgba(157, 131, 255, .12) 60%, var(--ui-base));
}
.bq-grille > .bq-produit:last-child:nth-child(odd) > .pv { grid-row: 1 / span 3; width: 100%; }
.bq-grille > .bq-produit:last-child:nth-child(odd) > .bq-nom { align-self: end; font-size: 1.25rem; }
.bq-grille > .bq-produit:last-child:nth-child(odd) > .bq-prix { font-size: 1.1rem; }
.bq-grille > .bq-produit:last-child:nth-child(odd) > .buy-actions { align-self: start; }
.bq-grille > .bq-produit:last-child:nth-child(odd) > [aria-live] { grid-column: 1 / -1; }

/* Fidélité : 3 compteurs sur une ligne et récompenses en tuiles 2 × 2, pour tenir sur un écran mobile sans défilement. */
.ui-page .fid-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
.ui-page .fid-stats .stat { padding: 8px; text-align: center; }
.ui-page .fid-stats .stat-value { font-size: 1.05rem; }
.ui-page .fid-stats .stat-label { font-size: .68rem; line-height: 1.2; }
.ui-page .fid-stats + h2 { margin: 0 0 8px; font-size: 1rem; }
.fid-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ui-page .fid-grille > .item { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; align-content: start; padding: 10px; }
.fid-grille .item-main { flex: none; }
.fid-grille .item-title { font-size: .98rem; }
.fid-grille .item-sub { font-size: .72rem; line-height: 1.3; }
.fid-grille .item-side { order: -1; margin: 0; text-align: left; }
.fid-grille .item-side .price { display: inline-block; padding: 2px 8px; border-radius: 999px; background: rgba(255, 201, 74, .16); color: var(--accent); font-size: .78rem; }
.fid-grille .buy-actions { margin: 2px 0 0; display: grid; gap: 6px; }
.ui-page .fid-grille .buy-actions .btn { width: 100%; min-height: 38px; padding: 0 6px; font-size: .78rem; }

/* Missions : en-tête de saison en bandeau, niveau dans un anneau doré, barres en dégradé, missions à récupérer mises en avant. */
.ps-saison { position: relative; overflow: hidden; border-color: rgba(255, 201, 74, .35);
  background: radial-gradient(120% 140% at 0% 0%, rgba(157, 131, 255, .38), transparent 60%), radial-gradient(90% 120% at 100% 100%, rgba(255, 127, 181, .22), transparent 60%), var(--ui-panel); }
.ps-rond { width: 58px; height: 58px; border-radius: 50%; background: #17122e; color: #ffe08a; box-shadow: 0 0 0 3px #ffc94a, 0 0 18px rgba(255, 201, 74, .45); }
.ps-rond small { color: #d9c98f; }
.ps-barre { height: 12px; border-radius: 999px; background: rgba(0, 0, 0, .4); }
.ps-barre > span, .ms-barre > span { border-radius: 999px; background: linear-gradient(90deg, #9d83ff, #ff7fb5 60%, #ffc94a); }
.ps-case-lot { border-radius: 16px; }
.ps-case.atteint .ps-case-noeud { background: #ffc94a; border-color: #ffe08a; color: #231a00; }
.ps-case::before { background: rgba(255, 255, 255, .14); }
.ps-case.atteint::before { background: linear-gradient(90deg, #ffc94a, #ffe08a); }
.ms-liste { gap: 10px; }
.ms-ligne { position: relative; padding: 12px 12px 12px 18px; border-radius: 16px; overflow: hidden; }
.ms-ligne::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: linear-gradient(180deg, #9d83ff, #ff7fb5); }
.ms-ligne.disponible { border-color: rgba(255, 201, 74, .6); background: linear-gradient(90deg, rgba(255, 201, 74, .16), var(--ui-panel)); }
.ms-ligne.disponible::before { background: #ffc94a; }
.ms-ligne.termine::before { background: var(--ok); }
.ms-barre { height: 8px; border-radius: 999px; background: rgba(0, 0, 0, .4); }
.ms-palier { padding: 1px 7px; border-radius: 999px; background: var(--ui-raised); color: var(--text); font-size: .7rem; }
/* Ticket à gratter : vrai ticket de loterie (bords crantés, bandeau doré brillant, prix en tampon, souche avec code-barres). */
.tk-ticket {
  position: relative; width: min(100%, 350px); gap: 10px; padding: 16px 18px 44px; border-radius: 6px; color: #2a1245;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .16) 0 10px, transparent 10px 20px),
    linear-gradient(160deg, #ffd65a 0%, #ff9f3a 45%, #ff5f8f 100%);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45), inset 0 0 0 2px rgba(255, 255, 255, .35);
  /* crans de perforation sur les deux côtés */
  -webkit-mask: radial-gradient(circle 7px at 0 50%, transparent 98%, #000) 0 0 / 51% 22px repeat-y, radial-gradient(circle 7px at 100% 50%, transparent 98%, #000) 100% 0 / 51% 22px repeat-y;
  mask: radial-gradient(circle 7px at 0 50%, transparent 98%, #000) 0 0 / 51% 22px repeat-y, radial-gradient(circle 7px at 100% 50%, transparent 98%, #000) 100% 0 / 51% 22px repeat-y;
}
.tk-tete { align-items: center; gap: 8px; }
.tk-tete strong { font-size: 1.5rem; font-style: italic; letter-spacing: -.02em; color: #fff; text-shadow: 0 2px 0 #b3371f, 0 4px 10px rgba(0, 0, 0, .35); }
.tk-tete span { flex: none; display: grid; place-items: center; min-width: 62px; padding: 6px 8px; border-radius: 999px; border: 2px dashed #2a1245; background: #fff7d6; font-size: .78rem; font-weight: 900; transform: rotate(6deg); }
.tk-surface { border-radius: 10px; background: #fff7e6; box-shadow: inset 0 0 0 2px #2a1245, 0 3px 0 rgba(0, 0, 0, .18); }
.tk-case { border: 1px dashed #c9b88a; background: #fffdf5; }
/* souche : ligne de découpe et code-barres */
.tk-ticket::before { content: ""; position: absolute; left: 14px; right: 14px; bottom: 34px; border-top: 2px dashed rgba(42, 18, 69, .55); }
.tk-ticket::after { content: ""; position: absolute; left: 22px; bottom: 9px; width: 46%; height: 18px;
  background: repeating-linear-gradient(90deg, #2a1245 0 2px, transparent 2px 4px, #2a1245 4px 7px, transparent 7px 9px, #2a1245 9px 10px, transparent 10px 13px); }
.tk-resultat { color: #2a1245; }
.tk-ticket .tk-plus { color: #0d6b3a; } .tk-ticket .tk-zero { color: #5a4a7a; }
/* Coffre-fort : choix du coffre en 3 tuiles, puis un vrai coffre (porte en acier, écran à code, clavier, volant) avec refus, acceptation et ouverture animés. */
.cf-choix { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.cf-choix-b { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border-radius: 16px; border: 1px solid var(--ui-edge); background: var(--ui-base); color: var(--text); font: inherit; cursor: pointer; }
.cf-choix-b .cf-coffre { width: 52px; height: 52px; }
.cf-choix-b strong { font-size: .86rem; }
.cf-choix-b span { color: var(--muted); font-size: .7rem; }
.cf-choix-b[aria-pressed="true"] { border-color: #ffc94a; background: linear-gradient(180deg, rgba(255, 201, 74, .2), var(--ui-base)); box-shadow: 0 0 0 1px #ffc94a; }
.cf-liste { margin-top: 12px; }
.cf-carte { justify-items: center; gap: 10px; padding: 12px; --cfx-a: #b98044; --cfx-b: #5d3716; }
.cf-carte.c2 { --cfx-a: #aab2c4; --cfx-b: #4d5464; }
.cf-carte.c3 { --cfx-a: #9a63e6; --cfx-b: #3b1d70; }
.cf-carte .cf-infos { grid-auto-flow: column; align-items: center; gap: 10px; }
.cfx { position: relative; width: min(100%, 300px); aspect-ratio: 1; padding: 14px; border-radius: 24px; perspective: 900px;
  background: linear-gradient(145deg, #565b6b, #1a1c24); box-shadow: inset 0 0 0 3px #7a8092, inset 0 0 0 9px #101218, 0 18px 36px rgba(0, 0, 0, .5); }
.cfx-interieur { position: absolute; inset: 14px; display: grid; place-items: center; align-content: center; gap: 6px; border-radius: 14px; color: #ffe08a; font-size: 1.1rem;
  background: radial-gradient(circle at 50% 40%, #5a4212, #150e03 75%); box-shadow: inset 0 0 30px #000; }
.cfx-interieur .pv { width: 48%; background: none; }
.cfx-porte { position: relative; height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 10px; padding: 12px; border-radius: 14px; transform-origin: left center; backface-visibility: hidden;
  background: linear-gradient(150deg, var(--cfx-a), var(--cfx-b));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .22), inset 0 -10px 24px rgba(0, 0, 0, .35); transition: transform 1.1s cubic-bezier(.6, 0, .2, 1); }
.cfx.ouvert .cfx-porte { transform: rotateY(-112deg); }
.cfx-ecran { position: relative; overflow: hidden; border-radius: 10px; border: 2px solid #07080b; background: #06110a; box-shadow: inset 0 0 14px rgba(93, 255, 165, .18); }
.cfx-ecran .cf-champ { display: block; width: 100%; min-height: 50px; padding: 0 0 0 .35em; border: 0; border-radius: 0; background: transparent; color: #5dffa5; text-align: center;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 1.6rem; font-weight: 800; letter-spacing: .35em; text-shadow: 0 0 10px rgba(93, 255, 165, .6); }
.cfx-ecran .cf-champ::placeholder { color: rgba(93, 255, 165, .3); }
.cfx-ecran .cf-champ:focus { outline: 2px solid #5dffa5; outline-offset: -2px; }
.cfx-etat { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; font-family: ui-monospace, Consolas, monospace; font-size: 1.25rem; font-weight: 900; letter-spacing: .22em; }
.cfx-etat:empty { display: none; }
.cfx.refuse .cfx-etat { background: #1c0509; color: #ff5a6a; text-shadow: 0 0 12px rgba(255, 90, 106, .8); animation: cfx-clignote .25s steps(2) 3; }
.cfx.refuse .cfx-ecran { box-shadow: inset 0 0 14px rgba(255, 90, 106, .5), 0 0 0 2px #ff5a6a; }
.cfx.refuse { animation: cfx-secoue .45s; }
.cfx.accepte .cfx-etat { background: #06110a; color: #5dffa5; text-shadow: 0 0 14px rgba(93, 255, 165, .9); }
.cfx.accepte .cfx-ecran { box-shadow: inset 0 0 14px rgba(93, 255, 165, .5), 0 0 0 2px #5dffa5; }
.cfx-bas { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 0; }
.cfx-clavier { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; align-content: center; height: 100%; }
.cfx-touche { min-height: 34px; padding: 0; border-radius: 9px; border: 1px solid #05060a; background: linear-gradient(180deg, #343946, #171a21); color: #eef0f7; font: inherit; font-weight: 800; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 2px 0 #05060a; }
.cfx-touche:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); }
.ui-page .cfx-ok, .cfx-ok { background: linear-gradient(180deg, #3ed17f, #17804a); color: #04180c; }
.cfx-ok:disabled { opacity: .45; cursor: not-allowed; }
.cfx-eff { color: #ffb35c; }
.cfx-volant { width: 78px; aspect-ratio: 1; border-radius: 50%; border: 9px solid #d5d9e3; transition: transform 1s cubic-bezier(.5, 0, .2, 1);
  background: radial-gradient(circle, #f4f6fa 0 11px, #6f7686 12px 14px, transparent 15px), linear-gradient(#d5d9e3, #d5d9e3) center / 100% 8px no-repeat, linear-gradient(#d5d9e3, #d5d9e3) center / 8px 100% no-repeat;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .5), inset 0 0 0 2px rgba(0, 0, 0, .35); }
.cfx.accepte .cfx-volant { transform: rotate(450deg); }
@keyframes cfx-secoue { 0%, 100% { transform: none; } 15% { transform: translateX(-9px) rotate(-1deg); } 30% { transform: translateX(8px) rotate(1deg); } 45% { transform: translateX(-6px); } 60% { transform: translateX(5px); } 80% { transform: translateX(-2px); } }
@keyframes cfx-clignote { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .cfx-porte, .cfx-volant { transition: none; } .cfx.refuse, .cfx.refuse .cfx-etat { animation: none; } }

/* Commandes de l'ouverture (12/11) : les 3 options tiennent sur une ligne de 320 à 440 px (iPhone 17 / 17 Pro Max).
   Gamme Doublons : sans progression, libellé ni fidélité. */
.group-controls .actions:has(.toggle) { gap: 0 clamp(6px, 2.4vw, 12px); }
.group-controls .toggle { gap: 5px; font-size: clamp(.64rem, 2.85vw, .86rem); }
.group-controls .toggle input { width: 17px; height: 17px; flex: 0 0 auto; }
.lot-recyclage :is(.group-head, .lot-label, .fid-gain) { display: none; }
@media (max-width: 380px) { .group-controls .actions:has(.toggle) { flex-wrap: wrap; } } /* très petits écrans : les options passent sur 2 lignes plutôt que de déborder */
.group-controls { border-top: 0; background: none; } /* ni ligne ni fond derrière « Tout révéler » et les options (12/11) */

/* Salons (14/11/2026) : YouTube, Twitch, partage d'écran */
.salon-creation { display: grid; gap: 10px; margin-bottom: 20px; }
.salon-creation h2 { margin: 0; }
.salon-champ { width: 100%; min-height: 46px; padding: 8px 12px; border: 1px solid var(--ui-edge); border-radius: 10px; background: var(--ui-night); color: var(--text); font: inherit; font-size: 16px; }
.salon-modes { display: grid; gap: 8px; }
.ui-page .salon-mode { justify-content: flex-start; gap: 10px; min-height: 52px; font-size: 1.02rem; }
.salon-erreur { color: #ff9a9a; margin: 6px 0; }
.salon-membres { color: var(--muted); margin: -4px 0 10px; overflow-wrap: anywhere; }
.salon-corps { display: grid; gap: 10px; }
.salon-ecran { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; }
.salon-ecran iframe, .salon-ecran video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.salon-ecran-vide video { visibility: hidden; }
.salon-actions { display: flex; gap: 8px; }
.salon-actions .btn { flex: 1 1 0; }
.salon-ajout { display: flex; gap: 8px; }
.salon-ajout .salon-champ { flex: 1 1 auto; min-width: 0; }
.salon-ajout .btn { flex: none; }
.salon-video .item-main { flex-basis: 140px; overflow-wrap: anywhere; }
.salon-en-cours { border-color: var(--ui-accent) !important; }
.salon-video-actions { display: flex; gap: 6px; }
.salon-quitter { margin-top: 18px; width: 100%; }
@media (min-width: 900px) { .salon-modes { grid-template-columns: repeat(3, 1fr); } .salon-corps, .salon-quitter { max-width: 960px; } }
.salon-resultats:empty { display: none; }
.salon-resultat { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; border: 1px solid var(--ui-edge); background: var(--ui-base); }
.salon-partage-choix { display: grid; gap: 8px; }
.ui-page .salon-choix[aria-pressed="true"] { background: var(--ui-accent); color: var(--ui-ink); }
.salon-ecran-attente { position: absolute; inset: 0; display: none; place-items: center; margin: 0; padding: 12px; color: var(--muted); text-align: center; }
.salon-ecran-vide .salon-ecran-attente { display: grid; }
