/* Troopnaut — site public. Une seule feuille, aucune dépendance externe.
   Palette reprise du jeu (src/styles/01-base.css, 05-menu.css) pour que le site
   et l'application ne se ressemblent pas « à peu près ». */

:root {
  --bg: #0b1020;
  --bg-deep: #070b18;
  --panel: #131c3f;
  --panel-2: #171f3d;
  --line: #2a3563;
  --ink: #e8ecff;
  --ink-dim: #a7b0d6;
  --ink-faint: #7c86b0;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --green: #4ade80;
  --red: #f87171;
  --gold: #fbbf24;
  --radius: 14px;
  --wrap: 1080px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

/* Le halo de fond : deux voiles fixes, aucun coût de rendu continu. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 45% at 18% 0%, rgba(59, 130, 246, 0.18), transparent 70%),
    radial-gradient(55% 40% at 92% 8%, rgba(34, 211, 238, 0.13), transparent 70%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
}

img,
svg {
  max-width: 100%;
}

a {
  color: var(--cyan);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: #67e8f9;
}

:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 20;
  padding: 10px 14px;
  background: var(--cyan);
  color: #06121a;
  font-weight: 700;
  border-radius: 8px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- en-tête ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(7, 11, 24, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-head .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  align-items: center;
  min-height: 64px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.brand svg {
  flex: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin-left: auto;
  font-size: 0.95rem;
}

.site-nav a {
  color: var(--ink-dim);
  text-decoration: none;
  padding: 4px 2px;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
}

.site-nav a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--cyan);
}

/* ---------- héros ---------- */

.hero {
  padding: 64px 0 28px;
}

.shots-band {
  padding-top: 10px;
}

/* Le héros est UNE colonne centrée : les captures sont en portrait, elles
   font une bande sous le titre au lieu d'une colonne de droite étriquée. */
.hero .wrap {
  display: grid;
  justify-items: center;
  max-width: 780px;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  padding: 5px 12px;
  border: 1px solid rgba(34, 211, 238, 0.45);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.09);
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 16px;
  text-wrap: balance;
  font-size: clamp(2.1rem, 6vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

h1 .accent {
  background: linear-gradient(96deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  /* `auto` des deux côtés : sans lui la boîte reste collée à gauche sous le
     titre, et seul le TEXTE paraît centré — le défaut se voit dès que le
     paragraphe est plus étroit que le titre. */
  margin: 0 auto 26px;
  max-width: 52ch;
  color: var(--ink-dim);
  font-size: 1.12rem;
}

/* ---------- boutons de store ---------- */

.stores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.store {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 200px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--panel) 0%, #101736 100%);
  color: var(--ink);
  text-decoration: none;
}

.store:hover {
  border-color: var(--cyan);
  color: var(--ink);
}

.store svg {
  flex: none;
  opacity: 0.9;
}

/* Deux lignes empilées, comme les badges officiels : la mention au-dessus, le
   nom du store en dessous. C'est aussi ce qui les laisse tenir côte à côte. */
.store-txt {
  display: block;
  min-width: 0;
}

.store-txt span {
  display: block;
  color: var(--ink-faint);
  font-size: 0.76rem;
  line-height: 1.3;
}

.store b {
  display: block;
  font-size: 1.05rem;
  line-height: 1.2;
  color: var(--ink);
}

/* État « pas encore publié » : le bouton existe, il ne mène nulle part et le
   dit. Retirer la classe et poser le href le jour de la publication. */
.store.is-soon {
  cursor: not-allowed;
  opacity: 0.62;
}

.store.is-soon:hover {
  border-color: var(--line);
}

.hero-note {
  margin: 0;
  color: var(--ink-faint);
  font-size: 0.88rem;
}

/* ---------- illustration ---------- */

.art {
  margin: 0;
}

.art svg {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0a1130;
}

.art figcaption {
  margin-top: 10px;
  color: var(--ink-faint);
  font-size: 0.82rem;
}

/* ---------- sections ---------- */

section {
  padding: 46px 0;
}

section > .wrap > h2 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 3.6vw, 2rem);
  letter-spacing: -0.01em;
}

.section-lede {
  margin: 0 0 28px;
  max-width: 62ch;
  color: var(--ink-dim);
}

.rule {
  height: 1px;
  margin: 0;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--line) 20%, var(--line) 80%, transparent);
}

.cards {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(23, 31, 61, 0.9), rgba(11, 16, 32, 0.9));
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.06rem;
}

.card p {
  margin: 0;
  color: var(--ink-dim);
  font-size: 0.96rem;
}

.card .tag {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
}

