/* Onglet Jeux (views/arcade.js, js/arcade/*) : salon, échecs, Fragments, Word Bomb, Blackjack.
   Même direction que app.css : papier, encre épaisse, stickers, ombres dures. */
.modal-wrap.is-top { z-index: 30; }
.ag-tabs { margin-bottom: -6px; color: var(--ink); }
.ag-tabs .seg-btn { position: relative; }
.ag-dot, .ag-tile .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid var(--ink); vertical-align: 1px; animation: pulseDot 1.2s infinite; }
.ag-tile .dot { position: absolute; top: 10px; right: 12px; }
.ag-h { font-size: 1.5rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ag-count { font-family: var(--font-body); font-weight: 900; font-size: .85rem; padding: 2px 10px; border-radius: 999px; background: var(--mint); border: 2px solid var(--ink); }
.ag-live { font-family: var(--font-body); font-weight: 900; font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; background: var(--accent); color: #fff; border: 2px solid var(--ink); transform: rotate(-3deg); }
.ag-live::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: #fff; animation: pulseDot 1.2s infinite; vertical-align: 1px; }
.ag-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.ag-tile { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 22px 14px 16px; cursor: pointer; font: inherit; color: var(--ink); transition: transform .3s var(--jelly); }
.ag-tile:nth-child(odd) { --tilt: -1.2deg; } .ag-tile:nth-child(even) { --tilt: 1deg; }
.ag-tile:hover { transform: rotate(0) scale(1.03); }
.ag-tile b { font-size: 1.25rem; }
.ag-tile small { font-size: .78rem; line-height: 1.25; }
.ag-art { width: 74px; height: 64px; display: grid; place-items: center; flex: none; }
.ag-art > svg, .ag-art .ag-art-svg { width: 100%; height: 100%; filter: drop-shadow(2px 3px 0 #1b163855); }
.ag-art .ch-piece { width: 64px; height: 64px; }
.ag-art .wb-bomb-svg { position: static; transform: rotate(10deg); }
.ag-cards { display: flex; }
.bj-mini { display: grid; place-items: center; width: 36px; height: 50px; border-radius: 6px; background: #fff; border: 2.5px solid var(--ink); font-style: normal; font-weight: 900; font-size: .9rem; line-height: 1; box-shadow: 2px 2px 0 var(--ink); }
.bj-mini:first-child { transform: rotate(-10deg) translateX(6px); } .bj-mini:last-child { transform: rotate(8deg); }
.bj-mini b { font-size: 1.1rem; } .bj-mini.is-red { color: var(--cord-1); }
.ag-head { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.ag-head h2 { font-size: 1.7rem; }
.ag-online, .ag-games, .ag-rooms, .ag-sent, .ag-pick { list-style: none; padding: 0; display: grid; gap: 8px; margin-top: 8px; }
.ag-online li { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 10px; align-items: center; padding: 8px 6px; border-bottom: 2px dashed var(--surface-line); }
.ag-dare { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.ag-dare .btn, .ag-rooms .btn, .ag-sent .btn { padding: 6px 12px; font-size: .82rem; box-shadow: 3px 3px 0 var(--ink); }
@media (min-width: 560px) { .ag-online li { grid-template-columns: auto 1fr auto auto; } .ag-dare { grid-column: auto; } }
.ag-elo { font-weight: 900; font-size: .78rem; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); border: 2px solid var(--ink); white-space: nowrap; }
.ag-elo::before { content: 'Elo '; font-size: .62rem; letter-spacing: .08em; color: var(--ink-2); }
.ag-sent li, .ag-rooms li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); border: 2px solid var(--ink); font-size: .9rem; }
.ag-game { width: 100%; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; text-align: left; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface); border: 2.5px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); transition: transform .25s var(--jelly); }
.ag-game:hover { transform: rotate(-.6deg) scale(1.01); }
.ag-game span { display: grid; min-width: 0; }
.ag-game small { color: var(--ink-2); font-size: .78rem; }
.ag-status { font-size: .82rem; text-align: right; }
.ag-yourturn { color: var(--cord-1); font-family: var(--font-hand); font-size: 1.3rem; font-weight: 400; }
.ag-levels { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 14px; }
.ag-levels .btn { flex: 1 1 90px; }
.ag-best { display: flex; justify-content: space-between; align-items: baseline; margin: 6px 0 12px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--sun); border: var(--border); box-shadow: 3px 3px 0 var(--ink); transform: rotate(-1deg); font-weight: 900; }
.ag-best b { font-family: var(--font-display); font-weight: 400; font-size: 2rem; }
.ag-rules { padding-left: 18px; display: grid; gap: 4px; margin: 4px 0 12px; }
.board-row.ag-row { grid-template-columns: 46px 46px 1fr auto; }
.ag-score { display: grid; justify-items: end; line-height: 1; }
.ag-wdl { font-size: .68rem; font-weight: 900; color: var(--ink-2); letter-spacing: .04em; }
.ag-pick-btn { width: 100%; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; border: 2.5px solid var(--ink); background: var(--surface); box-shadow: 2px 3px 0 var(--ink); text-align: left; }
.ag-pick-btn:hover { background: var(--sun); }
.ag-invite { display: grid; place-items: center; margin-top: 8px; }
.ag-invite .fav { animation: jellyIdle 1.6s ease-in-out infinite; }

/* Écran plein d'un jeu */
.ag { position: fixed; inset: 0; z-index: 22; pointer-events: auto; display: grid; grid-template-rows: auto 1fr; overflow: hidden; color: var(--on-bg);
  background: var(--halftone), linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 62%, var(--bg-3) 120%); animation: fadeIn .25s; }
