/* ── « Ton année sur AlibiRP » : la story plein écran ──────────────────────
   Chargée uniquement sur les pages du récap. Tout est en CSS : aucune image,
   aucune police, aucune bibliothèque — une story doit s'ouvrir instantanément,
   y compris en 4G sur un téléphone.
   © by AlibiDev */

body.st-ouverte { overflow: hidden; }

.st {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; flex-direction: column;
  background: #05060a; color: #fff;
  opacity: 0; transition: opacity .22s ease;
  font-feature-settings: 'tnum' 1;
}
.st.st-on { opacity: 1; }

/* Barre segmentée, comme une story de téléphone. */
.st-barres {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3;
  display: flex; gap: 4px; padding: 10px 12px 0;
}
.st-b { flex: 1; height: 3px; border-radius: 99px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.st-b i { display: block; height: 100%; width: 0; background: #fff; border-radius: 99px; }

.st-haut {
  position: absolute; top: 18px; left: 0; right: 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; pointer-events: none;
}
.st-marque { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; opacity: .9; }
.st-marque img { width: 24px; height: 24px; object-fit: contain; }
.st-outils { display: inline-flex; gap: 6px; pointer-events: auto; }
.st-outils button {
  width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .12); color: #fff; font-size: .95rem;
  display: grid; place-items: center;
}
.st-outils button:hover { background: rgba(255, 255, 255, .22); }
.st-outils button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Les deux moitiés d'écran : reculer à gauche, avancer à droite. */
.st-zone {
  position: absolute; top: 0; bottom: 0; width: 50%; z-index: 2;
  border: 0; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.st-prec { left: 0; }
.st-suiv { right: 0; }
.st-zone:focus-visible { outline: 2px solid rgba(255, 255, 255, .6); outline-offset: -6px; }

/* La scène : une couleur par carte. */
.st-scene {
  position: relative; flex: 1; overflow: hidden;
  display: grid; place-items: center; padding: 72px 24px 56px;
  transition: background .5s ease;
}
.st-scene.f-intro    { background: radial-gradient(120% 90% at 50% 0%, #1d2a52, #05060a 70%); }
.st-scene.f-temps    { background: radial-gradient(120% 90% at 50% 10%, #123a63, #05060a 70%); }
.st-scene.f-mois     { background: radial-gradient(120% 90% at 50% 10%, #3c2360, #05060a 70%); }
.st-scene.f-route    { background: radial-gradient(120% 90% at 50% 10%, #0f4443, #05060a 70%); }
.st-scene.f-vehicule { background: radial-gradient(120% 90% at 50% 10%, #5a2a16, #05060a 70%); }
.st-scene.f-job      { background: radial-gradient(120% 90% at 50% 10%, #113f27, #05060a 70%); }
.st-scene.f-police   { background: radial-gradient(120% 90% at 50% 10%, #5c1130, #05060a 70%); }
.st-scene.f-rang     { background: radial-gradient(120% 90% at 50% 10%, #5a4410, #05060a 70%); }
.st-scene.f-fin      { background: radial-gradient(120% 90% at 50% 0%, #22306a, #05060a 72%); }

.st-carte { position: relative; z-index: 1; text-align: center; max-width: 760px; }
.st-petit {
  display: block; font-size: clamp(.82rem, 2.6vw, 1rem); letter-spacing: .1em;
  text-transform: uppercase; opacity: .72; margin-bottom: 14px;
  animation: st-monte .55s cubic-bezier(.2, .8, .2, 1) both;
}
.st-gros {
  display: block; font-size: clamp(2.8rem, 13vw, 7rem); line-height: .98; letter-spacing: -.02em;
  text-shadow: 0 10px 50px rgba(0, 0, 0, .5);
  animation: st-entre .7s cubic-bezier(.2, .9, .2, 1) .1s both;
}
.st-gros.st-long { font-size: clamp(1.9rem, 8vw, 4.2rem); }
.st-sous {
  display: block; margin-top: 16px; font-size: clamp(.95rem, 3.4vw, 1.35rem); opacity: .82;
  animation: st-monte .6s cubic-bezier(.2, .8, .2, 1) .28s both;
}
@keyframes st-entre {
  from { opacity: 0; transform: translateY(26px) scale(.86); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: none; }
}
@keyframes st-monte { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.st-actions {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 30px;
  animation: st-monte .6s ease .5s both;
}
.st-actions .btn { pointer-events: auto; }

/* ── Décors ──────────────────────────────────────────────────────────────── */
.st-deco { position: absolute; inset: 0; pointer-events: none; overflow: hidden; opacity: .5; }

/* Une skyline qui monte du bas. */
.st-ville { display: flex; align-items: flex-end; gap: 6px; padding: 0 4%; }
.st-ville span {
  flex: 1; height: var(--h); border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .02));
  transform-origin: bottom; transform: scaleY(0);
  animation: st-pousse .8s cubic-bezier(.2, .8, .2, 1) calc(var(--n) * 50ms) both;
}
@keyframes st-pousse { to { transform: scaleY(1); } }

/* Des bandes de route qui défilent. */
.st-route { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; }
.st-route span {
  width: 10px; height: 54px; border-radius: 6px; background: rgba(255, 255, 255, .3);
  animation: st-file 1.5s linear calc(var(--n) * -214ms) infinite;
}
@keyframes st-file { from { transform: translateY(-100vh); } to { transform: translateY(100vh); } }

/* La courbe des mois, qui pousse. */
.st-courbe { display: flex; align-items: flex-end; justify-content: center; gap: 12px; padding: 0 8% 12%; }
.st-courbe span {
  width: 44px; height: var(--h); border-radius: 8px 8px 2px 2px; position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, .08));
  transform-origin: bottom; transform: scaleY(0);
  animation: st-pousse .7s cubic-bezier(.2, .8, .2, 1) calc(var(--n) * 90ms) both;
}
.st-courbe em {
  position: absolute; bottom: -22px; left: 0; right: 0; text-align: center;
  font-style: normal; font-size: .7rem; opacity: .7; text-transform: capitalize;
}

/* Deux gyrophares. */
.st-gyro { display: flex; align-items: center; justify-content: space-between; padding: 0 12%; }
.st-gyro span {
  width: 42vw; height: 42vw; max-width: 420px; max-height: 420px; border-radius: 50%;
  filter: blur(60px); animation: st-pulse 1.4s ease-in-out infinite;
}
.st-gyro span:first-child { background: rgba(60, 120, 255, .75); }
.st-gyro span:last-child { background: rgba(255, 40, 90, .75); animation-delay: .7s; }
@keyframes st-pulse { 0%, 100% { opacity: .25; transform: scale(.85); } 50% { opacity: .9; transform: scale(1.1); } }

/* Un ciel d'étoiles. */
.st-etoiles span {
  position: absolute; left: var(--x); top: var(--y); width: 3px; height: 3px;
  border-radius: 50%; background: #fff;
  animation: st-scintille 2.6s ease-in-out calc(var(--n) * 130ms) infinite;
}
@keyframes st-scintille { 0%, 100% { opacity: .15; transform: scale(1); } 50% { opacity: 1; transform: scale(1.8); } }

/* Pause : tout se calme, on comprend que c'est volontaire. */
.st-pause .st-deco { animation-play-state: paused; opacity: .25; }
.st-pause .st-carte { opacity: .82; }

/* Le bouton qui lance la story, sur la page. */
.wr-lancer {
  display: inline-flex; align-items: center; gap: 12px; cursor: pointer;
  padding: 16px 28px; border: 0; border-radius: 99px; color: #fff;
  font-size: 1.05rem; font-weight: 700;
  background: linear-gradient(120deg, var(--blue, #4f8cff), var(--accent, #ff0066));
  box-shadow: 0 18px 44px -18px rgba(79, 140, 255, .9);
  animation: st-respire 2.8s ease-in-out infinite;
}
.wr-lancer:hover { filter: brightness(1.08); }
.wr-lancer:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.wr-lancer i { font-size: 1.1rem; }
@keyframes st-respire {
  0%, 100% { transform: scale(1); box-shadow: 0 18px 44px -18px rgba(79, 140, 255, .9); }
  50% { transform: scale(1.035); box-shadow: 0 22px 54px -16px rgba(79, 140, 255, 1); }
}
.wr-lancer-bloc { text-align: center; margin: 0 0 4px; }
.wr-lancer-bloc p { margin: 10px 0 0; font-size: .88rem; color: rgba(255, 255, 255, .55); }

@media (max-width: 560px) {
  .st-courbe span { width: 26px; }
  .st-scene { padding: 86px 18px 48px; }
}

/* Qui a demandé moins de mouvement n'en reçoit aucun : la story reste lisible,
   les cartes s'affichent simplement sans animation. */
@media (prefers-reduced-motion: reduce) {
  .st-gros, .st-petit, .st-sous, .st-actions,
  .st-ville span, .st-route span, .st-courbe span, .st-gyro span, .st-etoiles span,
  .wr-lancer { animation: none !important; }
  .st-ville span, .st-courbe span { transform: none; }
  .st-route, .st-gyro { display: none; }
}
.st-douce .st-deco { display: none; }