/* La liste « ce que le jeu ne fait pas » — le trait de marque du produit. */
.nevers {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.nevers li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 18px;
  border: 1px solid rgba(74, 222, 128, 0.28);
  border-radius: 12px;
  background: rgba(74, 222, 128, 0.06);
  font-size: 0.96rem;
}

.nevers b {
  display: block;
}

.nevers span:first-child {
  flex: none;
  color: var(--green);
  font-weight: 800;
}

.nevers p {
  margin: 4px 0 0;
  color: var(--ink-dim);
  font-size: 0.9rem;
}

/* ---------- bandeau d'appel ---------- */

.strip .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(100deg, rgba(59, 130, 246, 0.14), rgba(34, 211, 238, 0.08));
}

.strip h2 {
  margin: 0 0 4px;
  font-size: 1.3rem;
}

.strip p {
  margin: 0;
  max-width: 52ch;
  color: var(--ink-dim);
  font-size: 0.96rem;
}

.btn {
  display: inline-block;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--cyan), #0891b2);
  color: #04121a;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  color: #04121a;
  filter: brightness(1.08);
}

.btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn.ghost:hover {
  border-color: var(--cyan);
  color: var(--ink);
}

/* ---------- pages de texte (légal, soutien) ---------- */

.doc {
  padding: 44px 0 20px;
}

.doc .wrap {
  max-width: 760px;
}

.doc h1 {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
}

.doc .meta {
  margin: 0 0 30px;
  color: var(--ink-faint);
  font-size: 0.9rem;
}

.doc h2 {
  margin: 42px 0 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 1.28rem;
  letter-spacing: -0.01em;
}

.doc h3 {
  margin: 26px 0 8px;
  font-size: 1.04rem;
}

.doc p,
.doc li {
  color: var(--ink-dim);
}

.doc strong {
  color: var(--ink);
}

.doc ul,
.doc ol {
  padding-left: 22px;
}

.doc li {
  margin: 6px 0;
}

.doc .callout {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--cyan);
  border-radius: 12px;
  background: rgba(19, 28, 63, 0.7);
}

.doc .callout.warn {
  border-left-color: var(--gold);
  background: rgba(251, 191, 36, 0.07);
}

.doc .callout :last-child {
  margin-bottom: 0;
}

.doc .callout :first-child {
  margin-top: 0;
}

.toc {
  margin: 0 0 10px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(19, 28, 63, 0.55);
}

.toc h2 {
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.toc ol {
  margin: 0;
  columns: 2;
  column-gap: 28px;
  font-size: 0.94rem;
}

.doc table {
  width: 100%;
  margin: 14px 0;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.doc th,
.doc td {
  padding: 9px 12px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  color: var(--ink-dim);
}

.doc th {
  background: rgba(19, 28, 63, 0.8);
  color: var(--ink);
}

.doc code {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(7, 11, 24, 0.8);
  font-family: var(--mono);
  font-size: 0.88em;
  color: var(--ink);
}

.table-scroll {
  overflow-x: auto;
}

/* ---------- pourboires : les cartes d'adresses ---------- */

.wallets {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.wallet {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(23, 31, 61, 0.92), rgba(11, 16, 32, 0.92));
}

/* Le nom, le réseau et la pastille « soon » passent à la ligne plutôt que de
   pousser la carte hors de l'écran : à 320 px de large, ils ne tiennent pas
   côte à côte, et le réseau ne peut pas être coupé (mauvais réseau = fonds
   perdus, il se lit en entier ou pas du tout). */
.wallet-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
  justify-content: space-between;
}

.wallet-name {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 1.06rem;
  color: var(--ink);
}

.wallet-net {
  flex: none;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 11, 24, 0.7);
  color: var(--ink-faint);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.wallet-note {
  margin: 0;
  color: var(--ink-dim);
  font-size: 0.88rem;
}

/* L'adresse ne se tronque JAMAIS : une adresse coupée est de l'argent perdu.
   Elle s'enroule, en monospace, groupée par blocs de 4 caractères. */
.wallet-addr {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #070b18;
  font-family: var(--mono);
  font-size: 0.92rem;
  line-height: 1.75;
  letter-spacing: 0.02em;
  word-break: break-all;
  overflow-wrap: anywhere;
  color: var(--ink);
  -webkit-user-select: all;
  user-select: all;
}

.wallet-addr .grp {
  white-space: nowrap;
}

.wallet-addr .grp + .grp {
  margin-left: 0.42em;
}

.wallet-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: auto;
}

.copy {
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(34, 211, 238, 0.1);
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}

.copy:hover {
  border-color: var(--cyan);
}