.ag::before { content: ''; position: absolute; inset: 0; background: var(--bg-texture); opacity: .45; pointer-events: none; }
.ag.out { animation: fadeOut .25s both; }
.ag-hud { position: relative; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 12px 16px 6px; }
.ag-title { white-space: nowrap; font-size: 1.6rem; color: var(--sun); text-shadow: 2px 2px 0 var(--ink); rotate: -2deg; }
.ag-info { margin-left: auto; font-weight: 900; font-size: .85rem; text-align: right; color: var(--on-bg-2); }
/* Bouton ♪ de la musique du jeu : barré quand elle est coupée */
.ag-music { position: relative; display: grid; place-items: center; }
.ag-music .ico { width: 20px; height: 20px; }
.ag-music.is-off { opacity: .6; }
.ag-music.is-off::after { content: ''; position: absolute; left: 8px; right: 8px; top: 50%; height: 3px; border-radius: 2px; background: currentColor; rotate: -45deg; }
.ag-body { position: relative; z-index: 2; overflow-y: auto; overflow-x: hidden; padding: 6px 12px 24px; }

/* ---------- Échecs ---------- */
.ch-wrap { --size: min(94vw, calc(100dvh - 250px), 560px); display: grid; gap: 8px; justify-items: center; max-width: 980px; margin: 0 auto; }
.ch-board { width: var(--size); height: var(--size); display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr);
  border: 4px solid var(--ink); border-radius: 10px; overflow: hidden; box-shadow: 6px 7px 0 var(--ink); background: var(--ink); box-sizing: content-box; }
