/* Compte : bouton HUD, menu déroulant et modales connexion / inscription, dans la grammaire des
   écrans du jeu. Uniquement les jetons --screen-* (arcade-ui.css) : lisible en sombre comme en
   sable clair, et l'accent suit Options › Thème. Cadre « pixel » = quatre filets décalés, coins
   laissés vides, sans border-radius. */
body {
  --account-frame: 0 -2px var(--screen-line), 0 2px var(--screen-line), -2px 0 var(--screen-line), 2px 0 var(--screen-line);
  --account-select: linear-gradient(90deg, var(--screen-tint) 0, transparent 72%);
}

/* ------------------------------------------------------------ bouton HUD */
body .account-hud { align-items: flex-start; }
body .account-hud .account-trigger {
  display: inline-flex; align-items: center; gap: 10px;
  height: 38px; padding: 0 12px; margin: 2px;
  border: 0; border-radius: 0;
  background: var(--screen-bg); color: var(--screen-ink);
  box-shadow: var(--account-frame), 0 6px var(--screen-shadow);
  font: 20px/1 'Jersey 15', sans-serif; letter-spacing: .06em; text-transform: uppercase;
  cursor: pointer; transition: none; backdrop-filter: none;
}
body .account-hud .account-trigger.is-signed-in { padding-left: 6px; }
body .account-hud .account-trigger:is(:hover, :focus-visible, [aria-expanded='true']) {
  outline: none; color: var(--screen-accent); transform: none;
  background: var(--account-select), var(--screen-bg);
  box-shadow: var(--account-frame), 0 6px var(--screen-shadow);
}
body .account-hud .account-trigger:active { transform: translateY(2px); box-shadow: var(--account-frame), 0 4px var(--screen-shadow); }
body .account-hud .user-avatar {
  width: 28px; height: 28px; flex: none;
  border-radius: 0; background: none; box-shadow: none;
  object-fit: contain; object-position: center; image-rendering: pixelated;
}
body .account-hud .account-trigger-name { max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Petit triangle plein : se lit en 1x là où un chevron au trait devient flou. */
body .account-hud .account-trigger-caret {
  width: 0; height: 0; flex: none;
  border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 5px solid currentColor;
}
body .account-hud .account-trigger[aria-expanded='true'] .account-trigger-caret { transform: scaleY(-1); }
body .account-hud-stats { display: none; }

/* Borne : ligne arcade « J1 / RECORD » (comme 1UP / HI-SCORE), posée sur la scène en texte
   avec l'ombre pixel du logo et du menu. Couleurs de scène --arc-* (crème, accent vif du
   thème) : identiques en sombre et en sable clair, puisque ce n'est pas la surface de l'écran. */
.arcade-home-body .arcade-hud-account:has(.is-display-only) {
  left: var(--screen-pad); right: var(--screen-pad); top: clamp(12px, 2.4cqh, 24px);
}
body .account-hud.is-display-only { display: block; width: 100%; }
.arcade-hud-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
/* Même police que le menu (Jersey 15), même ombre, une seule couleur d'accent : l'étiquette
   J1 / RECORD. Le reste en crème. */
.arcade-hud-slot {
  display: grid; gap: clamp(2px, .6cqh, 6px); min-width: 0;
  color: var(--arc-text); font-family: 'Jersey 15', sans-serif; text-shadow: 0 2px #08120d;
}
/* La scène reste sombre dans les deux interfaces : palette de scène partagée. */
.arcade-hud-record {
  --screen-ink: var(--screen-scene-ink);
  --screen-muted: var(--screen-scene-muted);
  --screen-mint: var(--screen-scene-mint);
  --screen-shadow: var(--screen-scene-shadow);
  --screen-accent: var(--theme-accent);
  position: relative; justify-items: end; text-align: right; flex: none;
  min-width: clamp(110px, 22cqw, 180px);
  color: var(--screen-ink); text-shadow: 0 2px var(--screen-shadow);
}
.arcade-hud-profile {
  position: absolute; inset: -4px -6px; z-index: 1;
  min-height: 44px; padding: 0; border: 0; border-radius: 0;
  background: none; box-shadow: none; cursor: pointer;
}
/* Prioritaire sur le contour de focus générique de arcade.css, y compris au retour du panneau. */
.arcade-home-body .arcade-hud-profile:is(:hover, :focus, :focus-visible, .is-selected) {
  outline: none; box-shadow: none; background: none;
}
/* Le survol éclaire les chiffres et les pixels, sans dessiner un bouton sur la scène. */
.arcade-hud-record:has(.arcade-hud-profile:focus-visible) {
  --hud-level-ink: var(--screen-accent);
  --hud-level-glow: color-mix(in srgb, var(--screen-accent) 30%, transparent);
  --hud-xp-ink: var(--screen-accent);
}
@media (hover: hover) {
  .arcade-hud-record:hover {
    --hud-level-ink: var(--screen-accent);
    --hud-level-glow: color-mix(in srgb, var(--screen-accent) 30%, transparent);
    --hud-xp-ink: var(--screen-accent);
  }
}
.arcade-hud-label {
  display: flex; align-items: baseline; gap: .55em; min-width: 0;
  font-size: clamp(16px, 2.8cqh, 22px); line-height: 1; letter-spacing: .1em; text-transform: uppercase;
}
.arcade-hud-tag { color: var(--arc-accent); }
.arcade-hud-who { min-width: 0; max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arcade-hud-value {
  display: flex; align-items: baseline; gap: .7em;
  font-size: clamp(28px, 5.4cqh, 44px); line-height: 1; letter-spacing: .04em;
}
.arcade-hud-record .arcade-hud-value { justify-content: center; }
.arcade-hud-stat { display: inline-flex; align-items: baseline; gap: .25em; white-space: nowrap; }
.arcade-hud-stat small { font-size: .42em; letter-spacing: .12em; opacity: .75; }
/* Les Elo en couleur d'accent, comme le score d'une borne ; leurs libellés restent crème. */
.arcade-hud-player .arcade-hud-stat:not(.is-empty) { color: var(--arc-accent); }
.arcade-hud-player .arcade-hud-stat small { color: var(--arc-text); }
.arcade-hud-stat.is-empty { font-size: .6em; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
/* Niveau : chiffre crème, accent sur le libellé ; la jauge ne représente que l'XP. */
.arcade-hud-level { font-size: clamp(38px, 8cqh, 64px); }
.arcade-hud-level .arcade-hud-stat {
  color: var(--hud-level-ink, var(--screen-ink));
  text-shadow: 0 3px var(--screen-shadow), 0 0 14px var(--hud-level-glow, transparent);
  transition: color 160ms ease-out, text-shadow 160ms ease-out;
}
.arcade-hud-level .arcade-hud-stat small { color: var(--screen-accent); opacity: 1; font-size: .34em; text-shadow: 0 2px var(--screen-shadow); }
/* Prestige : l'emblème (prestige.css, pixel doublé) et son numéro en chiffres romains devant le
   niveau, tous deux à la couleur du rang, comme le chiffre du niveau. */
.arcade-hud-prestige { display: inline-flex; align-items: center; gap: 2px; align-self: center; margin-right: .1em; line-height: 1; }
.arcade-hud-prestige .prestige-emblem { --pe-px: 2px; filter: drop-shadow(0 2px var(--screen-shadow)); }
.arcade-hud-prestige-num { color: var(--pe-scene-ink); font-size: .4em; letter-spacing: .06em; text-shadow: 0 2px var(--screen-shadow); }
/* :where : le survol repasse le niveau à l'accent, comme sans prestige. */
:where(.arcade-hud-record[data-prestige-tier]) { --hud-level-ink: var(--pe-scene-ink); }
.arcade-hud-xp {
  width: 100%; height: clamp(6px, 1.15cqh, 9px); margin-top: 2px;
  background: color-mix(in srgb, var(--screen-ink) 22%, transparent);
  mask-image: repeating-linear-gradient(to right, #000 0 calc(10% - 3px), transparent calc(10% - 3px) 10%);
}
.arcade-hud-xp i { display: block; height: 100%; background: var(--hud-xp-ink, var(--screen-mint)); transition: background-color 160ms ease-out; }
.arcade-hud-xp-copy {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 2;
  padding: 2px 0; white-space: nowrap;
  background: none; color: var(--screen-ink); text-shadow: 0 2px var(--screen-shadow);
  font-size: clamp(14px, 2.4cqh, 18px); line-height: 1.2; letter-spacing: .05em;
  visibility: hidden; opacity: 0; transform: translateY(-2px);
  transition: opacity 160ms ease-out, transform 160ms ease-out;
}
.arcade-hud-xp-copy::before { content: ''; position: absolute; inset: -8px 0 100%; }
.arcade-hud-record:not(.is-tooltip-dismissed):has(.arcade-hud-profile:focus-visible) .arcade-hud-xp-copy { visibility: visible; opacity: 1; transform: none; }
@media (hover: hover) {
  .arcade-hud-record:not(.is-tooltip-dismissed):hover .arcade-hud-xp-copy { visibility: visible; opacity: 1; transform: none; }
}
.arcade-hud-record:not(.is-tooltip-dismissed):has(.arcade-hud-profile:focus-visible) .arcade-hud-xp-gain { visibility: hidden; }
@media (hover: hover) {
  .arcade-hud-record:not(.is-tooltip-dismissed):hover .arcade-hud-xp-gain { visibility: hidden; }
}
.arcade-hud-xp-gain {
  position: absolute; top: calc(100% + 5px); right: 0;
  color: var(--screen-accent); font-size: clamp(14px, 2.5cqh, 20px); line-height: 1;
  white-space: nowrap; letter-spacing: .05em;
}
.arcade-hud-xp-gain:empty { display: none; }
.arcade-hud-record.is-level-up .arcade-hud-level { animation: arcade-hud-level-up 420ms steps(3) backwards; }
@keyframes arcade-hud-level-up {
  from { transform: translateY(3px); filter: brightness(1.6); }
  to { transform: none; filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  .arcade-hud-record.is-level-up .arcade-hud-level { animation: none; }
  .arcade-hud-level .arcade-hud-stat, .arcade-hud-xp i, .arcade-hud-xp-copy { transition: none; }
}
/* Accès au compte : commande de borne visible sur l'écran titre et dans le menu. */
.arcade-home-body .arcade-hud-login {
  position: relative;
  display: inline-flex; align-items: center; align-self: flex-start; gap: 7px;
  width: fit-content; min-height: clamp(30px, 4cqh, 34px);
  padding: 3px 11px 3px 9px;
  border: 0; border-radius: 0;
  background: var(--arc-accent); color: var(--arc-bg);
  box-shadow: inset -3px -3px color-mix(in srgb, var(--arc-accent) 60%, var(--arc-bg)), inset 2px 2px color-mix(in srgb, var(--arc-accent) 78%, #fff), 0 4px color-mix(in srgb, var(--arc-accent) 55%, var(--arc-bg));
  font: clamp(18px, 2.7cqh, 22px)/1 'Jersey 15', sans-serif;
  letter-spacing: .08em; text-transform: uppercase; text-shadow: none;
  cursor: pointer;
}
.arcade-home-body .arcade-hud-login img { width: 16px; height: 16px; object-fit: contain; image-rendering: pixelated; }
.arcade-home-body .arcade-hud-login:is(:hover, :focus-visible, .is-selected) {
  outline: none; color: var(--arc-accent); background: color-mix(in srgb, var(--arc-accent) 22%, var(--arc-bg));
  box-shadow: 0 4px color-mix(in srgb, var(--arc-accent) 55%, var(--arc-bg)), 0 0 18px color-mix(in srgb, var(--arc-accent) 28%, transparent);
}
.arcade-home-body .arcade-hud-login { --cursor-gap: -5px; }
.arcade-home-body .arcade-hud-login:active { transform: translateY(2px); }

@media (max-width: 600px) {
  /* Sur téléphone, le niveau et sa jauge restent visibles ; le détail XP s’efface. */
  .arcade-home-body .arcade-hud-account:has(.is-display-only) { left: 12px; right: 12px; top: 10px; }
  .arcade-hud-player .arcade-hud-value { display: none; }
  .arcade-hud-record { min-width: 84px; gap: 3px; }
  .arcade-hud-level { font-size: clamp(28px, 8cqw, 38px); }
  .arcade-hud-who { max-width: 12ch; }
  .arcade-hud-xp { height: 5px; }
  .arcade-hud-label { font-size: 15px; }
  .arcade-home-body .arcade-hud-login { min-height: 28px; padding: 3px 7px; font-size: 16px; }
  .arcade-home-body .arcade-hud-login img { width: 14px; height: 14px; }
}

/* ------------------------------------------------------------ menu */
body .account-menu {
  /* Déplacé dans <body> par passport.js (l'écran de l'accueil rogne et transforme ses enfants),
     puis calé sous le bouton via ces deux variables. */
  position: fixed; top: var(--account-menu-top, 72px); left: var(--account-menu-left, 16px); z-index: 1040;
  display: flex; flex-direction: column;
  min-width: 250px; max-width: min(320px, calc(100vw - 32px)); max-height: calc(100dvh - var(--account-menu-top, 72px) - 12px);
  padding: 8px 0; overflow-y: auto;
  background: var(--screen-bg); color: var(--screen-ink);
  box-shadow: var(--account-frame), 0 8px var(--screen-shadow);
  text-align: left;
  animation: arcade-screen-open 160ms steps(4) backwards;
}
body .account-menu[hidden] { display: none; }
body .account-menu-player {
  display: grid; gap: 2px; padding: 8px 18px 14px; margin-bottom: 6px;
  border-bottom: 1px solid var(--screen-line);
}
body .account-menu-kicker { color: var(--screen-mint); font: 10px/1.4 'PixelArt', monospace; letter-spacing: .14em; text-transform: uppercase; }
body .account-menu-name {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin: 0; color: var(--screen-ink); font: 30px/1 'Jersey 15', sans-serif; letter-spacing: .03em;
}
body .account-menu-modes {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
  margin: 8px 0; padding: 10px 0;
  border-top: 1px solid var(--screen-line); border-bottom: 1px solid var(--screen-line);
}
body .account-menu-mode { display: grid; gap: 3px; min-width: 0; }
body .account-menu-mode + .account-menu-mode { padding-left: 12px; border-left: 1px solid var(--screen-line); }
body .account-menu-mode span { color: var(--screen-muted); font: 10px/1.3 'PixelArt', monospace; }
body .account-menu-mode strong { color: var(--screen-accent); font: 20px/1 'Jersey 15', sans-serif; white-space: nowrap; }
body .account-menu-mode small { color: var(--screen-muted); font: 12px/1.3 'Numbers', monospace; white-space: nowrap; }
body .account-menu-mail {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--screen-muted); font: 16px/1.3 'Jersey 15', sans-serif;
}
body .account-menu-item {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 10px 18px; border: 0; border-radius: 0;
  background: none; color: var(--screen-ink); text-align: left; text-decoration: none;
  font: 21px/1 'Jersey 15', sans-serif; letter-spacing: .06em; text-transform: uppercase;
  cursor: pointer;
}
body .account-menu-item .fa-solid { width: 18px; flex: none; color: var(--screen-mint); font-size: 15px; text-align: center; }
body .account-menu-item:is(:hover, :focus-visible) {
  outline: none; color: var(--screen-accent); background: var(--account-select);
}
body .account-menu-item:is(:hover, :focus-visible) .fa-solid { color: var(--screen-accent); }
/* Action irréversible : à l'écart sous un filet, en retrait jusqu'à ce qu'on la vise. */
body .account-menu-item.is-danger { margin-top: 6px; border-top: 1px solid var(--screen-line); padding-top: 14px; color: var(--screen-muted); font-size: 18px; }
body .account-menu-item.is-danger .fa-solid { color: var(--screen-muted); }

/* ------------------------------------------------------------ modales */
body .auth-screen-modal.fade { transition: none; }
body .auth-screen-modal .modal-dialog { max-width: min(560px, calc(100vw - 24px)); margin-inline: auto; transform: none; transition: none; }
body .auth-screen-modal .modal-content.auth-screen {
  gap: 0; padding: clamp(18px, 3.4vw, 32px);
  border: 0 !important; border-radius: 0; overflow: visible;
  background: var(--screen-bg); color: var(--screen-ink);
  box-shadow: var(--arcade-frame-shadow);
}
body .auth-screen-modal.show .modal-content.auth-screen { animation: arcade-screen-open 220ms steps(6) backwards; }
body:has(.auth-screen-modal.show) .modal-backdrop.show { opacity: .8; background: #030706; backdrop-filter: none; -webkit-backdrop-filter: none; }

body .auth-screen-modal .auth-screen .auth-screen-header .arcade-page-title { font-size: 32px; }
body .auth-screen-modal .auth-screen .auth-screen-header .game-brand .game-brand-main { font-size: 24px; }
body .auth-screen-modal .auth-screen .auth-screen-header .game-brand .game-brand-sub { font-size: 9px; }

body .auth-screen-modal .auth-screen .auth-screen-form { display: flex; flex-direction: column; gap: 18px; padding-top: clamp(18px, 3.4vw, 28px); }
body .auth-screen-modal .auth-screen .auth-screen-message {
  padding: 10px 14px; margin: 0;
  background: var(--account-select); box-shadow: inset 3px 0 var(--screen-accent);
  color: var(--screen-ink); font: 19px/1.25 'Jersey 15', sans-serif;
}
body .auth-screen-modal .auth-screen .auth-screen-message[hidden] { display: none; }
/* Inscription : ce que le compte apporte, en tête du formulaire. */
body .auth-screen-modal .auth-screen .auth-screen-benefits { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
body .auth-screen-modal .auth-screen .auth-screen-benefits li { display: flex; align-items: center; gap: 12px; color: var(--screen-ink); font: 20px/1.2 'Jersey 15', sans-serif; letter-spacing: .03em; }
body .auth-screen-modal .auth-screen .auth-screen-benefits .fa-solid { flex: none; width: 1.2em; color: var(--screen-accent); font-size: .8em; text-align: center; }
/* Salon privé : la réassurance, en petit sous les bénéfices. */
body .auth-screen-modal .auth-screen .auth-screen-intro { margin: -8px 0 0; color: var(--screen-muted); font: 17px/1.25 'Jersey 15', sans-serif; letter-spacing: .03em; }
body .auth-screen-modal .auth-screen .auth-screen-field { display: grid; gap: 6px; margin: 0; }
body .auth-screen-modal .auth-screen .auth-screen-label { color: var(--screen-muted); font: 18px/1 'Jersey 15', sans-serif; letter-spacing: .03em; }
body .auth-screen-modal .auth-screen .auth-screen-entry {
  display: flex; align-items: center; gap: 12px; padding: 0 14px;
  border: 1px solid var(--screen-line);
  background: color-mix(in srgb, var(--screen-mint) 3%, transparent);
}
body .auth-screen-modal .auth-screen .auth-screen-entry:focus-within {
  border-color: var(--screen-accent);
  background: color-mix(in srgb, var(--screen-accent) 5%, transparent);
}
body .auth-screen-modal .auth-screen .auth-screen-prompt { color: var(--screen-muted); font: 28px/1 'Jersey 15', sans-serif; }
body .auth-screen-modal .auth-screen .auth-screen-entry:focus-within .auth-screen-prompt { color: var(--screen-accent); }
body .auth-screen-modal .auth-screen .auth-screen-entry input {
  flex: 1; min-width: 0; height: 46px; padding: 0; margin: 0;
  border: 0; outline: none; border-radius: 0 !important; background: transparent; box-shadow: none;
  max-width: none !important; display: block;
  color: var(--screen-ink); caret-color: var(--screen-accent);
  font: 24px/1 'Jersey 15', sans-serif; letter-spacing: .03em;
}
/* Autoremplissage : pas de fond jaune du navigateur dans l'écran. */
body .auth-screen-modal .auth-screen .auth-screen-entry input:-webkit-autofill {
  -webkit-text-fill-color: var(--screen-ink);
  box-shadow: 0 0 0 40px var(--screen-bg) inset;
  transition: background-color 9999s;
}
body .auth-screen-modal .auth-screen .auth-screen-captcha { min-height: 78px; }

/* CTA plein, relief pixel ; la balle du menu sert de curseur quand il est visé. */
body .auth-screen-modal .auth-screen .auth-screen-submit {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 100%; height: 54px; margin: 6px 0 0; padding: 0 20px !important;
  border: 0; border-radius: 0;
  background: var(--screen-accent); color: var(--screen-accent-ink);
  box-shadow: inset -3px -3px color-mix(in srgb, var(--screen-accent) 70%, #000), inset 3px 3px color-mix(in srgb, var(--screen-accent) 60%, #fff), 0 4px var(--screen-shadow);
  font: 26px/1 'Jersey 15', sans-serif; letter-spacing: .07em; text-transform: uppercase;
  cursor: pointer;
}
body .auth-screen-modal .auth-screen .auth-screen-submit::before {
  content: ''; width: 22px; height: 22px; margin-right: 12px; flex: none;
  background: url('/images/brand/ballon-beach.png') center / contain no-repeat;
  image-rendering: pixelated; display: none;
}
body .auth-screen-modal .auth-screen .auth-screen-submit:is(:hover, :focus-visible) { outline: none; background: color-mix(in srgb, var(--screen-accent) 82%, #fff); }
body .auth-screen-modal .auth-screen .auth-screen-submit:is(:hover, :focus-visible)::before { display: block; }
body .auth-screen-modal .auth-screen .auth-screen-submit:active { transform: translateY(2px); box-shadow: inset -3px -3px color-mix(in srgb, var(--screen-accent) 70%, #000), inset 3px 3px color-mix(in srgb, var(--screen-accent) 60%, #fff), 0 2px var(--screen-shadow); }
body .auth-screen-modal .auth-screen .auth-screen-submit:disabled { cursor: wait; filter: saturate(.4); }

/* Basculer connexion / inscription : séparé par un filet, un vrai bouton secondaire. */
body .auth-screen-modal .auth-screen .auth-screen-switch {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 14px;
  margin: 4px 0 0; padding-top: 16px; border-top: 1px solid var(--screen-line);
  color: var(--screen-muted); font: 20px/1 'Jersey 15', sans-serif;
}
body .auth-screen-modal .auth-screen .auth-screen-switch button {
  min-height: 44px; padding: 6px 18px; border: 0; border-radius: 0; background: var(--screen-tint);
  color: var(--screen-accent); font: 22px/1 'Jersey 15', sans-serif; letter-spacing: .07em; text-transform: uppercase;
  cursor: pointer;
}
body .auth-screen-modal .auth-screen .auth-screen-switch button:is(:hover, :focus-visible) { outline: none; background: color-mix(in srgb, var(--screen-accent) 22%, transparent); }

@media (max-width: 600px) {
  body .auth-screen-modal .auth-screen .auth-screen-header .arcade-page-title { font-size: 24px; }
  /* Trop étroit pour trois colonnes : le logo passe au-dessus, titre et Retour dessous. */
  body .auth-screen-modal .auth-screen .auth-screen-header { grid-template-columns: minmax(0, 1fr) auto; gap: 12px 8px; }
  body .auth-screen-modal .auth-screen .auth-screen-header .game-brand { grid-column: 1 / -1; grid-row: 1; }
  body .account-hud .account-trigger { height: 34px; font-size: 18px; }
}
/* Sur téléphone, le menu passe en pleine largeur sous le bouton. */
@media (max-width: 760px) {
  body .account-menu { left: 16px; right: 16px; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  body .account-menu, body .auth-screen-modal.show .modal-content.auth-screen { animation: none; }
}

/* Seuls les raccourcis du HUD interceptent la souris. */
body .account-hud.is-display-only { pointer-events: none; }
body .account-hud.is-display-only :is(.arcade-hud-login, .arcade-hud-record) { pointer-events: auto; }

/* ------------------------------------------------------------ écran COMPTE (borne) */
/* Connexion / inscription dans le 4:3, grammaire de MON PERSO : blobby à gauche, réglages à
   droite, champs façon saisie du pseudo, CTA doré. Jetons --screen-* uniquement. */
#arcade-panel-account .account-screen {
  width: min(100%, 1040px); min-width: 0; min-height: 0;
  overflow: clip; overflow-clip-margin: 20px;
}
#arcade-panel-account .account-layout {
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: center;
  gap: clamp(24px, 6cqw, 88px); margin-block: auto; min-height: 0; min-width: 0;
  /* Only the form area scrolls on short screens. The padding also contains
     the full entrance animation of the selection cursor. */
  flex: 0 1 auto; padding: 20px; margin-inline: -20px;
  overflow-x: hidden; overflow-y: auto;
}
#arcade-panel-account .account-preview { display: grid; justify-items: center; gap: clamp(8px, 2cqh, 18px); min-width: 0; }
#arcade-panel-account .account-blobby {
  width: clamp(96px, 26cqh, 240px); height: clamp(96px, 26cqh, 240px);
  object-fit: contain; image-rendering: pixelated;
}
#arcade-panel-account .account-player-name {
  max-width: 100%; overflow-wrap: anywhere; text-align: center;
  color: var(--screen-ink); font: italic clamp(28px, 6cqh, 56px)/1 'Jersey 15', sans-serif;
  letter-spacing: .03em; text-shadow: 3px 3px var(--screen-shadow);
}
#arcade-panel-account .account-forms { display: grid; gap: clamp(12px, 2.6cqh, 24px); min-width: 0; }

/* Sélecteur : deux onglets comme 1 VS 1 / 2 VS 2 du classement ; ← → ou clic. */
.arcade-home-body #arcade-panel-account .account-mode {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px clamp(20px, 4cqw, 40px); width: 100%;
  min-height: 44px; padding: 4px 14px; border: 0; border-radius: 0;
  background: none; box-shadow: none; text-align: left; cursor: pointer;
}
#arcade-panel-account .account-mode-option {
  color: var(--screen-muted); font: clamp(22px, 4cqh, 30px)/1 'Jersey 15', sans-serif;
  letter-spacing: .08em; text-transform: uppercase;
}
#arcade-panel-account .account-mode-option.is-active { color: var(--screen-accent); }
#arcade-panel-account .account-mode-option.is-active::before { content: '▸ '; }
.arcade-home-body #arcade-panel-account .account-mode:is(.is-selected, :focus-visible, :hover) {
  outline: none; background: var(--screen-tint);
}

#arcade-panel-account .account-form { display: grid; gap: clamp(10px, 2.2cqh, 20px); }
#arcade-panel-account .account-form[hidden] { display: none; }
#arcade-panel-account .account-field { display: grid; gap: 6px; margin: 0; }
#arcade-panel-account .account-field-label {
  color: var(--screen-mint); font: clamp(17px, 3cqh, 22px)/1 'Jersey 15', sans-serif;
  letter-spacing: .1em; text-transform: uppercase;
}
#arcade-panel-account .account-field-entry {
  display: grid; grid-template-columns: 16px minmax(0, 1fr); align-items: center; gap: 12px;
  min-height: clamp(42px, 8cqh, 56px); padding: 0 16px;
  border: 1px solid var(--screen-line);
  background: color-mix(in srgb, var(--screen-mint) 3%, transparent);
}
/* Saisie : le curseur d'écran (arcade-ui.css) autour du champ, sur une teinte. */
#arcade-panel-account .account-field-entry:focus-within { background: var(--screen-tint); }
#arcade-panel-account .account-field-mark { color: var(--screen-muted); font: 30px/1 'Jersey 15', sans-serif; }
#arcade-panel-account .account-field-entry:focus-within .account-field-mark { color: var(--screen-accent); }
.arcade-home-body #arcade-panel-account .account-field-entry input {
  width: 100%; min-width: 0; height: auto; min-height: 36px; padding: 4px 0; margin: 0;
  border: 0; border-radius: 0; outline: none; background: transparent; box-shadow: none;
  color: var(--screen-ink); caret-color: var(--screen-accent);
  font: clamp(20px, 4cqh, 26px)/1.1 'Jersey 15', sans-serif; letter-spacing: .03em;
}
.arcade-home-body #arcade-panel-account .account-field-entry input:-webkit-autofill {
  -webkit-text-fill-color: var(--screen-ink); box-shadow: 0 0 0 40px var(--screen-bg) inset; transition: background-color 9999s;
}
#arcade-panel-account .auth-screen-message {
  margin: 0; padding: 8px 14px;
  background: linear-gradient(90deg, var(--screen-tint) 0, transparent 72%); box-shadow: inset 3px 0 var(--screen-accent);
  color: var(--screen-ink); font: 19px/1.25 'Jersey 15', sans-serif;
}
#arcade-panel-account .auth-screen-message[hidden] { display: none; }
#arcade-panel-account .auth-screen-captcha { min-height: 78px; }

/* CTA : même relief pixel que PRÊT !, la balle du menu en curseur quand il est visé. */
.arcade-home-body #arcade-panel-account .account-submit {
  display: flex; align-items: center; justify-content: center; width: 100%;
  min-height: clamp(44px, 8cqh, 54px); margin-top: 4px; padding: 0 20px;
  border: 0; border-radius: 0;
  background: var(--screen-accent); color: var(--screen-accent-ink);
  box-shadow: inset -3px -3px color-mix(in srgb, var(--screen-accent) 70%, #000), inset 3px 3px color-mix(in srgb, var(--screen-accent) 60%, #fff), 0 4px var(--screen-shadow);
  font: clamp(22px, 4.4cqh, 28px)/1 'Jersey 15', sans-serif; letter-spacing: .08em; text-transform: uppercase;
  cursor: pointer;
}
.arcade-home-body #arcade-panel-account .account-submit { --cursor-gap: -6px; }
.arcade-home-body #arcade-panel-account .account-submit:is(.is-selected, :focus-visible, :hover) {
  outline: none; background: color-mix(in srgb, var(--screen-accent) 82%, #fff);
}
.arcade-home-body #arcade-panel-account .account-submit:active { transform: translateY(2px); }
.arcade-home-body #arcade-panel-account .account-submit:disabled { cursor: wait; filter: saturate(.4); }
/* Mot de passe oublié : lien discret sous le CTA, teinte au survol. */
.arcade-home-body #arcade-panel-account .account-forgot {
  justify-self: center; min-height: 36px; padding: 4px 12px; border: 0; border-radius: 0;
  background: none; box-shadow: none; color: var(--screen-muted);
  font: clamp(18px, 3.2cqh, 22px)/1 'Jersey 15', sans-serif; letter-spacing: .06em; cursor: pointer;
}
.arcade-home-body #arcade-panel-account .account-forgot:is(.is-selected, :focus-visible, :hover) {
  outline: none; background: var(--screen-tint); color: var(--screen-ink);
}

/* Écrans bas (1024×640…) : libellé à gauche du champ, pour que l'inscription tienne dans le
   cadre même avec le captcha de prod (303×78). */
@media (min-width: 601px) and (max-height: 760px) {
  #arcade-panel-account .account-field { grid-template-columns: 116px minmax(0, 1fr); align-items: center; gap: 10px; }
  #arcade-panel-account .account-field-label { font-size: 17px; }
  #arcade-panel-account .account-form { gap: clamp(8px, 1.8cqh, 14px); }
  #arcade-panel-account .account-forms { gap: clamp(8px, 2cqh, 16px); }
}
@media (max-width: 600px) {
  /* L'écran est minuscule : le formulaire d'abord, sans l'aperçu du blobby. */
  #arcade-panel-account .account-layout { grid-template-columns: 1fr; gap: 16px; margin-block: 0; }
  #arcade-panel-account .account-preview { display: none; }
  .arcade-home-body #arcade-panel-account .account-mode { gap: 18px; padding-inline: 8px; }
}
