/* Joute — un tapis de feutre vert sur la table en bois, lumière de lampe, laiton pour les boutons */
body[data-theme="joute"] {
  --bg: #1b120b;
  --bg-glow: #3a2716;
  --surface: #2b1e14;
  --fg: #f4ece0;
  --muted: #b9a998;
  --line: rgba(244, 236, 224, .15);
  --glass: rgba(244, 236, 224, .06);
  --accent: #e9b949;
  --accent-ink: #2a1d00;
  --hot: #d6533f;
  --hot-ink: #ffffff;
  --paper: #f8efdc;
  --ink: #23180f;
  --felt: #1e5a47;
  --felt-hi: #2c7a60;
  --felt-lo: #12392d;
  --brass: #e2b44f;
  --f-display: "Lilita One", "Arial Rounded MT Bold", system-ui, sans-serif;
  background:
    repeating-linear-gradient(92deg, rgba(0, 0, 0, .14) 0 2px, transparent 2px 9px, rgba(255, 255, 255, .03) 9px 11px, transparent 11px 23px),
    radial-gradient(120% 70% at 50% 0%, #4a301c, #1b120b 70%);
}
body[data-theme="joute"] .tb-bar { background: rgba(20, 13, 8, .85); border-bottom-color: rgba(226, 180, 79, .22); }
body[data-theme="joute"] .tb-title { color: var(--brass); }

.tile-joute { position: relative; overflow: hidden; color: #f4ece0;
  background: radial-gradient(120% 90% at 30% 0%, #2c7a60, #12392d 75%); border-color: rgba(226, 180, 79, .3); }
.tile-joute::after { content: ""; position: absolute; inset: 7px; border: 1.5px dashed rgba(255, 255, 255, .16); border-radius: 13px; pointer-events: none; }
.tile-joute h2 { color: #f2c46d; }
.tile-joute .btn.primary { background: #e2b44f; color: #2a1d00; }

/* ---------- La table ---------- */
.jt {
  --mw: clamp(50px, calc((100vw - 56px) / 6.4), 100px);
  --hs: 70px;
  flex: 1; min-height: 0; position: relative; overflow: hidden;
  display: grid; gap: 0;
  grid-template-columns: minmax(0, 1fr) 260px;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  grid-template-areas: "op log" "arena log" "me log" "hand hand";
  padding: 10px 12px 0;
}
.jt-side.op { grid-area: op; }
.jt-arena { grid-area: arena; }
.jt-side.me { grid-area: me; }
.jt-hand { grid-area: hand; }
.jt-log { grid-area: log; }

/* Le tapis : du héros adverse à ton héros */
.jt-side, .jt-arena { background: radial-gradient(90% 120% at 50% 50%, var(--felt-hi), var(--felt) 55%, var(--felt-lo)); }
.jt-side.op { border-radius: 26px 26px 0 0; }
.jt-side.me { border-radius: 0 0 26px 26px; }
.jt-side, .jt-arena { box-shadow: inset 12px 0 18px -14px rgba(0, 0, 0, .7), inset -12px 0 18px -14px rgba(0, 0, 0, .7); }
.jt-side.op { box-shadow: inset 0 14px 20px -14px rgba(0, 0, 0, .7), inset 12px 0 18px -14px rgba(0, 0, 0, .7), inset -12px 0 18px -14px rgba(0, 0, 0, .7); }
.jt-side.me { box-shadow: inset 0 -14px 20px -14px rgba(0, 0, 0, .7), inset 12px 0 18px -14px rgba(0, 0, 0, .7), inset -12px 0 18px -14px rgba(0, 0, 0, .7); }

.jt-side { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px 16px; position: relative; }
.jt-side::after { content: ""; position: absolute; left: 8px; right: 8px; border-top: 1.5px dashed rgba(255, 255, 255, .14); }
.jt-side.op::after { top: 6px; border-radius: 20px 20px 0 0; height: 100%; border-left: 1.5px dashed rgba(255, 255, 255, .14); border-right: 1.5px dashed rgba(255, 255, 255, .14); pointer-events: none; }
.jt-side.me::after { bottom: 6px; height: 100%; border-top: 0; border-bottom: 1.5px dashed rgba(255, 255, 255, .14); border-left: 1.5px dashed rgba(255, 255, 255, .14); border-right: 1.5px dashed rgba(255, 255, 255, .14); border-radius: 0 0 20px 20px; pointer-events: none; }
.jt-l { justify-self: start; display: flex; align-items: center; gap: 10px; min-width: 0; }
.jt-r { justify-self: end; display: flex; align-items: center; gap: 12px; min-width: 0; }
.jt-arena { display: flex; flex-direction: column; min-height: 0; padding: 0 16px; position: relative; }
.jt-arena::before { content: ""; position: absolute; left: 8px; right: 8px; top: 0; bottom: 0; border-left: 1.5px dashed rgba(255, 255, 255, .14); border-right: 1.5px dashed rgba(255, 255, 255, .14); pointer-events: none; }

/* Rangées de créatures */
.jt-lane { flex: 1; min-height: calc(var(--mw) * 1.3 + 16px); display: flex; align-items: center; justify-content: center; gap: clamp(4px, 1vw, 12px); padding: 8px 0; border-radius: 18px; transition: background .2s; }
.jt-lane.op { align-items: flex-end; }
.jt-lane.me { align-items: flex-start; }
.jt-lane.drop { background: rgba(255, 236, 170, .07); box-shadow: inset 0 0 0 2px rgba(255, 220, 130, .35); cursor: copy; }
.jt-empty { color: rgba(255, 255, 255, .28); font: 400 15px/1 var(--f-display); letter-spacing: .02em; }

.jt-mid { flex: none; display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 52px; position: relative; padding: 4px 120px 4px 8px; text-align: center; }
.jt-mid::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px dotted rgba(226, 180, 79, .35); z-index: 0; }
.jt-msg { position: relative; z-index: 1; font: 400 17px/1.15 var(--f-display); color: #fff6dd; background: rgba(13, 38, 30, .85); padding: 7px 14px; border-radius: 999px; box-shadow: 0 0 0 1.5px rgba(226, 180, 79, .35); }
.jt-msg:empty { display: none; }
.jt.my-turn .jt-msg { background: #e2b44f; color: #2a1d00; box-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
.jt-last { display: none; }
.jt-end {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%); z-index: 2;
  min-width: 104px; padding: 10px 16px; border-radius: 999px; border: 2px solid #6b4a12; cursor: pointer;
  background: linear-gradient(180deg, #f6d27a, #d29a2a); color: #2a1d00; font: 400 16px/1 var(--f-display);
  box-shadow: 0 4px 0 #7a5413, 0 6px 14px rgba(0, 0, 0, .45); display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.jt-end:active:not(:disabled) { transform: translateY(calc(-50% + 3px)); box-shadow: 0 1px 0 #7a5413, 0 3px 8px rgba(0, 0, 0, .45); }
.jt-end:disabled { background: linear-gradient(180deg, #5b6b62, #3b4842); color: #c9d4cd; border-color: #26302b; box-shadow: 0 4px 0 #1d2521; cursor: default; }
.jt-end.pulse { animation: jt-pulse 1.4s ease-in-out infinite; }
.jt-end small { font: 800 12px/1 var(--f-body); font-variant-numeric: tabular-nums; opacity: .8; }
.jt-end small.hurry { color: #b3261e; opacity: 1; }
.jt-end:disabled small.hurry { color: #ffb4a8; }
@keyframes jt-pulse { 50% { box-shadow: 0 4px 0 #7a5413, 0 6px 14px rgba(0, 0, 0, .45), 0 0 0 7px rgba(242, 196, 109, .3); } }

/* ---------- Créatures posées ---------- */
.jm {
  --metal: #a39a8a;
  position: relative; isolation: isolate; flex: none;
  width: var(--mw); aspect-ratio: 4 / 5; font-size: calc(var(--mw) / 10);
  border: 0; padding: 0; margin: 0; background: none; color: inherit; cursor: pointer;
  transition: transform .15s ease-out;
}
.jm.r-rare { --metal: #7ea9da; }
.jm.r-epique { --metal: #b18be0; }
.jm.r-legendaire { --metal: #f0c04f; }
.jm-art {
  position: absolute; inset: 0 0 .5em 0; overflow: hidden;
  border-radius: 48% 48% 1.4em 1.4em / 36% 36% 1.4em 1.4em;
  border: .32em solid var(--metal); background: #111;
  box-shadow: 0 .45em .8em rgba(0, 0, 0, .55), inset 0 0 0 .12em rgba(0, 0, 0, .4);
  transition: box-shadow .2s;
}
.jm-art .ta-wrap { inset: 0; }
.jm.r-legendaire .jm-art { border-color: #f0c04f; box-shadow: 0 .45em .8em rgba(0, 0, 0, .55), 0 0 .9em rgba(255, 180, 60, .55); }
.jm .tc-atk { left: -.5em; bottom: -.35em; width: 3.4em; height: 3.7em; }
.jm .tc-hp { right: -.5em; bottom: -.35em; width: 3.5em; height: 3.5em; }
.jm .tc-atk b, .jm .tc-hp b { font-size: 1.95em; }
.jm .up b { color: #8cff9a; }
.jm .down b { color: #ff8f84; }
.jm-fx { position: absolute; left: 50%; bottom: .15em; transform: translateX(-50%); z-index: 2; display: flex; gap: .15em; padding: .2em .4em; border-radius: 1em; background: rgba(20, 14, 10, .88); color: #f4ece0; box-shadow: 0 0 0 .1em var(--metal); }
.tk-ico { width: 1.25em; height: 1.25em; display: block; }
/* Provocation : un écu de pierre derrière la créature */
.jm-taunt { position: absolute; inset: -.6em -.55em -.1em; z-index: -1;
  background: linear-gradient(180deg, #b9b2a5, #77706a); clip-path: polygon(50% 0, 100% 10%, 100% 64%, 50% 100%, 0 64%, 0 10%);
  filter: drop-shadow(0 .2em .3em rgba(0, 0, 0, .5)); }
.jm-taunt::after { content: ""; position: absolute; inset: .25em; background: linear-gradient(180deg, #8f887d, #5a544e); clip-path: inherit; }
/* Bouclier : une bulle dorée */
.jm.shield .jm-art { box-shadow: 0 .45em .8em rgba(0, 0, 0, .55), 0 0 0 .22em #ffd86b, 0 0 1.1em .2em rgba(255, 216, 107, .8); }
.jm.shield .jm-art::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(circle at 35% 25%, rgba(255, 255, 255, .45), transparent 30%), radial-gradient(circle, transparent 55%, rgba(255, 214, 90, .5) 100%); pointer-events: none; animation: jm-shield 2.4s ease-in-out infinite; }
@keyframes jm-shield { 50% { opacity: .65; } }
.jm.ready .jm-art { box-shadow: 0 .45em .8em rgba(0, 0, 0, .55), 0 0 0 .24em #6fe39a, 0 0 1.2em rgba(111, 227, 154, .75); }
.jm.ready { cursor: pointer; }
.jm.ready:hover { transform: translateY(-.3em); }
.jm.sel { transform: translateY(-.9em) scale(1.07); z-index: 3; }
.jm.sel .jm-art { box-shadow: 0 1em 1.4em rgba(0, 0, 0, .6), 0 0 0 .3em #ffd86b, 0 0 1.6em #ffd86b; }
.jm.target { cursor: crosshair; }
.jm.target .jm-art { animation: jm-target 1s ease-in-out infinite; }
@keyframes jm-target { 0%, 100% { box-shadow: 0 .45em .8em rgba(0, 0, 0, .55), 0 0 0 .24em #ff6b5a, 0 0 .6em rgba(255, 107, 90, .6); } 50% { box-shadow: 0 .45em .8em rgba(0, 0, 0, .55), 0 0 0 .34em #ff6b5a, 0 0 1.5em rgba(255, 107, 90, .9); } }
.jm.sleep .jm-art > .ta-wrap { filter: saturate(.75) brightness(.85); }
.jm-zz { position: absolute; right: -.2em; top: -.3em; z-index: 3; font: 400 1.6em/1 var(--f-display); color: #fff; text-shadow: 0 .08em 0 #12392d, 0 0 .3em #000; animation: jm-zz 2s ease-in-out infinite; }
.jm-zz i { font-style: normal; font-size: .7em; vertical-align: super; }
@keyframes jm-zz { 50% { transform: translateY(-.25em); opacity: .7; } }
.jm.hit .jm-art::before { content: ""; position: absolute; inset: 0; z-index: 3; background: rgba(255, 60, 40, .55); animation: jm-hit .45s ease-out forwards; }
@keyframes jm-hit { to { opacity: 0; } }
.jm.dying .jm-art { border-color: #555; }

/* ---------- Héros ---------- */
.jt-hero-wrap { display: flex; justify-content: center; }
.jh { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; border: 0; padding: 0; background: none; color: inherit; font-size: calc(var(--hs) / 7); cursor: default; }
.jh-face { width: var(--hs); height: var(--hs); border-radius: 50%; display: grid; place-items: center; position: relative;
  background: radial-gradient(circle at 35% 30%, #63c7b0, #1f7a6a 60%, #0e3f37); border: .45em solid #c79a3c;
  box-shadow: 0 0 0 .14em #4a3410, 0 .5em .9em rgba(0, 0, 0, .55), inset 0 .3em .5em rgba(255, 255, 255, .2); transition: box-shadow .2s; }
.jh.op .jh-face { background: radial-gradient(circle at 35% 30%, #f08a74, #b8402f 60%, #5e1a12); }
.jh-face span { font: 400 2.7em/1 "Bagel Fat One", system-ui, sans-serif; color: #fff8ec; text-shadow: 0 .06em 0 rgba(0, 0, 0, .45); }
.jh .tc-hp { right: -.9em; bottom: 1.1em; width: 3.4em; height: 3.4em; }
.jh .tc-hp b { font-size: 1.9em; }
.jh .tc-hp.down b { color: #ffb0a6; }
.jh-nm { font: 800 13px/1.1 var(--f-body); color: #f4ece0; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: rgba(13, 38, 30, .7); padding: 2px 8px; border-radius: 999px; }
.jh.cur .jh-face { box-shadow: 0 0 0 .14em #4a3410, 0 0 0 .5em rgba(242, 196, 109, .35), 0 .5em .9em rgba(0, 0, 0, .55); }
.jh.target { cursor: crosshair; }
.jh.target .jh-face { animation: jh-target 1s ease-in-out infinite; }
@keyframes jh-target { 50% { box-shadow: 0 0 0 .14em #4a3410, 0 0 0 .6em rgba(255, 107, 90, .7), 0 0 1.6em rgba(255, 107, 90, .8); } }
.jh.hit .jh-face { animation: jm-hit .45s; }

/* Jetons, pioche, main adverse */
.jt-mana { display: flex; align-items: center; gap: 8px; }
.jt-mana b { font: 400 22px/1 "Bagel Fat One", system-ui, sans-serif; color: #fff; text-shadow: 0 2px 0 #0f2650; font-variant-numeric: tabular-nums; }
.jt-mana b small { font-size: 14px; opacity: .75; }
.jt-chips { display: grid; grid-template-columns: repeat(5, 14px); gap: 3px; }
.jt-chips i { width: 14px; height: 14px; border-radius: 50%; background: rgba(0, 0, 0, .25); box-shadow: inset 0 0 0 1.5px rgba(126, 169, 218, .5); }
.jt-chips i.on { background: radial-gradient(circle, #3a7fe0 0 45%, transparent 46%), repeating-conic-gradient(#f4efe4 0 20deg, #2563bd 20deg 60deg); box-shadow: 0 0 0 1.5px #0f2650, 0 0 6px rgba(80, 150, 255, .6); }
.jt-deck { display: flex; align-items: center; gap: 6px; }
.jt-deck .tc-back.mini { --cw: 30px; border-width: 2px; }
.jt-deck .tc-back.mini .tcb-in { inset: 3px; border-width: 1px; }
.jt-deck b { font: 400 18px/1 "Bagel Fat One", system-ui, sans-serif; color: #f4ece0; }
.jt-ohand { display: flex; align-items: flex-start; padding-left: 14px; min-height: 40px; }
.jt-ob { margin-left: -12px; transform: rotate(calc(var(--i, 0) * 5deg)) translateY(calc(var(--i, 0) * var(--i, 0) * 1px)); transform-origin: 50% 120%; }
.jt-ob .tc-back.tiny { --cw: 30px; border-width: 2px; }
.jt-ob .tc-back.tiny .tcb-in { inset: 3px; border-width: 1px; }

/* ---------- Ta main ---------- */
.jt-hand { --cw: 122px; display: flex; justify-content: center; align-items: flex-end; padding: 10px 12px 10px; min-height: calc(var(--cw) * 1.4 * .82); position: relative; z-index: 4; }
.jt-hand.spect { --cw: 40px; min-height: 0; padding: 8px; }
.jt-card { --cw: inherit; position: relative; flex: none; margin: 0 calc(var(--cw) * -.1); padding: 0; border: 0; background: none; color: inherit; cursor: pointer;
  transform: translateY(calc(var(--i) * var(--i) * 1.6px)) rotate(calc(var(--i) * 2.2deg)); transform-origin: 50% 120%;
  transition: transform .18s ease-out, filter .18s; margin-bottom: calc(var(--cw) * -.3); }
.jt-hand.tight .jt-card { margin: 0 calc(var(--cw) * -.24); margin-bottom: calc(var(--cw) * -.3); }
.jt-card .tc { --cw: inherit; }
.jt-card:not(.can) .tc { filter: brightness(.72) saturate(.7); }
.jt.my-turn .jt-card.can .tc { filter: drop-shadow(0 0 2px #6fe39a) drop-shadow(0 0 8px rgba(111, 227, 154, .8)); }
.jt-card:hover, .jt-card:focus-visible { z-index: 5; transform: translateY(-26%) scale(1.22); }
.jt-card.sel { z-index: 6; transform: translateY(-34%) scale(1.3); }
.jt-card.sel .tc { filter: drop-shadow(0 0 3px #ffd86b) drop-shadow(0 0 12px rgba(255, 216, 107, .9)); }

/* ---------- Chronique ---------- */
.jt-log { margin: 0 0 0 12px; padding: 12px 14px; border-radius: 18px; background: rgba(20, 13, 8, .7); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow: hidden; }
.jt-log h3 { font: 400 18px/1 var(--f-display); color: var(--brass); }
.jt-log ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; overflow-y: auto; min-height: 0; flex: 1; font-size: 13px; color: var(--muted); }
.jt-log li:first-child { color: var(--fg); }
.jt-log li b { color: var(--fg); }
.jt-concede { align-self: flex-start; }

/* ---------- Fenêtres et effets ---------- */
.jt-peek { position: fixed; inset: 0; z-index: 35; display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center; background: rgba(8, 5, 3, .72); cursor: pointer; animation: jt-fade .18s ease-out; }
.jt-peek .tc { --cw: min(260px, 66vw); animation: jt-zoom .22s ease-out; }
@keyframes jt-fade { from { opacity: 0; } }
@keyframes jt-zoom { from { transform: scale(.85); } }
.jt-tip { position: fixed; z-index: 45; pointer-events: none; }
.jt-tip .tc { --cw: 190px; }
#jt-fx { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.jt-ghost { position: fixed; pointer-events: none; }
.jt-ghost > .jm { width: 100%; height: 100%; }
.jt-float { position: fixed; transform: translate(-50%, -50%); z-index: 41; pointer-events: none; animation: jt-float 1.1s cubic-bezier(.2, .7, .3, 1) forwards; }
.jt-float span { display: block; font: 400 30px/1 "Bagel Fat One", system-ui, sans-serif; color: #fff; -webkit-text-stroke: 2px #6a0f08; paint-order: stroke fill; text-shadow: 0 3px 8px rgba(0, 0, 0, .5); white-space: nowrap; }
.jt-float.dmg span { color: #ff4d3a; -webkit-text-stroke-color: #fff; }
.jt-float.dmg::before { content: ""; position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; transform: translate(-50%, -50%); z-index: -1; background: radial-gradient(circle, rgba(255, 180, 80, .9), rgba(255, 80, 40, .6) 40%, transparent 70%); clip-path: polygon(50% 0, 61% 32%, 96% 22%, 72% 50%, 98% 76%, 62% 68%, 50% 100%, 38% 68%, 4% 78%, 28% 50%, 4% 22%, 39% 32%); }
.jt-float.heal span { color: #7dff9a; -webkit-text-stroke-color: #0d4a23; }
.jt-float.buff span { color: #ffd86b; -webkit-text-stroke-color: #5a3d00; font-size: 24px; }
.jt-float.shield span, .jt-float.lucky span, .jt-float.burn span { font: 400 20px/1 var(--f-display); color: #fff3c4; -webkit-text-stroke: 0; background: rgba(42, 29, 0, .85); padding: 5px 10px; border-radius: 999px; }
.jt-float.burn span { background: rgba(120, 30, 10, .9); }
.jt-float.kill span { color: #1a1a1a; -webkit-text-stroke-color: #ff6b5a; font-size: 44px; }
@keyframes jt-float { 0% { transform: translate(-50%, -30%) scale(.4); opacity: 0; } 15% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; } 30% { transform: translate(-50%, -50%) scale(1); } 100% { transform: translate(-50%, -140%) scale(1); opacity: 0; } }
.jt-show { position: fixed; left: 3vw; top: 50%; transform: translateY(-50%); z-index: 42; animation: jt-show .4s cubic-bezier(.2, .8, .3, 1.1); transition: opacity .35s, transform .35s; }
.jt-show .tc { --cw: clamp(116px, 16vw, 190px); }
.jt-show.out { opacity: 0; transform: translateY(-50%) translateX(-30px); }
@keyframes jt-show { from { opacity: 0; transform: translateY(-50%) translateX(-60px) rotate(-6deg); } }
.jt-banner { position: fixed; left: 50%; top: 46%; transform: translate(-50%, -50%); z-index: 42; animation: jt-banner 1.5s ease-in-out forwards; }
.jt-banner span { display: block; font: 400 clamp(30px, 7vw, 54px)/1 var(--f-display); color: #2a1d00; background: linear-gradient(180deg, #f6d27a, #d29a2a); padding: 14px 34px; border-radius: 999px; box-shadow: 0 6px 0 #7a5413, 0 14px 40px rgba(0, 0, 0, .5); white-space: nowrap; }
@keyframes jt-banner { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.6); } 18% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); } 28% { transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -60%); } }
.jt-dust { position: fixed; width: 9px; height: 9px; border-radius: 50%; background: rgba(240, 230, 210, .7); }
.jt-shard { position: fixed; width: 9px; height: 6px; background: #d9cfbf; clip-path: polygon(0 0, 100% 30%, 60% 100%); }
.jt-conf { position: fixed; top: 0; width: 9px; height: 14px; border-radius: 2px; }

.jt-over { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(8, 5, 3, .55); }
.jt-over.in { animation: jt-fade .5s ease-out 1.1s both; }
.jt-over-card { background: var(--surface); border: 2px solid var(--brass); border-radius: 22px; padding: 26px 30px; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; max-width: min(420px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.jt-over.in .jt-over-card { animation: jt-zoom .45s cubic-bezier(.2, .8, .3, 1.2) 1.1s both; }
.jt-over-card h2 { font: 400 44px/1 var(--f-display); color: var(--brass); }
.jt-over.won .jt-over-card h2 { color: #ffd86b; text-shadow: 0 0 24px rgba(255, 216, 107, .5); }
.jt-over-card .actions { justify-content: center; }

/* ---------- Écrans moyens : la chronique passe sous la table ---------- */
@media (max-width: 1000px) {
  .jt { grid-template-columns: minmax(0, 1fr); grid-template-areas: "op" "arena" "me" "hand"; }
  .jt-log { display: none; }
  .jt-last { display: block; position: relative; z-index: 1; font-size: 12px; color: #d8e6df; max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: rgba(13, 38, 30, .7); padding: 3px 9px; border-radius: 999px; }
  .jt.my-turn .jt-last, .jt.selecting .jt-last { display: none; }
}
/* Écrans peu hauts (ordinateur portable) */
@media (max-height: 760px) and (min-width: 701px) {
  .jt { --mw: clamp(50px, calc((100vw - 56px) / 6.4), 84px); --hs: 58px; }
  .jt-hand { --cw: 104px; }
}
/* Téléphone */
@media (max-width: 700px) {
  .jt { --hs: 50px; --mw: clamp(46px, calc((100vw - 40px) / max(var(--n, 6), 4) - 10px), 84px); padding: 6px 6px 0; }
  .jt-side { padding: 6px 12px; gap: 6px; }
  .jt-side.op { border-radius: 20px 20px 0 0; }
  .jt-side.me { border-radius: 0 0 20px 20px; }
  .jt-arena { padding: 0 10px; }
  .jt-chips { display: none; }
  .jt-mana::before { content: ""; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle, #3a7fe0 0 45%, transparent 46%), repeating-conic-gradient(#f4efe4 0 20deg, #2563bd 20deg 60deg); box-shadow: 0 0 0 1.5px #0f2650; }
  .jt-mana b { font-size: 19px; }
  .jh-nm { font-size: 11px; max-width: 90px; }
  .jt-ohand { padding-left: 10px; min-height: 30px; }
  .jt-ob { margin-left: -14px; }
  .jt-ob .tc-back.tiny, .jt-deck .tc-back.mini { --cw: 24px; }
  .jt-mid { padding: 3px 100px 3px 4px; min-height: 44px; }
  .jt-msg { font-size: 14px; padding: 6px 11px; }
  .jt-end { min-width: 88px; padding: 8px 10px; font-size: 14px; right: 2px; }
  .jt-hand { --cw: clamp(66px, 21vw, 90px); padding: 6px 4px 6px; }
  .jt-card { margin: 0 calc(var(--cw) * -.14); margin-bottom: calc(var(--cw) * -.32); }
  .jt-hand.tight .jt-card { margin: 0 calc(var(--cw) * -.3); margin-bottom: calc(var(--cw) * -.32); }
  .jt-card:hover { transform: translateY(calc(var(--i) * var(--i) * 1.6px)) rotate(calc(var(--i) * 2.2deg)); }
  .jt-card.sel { transform: translateY(-48%) scale(1.5); }
  .jt-float span { font-size: 24px; }
  .jt-show { left: 10px; top: 42%; }
  .jt-last { display: none !important; }
}