.ch-sq { position: relative; padding: 0; border: 0; display: grid; place-items: center; cursor: pointer; min-width: 0; min-height: 0; }
.ch-sq.light { background: #fff3dc; } .ch-sq.dark { background: #a691d1; }
.ch-sq.is-last.light { background: #ffe58a; } .ch-sq.is-last.dark { background: #e7c25d; }
.ch-sq.is-sel { box-shadow: inset 0 0 0 4px var(--accent); }
.ch-sq.is-target::after { content: ''; position: absolute; width: 28%; height: 28%; border-radius: 50%; background: #1b163855; }
.ch-sq.is-take::after { content: ''; position: absolute; inset: 6%; border-radius: 50%; border: 5px solid #1b163855; }
.ch-sq.is-check { background: radial-gradient(circle, #ff5a5f 0 35%, #ff5a5f00 72%), #ffb3ae; }
.ch-sq i { position: absolute; font-style: normal; font-weight: 900; font-size: clamp(.5rem, 1.6vw, .7rem); color: #1b163899; pointer-events: none; }
.ch-sq .rk { left: 3px; top: 2px; } .ch-sq .fl { right: 4px; bottom: 1px; }
.ch-piece { width: 88%; height: 88%; pointer-events: none; filter: drop-shadow(1.5px 2px 0 #1b163866); transition: transform .15s var(--jelly); }
.ch-sq.is-sel .ch-piece { transform: translateY(-6%) scale(1.08); }
.ch-player { width: var(--size); max-width: 100%; display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); border: var(--border); box-shadow: 3px 3px 0 var(--ink); }
.ch-player .name { min-width: 0; }
.ch-elo { font-weight: 900; font-size: .85rem; white-space: nowrap; } .ch-elo .up { color: var(--good); } .ch-elo .down { color: var(--bad); }
.ch-turn { margin-left: auto; font-size: 1.3rem; animation: jellyIdle 1.6s ease-in-out infinite; white-space: nowrap; }
.ch-player.is-me .ch-turn { color: var(--cord-1); }
.ch-side { width: var(--size); max-width: 100%; display: grid; gap: 8px; }
.ch-banner { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); border: var(--border); font-weight: 900; text-align: center; animation: popIn .4s var(--jelly); }
.ch-banner .btn { padding: 6px 14px; box-shadow: 3px 3px 0 var(--ink); }
.ch-banner.is-win { background: var(--mint); font-size: 1.15rem; } .ch-banner.is-loss { background: #ffb3ae; } .ch-banner.is-draw { background: var(--sun); }
.ch-moves { list-style: none; padding: 8px 10px; margin: 0; max-height: 92px; overflow-y: auto; display: flex; flex-wrap: wrap; gap: 2px 12px; border-radius: 10px; background: #ffffff18; border: 2px dashed #ffffff55; font-weight: 700; font-size: .85rem; }
.ch-moves small { color: var(--on-bg-2); }
.ch-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.ch-actions .btn { padding: 8px 14px; font-size: .9rem; }
.ch-promo { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ch-promo-btn { display: grid; justify-items: center; padding: 6px; border-radius: 12px; border: 2.5px solid var(--ink); background: var(--surface-2); box-shadow: 2px 3px 0 var(--ink); }
.ch-promo-btn .ch-piece { width: 54px; height: 54px; }
.ch-promo-btn:hover { background: var(--sun); }
@media (min-width: 900px) and (min-height: 520px) {
  .ch-wrap { --size: min(60vw, calc(100dvh - 190px), 600px); grid-template-columns: auto 300px; grid-template-areas: 'opp side' 'board side' 'me side'; align-items: start; justify-content: center; column-gap: 22px; }
  #chOpp { grid-area: opp; } .ch-board { grid-area: board; } #chMe { grid-area: me; }
  .ch-side { grid-area: side; width: 300px; align-self: center; } .ch-moves { max-height: 46vh; }
}

/* ---------- Fragments ---------- */
/* La grille prend toute la place disponible (--bw = côté de la grille, hors bordure de 20 px).
   Écran en hauteur (téléphone) : score, grille, puis les 3 fragments dessous.
   Écran en largeur (Discord sur ordinateur, fenêtre basse ou plein écran) : les fragments passent à droite de la grille. */
.bf-wrap { --bw: min(calc(100vw - 50px), calc((100dvh - 200px) * .75), 560px); display: grid; gap: 14px; justify-items: center; justify-content: center; position: relative; touch-action: none; }
.bf-top { width: var(--bw); display: flex; justify-content: space-between; align-items: end; }
.bf-score, .bf-best { display: grid; line-height: 1; }
.bf-score small, .bf-best small { font-size: .66rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; color: var(--on-bg-2); }
.bf-score b { font-family: var(--font-display); font-weight: 400; font-size: 2.6rem; -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink); }
.bf-score b.bump { animation: bump .35s var(--jelly); }
.bf-best { text-align: right; } .bf-best b { font-family: var(--font-display); font-weight: 400; font-size: 1.4rem; color: var(--sun); }
.bf-board { position: relative; width: var(--bw); height: var(--bw); display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); gap: 3px; padding: 6px;
  background: #1b1638cc; border: 4px solid var(--ink); border-radius: 14px; box-shadow: 6px 7px 0 var(--ink), inset 0 0 0 2px #ffffff22; box-sizing: content-box; }
.bf-slot { border-radius: 5px; background: #ffffff12; box-shadow: inset 0 0 0 1px #ffffff14; transition: background .12s; }
.bf-slot.is-full, .bf-cell, .bf-burst { background: var(--c); box-shadow: inset 0 -4px 0 #0003, inset 0 3px 0 #fff7, 0 0 0 2px var(--ink); }
.bf-slot.is-new { animation: popIn .3s var(--jelly); }
.bf-slot.is-ghost { background: color-mix(in srgb, var(--g) 55%, transparent); box-shadow: inset 0 0 0 2px #fff8; }
.bf-slot.is-clear { box-shadow: inset 0 0 0 3px var(--sun), 0 0 12px var(--sun); }
.bf-board .bf-burst { position: absolute; margin: 6px; border-radius: 5px; pointer-events: none; animation: bfBurst .5s ease-in both; }
@keyframes bfBurst { 0% { transform: scale(1); filter: brightness(1); } 35% { transform: scale(1.15); filter: brightness(1.8); } 100% { transform: scale(0) rotate(40deg); opacity: 0; } }
.bf-tray { width: var(--bw); display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.bf-slotpiece { display: grid; place-items: center; aspect-ratio: 1; min-height: 0; min-width: 0; border-radius: 14px; background: #ffffff10; border: 2px dashed #ffffff40; cursor: grab; touch-action: none; transition: opacity .2s, transform .25s var(--jelly); }
.bf-slotpiece:hover:not(.is-used) { transform: scale(1.05); }
.bf-slotpiece.is-used { cursor: default; border-style: dotted; opacity: .4; }
.bf-slotpiece.is-dragging .bf-piece { opacity: .2; }
.bf-slotpiece.is-stuck .bf-piece { filter: grayscale(.85) brightness(.8); }
@media (min-aspect-ratio: 6/5) {
  .bf-wrap { --bw: min(calc(100dvh - 112px), calc((100vw - 70px) / 1.45), 620px); grid-template-columns: auto calc(var(--bw) * .42);
    grid-template-rows: auto minmax(0, 1fr); grid-template-areas: 'board top' 'board tray'; column-gap: 22px; row-gap: 12px; justify-items: stretch; }
  .bf-board { grid-area: board; }
  .bf-top { grid-area: top; width: auto; }
  .bf-tray { grid-area: tray; width: auto; grid-template-columns: minmax(0, 1fr); grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .bf-slotpiece { aspect-ratio: auto; }
}
.bf-piece { position: relative; pointer-events: none; }
.bf-cell { position: absolute; width: calc(var(--cell) - 3px); height: calc(var(--cell) - 3px); border-radius: 4px; }
.bf-ghost { position: fixed; left: 0; top: 0; z-index: 45; pointer-events: none; filter: drop-shadow(4px 6px 0 #1b163888); }
.bf-msg { position: absolute; top: 34%; left: 0; right: 0; text-align: center; font-size: clamp(2rem, 9vw, 3.2rem); color: var(--sun); text-shadow: 3px 3px 0 var(--ink); pointer-events: none; z-index: 5; }
.bf-msg.pop { animation: popIn .45s var(--jelly); }
.bf-msg.is-big { color: var(--accent-3); }
.bf-final { font-family: var(--font-display); font-size: 3rem; line-height: 1; } .bf-final small { font-family: var(--font-body); font-size: 1rem; font-weight: 900; }

/* ---------- Word Bomb ---------- */
.wb-wait { margin-top: 30vh; color: var(--on-bg); }
.wb-lobby, .wb-over { max-width: 480px; margin: 18px auto; display: grid; gap: 12px; color: var(--ink); }
.wb-over { text-align: center; justify-items: center; }
.wb-roster { list-style: none; padding: 0; display: grid; gap: 8px; }
.wb-roster li { display: flex; align-items: center; gap: 10px; }
.wb-winner { animation: jellyIdle 1.6s ease-in-out infinite; }
.wb-bot { display: grid; place-items: center; width: 54px; height: 44px; transition: transform .3s var(--jelly); } .wb-bot svg { width: 100%; height: auto; }
.wb-bot.big { width: 120px; height: 80px; }
.wb-table { --r: min(34vw, calc((100dvh - 290px) / 2.4), 210px); position: relative; width: calc(var(--r) * 2 + 116px); height: calc(var(--r) * 2 + 120px); margin: 4px auto 0; max-width: 100%; }
.wb-seat { position: absolute; left: 50%; top: 50%; width: 110px; margin: -50px 0 0 -55px; transform: translate(calc(var(--x) * var(--r)), calc(var(--y) * var(--r))); display: grid; justify-items: center; gap: 2px; text-align: center; transition: transform .4s var(--spring); }
.wb-seat .fav { transition: transform .3s var(--jelly); }
.wb-seat.is-turn .fav, .wb-seat.is-turn .wb-bot { transform: scale(1.2); }
.wb-seat.is-turn .fav-img { box-shadow: 0 0 0 4px var(--sun), 0 0 18px var(--sun); }
.wb-seat.is-out { opacity: .38; filter: grayscale(1); }
.wb-seat.is-bad { animation: csShake .4s; }
.wb-seat.is-boom { animation: bigShake .6s; }
.wb-name { font-weight: 900; font-size: .8rem; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 1px 1px 0 var(--ink); }
.wb-seat.is-me .wb-name { color: var(--sun); }
.wb-lives { display: flex; gap: 2px; height: 16px; } .wb-heart { width: 17px; height: 16px; } .wb-heart.is-off { opacity: .5; }
.wb-typed { min-height: 1.4em; font-weight: 900; font-size: .9rem; letter-spacing: .04em; color: var(--on-bg); padding: 0 6px; border-radius: 6px; background: #1b163899; max-width: 140px; overflow: hidden; }
.wb-typed:empty { background: none; }
.wb-typed mark { background: var(--sun); color: var(--ink); border-radius: 3px; padding: 0 1px; animation: none; }
.wb-center { position: absolute; left: 50%; top: 50%; width: 120px; height: 120px; margin: -64px 0 0 -60px; display: grid; place-items: center; }
.wb-center .wb-bomb-svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(calc(var(--a, 0deg) + 45deg)); transition: transform .35s var(--spring); filter: drop-shadow(3px 4px 0 #1b163880); }
.wb-center.is-live .wb-bomb-svg { animation: wbTick 1s ease-in-out infinite; }
.wb-center.is-boom .wb-bomb-svg { animation: wbBoom .5s ease-out forwards; }
.wb-spark { transform-box: fill-box; transform-origin: center; animation: frTwinkle .35s ease-in-out infinite alternate; }
.wb-syl { position: relative; z-index: 2; margin-top: 14px; padding: 4px 12px; border-radius: 10px; background: var(--surface); color: var(--ink); border: var(--border); box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--font-display); font-weight: 400; font-size: 1.9rem; letter-spacing: .06em; animation: popIn .35s var(--jelly); white-space: nowrap; }
@keyframes wbTick { 0%, 100% { scale: 1; } 50% { scale: 1.05; } }
@keyframes wbBoom { 0% { scale: 1; } 40% { scale: 1.5; filter: brightness(2); } 100% { scale: .2; opacity: 0; } }
.wb-input { display: flex; gap: 8px; max-width: 460px; margin: 6px auto 0; opacity: .6; }
.wb-input.is-on { opacity: 1; animation: popIn .35s var(--jelly); }
.wb-input input { flex: 1; min-width: 0; padding: 12px 14px; border-radius: var(--radius-sm); border: var(--border); background: var(--surface); color: var(--ink); font: inherit; font-weight: 900; font-size: 1.15rem; letter-spacing: .04em; text-transform: uppercase; box-shadow: 3px 3px 0 var(--ink); outline: none; user-select: text; -webkit-user-select: text; }
.wb-input.is-on input { box-shadow: 3px 3px 0 var(--ink), 0 0 0 4px var(--sun); }
.wb-input input::placeholder { text-transform: none; font-weight: 600; color: var(--ink-2); }
.wb-last { text-align: center; margin-top: 8px; min-height: 1.3em; color: var(--on-bg-2); }
.wb-last b { color: var(--on-bg); letter-spacing: .05em; }
.wb-err { color: #ffb3ae; font-weight: 900; }

/* ---------- Blackjack ---------- */
.bj-chips-pill { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--sun); color: var(--ink); border: var(--border); box-shadow: 2px 2px 0 var(--ink); font-family: var(--font-display); font-weight: 400; font-size: 1rem; }
.bj-table { max-width: 640px; margin: 4px auto 0; display: grid; gap: 10px; padding: 16px 14px; border-radius: 28px; border: 4px solid var(--ink); box-shadow: 6px 7px 0 var(--ink);
  background: radial-gradient(ellipse at 50% 40%, #3f8f6e, #23604a 75%); color: #fff; }
.bj-zone { display: grid; justify-items: center; gap: 6px; min-height: 120px; }
.bj-zone .label { color: #ffffffb0; }
.bj-rule { text-align: center; color: var(--sun); font-size: 1.15rem; opacity: .85; border-top: 2px dashed #ffffff44; border-bottom: 2px dashed #ffffff44; padding: 4px 0; }
.bj-cards { display: flex; justify-content: center; min-height: 96px; }
.bj-card { position: relative; width: 66px; height: 94px; margin-left: -22px; border-radius: 9px; background: #fffdf6; color: var(--ink); border: 3px solid var(--ink); box-shadow: 3px 3px 0 #0006; display: grid; place-items: center; transform: rotate(calc((var(--i) - 1) * 3deg)); }
.bj-card:first-child { margin-left: 0; }
.bj-card.is-red { color: var(--cord-1); }
.bj-card.is-new { animation: bjDeal .38s var(--spring) both; }
.bj-card.is-back { background: repeating-linear-gradient(-55deg, var(--cord-1) 0 6px, var(--cord-2) 6px 12px, var(--cord-3) 12px 15px, var(--cord-1) 15px 21px); }
.bj-card.is-back::after { content: ''; position: absolute; inset: 6px; border: 2px solid #fff9; border-radius: 5px; }
.bj-corner { position: absolute; left: 5px; top: 4px; font-weight: 900; font-size: .85rem; line-height: .95; text-align: center; }
.bj-corner.is-bottom { left: auto; top: auto; right: 5px; bottom: 4px; transform: rotate(180deg); }
.bj-suit { font-size: 2rem; }
@keyframes bjDeal { from { transform: translate(40vw, -30vh) rotate(-40deg); opacity: 0; } }
.bj-total { font-family: var(--font-display); font-weight: 400; font-size: 1.3rem; padding: 0 12px; border-radius: 999px; background: #1b163899; }
.bj-total small { font-family: var(--font-body); font-size: .7rem; }
.bj-hands { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; }
.bj-hand { display: grid; justify-items: center; gap: 6px; padding: 8px; border-radius: 16px; position: relative; }
.bj-hand.is-active { background: #ffffff1c; box-shadow: 0 0 0 3px var(--sun); }
.bj-meta { display: flex; gap: 8px; align-items: center; }
.bj-bet { font-size: .78rem; font-weight: 900; color: #ffffffcc; }
.bj-result { position: absolute; top: 20px; left: 50%; translate: -50% 0; white-space: nowrap; padding: 4px 12px; border-radius: 8px; border: 3px solid var(--ink); background: var(--surface); color: var(--ink); font-family: var(--font-display); font-size: 1.05rem; box-shadow: 3px 3px 0 var(--ink); animation: stampIn .45s var(--spring) .3s both; rotate: -6deg; z-index: 2; }
.bj-result small { font-family: var(--font-body); font-weight: 900; font-size: .8rem; }
.is-win .bj-result { background: var(--mint); } .is-blackjack .bj-result { background: var(--sun); }
.is-lose .bj-result, .is-bust .bj-result { background: #ffb3ae; }
.bj-net { text-align: center; font-family: var(--font-display); font-size: 1.5rem; animation: popIn .4s var(--jelly) .4s both; }
.bj-net.up { color: var(--sun); } .bj-net.down { color: #ffb3ae; }
.bj-controls { max-width: 640px; margin: 14px auto 0; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.bj-controls > .btn { flex: 1 1 120px; }
.bj-betbox { width: 100%; display: grid; gap: 10px; }
.bj-chiprow { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.bj-chip { width: 58px; height: 58px; border-radius: 50%; border: 3px solid var(--ink); font-weight: 900; color: #fff; text-shadow: 1px 1px 0 var(--ink); box-shadow: 3px 3px 0 var(--ink), inset 0 0 0 5px #ffffff55; transition: transform .25s var(--jelly);
  background: repeating-conic-gradient(var(--chip) 0 30deg, #fff 30deg 45deg); }
.bj-chip:active { transform: scale(.9) rotate(20deg); }
.bj-chip:disabled { opacity: .35; }
.bj-chip.c10 { --chip: #5cc8ff; } .bj-chip.c50 { --chip: #ff6b5e; } .bj-chip.c100 { --chip: #2fae74; } .bj-chip.c500 { --chip: #8a5cd6; }
.bj-chip.is-clear { --chip: #6a5f7e; font-size: 1.4rem; }
.bj-betline { display: flex; justify-content: center; align-items: center; gap: 16px; flex-wrap: wrap; font-weight: 900; }
.bj-betline b { font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; color: var(--sun); text-shadow: 2px 2px 0 var(--ink); }

/* Salon : parties d'échecs en cours (mode spectateur) */
.ag-live-games { list-style: none; padding: 0; display: grid; gap: 8px; }
.ag-live-games li { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface-2); border: 2px dashed var(--surface-line); }
.ag-vs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.ag-vs b { font-weight: 900; } .ag-vs small { color: var(--ink-2); font-weight: 700; } .ag-vs i { font-family: var(--font-hand); font-size: 1.1rem; color: var(--cord-1); margin: 0 4px; }
.ch-spec { margin: 0; padding: 6px 10px; border-radius: var(--radius-sm); background: #ffffff1a; font-weight: 900; font-size: .85rem; text-align: center; }
.ch-cap { display: inline-flex; flex-wrap: wrap; align-items: center; margin-left: 4px; }
.ch-cap .ch-piece { width: 18px; height: 18px; margin-right: -5px; }
