/* `hidden` doit l'emporter : les blocs de cet ecran sont en flex. */
[hidden] { display: none !important; }

/* Ecran d'installation de l'app — partage par deux pages qui montrent la
   meme chose a deux entrees differentes :
     /place/<code>  le QR d'un lieu, quand Heezy n'est pas installee
     /beta/         le badge App Store du site, l'app n'y etant pas encore
   Toute retouche ici vaut pour les deux : c'est le but. */

:root {
  --rose: #E71D76;
  --rose-clair: #FF5FA2;
  --fond: #121116;
  --carte: #23232D;
  --doux: #8E8E9A;
  --trait: rgba(255, 255, 255, 0.08);
  --courbe: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--fond);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  text-align: center;
  /* Surtout PAS overflow:hidden : sur un petit iPhone, ou avec la taille
     de police systeme augmentee, la carte depasse l'ecran et le bouton
     devenait inatteignable. Les encoches sont gerees par env(). */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: calc(24px + env(safe-area-inset-top)) calc(20px + env(safe-area-inset-right))
           calc(24px + env(safe-area-inset-bottom)) calc(20px + env(safe-area-inset-left));
  -webkit-text-size-adjust: 100%;
}

/* --- decor : deux halos lents + un grain fin ------------------------
   Le grain casse le degrade en aplat numerique ; sans lui, les halos
   affichent des bandes visibles sur les ecrans OLED. */
.aurore, .grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.aurore::before, .aurore::after {
  content: '';
  position: absolute;
  width: 78vmax;
  height: 78vmax;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
}

.aurore::before {
  top: -34vmax;
  left: -26vmax;
  background: radial-gradient(circle, rgba(231, 29, 118, 0.36) 0%, transparent 68%);
  animation: derive 14s ease-in-out infinite alternate;
}

.aurore::after {
  bottom: -40vmax;
  right: -30vmax;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.30) 0%, transparent 68%);
  animation: derive 18s ease-in-out infinite alternate-reverse;
}

@keyframes derive {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(6vmax, 4vmax, 0) scale(1.14); }
}

