/* Community roster: equal characters, a shared stage, no ranking. */
.arcade-ranking-view { container-type: size; }
.players-screen {
  box-sizing: border-box; width: 100%; height: 100%; min-height: 0; margin: 0;
  display: flex; flex-direction: column; gap: clamp(12px, 2.4cqh, 24px);
  padding: var(--screen-pad); background: var(--screen-bg); color: var(--screen-ink);
  font-family: 'Jersey 15', sans-serif;
}
body:not(.arcade-home-body):has(.players-screen) .container-index > .row { display: none; }
.players-screen [hidden] { display: none !important; }
.players-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--screen-line); padding-bottom: 1.5cqh; }
.players-filters { display: flex; gap: 1cqw; }
.players-screen button { font: inherit; cursor: pointer; }
.players-filters button, .players-pagination button {
  border: 0; border-radius: 0; background: none; color: var(--screen-muted);
  padding: .7cqh 1.5cqw; font-size: clamp(18px, 3cqh, 26px);
}
.players-filters button[aria-pressed="true"] { color: var(--screen-accent); background: var(--screen-tint); }
.players-filters small { margin-left: 8px; font: inherit; color: var(--screen-mint); }
.players-search { display: flex; align-items: center; gap: 8px; color: var(--screen-muted); }
.players-search .fa-solid { font-size: 12px; }
.players-search input { width: clamp(95px, 17cqw, 170px); border: 0; padding: 6px 0; outline: none; background: none; color: var(--screen-ink); font: clamp(18px, 2.8cqh, 24px)/1 'Jersey 15', sans-serif; }
.players-search input::placeholder { color: var(--screen-muted); }
.players-search:focus-within { box-shadow: 0 2px var(--screen-accent); }
.players-screen .arcade-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.players-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 2.6cqw; }
.players-roster { min-width: 0; min-height: 0; display: flex; flex-direction: column; justify-content: center; }
.players-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 1cqh .7cqw; max-height: 100%; height: 100%; align-content: center; }
.players-grid:has(> :last-child:nth-child(-n+3)) { height: 40%; }
.players-grid:has(> :last-child:nth-child(n+4):nth-child(-n+6)) { height: 72%; }

/* Vignettes : un blob par case, niveau dans les coins et présence sous le pseudo ;
   le blob bouge si le joueur est là. */
.players-character {
  min-width: 0; min-height: 0; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  gap: .5cqh; padding: 3.2cqh .7cqw 1cqh; border: 0; border-radius: 0; background: none; color: var(--screen-ink);
}
.players-character { --cursor-len: clamp(10px, 2cqh, 16px); }
.players-character[aria-pressed="true"] { background: var(--screen-tint); }
.players-character:hover { background: var(--screen-tint); }
.players-character-top {
  position: absolute; inset: .9cqh .8cqw auto; display: flex; align-items: center; justify-content: space-between; gap: 6px;
  color: var(--screen-muted); font-size: clamp(12px, 1.9cqh, 17px); line-height: 1;
}
.players-dot { width: clamp(6px, 1cqh, 9px); aspect-ratio: 1; }
[data-status="online"] > .players-character-top .players-dot { background: var(--screen-mint); }
.players-you { color: var(--screen-accent); letter-spacing: .08em; }
.players-character-level { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.players-character-level strong { font-weight: normal; color: var(--screen-ink); }
.players-character-art { display: flex; min-height: 0; flex: 1; align-items: flex-end; justify-content: center; width: 100%; }
.players-character img {
  display: block; width: auto; height: 100%; max-height: 13cqh; max-width: 100%; object-fit: contain; image-rendering: pixelated;
  transition: translate 120ms steps(2), opacity 120ms;
}
.players-character[data-status="offline"] img { opacity: .78; }
.players-character[aria-pressed="true"] img { opacity: 1; translate: 0 -.8cqh; }
.players-character-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: clamp(17px, 2.9cqh, 26px); line-height: 1; }
.players-character[aria-pressed="true"] .players-character-name { color: var(--screen-accent); }
.players-presence { flex-shrink: 0; color: var(--screen-muted); font-size: clamp(12px, 1.8cqh, 16px); line-height: 1; }
.players-character[data-status="online"] .players-presence { color: var(--screen-mint); }

