/* Compléments au ui.css approuvé (lot D17) pour le duel jouable. Mêmes tokens, aucun nouveau thème. */
[hidden] { display: none !important; }
body { background: #080f18; }
.game { min-height: 100vh; min-height: 100dvh; border: 0; border-radius: 0; }
.shell { min-height: 100vh; min-height: 100dvh; }
#content { max-width: 1180px; }

.motion-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 13px; color: var(--muted); cursor: pointer; }
.motion-toggle input { width: 22px; height: 22px; min-height: 0; padding: 0; accent-color: var(--amber); }

.lobby { display: grid; gap: 16px; padding: 22px; border: 1px solid #344b5d; border-radius: 18px; background: #14273a; max-width: 760px; }
.lobby-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.lobby label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.lobby select { width: 100%; min-width: 0; }
.lobby .primary { justify-self: start; display: inline-flex; gap: 9px; align-items: center; }

.duel-arena { background: #203433; }
.duel-arena canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.battlehud { z-index: 2; }
.battlehud strong { display: block; overflow-wrap: anywhere; }
.battlehud .progress span { transition: width 260ms ease; }
.battlehud.active { border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber) inset; }
.battlehud .hp span { background: linear-gradient(90deg, #729c88, #c7d4a3); }
.battlehud .hp.low span { background: linear-gradient(90deg, #b8664f, #e6a76b); }
.hp-text { font-variant-numeric: tabular-nums; }
.arena-veil { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; background: #0c1722c8; color: var(--muted); font-size: 14px; text-align: center; padding: 16px; }
.arena-veil[hidden] { display: none; }

.status-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.status-chips:empty { display: none; }
.battlehud.right .status-chips { justify-content: flex-end; }
.chip { font-size: 11px; line-height: 1.3; padding: 2px 8px; border-radius: 20px; border: 1px solid #5f7680; background: #10222e; white-space: nowrap; }
.chip-poison { border-color: #8faa5c; color: #cfe8a3; }
.chip-shield { border-color: #6fbfc0; color: #bdf0f0; }
.chip-buff { border-color: #c7a35c; color: #f6dca4; }

.attacks { margin-top: 4px; }
.attack .summary { font-size: 11px; color: var(--muted); line-height: 1.3; }
.attack .summary:empty { display: none; }
.attack { position: relative; text-align: left; }
.attack .reason { font-size: 11px; color: var(--muted); }
.attack[aria-disabled='true'] { cursor: not-allowed; opacity: .5; }
.attack[aria-disabled='true']:hover { border-color: var(--line); background: #23364a; }
.attack.locked .icon { opacity: .6; }
.pass-row { margin-top: 16px; }

.bottomnav { grid-template-columns: repeat(4, 1fr) !important; }
.identity-button { background: none; border: 0; padding: 0; min-height: 44px; text-align: left; color: inherit; cursor: pointer; }
.identity-button:hover:not(:disabled) { background: none; }
.navfooter a { color: var(--muted); }

/* Page de connexion : sans navigation, illustration d'accueil approuvée et formulaire. */
.game[data-view=auth] .sidebar, .game[data-view=auth] .topbar, .game[data-view=auth] .bottomnav { display: none; }
.game[data-view=auth] .shell { display: block; }
.auth-layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: stretch; max-width: 1100px; margin: 0 auto; }
.auth-hero { min-height: 520px; }
.auth-brand { padding: 0 0 18px; }
.auth-panel { display: grid; gap: 10px; align-content: start; }
.auth-panel .tabs { margin-bottom: 4px; }
.auth-panel .primary { margin-top: 8px; min-height: 50px; }
.auth-panel input { width: 100%; }
#authNameField { display: grid; gap: 6px; }

.hatch-stage { max-width: 760px; margin: 0 auto; border: 1px solid #3a5360; border-radius: 20px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 62%, #47675299, transparent 62%), linear-gradient(180deg, #1c3445, #101b2a); }
.hatch-stage canvas { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; }
.hatch-actions { justify-content: center; margin-top: 4px; }
.hatch-actions .primary { min-width: 220px; min-height: 52px; }

.profile-grid { align-items: start; }
.profile-form { display: grid; gap: 6px; margin: 14px 0 6px; font-size: 13px; color: var(--muted); }
.profile-form .row { flex-wrap: wrap; }
.profile-form input { flex: 1 1 200px; min-width: 0; }
.stats-row { display: flex; gap: 12px; margin-top: 18px; }
.stats-row > div { flex: 1; display: grid; justify-items: center; padding: 12px; border: 1px solid #3c5060; border-radius: 12px; background: #142332; }
.stats-row strong { font-size: 26px; color: var(--amber); font-variant-numeric: tabular-nums; }
.stats-row span { font-size: 12px; color: var(--muted); }
.profile-actions { flex-wrap: wrap; margin-top: 8px; }
.danger { color: var(--error); border-color: #97616c; }
.danger.confirm { background: #3b272f; }
.hero-creature { pointer-events: none; }

.fiche { margin-bottom: 28px; }
.display-dino canvas { width: 100%; height: 290px; position: relative; z-index: 1; display: block; }
.fiche-preview { margin-top: 12px; flex-wrap: wrap; }
.fiche-preview .button { flex: 1; }
.fiche-field { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.fiche-field select { width: 100%; }
.ability-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ability-list li { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; padding: 10px 12px; border: 1px solid #3c5060; border-radius: 12px; background: #142332; font-size: 14px; }
.ability-list li .icon { grid-row: span 3; }
.ability-list li small { color: var(--cyan); font-size: 12px; }
.ability-list li em { grid-column: 2; font-style: normal; font-size: 11px; color: var(--muted); }
.ability-list li em:empty { display: none; }
.ability-list li .icon { align-self: start; }
.ability-list li.family { border-color: #a48850; background: #51432930; }
.ability-list li.locked { opacity: .55; }
.ability-list li.locked small { color: var(--muted); }
.fiche-actions { margin-top: 20px; flex-wrap: wrap; }
.dino-card .badge-row { min-height: 26px; }

.result { margin-top: 18px; padding: 20px; border: 1px solid var(--amber); border-radius: 16px; background: #142532; display: grid; gap: 10px; justify-items: center; text-align: center; outline: none; }
.result[hidden] { display: none; }
.result h2 { color: var(--amber); font-size: 26px; }
.result .row { flex-wrap: wrap; justify-content: center; }

@container game (max-width: 700px) {
  .lobby { padding: 16px; }
  .lobby-fields { grid-template-columns: 1fr; }
  .lobby .primary { justify-self: stretch; justify-content: center; }
  .motion-toggle span { font-size: 12px; }
  .identity { margin-right: auto; }
  .pass-row { gap: 10px; }
  .result h2 { font-size: 22px; }
  .split { grid-template-columns: 1fr; gap: 16px; }
  .display-dino { min-height: 240px; padding: 12px; }
  .display-dino canvas { height: 220px; }
  .ability-list { grid-template-columns: 1fr; }
  .fiche-actions > * { flex: 1 1 100%; }
  .chip { font-size: 9px; padding: 1px 6px; }
  .hatch-actions .primary { width: 100%; }
  .auth-layout { grid-template-columns: 1fr; gap: 14px; }
  .auth-hero { min-height: 300px; }
  .pass-row { flex-wrap: wrap; }
  .pass-row > small { flex-basis: 100%; }
  .pass-row > .row { width: 100%; }
  .pass-row > .row > button { flex: 1; }
  .attack .summary { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) { .battlehud .progress span { transition: none; } }
