/* Air hockey (client/js/hockey.js) : noms et score, piste, boutons. Style « Fanzine » : chargé après hud-fanzine.css, dont il
   reprend les jetons (encres rose, bleu, jaune, décalage de calage, coins droits). */

.hk { --hk-h: clamp(260px, calc(100vh - 430px), 640px); display: grid; gap: 10px; max-width: 460px; margin: 0 auto; touch-action: manipulation; user-select: none; -webkit-user-select: none; }

.hk-tete { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 8px; }
.hk-joueur { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 6px; align-items: center; min-width: 0; padding: 6px 8px;
  background: var(--paper-2, #fff); color: var(--ink, #2a2140); border: 2.5px solid var(--ink, #2a2140); }
.hk-joueur.hk-c0 { box-shadow: 3px 3px 0 var(--pink, #ff5fae); }
.hk-joueur.hk-c1 { box-shadow: 3px 3px 0 var(--blue, #5b8cff); }
.hk-joueur:last-child { text-align: right; grid-template-columns: 1fr auto; }
.hk-joueur:last-child .hk-sym { order: 2; }
.hk-joueur:last-child .hk-score { justify-self: end; }
.hk-joueur.moi { background: var(--yellow, #ffd84a); color: #2a2140; transform: rotate(-0.8deg); }
.hk-sym { font: 800 16px/1 var(--font-titre, inherit); }
.hk-c0 .hk-sym { color: var(--pink, #ff5fae); }
.hk-c1 .hk-sym { color: var(--blue, #5b8cff); }
.hk-joueur.moi .hk-sym { color: #2a2140; }
.hk-nom { font: 500 11px/1.15 var(--mono, monospace); text-transform: uppercase; letter-spacing: 0.06em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hk-score { grid-column: 1 / -1; font: 800 34px/1 var(--font-titre, inherit); font-variant-numeric: tabular-nums; }
.hk-chrono { align-self: center; padding: 6px 8px; font: 500 15px/1 var(--mono, monospace); font-variant-numeric: tabular-nums; color: var(--ink, #2a2140);
  border: 2px solid var(--ink, #2a2140); background: var(--paper, #fff); transform: rotate(1deg); }
.hk-chrono.or { background: var(--yellow, #ffd84a); color: #2a2140; font-family: var(--font-titre, inherit); font-weight: 800; text-transform: uppercase; font-size: 13px; }

.hk-cadre { position: relative; width: min(100%, calc(var(--hk-h) * 1000 / 1600)); margin: 0 auto; border: 3px solid var(--ink, #2a2140);
  box-shadow: 5px 5px 0 var(--pink, #ff5fae), -3px -3px 0 var(--blue, #5b8cff); background: #221a35; }
.hk-piste { display: block; width: 100%; aspect-ratio: 1000 / 1600; touch-action: none; cursor: crosshair; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.hk-voile { position: absolute; inset: auto 8% 38% 8%; display: grid; gap: 6px; padding: 14px 12px; text-align: center; background: var(--paper, #fff6ea); color: var(--ink, #2a2140);
  border: 2.5px solid var(--ink, #2a2140); box-shadow: 4px 4px 0 var(--blue, #5b8cff); transform: rotate(-1deg); pointer-events: none; }
.hk-voile strong { font: 800 30px/1 var(--font-titre, inherit); text-transform: uppercase; }
.hk-voile span { font: 400 12.5px/1.35 var(--mono, monospace); }
.hk-voile.gagne { background: var(--yellow, #ffd84a); color: #2a2140; box-shadow: 4px 4px 0 var(--pink, #ff5fae); }

.hk-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.hk-actions:empty { display: none; }
.hk-btn { min-height: 46px; border-radius: 0; font-weight: 800; }
.hk-prendre.hk-c0 { background: var(--pink, #ff5fae); color: #fff; box-shadow: 3px 3px 0 var(--ink, #2a2140); }
.hk-prendre.hk-c1 { background: var(--blue, #5b8cff); color: #fff; box-shadow: 3px 3px 0 var(--ink, #2a2140); }
.hk-go { background: var(--yellow, #ffd84a); color: #2a2140; box-shadow: 3px 3px 0 var(--pink, #ff5fae); }
.hk-btn.on { background: var(--paper-2, #fff); outline: 2px dashed var(--pink, #ff5fae); outline-offset: 2px; }
.hk-petit { min-height: 38px; font-size: 12px; font-family: var(--mono, monospace); text-transform: uppercase; letter-spacing: 0.06em; }
.hk-aide { margin: 0; text-align: center; font: 400 12px/1.4 var(--mono, monospace); color: var(--ink-soft, var(--text-soft)); }

@media (max-width: 520px) {
  .hk { --hk-h: clamp(260px, calc(100vh - 290px), 600px); gap: 8px; }
  .hk-score { font-size: 28px; }
  .hk-joueur { padding: 5px 6px; }
}