.grain {
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.container {
  width: 100%;
  max-width: 400px;
  position: relative;
  z-index: 1;
}

.card {
  background: linear-gradient(168deg, #262631 0%, var(--carte) 46%, #1E1E27 100%);
  border-radius: 28px;
  padding: 30px 22px 26px;
  border: 1px solid var(--trait);
  /* L'ombre porte la carte, le lisere interieur en haut lui donne son
     epaisseur : c'est lui qui fait « objet » plutot que « rectangle ». */
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55),
              inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

/* --- entete ---------------------------------------------------------- */
.logo-splash {
  width: 214px;
  height: auto;
  display: block;
  margin: 4px auto 6px;
  animation: apparait 0.8s var(--courbe) both;
}

/* Le logo dit deja « Heezy » : le titre reste pour les lecteurs d'ecran
   et les moteurs, hors de l'ecran plutot que supprime. */
.hors-ecran {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.tagline {
  color: var(--doux);
  font-size: 16px;
  line-height: 1.5;
  margin-top: 8px;
  margin-bottom: 36px;
  animation: monte 0.6s 0.2s var(--courbe) both;
}

@keyframes apparait {
  from { opacity: 0; transform: scale(0.82) translateY(14px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes monte {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- redirection (Android, ordinateur) -------------------------------- */
.spinner-container {
  margin: 32px 0;
  animation: monte 0.6s 0.3s var(--courbe) both;
}

.spinner {
  width: 36px;
  height: 36px;
  margin: 0 auto;
  border: 3px solid rgba(231, 29, 118, 0.15);
  border-top-color: var(--rose);
  border-radius: 50%;
  animation: tourne 0.7s linear infinite;
}

@keyframes tourne { to { transform: rotate(360deg); } }

.redirect-text {
  color: var(--doux);
  font-size: 14px;
  margin-top: 14px;
}

/* --- boutons ---------------------------------------------------------- */
.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--rose-clair) 0%, var(--rose) 58%, #C4145F 100%);
  color: #FFFFFF;
  text-decoration: none;
  padding: 17px 32px;
  border-radius: 17px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.2px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 12px 28px rgba(231, 29, 118, 0.38),
              inset 0 1px 0 rgba(255, 255, 255, 0.22);
  animation: monte 0.6s 0.55s var(--courbe) both;
}

/* Reflet qui balaie le bouton : il attire l'oeil sur la seule action de
   l'ecran sans rien ajouter a l'interface. */
.btn::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60%;
  left: -80%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: skewX(-18deg);
  animation: reflet 4.5s 1.4s ease-in-out infinite;
}

@keyframes reflet {
  0%        { left: -80%; }
  22%, 100% { left: 130%; }
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(231, 29, 118, 0.46); }
.btn:active { transform: translateY(0) scale(0.985); }

.btn svg { width: 21px; height: 21px; flex-shrink: 0; }

.btn-pleine-largeur {
  display: flex;
  width: 100%;
  padding: 18px 24px;
}

.status {
  color: var(--doux);
  font-size: 13px;
  margin-top: 20px;
  animation: monte 0.6s 0.6s var(--courbe) both;
}

.divider {
  width: 40px;
  height: 2px;
  background: rgba(231, 29, 118, 0.3);
  border-radius: 1px;
  margin: 32px auto;
  animation: monte 0.6s 0.7s var(--courbe) both;
}

.footer {
  color: var(--doux);
  font-size: 13px;
  line-height: 1.6;
  animation: monte 0.6s 0.8s var(--courbe) both;
}

.footer strong { color: #FFFFFF; font-weight: 600; }
.footer .highlight { color: var(--rose); }

/* --- parcours iPhone (TestFlight) ------------------------------------- */
.pastille {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  padding: 6px 13px 6px 10px;
  border-radius: 999px;
  background: rgba(231, 29, 118, 0.12);
  border: 1px solid rgba(231, 29, 118, 0.28);
  color: #FF8FBE;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  animation: monte 0.6s 0.15s var(--courbe) both;
}

.pastille i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 0 0 rgba(231, 29, 118, 0.7);
  animation: battement 2.4s ease-out infinite;
}

@keyframes battement {
  0%   { box-shadow: 0 0 0 0 rgba(231, 29, 118, 0.7); }
  70%  { box-shadow: 0 0 0 9px rgba(231, 29, 118, 0); }
  100% { box-shadow: 0 0 0 0 rgba(231, 29, 118, 0); }
}

/* Raccourci pour qui a deja l'app : sans lui, un iPhone ou le lien
   universel ne part pas (adresse tapee a la main, ou « Safari » choisi
   une fois dans le bandeau iOS) reste coince sur un mode d'emploi
   d'installation qui ne le concerne pas. */
.rappel {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  margin: 18px 0 20px;
  padding: 11px 14px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--trait);
  text-decoration: none;
  text-align: left;
  transition: background 0.2s ease, border-color 0.2s ease;
  animation: monte 0.6s 0.25s var(--courbe) both;
}

.rappel:hover { background: rgba(255, 255, 255, 0.075); border-color: rgba(255, 255, 255, 0.16); }
.rappel:active { background: rgba(255, 255, 255, 0.10); }

.rappel img { width: 26px; height: 26px; border-radius: 8px; flex: none; }

.rappel-txt {
  flex: 1;
  color: #C9C9D3;
  font-size: 14px;
  font-weight: 500;
}

.rappel-action {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--rose-clair);
  font-size: 14px;
  font-weight: 700;
  flex: none;
}

.rappel-action svg { width: 15px; height: 15px; }

/* Message d'echec du raccourci : il prend la place du raccourci lui-meme,
   il repond a ce qu'on vient de toucher et la carte ne grandit pas. */
.absente {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  margin: 18px 0 20px;
  padding: 12px 14px;
  border-radius: 15px;
  background: rgba(231, 29, 118, 0.10);
  border: 1px solid rgba(231, 29, 118, 0.30);
  color: #FFD3E6;
  font-size: 13.5px;
  line-height: 1.45;
  text-align: left;
  animation: monte 0.35s var(--courbe) both;
}

.absente svg {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 1px;
  color: var(--rose-clair);
}

.absente strong { color: #FFFFFF; font-weight: 700; }

/* Quatre etapes au lieu de trois (le QR du lieu s'ajoute) : la phrase
   d'introduction repete alors la premiere etape, et c'est elle qui poussait
   l'avertissement hors de l'ecran. */
.parcours-long .prelude { display: none; }
.parcours-long .etapes { gap: 8px; }
.parcours-long .etape { padding: 11px 13px; }

.prelude {
  color: var(--doux);
  font-size: 14.5px;
  line-height: 1.55;
  margin-bottom: 14px;
  text-align: left;
  animation: monte 0.6s 0.3s var(--courbe) both;
}

.prelude strong { color: #FFFFFF; font-weight: 600; }

.etapes {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 22px;
}

.etape {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 13px;
  border-radius: 18px;
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--trait);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: monte 0.55s var(--courbe) both;
  animation-delay: var(--d);
}

.vignette {
  position: relative;
  flex: none;
  width: 46px;
  height: 46px;
}

.vignette img {
  width: 100%;
  height: 100%;
  border-radius: 13px;
  display: block;
}

/* Troisieme etape : pas d'app a montrer, donc un QR dessine dans la meme
   vignette que les deux icones, pour garder le rythme de la colonne. */
.vignette.dessin {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: linear-gradient(140deg, rgba(231, 29, 118, 0.34), rgba(231, 29, 118, 0.16));
  border: 1px solid rgba(231, 29, 118, 0.42);
}

.vignette.dessin svg { width: 26px; height: 26px; color: #FFB3D4; }

/* Le rang est un jeton pose sur la vignette : l'ordre reste lisible sans
   voler la place de l'icone, qui porte le sens. */
.rang {
  flex: none;
  width: 20px;
  font-size: 25px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1px;
  text-align: center;
  color: var(--rose-clair);
  background: linear-gradient(150deg, var(--rose-clair) 10%, var(--rose) 90%);
}

/* Le degrade ne remplit le chiffre que la ou le navigateur sait le
   decouper ; ailleurs la couleur pleine ci-dessus reste visible. */
@supports (-webkit-background-clip: text) or (background-clip: text) {
  .rang {
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.etape .titre {
  display: block;
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.2px;
  line-height: 1.25;
}

.etape .detail {
  display: block;
  color: var(--doux);
  font-size: 13px;
  line-height: 1.4;
  margin-top: 3px;
}

/* La mise en garde sur TestFlight vit dans cette note : c'est la derniere
   chose lue avant le bouton, donc la derniere chance de l'expliquer. */
.note strong {
  color: #FFD3E6;
  font-weight: 700;
}

.note {
  color: #74747F;
  font-size: 12.5px;
  line-height: 1.5;
  margin-top: 12px;
  animation: monte 0.6s 0.65s var(--courbe) both;
}

.cache { display: none !important; }

/* Ecrans courts : on resserre plutot que de faire defiler, et la phrase
   d'introduction saute — la premiere etape dit deja ce qu'est TestFlight.
   Ce qui doit rester visible sans defiler, c'est le bouton. */
@media (max-height: 700px) {
  .card { padding: 22px 20px 20px; }
  .logo-splash { width: 172px; margin: 0 auto 2px; }
  .pastille { margin-top: 8px; }
  .rappel { margin: 14px 0 14px; }
  .prelude { display: none; }
  .etapes { gap: 8px; margin-bottom: 18px; }
  .etape { padding: 10px 12px; }
  .btn-pleine-largeur { padding: 15px 20px; }
  .note { margin-top: 9px; font-size: 12px; }

  /* Quatre etapes sur un petit iPhone : chaque vignette perd quelques pixels
     et les cartes se resserrent, pour que la mise en garde reste au-dessus de
     la ligne de flottaison avec le bouton. */
  .parcours-long .card { padding: 20px 18px 16px; }
  .parcours-long .logo-splash { width: 132px; }
  .parcours-long .rappel { margin: 10px 0 10px; }
  .parcours-long .etapes { gap: 6px; margin-bottom: 14px; }
  .parcours-long .etape { padding: 8px 11px; gap: 10px; }
  .parcours-long .vignette { width: 40px; height: 40px; }
  .parcours-long .vignette img, .parcours-long .vignette.dessin { border-radius: 11px; }
  .parcours-long .vignette.dessin svg { width: 22px; height: 22px; }
  .parcours-long .rang { font-size: 22px; width: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
