/* Rentai Arena — un seul univers visuel : tapis de jeu vert sombre, cartes parchemin et or.
   Choix délibéré d'un thème unique (pas de variante claire). */
:root {
  --felt: #15302a;
  --felt-deep: #0d211c;
  --felt-line: #24483f;
  --rail: #33251a;
  --parch: #f1e6c8;
  --parch-2: #e2d1a6;
  --gold: #c9a24a;
  --gold-bright: #e8c46a;
  --ink: #2b2117;
  --ink-soft: #5d4c37;
  --atk: #2e5d9e;
  --hp: #b23a2e;
  --energy: #5cc2b5;
  --text: #efe6d2;
  --muted: #9fb3aa;
  --danger: #e2685a;
  --ok: #7cc58a;
  --aggro: #b8552e;
  --control: #3d6aa6;
  --midrange: #4f8a4a;
  --neutral: #7b7466;
  --r-commune: #8d8676;
  --r-rare: #3f79c9;
  --r-epique: #9a5ce6;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: radial-gradient(ellipse at 50% 40%, var(--felt) 0%, var(--felt-deep) 80%) fixed, var(--felt-deep);
  color: var(--text);
  font-family: "Alegreya Sans", "Trebuchet MS", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  padding-inline: 16px;
  padding-block: 12px 0;
}
button { font: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible, .card:focus-visible, .unit:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
input {
  font: inherit; color: var(--ink); background: var(--parch); border: 1px solid var(--gold);
  border-radius: 6px; padding: 8px 10px; min-width: 0;
}
.wrap { max-width: 780px; margin: 0 auto; }
.sc { font-family: "Alegreya SC", Georgia, serif; }

/* ---------- Boutons ---------- */
.btn {
  border: 1px solid var(--gold); background: linear-gradient(#d9b45e, #b08a36); color: #1e160c;
  font-weight: 800; border-radius: 8px; padding: 10px 16px; letter-spacing: .01em;
  box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 2px 6px rgba(0,0,0,.35);
}
.btn:hover { filter: brightness(1.07); }
.btn:disabled { filter: grayscale(.8) brightness(.7); cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--parch); border-color: var(--felt-line); box-shadow: none; font-weight: 700; }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger); box-shadow: none; }
.btn.small { padding: 6px 10px; font-size: 13.5px; }