.copy[disabled] {
  cursor: not-allowed;
  opacity: 0.5;
}

.copy-state {
  color: var(--green);
  font-size: 0.86rem;
  font-weight: 700;
}

/* En attente, le bloc ne contient plus une adresse mais une PHRASE : elle se
   coupe aux mots, pas au caractère. */
.wallet.is-pending .wallet-addr {
  color: var(--ink-faint);
  font-style: italic;
  font-family: var(--font);
  line-height: 1.6;
  letter-spacing: normal;
  word-break: normal;
  overflow-wrap: break-word;
}

.wallet-name .badge-soon {
  margin-left: 4px;
  vertical-align: 2px;
}

.badge-soon {
  padding: 3px 9px;
  border: 1px solid rgba(251, 191, 36, 0.5);
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.1);
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ---------- pied de page ---------- */

.site-foot {
  margin-top: 40px;
  padding: 34px 0 44px;
  border-top: 1px solid var(--line);
  background: rgba(7, 11, 24, 0.6);
  color: var(--ink-faint);
  font-size: 0.9rem;
}

.site-foot .wrap {
  display: grid;
  gap: 26px;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
}

.site-foot h2 {
  margin: 0 0 10px;
  font-size: 0.76rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.site-foot p {
  margin: 0 0 8px;
}

.site-foot ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-foot li {
  margin: 0 0 6px;
}

.site-foot a {
  color: var(--ink-dim);
  text-decoration: none;
}

.site-foot a:hover {
  color: var(--cyan);
}

.legal-line {
  margin-top: 18px;
  color: #626c93;
  font-size: 0.82rem;
}

@media (max-width: 820px) {
  .hero {
    padding-top: 40px;
  }

  .hero .wrap,
  .site-foot .wrap {
    grid-template-columns: 1fr;
  }

  .hero .wrap {
    gap: 28px;
  }

  .toc ol {
    columns: 1;
  }

  .store {
    flex: 1 1 100%;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* ---------- carrousel de captures ---------- */

/* La bande défile toute seule, sans JavaScript : `overflow-x` + `scroll-snap`
   suffisent au doigt, au trackpad et aux flèches du clavier. Le script n'ajoute
   que les boutons et le compteur — d'où leur masquage tant qu'il n'a pas
   tourné, et leur retrait s'il n'y a rien à faire défiler. */
.shots {
  position: relative;
}

.shots-track {
  display: flex;
  gap: 16px;
  margin: 0;
  padding: 4px 0 14px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  overscroll-behavior-x: contain;
}

.shot {
  flex: 0 0 min(248px, 68vw);
  scroll-snap-align: start;
}

.shot figure {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  margin: 0;
}

/* Le cadre : un téléphone, sans imiter un modèle existant.

   `object-fit: cover` et non `height: auto` : les captures ne viennent pas
   toutes du même gabarit (393×851 pour l'outil du site, 326×708 ou 326×614
   pour l'outil de capture intégré au jeu). Sans cadre fixe, les diapositives
   auraient des hauteurs différentes et la bande deviendrait un escalier ; avec
   `height: auto` sur un rapport imposé, l'image serait ÉCRASÉE. Le cadre garde
   le rapport, l'image le remplit, et ce qui dépasse est rogné — jamais déformé. */
.shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 393 / 851;
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #0a1130;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.shot figcaption {
  color: var(--ink-dim);
  font-size: 0.88rem;
}

.shot figcaption b {
  display: block;
  color: var(--ink);
  font-size: 0.94rem;
}

.shots-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.shots-count {
  margin-right: auto;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(19, 28, 63, 0.6);
  color: var(--ink-dim);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.shots-nav {
  display: none;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--panel) 0%, #101736 100%);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.shots.is-ready:not(.is-static) .shots-nav {
  display: grid;
}

.shots-nav svg {
  width: 20px;
  height: 20px;
}

.shots-nav:hover:not([disabled]) {
  border-color: var(--cyan);
  background: linear-gradient(180deg, #1a2450 0%, #131c3f 100%);
  transform: translateY(-1px);
}

.shots-nav:active:not([disabled]) {
  transform: translateY(0);
}

.shots-nav[disabled] {
  opacity: 0.3;
  cursor: default;
}

@media (prefers-reduced-motion: reduce) {
  .shots-nav {
    transition: none;
  }
}

.shots-hint {
  margin: 0;
  color: var(--ink-faint);
  font-size: 0.86rem;
}

@media (min-width: 700px) {
  .shot {
    flex-basis: 268px;
  }
}

@media (min-width: 1040px) {
  .shot {
    flex-basis: 300px;
  }
}
