/*
 * GameHub Arena — direction artistique « Highlight ».
 * Couche chargée après globals.css et workspace.css (copie identique dans dist/theme.css).
 * Inspirée des sites de clubs e-sport : noir et blanc très contrastés, jaune #feff00
 * posé en aplat avec texte noir (jamais en texte sur fond blanc), angles droits,
 * titres en grotesque très condensée (Archivo, largeur 62 %) en majuscules ;
 * le mot-symbole « GAMEHUB » reste en version élargie (125 %).
 */

:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-solid: #ffffff;
  --surface: #ffffff;
  --surface-2: #f3f3f3;
  --ink: #000000;
  --muted: #616161;
  --line: #e3e3e3;
  /* --primary sert au texte et aux traits : noir sur clair, jaune sur noir. */
  --primary: #000000;
  --accent: #feff00;
  --on-accent: #000000;
  --red: #e33026;
  --navy: #000000;
  --soft: #fdfd9c;
  --acid: #feff00;
  --danger: #e33026;
  --shadow: none;
  --radius: 4px;
  --font-display:
    "Archivo Variable", "Archivo", "Arial Black", system-ui, sans-serif;
  --font-body: "Archivo Variable", "Archivo", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --bg-solid: #080808;
  --surface: #121212;
  --surface-2: #1c1c1c;
  --ink: #ffffff;
  --muted: #9a9a9a;
  --line: #303030;
  --primary: #feff00;
  --soft: rgba(254, 255, 0, 0.14);
  --danger: #ff5a4f;
  --shadow: none;
}

/* ---------- Base ---------- */
body {
  font-family: var(--font-body);
  background: var(--bg);
}
::selection {
  background: var(--accent);
  color: var(--on-accent);
}
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
h1,
h2,
.section-title,
.panel h2,
.modal h2,
.data-point strong,
.game-art strong {
  font-family: var(--font-display);
  font-stretch: 62%;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.5px;
}
h3 {
  font-weight: 700;
  letter-spacing: -0.1px;
}
.mono,
.side-label,
.form-stack label,
.leader .rank,
.section-dot span {
  font-family: var(--font-mono);
}

/* ---------- Marque ---------- */
.brand,
.mobile-brand {
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.3px;
  text-transform: uppercase;
}
.brand b {
  font-weight: 800;
  color: var(--primary);
}
.brand-mark {
  background: var(--accent);
  color: #000;
  border-radius: var(--radius);
  width: 40px;
  height: 34px;
}
.brand-mark svg {
  width: 31px;
  height: 18px;
}
.mobile-brand .brand-mark {
  width: 36px;
  height: 30px;
}
.mobile-brand .brand-mark svg {
  width: 27px;
  height: 16px;
}

/* ---------- Navigation ---------- */
.sidebar {
  background: var(--bg-solid);
  border-right: 1px solid var(--line);
}
.nav-link {
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 13px;
}
.nav-link:hover {
  background: var(--surface-2);
  color: var(--ink);
}
.nav-link.active {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  box-shadow: none;
}
.system-card {
  border-radius: 0;
  background: var(--surface-2);
}
.topbar {
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.icon-btn {
  border-radius: var(--radius);
  background: var(--surface);
}
.avatar-btn,
#account-button {
  background: #000;
  color: #fff;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: 15px;
}
:root[data-theme="dark"] .avatar-btn,
:root[data-theme="dark"] #account-button {
  background: var(--accent);
  color: var(--on-accent);
}
#account-button {
  justify-content: center;
  align-items: center;
}
/* Dans l'application Next.js, #account-button est un bouton texte et non un avatar. */
#account-button.btn {
  padding: 13px 22px !important;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-body);
  font-stretch: 100%;
  font-size: 12.5px;
}
#account-button.btn:hover {
  background: var(--accent);
  color: var(--on-accent);
}

/* ---------- Boutons ---------- */
.btn {
  border-radius: var(--radius);
  padding: 13px 22px;
  font-weight: 800;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  transition:
    0.15s background-color,
    0.15s color,
    0.15s border-color;
}
.btn:hover {
  transform: none;
  box-shadow: none;
}
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}
.btn-primary:hover {
  background: var(--ink);
  color: var(--bg);
}
.btn-dark {
  background: var(--ink);
  color: var(--bg);
}
.btn-dark:hover {
  background: var(--accent);
  color: var(--on-accent);
}
.btn-soft {
  background: var(--soft);
  color: var(--primary);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--ink);
  color: var(--ink);
}
.btn-outline:hover {
  background: var(--ink);
  color: var(--bg);
}
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
}