/* Fiche du joueur sélectionné : podium de sable (blobby-stage.js, métal du prestige s'il y en a
   un) et identité en haut, puis compteurs et l'action ; le blob dit ses emotes dans une bulle. Elle décrit le
   joueur sans le classer ; le détail des matchs est dans le profil complet. */
.players-spotlight { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 2cqh; border-left: 1px solid var(--screen-line); padding-left: 2.6cqw; }
.players-card-top { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; gap: 1cqh; }
.players-stage { flex: 1; min-height: 0; width: 100%; container-type: size; display: flex; align-items: flex-end; justify-content: center; }
/* Carré du podium, à la taille que laisse la fiche : la bulle se place par rapport à lui. */
.players-stage-box { position: relative; width: min(100cqw, 100cqh); aspect-ratio: 1; }
.players-stage-canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.players-identity { min-width: 0; width: 100%; display: flex; flex-direction: column; align-items: center; gap: .9cqh; text-align: center; }
.players-status { display: inline-flex; align-items: center; gap: .4em; color: var(--screen-muted); font-size: clamp(16px, 2.9cqh, 26px); line-height: 1; letter-spacing: .06em; }
.players-status::before { content: ''; width: .5em; aspect-ratio: 1; background: var(--screen-line); }
.players-status[data-status="online"] { color: var(--screen-mint); }
.players-status[data-status="online"]::before { background: var(--screen-mint); }
.players-identity h2 {
  max-width: 100%; font: clamp(24px, 5cqh, 44px)/1 'Jersey 15', sans-serif; color: var(--screen-ink); margin: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.players-stat-level { gap: .25em; }
.players-stat-level span:empty { display: none; }
/* Prestige à droite du pseudo : emblème au pixel doublé (64 px, trop haut pour la case NIVEAU). */
.players-name-row { display: flex; align-items: center; justify-content: center; gap: .5em; min-width: 0; max-width: 100%; }
.players-name-row h2 { min-width: 0; }
.players-prestige { flex: none; font: clamp(16px, 3cqh, 26px)/1 'Jersey 15', sans-serif; }
.players-prestige:empty { display: none; }
.players-prestige .prestige-emblem { --pe-px: 2px; }
.players-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border-block: 1px solid var(--screen-line); padding: 1.5cqh 0; }
.players-stats > div { min-width: 0; display: flex; flex-direction: column; justify-content: space-between; text-align: center; }
.players-stats > div + div { border-left: 1px solid var(--screen-line); }
.players-stats dt, .players-label { color: var(--screen-muted); font-size: clamp(11px, 1.8cqh, 16px); letter-spacing: .06em; font-weight: normal; }
/* Valeurs sur une même ligne, quelle que soit leur taille (nombre ou date). */
.players-stats dd {
  display: flex; align-items: center; justify-content: center; height: clamp(24px, 4.6cqh, 40px); margin: .6cqh 0 0;
  color: var(--screen-ink); font-size: clamp(22px, 4.4cqh, 38px); line-height: 1; white-space: nowrap;
}
.players-stats dd.is-text { font-size: clamp(17px, 3.1cqh, 27px); }
/* Bulle d'emote : le blob du podium dit ses emotes équipées, une à la fois, avec la bulle du
   match (game.css .game-emote-bubble) : centrée au-dessus de sa tête, pointe au milieu. */