/* ---------- Salon ---------- */
.brand { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 8px 0 4px; }
.brand h1 { font-family: "Alegreya SC", Georgia, serif; font-weight: 800; font-size: clamp(30px, 7vw, 44px); margin: 0; color: var(--gold-bright); letter-spacing: .02em; text-shadow: 0 2px 0 #000a; }
.brand .set { font-size: 13px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.lede { color: var(--muted); margin: 0 0 18px; max-width: 60ch; }
.panel { background: rgba(0,0,0,.22); border: 1px solid var(--felt-line); border-radius: 12px; padding: 14px; }
.lobby { display: grid; gap: 14px; padding-bottom: 32px; }
.label { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; display: block; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row > input { flex: 1 1 160px; }
.decks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 520px) { .decks { grid-template-columns: 1fr; } }
.deck-opt {
  text-align: left; border-radius: 10px; padding: 10px 12px; border: 1px solid var(--felt-line);
  background: rgba(0,0,0,.18); color: var(--text); display: grid; gap: 2px;
}
.deck-opt[aria-pressed="true"] { border-color: var(--gold); background: rgba(201,162,74,.14); box-shadow: 0 0 0 1px var(--gold) inset; }
.deck-opt b { font-family: "Alegreya SC", Georgia, serif; font-size: 18px; }
.deck-opt small { color: var(--muted); }
.games { display: grid; gap: 6px; }
.game-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; background: rgba(0,0,0,.18); }
.game-row .code { font-family: "Alegreya SC", Georgia, serif; font-weight: 800; color: var(--gold-bright); letter-spacing: .12em; min-width: 4.2em; }
.game-row .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-row .tag { font-size: 12px; color: var(--muted); }
.empty { color: var(--muted); font-size: 14px; }
.note { font-size: 13px; color: var(--muted); }
.big-code { font-family: "Alegreya SC", Georgia, serif; font-weight: 800; font-size: 56px; letter-spacing: .2em; color: var(--gold-bright); text-align: center; margin: 8px 0; }

/* ---------- Table de jeu ---------- */
.table { display: grid; gap: 8px; padding-bottom: calc(124px + env(safe-area-inset-bottom, 0px)); }
.seatbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.seatbar .pname { font-family: "Alegreya SC", Georgia, serif; font-weight: 700; font-size: 18px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 45%; }
.seatbar .pdeck { font-size: 12px; color: var(--muted); }
.stat { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; }
.hp-badge { background: var(--hp); color: #fff; border-radius: 999px; padding: 2px 10px; font-size: 18px; box-shadow: 0 0 0 2px #0006; }
.hp-badge.hit { animation: hit .5s ease-out; }
@keyframes hit { 0% { transform: scale(1.25); background: #ff6b4f; } 100% { transform: scale(1); } }
.energy { color: var(--energy); }
.pips { display: inline-flex; gap: 2px; }
.pip { width: 7px; height: 12px; border-radius: 2px; background: #0005; border: 1px solid #5cc2b555; }
.pip.on { background: var(--energy); border-color: var(--energy); }
.meta { font-size: 13px; color: var(--muted); display: inline-flex; gap: 10px; }
.spacer { flex: 1; }

.board {
  min-height: 118px; border-radius: 12px; padding: 8px; display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; align-content: center;
  background: rgba(0,0,0,.16); border: 1px dashed var(--felt-line);
}
@media (max-width: 560px) { .board { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.board .empty { grid-column: 1 / -1; text-align: center; }

.unit {
  position: relative; background: linear-gradient(var(--parch), var(--parch-2)); color: var(--ink);
  border: 2px solid var(--gold); border-radius: 9px; padding: 5px 5px 4px; min-height: 100px;
  display: flex; flex-direction: column; gap: 3px; text-align: left; transition: transform .15s, box-shadow .15s, opacity .15s;
  box-shadow: 0 2px 6px rgba(0,0,0,.45);
}
.unit .uname { font-family: "Alegreya SC", Georgia, serif; font-weight: 700; font-size: 12.5px; line-height: 1.1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.unit .kws { display: flex; flex-wrap: wrap; gap: 2px; }
.kw { font-size: 10px; font-weight: 800; padding: 0 4px; border-radius: 4px; background: var(--ink); color: var(--parch); letter-spacing: .02em; }
.unit .stats { margin-top: auto; display: flex; justify-content: space-between; }
.box { min-width: 24px; text-align: center; font-weight: 800; color: #fff; border-radius: 4px; padding: 0 4px; font-size: 15px; }
.box.atk { background: var(--atk); }
.box.hp { background: var(--hp); }
.box.buff { box-shadow: 0 0 0 2px var(--gold-bright); }
.box.hurt { background: #6e1d16; }
.unit.token { border-style: dashed; }
.unit.exhausted { opacity: .55; transform: rotate(-4deg); }
.unit.shield { box-shadow: 0 0 0 3px #e8c46a99, 0 0 12px #e8c46a88; }
.unit .sick { position: absolute; top: -8px; right: -4px; font-size: 10px; font-weight: 800; background: var(--felt-deep); color: var(--muted); border: 1px solid var(--felt-line); border-radius: 999px; padding: 0 5px; }
.unit.can-act { box-shadow: 0 0 0 2px var(--ok), 0 0 10px #7cc58a88; }
.unit.picked { transform: translateY(-6px); box-shadow: 0 0 0 3px var(--danger), 0 6px 14px #0008; }
.unit.targetable { box-shadow: 0 0 0 3px var(--gold-bright), 0 0 14px #e8c46aaa; cursor: crosshair; }
.unit.attacking { box-shadow: 0 0 0 3px var(--danger), 0 0 14px #e2685aaa; }
.unit.focus { transform: translateY(-6px) scale(1.03); }
.pair { position: absolute; bottom: -9px; left: 50%; transform: translateX(-50%); background: var(--danger); color: #fff; font-weight: 800; font-size: 11px; border-radius: 999px; padding: 0 7px; white-space: nowrap; }
.pair.def { background: var(--atk); }

.banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; border-radius: 10px;
  background: linear-gradient(90deg, #0008, #0003); border-left: 3px solid var(--gold);
}
.banner.mine { border-left-color: var(--ok); }
.banner.alert { border-left-color: var(--danger); }
.banner .msg { flex: 1 1 200px; font-weight: 700; }
.banner .last { font-size: 13px; color: var(--muted); font-weight: 400; display: block; }

/* ---------- Cartes (main) ---------- */
.hand { display: flex; gap: 8px; overflow-x: auto; padding: 10px 2px 8px; scroll-snap-type: x proximity; }
.hand .empty { padding: 20px 0; }
.card {
  flex: 0 0 132px; scroll-snap-align: start; position: relative; text-align: left;
  background: linear-gradient(var(--parch), var(--parch-2)); color: var(--ink);
  border: 3px solid var(--gold); border-radius: 11px; padding: 0 0 6px; overflow: hidden;
  display: flex; flex-direction: column; box-shadow: 0 3px 10px rgba(0,0,0,.5); transition: transform .15s, opacity .15s;
}
.card.dim { opacity: .55; }
.card.playable { box-shadow: 0 0 0 2px var(--ok), 0 3px 10px rgba(0,0,0,.5); }
.card.sel { transform: translateY(-8px); box-shadow: 0 0 0 3px var(--gold-bright), 0 8px 16px #000a; }
.card.discard-pick { transform: translateY(-8px); box-shadow: 0 0 0 3px var(--danger); }
.card .banner-name {
  font-family: "Alegreya SC", Georgia, serif; font-weight: 800; font-size: 13px; line-height: 1.1;
  background: linear-gradient(#e8c46a, #b88f3a); color: #20170c; padding: 5px 30px 5px 7px; min-height: 36px; display: flex; align-items: center;
}
.card .cost {
  position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #9ce8dd, #1f7f74); color: #fff; font-weight: 800;
  display: grid; place-items: center; border: 2px solid var(--gold); font-size: 15px; text-shadow: 0 1px 0 #0008;
}
.art { height: 58px; display: grid; place-items: center; position: relative; border-bottom: 2px solid var(--gold); }
.art .mono { font-family: "Alegreya SC", Georgia, serif; font-weight: 800; font-size: 30px; color: #fff9; text-shadow: 0 2px 0 #0005; }
.art .rar { position: absolute; left: 6px; bottom: 5px; width: 10px; height: 10px; transform: rotate(45deg); border: 1px solid #fff; }
.a-aggro { background: linear-gradient(135deg, #d0764a, #7d2f14); }
.a-control { background: linear-gradient(135deg, #5f8fcf, #22406e); }
.a-midrange { background: linear-gradient(135deg, #79b26f, #2e5a2a); }
.a-neutral { background: linear-gradient(135deg, #a39b88, #4c473c); }
.r-Commune { background: var(--r-commune); }
.r-Rare { background: var(--r-rare); }
.r-Épique { background: var(--r-epique); }
.card .typeline { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); padding: 4px 7px 0; }
.card .text { font-size: 12px; line-height: 1.25; padding: 2px 7px; flex: 1; }
.card .stats { display: flex; justify-content: space-between; padding: 0 6px; }
.warn { color: #9a2a1e; font-weight: 700; font-size: 11px; }

/* ---------- Fiche détaillée ---------- */
.sheet {
  display: grid; grid-template-columns: 150px 1fr; gap: 14px; align-items: start;
  background: rgba(0,0,0,.35); border: 1px solid var(--gold); border-radius: 12px; padding: 12px;
}
@media (max-width: 420px) { .sheet { grid-template-columns: 1fr; } .sheet .card { margin: 0 auto; } }
.sheet .card { flex-basis: auto; width: 150px; }
.sheet h3 { font-family: "Alegreya SC", Georgia, serif; margin: 0 0 4px; font-size: 22px; color: var(--gold-bright); text-wrap: balance; }
.sheet .flavor { font-style: italic; color: var(--muted); margin: 6px 0; }
.sheet .why { color: var(--danger); font-weight: 700; margin: 6px 0; }
.sheet .kwhelp { font-size: 13px; color: var(--muted); margin: 4px 0; }

/* ---------- Barre d'actions ---------- */
.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(#0d211cee, #081512); border-top: 1px solid var(--rail);
}
.actionbar .inner { max-width: 780px; margin: 0 auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- Journal ---------- */
.log { max-height: 220px; overflow-y: auto; font-size: 13.5px; display: grid; gap: 2px; padding: 8px 10px; }
.log .turn { color: var(--gold-bright); font-weight: 700; margin-top: 4px; }
.log .priv { color: var(--energy); }
details.logbox summary { cursor: pointer; color: var(--muted); font-size: 13px; padding: 4px 0; }

.over { text-align: center; padding: 16px; }
.over h2 { font-family: "Alegreya SC", Georgia, serif; font-size: 34px; margin: 0; color: var(--gold-bright); }

.toast {
  position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 20;
  background: #1e0f0c; color: #ffd9d2; border: 1px solid var(--danger); border-radius: 8px; padding: 8px 14px; font-weight: 700;
  max-width: calc(100% - 32px);
}
.toast.info { background: #0f1e1a; color: var(--text); border-color: var(--gold); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Ajouts v0.2 : deckbuilder, minuteur, règles ---------- */
select {
  font: inherit; color: var(--ink); background: var(--parch); border: 1px solid var(--gold);
  border-radius: 6px; padding: 7px 8px; min-width: 0; max-width: 100%;
}
.linkbtn { background: none; border: none; padding: 0; color: var(--gold-bright); text-decoration: underline; font-weight: 700; }
.deck-opt.custom { display: flex; align-items: center; gap: 8px; padding: 0 8px 0 0; }
.deck-opt.custom .pick { flex: 1; min-width: 0; text-align: left; background: none; border: none; color: var(--text); padding: 10px 12px; display: grid; gap: 2px; border-radius: 10px; }
.deck-opt.custom .pick[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--gold) inset; background: rgba(201,162,74,.14); }
.deck-opt.custom .pick:disabled { opacity: .6; cursor: not-allowed; }

.clock { margin-left: auto; font-weight: 800; font-size: 16px; padding: 2px 10px; border-radius: 999px; background: #0006; border: 1px solid var(--felt-line); color: var(--text); min-width: 4.2em; text-align: center; }
.clock.low { color: #fff; background: var(--hp); border-color: var(--hp); }

.overlay { position: fixed; inset: 0; z-index: 30; background: #050d0bcc; overflow-y: auto; padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(24px + env(safe-area-inset-bottom, 0px)); }
.overlay-inner { max-width: 680px; margin: 0 auto; background: var(--felt-deep); border: 1px solid var(--gold); border-radius: 14px; padding: 16px 18px 20px; }
.overlay h2 { margin: 0; font-size: 26px; color: var(--gold-bright); }
.overlay h3 { font-family: "Alegreya SC", Georgia, serif; color: var(--gold-bright); margin: 18px 0 4px; font-size: 18px; }
.overlay p, .overlay li { max-width: 65ch; }
.steps { padding-left: 22px; display: grid; gap: 6px; margin: 6px 0; }
.kwlist { padding-left: 18px; display: grid; gap: 4px; margin: 6px 0; }

.builder { display: grid; gap: 10px; padding-block: 4px calc(90px + env(safe-area-inset-bottom, 0px)); }
.bigcount { font-family: "Alegreya SC", Georgia, serif; font-weight: 800; font-size: 28px; color: var(--parch); }
.bigcount.ok { color: var(--ok); }
.curve { display: inline-flex; align-items: flex-end; gap: 3px; height: 46px; }
.curve .bar { width: 16px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; padding-bottom: 13px; }
.curve .fill { width: 100%; background: var(--energy); border-radius: 3px 3px 0 0; min-height: 1px; }
.curve .n { position: absolute; top: -2px; font-size: 10px; color: var(--text); font-weight: 700; }
.curve .c { position: absolute; bottom: 0; font-size: 10px; color: var(--muted); }
.deckpanel { display: grid; gap: 8px; }
.decklist summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.deck-rows { display: grid; gap: 3px; margin-top: 6px; max-height: 260px; overflow-y: auto; }
.deck-row { display: flex; align-items: center; gap: 8px; padding: 3px 6px; border-radius: 6px; background: rgba(0,0,0,.18); }
.deck-row .dcost { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #1f7f74; color: #fff; font-weight: 800; font-size: 12px; flex: none; }
.deck-row .dname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deck-row .dcount { font-weight: 800; color: var(--gold-bright); }
.deck-row .btn.small { padding: 2px 9px; }
.rar-dot { width: 9px; height: 9px; transform: rotate(45deg); flex: none; }
.filters { display: grid; gap: 8px; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--felt-deep); padding: 8px 0; }
.filters input { width: 100%; }
.chips { display: flex; gap: 4px; flex-wrap: wrap; }
.chip { border: 1px solid var(--felt-line); background: rgba(0,0,0,.2); color: var(--text); border-radius: 999px; padding: 4px 11px; font-weight: 700; font-size: 13.5px; }
.chip[aria-pressed="true"] { background: var(--gold); color: #1e160c; border-color: var(--gold); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; }
.pick-card { position: relative; }
.pick-card .card { width: 100%; flex: none; height: 100%; }
.pick-card.in .card { box-shadow: 0 0 0 2px var(--ok), 0 3px 10px rgba(0,0,0,.5); }
.card .count { position: absolute; top: 64px; right: 6px; background: #000b; color: #fff; font-weight: 800; font-size: 12px; border-radius: 999px; padding: 1px 7px; }
.pick-card.in .card .count { background: var(--ok); color: #0b1f12; }
.minus { position: absolute; top: -8px; left: -8px; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--gold); background: var(--hp); color: #fff; font-weight: 800; font-size: 18px; line-height: 1; z-index: 2; }

/* ---------- Version en ligne : connexion, profil, collection, boosters, éditeur ---------- */
textarea { font: inherit; color: var(--ink); background: var(--parch); border: 1px solid var(--gold); border-radius: 6px; padding: 8px 10px; width: 100%; resize: vertical; }
.btn.discord { background: #5865f2; border-color: #7b86ff; color: #fff; text-align: center; text-decoration: none; font-size: 17px; padding: 12px 18px; }
.why { color: var(--danger); font-weight: 700; }
.okmsg { color: var(--ok); font-weight: 700; }
.title { margin: 0; font-size: 24px; color: var(--gold-bright); }
.profile { display: grid; gap: 12px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--gold); object-fit: cover; flex: none; }
.mono-av { display: grid; place-items: center; background: var(--rail); font-family: "Alegreya SC", Georgia, serif; font-weight: 800; color: var(--gold-bright); }
.profile .who { display: grid; min-width: 0; }
.profile .who b { font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rewards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 480px) { .rewards { grid-template-columns: 1fr; } }
.reward { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: rgba(0,0,0,.2); border: 1px solid var(--felt-line); }
.reward .big { font-family: "Alegreya SC", Georgia, serif; font-weight: 800; font-size: 30px; color: var(--gold-bright); min-width: 1.4em; text-align: center; }
.reward > span:nth-child(2) { flex: 1; display: grid; font-weight: 700; }
.reward small { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.quests { display: grid; gap: 4px; font-size: 14px; }
.quests span::before { content: ""; display: inline-block; width: 9px; height: 9px; border: 2px solid var(--gold); border-radius: 2px; margin-right: 8px; vertical-align: 1px; }
.quests span.done { color: var(--muted); }
.quests span.done::before { background: var(--ok); border-color: var(--ok); }
.deck-row.lack .dname { color: var(--danger); }
.deck-row small { color: var(--muted); }
.pick-card .craft { width: 100%; margin-top: 6px; }
.art.has-img { background-size: cover; background-position: center; }
.booster-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.cardback {
  min-height: 230px; border-radius: 11px; border: 3px solid var(--gold); display: grid; place-items: center;
  background: repeating-linear-gradient(45deg, #1d3a33 0 10px, #16302a 10px 20px); box-shadow: 0 3px 10px rgba(0,0,0,.5);
}
.cardback span { font-family: "Alegreya SC", Georgia, serif; font-size: 44px; font-weight: 800; color: var(--gold); width: 70px; height: 70px; border-radius: 50%; border: 3px solid var(--gold); display: grid; place-items: center; background: var(--felt-deep); }
.cardback:hover span { color: var(--gold-bright); border-color: var(--gold-bright); }
.reveal { animation: flip .45s ease-out; }
@keyframes flip { from { transform: rotateY(90deg); } to { transform: rotateY(0); } }
.r-glow-Rare .card { box-shadow: 0 0 0 2px var(--r-rare), 0 0 16px #3f79c9aa; }
.r-glow-Épique .card { box-shadow: 0 0 0 3px var(--r-epique), 0 0 22px #9a5ce6cc; }
.newtag { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: var(--ok); color: #0b1f12; font-weight: 800; font-size: 12px; border-radius: 999px; padding: 2px 10px; white-space: nowrap; z-index: 2; }
.newtag.conv { background: var(--energy); color: #06201c; }
.admin-list { display: grid; gap: 4px; }
.admin-row { display: flex; align-items: center; gap: 10px; text-align: left; padding: 8px 10px; border-radius: 8px; background: rgba(0,0,0,.2); border: 1px solid var(--felt-line); color: var(--text); flex-wrap: wrap; }
.admin-row.off { opacity: .55; }
.admin-row .aid { color: var(--muted); font-size: 12.5px; min-width: 2.6em; }
.admin-row .dname { font-weight: 700; flex: 1; min-width: 120px; }
.admin-row .dcost { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #1f7f74; color: #fff; font-weight: 800; font-size: 12px; }
.admin-row .warn { color: var(--danger); }
.admin-row .tag { font-size: 12px; color: var(--muted); }
.admin-form { display: grid; gap: 12px; border-color: var(--gold); }
.admin-form h3 { margin: 0; color: var(--gold-bright); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.form-grid label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 700; }
.form-grid label.wide { grid-column: 1 / -1; }
.form-grid label.check { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 500; }
.form-grid small { font-weight: 400; }
.form-grid input { width: 100%; }
.admin-preview { display: grid; grid-template-columns: 150px 1fr; gap: 14px; align-items: start; }
.admin-preview .card { width: 150px; }
@media (max-width: 420px) { .admin-preview { grid-template-columns: 1fr; } }
.phrases summary { cursor: pointer; color: var(--gold-bright); font-weight: 700; }
.phrases ul { margin: 6px 0; padding-left: 18px; display: grid; gap: 2px; font-size: 14px; }

/* =====================================================================
   v1.1 — Cartes sur le vrai cadre, plateau de jeu
   ===================================================================== */
:root {
  --emblem: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg stroke='%23a45be0' stroke-width='9' stroke-linecap='round' fill='none'%3E%3Cpath d='M24 18v64M42 18v64M60 18v64M78 18v64'/%3E%3Cpath d='M12 70L90 30' stroke='%23c9a24a'/%3E%3C/g%3E%3C/svg%3E");
  --stone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='96' viewBox='0 0 160 96'%3E%3Cg fill='none' stroke='%23000' stroke-opacity='.28' stroke-width='2'%3E%3Cpath d='M0 1h160M0 49h160M1 1v48M81 1v48M41 49v47M121 49v47'/%3E%3C/g%3E%3Cg fill='none' stroke='%23fff' stroke-opacity='.05' stroke-width='2'%3E%3Cpath d='M0 3h160M0 51h160'/%3E%3C/g%3E%3C/svg%3E");
  --purple: #7b3fc4;
  --purple-deep: #2a1840;
}

/* ---------- Carte (cadre parchemin et or) ---------- */
.card.tcg {
  position: relative; display: block; padding: 0; border: 0; background: none; overflow: visible;
  aspect-ratio: 1061 / 1482; container-type: inline-size; flex: none; border-radius: 4.5%;
  box-shadow: none; color: #fff; text-align: center; transition: transform .18s, filter .18s, opacity .18s;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.55));
}
.card.tcg > * { pointer-events: none; }
.card.tcg .c-art { position: absolute; left: 4.7%; top: 8.2%; width: 90.7%; height: 58.4%; overflow: hidden; background: #111; }
.card.tcg .c-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card.tcg .c-frame { position: absolute; inset: 0; width: 100%; height: 100%; }
.c-name, .c-cost, .c-num, .c-set {
  position: absolute; font-family: "Rubik", "Alegreya Sans", system-ui, sans-serif; font-weight: 800; color: #fff;
  text-shadow: 0 0 .5cqw #000, .35cqw .35cqw 0 #000, -.35cqw .35cqw 0 #000, .35cqw -.35cqw 0 #000, -.35cqw -.35cqw 0 #000;
  line-height: 1; letter-spacing: -.02em;
}
.c-name { left: 6%; top: 2.9%; width: 61%; height: 7.4%; display: flex; align-items: center; justify-content: center; font-size: var(--fs, 6.6cqw); transform: rotate(-1.4deg); white-space: nowrap; overflow: hidden; }
.c-cost { left: 72.6%; top: 3.1%; width: 23.4%; height: 4.3%; display: flex; align-items: center; justify-content: center; font-size: 5.2cqw; }
.c-text {
  position: absolute; left: 7%; top: 68%; width: 86%; height: 13.8%; display: flex; align-items: center; justify-content: center;
  font-family: "Alegreya Sans", system-ui, sans-serif; font-style: italic; font-weight: 700; font-size: var(--fs, 5cqw); line-height: 1.12;
  color: #3b2d1d; text-align: center; overflow: hidden; padding: 0 1%;
}
.card.tcg.is-spell .c-text { height: 25.6%; }
.c-text b { font-style: normal; font-weight: 800; color: #1f160c; }
.c-text .warn { color: #9a2a1e; font-size: .8em; }
.c-num { top: 83.6%; height: 10.4%; display: flex; align-items: center; justify-content: center; font-size: 11cqw; font-weight: 900; }
.c-hp { left: 25.5%; width: 18%; }
.c-atk { left: 75%; width: 18%; }
.c-set { left: 25%; width: 50%; top: 96.3%; height: 2.6%; display: flex; align-items: center; justify-content: center; gap: 1.2cqw; font-size: 2.4cqw; font-weight: 700; color: #d9cfbf; text-shadow: 0 0 .4cqw #000; }
.c-set .gem { width: 2.2cqw; height: 2.2cqw; transform: rotate(45deg); display: inline-block; border: .25cqw solid #fff8; }
.gem.r-Commune { background: #b9b2a2; } .gem.r-Rare { background: #3f79c9; } .gem.r-Épique { background: #a45be0; }
.card.tcg .count { position: absolute; top: 60%; right: 7%; font-family: "Rubik", sans-serif; font-size: 5.5cqw; padding: .6cqw 2.4cqw; border-radius: 999px; background: #000c; color: #fff; }
.pick-card.in .card.tcg .count { background: var(--ok); color: #0b1f12; }

/* États des cartes (ombre qui suit la forme du cadre) */
.card.tcg.dim { opacity: .55; filter: grayscale(.5) drop-shadow(0 4px 8px rgba(0,0,0,.55)); }
.card.tcg.playable { filter: drop-shadow(0 0 5px #7cc58a) drop-shadow(0 0 10px #7cc58a88); }
.card.tcg.sel { filter: drop-shadow(0 0 6px var(--gold-bright)) drop-shadow(0 10px 14px #000c); }
.card.tcg.discard-pick { filter: drop-shadow(0 0 7px var(--danger)); transform: translateY(-10px); }
.pick-card.in .card.tcg { box-shadow: none; filter: drop-shadow(0 0 5px var(--ok)); }
.r-glow-Rare .card.tcg { box-shadow: none; filter: drop-shadow(0 0 10px #3f79c9); }
.r-glow-Épique .card.tcg { box-shadow: none; filter: drop-shadow(0 0 14px #a45be0) drop-shadow(0 0 4px #e0c3ff); }
.grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

/* Illustration provisoire */
.ph { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; }
.ph-emblem { position: absolute; width: 70%; aspect-ratio: 1; background: var(--emblem) center / contain no-repeat; opacity: .16; }
.ph-mono { position: relative; font-family: "Rubik", sans-serif; font-weight: 900; font-size: 22cqw; color: #fff; opacity: .85; text-shadow: 0 .8cqw 0 #0006; }
.tok .ph-mono { font-size: 38cqw; }

/* Dos de carte */
.cardback-mini, .cardback {
  background:
    var(--emblem) center / 46% no-repeat,
    radial-gradient(circle at 50% 50%, #3b2360 0 30%, #1d1230 31% 33%, transparent 34%),
    repeating-linear-gradient(45deg, #24163a 0 6px, #1b1030 6px 12px);
  border: 3px solid var(--gold); box-shadow: inset 0 0 0 2px #1b1030, inset 0 0 0 4px #c9a24a66, 0 2px 6px #000a;
}
.cardback-mini { display: inline-block; width: 22px; aspect-ratio: 1061 / 1482; border-radius: 3px; border-width: 1.5px; box-shadow: 0 1px 3px #000a; }
.cardback span { display: none; }
.cardback { border-radius: 11px; }

/* ---------- Table de jeu ---------- */
body:has(.arena) { background: #120d1a; padding-inline: 0; }
.arena {
  min-height: 100vh; padding: 8px 12px calc(96px + env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(ellipse at 50% 48%, #d9a24a33 0%, transparent 55%),
    radial-gradient(ellipse at 50% 50%, transparent 40%, #000c 100%),
    var(--stone), linear-gradient(#3a3242, #2b2533);
  background-size: auto, auto, 160px 96px, auto;
}
.table-wrap { max-width: 860px; margin: 0 auto; display: grid; gap: 8px; }

.portrait-bar { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 14px; background: linear-gradient(90deg, #0009, #0004); border: 1px solid #c9a24a44; }
.portrait-bar.active { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 16px #e8c46a44; }
.portrait { position: relative; width: 58px; height: 58px; flex: none; border-radius: 50%; border: 3px solid var(--gold); background: radial-gradient(#4a2d6e, #1d1230); box-shadow: 0 0 0 2px #1b1030, 0 3px 8px #000a; display: grid; place-items: center; }
.portrait img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.p-mono { font-family: "Rubik", sans-serif; font-weight: 900; font-size: 22px; color: var(--gold-bright); }
.p-hp {
  position: absolute; right: -10px; bottom: -8px; min-width: 32px; height: 32px; padding: 0 6px; display: grid; place-items: center;
  font-family: "Rubik", sans-serif; font-weight: 900; font-size: 17px; color: #fff; text-shadow: 0 1px 0 #000;
  background: radial-gradient(circle at 35% 30%, #ff7b6b, #b3261c 60%, #6e1510); border: 2px solid var(--gold); border-radius: 50%;
}
.p-info { display: grid; gap: 2px; min-width: 0; }
.p-name { font-family: "Alegreya SC", Georgia, serif; font-weight: 800; font-size: 17px; color: var(--parch); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-turn { font-family: "Alegreya Sans", sans-serif; font-size: 11px; font-weight: 800; color: #0b1f12; background: var(--ok); border-radius: 999px; padding: 1px 7px; vertical-align: 2px; }
.p-deck { font-size: 12px; color: var(--muted); }
.crystals { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.crystals b { font-family: "Rubik", sans-serif; font-size: 13px; color: var(--energy); margin-right: 3px; }
.crystals i { width: 9px; height: 13px; clip-path: polygon(50% 0, 100% 35%, 50% 100%, 0 35%); background: #5cc2b533; }
.crystals i.on { background: linear-gradient(#b9fff5, #2fb3a3); filter: drop-shadow(0 0 3px #5cc2b5); }
.piles { display: grid; gap: 3px; flex: none; }
.pile { display: flex; align-items: center; gap: 5px; font-family: "Rubik", sans-serif; font-size: 12px; color: var(--parch); }
.pile .cardback-mini { width: 16px; }
.grave-ico { width: 16px; height: 16px; border-radius: 8px 8px 2px 2px; background: #6d6477; border: 1.5px solid #a79fb2; }
.opp-hand { display: flex; align-items: center; height: 40px; padding-right: 6px; }
.opp-hand .cardback-mini { width: 24px; margin-left: -12px; transform: rotate(calc(var(--i) * 5deg)) translateY(calc(var(--i) * var(--i) * 1px)); }
@media (max-width: 480px) { .opp-hand { display: none; } .portrait { width: 50px; height: 50px; } }

.zone { position: relative; border-radius: 16px; padding: 10px; min-height: 150px; display: grid; align-items: center; }
.zone::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--emblem) center / 90px no-repeat; opacity: .07; pointer-events: none; }
.zone-top { background: linear-gradient(#0000, #1a0f2a66); border: 1px solid #a45be033; }
.zone-bottom { background: linear-gradient(#c9a24a14, #0000); border: 1px solid #c9a24a44; }
.zone .board { background: none; border: 0; min-height: 0; padding: 0; gap: 10px; grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 560px) { .zone .board { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.zone .empty { color: #ffffff55; font-style: italic; }
.midline { position: relative; display: grid; }
.midline::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .6; }
.midline .banner { position: relative; justify-self: center; width: min(100%, 560px); background: linear-gradient(#2a1840f2, #1b1030f2); border: 1px solid var(--gold); border-left: 1px solid var(--gold); border-radius: 12px; box-shadow: 0 4px 14px #000a; }
.midline .banner.mine { box-shadow: 0 0 0 2px #7cc58a88, 0 4px 14px #000a; }
.midline .banner.alert { box-shadow: 0 0 0 2px #e2685aaa, 0 4px 14px #000a; }
.over-banner { position: relative; justify-self: center; text-align: center; padding: 14px 28px; border-radius: 14px; background: linear-gradient(#2a1840, #1b1030); border: 2px solid var(--gold); box-shadow: 0 6px 24px #000c; }
.over-banner h2 { margin: 0; font-family: "Alegreya SC", Georgia, serif; font-size: 36px; color: var(--gold-bright); }
.over-banner.win h2 { text-shadow: 0 0 18px #e8c46a; }

/* Unités posées : médaillons */
.unit.tok {
  position: relative; padding: 0; border: 0; background: none; min-height: 0; display: block; aspect-ratio: 4 / 5; container-type: inline-size;
  color: #fff; box-shadow: none; transition: transform .18s, filter .18s, opacity .18s;
}
.unit.tok > * { pointer-events: none; }
.t-art { position: absolute; inset: 0 0 8% 0; border-radius: 16%/13%; overflow: hidden; border: 3px solid var(--gold); background: #1b1030; box-shadow: inset 0 0 0 2px #0008, 0 4px 10px #000b; }
.t-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; display: block; }
.t-name {
  position: absolute; left: 6%; right: 6%; bottom: 17%; padding: 2px 3px; border-radius: 6px; background: #000b; font-family: "Alegreya Sans", sans-serif;
  font-weight: 800; font-size: clamp(9px, 10cqw, 13px); line-height: 1.1; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.t-kws { position: absolute; top: 4%; left: 5%; right: 5%; display: flex; flex-wrap: wrap; gap: 2px; justify-content: center; }
.t-kws .kw { font-size: clamp(8px, 8cqw, 11px); padding: 0 4px; background: #1b1030e6; color: var(--gold-bright); border: 1px solid #c9a24a88; }
.t-stat {
  position: absolute; bottom: 0; width: 30%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--gold);
  font-family: "Rubik", sans-serif; font-weight: 900; font-size: clamp(13px, 17cqw, 22px); text-shadow: 0 1px 0 #000, 0 0 3px #000;
}
.t-atk { left: -3%; background: radial-gradient(circle at 35% 30%, #7fb2ff, #1f4f9c 65%, #13305f); }
.t-hp { right: -3%; background: radial-gradient(circle at 35% 30%, #ff7b6b, #b3261c 65%, #6e1510); }
.t-stat.buff { color: #b9ffc4; } .t-hp.hurt { color: #ffd0c9; }
.unit.tok .sick { top: 30%; right: auto; left: 50%; transform: translateX(-50%); background: #000c; color: #d9cfe8; border-color: #ffffff33; }
.unit.tok.exhausted .t-art { filter: grayscale(.85) brightness(.7); }
.unit.tok.exhausted { transform: rotate(-5deg); opacity: 1; }
.unit.tok.shield .t-art { border-color: #fff3c4; box-shadow: 0 0 0 3px #e8c46a, 0 0 18px #e8c46acc, inset 0 0 20px #e8c46a66; }
.unit.tok.elusive .t-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 30%, #ffffff33 50%, transparent 70%); animation: sheen 3s linear infinite; }
@keyframes sheen { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.unit.tok.can-act .t-art { box-shadow: 0 0 0 3px #7cc58a, 0 0 16px #7cc58aaa; }
.unit.tok.picked { transform: translateY(-8px); }
.unit.tok.picked .t-art, .unit.tok.attacking .t-art { box-shadow: 0 0 0 3px var(--danger), 0 0 18px #e2685acc; }
.unit.tok.targetable .t-art { box-shadow: 0 0 0 3px var(--gold-bright), 0 0 18px #e8c46add; }
.unit.tok.targetable { cursor: crosshair; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.04); } }
.unit.tok.focus { transform: translateY(-6px) scale(1.04); }
.unit.tok .pair { bottom: auto; top: -8px; z-index: 2; }
.unit.tok.enter { animation: enter .45s cubic-bezier(.2,1.4,.4,1); }
@keyframes enter { from { transform: scale(.3) translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.unit.tok.hit, .portrait.hit { animation: shake .45s; }
@keyframes shake { 20% { transform: translateX(-5px) rotate(-3deg); } 40% { transform: translateX(5px) rotate(3deg); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.float { position: absolute; left: 50%; top: 30%; transform: translateX(-50%); font-family: "Rubik", sans-serif; font-weight: 900; font-size: 26px; color: #ff5b4a; text-shadow: 0 2px 0 #000, 0 0 6px #000; animation: floatup 1.1s ease-out forwards; z-index: 5; }
.float.heal { color: #7cf58a; }
@keyframes floatup { from { opacity: 1; transform: translate(-50%, 0) scale(1.3); } to { opacity: 0; transform: translate(-50%, -40px) scale(1); } }

/* Main en éventail */
.hand-fan { --cw: clamp(88px, calc(100vw / (var(--n) * .62 + .9)), 150px); display: flex; justify-content: center; align-items: flex-end; padding: 18px 0 6px; min-height: calc(var(--cw) * 1.45); }
.fan-slot { position: relative; width: var(--cw); margin: 0 calc(var(--cw) * -.14); transform-origin: 50% 120%; transform: rotate(calc(var(--o) * 4deg)) translateY(calc(var(--o) * var(--o) * 3px)); transition: transform .2s; }
.fan-slot .card.tcg { width: 100%; }
.fan-slot:has(.sel) { transform: translateY(-26px) scale(1.12); }
.fan-slot:hover { z-index: 60 !important; }
@media (hover: hover) { .fan-slot:hover { transform: translateY(-16px) scale(1.06); } }
.empty-hand { min-height: 60px; }

/* Fiche d'une carte (panneau en bas) */
.sheet-wrap { position: fixed; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom, 0px)); z-index: 15; padding: 0 12px; pointer-events: none; }
.sheet-wrap .sheet { pointer-events: auto; max-width: 620px; margin: 0 auto; grid-template-columns: 170px 1fr; background: linear-gradient(#2a1840f5, #140d20f5); box-shadow: 0 -6px 30px #000c; }
.sheet-wrap .sheet .card.tcg { width: 170px; }
.sheet-body h3 { margin-top: 0; }
@media (max-width: 420px) { .sheet-wrap .sheet { grid-template-columns: 130px 1fr; } .sheet-wrap .sheet .card.tcg { width: 130px; } }

body:has(.arena) .actionbar { background: linear-gradient(#1b1030ee, #0e0818); border-top: 1px solid var(--gold); }
body:has(.arena) .logbox summary { color: #cbbfd9; }
@media (prefers-reduced-motion: reduce) { .unit.tok.targetable, .unit.tok.elusive .t-art::after { animation: none; } }
/* Cartes finies : l'image complète est affichée telle quelle */
.card.tcg.full .c-full { width: 100%; height: 100%; display: block; border-radius: 4.5%; }
.t-crop { position: absolute; inset: 0; background-repeat: no-repeat; background-size: auto 170%; background-position: 50% 24%; }
.arena { position: relative; isolation: isolate; }
/* Ajustements : PV à gauche (rouge), ATQ à droite (bleu), comme sur les cartes */
.t-hp { left: -3%; right: auto; }
.t-atk { right: -3%; left: auto; }
.pick-card .card.tcg { height: auto; }
.arena { padding-bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
.hand-fan { --cw: clamp(88px, calc(100vw / (var(--n) * .62 + .9)), 136px); }
@media (min-width: 900px) { .zone { min-height: 0; } .unit.tok { max-width: 118px; justify-self: center; width: 100%; } .zone .board { justify-items: center; } }
.pile.hand-count .cardback-mini { transform: rotate(-8deg); }
/* Rareté Légendaire */
.gem.r-Légendaire { background: linear-gradient(135deg, #ffe38a, #f08a1c); box-shadow: 0 0 1.5cqw #ffb347; }
.r-Légendaire { background: #f0a030; }
.r-glow-Légendaire .card.tcg { box-shadow: none; filter: drop-shadow(0 0 16px #ffb347) drop-shadow(0 0 5px #fff1c4); animation: legend-glow 1.6s ease-in-out infinite alternate; }
@keyframes legend-glow { to { filter: drop-shadow(0 0 26px #ffb347) drop-shadow(0 0 8px #fff1c4); } }
.newtag.legend { top: -30px; background: linear-gradient(90deg, #ffe38a, #f08a1c); color: #3a1d00; font-size: 13px; }
@media (prefers-reduced-motion: reduce) { .r-glow-Légendaire .card.tcg { animation: none; } }
/* Zoom sur les cartes (survol, appui long, toucher dans la collection) */
.card.tcg, .unit.tok { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.zoom { position: fixed; z-index: 200; display: flex; flex-direction: column; align-items: center; }
.zoom[hidden] { display: none; }
.zoom .card.tcg { width: var(--zw); transition: none; }
.zoom.hover { --zw: min(300px, 40vw, calc((100vh - 130px) / 1.4)); pointer-events: none; width: var(--zw); animation: zoom-in .12s ease-out; }
.zoom.modal { inset: 0; justify-content: center; padding: 16px; background: #07040cd9; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  --zw: min(88vw, 420px, calc((100dvh - 200px) / 1.4)); cursor: zoom-out; animation: zoom-fade .15s ease-out; }
.zoom.modal .zoom-card { animation: zoom-in .18s cubic-bezier(.2,1.3,.4,1); }
.zoom-notes { width: var(--zw); margin-top: 10px; background: linear-gradient(#2a1840f2, #140d20f2); border: 1px solid var(--gold); border-radius: 10px; padding: 8px 12px; font-size: 14px; line-height: 1.35; color: var(--text); box-shadow: 0 6px 20px #000a; }
.zoom-notes p { margin: 3px 0; }
.zoom-notes b { color: var(--gold-bright); }
.zoom-notes .z-status { font-weight: 700; color: #fff; }
.zoom-notes .z-flavor { font-style: italic; color: var(--muted); }
.zoom-close { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.card.tcg[data-zoom] { cursor: zoom-in; }
.card.tcg[data-zoom]::after { content: "Agrandir"; position: absolute; right: 4%; top: 42%; font: 700 11px "Rubik", system-ui, sans-serif; padding: 3px 7px; border-radius: 999px; background: #000c; color: #fff; border: 1px solid var(--gold); }
.card.tcg[data-look] { cursor: zoom-in; }
@keyframes zoom-in { from { transform: scale(.85); opacity: 0; } }
@keyframes zoom-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .zoom, .zoom .zoom-card { animation: none !important; } }
/* Glisser-déposer */
.hand-fan .card.tcg.playable { touch-action: none; cursor: grab; }
.drag-ghost { position: fixed; left: 0; top: 0; z-index: 180; pointer-events: none; transition: transform .05s linear; will-change: transform; }
.drag-ghost .card.tcg { width: 100%; filter: drop-shadow(0 0 8px var(--gold-bright)) drop-shadow(0 16px 20px #000c); }
body.dragging, body.dragging * { cursor: grabbing !important; -webkit-user-select: none; user-select: none; }
.fan-slot .card.tcg.drag-src { opacity: .25; filter: grayscale(.6); }
body.dragging .zone-bottom .board { transition: box-shadow .15s, background .15s; border-radius: 12px; }
body.drop-ok:not(.drop-target) .zone-bottom .board { box-shadow: 0 0 0 2px #7cc58a, 0 0 24px #7cc58a66 inset; background: #7cc58a14; }
body.drop-target .drag-ghost .card.tcg { filter: drop-shadow(0 0 10px var(--danger)) drop-shadow(0 16px 20px #000c); }
/* Carte jouée par l'adversaire */
.play-reveal { position: fixed; z-index: 170; left: 50%; top: 42%; width: min(230px, 52vw); pointer-events: none; text-align: center; transform: translate(-50%, -50%); }
@media (min-width: 900px) { .play-reveal { left: max(16px, calc(50% - 640px)); right: auto; transform: translateY(-50%); } }
.play-reveal[hidden] { display: none; }
.play-reveal .pr-inner { opacity: 0; }
.play-reveal .card.tcg { width: 100%; filter: drop-shadow(0 0 14px #e2685acc) drop-shadow(0 14px 22px #000d); }
.play-reveal p { margin: 0; font: 700 15px/1.3 "Alegreya Sans", system-ui, sans-serif; color: var(--text); text-shadow: 0 2px 4px #000; }
.play-reveal .pr-who { margin-bottom: 8px; }
.play-reveal .pr-who b, .play-reveal .pr-target b { color: var(--gold-bright); }
.play-reveal .pr-target { margin-top: 8px; background: #140d20e6; border: 1px solid var(--gold); border-radius: 999px; display: inline-block; padding: 3px 12px; }
.play-reveal.in .pr-inner { animation: reveal-in .38s cubic-bezier(.2,1.2,.4,1) forwards; }
.play-reveal.out .pr-inner { animation: reveal-out .28s ease-in forwards; }
@keyframes reveal-in { from { opacity: 0; transform: translateY(-60%) scale(.6) rotate(-6deg); } to { opacity: 1; transform: none; } }
@keyframes reveal-out { from { opacity: 1; } to { opacity: 0; transform: translateY(20%) scale(.8); } }
@media (prefers-reduced-motion: reduce) { .play-reveal.in .pr-inner { animation: none; opacity: 1; } .play-reveal.out .pr-inner { animation: none; opacity: 0; } }
/* ===================== Ouverture de booster ===================== */
.booster-screen { padding-bottom: 110px; }
.bstage { display: grid; place-items: center; min-height: min(70vh, 560px); perspective: 900px; }
.bpack { position: relative; width: min(230px, 58vw); aspect-ratio: 5 / 8; border: 0; padding: 0; background: none; cursor: pointer; filter: drop-shadow(0 18px 28px #000c);
  animation: pack-float 3s ease-in-out infinite; -webkit-tap-highlight-color: transparent; }
.bpack:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 6px; border-radius: 12px; }
.bp-body, .bp-strip { position: absolute; left: 0; right: 0; background:
    radial-gradient(120% 70% at 50% 35%, #7b3fc466, transparent 60%),
    repeating-linear-gradient(135deg, #2a1840 0 10px, #23143a 10px 20px);
  border: 3px solid var(--gold); box-shadow: inset 0 0 0 3px #1b1030, inset 0 0 0 5px #c9a24a55; }
.bp-strip { top: 0; height: 13%; border-radius: 12px 12px 3px 3px; border-bottom: 2px dashed #e8c46a99;
  background: linear-gradient(#e8c46a, #b08a36); transform-origin: 10% 100%; }
.bp-body { top: 12.5%; bottom: 0; border-radius: 3px 3px 12px 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4%; overflow: hidden; }
.bp-emblem { width: 52%; aspect-ratio: 1; background: var(--emblem) center / 62% no-repeat, radial-gradient(circle, #3b2360 0 58%, #c9a24a 59% 62%, transparent 63%); }
.bp-title { font: 800 clamp(28px, 9vw, 40px)/1 "Alegreya SC", Georgia, serif; color: var(--gold-bright); letter-spacing: .06em; text-shadow: 0 2px 0 #000a, 0 0 18px #e8c46a66; }
.bp-sub { font: 700 11px "Rubik", system-ui, sans-serif; letter-spacing: .22em; text-transform: uppercase; color: #d9cfe8; }
.bp-set { font: 700 12px "Rubik", system-ui, sans-serif; color: var(--gold); margin-top: 6%; padding: 3px 10px; border: 1px solid #c9a24a88; border-radius: 999px; }
.bp-sheen { position: absolute; inset: 12.5% 0 0; border-radius: 3px 3px 12px 12px; pointer-events: none; overflow: hidden;
  background: linear-gradient(115deg, transparent 35%, #ffffff30 45%, #fff1c455 50%, transparent 60%) -150% 0 / 250% 100% no-repeat; animation: pack-sheen 3.2s ease-in-out infinite; }
.bp-flash { position: absolute; left: 50%; top: 55%; width: 10px; height: 10px; border-radius: 50%; transform: translate(-50%, -50%) scale(0); background: radial-gradient(circle, #fff 0 20%, #ffe9a8 40%, #e8c46a00 70%); pointer-events: none; }
.bpack:hover { animation-play-state: paused; }
.bpack.tearing { animation: pack-shake .45s linear; }
.bpack.tearing .bp-strip { animation: strip-off .6s cubic-bezier(.3,.6,.4,1) forwards; }
.bpack.burst .bp-flash { animation: pack-flash .6s ease-out forwards; }
.bpack.burst .bp-body, .bpack.burst .bp-sheen { animation: pack-fade .55s ease-in forwards; }
@keyframes pack-float { 50% { transform: translateY(-8px) rotate(-1deg); } }
@keyframes pack-sheen { 0%, 40% { background-position: -150% 0; } 80%, 100% { background-position: 250% 0; } }
@keyframes pack-shake { 20% { transform: rotate(-3deg); } 40% { transform: rotate(3deg) scale(1.03); } 60% { transform: rotate(-2deg); } 80% { transform: rotate(2deg) scale(1.05); } }
@keyframes strip-off { to { transform: translate(60%, -160%) rotate(38deg); opacity: 0; } }
@keyframes pack-flash { to { transform: translate(-50%, -50%) scale(90); opacity: 0; } }
@keyframes pack-fade { to { transform: scale(1.15); opacity: 0; filter: brightness(2); } }

.bslots { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px 16px; padding: 26px 0 10px; }
.bslot { width: clamp(104px, 29vw, 142px); aspect-ratio: 1061 / 1482; perspective: 1000px; position: relative; }
.bslot.deal { animation: deal-in .55s cubic-bezier(.2,1.2,.4,1) both; animation-delay: var(--d); }
.bcard { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.3,1.3,.5,1); }
.bslot.flipped .bcard { transform: rotateY(180deg); }
.bface { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.bback { border: 0; padding: 0; background: none; cursor: pointer; border-radius: 6%; -webkit-tap-highlight-color: transparent; }
.bback .cardback { display: block; width: 100%; height: 100%; min-height: 0; border-radius: 6%; background-size: 46% auto, auto, auto; transition: transform .15s; }
.bback:hover .cardback { transform: translateY(-4px) scale(1.03); }
.bfront { transform: rotateY(180deg); pointer-events: none; }
.bslot.flipped .bfront { pointer-events: auto; }
.bfront .card.tcg { width: 100%; }
.bslot:not(.flipped) .newtag { display: none; }
.bslot.flipped .newtag { animation: tag-pop .35s .45s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes deal-in { from { opacity: 0; transform: translateY(-120px) scale(.5) rotate(-12deg); } }
@keyframes tag-pop { from { transform: translateX(-50%) scale(0); } }
/* Aura de rareté : visible avant de retourner la carte */
.bslot::before { content: ""; position: absolute; inset: -24%; border-radius: 50%; -webkit-mask: radial-gradient(closest-side, #000 45%, transparent); mask: radial-gradient(closest-side, #000 45%, transparent); pointer-events: none; opacity: 0; transition: opacity .4s; z-index: -1; }
.bslot.aura-Rare:not(.flipped) .bback .cardback { box-shadow: 0 0 0 2px #6fa2ea, 0 0 18px 4px #3f79c9cc, inset 0 0 18px #3f79c966; }
.bslot.aura-Épique:not(.flipped) .bback .cardback { box-shadow: 0 0 0 2px #c79bff, 0 0 24px 6px #a45be0dd, inset 0 0 22px #a45be077; animation: aura-pulse 1.4s ease-in-out infinite; }
.bslot.aura-Légendaire:not(.flipped) .bback .cardback { box-shadow: 0 0 0 3px #ffe38a, 0 0 30px 10px #ffb347ee, inset 0 0 26px #ffb34788; animation: aura-pulse 1s ease-in-out infinite, legend-shiver 2.4s ease-in-out infinite; }
.bslot.aura-Légendaire:not(.flipped)::before { opacity: 1; background: conic-gradient(from 0deg, #ffe38a00, #ffe38a88, #ffe38a00 12%, #ffe38a88 25%, #ffe38a00 37%, #ffe38a88 50%, #ffe38a00 62%, #ffe38a88 75%, #ffe38a00 87%, #ffe38a88); filter: blur(3px); animation: rays-spin 6s linear infinite; }
.bslot.aura-Épique:not(.flipped)::before { opacity: .8; background: radial-gradient(closest-side, #a45be055, transparent); }
@keyframes aura-pulse { 50% { filter: brightness(1.25); } }
@keyframes legend-shiver { 0%, 80%, 100% { transform: none; } 84% { transform: rotate(-2deg); } 88% { transform: rotate(2deg); } 92% { transform: rotate(-1deg); } }
@keyframes rays-spin { to { transform: rotate(360deg); } }
/* Scène Légendaire */
.legend-moment { position: fixed; inset: 0; z-index: 210; display: grid; place-items: center; background: radial-gradient(circle at 50% 45%, #3a2410f0, #07040cf5 70%); cursor: pointer; overflow: hidden; animation: zoom-fade .3s ease-out; }
.legend-moment.out { animation: pack-fade .32s ease-in forwards; }
.lm-rays { position: absolute; left: 50%; top: 45%; width: 220vmax; height: 220vmax; transform: translate(-50%, -50%); pointer-events: none;
  background: repeating-conic-gradient(from 0deg, #ffd76a33 0 6deg, transparent 6deg 18deg); animation: rays-spin-c 18s linear infinite;
  -webkit-mask: radial-gradient(circle, #000 0 18%, transparent 55%); mask: radial-gradient(circle, #000 0 18%, transparent 55%); }
@keyframes rays-spin-c { to { transform: translate(-50%, -50%) rotate(360deg); } }
.lm-sparks { position: absolute; left: 50%; top: 45%; pointer-events: none; }
.lm-sparks i { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #fff1c4; box-shadow: 0 0 8px 2px #ffb347; opacity: 0;
  transform: rotate(var(--a)) translateY(0); animation: spark 1.6s var(--dl) ease-out infinite; }
@keyframes spark { 0% { opacity: 1; transform: rotate(var(--a)) translateY(-40px) scale(1); } 100% { opacity: 0; transform: rotate(var(--a)) translateY(-46vmin) scale(.3); } }
.lm-inner { position: relative; display: flex; flex-direction: column; align-items: center; padding: 16px; }
.lm-title { margin: 0 0 12px; font: 800 clamp(30px, 9vw, 52px)/1 "Alegreya SC", Georgia, serif; letter-spacing: .06em; color: #ffe38a;
  text-shadow: 0 0 18px #ffb347, 0 3px 0 #5a3000; animation: lm-title .7s cubic-bezier(.2,1.5,.4,1) both; }
.lm-card { width: min(300px, 72vw, calc((100dvh - 230px) / 1.4)); pointer-events: none; animation: lm-card .9s .15s cubic-bezier(.2,1.2,.4,1) both; }
.lm-card .card.tcg { width: 100%; filter: drop-shadow(0 0 26px #ffb347) drop-shadow(0 0 8px #fff1c4); }
.lm-name { margin: 14px 0 0; font: 700 18px "Alegreya Sans", system-ui, sans-serif; color: var(--text); text-shadow: 0 2px 4px #000; }
@keyframes lm-title { from { opacity: 0; transform: scale(2.2); } }
@keyframes lm-card { from { opacity: 0; transform: scale(.3) rotateY(540deg); } }
@media (prefers-reduced-motion: reduce) {
  .bpack, .bp-sheen, .bslot.deal, .bslot .cardback, .bslot::before, .lm-rays, .lm-sparks i, .lm-title, .lm-card { animation: none !important; }
  .bcard { transition: none; }
}
.newtag.legend.in-slot { top: -12px; }
/* Paquet illustré (visuel de l'équipe, affiché tel quel) */
.bstage { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.bpack.art { --pw: min(270px, 64vw, calc((100dvh - 330px) * .645)); width: var(--pw); height: calc(var(--pw) * 1.55); aspect-ratio: auto; flex: none; }
.bp-img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; user-select: none; }
.bpack.art .bp-sheen { inset: 0; border-radius: 2%; -webkit-mask: url(/boosters/rnt00-corps.webp) center / 100% 100%; mask: url(/boosters/rnt00-corps.webp) center / 100% 100%;
  background: linear-gradient(115deg, transparent 38%, #ffffff40 46%, #ffffffaa 50%, #ffffff40 54%, transparent 62%) -150% 0 / 250% 100% no-repeat; mix-blend-mode: screen; }
.bpack.art .bp-flash { top: 12%; }
.bpack.art.tearing .bp-strip-img { transform-origin: 4% 8%; animation: strip-tear .75s cubic-bezier(.4,.1,.5,1) forwards; }
.bpack.art.burst .bp-body-img, .bpack.art.burst .bp-sheen { animation: pack-fade .55s ease-in forwards; }
@keyframes strip-tear { 0% { transform: none; } 35% { transform: rotate(-4deg) translate(-2%, -1%); } 100% { transform: translate(55%, -120%) rotate(32deg); opacity: 0; } }
.bp-caption { margin: 0; font: 700 13px "Rubik", system-ui, sans-serif; color: var(--gold); letter-spacing: .08em; padding: 4px 12px; border: 1px solid #c9a24a88; border-radius: 999px; background: #0008; }
.bpack.art.tearing ~ .bp-caption { opacity: 0; transition: opacity .3s; }
/* Gestion des joueurs (admin) */
.player-row .pavatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--purple-deep); color: var(--gold-bright); font-weight: 800; font-size: 13px; flex: none; }
.player-row .dname { font-weight: 700; }
.player-row .note { flex-basis: 100%; margin-left: 42px; }
.player-row.open { border-color: var(--gold); }
.player-tools { margin: -2px 0 6px; display: grid; gap: 10px; }
.player-tools .row { align-items: center; gap: 8px; flex-wrap: wrap; }
.player-tools input[type=number] { width: 5.5em; max-width: 5.5em; flex: none; }
.player-tools .why { margin: 0; }
/* ===================== Dos de carte officiels ===================== */
.cardback, .cardback-mini, .back-blue { background: url(/cards/dos-bleu.webp) center / 100% 100% no-repeat; border: 0; box-shadow: 0 3px 10px #000a; }
.cardback-mini, .back-red { background-image: url(/cards/dos-rouge-mini.webp); }
.back-blue.cardback-mini, .sp-deck.back-blue { background-image: url(/cards/dos-bleu-mini.webp); }
.back-red { background: url(/cards/dos-rouge-mini.webp) center / 100% 100% no-repeat; }
.cardback { border-radius: 4.8% / 3.4%; }
.bback .cardback { background: url(/cards/dos-bleu.webp) center / 100% 100% no-repeat; border-radius: 4.8% / 3.4%; }

/* ===================== Plateau du duel (refonte) ===================== */
.duel { max-width: 1120px; margin: 0 auto; display: grid; gap: 8px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "opp" "btop" "mid" "bbot" "me" "hand" "log"; }
.duel > .sp-top { grid-area: opp; } .duel > .opp-fan { grid-area: fan; display: none; }
.duel > .zone-top { grid-area: btop; } .duel > .midline { grid-area: mid; } .duel > .zone-bottom { grid-area: bbot; }
.duel > .sp-bottom { grid-area: me; } .duel > .hand-fan { grid-area: hand; } .duel > .logbox { grid-area: log; }

/* Panneau joueur : barre fine (téléphone) */
.sidepanel { position: relative; display: grid; align-items: center; column-gap: 10px; row-gap: 2px; padding: 6px 10px; border-radius: 14px;
  grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "av name pile" "av energy pile";
  background: linear-gradient(90deg, #1e1530f2, #150f22e6); border: 1px solid #c9a24a44; box-shadow: 0 4px 14px #0008; }
.sidepanel.active { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 18px #e8c46a55; }
.sidepanel .portrait { grid-area: av; }
.sp-name { grid-area: name; display: flex; align-items: baseline; gap: 6px; min-width: 0; flex-wrap: wrap; }
.sp-name .p-deck { flex-basis: 100%; display: none; }
.sp-energy { grid-area: energy; }
.sp-pile { grid-area: pile; display: flex; align-items: center; gap: 8px; }
.sp-deck { position: relative; display: block; width: 30px; aspect-ratio: 640 / 896; border-radius: 3px; flex: none; }
.sp-deck b { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); font: 800 11px "Rubik", sans-serif; color: #fff; background: #000d; border: 1px solid var(--gold); border-radius: 999px; padding: 0 5px; }
.sp-counts { display: grid; gap: 2px; font: 700 12px "Rubik", sans-serif; color: var(--parch); }
.sp-counts > span { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.sp-counts .grave-ico { width: 12px; height: 12px; }
/* PV dans un cœur */
.sidepanel .p-hp { right: -12px; bottom: -10px; min-width: 0; width: 36px; height: 33px; padding: 4px 0 0; border: 0; border-radius: 0; font-size: 15px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 29'%3E%3Cdefs%3E%3CradialGradient id='g' cx='35%25' cy='30%25' r='75%25'%3E%3Cstop offset='0' stop-color='%23ff7b6b'/%3E%3Cstop offset='.6' stop-color='%23d1261b'/%3E%3Cstop offset='1' stop-color='%237a130d'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cpath d='M16 28.5C6 21 .8 15.6.8 9.2.8 4.4 4.4.8 9 .8c3 0 5.4 1.5 7 4 1.6-2.5 4-4 7-4 4.6 0 8.2 3.6 8.2 8.4 0 6.4-5.2 11.8-15.2 19.3z' fill='url(%23g)' stroke='%23fff' stroke-opacity='.85' stroke-width='1.4'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  filter: drop-shadow(0 2px 3px #000c); place-items: start center; }
.sidepanel .portrait { width: 52px; height: 52px; }

/* Ordinateur : colonne de droite + main adverse en éventail */
@media (min-width: 900px) {
  .arena { padding-top: 12px; }
  .duel { grid-template-columns: minmax(0, 1fr) 200px; column-gap: 14px;
    grid-template-areas: "btop opp" "mid endbtn" "bbot me" "hand me" "log ."; }
  .duel > .endturn-slot { display: grid; grid-area: endbtn; align-items: center; }
  .actionbar #endturn { display: none; }
  .duel > .opp-fan { grid-area: btop; align-self: start; }
  .duel > .zone-top { padding-top: 70px; }
  .duel > .opp-fan { display: flex; }
  .sidepanel { grid-template-columns: 1fr; grid-template-areas: none; justify-items: center; text-align: center; row-gap: 8px; padding: 12px 10px 14px; align-self: stretch; align-content: space-between; }
  .duel .sidepanel > * { grid-area: auto; grid-column: 1; }
  .sp-top { align-content: start; }
  .sp-bottom { align-content: end; }
  .sp-bottom > .portrait { order: -3; } .sp-bottom > .sp-name { order: -2; } .sp-bottom > .sp-pile { order: -1; }
  .sp-name { justify-content: center; }
  .sp-name .p-deck { display: block; }
  .sp-energy { justify-content: center; background: #0006; border-radius: 999px; padding: 3px 10px; }
  .sp-pile { flex-direction: column; gap: 10px; }
  .sp-deck { width: 78px; border-radius: 6px; box-shadow: 0 6px 14px #000c; }
  .sp-top .sp-deck { transform: rotate(180deg); }
  .sp-top .sp-deck b { transform: translateX(-50%) rotate(180deg); bottom: auto; top: -8px; }
  .sp-deck b { font-size: 13px; padding: 1px 8px; bottom: -9px; }
  .sp-counts { display: flex; gap: 12px; }
  .sidepanel .portrait { width: 84px; height: 84px; border-width: 3px; }
  .sidepanel .p-hp { width: 46px; height: 42px; font-size: 18px; padding-top: 6px; right: -14px; bottom: -8px; }
  .sidepanel .p-name { font-size: 18px; }
  .opp-fan { justify-content: center; align-items: flex-start; height: 0; position: relative; z-index: 2; pointer-events: none; transform: translateY(-14px); }
  .ofan-card { width: 74px; aspect-ratio: 640 / 896; border-radius: 5px; margin: 0 -9px; box-shadow: 0 6px 12px #000b;
    transform-origin: 50% -80%; transform: rotate(calc(var(--i) * -5deg)) translateY(calc(var(--i) * var(--i) * -1.5px)); }
  .duel > .zone-top { position: relative; z-index: 0; }
  .duel > .hand-fan { margin-top: -10px; }
}
@media (min-width: 900px) and (max-height: 820px) { .ofan-card { width: 58px; } .duel > .zone-top { padding-top: 56px; } .sp-deck { width: 62px; } .sidepanel .portrait { width: 70px; height: 70px; } }
/* Bouton « Fin du tour » (colonne de droite, ordinateur) */
.endturn-slot { display: none; }
.endturn-big { width: 100%; min-height: 48px; border-radius: 12px; font: 800 17px "Alegreya SC", Georgia, serif; letter-spacing: .02em; cursor: pointer;
  color: #1e160c; background: linear-gradient(#f0d58a, #c9a24a 55%, #a67f2e); border: 2px solid #fff1c4aa; box-shadow: 0 4px 0 #6b4f1a, 0 8px 18px #000a; transition: transform .1s, box-shadow .1s, filter .15s; }
.endturn-big:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.endturn-big:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #6b4f1a, 0 4px 10px #000a; }
.endturn-big:disabled { cursor: default; filter: grayscale(.4) brightness(.8); opacity: .85; }
.endturn-big.wait { color: #cbbfd9; background: linear-gradient(#3a2d52, #241a36); border-color: #c9a24a44; box-shadow: 0 4px 0 #120c1c, 0 8px 18px #000a; font-size: 15px; }
.endturn-big.ready { color: #0b1f12; background: linear-gradient(#b8f0c2, #7cc58a 55%, #4f9a5d); border-color: #e4ffe9; box-shadow: 0 4px 0 #2c5c35, 0 0 22px #7cc58acc; animation: endturn-pulse 1.3s ease-in-out infinite; }
@keyframes endturn-pulse { 50% { box-shadow: 0 4px 0 #2c5c35, 0 0 34px #7cc58a; } }
@media (prefers-reduced-motion: reduce) { .endturn-big.ready { animation: none; } }
/* ===================== Identité visuelle : fond, logos ===================== */
/* Le décor est posé sur un calque fixe : il ne défile pas et ne se répète jamais. */
body { background: #0d0a14; }
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, #0a0712cc 0%, #0a0712b3 35%, #0a0712e6 100%),
    url(/img/fond.webp) center 30% / cover no-repeat;
}
@media (max-width: 700px) {
  body::before { background:
    linear-gradient(180deg, #0a0712d9 0%, #0a0712c4 40%, #0a0712f0 100%),
    url(/img/fond-petit.webp) 62% 20% / cover no-repeat; }
}
body:has(.arena)::before { display: none; }
.panel { background: #120c1ccc; border-color: #c9a24a33; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.wrap { position: relative; }
/* Accueil */
.hero { display: grid; justify-items: center; gap: 4px; margin: 6px 0 2px; text-align: center; }
.hero-logo { margin: 0; line-height: 0; }
.hero-logo img { width: min(520px, 88vw); height: auto; filter: drop-shadow(0 10px 24px #000c); }
.set-badge { display: grid; justify-items: center; gap: 2px; }
.set-badge img { width: min(360px, 70vw); height: auto; filter: drop-shadow(0 8px 18px #000c); }
.set-badge span { font: 700 12px "Rubik", system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #cfe9b4; text-shadow: 0 1px 3px #000; }
.hero + .lede { text-align: center; }
/* Salon */
.topbrand { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 2px 0 6px; }
.top-logo { margin: 0; line-height: 0; }
.top-logo img { width: min(260px, 52vw); height: auto; filter: drop-shadow(0 6px 14px #000c); }
.top-set { display: flex; align-items: center; gap: 8px; }
.top-set img { width: min(150px, 30vw); height: auto; filter: drop-shadow(0 4px 10px #000c); }
.top-set span { font: 700 12px/1.35 "Rubik", system-ui, sans-serif; color: var(--muted); }
@media (max-width: 520px) { .top-set span { display: none; } }
/* Collection */
.set-strip { display: flex; align-items: center; gap: 12px; padding: 6px 12px; border-radius: 12px; background: linear-gradient(90deg, #1a2a12cc, #120c1ccc); border: 1px solid #9be06a44; }
.set-strip img { width: 120px; height: auto; flex: none; }
.set-strip b { display: block; font: 800 18px "Alegreya SC", Georgia, serif; color: #d7f5a8; }
/* Plateau de duel : le décor du set, assombri */
body:has(.arena) { background: #0b0812; }
.arena {
  background:
    radial-gradient(ellipse at 50% 45%, #0a071233 0%, #0a0712b3 75%),
    linear-gradient(#0a071280, #0a0712b3),
    url(/img/fond.webp) center 35% / cover no-repeat;
}
.zone-top { background: linear-gradient(#0000, #1a0f2a88); }
.zone-bottom { background: linear-gradient(#c9a24a1a, #0a071266); }
.filters { background: #0d0916e6; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); margin-inline: -8px; padding-inline: 8px; border-radius: 0 0 12px 12px; }
/* En-tête du salon : les deux logos côte à côte, centrés */
.topbrand { justify-content: center; align-items: center; gap: clamp(12px, 4vw, 40px); flex-wrap: nowrap; }
.top-logo img { width: min(250px, 42vw); }
.top-sep { width: 2px; align-self: stretch; margin: 14px 0; background: linear-gradient(transparent, #c9a24a99, transparent); flex: none; }
.top-set { display: grid; justify-items: center; gap: 2px; }
.top-set img { width: min(250px, 42vw); }
.top-set span { display: block; font: 700 11px "Rubik", system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #cfe9b4; text-shadow: 0 1px 3px #000; }
.topbrand + .lede { text-align: center; }
.top-set span { white-space: nowrap; }
@media (max-width: 520px) { .top-set span { font-size: 9px; letter-spacing: .1em; } }
.top-logo img, .top-set img { width: min(230px, 40vw); }
/* Phrase d'intro et raccourcis du salon */
.lobby-lede { max-width: none; text-align: center; margin: 4px 0 10px; font-size: 16px; color: #d9cfe8; text-shadow: 0 1px 4px #000; }
.quicklinks { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.qlink { font: 700 14px "Alegreya Sans", system-ui, sans-serif; color: var(--gold-bright); background: #120c1ccc; border: 1px solid #c9a24a66; border-radius: 999px; padding: 6px 14px; cursor: pointer;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); transition: background .15s, border-color .15s; }
.qlink:hover { background: #2a1840e6; border-color: var(--gold); }
.qlink.admin { color: #cbbfd9; border-color: #a45be066; }
.qlink.admin::before { content: "⚙ "; color: #a45be0; }
@media (max-width: 520px) { .qlink { font-size: 13px; padding: 5px 11px; } .quicklinks { gap: 6px; } }
/* Blocs opaques : plus de transparence sur les listes (lisibilité) */
.panel { background: #150f20; -webkit-backdrop-filter: none; backdrop-filter: none; }
.admin-row, .game-row, .deck-opt, .reward, .chip { background: #1c1529; }
.admin-row:hover, .deck-opt:hover { background: #251c36; }
.admin-row.off { background: #17111f; }
.player-tools { background: #150f20; }
.set-strip { background: linear-gradient(90deg, #1a2a12, #150f20); }
.filters { background: #0d0916; -webkit-backdrop-filter: none; backdrop-filter: none; }
.qlink { background: #150f20; -webkit-backdrop-filter: none; backdrop-filter: none; }
.qlink:hover { background: #2a1840; }
/* ===== Plateau ordinateur v3 : deux zones de même taille =====
   L'éventail adverse a sa propre rangée et les deux zones ont une hauteur fixe :
   le panneau de droite ne peut plus étirer la zone de l'adversaire. */
@media (min-width: 900px) {
  .duel { grid-template-areas: "fan opp" "btop opp" "mid endbtn" "bbot me" "hand me" "log ."; }
  .duel > .opp-fan { grid-area: fan; align-self: end; height: auto; transform: none; margin-bottom: -18px; }
  .duel > .zone-top { padding-top: 10px; align-self: end; }
  .duel > .zone-bottom { align-self: start; }
  .duel > .zone-top, .duel > .zone-bottom { height: 170px; min-height: 0; }
  .ofan-card { width: 64px; }
}
@media (min-width: 900px) and (max-height: 820px) {
  .duel > .zone-top, .duel > .zone-bottom { height: 150px; }
  .duel > .zone-top { padding-top: 10px; }
  .ofan-card { width: 54px; }
}
/* Main adverse : même gabarit que ta main (en miroir), cartes en partie cachées sous le haut de l'écran */
@media (min-width: 900px) {
  .duel > .opp-fan { margin-bottom: -26px; margin-top: -54px; }
  .ofan-card { width: min(112px, calc(560px / (var(--n) * .62 + .9))); margin: 0 calc(min(112px, calc(560px / (var(--n) * .62 + .9))) * -.14);
    border-radius: 7px; transform-origin: 50% -120%; transform: rotate(calc(var(--i) * -4deg)) translateY(calc(var(--i) * var(--i) * -3px)); }
}
@media (min-width: 900px) and (max-height: 820px) {
  .ofan-card { width: 96px; margin: 0 -13px; }
  .duel > .opp-fan { margin-top: -48px; }
}
.card.tcg .c-blank { position: absolute; inset: 0; width: 100%; height: 100%; display: block; border-radius: 4.5%; }
.c-set { top: 96.95%; height: 2.5%; }
.card.tcg .c-art img { object-position: 50% 30%; }
/* Terrains et Permanents (test) */
.c-kind { position: absolute; left: 50%; top: 61.5%; transform: translateX(-50%); font: 800 3.4cqw "Rubik", sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #fff; background: #3b6d2ccc; border: .3cqw solid #cfe9b4; border-radius: 999px; padding: .4cqw 2.4cqw; }
.card.tcg.is-test::before { content: "TEST"; position: absolute; top: 12%; left: -2%; z-index: 3; font: 900 3.6cqw "Rubik", sans-serif; letter-spacing: .1em; color: #1e160c; background: #ffd24a; padding: .6cqw 2.4cqw; border-radius: 0 999px 999px 0; box-shadow: 0 .6cqw 1.4cqw #000a; }
.testtag { display: block; margin-top: 6px; text-align: center; font: 700 12px "Rubik", sans-serif; color: #ffd24a; }
.costdisc { position: absolute; right: 4%; top: 2%; min-width: 22%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font: 900 7cqw "Rubik", sans-serif; color: #0b1f12; background: radial-gradient(#b8f0c2, #4f9a5d); border: .5cqw solid #fff; box-shadow: 0 0 2cqw #7cc58a; z-index: 3; }
.terrain-chip { display: grid; justify-items: center; gap: 1px; margin: 6px auto 0; padding: 6px 16px; max-width: 460px; width: max-content; border-radius: 12px; cursor: zoom-in; text-align: center;
  background: linear-gradient(#24371c, #15210f); border: 1px solid #9be06a; box-shadow: 0 0 16px #9be06a44; color: var(--text); font: inherit; position: relative; }
.terrain-chip .tc-label { font: 800 10px "Rubik", sans-serif; letter-spacing: .16em; text-transform: uppercase; color: #9be06a; }
.terrain-chip b { font: 800 16px "Alegreya SC", Georgia, serif; color: #d7f5a8; }
.terrain-chip .tc-text { font-size: 13px; }
.terrain-chip .tc-who { font-size: 11px; color: var(--muted); }
.perms { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 6px; position: relative; z-index: 1; }
.perm-chip { font: 700 12px "Alegreya Sans", sans-serif; color: #f3e3ff; background: #2a1840; border: 1px solid #a45be0; border-radius: 999px; padding: 3px 10px; cursor: zoom-in; }
/* ===== Emplacements Permanents (P) et Terrain ===== */
.duel .zone { position: relative; }
.pslots { position: absolute; left: 50%; transform: translateX(-50%); display: flex; gap: 12px; z-index: 3; pointer-events: none; }
.pslots.top { top: -4px; }
.pslots.bottom { bottom: -4px; }
.pslot { --ps: 46px; width: var(--ps); height: var(--ps); border-radius: 9px; position: relative; flex: none; pointer-events: auto; }
.pslot.empty { display: grid; place-items: center; background: #3a2e28b3; border: 1px dashed #c9a24a55; color: #c9a24a88; font: 800 15px "Rubik", sans-serif; }
.pslot.filled { padding: 0; border: 2px solid #c79bff; background: #1a1128; overflow: hidden; cursor: zoom-in; box-shadow: 0 0 10px #a45be088, 0 3px 8px #000a; }
.pslot .ps-art, .tslot .ps-art { position: absolute; inset: 0; background-size: auto 180%; background-position: 50% 22%; background-repeat: no-repeat; }
.pslot .ps-art.ph .ph-mono, .tslot .ps-art.ph .ph-mono { font-size: 16px; }
.pslot .ps-name { position: absolute; left: 0; right: 0; bottom: 0; font: 700 8px/1.1 "Rubik", sans-serif; color: #fff; background: #000c; padding: 1px 2px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zone-top .board { padding-top: 30px; }
.zone-bottom .board { padding-bottom: 30px; }
/* Terrain : à gauche, sur la ligne du milieu */
.midline { position: relative; }
.tslot { position: absolute; left: -4px; top: 50%; transform: translateY(-50%); z-index: 4; width: 64px; height: 64px; border-radius: 10px; }
.tslot.empty { display: grid; place-items: center; background: #3a2e28cc; border: 1px dashed #9be06a66; }
.tslot.empty span { font: 800 11px "Rubik", sans-serif; color: #cfe9b4aa; letter-spacing: .04em; }
.tslot.filled { padding: 0; overflow: hidden; border: 2px solid #9be06a; background: #15210f; cursor: zoom-in; box-shadow: 0 0 16px #9be06a88, 0 4px 10px #000a; }
.tslot .ts-label { position: absolute; top: 0; left: 0; right: 0; font: 800 7px "Rubik", sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #0b1f12; background: #9be06a; text-align: center; }
.tslot .ts-name { position: absolute; left: 0; right: 0; bottom: 9px; font: 700 8px/1.1 "Rubik", sans-serif; color: #fff; background: #000c; padding: 1px 2px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tslot .ts-who { position: absolute; left: 0; right: 0; bottom: 0; font: 600 7px "Rubik", sans-serif; color: #cfe9b4; background: #000c; text-align: center; white-space: nowrap; overflow: hidden; }
.midline .banner { margin-left: 70px; width: min(calc(100% - 70px), 560px); }
@media (min-width: 900px) {
  .pslot { --ps: 64px; border-radius: 12px; }
  .pslot.empty { font-size: 20px; }
  .pslot .ps-name { font-size: 10px; }
  .pslots { gap: 18px; }
  .pslots.top { top: -10px; }
  .pslots.bottom { bottom: -10px; }
  .zone-top .board { padding-top: 42px; }
  .zone-bottom .board { padding-bottom: 42px; }
  .duel > .zone-top, .duel > .zone-bottom { height: 200px; }
  .tslot { width: 110px; height: 100px; left: -8px; }
  .tslot.empty span { font-size: 17px; }
  .tslot .ts-label { font-size: 9px; }
  .tslot .ts-name { font-size: 11px; bottom: 12px; }
  .tslot .ts-who { font-size: 9px; }
  .midline .banner { margin-left: 0; justify-self: center; width: min(100%, 560px); }
}
@media (min-width: 900px) and (max-height: 820px) {
  .duel > .zone-top, .duel > .zone-bottom { height: 180px; }
  .pslot { --ps: 56px; }
}
/* Pendant le glisser d'un Permanent ou d'un Terrain */
body.drag-perm .pslots.mine .pslot.empty { border: 2px solid #c79bff; background: #a45be033; color: #f3e3ff; box-shadow: 0 0 14px #a45be0; }
body.drag-terrain .tslot { box-shadow: 0 0 0 2px #9be06a, 0 0 22px #9be06a; }
body.drag-perm .zone-bottom .board, body.drag-terrain .zone-bottom .board { box-shadow: none !important; background: none !important; }
.perms, .perm-chip, .terrain-chip { display: none; }
/* Lancer de pièce */
.coin-toss { position: fixed; z-index: 175; left: 50%; top: 40%; transform: translate(-50%, -50%); pointer-events: none; width: min(320px, 86vw); text-align: center; }
.coin-toss[hidden] { display: none; }
.ct-inner { background: linear-gradient(#2a1840f2, #140d20f2); border: 1px solid var(--gold); border-radius: 16px; padding: 12px 14px 14px; box-shadow: 0 10px 30px #000c; opacity: 0; }
.coin-toss.in .ct-inner { animation: reveal-in .3s ease-out forwards; }
.coin-toss.out .ct-inner { animation: reveal-out .25s ease-in forwards; }
.ct-title { margin: 0 0 10px; font-size: 14px; color: var(--muted); }
.ct-title b { color: var(--gold-bright); }
.ct-coin { position: relative; width: 96px; height: 96px; margin: 0 auto; transform-style: preserve-3d; perspective: 600px; }
.ct-face { position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center; align-content: center; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  font: 800 16px "Alegreya SC", Georgia, serif; color: #3a2400; border: 4px solid #b08a36; box-shadow: inset 0 0 0 3px #fff1c466, inset 0 -6px 10px #0004, 0 6px 14px #000a; }
.ct-face i { font-style: normal; font-size: 30px; line-height: 1; }
.ct-f { background: radial-gradient(circle at 35% 30%, #fff4c2, #e8c46a 55%, #a67f2e); }
.ct-p { background: radial-gradient(circle at 35% 30%, #f3e3ff, #b88be6 55%, #6b3fa3); color: #22103a; border-color: #7b3fc4; transform: rotateY(180deg); }
.coin-toss.in .ct-coin.heads { animation: coin-heads 1.1s cubic-bezier(.25,.6,.3,1) forwards; }
.coin-toss.in .ct-coin.tails { animation: coin-tails 1.1s cubic-bezier(.25,.6,.3,1) forwards; }
.ct-coin.still.tails { transform: rotateY(180deg); }
@keyframes coin-heads { 0% { transform: translateY(0) rotateY(0); } 45% { transform: translateY(-46px) rotateY(1080deg); } 100% { transform: translateY(0) rotateY(1800deg); } }
@keyframes coin-tails { 0% { transform: translateY(0) rotateY(0); } 45% { transform: translateY(-46px) rotateY(1080deg); } 100% { transform: translateY(0) rotateY(1980deg); } }
.ct-result, .ct-detail { opacity: 0; transition: opacity .2s; }
.coin-toss.show-result .ct-result, .coin-toss.show-result .ct-detail { opacity: 1; }
.ct-result { margin: 10px 0 2px; font: 800 22px "Alegreya SC", Georgia, serif; color: var(--gold-bright); }
.ct-detail { margin: 0; font-size: 13px; color: var(--text); }
@media (prefers-reduced-motion: reduce) { .coin-toss.in .ct-coin { animation: none !important; } }

/* Deck vide : perte de PV à la pioche */
.sp-deck.empty { position: relative; opacity: .75; }
.sp-deck .fatigue { position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); white-space: nowrap;
  font-style: normal; font-size: 11px; font-weight: 700; color: #fff; background: #b3261e; border-radius: 8px; padding: 1px 6px; }

/* Ouverture de 5 boosters */
.rw-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.bpack .bp-back { transform-origin: 50% 96%; transform: translateX(calc(var(--k) * 9%)) rotate(calc(var(--k) * 7deg)); filter: brightness(.72); }
.bpack.art.tearing .bp-back, .bpack.art.burst .bp-back { animation: pack-fade .55s ease-in forwards; }
.bp-count { position: absolute; right: -10px; top: -10px; z-index: 3; min-width: 44px; padding: 6px 10px; border-radius: 999px;
  font: 800 20px/1 "Alegreya SC", Georgia, serif; color: #1b1030; background: linear-gradient(#ffe38a, #c9a24a); box-shadow: 0 3px 10px #000a; }
.bpack.burst .bp-count { opacity: 0; transition: opacity .2s; }
.bmulti { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; }
.bgroup-t { margin: 8px 0 0; text-align: center; font: 700 12px "Rubik", system-ui, sans-serif; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.bmulti .bslots { padding: 10px 0 6px; gap: 14px 8px; flex-wrap: nowrap; }
.bmulti .bslot { width: min(128px, calc((100vw - 72px) / 5)); flex: none; }
.bmulti .bslot .newtag { font-size: 9px; padding: 2px 6px; top: -9px; }

/* Renton d'or et boutique */
.rewards { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.coin-ico { width: 1em; height: 1em; vertical-align: -0.14em; flex: none; object-fit: contain; filter: drop-shadow(0 1px 2px #000a); }
.gold-tile .big .coin-ico { width: 40px; height: 40px; }
.gold-amt { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; }
.gold-amt .coin-ico { width: 1.25em; height: 1.25em; }
.wallet { padding: 6px 12px; border-radius: 999px; background: #150f20; border: 1px solid #c9a24a88; color: var(--gold-bright); font-size: 17px; }
.offers { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 16px 0; }
.offer { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 14px; border-radius: 14px; background: #150f20; border: 1px solid var(--felt-line); text-align: center; }
.offer.multi { border-color: #c9a24aaa; box-shadow: 0 0 0 1px #c9a24a44, 0 8px 30px #c9a24a22; }
.offer h3 { margin: 6px 0 0; font-family: "Alegreya SC", Georgia, serif; color: var(--gold-bright); }
.offer .note s { opacity: .7; }
.offers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.offer-art { --pw: 120px; position: relative; width: var(--pw); height: calc(var(--pw) * 1.55); margin: 6px 0 4px; }
@media (max-width: 480px) { .offers { gap: 10px; } .offer { padding: 14px 8px; } .offer-art { --pw: 74px; } .offer-art.fan img { transform: translateX(calc(var(--k) * var(--pw) * .13)) rotate(calc(var(--k) * 6deg)); } .offer .buy { min-width: 0; width: 100%; } .offer h3 { font-size: 16px; } }
.offer-art img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; filter: drop-shadow(0 6px 12px #000a); }
.offer-art.fan { width: calc(var(--pw) * 1.66); }
.offer-art.fan img { width: var(--pw); left: calc(var(--pw) * .33); transform-origin: 50% 95%;
  transform: translateX(calc(var(--k) * var(--pw) * .15)) rotate(calc(var(--k) * 8deg)); filter: drop-shadow(0 6px 12px #000a) brightness(calc(1 - (var(--k) * var(--k)) * .06)); }
.offer-art.fan img:nth-of-type(1) { z-index: 1; } .offer-art.fan img:nth-of-type(2) { z-index: 2; } .offer-art.fan img:nth-of-type(3) { z-index: 5; }
.offer-art.fan img:nth-of-type(4) { z-index: 2; } .offer-art.fan img:nth-of-type(5) { z-index: 1; }
.offer-art .bp-count { z-index: 6; }
.offer .buy { min-width: 150px; justify-content: center; font-size: 17px; }
.offer .miss { color: #e59a8f; margin: 0; }
.shop-screen .bought { margin-top: 14px; border-color: #5fbf7a88; }
.shop-screen .bought .row { gap: 8px; }
.shop-screen .earn ul { margin: 6px 0 0; padding-left: 18px; line-height: 1.7; }

/* Mulligan : main de départ */
.mulligan { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 16px; overflow-y: auto;
  background: radial-gradient(circle at 50% 40%, #2a1a3ee8, #07040cf2 75%); }
.mulligan.anim { animation: zoom-fade .3s ease-out; }
.mull-inner { width: min(980px, 100%); display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.mull-kicker { margin: 0; font: 700 12px "Rubik", system-ui, sans-serif; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.mull-title { margin: 0; font: 800 clamp(28px, 6vw, 40px)/1 "Alegreya SC", Georgia, serif; color: var(--gold-bright); text-shadow: 0 2px 0 #000a, 0 0 18px #e8c46a55; }
.mull-help { margin: 0 0 6px; max-width: 520px; color: #d9cfe8; }
.mull-hand { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 12px; padding: 12px 0; }
.mull-slot { position: relative; width: clamp(96px, 17vw, 168px); transition: transform .18s; }
.mulligan.anim .mull-slot { animation: deal-in .5s cubic-bezier(.2,1.2,.4,1) both; }
.mull-slot:nth-child(2) { animation-delay: .08s; } .mull-slot:nth-child(3) { animation-delay: .16s; } .mull-slot:nth-child(4) { animation-delay: .24s; } .mull-slot:nth-child(5) { animation-delay: .32s; }
.mull-slot .card.tcg { width: 100%; cursor: pointer; }
.mull-slot:not(.pick) .card.tcg:hover { transform: translateY(-6px); }
.mull-slot.pick { transform: translateY(8px) scale(.95); }
.mull-slot.pick .card.tcg { filter: grayscale(.75) brightness(.55); box-shadow: 0 0 0 3px #e0564a, 0 0 22px #e0564a88; }
.mull-x { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  font: 800 30px/1 system-ui, sans-serif; color: #fff; background: #c8372dee; box-shadow: 0 4px 14px #000a; pointer-events: none; animation: tag-pop .25s cubic-bezier(.2,1.6,.4,1) both; }
.mull-tag { position: absolute; left: 50%; top: -10px; transform: translateX(-50%); white-space: nowrap; pointer-events: none; z-index: 2;
  font-weight: 800; font-size: 12px; border-radius: 999px; padding: 2px 10px; background: #e0564a; color: #fff; }
.mull-tag.new { background: var(--ok); color: #0b1f12; animation: tag-pop .35s .3s cubic-bezier(.2,1.6,.4,1) both; }
.mull-slot.fresh .card.tcg { box-shadow: 0 0 0 2px #5fbf7a, 0 0 18px #5fbf7a77; }
.mull-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; min-height: 52px; }
.mull-actions .endturn-big { min-width: 220px; }
.mull-wait { display: inline-flex; gap: 6px; } .mull-wait i { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); animation: aura-pulse 1s ease-in-out infinite; opacity: .8; }
.mull-wait i:nth-child(2) { animation-delay: .2s; } .mull-wait i:nth-child(3) { animation-delay: .4s; }
@media (max-width: 480px) { .mull-hand { gap: 12px 8px; } .mull-slot { width: calc((100vw - 60px) / 3); } }

.mulligan ~ .actionbar { z-index: 160; }
@media (max-width: 480px) { .mull-kicker { font-size: 11px; letter-spacing: .08em; } }

/* ---------- Personnalisation esthétique ---------- */
.tabs { display: flex; gap: 6px; margin: 14px 0 4px; border-bottom: 1px solid var(--felt-line); }
.tab { border: 0; background: none; color: var(--muted); font: 700 15px "Rubik", system-ui, sans-serif; padding: 10px 14px; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tab[aria-selected="true"] { color: var(--gold-bright); border-bottom-color: var(--gold); }
.cos-sec h3 { margin: 18px 0 8px; font-family: "Alegreya SC", Georgia, serif; color: var(--gold-bright); }
.cos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }

.cos-grid.kind-board { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.cos-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 10px; border-radius: 12px; background: #150f20; border: 1px solid var(--felt-line); text-align: center; }
.cos-item.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 18px #e8c46a33; }
.cos-item .note { font-size: 12px; margin: -2px 0 0; }
.cos-item .btn { margin-top: auto; min-width: 110px; justify-content: center; }
.cos-back { width: 86px; aspect-ratio: 640 / 896; border-radius: 6px; background: center / 100% 100% no-repeat; box-shadow: 0 4px 12px #000a; }
.cos-board { width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; background: center / cover no-repeat; box-shadow: inset 0 0 30px #000c, 0 3px 10px #0008; }
.cos-board.set { background: linear-gradient(#0a071255, #0a071288), url(/img/fond.webp) center / cover no-repeat; }
.cos-board.stone { background: radial-gradient(ellipse at 50% 48%, #d9a24a33 0%, transparent 55%), var(--stone), linear-gradient(#3a3242, #2b2533); background-size: auto, 80px 48px, auto; }
.cos-frame { display: grid; place-items: center; width: 130px; height: 120px; }
.cos-frame .portrait { width: 76px; height: 76px; }
.gold-cta { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.card-gold-demo { width: 110px; flex: none; }
.card-gold-demo .card.tcg { width: 100%; pointer-events: none; }
.gold-cta > div:last-child { flex: 1; min-width: 200px; }
.goldbuy, .goldtag { margin-top: 4px; }
.goldtag { display: inline-block; font-weight: 800; font-size: 12px; color: #3a2400; background: linear-gradient(90deg, #ffe38a, #e8b93a); border-radius: 999px; padding: 3px 10px; }

/* Cadre de portrait */
.portrait.framed { border-color: transparent; }
.portrait .p-hp { z-index: 2; }

/* Plateau personnalisé (celui du joueur qui regarde) */
.arena.has-board { background: none; }
.arena.has-board::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, transparent 35%, #000b 100%), linear-gradient(#0a071299, #0a0712aa), var(--board) center / cover no-repeat; }

/* Cartes dorées */
.golden { position: relative; }
.card.tcg.golden { box-shadow: 0 0 0 2px #ffe38a, 0 0 0 4px #b8862a, 0 0 22px 4px #ffb347aa; border-radius: 5%; }
.unit.tok.golden .t-art { border-color: #ffe38a; box-shadow: 0 0 0 2px #b8862a, 0 0 18px 3px #ffb347aa, inset 0 0 0 2px #0008; }
.card.tcg.golden::after, .unit.tok.golden .t-art::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 3; mix-blend-mode: screen;
  background: linear-gradient(115deg, transparent 30%, #fff3b866 42%, #ffe38acc 50%, #fff3b866 58%, transparent 70%) -160% 0 / 260% 100% no-repeat, linear-gradient(135deg, #ffe38a38, #ffb34710 45%, #ffcf4a33);
  animation: gold-sheen 3.4s ease-in-out infinite; }
@keyframes gold-sheen { 0%, 35% { background-position: -160% 0, 0 0; } 75%, 100% { background-position: 260% 0, 0 0; } }
@media (prefers-reduced-motion: reduce) { .card.tcg.golden::after, .unit.tok.golden .t-art::after { animation: none; } }

/* Plateau « Table de pierre » */
.arena.board-stone { background: radial-gradient(ellipse at 50% 48%, #d9a24a33 0%, transparent 55%), radial-gradient(ellipse at 50% 50%, transparent 40%, #000c 100%), var(--stone), linear-gradient(#3a3242, #2b2533);
  background-size: auto, auto, 160px 96px, auto; }
.pick-card.in .card.tcg.golden { box-shadow: 0 0 0 2px #ffe38a, 0 0 0 4px #b8862a; filter: drop-shadow(0 0 8px #ffb347); }

/* Avatar encadré : carré arrondi qui remplit l'ouverture, le cadre par-dessus */
.portrait .p-frame { position: absolute; transform: none; max-width: none; border-radius: 0 !important; object-fit: contain; pointer-events: none; z-index: 1; }
.portrait.framed { background: none; box-shadow: none; border: 0; border-radius: 16%; }
.portrait.framed > img:not(.p-frame), .portrait.framed > .p-mono { width: 100%; height: 100%; border-radius: 16%; object-fit: cover; }
.portrait.framed.round, .portrait.framed.round > img:not(.p-frame), .portrait.framed.round > .p-mono { border-radius: 50%; }
.portrait.framed > .p-mono { display: grid; place-items: center; background: radial-gradient(#4a2d6e, #1d1230); }
.sidepanel .portrait.framed { margin: 8px 12px; }
@media (min-width: 900px) { .sidepanel .portrait.framed { margin: 18px 0; } }

/* ---------- Mode Expérimental : Commandants ---------- */
.tag.exp { background: #c8372d; color: #fff; border-color: #ff8a7a; }
.zone.has-cmd .board { padding-left: 62px; }
.cslot { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); z-index: 4; width: 54px; height: 72px; border-radius: 10px; padding: 0; overflow: hidden;
  border: 2px solid #ff9b3d; background: #2a140c; box-shadow: 0 0 14px #ff7a2e77, 0 4px 10px #000a; color: #fff; cursor: pointer; font-family: "Rubik", sans-serif; }
.cslot.empty { display: grid; place-items: center; background: #3a2e28cc; border: 1px dashed #ff9b3d66; box-shadow: none; }
.cslot.empty span { font: 800 8px "Rubik", sans-serif; color: #ffcf9aaa; letter-spacing: .04em; transform: rotate(-90deg); white-space: nowrap; }
.cslot .ps-art { position: absolute; inset: 0; background-size: auto 170%; background-position: 50% 22%; background-repeat: no-repeat; }
.cslot .ps-art.ph .ph-mono { font-size: 16px; }
.cslot .cs-label { position: absolute; top: 0; left: 0; right: 0; font: 800 6.5px "Rubik", sans-serif; letter-spacing: .02em; overflow: hidden; text-transform: uppercase; color: #2a1200; background: #ff9b3d; text-align: center; }
.cslot .cs-name { position: absolute; left: 0; right: 0; bottom: 10px; font: 700 7.5px/1.1 "Rubik", sans-serif; background: #000c; padding: 1px 2px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cslot .cs-state { position: absolute; left: 0; right: 0; bottom: 0; font: 600 7px "Rubik", sans-serif; color: #ffd9b0; background: #000d; text-align: center; white-space: nowrap; overflow: hidden; }
.cslot .cs-cd { position: absolute; right: 3px; top: 12px; min-width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font: 800 11px "Rubik", sans-serif; background: #1d6fb8; color: #fff; box-shadow: 0 0 0 2px #0008; }
.cslot.board .ps-art { filter: saturate(.5) brightness(.6); }
.cslot.dead { border-color: #666; box-shadow: none; } .cslot.dead .ps-art { filter: grayscale(1) brightness(.4); }
.cslot.ready { animation: cmd-ready 1.6s ease-in-out infinite; }
.cslot.open { outline: 3px solid var(--gold-bright); outline-offset: 2px; }
@keyframes cmd-ready { 50% { box-shadow: 0 0 0 2px #ffcf6a, 0 0 22px #ffb347; } }
/* Commandant sur le plateau : couronne */
.unit.tok.commander { box-shadow: 0 0 0 2px #ff9b3d, 0 0 16px #ff7a2e99; border-radius: 10px; }
.unit.tok.commander::before { content: "♛"; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); z-index: 5; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; color: #2a1200; background: linear-gradient(#ffd27a, #ff9b3d); box-shadow: 0 2px 6px #000a; }
/* Choix du Commandant */
.cmd-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 12px; padding: 8px 0; }
.cmd-choice { display: flex; flex-direction: column; align-items: center; gap: 6px; width: clamp(104px, 17vw, 168px); animation: deal-in .5s cubic-bezier(.2,1.2,.4,1) both; }
.cmd-choice .card.tcg { width: 100%; }
.cmd-style { font: 700 11px "Rubik", sans-serif; color: #ffcf9a; }
@media (max-width: 480px) { .cmd-choice { width: calc((100vw - 56px) / 3); } .cmd-grid { gap: 10px 8px; } }
@media (min-width: 900px) {
  .zone.has-cmd .board { padding-left: 112px; }
  .cslot { width: 96px; height: 128px; left: 8px; }
  .cslot .cs-label { font-size: 9px; } .cslot .cs-name { font-size: 11px; bottom: 14px; } .cslot .cs-state { font-size: 10px; }
  .cslot .cs-cd { width: 24px; height: 24px; font-size: 14px; top: 16px; }
  .cslot.empty span { font-size: 12px; transform: none; }
}
.form-grid label.check input { width: auto; flex: none; }

/* Mode Expérimental : pas de Terrain ni de Permanents */
.zone.no-perms .board { padding-top: 0 !important; padding-bottom: 0 !important; }
.midline.no-terrain .banner { margin-left: 0; justify-self: center; width: min(100%, 560px); }

/* Carte « vierge avec nom » : le nom est déjà sur l'image */
.card.tcg.named .c-name { display: none; }

/* Visuels envoyés depuis l'éditeur */
.vis-zone { display: grid; gap: 8px; padding: 12px; border-radius: 12px; border: 2px dashed #c9a24a77; background: #0d091699; transition: border-color .15s, background .15s; }
.vis-zone.off { opacity: .7; border-style: dotted; }
.vis-zone.hot, body.file-over .vis-zone { border-color: var(--gold-bright); background: #c9a24a1f; }
.vis-zone.hot { box-shadow: 0 0 0 3px #e8c46a55; }
.vis-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.vis-drop-hint { margin: 0; color: var(--muted); }
.vis-zone select { max-width: 100%; }
.tag.ok { background: #1f5c34; color: #d8ffe3; border-color: #5fbf7a; }
.drop-hint { margin: 10px 0 4px; }
body.file-over .admin-list { outline: 2px dashed var(--gold); outline-offset: 6px; border-radius: 12px; }
.bulk-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; max-height: 260px; overflow: auto; }
.bulk-list li { display: flex; gap: 8px; flex-wrap: wrap; }
.bulk-list li.bad { opacity: .6; }

/* Effet « Incliné » */
.unit.tok.has-tap::after { content: "↻"; position: absolute; left: -6px; top: 26%; z-index: 4; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  font: 800 13px/1 system-ui, sans-serif; color: #fff; background: #3f79c9; box-shadow: 0 0 0 2px #0009; }
.unit.tok.can-tap::after { background: #5fbf7a; animation: cmd-ready 1.4s ease-in-out infinite; }
.unit.tok.has-tap.exhausted::after { background: #555; }

/* Énergie retirée pour le prochain tour */
.sp-energy { position: relative; }
.sp-energy .drain { margin-left: 6px; padding: 1px 7px; border-radius: 999px; font: 800 10px "Rubik", sans-serif; color: #fff; background: #b3261e; white-space: nowrap; }

/* Liste du deck : aperçu de la carte au survol */
.deck-row[data-cid] { cursor: default; }
.deck-row[data-cid]:hover { background: #ffffff0d; }

/* ---------- Quêtes du Commandant ---------- */
.quest-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; width: 100%; text-align: left; }
.quest-card { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 12px; background: #150f20; border: 1px solid #ff9b3d77; }
.quest-card h3 { margin: 0; font-family: "Alegreya SC", Georgia, serif; color: var(--gold-bright); }
.quest-card ol { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 4px; font-size: 13px; color: #e6dcf2; }
.quest-card small { color: #ffcf9a; }
.quest-card .q-final { margin: 2px 0; font-size: 13px; color: #9be06a; }
.quest-card .btn { margin-top: auto; align-self: flex-start; }
.sp-quest { display: grid; gap: 2px; font: 600 11px/1.25 "Rubik", sans-serif; color: #e6dcf2; background: #0008; border: 1px solid #ff9b3d55; border-radius: 8px; padding: 4px 7px; text-align: left; }
.sp-quest .q-name { color: #ffcf9a; font-weight: 800; display: flex; gap: 6px; align-items: center; justify-content: space-between; }
.q-dots { display: inline-flex; gap: 3px; } .q-dots i { width: 7px; height: 7px; border-radius: 50%; background: #ffffff33; } .q-dots i.on { background: #ff9b3d; } .q-dots i.cur { background: #ffffff; box-shadow: 0 0 0 2px #ff9b3d66; }
.cslot.asleep .ps-art { filter: grayscale(.8) brightness(.55); }
.cslot .cs-zz { position: absolute; right: 4px; top: 14px; font: 800 14px "Rubik", sans-serif; color: #cfe3ff; text-shadow: 0 1px 3px #000; animation: aura-pulse 1.6s ease-in-out infinite; }
@media (max-width: 899px) { .sidepanel .sp-quest { grid-column: 1 / -1; } }

.qsteps { display: grid; gap: 6px; }
.qstep { display: grid; grid-template-columns: 20px minmax(0, 1fr) repeat(4, 64px); gap: 6px; align-items: end; }
.qstep label { display: grid; gap: 2px; font-size: 11px; color: var(--muted); font-weight: 700; }
.qstep input { width: 100%; }
@media (max-width: 560px) { .qstep { grid-template-columns: 18px 1fr 1fr; } .qstep select { grid-column: 2 / -1; } }
.qprev { margin: 0; padding-left: 18px; display: grid; gap: 3px; font-size: 13px; }

/* ---------- Suivi de quête en direct ---------- */
.midline.has-qhud { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.midline.has-qhud .banner { flex: 1 1 320px; margin: 0; }
.quest-hud { position: relative; z-index: 2; flex: 0 1 340px; min-width: 0; display: grid; gap: 4px; text-align: left; cursor: pointer; font-family: "Rubik", sans-serif;
  padding: 8px 12px; border-radius: 12px; color: #f3ecff; background: linear-gradient(#3a1d0ef2, #1e1020f2); border: 1px solid #ff9b3d; box-shadow: 0 0 0 1px #ff9b3d44, 0 4px 14px #000a; }
.quest-hud:hover { filter: brightness(1.08); }
.quest-hud .qh-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: #ffcf9a; }
.quest-hud .qh-step { white-space: nowrap; font-weight: 800; color: #fff; background: #ff9b3d44; border-radius: 999px; padding: 0 8px; }
.quest-hud .qh-obj { font-weight: 700; font-size: 14px; line-height: 1.2; }
.quest-hud .qh-bar { position: relative; height: 16px; border-radius: 999px; background: #0009; overflow: hidden; border: 1px solid #ff9b3d66; }
.quest-hud .qh-bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #ff7a2e, #ffcf6a); border-radius: inherit; transition: width .5s cubic-bezier(.2,1,.3,1); }
.quest-hud .qh-bar em { position: relative; display: block; text-align: center; font: 800 11px/16px "Rubik", sans-serif; font-style: normal; color: #fff; text-shadow: 0 1px 2px #000; }
.quest-hud .qh-rew { font-size: 11px; color: #9be06a; }
.quest-hud.done { border-color: #5fbf7a; } .quest-hud.done .qh-step { background: #5fbf7a55; }
.quest-hud.bump { animation: qh-bump .7s cubic-bezier(.2,1.4,.4,1); }
@keyframes qh-bump { 30% { transform: scale(1.06); box-shadow: 0 0 0 3px #ffcf6a, 0 0 26px #ffb347; } }
@media (max-width: 899px) { .midline.has-qhud { flex-direction: column; align-items: stretch; } .quest-hud, .midline.has-qhud .banner { flex: none; width: auto; } }
/* Détail des quêtes */
.quest-sheet { inset: 0; display: grid; place-items: center; padding: 16px; background: #07040cee; overflow-y: auto; }
.quest-sheet .qs-inner { width: min(640px, 100%); display: grid; gap: 14px; box-sizing: border-box; }
.qs-block { box-sizing: border-box; min-width: 0; }
.qs-block { background: #150f20; border: 1px solid #ff9b3d77; border-radius: 12px; padding: 14px; }
.qs-block h3 { margin: 0 0 6px; font-family: "Alegreya SC", Georgia, serif; color: var(--gold-bright); }
.qs-list { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.qs-list li { display: grid; grid-template-columns: 24px 1fr; gap: 8px; align-items: start; padding: 6px 8px; border-radius: 8px; background: #0006; }
.qs-list li small { display: block; color: #9be06a; font-size: 12px; margin-top: 2px; }
.qs-list li.done { opacity: .6; } .qs-list li.done .qs-ico { color: #5fbf7a; }
.qs-list li.cur { background: #ff9b3d22; box-shadow: inset 0 0 0 1px #ff9b3d; } .qs-list li.cur .qs-ico { color: #ffcf6a; }
.qs-list li.todo { opacity: .75; }

/* ---------- Gemme de rareté ---------- */
.rgem { position: absolute; left: 50%; bottom: 7.2%; width: 9.5%; aspect-ratio: 1; transform: translate(-50%, 50%) rotate(45deg); z-index: 4; pointer-events: none;
  border-radius: 18%; border: 2px solid #1b1030; box-shadow: 0 0 0 1.5px #fff9, 0 2px 6px #000c; }
.rgem::after { content: ""; position: absolute; inset: 18%; border-radius: 12%; background: linear-gradient(135deg, #fff9, #fff0 60%); }
.rgem.r-Commune { background: linear-gradient(135deg, #e4ded0, #8e8778); }
.rgem.r-Rare { background: linear-gradient(135deg, #8cc0ff, #2c62b8); box-shadow: 0 0 0 1.5px #cfe3ff, 0 0 10px #3f79c9, 0 2px 6px #000c; }
.rgem.r-Épique { background: linear-gradient(135deg, #e0b8ff, #7b33c4); box-shadow: 0 0 0 1.5px #f0dcff, 0 0 12px #a45be0, 0 2px 6px #000c; }
.rgem.r-Légendaire { background: linear-gradient(135deg, #fff1b0, #f08a1c); box-shadow: 0 0 0 1.5px #fff3c4, 0 0 14px 2px #ffb347, 0 2px 6px #000c; animation: aura-pulse 1.6s ease-in-out infinite; }
/* Sur les unités du plateau : petite gemme en haut à droite */
.rgem.on-unit { left: auto; right: 2%; top: 2%; bottom: auto; width: 20%; transform: rotate(45deg); }
@media (prefers-reduced-motion: reduce) { .rgem.r-Légendaire { animation: none; } }

.choice-btn { max-width: 100%; white-space: normal; text-align: center; }

/* ---------- Annonce de tour / de phase ---------- */
.phase-ann { position: fixed; z-index: 175; left: 0; right: 0; top: 38%; pointer-events: none; text-align: center; }
.phase-ann[hidden] { display: none; }
.phase-ann .pa-inner { padding: 14px 16px; background: linear-gradient(90deg, transparent, #140d20f2 18%, #140d20f2 82%, transparent); border-block: 2px solid var(--gold); opacity: 0; }
.phase-ann b { display: block; font: 800 clamp(26px, 6vw, 46px)/1.1 "Alegreya Sans", system-ui, sans-serif; letter-spacing: .04em; text-transform: uppercase; color: var(--gold-bright); text-shadow: 0 3px 8px #000; }
.phase-ann span { display: block; margin-top: 4px; font: 600 clamp(14px, 3vw, 18px)/1.3 "Alegreya Sans", system-ui, sans-serif; color: var(--text); text-shadow: 0 2px 4px #000; }
.phase-ann.foe .pa-inner { border-color: #7d8aa8; } .phase-ann.foe b { color: #c9d3ea; font-size: clamp(20px, 4.5vw, 32px); }
.phase-ann.alert .pa-inner { border-color: #ff5a4a; background: linear-gradient(90deg, transparent, #3a0b0bf2 18%, #3a0b0bf2 82%, transparent); } .phase-ann.alert b { color: #ff8a7a; }
.phase-ann.in .pa-inner { animation: pa-in 1.7s ease-out forwards; }
.phase-ann.alert.in .pa-inner { animation-duration: 2.6s; }
@keyframes pa-in { 0% { opacity: 0; transform: scaleX(.6); } 10% { opacity: 1; transform: scaleX(1.03); } 16% { transform: none; } 85% { opacity: 1; } 100% { opacity: 0; } }
/* Tant qu'on doit bloquer : cadre rouge qui pulse autour de l'écran */
body.need-block::after { content: ""; position: fixed; inset: 0; z-index: 160; pointer-events: none; box-shadow: inset 0 0 0 4px #ff5a4a, inset 0 0 46px #ff5a4a99; animation: nb-pulse 1.1s ease-in-out infinite; }
@keyframes nb-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .phase-ann.in .pa-inner { animation: none; opacity: 1; } body.need-block::after { animation: none; } }

/* ---------- Combat lisible : attaquants avancés, autres unités assombries, flèches, dégâts ---------- */
.unit.attacking { z-index: 3; transition: transform .25s cubic-bezier(.2,1.3,.4,1); }
.zone-top .unit.attacking { transform: translateY(18px) scale(1.07); }
.zone-bottom .unit.attacking { transform: translateY(-18px) scale(1.07); }
.unit.dimmed { filter: brightness(.42) saturate(.5); transition: filter .2s; }
.pair.atk { font-size: 13px; padding: 2px 9px; box-shadow: 0 0 0 2px #fff3, 0 0 12px #ff5a4a; animation: atk-pulse .9s ease-in-out infinite; }
.pair.atk i { font-style: normal; }
@keyframes atk-pulse { 50% { transform: translateX(-50%) scale(1.18); box-shadow: 0 0 0 2px #fff6, 0 0 20px #ff5a4a; } }
.combat-layer { position: fixed; inset: 0; z-index: 150; pointer-events: none; }
.combat-layer[hidden] { display: none; }
.combat-layer svg { position: absolute; inset: 0; overflow: visible; }
.combat-layer path { fill: none; stroke-width: 4; stroke-linecap: round; filter: drop-shadow(0 1px 2px #000c); }
.combat-layer path.free { stroke: #ff5a4a; stroke-dasharray: 9 7; animation: cb-dash .7s linear infinite; }
.combat-layer path.blk { stroke: #6fb4ff; stroke-width: 5; }
@keyframes cb-dash { to { stroke-dashoffset: -16; } }
.cb-chip { position: absolute; transform: translateY(-100%); background: #3a0b0bf2; border: 2px solid #ff5a4a; color: #ffd0c9; font: 800 13px/1.2 "Alegreya Sans", system-ui, sans-serif; border-radius: 999px; padding: 4px 10px; white-space: nowrap; box-shadow: 0 2px 8px #000a; }
.cb-chip.safe { background: #0d2a1af2; border-color: #58c98a; color: #c9f5dc; }
.cb-chip.lethal { animation: atk-pulse2 .7s ease-in-out infinite; }
@keyframes atk-pulse2 { 50% { box-shadow: 0 0 18px #ff5a4a; } }
@media (prefers-reduced-motion: reduce) { .pair.atk, .combat-layer path.free, .cb-chip.lethal { animation: none; } }

/* ---------- Combat animé : impacts, chiffres, mort ---------- */
.fx-layer { position: fixed; inset: 0; z-index: 180; pointer-events: none; overflow: hidden; }
.fx-num { position: absolute; transform: translate(-50%, -50%); font: 900 34px/1 "Rubik", "Alegreya Sans", system-ui, sans-serif; color: #ff4b3a; -webkit-text-stroke: 2px #2a0606; paint-order: stroke fill; text-shadow: 0 3px 6px #000c; animation: fx-num 1.05s cubic-bezier(.2,.9,.3,1) forwards; }
.fx-num.face { font-size: 46px; color: #ff2a1a; }
.fx-num.shield { font-size: 18px; color: #9fd4ff; -webkit-text-stroke: 1px #06203a; }
@keyframes fx-num { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.4); } 14% { opacity: 1; transform: translate(-50%, -70%) scale(1.35); } 30% { transform: translate(-50%, -80%) scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -170%) scale(.9); } }
.fx-burst { position: absolute; width: 90px; height: 90px; margin: -45px 0 0 -45px; border-radius: 50%; background: radial-gradient(circle, #fff 0 18%, #ffd27a 30%, #ff5a4a88 55%, transparent 70%); animation: fx-burst .42s ease-out forwards; }
.fx-burst.big { width: 150px; height: 150px; margin: -75px 0 0 -75px; }
@keyframes fx-burst { 0% { opacity: 1; transform: scale(.25); } 100% { opacity: 0; transform: scale(1.5); } }
.unit.dying { animation: unit-die .62s ease-in forwards !important; pointer-events: none; }
.unit.dying::after { content: ""; position: absolute; inset: 0; z-index: 5; border-radius: inherit; background: linear-gradient(115deg, transparent 46%, #000 47% 49%, transparent 50%), linear-gradient(60deg, transparent 38%, #000 39% 41%, transparent 42%), linear-gradient(170deg, transparent 58%, #000 59% 60.5%, transparent 62%); animation: crack-in .2s ease-out forwards; }
@keyframes crack-in { from { opacity: 0; } to { opacity: .85; } }
@keyframes unit-die { 0% { filter: none; } 30% { filter: grayscale(1) brightness(.75); transform: scale(1.04) rotate(-2deg); opacity: 1; } 100% { filter: grayscale(1) brightness(.35) blur(2px); transform: translateY(26px) scale(.82) rotate(7deg); opacity: 0; } }

/* ---------- Duplication : sort qui serait copié, affiché sur la carte ---------- */
.replay-tag { position: absolute; left: 3%; right: 3%; bottom: 24%; z-index: 4; display: flex; align-items: center; gap: 4%; padding: 3% 4%; border-radius: 8px; background: #140d20f0; border: 1.5px solid #6fb4ff; box-shadow: 0 0 10px #6fb4ff88; text-align: left; pointer-events: none; }
.replay-tag .ps-art { flex: none; width: 24%; aspect-ratio: 1; border-radius: 5px; background-size: cover; background-position: center 20%; }
.replay-tag .rp-txt { min-width: 0; flex: 1; display: grid; }
.replay-tag small { font: 800 6cqw "Rubik", sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #9fd4ff; }
.replay-tag b { font: 800 9cqw/1.1 "Alegreya Sans", system-ui, sans-serif; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.replay-tag i { flex: none; font: 900 7cqw "Rubik", sans-serif; font-style: normal; color: #0b1626; background: #9fd4ff; border-radius: 50%; width: 16%; aspect-ratio: 1; display: grid; place-items: center; }
.replay-tag.none { border-color: #7d8aa8; box-shadow: none; } .replay-tag.none b { color: #b9c2d6; font-size: 6.5cqw; }

/* ===================== Menu principal (hub) ===================== */
.hub { margin: -12px -16px 0; min-height: 100dvh; display: grid; grid-template-columns: 196px minmax(0, 1fr); }
body:has(.hub.tab-home)::before { background: linear-gradient(180deg, #0a071266 0%, #0a071233 40%, #0a0712d9 100%), url(/img/fond.webp) center 30% / cover no-repeat; }
.hub-nav { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 6px; padding: 14px 0 12px; background: linear-gradient(180deg, #0c0814f5, #120b1ef0); border-right: 1px solid var(--gold); box-shadow: 4px 0 18px #000a; z-index: 5; }
.hn-logo { width: 78%; height: auto; margin: 0 auto 10px; filter: drop-shadow(0 4px 10px #000c); }
.hn-main { display: grid; gap: 2px; }
.hn-foot { margin-top: auto; display: grid; gap: 0; border-top: 1px solid #c9a24a44; padding-top: 8px; }
.hn-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 18px; background: none; border: 0; border-left: 3px solid transparent; color: #d9cfe6; font: 700 15px/1 "Rubik", "Alegreya Sans", system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; text-align: left; transition: background .15s, color .15s; }
.hn-item:hover { background: #c9a24a1f; color: #fff; }
.hn-item.on { color: var(--gold-bright); border-left-color: var(--gold-bright); background: linear-gradient(90deg, #c9a24a55, #c9a24a0d); box-shadow: inset 0 0 0 1px #c9a24a66; }
.hn-foot .hn-item { padding: 9px 18px; font-size: 12px; color: #a99fbb; }
.hn-ico { width: 30px; height: 30px; flex: none; fill: none; stroke: var(--gold-bright); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 2px 3px #000a); }
.hn-foot .hn-ico { width: 20px; height: 20px; stroke: currentColor; }
.hub-main { display: flex; flex-direction: column; min-width: 0; min-height: 100dvh; padding: 12px 18px 18px; gap: 14px; }
.hub-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ht-who { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 4px 18px 4px 4px; border-radius: 999px 12px 12px 999px; background: linear-gradient(90deg, #0c0814e6, #0c081499); border: 1px solid #c9a24a88; }
.ht-who .avatar { width: 58px; height: 58px; }
.ht-who .who b { font-size: 19px; }
.ht-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-inline: auto; }
.pill { display: inline-flex; align-items: center; gap: 8px; min-width: 104px; padding: 5px 6px 5px 8px; border-radius: 999px; background: #0c0814e6; border: 1px solid #c9a24a88; color: #fff; font: 700 16px/1 "Rubik", "Alegreya Sans", sans-serif; }
.pill:hover { border-color: var(--gold-bright); }
.pill .coin-ico, .pill .hn-ico, .pill .shard-ico { width: 26px; height: 26px; flex: none; }
.pill b { flex: 1; text-align: left; font-size: 16px; }
.pill i { font-style: normal; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--gold-bright); color: var(--gold-bright); font-weight: 800; }
.shard-ico { display: inline-block; background: linear-gradient(135deg, #d9b8ff, #7a3fe0 60%, #3d1a8a); clip-path: polygon(50% 0, 88% 35%, 50% 100%, 12% 35%); }
.ht-icons { display: flex; gap: 8px; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; background: #0c0814e6; border: 1px solid #c9a24a88; padding: 0; }
.icon-btn:hover { border-color: var(--gold-bright); background: #c9a24a26; }
.icon-btn .hn-ico { width: 24px; height: 24px; }
.hub-body { flex: 1; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.hub.tab-play .hub-body, .hub.tab-decks .hub-body { max-width: 860px; width: 100%; margin-inline: auto; }
.hub-body > .panel { background: #0c0814d9; border-color: #c9a24a66; }
.hub-hero { flex: 1; min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.hub-set { width: min(360px, 60vw); height: auto; filter: drop-shadow(0 8px 18px #000d); }
.hub-cta { font: 800 22px/1 "Rubik", "Alegreya Sans", sans-serif; letter-spacing: .16em; text-transform: uppercase; padding: 16px 64px; border-radius: 12px; box-shadow: 0 0 0 2px #0008, 0 8px 26px #000c, 0 0 26px #c9a24a66; }
.hub-panels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.hpanel { position: relative; padding: 14px 16px; border-radius: 6px; background: linear-gradient(180deg, #120b1ef0, #0a0712f5); border: 1px solid var(--gold); box-shadow: inset 0 0 0 3px #0a0712, inset 0 0 0 4px #c9a24a55, 0 8px 22px #000b; display: grid; gap: 8px; align-content: start; }
.hpanel h2 { margin: 0; font: 800 17px/1.1 "Rubik", "Alegreya Sans", sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #fff; }
.hpanel p { margin: 0; }
.hp-big .big { font-size: 30px; color: var(--gold-bright); margin-right: 6px; }
.hp-alert { position: absolute; top: -12px; right: -10px; min-width: 30px; height: 30px; padding: 0 6px; display: grid; place-items: center; border-radius: 999px; background: #27c4e8; color: #04222b; font: 900 15px "Rubik", sans-serif; border: 2px solid #0a0712; box-shadow: 0 0 12px #27c4e8aa; }
.hp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hp-list li { display: flex; align-items: center; gap: 10px; }
.hp-list i { flex: none; width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--gold); display: grid; place-items: center; }
.hp-list li.done i { background: var(--gold); } .hp-list li.done i::after { content: "✓"; color: #1e160c; font: 900 14px/1 sans-serif; font-style: normal; }
.hp-list li.done span { color: var(--muted); }
.hp-list small { display: block; color: var(--gold-bright); font-size: 13px; }
.hp-bar { position: relative; height: 22px; border-radius: 6px; background: #000a; border: 1px solid #c9a24a88; overflow: hidden; }
.hp-bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(#f2d27a, #c9982e); }
.hp-bar b { position: relative; display: block; text-align: center; font: 800 13px/20px "Rubik", sans-serif; color: #fff; text-shadow: 0 1px 2px #000; }
@media (max-width: 899px) {
  .hub { grid-template-columns: minmax(0, 1fr); padding-bottom: 74px; }
  .hub-nav { position: fixed; inset: auto 0 0 0; top: auto; height: auto; flex-direction: row; padding: 0 0 env(safe-area-inset-bottom); border-right: 0; border-top: 1px solid var(--gold); box-shadow: 0 -4px 18px #000a; z-index: 40; }
  .hn-logo, .hn-foot { display: none; }
  .hn-main { display: flex; width: 100%; }
  .hn-item { flex: 1; flex-direction: column; gap: 4px; padding: 8px 2px 7px; border-left: 0; border-top: 3px solid transparent; font-size: 9.5px; letter-spacing: .03em; text-align: center; min-width: 0; }
  .hn-item.on { border-top-color: var(--gold-bright); background: linear-gradient(180deg, #c9a24a55, #c9a24a0d); }
  .hn-ico { width: 26px; height: 26px; }
  .hub-main { padding: 10px 12px 14px; min-height: calc(100dvh - 74px); }
  .ht-who .avatar { width: 46px; height: 46px; }
  .ht-pills { order: 3; width: 100%; margin: 0; } .pill { flex: 1; min-width: 0; }
  .ht-icons { margin-left: auto; } .icon-btn { width: 40px; height: 40px; }
  .hub-panels { grid-template-columns: minmax(0, 1fr); }
  .hub-cta { padding: 14px 48px; font-size: 19px; }
}
@media (min-width: 900px) { .ht-icons { display: none; } }

/* ---------- Pioche animée ---------- */
.draw-fly { position: absolute; transform-style: preserve-3d; z-index: 2; filter: drop-shadow(0 10px 18px #000c) drop-shadow(0 0 14px #f2d27a88); }
.fx-layer { perspective: 1200px; }
.draw-fly .df-face { position: absolute; inset: 0; width: 100% !important; height: 100%; margin: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 8px; }
.draw-fly .df-back { transform: rotateY(180deg); background-size: cover; background-position: center; aspect-ratio: auto; }
.draw-fly .df-back b, .draw-fly .df-back em { display: none; }
.draw-fly .df-front .card { pointer-events: none; }

/* Conseil plein écran (ordinateur uniquement, masqué une fois en plein écran) */
.hub-tip { display: none; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 4px 0 0; padding: 7px 14px; border-radius: 999px; background: #0c0814d9; border: 1px solid #c9a24a66; font-size: 14px; color: #e6dcf2; }
.hub-tip b { color: var(--gold-bright); text-transform: uppercase; letter-spacing: .1em; font-size: 12px; }
.hub-tip kbd { font: 800 12px "Rubik", sans-serif; padding: 2px 7px; border-radius: 5px; background: #2a1f3d; border: 1px solid #c9a24a88; border-bottom-width: 3px; color: #fff; }
@media (hover: hover) and (min-width: 900px) { .hub-tip { display: flex; } }
@media (display-mode: fullscreen) { .hub-tip { display: none !important; } }
:fullscreen .hub-tip { display: none !important; }

/* ---------- Ciblage : visée, cibles mises en avant, projectile ---------- */
.aim-layer { position: fixed; inset: 0; z-index: 165; pointer-events: none; }
.aim-layer[hidden] { display: none; }
.aim-layer svg { position: absolute; inset: 0; overflow: visible; }
.aim-layer path { fill: none; stroke-linecap: round; }
.aim-glow { stroke: #ffd27a55; stroke-width: 14; filter: blur(4px); }
.aim-line { stroke: #ffd27a; stroke-width: 5; stroke-dasharray: 12 8; animation: cb-dash .5s linear infinite; filter: drop-shadow(0 2px 3px #000c); }
.aim-layer marker path { fill: #ffd27a; stroke: none; }
.aim-layer svg.lock .aim-line { stroke: #ff5a4a; stroke-dasharray: none; stroke-width: 6; }
.aim-layer svg.lock .aim-glow { stroke: #ff5a4a66; }
.aim-layer svg.lock marker path { fill: #ff5a4a; }
.aim-ring { fill: none; stroke: #ff5a4a; stroke-width: 3; stroke-dasharray: 14 8; transform-box: fill-box; transform-origin: center; animation: aim-spin 2.4s linear infinite; }
@keyframes aim-spin { to { transform: rotate(360deg); } }
body.aiming .board .unit:not(.targetable) { filter: brightness(.4) saturate(.5); transition: filter .2s; }
body.aiming .unit.targetable { z-index: 3; }
body.aiming .unit.targetable::before { content: ""; position: absolute; left: 50%; top: 42%; width: 46%; aspect-ratio: 1; transform: translate(-50%, -50%); z-index: 6; pointer-events: none; border-radius: 50%; border: 3px solid #ffd27a; box-shadow: 0 0 12px #ffd27a, inset 0 0 10px #ffd27a88;
  background: linear-gradient(#ffd27a, #ffd27a) center / 3px 130% no-repeat, linear-gradient(#ffd27a, #ffd27a) center / 130% 3px no-repeat; opacity: .85; animation: aim-pulse 1s ease-in-out infinite; }
body.aiming .unit.targetable.aim-lock::before { border-color: #ff5a4a; box-shadow: 0 0 16px #ff5a4a, inset 0 0 10px #ff5a4a88; background: linear-gradient(#ff5a4a, #ff5a4a) center / 3px 130% no-repeat, linear-gradient(#ff5a4a, #ff5a4a) center / 130% 3px no-repeat; opacity: 1; }
@keyframes aim-pulse { 50% { transform: translate(-50%, -50%) scale(1.14); opacity: 1; } }
.fx-orb { position: absolute; width: 70px; height: 16px; border-radius: 50%; background: radial-gradient(ellipse at 80% 50%, #fff 0 14%, #ffd27a 30%, #ff5a4a99 60%, transparent 75%); filter: drop-shadow(0 0 10px #ffd27a) drop-shadow(0 0 18px #ff5a4a); }
.fx-burst.spell { background: radial-gradient(circle, #fff 0 16%, #ffd27a 30%, #b56bff88 55%, transparent 70%); width: 120px; height: 120px; margin: -60px 0 0 -60px; }
.fx-num.heal { color: #5fe08a; -webkit-text-stroke: 2px #06240f; font-size: 30px; }
@media (prefers-reduced-motion: reduce) { .aim-line, .aim-ring, body.aiming .unit.targetable::before { animation: none; } }

/* ---------- Tutoriel ---------- */
.tuto-bubble { position: fixed; z-index: 185; left: 50%; top: 10px; transform: translateX(-50%); width: min(560px, calc(100vw - 20px)); pointer-events: none; }
.tuto-box { pointer-events: auto; background: linear-gradient(180deg, #1a1030f7, #0c0814f7); border: 2px solid var(--gold-bright); border-radius: 12px; padding: 12px 16px; box-shadow: 0 10px 30px #000d, 0 0 22px #c9a24a55; display: grid; gap: 8px; }
.tuto-box p { margin: 0; font-size: 16px; line-height: 1.4; color: #fff; }
.tuto-box b { color: var(--gold-bright); }
.tuto-kicker { font: 800 11px "Rubik", sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-bright); }
.tuto-todo { font: 800 12px "Rubik", sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #0b1f12; background: #7be39a; border-radius: 999px; padding: 4px 12px; }
.tuto-bubble.wait .tuto-box { border-color: #7d8aa8; box-shadow: 0 10px 30px #000d; }
.tuto-hi { outline: 3px solid #7be39a !important; outline-offset: 3px; box-shadow: 0 0 0 6px #7be39a44, 0 0 24px #7be39a !important; animation: tuto-hi 1s ease-in-out infinite; z-index: 70; }
@keyframes tuto-hi { 50% { outline-offset: 7px; } }
.tuto-end { position: fixed; inset: 0; z-index: 195; display: grid; place-items: center; padding: 16px; background: #05030acc; }
.tuto-end .tuto-box { width: min(520px, 100%); padding: 22px; text-align: center; gap: 12px; }
.tuto-end h2 { margin: 0; font: 800 26px "Alegreya SC", Georgia, serif; color: var(--gold-bright); }
.tuto-reward { font-size: 19px !important; }
@media (prefers-reduced-motion: reduce) { .tuto-hi { animation: none; } }

/* ---------- Campagne PvE ---------- */
.cp-chapter { display: grid; gap: 10px; background: #0c0814d9; border-color: #c9a24a66; }
.cp-chapter h2 { margin: 0; font: 800 24px "Alegreya SC", Georgia, serif; color: var(--gold-bright); }
.cp-intro { margin: 0; font-size: 16px; line-height: 1.45; }
.cp-fights { display: grid; gap: 10px; }
.cp-fight { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 10px; background: #120b1eeb; border: 1px solid #c9a24a66; }
.cp-fight.boss { border-color: #ff5a4a; box-shadow: inset 0 0 0 1px #ff5a4a55; }
.cp-fight.won { border-color: #58c98a88; }
.cp-fight.locked { opacity: .5; }
.cp-info { flex: 1; min-width: 0; display: grid; gap: 2px; }
.cp-info h3 { margin: 0; font: 800 18px "Alegreya Sans", system-ui, sans-serif; color: #fff; }
.cp-info p { margin: 0; }
.cp-kicker { font: 800 11px "Rubik", sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-bright); }
.cp-fight.boss .cp-kicker { color: #ff8a7a; }
.cp-reward { font-size: 14px; color: var(--gold-bright); } .cp-reward.got { color: #7be39a; }
.cp-lock { font: 800 11px "Rubik", sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.cp-portrait { flex: none; width: 68px; height: 68px; border-radius: 50%; border: 2px solid var(--gold); background: #2a1f3d center 18% / 230% no-repeat; box-shadow: 0 4px 10px #000a; display: grid; place-items: center; }
.cp-portrait.mono span { font: 800 22px "Alegreya SC", Georgia, serif; color: var(--gold-bright); }
@media (max-width: 560px) { .cp-fight { flex-wrap: wrap; } .cp-fight .btn { width: 100%; } .cp-portrait { width: 54px; height: 54px; } }
.pve-talk { position: fixed; inset: 0; z-index: 195; display: flex; align-items: flex-end; justify-content: center; padding: 16px 16px 96px; background: linear-gradient(180deg, #05030a99, #05030ae6); }
.pt-box { display: flex; gap: 16px; align-items: flex-start; width: min(720px, 100%); padding: 18px; border-radius: 14px; background: linear-gradient(180deg, #1a1030fa, #0c0814fa); border: 2px solid var(--gold-bright); box-shadow: 0 14px 40px #000d; animation: reveal-in .3s ease-out; }
.pve-talk.foe .pt-box { border-color: #ff5a4a; flex-direction: row-reverse; }
.pt-box .cp-portrait { width: 96px; height: 96px; }
.pve-talk.foe .cp-portrait { border-color: #ff5a4a; }
.pt-text { flex: 1; min-width: 0; display: grid; gap: 8px; }
.pt-who { font: 800 15px "Alegreya SC", Georgia, serif; letter-spacing: .06em; color: var(--gold-bright); }
.pve-talk.foe .pt-who { color: #ff8a7a; }
.pt-text p { margin: 0; font-size: 18px; line-height: 1.45; color: #fff; min-height: 3.2em; }
@media (max-width: 560px) { .pt-box .cp-portrait { width: 64px; height: 64px; } .pt-text p { font-size: 16px; } }
.pve-bark { position: fixed; z-index: 172; top: 12px; left: 50%; transform: translateX(-50%); width: min(460px, calc(100vw - 24px)); display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 999px 14px 14px 999px; background: #1a0b10f5; border: 2px solid #ff5a4a; box-shadow: 0 8px 22px #000c; pointer-events: none; }
.pve-bark[hidden] { display: none; }
.pve-bark .cp-portrait { width: 46px; height: 46px; border-color: #ff5a4a; }
.pve-bark span { font-size: 15px; line-height: 1.3; color: #fff; }
.pve-bark b { display: block; font: 800 11px "Rubik", sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #ff8a7a; }
.pve-bark.in { animation: bark-in .35s cubic-bezier(.2,1.3,.4,1); }
@keyframes bark-in { from { opacity: 0; transform: translate(-50%, -14px); } }
@media (max-width: 899px) { .hn-item { font-size: 8.500px; } }

/* ---------- Guildes ---------- */
.guild .panel { background: #0c0814d9; border-color: #c9a24a66; display: grid; gap: 10px; }
.g-head { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; display: grid !important; }
.g-head h2 { margin: 0; font: 800 24px "Alegreya SC", Georgia, serif; color: var(--gold-bright); }
.g-head p { margin: 2px 0 0; }
.g-tag { display: inline-grid; place-items: center; min-width: 74px; padding: 14px 10px; border-radius: 10px; background: linear-gradient(#2a1f3d, #150d24); border: 2px solid var(--gold-bright); color: var(--gold-bright); font: 900 22px "Rubik", sans-serif; letter-spacing: .08em; }
.g-tag.small { min-width: 58px; padding: 8px 6px; font-size: 15px; border-width: 1px; }
.g-tag.inline { min-width: 0; padding: 1px 6px; font-size: 12px; border-width: 1px; border-radius: 5px; vertical-align: 2px; }
.g-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 8px; background: #120b1eeb; flex-wrap: wrap; }
.g-who { flex: 1; min-width: 140px; display: grid; }
.g-who b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; }
.g-role { font: 800 11px "Rubik", sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 3px 9px; border-radius: 999px; border: 1px solid #7d8aa866; }
.g-role.r-chef { color: #1e160c; background: var(--gold-bright); border-color: var(--gold-bright); }
.g-role.r-officier { color: var(--gold-bright); border-color: var(--gold); }
.g-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.g-form input, .guild input:not([type=checkbox]) { width: 100%; }
@media (max-width: 560px) { .g-head { grid-template-columns: auto minmax(0, 1fr); } .g-head > .btn { grid-column: 1 / -1; } }
@media (max-width: 899px) { .hn-item { font-size: 7.500px; letter-spacing: 0; } .hn-ico { width: 23px; height: 23px; } }

/* ---------- Cinématique d'introduction ---------- */
.intro { position: fixed; inset: 0; z-index: 400; background: #0b0a12; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 12px; color: #f3ecd9; font-family: "Alegreya Sans", Georgia, serif; }
.intro[hidden] { display: none; }
body.intro-open { overflow: hidden; }
.intro-stage { position: relative; width: 100%; max-width: min(1500px, calc((100dvh - 70px) * 16 / 9)); aspect-ratio: 16 / 9; overflow: hidden; border-radius: 6px; background: #000; outline: 1px solid #ffffff14; cursor: pointer; container-type: inline-size; }
.intro-layer { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; opacity: 0; will-change: transform, opacity; }
.intro-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 3; }
.intro-shade { position: absolute; inset: auto 0 0 0; height: 46%; pointer-events: none; z-index: 4; background: linear-gradient(to top, #0b0a12cc 0%, #0b0a1299 38%, transparent 100%); }
.intro-caption { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 0 7% 5.500%; text-align: center; z-index: 5; font-size: clamp(14px, 2.500cqw, 30px); line-height: 1.3; text-wrap: balance; text-shadow: 0 2px 6px #000, 0 0 2px #000; opacity: 0; transition: opacity .7s; }
.intro-caption.on { opacity: 1; }
.intro-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: #e2b04a; z-index: 5; }
.intro-pill { position: absolute; top: 3%; right: 2.500%; z-index: 6; font: 600 clamp(12px, 1.500cqw, 16px) "Alegreya Sans", sans-serif; color: #f3ecd9; background: #0b0a1299; border: 1px solid #ffffff40; border-radius: 999px; padding: .4em 1em; cursor: pointer; }
.intro-pill.left { right: auto; left: 2.500%; }
.intro-pill:hover, .intro-btn:hover { border-color: #e2b04a; color: #e2b04a; }
.intro-card { position: absolute; inset: 0; z-index: 7; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.200cqw; background: radial-gradient(ellipse at center, #0b0a12b0 0%, #0b0a12e8 75%); text-align: center; padding: 0 6%; cursor: default; }
.intro-card[hidden] { display: none; }
.intro-kicker { font: 700 clamp(11px, 1.600cqw, 18px) "Alegreya SC", Georgia, serif; letter-spacing: .42em; padding-left: .42em; color: #e2b04a; }
.intro-name { font: 900 clamp(22px, 6cqw, 72px)/1.05 "Alegreya SC", Georgia, serif; text-wrap: balance; }
.intro-name em { font-style: normal; color: #9be04a; }
.intro-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.intro-btn { font: 700 clamp(13px, 1.800cqw, 19px) "Alegreya SC", Georgia, serif; letter-spacing: .12em; color: #f3ecd9; background: #0b0a12; border: 2px solid #e2b04a; border-radius: 4px; padding: .7em 1.600em; cursor: pointer; }
.intro-btn.ghost { border-color: #ffffff40; }
.intro-credit { margin: 0; font-size: 13px; color: #a59d8c; }
@media (max-width: 700px) and (orientation: portrait) { .intro-caption { font-size: clamp(12px, 3.600cqw, 18px); padding-bottom: 4%; } }

/* ---------- Booster RNT-01 « Le Retour des Kei » ---------- */
.hp-kei { margin: 4px 0 0 !important; padding-top: 8px; border-top: 1px solid #c9a24a44; color: #ffb4a3; }
.hp-kei b { font-size: 20px; color: #ff6a55; margin-right: 4px; }

/* Objectif rempli, en attente du changement de tour */
.quest-hud.wait { border-color: #7be39a; box-shadow: 0 0 14px #7be39a66; }
.quest-hud.wait .qh-count, .quest-hud.wait small { color: #7be39a; font-weight: 800; }

/* ---------- RNT-01 : Armure, Mur, Indestructible ---------- */
.t-armor { position: absolute; z-index: 3; bottom: 27%; left: -6%; min-width: 26px; height: 29px; padding: 0 4px 3px; display: grid; place-items: center;
  font-weight: 900; font-size: 15px; color: #10202c; background: linear-gradient(160deg, #f1f6fa, #9fb4c4 60%, #6f8698);
  clip-path: polygon(50% 100%, 6% 72%, 6% 8%, 50% 0, 94% 8%, 94% 72%); filter: drop-shadow(0 1px 2px #000a); }
.unit.tok.armored .t-art { box-shadow: 0 0 0 2px #c6d6e2cc, 0 0 10px #9fb4c488; }
.unit.tok.wall .t-art { border-radius: 12% !important; box-shadow: 0 0 0 3px #8a6f4a, 0 0 0 5px #3b2c1a, 0 4px 10px #000a; }
.unit.tok.wall .t-kws .kw { background: #6b4f2c; color: #ffe9c4; }
.unit.tok.indes .t-art { box-shadow: 0 0 0 3px #ffe27a, 0 0 16px #ffd23c; animation: indes-glow 1.6s ease-in-out infinite; }
.unit.tok.blank .t-art { filter: grayscale(1) brightness(.8); }
@keyframes indes-glow { 50% { box-shadow: 0 0 0 3px #fff3bd, 0 0 26px #ffd23c; } }
body.void-flash::after { content: ""; position: fixed; inset: 0; z-index: 400; pointer-events: none; background: radial-gradient(circle, #000 0, #1a0033 60%, #000 100%); animation: void-flash 1.4s ease-out forwards; }
@keyframes void-flash { 0% { opacity: 0; } 18% { opacity: .92; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .unit.tok.indes .t-art, body.void-flash::after { animation: none; } body.void-flash::after { opacity: 0; } }

/* ---------- Visuels par type d'effet ---------- */
.fx-orb { background: radial-gradient(ellipse at 80% 50%, #fff 0 14%, var(--c, #ffd27a) 34%, color-mix(in srgb, var(--c, #ff5a4a) 55%, transparent) 62%, transparent 76%); filter: drop-shadow(0 0 10px var(--c, #ffd27a)) drop-shadow(0 0 20px var(--c, #ff5a4a)); }
.fx-orb.k-soft { width: 30px; height: 30px; background: radial-gradient(circle, #fff 0 22%, var(--c) 46%, transparent 72%); }
.fx-orb.k-skull { width: 38px; height: 38px; background: radial-gradient(circle, #1a0626 0 30%, var(--c) 52%, transparent 74%); filter: drop-shadow(0 0 14px var(--c)) drop-shadow(0 0 26px #000); }
.fx-orb.k-wind { width: 90px; height: 22px; background: repeating-linear-gradient(90deg, transparent 0 8px, var(--c) 8px 20px, transparent 20px 26px); border-radius: 12px; opacity: .85; -webkit-mask: linear-gradient(90deg, transparent, #000 60%); mask: linear-gradient(90deg, transparent, #000 60%); }
.fx-burst.tint { width: 120px; height: 120px; margin: -60px 0 0 -60px; background: radial-gradient(circle, #fff 0 15%, var(--c) 32%, color-mix(in srgb, var(--c) 45%, transparent) 55%, transparent 70%); }
.fx-burst.tint.big { width: 170px; height: 170px; margin: -85px 0 0 -85px; }
.fx-ring { position: absolute; width: 96px; height: 96px; margin: -48px 0 0 -48px; border-radius: 50%; border: 4px solid var(--c); box-shadow: 0 0 16px var(--c), inset 0 0 12px var(--c); animation: fx-ring .65s ease-out forwards; }
@keyframes fx-ring { 0% { opacity: 1; transform: scale(.35); } 100% { opacity: 0; transform: scale(1.5); } }
.fx-part { position: absolute; font-weight: 900; line-height: 1; text-shadow: 0 0 8px currentColor, 0 1px 2px #000; will-change: transform, opacity; }
.fx-wave { position: absolute; border-radius: 14px; overflow: hidden; }
.fx-wave::before { content: ""; position: absolute; top: 0; bottom: 0; left: -30%; width: 30%; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--c) 70%, transparent), #fff8, transparent); filter: blur(4px); animation: fx-wave .65s ease-in forwards; }
@keyframes fx-wave { to { left: 110%; } }
.fx-num.tag { font-size: 19px; color: #fff; -webkit-text-stroke: 1px #10131c; letter-spacing: .02em; }
.unit.fx-dozing .t-art { animation: fx-doze .5s ease-out; }
@keyframes fx-doze { 0% { filter: none; } 50% { filter: grayscale(1) brightness(.6); transform: rotate(5deg); } 100% { filter: none; } }
.unit.fx-greyed .t-art { filter: grayscale(1) brightness(.8); transition: filter .4s; }

/* ---------- Effets illustrés (images de /fx) ---------- */
.fx-orb.k-img { width: 150px; height: 150px; border-radius: 0; background: center / contain no-repeat; filter: drop-shadow(0 0 12px var(--c)); -webkit-mask: none; mask: none; opacity: 1; }
.fx-burst.img { width: 190px; height: 190px; margin: -95px 0 0 -95px; border-radius: 0; background: center / contain no-repeat; filter: drop-shadow(0 0 14px var(--c, #ffb35a)); animation: fx-burst-img .6s cubic-bezier(.2,.8,.3,1) forwards; }
.fx-burst.img.big { width: 270px; height: 270px; margin: -135px 0 0 -135px; }
@keyframes fx-burst-img { 0% { opacity: 0; transform: rotate(var(--r, 0deg)) scale(.2); } 18% { opacity: 1; transform: rotate(var(--r, 0deg)) scale(1); } 60% { opacity: 1; transform: rotate(var(--r, 0deg)) scale(1.12); } 100% { opacity: 0; transform: rotate(var(--r, 0deg)) scale(1.3); } }
.fx-icon { position: absolute; width: 92px; height: 92px; margin: -46px 0 0 -46px; background: center / contain no-repeat; filter: drop-shadow(0 4px 8px #000b); animation: fx-icon 1.1s cubic-bezier(.2,1.4,.4,1) forwards; }
@keyframes fx-icon { 0% { opacity: 0; transform: scale(.2) rotate(-14deg); } 22% { opacity: 1; transform: scale(1.15) rotate(4deg); } 36% { transform: scale(1) rotate(0); } 72% { opacity: 1; transform: translateY(-6px) scale(1); } 100% { opacity: 0; transform: translateY(-46px) scale(.9); } }
.t-armor { background: url(/fx/ic-bouclier.webp) center / contain no-repeat; clip-path: none; min-width: 34px; height: 39px; padding: 0 0 5px; color: #0c1823; font-size: 16px; text-shadow: 0 0 3px #fff; filter: drop-shadow(0 2px 3px #000c); left: -9%; bottom: 25%; }
.unit.tok.indes::before { content: ""; position: absolute; z-index: 4; top: -19px; left: 50%; width: 46px; height: 38px; margin-left: -23px; background: url(/fx/ic-couronne.webp) center / contain no-repeat; filter: drop-shadow(0 2px 3px #000c); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .fx-burst.img, .fx-icon { animation-duration: .01s; } }

/* ---------- Attaque libre : glisser une unité vers l'adversaire ---------- */
.atk-hint { align-self: center; font-size: 13px; font-weight: 700; color: #ffd9a8; background: #2a1a10cc; border: 1px solid #c9772a88; border-radius: 999px; padding: 6px 12px; }
.unit.tok.can-act { cursor: grab; touch-action: none; }
.unit.tok.atk-drag { cursor: grabbing; filter: drop-shadow(0 10px 14px #000a); }
.unit.tok.atk-drag.atk-go .t-art { box-shadow: 0 0 0 3px #ff5a4a, 0 0 22px #ff5a4a; }
.unit.tok.atk-drag.atk-go::after { content: "⚔ Lâchez pour attaquer"; position: absolute; left: 50%; top: -26px; transform: translateX(-50%); white-space: nowrap; font-size: 12px; font-weight: 800; color: #fff; background: #c0281c; border-radius: 999px; padding: 2px 9px; z-index: 6; }
body.atk-dragging .sidepanel:not(.active) .portrait { box-shadow: 0 0 0 3px #ff5a4a88, 0 0 18px #ff5a4a66; }
@media (max-width: 700px) { .atk-hint { font-size: 11px; padding: 4px 9px; } }

/* Rappel discret pour les blocages suivants du même tour */
.phase-ann.mini .pa-inner { transform: scale(.55); transform-origin: 50% 20%; opacity: .92; }
.phase-ann.mini { top: 14%; }

/* ---------- Mode Roguelike ---------- */
.rogue .panel { margin-bottom: 14px; }
.rg-rules { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.rg-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.rg-picks.small { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.rg-pick { display: grid; gap: 3px; justify-items: center; text-align: center; padding: 12px 10px; border-radius: 12px; border: 2px solid #c9a24a44; background: #1a1026cc; color: inherit; cursor: pointer; font: inherit; }
.rg-pick .cp-portrait { width: 64px; height: 64px; }
.rg-pick span { font-size: 12px; opacity: .8; } .rg-pick small { font-size: 11px; opacity: .7; }
.rg-pick.on { border-color: #ffd24a; box-shadow: 0 0 0 2px #ffd24a55, 0 0 18px #ffd24a44; }
.rg-go { margin: 6px 0 16px; align-items: center; gap: 12px; flex-wrap: wrap; }
.rg-head { display: grid; gap: 10px; }
.rg-steps { display: flex; gap: 6px; flex-wrap: wrap; }
.rg-step { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; border: 2px solid #c9a24a55; font-weight: 800; opacity: .6; }
.rg-step.boss { border-radius: 8px; border-color: #ff6a55aa; }
.rg-step.done { background: #2f7d4a; border-color: #5fe08a; opacity: 1; }
.rg-step.cur { background: #c9a24a; color: #1a1026; opacity: 1; box-shadow: 0 0 12px #ffd24a88; }
.rg-stats { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.rg-lives { color: #ff5a6a; font-size: 20px; letter-spacing: 2px; }
.rg-cred b { color: #6fe6ff; font-size: 18px; }
.rg-owned { display: flex; gap: 6px; flex-wrap: wrap; } .rg-owned span { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: #2a1a40; border: 1px solid #b56bff66; }
.rg-bonus { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.rg-card { text-align: left; padding: 16px; border-radius: 14px; border: 2px solid #c9a24a66; background: linear-gradient(160deg, #2a1a40, #150d22); color: inherit; font: inherit; cursor: pointer; min-height: 120px; }
.rg-card:hover, .rg-card:focus-visible { border-color: #ffd24a; box-shadow: 0 0 18px #ffd24a44; transform: translateY(-2px); }
.rg-card b { font-size: 17px; color: #ffd98a; } .rg-card p { margin: 8px 0 0; } .rg-card small { opacity: .7; }
.rg-fight { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; } .rg-fight .cp-portrait { width: 84px; height: 84px; } .rg-fight .cp-info { flex: 1; min-width: 180px; }
.rg-fight.boss { border-color: #ff6a55aa; box-shadow: 0 0 20px #ff6a5533; }
.rg-shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 10px 0 14px; }
.rg-item { display: grid; gap: 6px; justify-items: center; } .rg-item.sold { opacity: .45; }
.rg-deck { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 10px; }
.rg-line { display: flex; gap: 8px; align-items: center; padding: 4px 8px; border-radius: 8px; border: 1px solid #ffffff14; background: #ffffff08; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.rg-line b { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #1f4f9c; font-size: 12px; flex: none; }
.rg-line span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .rg-line i { font-style: normal; opacity: .7; }
.rg-line.rm { border-color: #ff6a5588; } .rg-line.rm:hover { background: #ff6a5522; }
.rg-board { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.rg-board li { display: flex; gap: 10px; align-items: center; padding: 6px 10px; border-radius: 8px; background: #ffffff08; }
.rg-rank { width: 26px; font-weight: 800; color: #ffd98a; } .rg-who { flex: 1; } .rg-score { opacity: .85; font-size: 13px; }
.btn.danger { color: #ff8a7a; border-color: #ff6a5566; }
.rg-item .card.tcg, .rg-item .card { width: 150px; max-width: 100%; }
.rg-shop { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

/* ---------- Menu Jouer (nouvelle présentation) et classement ---------- */
.hub.tab-play .hub-body { max-width: 1120px; }
.pl-title { text-align: left; padding: 6px 4px 0; margin-bottom: -4px; }
.pl-title h1 { margin: 0; font-family: "Rubik", "Alegreya Sans", system-ui, sans-serif; font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: .02em; line-height: .9;
  font-size: clamp(54px, 9vw, 118px); transform: rotate(-4deg) skewX(-8deg); transform-origin: 0 100%; display: inline-block;
  background: linear-gradient(180deg, #fff6c9 0%, #ffd35a 38%, #ff9a1e 72%, #c2540a 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 #3a1404) drop-shadow(0 0 18px #ff9a1e88) drop-shadow(0 0 40px #b56bff66); }
.pl-title p { margin: 2px 0 0 8px; text-transform: uppercase; letter-spacing: .28em; font-size: 13px; color: #e8dcc0cc; }
.hub-body > .panel.pl-panel { position: relative; background: linear-gradient(160deg, #150b22ee, #0a0612f2); border: 2px solid #f0b93a; border-radius: 16px; padding: 20px 22px;
  box-shadow: 0 0 0 1px #3a1f06, 0 0 22px #f0b93a44, 0 0 46px #8a3cff33, inset 0 0 40px #8a3cff14; }
.pl-with { display: inline-flex; align-items: center; gap: 10px; text-transform: uppercase; letter-spacing: .12em; font-size: 14px; color: #d9cfb8; }
.pl-with b { color: #ffcf4a; font-size: 17px; letter-spacing: .08em; }
.pl-ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.pl-with .pl-ico { width: 30px; height: 30px; color: #ffcf4a; }
.btn.pl-btn, .btn.pl-create, .btn.pl-join { display: inline-flex; align-items: center; gap: 10px; }
.btn.pl-btn { padding: 12px 20px; border: 2px solid #f0b93a; border-radius: 12px; background: #0d0816; font-size: 16px; }
.btn.pl-create { padding: 16px 28px; font-size: 20px; border-radius: 12px; box-shadow: 0 0 18px #ffcf4a66, inset 0 1px 0 #fff8; }
.btn.pl-create .pl-ico { width: 28px; height: 28px; }
.btn.pl-join { padding: 13px 22px; font-size: 17px; border-radius: 12px; border: 2px solid #b56bff; background: linear-gradient(160deg, #3a1f66, #20103c); color: #e9d6ff; box-shadow: 0 0 14px #8a3cff55; }
.pl-main #joincode { padding: 13px 14px; font-size: 18px; border-radius: 12px; letter-spacing: .2em; }
.pl-main #timer { padding: 11px 12px; font-size: 16px; border-radius: 10px; }
.pl-timer { font-size: 16px; color: #e8dcc0; }
.pl-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 28px; align-items: center; margin-top: 16px; }
.pl-actions { display: grid; gap: 14px; }
.pl-extra { margin-top: 6px; gap: 12px; }
.pl-deck { display: flex; gap: 16px; align-items: flex-end; padding: 12px 16px; border-radius: 12px; background: #ffffff08; border: 1px solid #f0b93a33; }
.pl-curve { display: flex; gap: 5px; align-items: flex-end; height: 74px; }
.pl-curve span { width: 20px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; }
.pl-curve i { display: block; width: 100%; min-height: 2px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, #ffd35a, #c2540a); }
.pl-curve b { font-size: 11px; color: #d9cfb8; font-weight: 700; }
.pl-deckinfo { display: grid; gap: 2px; font-size: 13px; color: #d9cfb8; } .pl-deckinfo b { font-size: 17px; color: #ffcf4a; }
.pl-h { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; text-transform: uppercase; letter-spacing: .1em; font-size: 18px; color: #c79bff; }
.pl-h .pl-ico { width: 28px; height: 28px; color: #f0b93a; }
.pl-rank { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 26px; align-items: center; }
.pl-rankmain { display: flex; gap: 18px; align-items: center; min-width: 0; }
.pl-rankinfo { flex: 1; min-width: 0; display: grid; gap: 6px; } .pl-rankinfo h3 { margin: 0; font-size: 26px; color: #ffe9a8; }
.pl-kicker { text-transform: uppercase; letter-spacing: .14em; font-size: 12px; color: #c79bff; }
.pl-bar { height: 12px; border-radius: 999px; background: #ffffff14; overflow: hidden; border: 1px solid #f0b93a55; }
.pl-bar i { display: block; height: 100%; background: linear-gradient(90deg, #c2540a, #ffd35a); box-shadow: 0 0 10px #ffd35a; }
.pl-rankside { display: grid; gap: 8px; justify-items: end; }
.pl-rewards { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pl-rewards span { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 3px 8px 3px 4px; border-radius: 999px; background: #ffffff0a; border: 1px solid #ffffff1a; opacity: .75; }
.pl-rewards span.on { opacity: 1; border-color: #f0b93a; box-shadow: 0 0 10px #f0b93a55; }
.rk { --rc: #b07a4a; position: relative; display: inline-grid; place-items: center; width: 34px; height: 38px; flex: none; color: #140a04; font-style: normal;
  background: linear-gradient(160deg, color-mix(in srgb, var(--rc) 55%, #fff), var(--rc) 55%, color-mix(in srgb, var(--rc) 60%, #000)); clip-path: polygon(50% 100%, 6% 74%, 6% 10%, 50% 0, 94% 10%, 94% 74%); }
.rk b { font: 900 19px/1 "Rubik", system-ui, sans-serif; margin-top: -6px; } .rk i { position: absolute; bottom: 7px; font: 800 8px/1 system-ui, sans-serif; letter-spacing: .08em; font-style: normal; }
.rk.mini { width: 24px; height: 27px; } .rk.mini b { font-size: 13px; margin-top: -4px; } .rk.mini i { bottom: 4px; font-size: 6px; }
.rk.big { width: 86px; height: 96px; filter: drop-shadow(0 0 14px var(--rc)); } .rk.big b { font-size: 48px; margin-top: -14px; } .rk.big i { bottom: 17px; font-size: 14px; }
.rk-D { --rc: #b07a4a; } .rk-C { --rc: #b9c6d2; } .rk-B { --rc: #4f9dff; } .rk-A { --rc: #b56bff; } .rk-S { --rc: #ffcf3a; }
.sp-name .rk.mini { align-self: center; }
.rk-board { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.rk-board li { display: flex; gap: 10px; align-items: center; padding: 6px 10px; border-radius: 8px; background: #ffffff08; } .rk-board li.me { background: #f0b93a22; border: 1px solid #f0b93a88; }
.game-row.gm { flex-wrap: wrap; padding: 10px 12px; background: #ffffff0a; border: 1px solid #ffffff14; border-radius: 12px; }
.gm-vs { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.gm-p { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.gm-av { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; border: 2px solid #f0b93a; display: grid; place-items: center; background: #1a1026; font-weight: 800; color: #ffcf4a; flex: none; }
.gm-av img { width: 100%; height: 100%; object-fit: cover; }
.gm-n { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 16ch; }
.gm-x { font: 900 14px/1 "Rubik", system-ui, sans-serif; color: #ff6a55; letter-spacing: .08em; } .gm-x.wait { font: inherit; font-size: 12px; color: var(--muted); }
@media (max-width: 760px) {
  .pl-grid, .pl-rank { grid-template-columns: minmax(0, 1fr); } .pl-rankside { justify-items: start; } .pl-rewards { justify-content: flex-start; }
  .hub-body > .panel.pl-panel { padding: 14px; } .btn.pl-create { padding: 13px 18px; font-size: 17px; flex: 1; justify-content: center; }
  .pl-title p { letter-spacing: .16em; font-size: 11px; } .pl-extra .spacer { display: none; } .pl-extra .btn { flex: 1; justify-content: center; }
  .rk.big { width: 64px; height: 72px; } .rk.big b { font-size: 36px; margin-top: -10px; } .rk.big i { bottom: 12px; font-size: 11px; }
  /* Barre du bas : neuf boutons, on la laisse défiler au lieu de chevaucher les libellés. */
  .hub-nav .hn-main { overflow-x: auto; scrollbar-width: none; justify-content: flex-start; } .hub-nav .hn-main::-webkit-scrollbar { display: none; } .hub-nav .hn-main .hn-item { flex: 0 0 74px; }
}
.btn.pl-create, .btn.pl-join, .btn.pl-btn { white-space: nowrap; }
@media (max-width: 760px) { .pl-actions .row { flex-wrap: wrap; } .btn.pl-create { flex: 1 1 100%; } }

/* Titre « JOUER » illustré */
.pl-title h1 { transform: none; background: none; -webkit-background-clip: border-box; background-clip: border-box; filter: none; font-size: 0; line-height: 0; display: block; }
.pl-title h1 img { display: block; width: min(520px, 78vw); height: auto; margin: -6px 0 -14px -18px; filter: drop-shadow(0 6px 18px #000a); }
.pl-title p { margin: 0 0 4px 24px; }
@media (max-width: 760px) { .pl-title h1 img { width: min(300px, 74vw); margin: -4px 0 -8px -10px; } .pl-title p { margin-left: 12px; } }
.pl-title h1 img { margin-bottom: 2px; } .pl-title p { position: relative; }
@media (max-width: 760px) { .pl-title h1 img { margin-bottom: 2px; } }

/* ---------- Accueil (nouvelle présentation) ---------- */
.hub-hero.hh { gap: 14px; padding: 6px 0 4px; }
.hub-hero.hh .hub-set { width: min(560px, 74vw); filter: drop-shadow(0 0 26px #54ff4a55) drop-shadow(0 10px 22px #000d); }
.hh-event { margin: -6px 0 0; display: inline-flex; align-items: center; gap: 14px; padding: 7px 18px; border-radius: 10px; background: #12060ae6; border: 2px solid #e23a2e; box-shadow: 0 0 14px #e23a2e66; font-size: 15px; }
.hh-event b { color: #ff5a4a; text-transform: uppercase; letter-spacing: .08em; font: 800 14px "Rubik", sans-serif; }
.hh-event span { display: inline-flex; align-items: center; gap: 6px; color: #fff; } .hh-event .pl-ico { width: 18px; height: 18px; }
.hh-play { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 22px; min-width: min(380px, 80vw); padding: 14px 44px; border: 0; cursor: pointer; color: #1a0d02;
  background: linear-gradient(180deg, #fff3a8 0%, #ffd23a 35%, #f5a312 78%, #c9740a 100%); clip-path: polygon(7% 0, 100% 0, 93% 100%, 0 100%);
  filter: drop-shadow(0 0 4px #fff7) drop-shadow(0 0 22px #ffb62a) drop-shadow(0 8px 14px #000c); transition: transform .12s, filter .12s; }
.hh-play span { font: italic 900 44px/1 "Rubik", "Alegreya Sans", sans-serif; text-transform: uppercase; letter-spacing: .04em; transform: skewX(-6deg); }
.hh-shur { width: 46px; height: 46px; fill: #1a0d02; animation: hh-spin 9s linear infinite; } .hh-shur .hole { fill: #ffd23a; }
@keyframes hh-spin { to { transform: rotate(360deg); } }
.hh-play:hover, .hh-play:focus-visible { transform: scale(1.04); filter: drop-shadow(0 0 6px #fff) drop-shadow(0 0 32px #ffd23a) drop-shadow(0 8px 14px #000c); outline: none; }
.hh-duo { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.hh-side { --c: #8a3cff; position: relative; display: inline-flex; align-items: center; gap: 14px; min-width: 300px; padding: 14px 26px; border: 0; cursor: pointer; color: #fff; text-align: left;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 55%, #0a0612), #0d0718 70%); clip-path: polygon(5% 0, 100% 0, 95% 100%, 0 100%);
  box-shadow: inset 0 0 0 2px var(--c); filter: drop-shadow(0 0 12px color-mix(in srgb, var(--c) 70%, transparent)) drop-shadow(0 6px 10px #000b); transition: transform .12s; }
.hh-side.coll { --c: #2f8cff; } .hh-side.boost { padding-left: 110px; } .hh-side.coll { padding-right: 110px; }
.hh-side span { display: grid; flex: 1; } .hh-side small { font: 800 15px "Rubik", sans-serif; text-transform: uppercase; letter-spacing: .06em; color: color-mix(in srgb, var(--c) 45%, #fff); }
.hh-side b { font: 900 24px/1.05 "Rubik", sans-serif; text-transform: uppercase; letter-spacing: .04em; } .hh-side i { font: 400 34px/1 sans-serif; font-style: normal; opacity: .9; }
.hh-art { position: absolute; top: 50%; height: 118%; width: auto; border-radius: 6px; filter: drop-shadow(0 3px 6px #000c); pointer-events: none; }
.hh-side.boost .hh-art.a1 { left: 14px; transform: translateY(-50%) rotate(-12deg); } .hh-side.boost .hh-art.a2 { left: 52px; transform: translateY(-50%) rotate(8deg); }
.hh-side.coll .hh-art.a1 { right: 52px; transform: translateY(-50%) rotate(-8deg); } .hh-side.coll .hh-art.a2 { right: 14px; transform: translateY(-50%) rotate(12deg); }
.hh-side:hover, .hh-side:focus-visible { transform: translateY(-3px); outline: none; }
.hh-panels .hpanel.hx { overflow: hidden; border: 2px solid #f0b93a; border-radius: 14px; padding: 16px 18px; background: linear-gradient(160deg, #150b22f2, #0a0612f7);
  box-shadow: 0 0 0 1px #3a1f06, 0 0 20px #f0b93a44, inset 0 0 36px #8a3cff14; min-height: 168px; }
.hpanel.hx > *:not(.hx-art):not(.hp-alert) { position: relative; z-index: 1; max-width: 68%; }
.hpanel.hx h2 { display: flex; align-items: center; gap: 10px; max-width: none !important; } .hpanel.hx h2 .pl-ico, .hpanel.hx h2 .hn-ico { width: 26px; height: 26px; color: #ffcf4a; flex: none; }
.hpanel.hx .hp-list li { padding: 6px 8px; border-radius: 8px; border: 1px solid #ffffff14; background: #ffffff08; } .hpanel.hx .hp-list li span { flex: 1; } .hpanel.hx .hp-list .coin-ico { width: 20px; height: 20px; }
.hpanel.hx .hp-list li.done i { background: #2fa84f; border-color: #5fe08a; } .hpanel.hx .hp-list li.done i::after { color: #fff; }
.hx-art { position: absolute; z-index: 0; pointer-events: none; filter: drop-shadow(0 4px 10px #000c); }
.hx-art.coins { right: 8px; bottom: 6px; width: 96px; height: auto; opacity: .95; filter: drop-shadow(0 0 16px #ffcf4a88); } .hx-art.coins.c2 { width: 70px; right: 6px; bottom: 4px; }
.hx-art.pack { height: 92%; width: auto; top: 6%; } .hx-art.pack.p1 { right: 62px; transform: rotate(-10deg); } .hx-art.pack.p2 { right: 6px; transform: rotate(9deg); filter: drop-shadow(0 0 14px #54ff4a66); }
.hx-art.pack.small { height: 70%; top: 8%; right: 58px; }
.hpanel.hx.hp-loot { overflow: visible; } .hpanel.hx.hp-loot .hx-art { clip-path: inset(-20% -20% 0 -20%); }
.ht-rank { display: inline-flex; align-items: center; gap: 6px; color: #ffe9a8; } .ht-bar { width: 70px; height: 7px; border-radius: 999px; background: #ffffff1c; overflow: hidden; } .ht-bar i { display: block; height: 100%; background: linear-gradient(90deg, #c2540a, #ffd35a); }
@media (max-width: 760px) {
  .hh-play span { font-size: 32px; } .hh-shur { width: 34px; height: 34px; } .hh-play { padding: 12px 30px; }
  .hh-side { min-width: 0; flex: 1 1 100%; padding-top: 12px; padding-bottom: 12px; } .hh-side b { font-size: 20px; } .hh-event { flex-direction: column; gap: 2px; font-size: 13px; }
  .hx-art.pack { height: 70%; top: 15%; } .hpanel.hx > *:not(.hx-art):not(.hp-alert) { max-width: 72%; }
}
@media (prefers-reduced-motion: reduce) { .hh-shur { animation: none; } }
.hx-art.pack { height: 76%; top: auto; bottom: -5%; } .hx-art.pack.p1 { right: 58px; } .hx-art.pack.p2 { right: 4px; }
.hx-art.pack.small { height: 56%; top: auto; bottom: 6%; right: 62px; }
.hpanel.hx.hp-loot > *:not(.hx-art):not(.hp-alert):not(h2) { max-width: 60%; } .hpanel.hx.hp-loot .row { flex-wrap: wrap; }
.hpanel.hx.hp-loot { overflow: hidden; } .hpanel.hx.hp-loot .hp-alert { top: 8px; right: 8px; }

/* ---------- Campagne (nouvelle présentation) ---------- */
.campaign.cq { max-width: 1180px; }
.cq-top { align-items: flex-end; margin-bottom: 10px; }
.cq-title h1 { margin: 0; display: inline-block; font: italic 900 clamp(40px, 6vw, 72px)/.95 "Rubik", "Alegreya Sans", sans-serif; text-transform: uppercase; letter-spacing: .02em; transform: rotate(-3deg) skewX(-8deg); transform-origin: 0 100%;
  background: linear-gradient(180deg, #fff6c9, #ffd35a 40%, #ff9a1e 78%, #c2540a); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 3px 0 #3a1404) drop-shadow(0 0 16px #ff3a2a99); }
.cq-title span { display: inline-block; margin: 0 0 6px 18px; padding: 4px 14px; border: 2px solid #f0b93a; border-radius: 6px; background: #120a06e6; color: #ffd98a; font: 800 15px "Rubik", sans-serif; text-transform: uppercase; letter-spacing: .08em; transform: rotate(-3deg); }
.cq-chapter { margin-bottom: 22px; }
.cq-banner { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; padding: 16px 20px; border: 2px solid #f0b93a; border-radius: 12px; background: #0b0713; box-shadow: 0 0 0 1px #3a1f06, 0 0 18px #f0b93a33; }
.cq-banner::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #0b0713 0, #0b0713f2 38%, #0b071366 62%, #0b0713cc 100%), var(--bg) center / cover no-repeat; opacity: .95; }
.cq-banner > * { position: relative; }
.cq-num { display: block; font: italic 900 26px/1 "Rubik", sans-serif; text-transform: uppercase; color: #ffb62a; transform: skewX(-8deg); text-shadow: 0 2px 0 #3a1404; }
.cq-head h2 { margin: 2px 0 8px; font: italic 900 clamp(26px, 3.4vw, 40px)/1 "Rubik", sans-serif; text-transform: uppercase; color: #fff; transform: skewX(-8deg); transform-origin: 0 100%; text-shadow: 0 3px 0 #000, 0 0 18px #000; }
.cq-head p { margin: 0; max-width: 46ch; font-size: 14.500px; line-height: 1.45; color: #e9e2f2; text-shadow: 0 1px 3px #000; }
.cq-side { display: grid; gap: 10px; align-content: space-between; justify-items: end; min-width: 250px; }
.cq-status { display: flex; align-items: center; gap: 14px; }
.cq-done { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border: 2px solid #f0b93a; border-radius: 6px; background: #1a1206e6; color: #ffd35a; font: italic 900 18px "Rubik", sans-serif; text-transform: uppercase; transform: rotate(-3deg); }
.cq-done .pl-ico, .cq-count .pl-ico { width: 18px; height: 18px; stroke-width: 3; }
.cq-count { display: inline-flex; align-items: center; gap: 6px; font: 800 17px "Rubik", sans-serif; color: #fff; }
.cq-cmd { display: flex; align-items: center; gap: 12px; padding: 8px 14px 8px 8px; border-radius: 10px; background: #0b0713e6; border: 1px solid #f0b93a66; }
.cq-cmd .cp-portrait { width: 62px; height: 62px; border: 2px solid #f0b93a; } .cq-cmd small { display: block; font-size: 12px; color: #d9cfb8; } .cq-cmd > div > b { display: block; font-size: 16px; color: #fff; } .cq-deck { margin-top: 4px; } .cq-deck b { color: #ffcf4a; }
.cq-fights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; margin-top: 10px; }
.cq-fight { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; border-radius: 10px; border: 1px solid #f0b93a88; background: linear-gradient(160deg, #140c20f5, #09060ff7); }
.cq-fight + .cq-fight::before { content: ""; position: absolute; left: -27px; top: 50%; width: 26px; height: 2px; background: #f0b93a; box-shadow: 0 0 8px #f0b93a; }
.cq-fight .cp-portrait { width: 78px; height: 78px; border: 2px solid #f0b93a; box-shadow: 0 0 12px #f0b93a55; }
.cq-kicker { font: 800 11px "Rubik", sans-serif; text-transform: uppercase; letter-spacing: .1em; color: #ffb62a; } .cq-fight.boss .cq-kicker { color: #ff5a4a; }
.cq-info h3 { margin: 1px 0 2px; font-size: 16px; color: #fff; } .cq-foe { margin: 0 0 4px; font-size: 12.500px; color: #b9b0c8; line-height: 1.3; }
.cq-rlabel { font-size: 11px; color: #d9cfb8; } .cq-rws { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 2px; } .cq-rws.got { opacity: .55; }
.cq-rw { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; } .cq-rw .coin-ico { width: 22px; height: 22px; } .cq-pack { height: 26px; width: auto; border-radius: 2px; } .cq-rw.cos { color: #c79bff; }
.cq-act { display: grid; gap: 6px; justify-items: center; }
.cq-check { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; border: 2px solid #54ff4a; color: #54ff4a; box-shadow: 0 0 12px #54ff4a88; background: #06140a; } .cq-check .pl-ico { stroke-width: 3; }
.btn.cq-go { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; font: 900 14px "Rubik", sans-serif; text-transform: uppercase; box-shadow: 0 0 16px #ffb62a88; }
.cq-fight.cur { border: 2px solid #ff3a2a; box-shadow: 0 0 18px #ff3a2a88, inset 0 0 22px #ff3a2a22; } .cq-fight.boss { border-color: #ff5a4a; } .cq-fight.boss .cp-portrait { border-color: #ff5a4a; box-shadow: 0 0 12px #ff5a4a66; }
.cq-fight.locked { border-color: #ffffff22; } .cq-fight.locked .cp-portrait, .cq-fight.locked .cq-rws { filter: grayscale(1) brightness(.6); } .cq-fight.locked h3, .cq-fight.locked .cq-kicker { color: #9a94a6; }
.cq-lock { display: grid; justify-items: center; gap: 4px; color: #b9b0c8; max-width: 92px; text-align: center; } .cq-lock .pl-ico { width: 28px; height: 28px; } .cq-lock small { font-size: 10.500px; line-height: 1.2; }
.cq-chapter.locked .cq-banner { border-color: #ffffff33; box-shadow: none; } .cq-chapter.locked .cq-banner::before { filter: grayscale(1) brightness(.7); } .cq-chapter.locked .cq-num, .cq-chapter.locked .cq-head h2 { color: #b9b0c8; }
.cq-chapter.active .cq-banner { border-color: #ff5a2a; box-shadow: 0 0 22px #ff5a2a55; }
@media (max-width: 900px) { .cq-fights { grid-template-columns: minmax(0, 1fr); gap: 10px; } .cq-fight + .cq-fight::before { left: 50px; top: -11px; width: 2px; height: 10px; }
  .cq-banner { grid-template-columns: minmax(0, 1fr); } .cq-side { justify-items: start; min-width: 0; } .cq-banner::before { background: linear-gradient(180deg, #0b0713ee, #0b0713cc), var(--bg) center / cover no-repeat; }
  .cq-title span { margin-left: 6px; font-size: 12px; } }
.cq-top { padding-top: 14px; } .cq-title h1 { padding-right: .15em; }

/* ---------- Menu Decks (nouvelle présentation) ---------- */
.hub.tab-decks .hub-body { max-width: 1160px; }
.pl-title.dk-title h1 { margin: 0; display: inline-block; font: italic 900 clamp(46px, 7vw, 84px)/.95 "Rubik", "Alegreya Sans", sans-serif; text-transform: uppercase; transform: rotate(-3deg) skewX(-8deg); transform-origin: 0 100%; padding-right: .15em;
  background: linear-gradient(180deg, #fff6c9, #ffd35a 40%, #ff9a1e 78%, #c2540a); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 3px 0 #3a1404) drop-shadow(0 0 16px #ff3a2a99); }
.dk-title p { margin: 4px 0 0 10px; }
.dk-filters { display: flex; justify-content: flex-end; flex-wrap: wrap; margin-top: -34px; }
.dk-f { --c: #ffcf4a; display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; border: 1px solid #f0b93a66; background: #0d0816e6; color: #fff; font: 800 15px "Rubik", sans-serif; text-transform: uppercase; letter-spacing: .04em; cursor: pointer; }
.dk-f:first-child { border-radius: 10px 0 0 10px; } .dk-f:last-child { border-radius: 0 10px 10px 0; } .dk-f .pl-ico { color: var(--c); width: 24px; height: 24px; }
.dk-f.f-aggro, .a-aggro { --c: #ff3a3a; } .dk-f.f-control, .a-control { --c: #3a9dff; } .dk-f.f-midrange, .a-midrange { --c: #a25bff; }
.dk-f.on { border: 2px solid #ffcf4a; box-shadow: 0 0 14px #ffcf4a66; background: #1c1206; }
.dk-h { display: flex; align-items: center; gap: 10px; margin: 4px 0 -4px; font: 800 20px "Rubik", sans-serif; text-transform: uppercase; color: #ffcf4a; } .dk-h .pl-ico { width: 28px; height: 28px; }
.dk-fan { position: relative; display: block; flex: none; } .dk-mini { position: absolute; top: 50%; left: 50%; width: 46%; aspect-ratio: 5 / 7; border-radius: 6px; background: #2a1a40 center / cover no-repeat; border: 2px solid var(--c, #f0b93a); box-shadow: 0 4px 10px #000c, 0 0 12px color-mix(in srgb, var(--c, #f0b93a) 60%, transparent); display: grid; place-items: center; color: #fff; font-weight: 800; }
.dk-mini.m0 { transform: translate(-108%, -48%) rotate(-10deg); } .dk-mini.m1 { transform: translate(-50%, -52%); z-index: 1; width: 50%; } .dk-mini.m2 { transform: translate(8%, -48%) rotate(10deg); }
.hub-body > .panel.dk-hero { display: grid; grid-template-columns: 280px minmax(0, 1fr) auto; gap: 20px; align-items: center; border-color: var(--c); box-shadow: 0 0 0 1px #3a1f06, 0 0 24px color-mix(in srgb, var(--c) 55%, transparent), inset 0 0 60px color-mix(in srgb, var(--c) 18%, transparent); min-height: 150px; overflow: hidden; }
.dk-hero .dk-fan { height: 150px; width: 280px; } .dk-hero .dk-mini { width: 36%; }
.dk-hinfo { display: flex; gap: 16px; align-items: flex-start; min-width: 0; } .dk-hinfo h3 { margin: 0; font: italic 900 30px/1 "Rubik", sans-serif; text-transform: uppercase; color: #fff; } .dk-count { margin: 4px 0 6px; color: #d9cfb8; } .dk-blurb { margin: 8px 0 0; color: #d9cfb8; }
.dk-aico { display: inline-grid; place-items: center; color: var(--c, #ffcf4a); filter: drop-shadow(0 0 8px var(--c, #ffcf4a)); } .dk-aico .pl-ico { width: 30px; height: 30px; stroke-width: 2.200; } .dk-aico.big .pl-ico { width: 58px; height: 58px; }
.dk-tag { display: inline-block; padding: 2px 10px; border: 1px solid var(--c); border-radius: 4px; color: var(--c); font: 800 11px "Rubik", sans-serif; text-transform: uppercase; letter-spacing: .08em; }
.dk-hact { display: grid; gap: 12px; justify-items: end; } .dk-equipped, .dk-active { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 2px solid #3fd46a; border-radius: 8px; background: #06140ae6; color: #5fe08a; font: 800 14px "Rubik", sans-serif; text-transform: uppercase; }
.btn.dk-use { padding: 14px 44px; font: 900 20px "Rubik", sans-serif; text-transform: uppercase; border-radius: 10px; box-shadow: 0 0 20px #ffcf4a88; }
.dk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.dk-tile { position: relative; border-radius: 10px; border: 1px solid #f0b93a66; background: linear-gradient(160deg, #140c20f2, #09060ff7); min-height: 132px; overflow: hidden; }
.dk-tile.on { border: 2px solid #ffcf4a; box-shadow: 0 0 18px #ffcf4a88; } .dk-tile.bad { opacity: .7; }
.dk-tilebtn { display: grid; grid-template-rows: 70px auto; width: 100%; height: 100%; padding: 8px 12px 10px; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.dk-tile .dk-fan { height: 86px; width: 190px; margin: -14px auto 0; } .dk-tile .dk-mini { border-width: 1px; width: 30%; }
.dk-tinfo { display: flex; gap: 10px; align-items: center; } .dk-tinfo b { display: block; font: 800 15px "Rubik", sans-serif; text-transform: uppercase; } .dk-tinfo small { display: block; font-size: 12px; color: #b9b0c8; } .dk-tinfo em { font: 800 11px "Rubik", sans-serif; font-style: normal; text-transform: uppercase; color: var(--c); letter-spacing: .06em; }
.dk-active { position: absolute; right: 8px; bottom: 8px; padding: 3px 10px; font-size: 12px; pointer-events: none; }
.dk-more { position: absolute; top: 8px; right: 8px; width: 34px; height: 28px; border-radius: 6px; border: 1px solid #f0b93a88; background: #0d0816; color: #fff; font-weight: 900; cursor: pointer; line-height: 1; }
.dk-new { display: grid; place-content: center; justify-items: center; gap: 8px; color: #ffcf4a; cursor: pointer; font: inherit; } .dk-new i { width: 46px; height: 46px; display: grid; place-items: center; border: 2px solid #ffcf4a; border-radius: 50%; font: 400 32px/1 sans-serif; font-style: normal; } .dk-new b { font: 800 15px "Rubik", sans-serif; text-transform: uppercase; }
.dk-pgrid { display: grid; grid-template-columns: 1.300fr 1.400fr 1fr 1.100fr; gap: 12px; }
.dk-box { padding: 12px 14px; border-radius: 10px; border: 1px solid #ffffff1c; background: #ffffff08; min-width: 0; } .dk-lab { display: block; margin-bottom: 8px; font: 800 12px "Rubik", sans-serif; text-transform: uppercase; letter-spacing: .06em; color: #fff; }
.dk-keys { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .dk-keys .card { width: 100%; }
.dk-curve { display: flex; gap: 6px; align-items: flex-end; height: 120px; } .dk-curve span { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; }
.dk-curve i { display: block; width: 100%; min-height: 2px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 70%, #fff), var(--c)); border-radius: 3px 3px 0 0; } .dk-curve em { font: 800 12px "Rubik", sans-serif; font-style: normal; } .dk-curve b { font-size: 12px; color: #d9cfb8; border-top: 1px solid #ffffff33; width: 100%; text-align: center; padding-top: 3px; }
.dk-comp, .dk-stats { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; } .dk-comp b { color: #ffcf4a; font-size: 17px; }
.dk-stats li { display: flex; align-items: center; justify-content: space-between; gap: 10px; } .dk-seg { display: inline-flex; gap: 3px; } .dk-seg i { width: 16px; height: 8px; background: #ffffff1c; } .dk-seg i.on { background: #ffcf4a; box-shadow: 0 0 6px #ffcf4a88; }
@media (max-width: 900px) { .dk-filters { margin-top: 0; justify-content: flex-start; } .dk-f { padding: 9px 12px; font-size: 12px; flex: 1; justify-content: center; }
  .hub-body > .panel.dk-hero { grid-template-columns: minmax(0, 1fr); } .dk-hero .dk-fan { margin: 0 auto; } .dk-hact { justify-items: stretch; } .dk-hact .row { justify-content: stretch; } .dk-hact .btn { flex: 1; }
  .dk-pgrid { grid-template-columns: minmax(0, 1fr); } .dk-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); } .dk-tile .dk-fan { width: 150px; } }
.dk-tile .dk-active { top: 8px; left: 8px; right: auto; bottom: auto; }
.dk-tilebtn { grid-template-rows: 84px auto; } .dk-tile .dk-fan { height: 84px; margin-top: -8px; } .dk-tile { min-height: 148px; }

/* ---------- Boutique (nouvelle présentation) ---------- */
.shop-screen.sb { max-width: 1180px; }
.sb-top { align-items: flex-end; padding-top: 14px; margin-bottom: 12px; gap: 12px; }
.sb-tabs { display: flex; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; } .sb-tabs .dk-f { border-radius: 10px !important; }
.sb-sets { display: grid; gap: 18px; }
.sb-set { --c: #54ff4a; --c2: #c8ff3a; position: relative; overflow: hidden; display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 10px; min-height: 260px; padding: 18px 22px 18px 0; border: 2px solid var(--c); border-radius: 14px;
  background: linear-gradient(90deg, #07140a 0, #07140af2 40%, #07140a99 66%, #07140a55 100%), url(/img/fond.webp) right 30% / cover no-repeat; box-shadow: 0 0 0 1px #000, 0 0 24px color-mix(in srgb, var(--c) 60%, transparent), inset 0 0 60px color-mix(in srgb, var(--c) 16%, transparent); }
.sb-set.s-kei { --c: #ff3a2a; --c2: #ffb0a0; background: linear-gradient(90deg, #140404 0, #140404f2 40%, #14040499 66%, #14040433 100%), url(/img/fond-kei.webp) right 12% / cover no-repeat; }
.sb-packs { position: relative; } .sb-packs img { position: absolute; left: 50%; top: 50%; height: 88%; width: auto; transform: translate(calc(-50% + var(--k) * 62px), -50%) rotate(calc(var(--k) * 7deg)) scale(calc(1 - (var(--k) * var(--k)) * .060)); filter: drop-shadow(0 8px 14px #000d) drop-shadow(0 0 12px color-mix(in srgb, var(--c) 50%, transparent)); }
.sb-body { display: grid; gap: 10px; align-content: center; min-width: 0; }
.sb-headline { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-right: 230px; }
.sb-headline h2 { margin: 0; font: italic 900 clamp(26px, 3.600vw, 44px)/1 "Rubik", "Alegreya Sans", sans-serif; text-transform: uppercase; transform: skewX(-8deg); transform-origin: 0 100%;
  background: linear-gradient(180deg, #fff, var(--c2) 55%, var(--c)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 3px 0 #000) drop-shadow(0 0 14px color-mix(in srgb, var(--c) 70%, transparent)); padding-right: .15em; }
.sb-code { padding: 3px 12px; border: 1px solid #ffffff55; border-radius: 999px; background: #000a; font: 800 12px "Rubik", sans-serif; letter-spacing: .08em; }
.sb-text { margin: 0; font-size: 14.500px; line-height: 1.45; color: #f1ecf7; text-shadow: 0 1px 3px #000; }
.sb-facts { display: flex; gap: 34px; flex-wrap: wrap; font-size: 13px; line-height: 1.3; } .sb-facts > span { display: inline-flex; align-items: center; gap: 10px; } .sb-facts .pl-ico { width: 28px; height: 28px; } .sb-facts .star .pl-ico { color: #ffcf4a; stroke: none; }
.sb-buys { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
.sb-buy { position: relative; display: grid; justify-items: center; gap: 4px; min-width: 190px; padding: 10px 22px; border: 2px solid #f0b93a; border-radius: 10px; background: #0b0713ee; color: #fff; cursor: pointer; font: inherit; box-shadow: 0 0 12px #f0b93a44; transition: transform .12s, box-shadow .12s; }
.sb-buy b { font: 800 14px "Rubik", sans-serif; text-transform: uppercase; letter-spacing: .04em; } .sb-buy span { display: inline-flex; align-items: center; gap: 7px; font: 800 19px "Rubik", sans-serif; } .sb-buy .coin-ico { width: 24px; height: 24px; } .sb-buy s { font-size: 15px; opacity: .6; font-weight: 600; }
.sb-buy.best { min-width: 250px; border-width: 3px; box-shadow: 0 0 20px #ffcf4a88; }
.sb-buy em { position: absolute; top: -11px; right: 44px; padding: 1px 9px; border-radius: 4px; background: #e2271c; color: #fff; font: 800 10px "Rubik", sans-serif; font-style: normal; text-transform: uppercase; letter-spacing: .06em; }
.sb-buy i { position: absolute; right: -16px; top: 50%; transform: translateY(-50%) rotate(6deg); padding: 6px 9px; background: #e2271c; color: #fff; font: 900 17px "Rubik", sans-serif; font-style: normal; border-radius: 5px; box-shadow: 0 3px 8px #000a; }
.sb-buy small { font-size: 11px; color: #ff9a8a; } .sb-buy:disabled { opacity: .6; cursor: not-allowed; }
.sb-buy:not(:disabled):hover, .sb-buy:not(:disabled):focus-visible { transform: translateY(-2px); box-shadow: 0 0 24px #ffcf4acc; outline: none; }
.sb-see { position: absolute; top: 14px; right: 16px; padding: 9px 16px; border-radius: 999px; border: 1px solid #ffffff55; background: #000b; color: #fff; font: 700 13px "Alegreya Sans", sans-serif; cursor: pointer; }
@media (max-width: 900px) { .sb-set { grid-template-columns: minmax(0, 1fr); padding: 14px; } .sb-packs { height: 190px; } .sb-headline { padding-right: 0; } .sb-see { position: static; justify-self: start; margin-top: 4px; }
  .sb-buy, .sb-buy.best { min-width: 0; flex: 1 1 100%; } .sb-buy i { right: 6px; } .sb-facts { gap: 16px; } .sb-title span { margin-left: 6px; font-size: 12px; } }
.sb-buy.best { padding-right: 62px; } .sb-buy i { right: -10px; }

/* Lien Discord */
.hh-discord { display: inline-flex; align-items: center; gap: 14px; justify-content: center; padding: 10px 24px; border-radius: 14px; background: linear-gradient(135deg, #5865f2, #3d49c9); border: 2px solid #8d97ff; color: #fff; text-decoration: none; box-shadow: 0 6px 18px rgba(88,101,242,.35); transition: transform .15s, box-shadow .15s; margin: 0 auto; }
.hh-discord img { width: 40px; height: auto; flex: none; filter: brightness(0) invert(1); }
.hh-discord span { display: grid; text-align: left; } .hh-discord small { font: 700 12px "Rubik", sans-serif; text-transform: uppercase; letter-spacing: .06em; opacity: .85; }
.hh-discord b { font: 900 18px/1.1 "Rubik", sans-serif; text-transform: uppercase; letter-spacing: .04em; } .hh-discord i { font: 400 28px/1 sans-serif; font-style: normal; opacity: .9; }
.hh-discord:hover, .hh-discord:focus-visible { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(88,101,242,.5); outline: none; }
.hh-discord.small { padding: 8px 18px; width: fit-content; } .hh-discord.small img { width: 30px; } .hh-discord.small b { font-size: 15px; }
@media (max-width: 760px) { .hh-discord { width: 100%; box-sizing: border-box; } }

/* Journal latéral (écrans larges) : à gauche du plateau, remplace le journal sous la main */
.logside { display: none; }
@media (min-width: 1180px) {
  .duel { max-width: 1440px; grid-template-columns: 250px minmax(0, 1fr) 200px;
    grid-template-areas: "ls fan opp" "ls btop opp" "ls mid endbtn" "ls bbot me" "ls hand me"; }
  .duel > .logside { display: block; grid-area: ls; position: relative; min-height: 0; }
  .duel > .logbox { display: none; }
  .midline .banner .last { display: none; }
  .logside { background: linear-gradient(#1b1030f2, #120a20f2); border: 1px solid #c9a24a66; border-radius: 14px; box-shadow: 0 4px 14px #0008; overflow: hidden; }
  .ls-head { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 10px 12px; border-bottom: 1px solid #c9a24a44; background: #0006; }
  .ls-head b { font: 800 14px "Rubik", sans-serif; text-transform: uppercase; letter-spacing: .06em; color: var(--gold-bright); } .ls-head span { font-size: 12px; color: var(--muted); }
  .ls-list { position: absolute; top: 42px; left: 0; right: 0; bottom: 0; overflow-y: auto; padding: 8px 10px 12px; display: flex; flex-direction: column; gap: 4px; scrollbar-width: thin; }
  .ls-row { font-size: 13px; line-height: 1.35; padding: 4px 8px; border-left: 3px solid #ffffff22; background: #ffffff0a; border-radius: 0 6px 6px 0; color: #e7dff2; }
  .ls-row.turn { margin-top: 8px; border-left-color: var(--gold); background: #e8c46a1a; color: var(--gold-bright); font-weight: 800; text-transform: uppercase; font-size: 12px; letter-spacing: .05em; }
  .ls-row.dmg { border-left-color: #e2685a; } .ls-row.good { border-left-color: #7cc58a; } .ls-row.info { border-left-color: #6aa7ff; } .ls-row.priv { border-left-color: var(--energy); color: var(--energy); }
}

/* ===== Ultra Rares : illustration pleine carte, cadre allégé, reflet holographique (maquette « Ryo Kei ») ===== */
.card.tcg.ultra { border-radius: 4.5%; background: #0b0713; overflow: hidden; filter: drop-shadow(0 4px 10px rgba(0,0,0,.6)); }
.card.tcg.ultra .u-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.card.tcg.ultra .u-shade { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(#0009 0, #0000 14%, #0000 55%, #000a 72%, #000e 100%); }
.card.tcg.ultra .u-shade::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; mix-blend-mode: overlay; opacity: .35;
  background: repeating-linear-gradient(118deg, #ffffff00 0 .9cqw, #ffffff1c .9cqw 1.1cqw); }
.card.tcg.ultra .u-edge { position: absolute; inset: 1.6%; border-radius: 3.4%; border: .3cqw solid #d9b25e; box-shadow: 0 0 0 .5cqw #0006; pointer-events: none; z-index: 4; }
.card.tcg.ultra .u-holo { position: absolute; inset: 0; border-radius: inherit; z-index: 3; mix-blend-mode: color-dodge; opacity: .45; pointer-events: none;
  background: linear-gradient(115deg, transparent 20%, #ff6ad540 32%, #ffe66d55 40%, #6dffb055 48%, #6dc7ff55 56%, #b46dff40 64%, transparent 76%) -140% 0 / 280% 100% no-repeat;
  animation: ultra-holo 4.2s ease-in-out infinite; }
@keyframes ultra-holo { 0%, 25% { background-position: -140% 0; } 70%, 100% { background-position: 240% 0; } }
/* Nom : petites capitales à empattement, en haut à gauche */
.card.tcg.ultra .c-name { z-index: 5; left: 4.5%; top: 3%; width: 72%; height: 8%; justify-content: flex-start; transform: none; padding: 0;
  font-family: "Alegreya SC", Georgia, serif; font-weight: 800; font-size: calc(var(--fs) * 1.25); letter-spacing: .01em; color: #fff;
  text-shadow: 0 .3cqw 1.2cqw #000, 0 0 .6cqw #000; }
/* Coût : gemme turquoise cerclée d'or */
.card.tcg.ultra .c-cost { z-index: 5; left: auto; right: 4.4%; top: 2.2%; width: 10.6%; height: auto; aspect-ratio: 1; border-radius: 50%;
  font-family: "Alegreya SC", Georgia, serif; font-weight: 800; font-size: 7.6cqw; color: #1a1a1a; text-shadow: 0 .2cqw 0 #ffffff88;
  background: radial-gradient(circle at 35% 28%, #c9fff2, #4fd1bf 45%, #1c8f86 100%); border: .7cqw solid #e2c070; box-shadow: 0 .6cqw 1.4cqw #000b, inset 0 -.6cqw 1cqw #0004; }
/* Bloc central : type, effet, texte d'ambiance */
.card.tcg.ultra .u-mid { position: absolute; z-index: 5; left: 8%; right: 8%; top: 64%; bottom: 17%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.6cqw; text-align: center; }
.card.tcg.ultra .u-kind { font: 700 2.9cqw "Rubik", sans-serif; letter-spacing: .32em; text-transform: uppercase; color: #e2c070; text-shadow: 0 0 .8cqw #000; }
.card.tcg.ultra .u-kind i { font-style: normal; color: #e9a6ff; }
.card.tcg.ultra .u-eff { font: 600 var(--fs) / 1.18 "Alegreya Sans", system-ui, sans-serif; color: #fbf3df; text-shadow: 0 0 1cqw #000, 0 .2cqw .5cqw #000; }
.card.tcg.ultra .u-eff b { color: #ffd98a; }
.card.tcg.ultra .u-flavor { font: italic 500 3.4cqw / 1.2 "Alegreya Sans", Georgia, serif; color: #e8dfcf; text-shadow: 0 0 1cqw #000; }
/* PV (rouge) et ATQ (bleu) : grands médaillons dans les coins */
.card.tcg.ultra .c-num { z-index: 5; top: auto; bottom: 3.6%; height: auto; width: 13.8%; aspect-ratio: 1; border-radius: 50%; border: .8cqw solid #e2c070; box-shadow: 0 .8cqw 1.6cqw #000b, inset 0 -.8cqw 1.2cqw #0005;
  font-family: "Alegreya SC", Georgia, serif; font-weight: 800; font-size: 10cqw; }
.card.tcg.ultra .c-hp { left: 5%; background: radial-gradient(circle at 35% 28%, #ff8a7a, #c8342a 55%, #7d1410 100%); }
.card.tcg.ultra .c-atk { left: auto; right: 5%; background: radial-gradient(circle at 35% 28%, #8fbcff, #2f63c8 55%, #163a86 100%); }
/* Gemme Ultra (losange irisé) et mention du set */
.card.tcg.ultra .u-gem { position: absolute; z-index: 5; left: 50%; bottom: 5.4%; width: 8.4%; aspect-ratio: 1; transform: translateX(-50%) rotate(45deg); border-radius: 18%;
  background: linear-gradient(135deg, #b8fff0, #8fd4ff 35%, #c9a6ff 70%, #ffb3e6); border: .55cqw solid #fff; box-shadow: 0 0 2cqw #c9a6ffcc, 0 0 .6cqw #fff; animation: ultra-gem 3s ease-in-out infinite; }
@keyframes ultra-gem { 50% { box-shadow: 0 0 3.4cqw #8fd4ffee, 0 0 .6cqw #fff; } }
.card.tcg.ultra .u-tag { position: absolute; z-index: 5; left: 50%; bottom: .6%; transform: translateX(-50%); white-space: nowrap; font: 700 2.3cqw "Rubik", sans-serif; letter-spacing: .3em; text-transform: uppercase; color: #fff; text-shadow: 0 0 .8cqw #000, 0 0 .4cqw #000; }
.card.tcg.ultra .count { top: 14.5%; bottom: auto; right: 5%; z-index: 6; }
.card.tcg.ultra.dim { opacity: .55; }
.card.tcg.ultra.is-test::before { z-index: 6; }
/* Sur le plateau : médaillon à bord holographique */
.unit.tok.ultra .t-art { border-color: #e8c46a; box-shadow: 0 0 0 2px #7b4fd6, 0 0 16px 3px #b46dffaa, inset 0 0 0 2px #0008; }
.unit.tok.ultra .t-art::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 3; mix-blend-mode: color-dodge; opacity: .6;
  background: linear-gradient(115deg, transparent 25%, #ff6ad566 38%, #ffe66d77 46%, #6dffb077 54%, #6dc7ff77 62%, transparent 75%) -140% 0 / 280% 100% no-repeat; animation: ultra-holo 3.8s ease-in-out infinite; }
.ultratag { display: block; text-align: center; font: 800 12px "Rubik", sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #fff; padding: 3px 8px; margin-top: 4px; border-radius: 999px; background: linear-gradient(90deg, #c0399a, #c9a02a, #2fa56d, #2f7fc0, #7a3fc0); }
.newtag.ultra-tag { background: linear-gradient(90deg, #ff6ad5, #ffd24a, #6dffb0, #6dc7ff, #b46dff); color: #1b1030; font-weight: 900; }
.bface.r-glow-ultra .card.tcg { filter: drop-shadow(0 0 16px #b46dff) drop-shadow(0 0 6px #ffd24a); }
.ultra-win { color: #ffd24a; }
@media (prefers-reduced-motion: reduce) { .card.tcg.ultra .u-holo, .card.tcg.ultra .u-gem, .unit.tok.ultra .t-art::after { animation: none; } }
/* Ultra Rares : coût et PV/ATQ plus discrets (pastilles sombres translucides, liseré de couleur) */
.card.tcg.ultra .c-cost { width: 8.2%; top: 3%; right: 4.6%; font-size: 5cqw; color: #f3fffb; text-shadow: 0 0 .8cqw #000;
  background: radial-gradient(circle at 35% 30%, #1d4a46cc, #0b1f1dcc); border: .45cqw solid #6fd8c8; box-shadow: 0 .4cqw 1cqw #0008; }
.card.tcg.ultra .c-num { width: 10%; bottom: 4.2%; border-width: .45cqw; font-size: 6.4cqw; color: #fff; text-shadow: 0 0 .8cqw #000; box-shadow: 0 .4cqw 1cqw #0008; }
.card.tcg.ultra .c-hp { left: 6%; background: radial-gradient(circle at 35% 30%, #5a1a16cc, #22090799); border-color: #e0706488; border-color: #e07064; }
.card.tcg.ultra .c-atk { right: 6%; background: radial-gradient(circle at 35% 30%, #1a2f5acc, #08122299); border-color: #6f9be6; }
/* Ultra Rare épuisée : plus de reflet ni de halo, le médaillon passe en gris comme les autres */
.unit.tok.ultra.exhausted .t-art { border-color: #8a8a8a; box-shadow: 0 0 0 2px #0008, inset 0 0 0 2px #0008; filter: grayscale(1) brightness(.62); }
.unit.tok.ultra.exhausted .t-art::after { animation: none; opacity: 0; }

/* ===== Codes partenaires ===== */
.pt-wrap { display: grid; gap: 16px; max-width: 760px; }
.pt-box h3 { margin: 0 0 8px; font-family: "Alegreya SC", Georgia, serif; color: var(--gold-bright); display: flex; align-items: center; gap: 10px; }
.pt-form { gap: 10px; flex-wrap: wrap; } .pt-form input { flex: 1 1 200px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.pt-code { display: inline-block; font: 800 13px "Rubik", sans-serif; letter-spacing: .1em; padding: 3px 9px; border-radius: 8px; background: #9146ff22; border: 1px solid #9146ff; color: #e3d2ff; }
.pt-code.big { font-size: 26px; padding: 6px 16px; }
.pt-big { margin: 4px 0 12px; }
.pt-badge, .pt-chip { display: inline-block; font: 800 10px "Rubik", sans-serif; letter-spacing: .08em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; background: linear-gradient(90deg, #9146ff, #c86dff); color: #fff; box-shadow: 0 0 8px #9146ff88; vertical-align: middle; }
.pt-chip { margin-left: 6px; font-size: 9px; padding: 1px 6px; }
.pt-stats { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }
.pt-stats span { display: grid; min-width: 120px; padding: 10px 14px; border-radius: 12px; background: #ffffff0d; border: 1px solid #ffffff1a; font-size: 13px; color: var(--muted); }
.pt-stats b { font: 900 28px "Rubik", sans-serif; color: #fff; }
.pt-next { display: grid; gap: 6px; margin: 10px 0; font-size: 13px; }
.pt-bar { height: 10px; border-radius: 999px; background: #ffffff14; overflow: hidden; } .pt-bar i { display: block; height: 100%; background: linear-gradient(90deg, #9146ff, #e8c46a); border-radius: inherit; }
.pt-tiers { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.pt-tiers li { position: relative; display: grid; padding: 8px 10px; border-radius: 10px; background: #ffffff0a; border: 1px solid #ffffff1a; font-size: 12px; color: var(--muted); }
.pt-tiers li b { font: 900 18px "Rubik", sans-serif; color: #fff; } .pt-tiers li b::after { content: " actifs"; font-size: 11px; font-weight: 600; color: var(--muted); }
.pt-tiers li.paid { border-color: #7cc58a; background: #7cc58a1a; } .pt-tiers li i { position: absolute; right: 8px; top: 6px; color: #7cc58a; font-style: normal; font-weight: 900; }
.pt-admin { margin: 10px 0 14px; } .pt-admin summary { cursor: pointer; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.pt-aform { display: grid; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #ffffff1a; }
.pt-aform label { display: grid; gap: 4px; font-size: 13px; } .pt-aform label.check { display: flex; align-items: center; gap: 8px; }
.pt-row .pt-code { margin-right: 8px; }
.pt-wrap .panel.pt-box { display: block; }
.pt-wrap .pt-box > * + * { margin-top: 8px; }

/* Version du jeu et notes de patch */
.ver-chip { display: block; margin: 8px 18px 4px; padding: 0; border: 0; background: none; text-align: left; font: 600 11px "Rubik", sans-serif; letter-spacing: .04em; color: #8c82a0; cursor: pointer; }
.ver-chip:hover, .ver-chip:focus-visible { color: var(--gold-bright); outline: none; text-decoration: underline; }
.ver-chip.login { margin: 14px auto 0; text-align: center; }
.icon-btn.ver-mini { width: auto; padding: 0 8px; font: 700 11px "Rubik", sans-serif; }
.overlay-inner.pn { max-width: 620px; }
.pn-block { margin-top: 14px; padding: 12px 16px; border-radius: 12px; background: #ffffff08; border: 1px solid #ffffff14; }
.pn-block.cur { border-color: var(--gold); background: #e8c46a12; }
.pn-block h3 { margin: 0; font-family: "Alegreya SC", Georgia, serif; color: var(--gold-bright); } .pn-block h3 span { color: #e7dff2; font-size: .85em; }
.pn-block ul { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.rg-milestone { border-color: #7cc58a; background: linear-gradient(90deg, #7cc58a26, transparent); }
.rg-milestone b { color: #a8f0b4; margin-right: 6px; }

/* Constructeur de deck : liste à droite, qui suit le défilement (écrans larges) */
.bld-layout { display: grid; gap: 14px; }
.bld-main { display: grid; gap: 10px; align-content: start; min-width: 0; }
.bl-desk { display: none; }
@media (min-width: 1000px) {
  .wrap.builder.bld { max-width: 1320px; }
  .bld-layout { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
  .bld-side { grid-column: 2; grid-row: 1; position: sticky; top: 10px; max-height: calc(100vh - 100px); overflow-y: auto; scrollbar-width: thin; }
  .bld-main { grid-column: 1; grid-row: 1; }
  .bld-side .bl-mobile { display: none; }
  .bld-side .bl-desk { display: block; }
  .bl-title { margin: 4px 0 0; font-family: "Alegreya SC", Georgia, serif; font-size: 16px; color: var(--gold-bright); }
  .bld-side .deck-rows { max-height: none; overflow: visible; gap: 2px; }
  .bld-side .deck-row { padding: 2px 6px; font-size: 14px; }
  .bld-side .deck-row .btn.small { padding: 0 8px; }
}

/* ===== Niveaux de compte ===== */
.lv-chip { display: inline-flex; align-items: center; gap: 8px; margin: 3px 0 0; padding: 3px 10px 3px 4px; border: 1px solid #e8c46a66; border-radius: 999px; background: #0007; color: #fff; cursor: pointer; font: 600 11px "Rubik", sans-serif; }
.lv-chip:hover, .lv-chip:focus-visible { border-color: var(--gold-bright); outline: none; }
.lv-n { padding: 2px 8px; border-radius: 999px; background: linear-gradient(135deg, #e8c46a, #b8862a); color: #1b1030; font-weight: 900; letter-spacing: .03em; }
.lv-bar { display: inline-block; width: 90px; height: 7px; border-radius: 999px; background: #ffffff1c; overflow: hidden; } .lv-bar i { display: block; height: 100%; background: linear-gradient(90deg, #6aa7ff, #b46dff); border-radius: inherit; }
.lv-chip small { color: #cbbfd9; font-size: 10px; }
.lv-lock { display: inline-block; margin-left: 6px; font: 700 9px "Rubik", sans-serif; letter-spacing: .04em; padding: 1px 6px; border-radius: 999px; background: #ffffff14; color: #b9aed0; vertical-align: middle; }
.hn-item:has(.lv-lock) { opacity: .65; }
.lv-lockline { display: block; text-align: center; font: 700 11px "Rubik", sans-serif; color: #b9aed0; padding: 4px 6px; border-radius: 8px; background: #0006; }
.lv-lockbox { margin: 0; padding: 14px 18px; border-radius: 12px; border: 1px dashed #ffffff40; background: #0008; font: 800 15px "Rubik", sans-serif; color: #e7dff2; }
.overlay-inner.lv-panel { max-width: 640px; }
.lv-big { display: grid; gap: 4px; margin: 6px 0 10px; } .lv-big .lv-bar { width: 100%; height: 12px; } .lv-big small { color: var(--muted); }
.lv-track { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.lv-row { display: grid; grid-template-columns: 42px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: #ffffff08; border: 1px solid #ffffff12; opacity: .75; }
.lv-row.done { opacity: 1; border-color: #7cc58a55; } .lv-row.cur { opacity: 1; border-color: var(--gold); background: #e8c46a14; }
.lv-num { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 900 15px "Rubik", sans-serif; background: #1b1030; border: 2px solid #ffffff30; color: #fff; }
.lv-row.done .lv-num { border-color: #7cc58a; } .lv-row.cur .lv-num { border-color: var(--gold-bright); background: #e8c46a33; }
.lv-what { display: grid; gap: 2px; } .lv-what b { font-weight: 700; color: #f3ecff; } .lv-what small { color: var(--gold-bright); }
.lv-ok { color: #7cc58a; font-weight: 900; }
.lv-up .lv-uppanel { max-width: 440px; text-align: center; border: 2px solid var(--gold); box-shadow: 0 0 40px #e8c46a55; animation: lv-pop .5s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes lv-pop { from { transform: scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
.lv-upkick { margin: 0; font: 800 12px "Rubik", sans-serif; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.lv-upnum { margin: 4px 0 10px; font: 900 44px "Alegreya SC", Georgia, serif; color: var(--gold-bright); text-shadow: 0 0 20px #e8c46a88; }
.lv-uppanel h3 { margin: 12px 0 6px; font-family: "Alegreya SC", Georgia, serif; color: #e7dff2; }
.lv-unl { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; } .lv-unl li { padding: 6px 10px; border-radius: 8px; background: #7cc58a1f; border: 1px solid #7cc58a55; font-weight: 700; }
.lv-gift { margin: 0 0 14px; font-weight: 700; color: var(--gold-bright); }
/* Decks : Commandant et quête */
.dk-cmd { display: block; color: #e8c46a; font-size: 11px; }
.dk-cq { margin: 6px 0 0; font-size: 13px; } .dk-cq b { color: var(--gold-bright); }
.dk-new.locked { opacity: .6; } .dk-new.locked small { color: var(--muted); }
.bld-cq { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; } .bld-cq label { display: grid; gap: 4px; font: 700 12px "Rubik", sans-serif; color: var(--gold-bright); }
.bld-cq select { width: 100%; } .bld-cq .why { grid-column: 1 / -1; margin: 0; }
.cq-lvlock { display: inline-block; margin-right: 8px; font: 800 12px "Rubik", sans-serif; padding: 3px 10px; border-radius: 999px; background: #0009; border: 1px solid #ffffff40; color: #e7dff2; }

/* ---------- Profil ---------- */
.hub.tab-profile .hub-body { max-width: 1180px; }
.pl-title h1.pf-title { font-size: clamp(48px, 8vw, 104px); line-height: .9; filter: drop-shadow(0 3px 0 #3a1404) drop-shadow(0 0 18px #ff9a1e88);
  transform: rotate(-4deg) skewX(-8deg); background: linear-gradient(180deg, #fff6c9 0%, #ffd35a 38%, #ff9a1e 72%, #c2540a 100%); -webkit-background-clip: text; background-clip: text; color: transparent; display: inline-block; padding: 4px 10px 8px 4px; }
.pf { display: grid; gap: 14px; }
.pf .panel { background: linear-gradient(160deg, #150b22ee, #0a0612f2); border: 1px solid #f0b93a99; border-radius: 14px; padding: 16px 18px; box-shadow: 0 0 18px #8a3cff22, 0 8px 22px #000a; }
.pf h3 { margin: 0 0 10px; font-family: "Rubik", sans-serif; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; color: #f6d77a; font-size: 17px; }
.pf h3 .note { font-family: inherit; font-weight: 400; text-transform: none; letter-spacing: 0; margin-left: 6px; }
.pf h4 { margin: 16px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.pf .row h3 { margin: 0; }
.pf-id { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; border-width: 2px !important; border-color: #f0b93a !important; }
.pf-portrait.portrait { width: 104px; height: 104px; }
.pf-portrait .p-mono { font-size: 40px; }
.pf-portrait img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.pf-who { flex: 1 1 260px; min-width: 0; display: grid; gap: 6px; }
.pf-who h2 { margin: 0; font-family: "Rubik", sans-serif; font-weight: 900; font-size: clamp(24px, 4vw, 34px); color: #fff; overflow-wrap: anywhere; }
.pf-who .note { margin: 0; }
.pf-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.pf-rank { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: #f1e6c8; }
.pf-chip { padding: 2px 8px; border-radius: 999px; border: 1px solid #b46dff; color: #e3c8ff; font-size: 12px; font-weight: 700; }
.pf-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pf-cols { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.pf-cols > div { display: grid; gap: 14px; }
@media (max-width: 900px) { .pf-cols { grid-template-columns: 1fr; } }
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.pf-stat { background: #ffffff08; border: 1px solid #ffffff14; border-radius: 10px; padding: 10px 12px; display: grid; gap: 2px; min-width: 0; }
.pf-stat b { font: 900 22px "Rubik", sans-serif; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-stat span { font-size: 13px; color: #f6d77a; text-transform: uppercase; letter-spacing: .06em; }
.pf-stat small { color: var(--muted); font-size: 12px; }
.pf-bar { display: block; height: 6px; border-radius: 999px; background: #ffffff1c; overflow: hidden; margin-top: 4px; min-width: 50px; }
.pf-bar i { display: block; height: 100%; background: linear-gradient(90deg, #f0b93a, #ff9a1e); border-radius: inherit; }
.pf-cmds { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pf-cmds li { display: grid; grid-template-columns: minmax(0, 1fr) auto 90px 44px; align-items: center; gap: 10px; font-size: 14px; }
.pf-cmds li b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-cmds li span { color: var(--muted); font-size: 13px; }
.pf-cmds .pf-bar { margin: 0; }
.pf-cmds .pf-wr { color: #fff; font-weight: 700; text-align: right; }
@media (max-width: 480px) { .pf-cmds li { grid-template-columns: minmax(0, 1fr) 60px 40px; } .pf-cmds li > span:nth-child(2) { display: none; } }
.pf-show { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.pf-show-card { width: 170px; }
.pf-show-card .card { width: 100%; flex: none; }
.pf-show.pick { min-height: 20px; margin-bottom: 10px; }
.pf-show.pick .pf-show-card { width: 120px; }
.pf-q { width: 100%; padding: 9px 12px; border-radius: 8px; border: 1px solid #f0b93a88; background: var(--parch); color: var(--ink); font: inherit; margin-bottom: 10px; }
.pf-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; max-height: 420px; overflow-y: auto; padding: 2px; }
.pf-pickc { all: unset; cursor: pointer; border-radius: 12px; outline: 3px solid transparent; transition: outline-color .12s, transform .12s; }
.pf-pickc .card { width: 100%; flex: none; pointer-events: none; }
.pf-pickc.on { outline-color: #7cc58a; transform: translateY(-2px); }
.pf-pickc:focus-visible { outline-color: #f0b93a; }
.pf-achs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pf-achs li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: #ffffff06; border: 1px solid #ffffff10; opacity: .62; }
.pf-achs li.done { opacity: 1; background: linear-gradient(90deg, #f0b93a1f, #ffffff06); border-color: #f0b93a66; }
.pf-achs li div { display: grid; gap: 1px; min-width: 0; }
.pf-achs b { color: #fff; }
.pf-achs small { color: var(--muted); font-size: 12.5px; }
.pf-achs .pf-at { color: #f6d77a; }
.pf-prog { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.pf-prog .pf-bar { margin: 0; }
.pf-medal svg { width: 36px; height: 36px; fill: #3a3346; stroke: #7a708a; stroke-width: 1.2; }
.pf-medal .st { fill: #7a708a; stroke: none; }
.pf-achs li.done .pf-medal svg { fill: #c9a24a; stroke: #fff2c0; filter: drop-shadow(0 0 6px #f0b93a88); }
.pf-achs li.done .pf-medal .st { fill: #fff6c9; }
.pf-games { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pf-games li { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 10px; background: #ffffff06; border-left: 4px solid var(--neutral); }
.pf-games li.win { border-left-color: var(--ok); } .pf-games li.loss { border-left-color: var(--danger); }
.pf-games li > span { display: grid; min-width: 0; }
.pf-games small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-res { font-weight: 900; text-transform: uppercase; font-size: 13px; letter-spacing: .05em; }
.win .pf-res { color: var(--ok); } .loss .pf-res { color: var(--danger); }
.pf-vs { color: var(--muted); font-size: 13px; }
.pf-g-when { text-align: right; }
@media (max-width: 640px) { .pf-games li { grid-template-columns: 70px minmax(0, 1fr) minmax(0, 1fr); } .pf-vs { display: none !important; } .pf-g-when { grid-column: 2 / -1; text-align: left; display: flex !important; gap: 8px; } }
.pf-link { all: unset; cursor: pointer; font-weight: 700; color: inherit; border-bottom: 1px dotted currentColor; }
.pf-link:hover, .pf-link:focus-visible { color: #f6d77a; }
.pf-modal { z-index: 80; }
.pf-inner.overlay-inner { max-width: 1040px; width: 100%; max-height: calc(100vh - 32px); overflow-y: auto; background: #0b0714; border-color: #f0b93a; }
.pf-link { display: inline; justify-self: start; }
.pf-more { margin-top: 10px; width: 100%; }
.pf-inner .pf-show-card { width: 150px; }
@media (max-width: 640px) { .pf-show { gap: 8px; flex-wrap: nowrap; } .pf-show-card, .pf-inner .pf-show-card, .pf-show.pick .pf-show-card { width: calc((100% - 16px) / 3); } .pf-id { gap: 12px; } .pf-portrait.portrait { width: 76px; height: 76px; } }
.ht-av { all: unset; cursor: pointer; display: grid; border-radius: 50%; } .ht-av:focus-visible { outline: 2px solid #f0b93a; outline-offset: 2px; }

/* ---------- Boutique : cosmétiques (maquette Enzo) ---------- */
.cs { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.cs-main { display: grid; gap: 12px; min-width: 0; }
.cs-sec { position: relative; padding: 26px 12px 12px; border-radius: 12px; background: linear-gradient(180deg, #120b1ee8, #0a0712f0); border: 1px solid #c9a24a99; box-shadow: inset 0 0 0 1px #0a0712, 0 0 18px #f0b93a1a, 0 8px 20px #000a; margin-top: 14px; }
.cs-h { position: absolute; top: -16px; left: 10px; margin: 0; padding: 0 6px 6px; font: italic 900 21px/1 "Rubik", sans-serif; text-transform: uppercase; letter-spacing: .01em;
  background: linear-gradient(180deg, #fff6c9, #ffd35a 45%, #f39a1e); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 0 #3a1404) drop-shadow(0 0 8px #000); }
.cs-h::after { content: ""; position: absolute; left: 4px; right: -60px; bottom: -2px; height: 5px; border-radius: 3px 40% 40% 3px; background: linear-gradient(90deg, #e2382a, #b81f1a 60%, transparent); transform: skewX(-20deg) rotate(-1deg); z-index: -1; filter: none; }
.cs-row { display: grid; gap: 10px; }
.cs-row.k-back { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
.cs-row.k-frame { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); }
.cs-row.k-board { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.cs-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 8px 9px; border-radius: 10px; cursor: pointer; text-align: center; overflow: hidden;
  background: linear-gradient(180deg, #1c1430, #0f0a1a); border: 1px solid #ffffff1f; transition: border-color .15s, box-shadow .15s, transform .15s; }
.cs-tile:hover { transform: translateY(-2px); border-color: #c9a24a88; }
.cs-tile:focus-visible { outline: 2px solid #f0b93a; outline-offset: 2px; }
.cs-tile.on { border-color: #7cc58a99; }
.cs-tile.sel { border-color: #ffd35a; box-shadow: 0 0 0 1px #ffd35a, 0 0 18px #f0b93a66, inset 0 0 22px #f0b93a1f; }
.cs-tile b { font-size: 14px; line-height: 1.15; color: #fff; }
.cs-prev { display: grid; place-items: center; }
.cs-tile .cos-back { width: 84px; }
.cs-tile .cos-frame { width: 104px; height: 92px; }
.cs-tile .cos-frame .portrait { width: 62px; height: 62px; }
.cs-rar { display: inline-block; padding: 1px 9px; border-radius: 999px; font: 800 10.5px/1.6 "Rubik", sans-serif; text-transform: uppercase; letter-spacing: .06em; border: 1px solid; background: #0a0712; }
.rr-c { color: #d8d2c4; border-color: #8d8676; } .rr-r { color: #8fc0ff; border-color: #3f79c9; box-shadow: 0 0 8px #3f79c955; }
.rr-e { color: #d6b2ff; border-color: #9a5ce6; box-shadow: 0 0 8px #9a5ce666; } .rr-l { color: #ffd38a; border-color: #f0a030; box-shadow: 0 0 8px #f0a03066; }
.cs-tile > .cs-rar { margin-top: -14px; position: relative; z-index: 1; }
.cs-price, .cs-state { font-size: 14px; min-height: 20px; display: inline-flex; align-items: center; }
.cs-state { color: var(--muted); font-weight: 700; } .cs-state.on { color: var(--ok); }
.cs-act { width: 100%; justify-content: center; min-height: 30px; }
.cs-tile .lv-lockline { font-size: 12px; }
.cs-new { position: absolute; top: 9px; right: -24px; transform: rotate(38deg); width: 92px; padding: 2px 0; background: linear-gradient(#ff4a3a, #c41a12); color: #fff; font: 900 9.5px/1.4 "Rubik", sans-serif; text-transform: uppercase; letter-spacing: .06em; box-shadow: 0 2px 6px #000a; z-index: 2; text-align: center; }
/* plateaux : tuile large */
.cs-tile.k-board { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: end; text-align: left; padding: 8px; gap: 8px 12px; }
.cs-tile.k-board .cs-prev { grid-column: 1 / -1; display: block; }
.cs-tile.k-board .cos-board { aspect-ratio: 16 / 6; border-radius: 7px; }
.cs-info { display: grid; gap: 4px; justify-items: start; min-width: 0; }
.cs-buy { display: flex; align-items: center; gap: 10px; }
.cs-buy .cs-act { width: auto; min-width: 96px; }
/* fiche détaillée à droite */
.cs-detail { position: sticky; top: 12px; margin-top: 14px; border-radius: 16px; padding: 14px; background: radial-gradient(ellipse at 50% 0%, #3d2a0a 0%, #120b1e 55%, #0a0712 100%); border: 2px solid #f0b93a;
  box-shadow: 0 0 0 1px #3a1f06, 0 0 26px #f0b93a44, 0 10px 30px #000c; display: grid; gap: 12px; }
.cs-close { display: none; }
.cs-big { display: grid; place-items: center; min-height: 250px; border-radius: 12px; background: radial-gradient(ellipse at center, #f0b93a26, transparent 70%); }
.cs-big.k-back .cos-back { width: min(200px, 70%); box-shadow: 0 0 30px #f0b93a55, 0 10px 26px #000c; border-radius: 10px; }
.cs-big.k-board { min-height: 0; padding: 4px 0; } .cs-big.k-board .cos-board { width: 100%; aspect-ratio: 4 / 3; }
.cs-big.k-frame .cos-frame { width: 230px; height: 230px; } .cs-big.k-frame .cos-frame .portrait { width: 136px; height: 136px; } .cs-big.k-frame .p-mono { font-size: 48px; }
.cs-dbody { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 10px; border-radius: 12px; background: #0a0712cc; border: 1px solid #c9a24a55; }
.cs-dbody h3 { margin: 0; font: 900 19px "Rubik", sans-serif; color: #fff; }
.cs-desc { margin: 2px 0; color: #e8dcc0; font-size: 14px; line-height: 1.4; }
.cs-dprice { padding: 6px 18px; border-radius: 999px; background: #ffffff0c; border: 1px solid #ffffff1a; font-size: 17px; }
.cs-dbody .cs-act { font-size: 17px; min-height: 44px; }
.cs-try { width: 100%; justify-content: center; }
.cs-gold { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; }
.cs-gold p { margin: 0 0 6px; }
.cs-gold .card-gold-demo .card { width: 120px; flex: none; }
@media (max-width: 900px) {
  .cs { grid-template-columns: 1fr; }
  .cs-detail { display: none; position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); top: auto; z-index: 40; margin: 0; max-height: 78vh; overflow-y: auto;
    grid-template-columns: 110px 1fr; align-items: center; gap: 10px; padding: 12px; }
  .cs-detail.open { display: grid; }
  .cs-close { display: grid; place-items: center; position: absolute; top: 6px; right: 8px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid #c9a24a88; background: #0a0712; color: #fff; font-size: 20px; cursor: pointer; z-index: 2; }
  .cs-big { min-height: 0; background: none; } .cs-big.k-back .cos-back { width: 100px; } .cs-big.k-frame .cos-frame { width: 110px; height: 110px; } .cs-big.k-frame .cos-frame .portrait { width: 66px; height: 66px; }
  .cs-big.k-board .cos-board { aspect-ratio: 1; }
  .cs-dbody { background: none; border: 0; padding: 0; justify-items: start; text-align: left; gap: 5px; }
  .cs-dbody h3 { font-size: 16px; padding-right: 30px; } .cs-desc { font-size: 13px; } .cs-dprice { font-size: 15px; padding: 3px 12px; }
  .cs-dbody .cs-act { min-height: 38px; font-size: 15px; }
  .cs-row.k-back { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); } .cs-tile .cos-back { width: 70px; }
  .cs-row.k-board { grid-template-columns: 1fr; }
}
@media (max-width: 480px) { .cs-gold { grid-template-columns: 1fr; } .cs-gold .card-gold-demo { justify-self: center; } }
/* aperçu en jeu */
.cp-inner.overlay-inner { max-width: 900px; background: #0b0714; border-color: #f0b93a; }
.cp-board { position: relative; width: 100%; aspect-ratio: 16 / 10; margin-top: 10px; border-radius: 12px; display: grid; grid-template-rows: auto 1fr auto; padding: 12px; overflow: hidden; box-shadow: inset 0 0 60px #000c; background-size: cover; background-position: center; }
.cp-side { display: flex; align-items: center; gap: 14px; }
.cp-side.bottom { justify-content: space-between; }
.cp-who { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: #0a0712cc; border: 1px solid #c9a24a66; }
.cp-who b { color: #fff; }
.cp-who .portrait { width: 56px; height: 56px; }
.cp-who .portrait img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.cp-mid { display: flex; justify-content: center; align-items: center; gap: 14px; }
.cp-unit { width: 13%; aspect-ratio: 640 / 896; border-radius: 8px; border: 2px dashed #ffffff33; background: #00000033; }
.cp-hand { position: relative; flex: 1; height: 110px; display: flex; justify-content: center; align-items: flex-end; }
.cp-back { position: absolute; bottom: 0; width: 70px; aspect-ratio: 640 / 896; border-radius: 6px; background: center / 100% 100%; box-shadow: 0 4px 12px #000c;
  transform: translateX(calc(var(--i) * 42px)) rotate(calc(var(--i) * 7deg)); transform-origin: 50% 120%; }
.cp-pile { position: relative; width: 70px; aspect-ratio: 640 / 896; border-radius: 6px; background: center / 100% 100%; box-shadow: 3px 3px 0 #1a1226, 6px 6px 0 #120b1e, 0 6px 14px #000c; }
.cp-pile i { position: absolute; bottom: -8px; right: -8px; padding: 1px 7px; border-radius: 999px; background: #0a0712; border: 1px solid #c9a24a; color: #fff; font: 700 12px "Rubik", sans-serif; }
@media (max-width: 640px) { .cp-board { aspect-ratio: 3 / 4; } .cp-back { width: 50px; transform: translateX(calc(var(--i) * 28px)) rotate(calc(var(--i) * 7deg)); } .cp-pile { width: 50px; } .cp-hand { height: 80px; } .cp-unit { width: 22%; } .cp-who .portrait { width: 44px; height: 44px; } }
.cs-row.k-back { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
.cs-tile .cos-board, .cs-big .cos-board { display: block; }
.cs-tile.k-board .cs-prev { width: 100%; }
.cs-tile:not(.k-board) .cs-act, .cs-tile:not(.k-board) .lv-lockline { margin-top: auto; }
.cs-tile.k-board .cos-board { aspect-ratio: 16 / 5; }

/* ---------- Écran Niveaux (maquette Enzo) ---------- */
.lv-chip { position: relative; }
.lv-dot { position: absolute; top: -7px; right: -7px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; display: grid; place-items: center; background: #e2382a; color: #fff; font: 900 11px "Rubik", sans-serif; box-shadow: 0 0 0 2px #1b1030, 0 0 10px #e2382a; animation: lvdot 1.6s ease-in-out infinite; }
@keyframes lvdot { 50% { transform: scale(1.15); } }
.lvx-ov { padding-top: 12px; }
.lvx.overlay-inner { position: relative; max-width: 760px; padding: 0 0 16px; background: #07050d; border: 1px solid #c9a24a; overflow: hidden; }
.lvx-head { position: relative; padding: 18px 20px 14px; background: linear-gradient(90deg, #07050df2 0%, #07050dcc 45%, #07050d33 100%), linear-gradient(0deg, #07050d 0%, transparent 40%), url(/img/fond.webp) right 30% / cover no-repeat; border-bottom: 1px solid #c9a24a55; }
.lvx-close { position: absolute; top: 12px; right: 12px; }
.lvx-title { margin: 0 !important; font: italic 900 clamp(40px, 8vw, 62px)/1 "Rubik", sans-serif !important; text-transform: uppercase; display: inline-block; transform: rotate(-3deg) skewX(-6deg); transform-origin: 0 100%;
  background: linear-gradient(180deg, #fff6c9 0%, #ffd35a 40%, #ff9a1e 75%, #c2540a 100%); -webkit-background-clip: text; background-clip: text; color: transparent !important; filter: drop-shadow(0 3px 0 #3a1404) drop-shadow(0 0 16px #ff9a1e66); padding: 4px 8px 6px 2px; }
.lvx-xp { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 13px; color: #e8dcc0; }
.lvx-bar { position: relative; width: min(320px, 60vw); height: 18px; border-radius: 999px; background: #000a; border: 1px solid #c9a24a88; overflow: hidden; }
.lvx-bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #c2540a, #ffd35a); border-radius: inherit; }
.lvx-bar b { position: relative; display: block; text-align: center; font: 800 11.5px/18px "Rubik", sans-serif; color: #fff; text-shadow: 0 1px 2px #000; }
.lvx-rules { margin: 8px 0 0; max-width: 520px; font-size: 12.5px; color: #cbbfa6; line-height: 1.45; }
.lvx-all { margin-top: 10px; }
.lvx-track { position: relative; list-style: none; margin: 0; padding: 14px 14px 0 12px; display: grid; gap: 8px; }
.lvx-track::before { content: ""; position: absolute; left: 34px; top: 30px; bottom: 30px; width: 4px; border-radius: 4px; background: linear-gradient(#f0b93a, #8a5a12 60%, #3a2a10); box-shadow: 0 0 8px #f0b93a66; }
.lvt { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 8px; align-items: center; }
.lvt-num { position: relative; z-index: 1; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(#2a1d3e, #0d0816); border: 3px solid #8a7a5a; box-shadow: 0 0 0 3px #07050d; }
.lvt-num b { font: 900 19px "Rubik", sans-serif; color: #fff; }
.lvt.got .lvt-num { border-color: #4fd17a; background: radial-gradient(#11351f, #07150c); box-shadow: 0 0 0 3px #07050d, 0 0 14px #4fd17a88; } .lvt.got .lvt-num b { color: #b8ffd0; }
.lvt-ck { position: absolute; right: -6px; bottom: -4px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: #4fd17a; color: #07150c; font: 900 11px/1 sans-serif; font-style: normal; }
.lvt.wait .lvt-num, .lvt.cur .lvt-num { border-color: #ffd35a; box-shadow: 0 0 0 3px #07050d, 0 0 18px #ffd35a; }
.lvt.locked .lvt-num { border-color: #5a5468; } .lvt.locked .lvt-num b { color: #cfc8db; }
.lvt-card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto 150px; gap: 12px; align-items: center; min-height: 74px; padding: 8px 10px 8px 14px; border-radius: 10px; overflow: hidden;
  background: linear-gradient(90deg, #07050df5 0%, #07050de0 38%, #07050d70 75%, #07050dd0 100%), var(--art) center 40% / cover no-repeat; border: 1px solid #c9a24a55; box-shadow: inset 0 0 20px #000a; }
.lvt.got .lvt-card { border-color: #4fd17a77; }
.lvt.wait .lvt-card { border: 2px solid #ffd35a; box-shadow: 0 0 18px #f0b93a66, inset 0 0 26px #f0b93a22; background: linear-gradient(90deg, #1d1203f2 0%, #1d1203d0 40%, #1d120355 75%, #1d1203cc 100%), var(--art) center 40% / cover no-repeat; }
.lvt.locked .lvt-card { filter: saturate(.75); }
.lvt.mystery .lvt-card { filter: grayscale(.8) brightness(.8); }
.lvt-what { display: grid; gap: 1px; min-width: 0; }
.lvt-what b { font: 800 15px "Rubik", sans-serif; color: #fff; text-shadow: 0 1px 3px #000; }
.lvt.wait .lvt-what b { color: #ffd35a; }
.lvt-what span { font-size: 12.5px; color: #f1e6c8; } .lvt-what span::before { content: "»"; color: #f0b93a; margin-right: 5px; font-weight: 900; }
.lvt-what small { margin-top: 3px; font-size: 12px; color: #ffcf6a; }
.lvt-gift { display: flex; align-items: center; gap: 12px; justify-content: flex-end; }
.lvr-packs { position: relative; display: flex; align-items: center; height: 58px; padding-right: 4px; }
.lvr-packs img, .lvr-packs > span { width: 38px; height: 56px; object-fit: cover; border-radius: 4px; margin-left: -12px; box-shadow: 0 3px 8px #000c; transform: rotate(calc((var(--i) - 1) * 6deg)); }
.lvr-packs img:first-child, .lvr-packs > span:first-child { margin-left: 0; }
.lvr-packs.q > span { display: grid; place-items: center; background: linear-gradient(#2b2440, #15101f); border: 1px solid #5a5468; color: #9a92ad; font: 900 20px "Rubik", sans-serif; }
.lvr-x { position: absolute; right: -6px; bottom: 0; padding: 0 5px; border-radius: 999px; background: #07050d; border: 1px solid #f0b93a; color: #ffd35a; font: 900 11px/1.5 "Rubik", sans-serif; }
.lvr-gold { display: flex; align-items: center; gap: 6px; }
.lvr-gold > span:last-child { display: grid; line-height: 1.1; } .lvr-gold b { font: 900 16px "Rubik", sans-serif; color: #fff; } .lvr-gold small { font-size: 11px; color: #ffcf6a; }
.lvr-coins { position: relative; width: 40px; height: 36px; } .lvr-coins img { position: absolute; width: 24px; height: 24px; filter: drop-shadow(0 2px 3px #000); }
.lvr-coins img:nth-child(1) { left: 0; bottom: 0; } .lvr-coins img:nth-child(2) { left: 14px; bottom: 2px; } .lvr-coins img:nth-child(3) { left: 7px; bottom: 13px; }
.lvr-coins.c1 img:nth-child(n+2) { display: none; } .lvr-coins.c2 img:nth-child(3) { display: none; }
.lvt-status { display: grid; }
.lvs { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 6px 10px; border-radius: 9px; font: 700 12px/1.25 "Rubik", sans-serif; text-align: left; }
.lvs.done { flex-direction: column; gap: 2px; text-align: center; color: #9cf5b8; background: #0b2a17cc; border: 1px solid #4fd17a99; } .lvs.done i { font: normal 900 20px/1 sans-serif; color: #4fd17a; }
.lvs.lock { color: #b9b2c8; background: #0d0a15d9; border: 1px solid #ffffff22; } .lvs.lock svg { width: 22px; height: 22px; fill: none; stroke: #b9b2c8; stroke-width: 1.8; flex: none; }
.lvs-claim { min-height: 46px; justify-content: center; font-size: 15px; box-shadow: 0 0 16px #f0b93a88; animation: lvdot 1.8s ease-in-out infinite; }
@media (max-width: 640px) {
  .lvx-track { padding: 12px 8px 0 6px; } .lvx-track::before { left: 23px; }
  .lvt { grid-template-columns: 36px minmax(0, 1fr); gap: 6px; } .lvt-num { width: 36px; height: 36px; border-width: 2px; } .lvt-num b { font-size: 15px; }
  .lvt-card { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "what gift" "st st"; gap: 6px 8px; padding: 8px; }
  .lvt-what { grid-area: what; } .lvt-gift { grid-area: gift; gap: 6px; } .lvt-status { grid-area: st; }
  .lvr-packs { height: 44px; } .lvr-packs img, .lvr-packs > span { width: 28px; height: 42px; margin-left: -10px; }
  .lvr-gold small { display: none; } .lvs { min-height: 34px; } .lvs.done { flex-direction: row; } .lvs.lock span br { display: none; } .lvs-claim { min-height: 38px; }
}
.lvx .lvt, .lvx .lvx-track li { max-width: none; }
@media (min-width: 641px) { .lvt-card { grid-template-columns: minmax(0, 1fr) auto 160px; } }
@media (max-width: 640px) { .lvx-xp { flex-wrap: wrap; } .lvx-head { padding: 14px 12px 12px; } .lvx-rules { font-size: 12px; } .lvt-gift { align-self: start; } .lvt-what small { display: none; } }
.lvt-what b { line-height: 1.15; }
.lvx-close { background: #07050dcc; }

/* ---------- Pop-up de montée de niveau ---------- */
.lvu-ov { display: grid; place-items: center; background: radial-gradient(ellipse at center, #3a2306cc 0%, #050309ee 70%); }
.lvu.overlay-inner { position: relative; width: min(460px, 100%); padding: 22px 20px 16px; text-align: center; overflow: hidden; display: grid; justify-items: center; gap: 10px;
  background: linear-gradient(180deg, #07050d66 0%, #07050de6 38%, #07050d 70%), var(--art) center top / cover no-repeat; border: 2px solid #ffd35a; border-radius: 18px;
  box-shadow: 0 0 0 1px #3a1f06, 0 0 40px #f0b93a66, 0 20px 50px #000; animation: lvu-in .5s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes lvu-in { from { transform: scale(.6) translateY(30px); opacity: 0; } }
.lvu-rays { position: absolute; left: 50%; top: 104px; width: 0; height: 0; pointer-events: none; animation: lvu-spin 18s linear infinite; }
.lvu-rays i { position: absolute; left: -14px; bottom: 0; width: 28px; height: 260px; transform-origin: 50% 100%; transform: rotate(var(--a)); background: linear-gradient(0deg, #ffd35a55, transparent); clip-path: polygon(40% 100%, 60% 100%, 100% 0, 0 0); }
@keyframes lvu-spin { to { transform: rotate(360deg); } }
.lvu-kick { position: relative; margin: 0; font: 800 12px "Rubik", sans-serif; letter-spacing: .24em; text-transform: uppercase; color: #ffe7a8; text-shadow: 0 1px 3px #000; }
.lvu-medal { position: relative; width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #fff3c4, #f0b93a 45%, #9a5a0e 100%);
  border: 4px solid #fff0b8; box-shadow: 0 0 0 4px #3a1f06, 0 0 30px #ffd35a, inset 0 -6px 12px #7a420688; animation: lvu-pop .7s .25s cubic-bezier(.2, 1.6, .4, 1) both; }
.lvu-medal b { font: 900 46px/1 "Rubik", sans-serif; color: #3a1f06; text-shadow: 0 2px 0 #fff4c7; }
@keyframes lvu-pop { from { transform: scale(0) rotate(-40deg); } }
.lvu-title { position: relative; margin: 0 !important; font: italic 900 clamp(36px, 9vw, 52px)/1 "Rubik", sans-serif !important; text-transform: uppercase; transform: rotate(-3deg) skewX(-6deg); padding: 2px 8px 6px;
  background: linear-gradient(180deg, #fff6c9 0%, #ffd35a 40%, #ff9a1e 75%, #c2540a 100%); -webkit-background-clip: text; background-clip: text; color: transparent !important; filter: drop-shadow(0 3px 0 #3a1404) drop-shadow(0 0 16px #ff9a1e88); }
.lvu-box { position: relative; width: 100%; padding: 10px 14px 12px; border-radius: 12px; background: #07050dd9; border: 1px solid #c9a24a77; text-align: left; }
.lvu-box h3 { margin: 0 0 6px !important; font: 900 13px "Rubik", sans-serif !important; letter-spacing: .14em; text-transform: uppercase; color: #ffd35a !important; }
.lvu-box ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.lvu-box li { max-width: none; font-weight: 700; color: #fff; } .lvu-box li::before { content: "»"; color: #f0b93a; font-weight: 900; margin-right: 7px; }
.lvu-box.gift { border: 2px solid #ffd35a; box-shadow: 0 0 18px #f0b93a44, inset 0 0 24px #f0b93a1a; text-align: center; }
.lvu-gift { display: flex; justify-content: center; align-items: center; gap: 16px; }
.lvu-gift .lvr-packs { height: 70px; } .lvu-gift .lvr-packs img { width: 46px; height: 68px; }
.lvu-box.gift p { margin: 6px 0 0; max-width: none; font-weight: 800; color: #ffcf6a; }
.lvu-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 4px; }
.lvu-btns .btn { min-width: 140px; justify-content: center; }
.lvu-see { all: unset; cursor: pointer; font-size: 13px; color: #cbbfa6; } .lvu-see:hover, .lvu-see:focus-visible { color: #ffd35a; text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { .lvu.overlay-inner, .lvu-medal, .lvu-rays, .lvs-claim, .lv-dot { animation: none; } }

/* ---------- Contre un bot ---------- */
.btn.pl-btn.pl-bot { background: linear-gradient(180deg, #f6d77a, #c9952e); color: #1e160c; border-color: #ffe9a8; box-shadow: 0 0 16px #ffcf4a66, inset 0 1px 0 #fff8; }
.btn.pl-btn.pl-bot:hover { filter: brightness(1.08); }
.bot-ov { display: grid; place-items: center; }
.bot-panel.overlay-inner { width: min(560px, 100%); display: grid; gap: 12px; padding: 18px 18px 18px; border: 2px solid #f0b93a; border-radius: 16px;
  background: linear-gradient(180deg, #07050dcc, #07050d 55%), url(/img/fond.webp) center top / cover no-repeat; box-shadow: 0 0 30px #f0b93a44, 0 20px 50px #000; }
.bot-title { font-size: clamp(30px, 7vw, 42px) !important; }
.bot-panel > .note { margin: 0; }
.bot-sec h3 { margin: 0 0 6px !important; font: 900 13px "Rubik", sans-serif !important; letter-spacing: .14em; text-transform: uppercase; color: #ffd35a !important; }
.bot-mine { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; background: #07050dd9; border: 1px solid #c9a24a66; }
.bot-mine b { color: #fff; } .bot-mine span { color: var(--muted); font-size: 13px; flex: 1 1 auto; } .bot-mine .btn { margin-left: auto; }
.bot-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.bot-opt { all: unset; cursor: pointer; display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; background: #07050dd9; border: 1px solid #ffffff22; transition: border-color .15s, box-shadow .15s; }
.bot-opt b { color: #fff; font: 800 14px "Rubik", sans-serif; } .bot-opt small { color: var(--muted); font-size: 12px; line-height: 1.3; }
.bot-opt:hover { border-color: #c9a24a99; } .bot-opt:focus-visible { outline: 2px solid #f0b93a; outline-offset: 2px; }
.bot-opt.on { border: 2px solid #ffd35a; box-shadow: 0 0 14px #f0b93a55, inset 0 0 18px #f0b93a1a; padding: 9px 11px; } .bot-opt.on b { color: #ffd35a; }
.bot-go { justify-self: stretch; justify-content: center; min-height: 48px; font-size: 17px; }

/* ---------- Jouer : choix du mode ---------- */
.pm-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-top: 10px; }
.pm-tile { all: unset; box-sizing: border-box; cursor: pointer; position: relative; grid-column: span 2; min-height: 190px; display: flex; align-items: flex-end; gap: 12px; padding: 18px; border-radius: 16px; overflow: hidden;
  background: linear-gradient(180deg, #07050d10 0%, #07050d99 45%, #07050df2 100%), var(--art) center / cover no-repeat; border: 2px solid #c9a24a99;
  box-shadow: 0 10px 26px #000b, inset 0 0 40px #0008; transition: transform .18s, border-color .18s, box-shadow .18s; }
.pm-tile.big { grid-column: span 3; min-height: 250px; }
.pm-tile:hover, .pm-tile:focus-visible { transform: translateY(-3px); border-color: #ffd35a; box-shadow: 0 0 24px #f0b93a66, 0 14px 30px #000c, inset 0 0 40px #0006; }
.pm-tile:focus-visible { outline: 2px solid #ffd35a; outline-offset: 3px; }
.pm-tile.online { border-color: #ffd35a; box-shadow: 0 0 22px #f0b93a55, 0 10px 26px #000b; }
.pm-ico { flex: none; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: #07050dcc; border: 1px solid #c9a24a99; color: #ffd35a; }
.pm-ico svg { width: 28px; height: 28px; }
.pm-txt { flex: 1; min-width: 0; display: grid; gap: 4px; }
.pm-txt b { font: italic 900 clamp(22px, 2.6vw, 32px)/1 "Rubik", sans-serif; text-transform: uppercase; letter-spacing: .01em;
  background: linear-gradient(180deg, #fff6c9, #ffd35a 45%, #f39a1e); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 0 #3a1404) drop-shadow(0 0 10px #000); }
.pm-tile:not(.big) .pm-txt b { font-size: clamp(19px, 2vw, 24px); }
.pm-txt small { color: #f1e6c8; font-size: 14px; line-height: 1.35; text-shadow: 0 1px 3px #000; }
.pm-go { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, #f6d77a, #c9952e); color: #1e160c; font: 900 26px/1 "Rubik", sans-serif; box-shadow: 0 0 12px #f0b93a88; }
.pm-badge { position: absolute; top: 14px; right: 14px; padding: 4px 10px; border-radius: 999px; background: #e2382a; color: #fff; font: 800 12px "Rubik", sans-serif; box-shadow: 0 0 12px #e2382a99; }
.pm-tile.tuto .pm-badge { background: #2f9e5a; box-shadow: 0 0 12px #2f9e5a99; }
.pm-tile.locked { filter: grayscale(.7) brightness(.75); }
.pm-lock { flex: none; padding: 6px 10px; border-radius: 999px; background: #07050de6; border: 1px solid #ffffff33; color: #e8dcc0; font: 800 12px "Rubik", sans-serif; }
.pm-back { margin: 4px 0 -2px; justify-self: start; align-self: start; width: auto; }
.pm-more { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 2px 0; color: #e8dcc0; }
.pm-more b { color: #ffd35a; } .pm-more > span { margin-right: auto; }
@media (max-width: 900px) { .pm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pm-tile, .pm-tile.big { grid-column: span 1; min-height: 170px; } .pm-tile.big { grid-column: span 2; } }
@media (max-width: 560px) { .pm-grid { grid-template-columns: 1fr; gap: 10px; } .pm-tile, .pm-tile.big { grid-column: auto; min-height: 130px; padding: 14px; } .pm-txt small { font-size: 13px; } .pm-ico { width: 42px; height: 42px; } }
@media (prefers-reduced-motion: reduce) { .pm-tile { transition: none; } }
