/* ============================================================
   T2PP · Page d'accueil « le défilé »
   Référence : design/maquettes/accueil/HANDOFF-T2PP-ACCUEIL.md
   Système V5 (mêmes jetons que Football Feat). Polices système uniquement.
   ============================================================ */
:root {
  --ff-bg: #0A1526;
  --ff-surface: #0F1E33;
  --ff-lime: #CCFF00;
  --ff-gold: #FFD60A;
  --ff-magenta: #FF006E;
  --ff-ink: #001033;
  --ff-text: #FFFFFF;
  --ff-display: 'Arial Black', Impact, sans-serif;
  --ff-body: Arial, Helvetica, sans-serif;
  --ff-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--ff-bg); color: var(--ff-text); }
body {
  font-family: var(--ff-body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;            /* seul le défilé défile */
}
button { font: inherit; color: inherit; cursor: pointer; }

/* Sprite d'icônes : jamais display:none (Safari perd les <use>). */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ------------------------------------------------------------
   En-tête : copie EXACTE de l'en-tête de Football Feat (V5),
   mesurée dans le navigateur. Il ne doit pas « sauter » quand on
   passe du hub au jeu. Seule différence : il est fixe, par-dessus
   le défilé (dans le jeu, l'accueil ne défile pas).
   ------------------------------------------------------------ */
.top-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  max-width: 100%; margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 14px;
  font-family: "Arial Black", "Helvetica Neue", Arial, sans-serif;
  pointer-events: none;        /* la bande vide laisse passer les gestes */
}
.top-bar > * { pointer-events: auto; }
@media (min-width: 600px) { .top-bar { padding: calc(18px + env(safe-area-inset-top, 0px)) 24px 18px; } }
@media (min-width: 700px) { .top-bar { max-width: 560px; } }
@media (min-width: 1100px) { .top-bar { max-width: 620px; } }

.tdp-logo {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 6px 13px 6px 6px;
  background: #fff; color: var(--ff-ink);
  border: none; border-radius: 999px; box-shadow: none;
  font-size: 13.3333px;
  transition: transform 200ms cubic-bezier(.22,1,.36,1);
}
.tdp-logo:active { transform: scale(0.95) rotate(-2deg); }
.tdp-ball { display: block; width: 26px; height: 26px; flex: 0 0 auto; }
.tdp-ball svg { display: block; width: 100%; height: 100%; }
.tdp-text { display: block; font-family: 'Arial Black', sans-serif; font-style: italic; font-size: 12px; font-weight: 900; letter-spacing: 1px; line-height: 14px; }
.tdp-num {
  display: inline-block; padding: 0 4px; margin: 0 1px;
  background: var(--ff-magenta); color: #fff; border-radius: 4px;
  font-size: 11px; line-height: 12px; transform: rotate(-3deg);
}

.hub-droite { display: flex; align-items: center; margin-left: auto; }
.hub-rond {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; flex: 0 0 auto; padding: 0;
  border: none; border-radius: 999px; background: #fff; color: var(--ff-ink);
  font-size: 13.3333px;
}
.hub-cloche { margin-right: 8px; }
.hub-cloche svg { width: 20px; height: 20px; display: block; }
.hub-cloche.is-off { color: rgba(0,16,51,.45); }
.hub-cloche.is-off::after {
  content: ''; position: absolute; left: 9px; right: 9px; height: 2px;
  background: currentColor; transform: rotate(-45deg); border-radius: 2px;
}
.hub-joueur { margin-right: 10px; display: inline-flex; align-items: center; padding: 0; border: none; background: transparent; line-height: 1; }
.hub-pastille {
  display: flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 9px; border-radius: 999px;
  background: #fff; color: var(--ff-ink);
  font-family: "Arial Black", Impact, sans-serif; font-size: 13px; line-height: 1;
}
.hub-pastille.is-long { font-size: 11px; }
.hub-connexion {
  display: flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 16px; border-radius: 999px;
  background: #fff; color: var(--ff-ink);
  font-family: "Arial Black", Impact, sans-serif; font-size: 12px; line-height: 12px; white-space: nowrap;
}
.hub-menu { flex-direction: column; gap: 4px; color: #fff; }
.hub-menu span { display: block; width: 17px; height: 2.5px; border-radius: 2px; background: var(--ff-ink); }

/* Dégradé sous l'en-tête : il reste lisible sur toutes les photos. */
.degrade-entete {
  position: fixed; left: 0; right: 0; top: 0; z-index: 15;
  height: calc(110px + env(safe-area-inset-top, 0px));
  background: linear-gradient(180deg, rgba(6,14,26,.75), rgba(6,14,26,0));
  pointer-events: none;
}

/* ------------------------------------------------------------
   Le défilé : une tuile = un écran, qui s'aimante.
   ------------------------------------------------------------ */
.defile {
  position: fixed; inset: 0;
  height: 100vh; height: 100dvh;
  overflow-y: auto; overflow-x: hidden;
  scroll-snap-type: y mandatory;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.defile::-webkit-scrollbar { display: none; }

.tuile {
  position: relative; overflow: hidden;
  height: 100vh; height: 100dvh;
  scroll-snap-align: start; scroll-snap-stop: always;
  background: var(--ff-bg);
}
.t-cadre { position: absolute; inset: 0; overflow: hidden; isolation: isolate; }
.t-photo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transform-origin: 55% 40%;
  filter: saturate(.45) brightness(.8) contrast(1.05);
  will-change: transform;
}
/* Jeu pas encore sorti : noir et blanc, en plus de Nuit de brume. */
.tuile.is-bientot .t-photo { filter: grayscale(1) saturate(.45) brightness(.8) contrast(1.05); }
.t-voile { position: absolute; inset: 0; background: rgba(10,21,38,.4); }
.t-degrade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(10,21,38,.7) 0%, rgba(10,21,38,.05) 22%, rgba(10,21,38,.15) 45%,
    rgba(10,21,38,.88) 70%, #0A1526 100%);
}
/* Toucher la photo = « Jouer » : zone au-dessus du bloc de texte. */
.t-toucher { position: absolute; inset: 0; display: block; background: transparent; border: 0; padding: 0; }

.t-bloc {
  position: absolute; left: 22px; right: 58px;
  bottom: calc(44px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 14px;
  pointer-events: none;
}
.t-bloc > * { pointer-events: auto; }
@media (min-width: 700px) {
  .t-bloc { left: 50%; right: auto; width: 480px; margin-left: -240px; }
}

.t-notif {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 13px 8px 10px; border-radius: 999px; background: var(--ff-magenta);
  font: italic 900 12px/1 var(--ff-display); text-transform: uppercase; letter-spacing: .02em; color: var(--ff-ink);
}
.t-notif::before { content: ''; width: 8px; height: 8px; border-radius: 99px; background: var(--ff-ink); }
.t-etat {
  font: 700 11px/1.2 var(--ff-mono); letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255,255,255,.82);
}
.t-titre {
  margin: 0;
  font: italic 900 54px/.86 var(--ff-display); letter-spacing: -.055em; text-transform: uppercase;
  color: #fff; text-wrap: balance; overflow-wrap: break-word;
}
.t-titre.is-long { font-size: 44px; }
@media (max-width: 380px) { .t-titre { font-size: 48px; } .t-titre.is-long { font-size: 40px; } }
.t-phrase { margin: 0; font: 700 15px/1.45 var(--ff-body); color: rgba(255,255,255,.86); text-wrap: pretty; }

.t-jouer, .t-decouvrir {
  display: flex; align-items: center; justify-content: center; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.t-jouer {
  gap: 10px; min-height: 58px; border-radius: 16px; background: var(--ff-lime); color: var(--ff-ink);
  font: italic 900 15px/1 var(--ff-display); text-transform: uppercase; letter-spacing: .04em;
}
.t-jouer.is-joue {
  min-height: 56px; background: transparent; color: #fff;
  border: 1.5px solid rgba(255,255,255,.6);
  font: 700 15px/1 var(--ff-body); text-transform: none; letter-spacing: 0;
}
.t-decouvrir {
  min-height: 48px; border-radius: 14px; border: 1.5px solid rgba(255,255,255,.55); color: #fff;
  font: 700 14.5px/1 var(--ff-body);
}
.t-jouer:active, .t-decouvrir:active { transform: scale(.98); }

.t-indice {
  position: absolute; left: 0; right: 0; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  text-align: center; pointer-events: none;
  font: 700 10.5px/1 var(--ff-mono); letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255,255,255,.72);
}

/* ------------------------------------------------------------
   Colonne de points à droite
   ------------------------------------------------------------ */
.rail {
  position: fixed; right: 16px; top: 50%; z-index: 16;
  transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  pointer-events: none;
}
.rail span {
  display: block; width: 7px; height: 7px; border-radius: 9px;
  background: rgba(255,255,255,.62);
  transition: height .2s;
}
.rail span.is-joue { background: rgba(255,255,255,.4); }
.rail span.is-courant { height: 24px; background: #fff; }
.rail span.is-notif { background: var(--ff-magenta); }

@media (prefers-reduced-motion: reduce) {
  .rail span, .tdp-logo { transition: none; }
}