.players-say {
  position: absolute; z-index: 1; left: 50%; bottom: calc(70% + .7em); max-width: 96%;
  padding: .5em .75em .55em; border: 3px solid var(--screen-bubble-ink); border-radius: 13px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--screen-bubble-bg) 26%, white), var(--screen-bubble-bg) 46%), var(--screen-bubble-bg);
  color: var(--screen-bubble-ink); box-shadow: 0 4px 0 color-mix(in srgb, var(--screen-bubble-ink) 92%, transparent), 0 10px 20px color-mix(in srgb, var(--screen-shadow) 35%, transparent);
  font: clamp(15px, 12cqh, 24px)/.9 'Jersey 15', 'Courier New', monospace; text-align: center; white-space: nowrap;
  transform: translateX(-50%); transform-origin: 50% calc(100% + .8em);
}
.players-say::before, .players-say::after { content: ''; position: absolute; left: 50%; width: 0; height: 0; transform: translateX(-50%); }
.players-say::before { bottom: -.75em; border-left: .48em solid transparent; border-right: .48em solid transparent; border-top: .75em solid var(--screen-bubble-ink); }
.players-say::after { bottom: -.47em; border-left: .3em solid transparent; border-right: .3em solid transparent; border-top: .52em solid var(--screen-bubble-bg); }
.players-say.is-popping { animation: players-say 160ms cubic-bezier(.22, 1.25, .34, 1) backwards; }
@keyframes players-say { from { opacity: 0; transform: translateX(-50%) scale(.72); } }
.players-bond { display: flex; align-items: baseline; justify-content: center; gap: 1cqw; margin: 0; min-width: 0; }
.players-bond strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--screen-ink); font: clamp(17px, 2.9cqh, 25px)/1 'Jersey 15', sans-serif; font-weight: normal; }
.players-screen .players-spotlight .players-profile-button {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 0; border-radius: 0; padding: 1.4cqh 1.4cqw;
  background: var(--screen-tint); color: var(--screen-accent);
  font: clamp(18px, 3cqh, 26px)/1 'Jersey 15', sans-serif;
}
body .players-screen .players-profile-button kbd {
  min-width: 0; margin-left: auto; padding: 0 .35em; border: 1px solid var(--screen-line); border-radius: 0;
  background: none; color: var(--screen-muted); font: .7em/1.4 'Jersey 15', sans-serif;
}
.players-spotlight.is-changing :is(.players-identity, .players-stats dd) { animation: players-arrive 180ms ease-out backwards; }
/* Sélection et focus : le curseur 4 coins (.arcade-cursor, arcade-ui.css), sur une teinte légère. */
body .players-screen :is(button, a):focus-visible { outline: none; border-radius: 0; color: var(--screen-accent); background: var(--screen-tint); }
body .players-screen .players-profile-button:hover { color: var(--screen-accent); background: var(--screen-tint); }
body .players-screen .players-profile-button.arcade-cursor:focus-visible { outline: none; border-radius: 0; }
.players-empty { margin: auto; text-align: center; color: var(--screen-muted); font-size: clamp(20px, 3cqh, 28px); }
.players-body:has(.players-spotlight[hidden]) { grid-template-columns: 1fr; }
.players-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--screen-line); padding-top: 1cqh; color: var(--screen-muted); font-size: clamp(14px, 2.3cqh, 20px); }
.players-total { display: flex; gap: 8px; align-items: baseline; letter-spacing: .06em; }
.players-total strong { font-size: 1.35em; color: var(--screen-ink); font-weight: normal; }
.players-pagination { display: flex; align-items: center; gap: 8px; }
.players-pagination button { font-size: 28px; line-height: 1; }
.players-pagination button:disabled { opacity: .3; cursor: default; }
.players-footer-hint { font-size: .9em; }
@keyframes players-arrive { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }
@keyframes players-wait { to { opacity: .45; } }
@keyframes players-blink { 50% { opacity: .3; } }
@media (max-width: 760px) {
  .players-screen { height: auto; min-height: 100%; gap: 18px; }
  .players-toolbar { flex-wrap: wrap; gap: 10px; }
  .players-search { flex: 1; justify-content: flex-end; }
  .players-search input { width: 110px; }
  .players-body { grid-template-columns: 1fr; gap: 20px; }
  .players-grid, .players-grid:has(> :last-child) { height: auto; grid-auto-rows: 130px; }
  .players-character { padding-top: 26px; }
  .players-character img { max-height: 70px; }
  .players-character-name { font-size: 20px; }
  .players-character-top { inset: 8px 8px auto; font-size: 14px; }
  .players-spotlight { order: -1; border-left: 0; border-bottom: 1px solid var(--screen-line); padding: 0 0 18px; gap: 14px; }
  .players-stage { flex: none; height: 140px; }
  .players-identity h2 { font-size: 30px; }
  .players-stats dt, .players-label { font-size: 14px; }
  .players-stats dd { font-size: 28px; }
  .players-footer-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .players-spotlight.is-changing :is(.players-identity, .players-stats dd), .players-say, .players-dot { animation: none !important; }
  .players-character img { transition: none; }
}