/* ---------- Titres ---------- */
.eyebrow {
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 1.4px;
}
.eyebrow::before {
  width: 18px;
  height: 4px;
  background: var(--accent);
  box-shadow: inset 0 0 0 1px var(--primary);
}
.hero h1 {
  font-size: clamp(60px, 7.4vw, 118px);
  line-height: 0.9;
}
.hero h1 em {
  font-style: normal;
  color: var(--on-accent);
  background: var(--accent);
  padding: 0 0.12em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.section-title {
  font-size: clamp(46px, 5.4vw, 84px);
  line-height: 0.92;
}
.section-title em {
  font-style: normal;
  color: var(--primary);
}

/* ---------- Héros ---------- */
.hero-card {
  background: #000;
  border: 0;
  border-top: 6px solid var(--accent);
  border-radius: 0;
  box-shadow: none;
}
.hero-card::before {
  content: "GAMEHUB";
  color: rgba(255, 255, 255, 0.06);
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: 72px;
  letter-spacing: -1px;
}
.hero-card-top {
  font-weight: 700;
  letter-spacing: 0.3px;
}
.hero-match {
  border-radius: 0;
  box-shadow: none;
}
.live-pill,
.status {
  border-radius: 2px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 800;
  text-transform: uppercase;
}
.team-symbol {
  border-radius: 0;
}
.orange {
  background: var(--accent);
  color: #000;
}
.cyan {
  background: #e6e6e6;
  color: #000;
}
.versus {
  font-family: var(--font-display);
  font-stretch: 62%;
  font-weight: 800;
  font-size: 24px;
  color: var(--muted);
}
.match-meta {
  gap: 14px;
}

/* ---------- Cartes ---------- */
.card,
.stat-card,
.player-card,
.chat-box,
.workspace .panel,
.workspace .match-card,
.workspace .conversation,
.game-choice,
.profile-add-game,
.profile-catalog,
.onboarding-invite {
  border-radius: 0;
}
.card,
.stat-card,
.workspace .panel {
  box-shadow: none;
}
.tournament {
  transition: 0.2s border-color;
}
.tournament:hover {
  transform: none;
  border-color: var(--ink);
}
.game-art {
  border-radius: 0;
}
.game-art::after {
  border-color: rgba(255, 255, 255, 0.14);
}
.game-art strong {
  font-size: 30px;
  line-height: 0.95;
}
.rocket {
  background: linear-gradient(135deg, #2332d5, #000);
}
.valorant {
  background: linear-gradient(135deg, #e33026, #000);
}
.apex {
  background: linear-gradient(135deg, #f97316, #000);
}
.tournament h3 {
  font-size: 16px;
}
.prize {
  color: var(--primary);
  font-weight: 800;
}
.empty {
  border-radius: 0;
}
.data-point {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0;
}
.data-point strong {
  font-size: 46px;
  line-height: 1;
}
.panel {
  border-radius: 0;
}
.panel-dark {
  background: #000;
  border: 1px solid #303030;
  color: #fff;
}
.panel-dark p {
  color: #9a9a9a;
}
.panel-acid {
  background: var(--accent);
  color: #000;
}
.panel-acid p {
  color: #303030;
}
.panel-acid .mono,
.panel-acid .eyebrow {
  color: #000;
}
.panel-acid .eyebrow::before {
  background: #000;
  box-shadow: none;
}
.leader {
  border-top: 1px solid #303030;
}
.leader .rank {
  color: #9a9a9a;
}
.leader .xp {
  color: var(--accent);
  font-family: var(--font-mono);
}
.avatar {
  border-radius: 0;
}
.progress {
  height: 6px;
  border-radius: 0;
  background: var(--surface-2);
}
.progress i {
  border-radius: 0;
  background: var(--primary);
}
.team-pill {
  border-radius: 2px;
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 700;
}

/* ---------- Formulaires ---------- */
.field,
.workspace textarea,
.onboarding select,
.workspace fieldset {
  border-radius: var(--radius);
  background: var(--bg-solid);
}
.field:focus,
.workspace textarea:focus,
.onboarding select:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--soft);
}

/* ---------- Messagerie ---------- */
.message {
  background: var(--surface-2);
  border-radius: 0;
}
.message.mine {
  background: var(--accent);
  color: #000;
  border-radius: 0;
}

/* ---------- Superpositions ---------- */
.modal-backdrop,
dialog::backdrop {
  background: rgba(0, 0, 0, 0.75);
}
.modal {
  border-radius: 0;
  border-top: 6px solid var(--accent);
}
.modal-close {
  border-radius: var(--radius);
}
.toast {
  border-radius: 0;
  border-left: 6px solid var(--accent);
}

/* ---------- Pastilles de sections ---------- */
.section-dot:hover,
.section-dot.active {
  background: var(--accent);
  border-color: var(--ink);
  box-shadow: none;
}

/* ---------- Espace de travail (Next.js) ---------- */
.workspace .accent-panel {
  background: var(--accent);
  color: #000;
}
.workspace .accent-panel p {
  color: #303030;
}

/* ---------- Bandeaux noirs : « Matchs et résultats » et « Nos jeux » ---------- */
.band {
  --band-line: #262626;
  background: #000;
  color: #fff;
  padding-inline: clamp(18px, 3.4vw, 48px);
  margin-block: 24px;
}
.band .section-title em {
  color: #feff00;
}
.band-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}
.btn-light {
  background: #fff;
  color: #000;
  padding: 18px 46px;
  font-size: 14px;
}
.btn-light:hover {
  background: #feff00;
  color: #000;
}
.band-empty {
  margin: 0;
  padding: 48px 20px;
  border: 1px solid var(--band-line);
  color: #9a9a9a;
  text-align: center;
}

/* Filtres par jeu : pastilles arrondies, la sélection passe en jaune. */
.game-tabs {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 26px;
  scrollbar-width: none;
}
.game-tabs::-webkit-scrollbar {
  display: none;
}
.game-tab {
  flex: none;
  padding: 11px 24px;
  border-radius: 999px;
  border: 1px solid #303030;
  background: #141414;
  color: #9a9a9a;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  transition:
    0.15s background-color,
    0.15s color;
}
.game-tab:hover {
  color: #fff;
}
.game-tab.active {
  background: #feff00;
  border-color: #feff00;
  color: #000;
}

/* Cartes de match collées, séparées par des filets. */
.match-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--band-line);
  border-left: 1px solid var(--band-line);
}
.result-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  background: #0d0d0d;
  border-right: 1px solid var(--band-line);
  border-bottom: 1px solid var(--band-line);
}
@media (max-width: 1280px) {
  .match-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .match-board {
    grid-template-columns: 1fr;
  }
}
.result-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 26px 28px 0;
}
.result-game,
.result-outcome,
.result-title,
.result-round,
.result-name,
.result-score,
.result-date {
  font-family: var(--font-display);
  font-stretch: 62%;
  text-transform: uppercase;
}
.result-game {
  color: #feff00;
  font-weight: 800;
  font-size: 22px;
}
.result-outcome {
  font-size: 22px;
  font-weight: 500;
  color: #9a9a9a;
}
.result-outcome.win {
  color: #3ecf6e;
}
.result-outcome.loss {
  color: #ff4b4b;
}
.result-outcome.live {
  color: #feff00;
}
.result-outcome.live::before {
  content: "● ";
}
.result-title {
  margin: 20px 28px 6px;
  font-size: clamp(28px, 2.4vw, 38px);
  font-weight: 800;
  line-height: 0.92;
  overflow-wrap: anywhere;
}
.result-round {
  margin: 0 28px 26px;
  color: #8a8a8a;
  font-size: 21px;
}
.result-sides {
  display: grid;
  gap: 16px;
  padding: 26px 28px;
  border-block: 1px solid var(--band-line);
}
.result-side {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 16px;
}
.result-badge {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: #262626;
  color: #fff;
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: 13px;
}
.result-badge.winner {
  background: #feff00;
  color: #000;
}
.result-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 27px;
  font-weight: 800;
}
.result-score {
  font-size: 34px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.result-side.beaten .result-name,
.result-side.beaten .result-score {
  color: #6f6f6f;
}
.result-date {
  padding: 22px 28px;
  color: #8a8a8a;
  font-size: 22px;
}

/* Mur de jeux : grandes vignettes, nom dans une bande sombre en bas. */
.game-wall {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
@media (max-width: 1100px) {
  .game-wall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .game-wall {
    grid-template-columns: 1fr;
  }
}
.game-tile {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: #0d0d0d;
  color: #fff;
  text-align: center;
  cursor: pointer;
  font: inherit;
}
.game-tile-art {
  position: relative;
  display: grid;
  aspect-ratio: 16 / 10;
  place-items: center;
  overflow: hidden;
  background:
    repeating-linear-gradient(
      115deg,
      transparent 0 26px,
      rgba(255, 255, 255, 0.045) 26px 28px
    ),
    radial-gradient(
      120% 90% at 85% 0%,
      color-mix(in srgb, var(--game) 85%, transparent),
      transparent 62%
    ),
    linear-gradient(160deg, color-mix(in srgb, var(--game) 45%, #000), #000 75%);
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.game-tile-art span {
  font-family: var(--font-display);
  font-stretch: 62%;
  font-weight: 900;
  font-size: clamp(120px, 12vw, 190px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.38);
  transform: rotate(-8deg);
}
.game-tile-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.game-tile:hover .game-tile-art {
  transform: scale(1.05);
}
.game-tile-band {
  position: relative;
  display: grid;
  align-content: center;
  min-height: 112px;
  gap: 4px;
  padding: 22px 16px 20px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.game-tile-band strong {
  font-family: var(--font-display);
  font-stretch: 62%;
  font-weight: 800;
  font-size: 40px;
  line-height: 0.95;
  text-transform: uppercase;
}
.game-tile-band small {
  color: #9a9a9a;
  font-size: 12px;
  letter-spacing: 0.4px;
}
.game-tile:hover .game-tile-band strong,
.game-tile:focus-visible .game-tile-band strong {
  color: #feff00;
}

/* Pied de page : mention légale des visuels de jeux sur toute la largeur. */
.footer {
  flex-wrap: wrap;
  gap: 8px 20px;
}
.footer-legal {
  flex-basis: 100%;
  max-width: 900px;
  font-size: 10px;
  line-height: 1.5;
  opacity: 0.8;
}

/* Photo de profil : image recadrée ou initiale sur fond jaune. */
.avatar-face {
  overflow: hidden;
}
.avatar-face img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-btn {
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent);
}
.avatar-btn .avatar-face {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}
.profile-identity .profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 0;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-display);
  font-stretch: 62%;
  font-weight: 800;
  font-size: 48px;
}
.avatar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.avatar-actions label.btn {
  cursor: pointer;
}
.avatar-actions label.btn:focus-within {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.avatar-actions .is-busy {
  opacity: 0.45;
  pointer-events: none;
}
.avatar-hint {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
}

/* Filtre de jeu appliqué à la liste des tournois. */
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  margin: 0 0 16px;
  padding: 7px 8px 7px 14px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 13px;
}
.filter-chip button {
  border: 0;
  background: #000;
  color: #fff;
  width: 24px;
  height: 24px;
  cursor: pointer;
}
@media (max-width: 760px) {
  .band-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .btn-light {
    padding: 14px 30px;
  }
  .result-head,
  .result-sides,
  .result-date {
    padding-inline: 20px;
  }
  .result-title,
  .result-round {
    margin-inline: 20px;
  }
  .game-tile-band {
    min-height: 88px;
  }
  .game-tile-band strong {
    font-size: 34px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .game-tile-art {
    transition: none;
  }
  .game-tile:hover .game-tile-art {
    transform: none;
  }
}

/* ---------- Écran de chargement : le « G » noir se dessine sur fond jaune ---------- */
.boot {
  display: none;
}
.booting body {
  overflow: hidden;
}
.booting .boot {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: block;
  background: #feff00;
  color: #000;
  transition: transform 0.95s cubic-bezier(0.76, 0, 0.24, 1);
}
/* Bande noire sous le rideau : elle balaie la page pendant la remontée. */
.booting .boot::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 12vh;
  background: #000;
}
.boot-done .boot {
  transform: translateY(calc(-100% - 12vh));
}
.boot-top {
  position: absolute;
  top: 28px;
  left: clamp(18px, 4vw, 48px);
  right: clamp(18px, 4vw, 48px);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: boot-rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.boot-word {
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.3px;
  text-transform: uppercase;
}
.boot-word b {
  color: #000;
  font-weight: 800;
}
.boot-tag,
.boot-meta,
.boot-count {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #303030;
}
.boot-tag {
  margin-left: auto;
}
.boot-stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 26px;
  transition:
    transform 0.6s cubic-bezier(0.76, 0, 0.24, 1),
    opacity 0.6s;
}
.boot-g {
  position: relative;
  width: min(62vw, 380px);
  height: auto;
  overflow: visible;
}
.boot-g-stroke {
  fill: none;
  stroke: #000;
  stroke-width: 7;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.boot-g-fill {
  fill: #000;
}
.boot-sweep {
  transform-box: fill-box;
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 0.75s cubic-bezier(0.65, 0, 0.35, 1);
}
.boot-filled .boot-sweep {
  transform: scaleX(1);
}
.boot-count {
  position: relative;
  font-size: 12px;
  color: #000;
  font-variant-numeric: tabular-nums;
}
.boot-count span {
  color: #000;
}
.boot-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(30px, 5vh, 48px);
  text-align: center;
}
.boot-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: rgba(0, 0, 0, 0.12);
}
.boot-bar i {
  display: block;
  height: 100%;
  background: #000;
  transform: scaleX(0);
  transform-origin: left;
}
.boot-done .boot-stage {
  transform: translateY(-6%);
  opacity: 0;
}
@keyframes boot-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}
@media (max-width: 760px) {
  .boot-tag {
    display: none;
  }
}

@media (max-width: 760px) {
  .hero h1 {
    font-size: 64px;
  }
  .mobile-brand {
    font-size: 15px;
  }
  #account-button.btn {
    padding: 9px 10px !important;
    font-size: 10.5px;
    letter-spacing: 0;
  }
}
@media (max-width: 420px) {
  .hero h1 {
    font-size: 54px;
  }
  .section-title {
    font-size: 42px;
  }
}
