/* ==========================================================================
   SCEALIA : PAGE BÊTA (/beta)
   --------------------------------------------------------------------------
   La page du QR code des flyers (09/10/2026). Pensée d'abord pour un
   téléphone tenu d'une main : une colonne, des champs de 48 px de haut, un
   texte de saisie à 16 px (sous ce seuil, Safari zoome sur le champ). Même
   famille que /verifier, « classe, tech et sobre » : un panneau blanc sur le
   crème, un filet fin tout autour, aucune animation décorative.
   ========================================================================== */

body.beta {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.55;
}

/* ─── En-tête : la marque seule ────────────────────────────────────────── */
.beta-tete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 16px 4px;
}

.beta-tete .brand-mark { width: 36px; height: 36px; }
.beta-tete .brand-wordmark { font-size: 23px; }

.beta-pastille {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  border: 1px solid rgba(20, 130, 135, 0.35);
  border-radius: 100px;
  padding: 4px 11px;
}

/* ─── Contenu ──────────────────────────────────────────────────────────── */
.beta-page {
  flex: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

/* Les sections de la feuille commune portent les grandes marges de l'accueil :
   ici, chaque bloc règle son espace. :where() garde la spécificité au plus bas,
   pour que les classes ci-dessous l'emportent. Pas de barre de navigation fixe
   au-dessus des ancres : la marge de défilement redevient courte. */
:where(.beta-page) section {
  padding: 0;
  margin: 0;
  max-width: none;
}

.beta-page section[id] { scroll-margin-top: 16px; }

.beta-intro { margin-bottom: 22px; }
.beta-intro .eyebrow { margin-bottom: 14px; }

.beta-intro h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 8.5vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--nuit);
  margin-bottom: 12px;
  text-wrap: balance;
}

.beta-intro h1 em { font-style: italic; color: var(--teal); }

.beta-intro .lede {
  font-size: 16px;
  color: var(--muted);
  max-width: 56ch;
}

.beta-panneau {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  padding: 22px 18px 20px;
}

.beta-panneau h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.15;
  color: var(--nuit);
  margin-bottom: 16px;
}

/* ─── Formulaire ───────────────────────────────────────────────────────── */
.beta-ligne { display: grid; gap: 0 12px; }

.beta-champ { margin-bottom: 14px; }

.beta-champ label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--nuit);
  margin-bottom: 6px;
}

.beta-facultatif {
  font-weight: 400;
  color: var(--sub);
  font-size: 13px;
}

.beta-champ input,
.beta-champ select {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color var(--dur-1) var(--ease-out), box-shadow var(--dur-1) var(--ease-out);
}

.beta-champ select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 40px;
}

.beta-champ select:invalid { color: var(--sub); }

.beta-champ select option { color: var(--text); }

.beta-champ input:focus,
.beta-champ select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(20, 130, 135, 0.18);
}

.beta-champ [aria-invalid="true"] { border-color: #8A4334; }

/* Les refus, sous le champ concerné, dans la couleur des erreurs du site. */
.beta-champ-erreur {
  margin-top: 6px;
  font-size: 14px;
  color: #8A4334;
}

.beta-champ-erreur--case { margin: -6px 0 14px 30px; }

.beta-case {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}

.beta-case input {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  accent-color: var(--teal);
}

/* Champ piège : hors de l'écran, jamais visible. */
.beta-piege {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.beta-bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  padding: 12px 22px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  color: var(--cream);
  background: var(--nuit);
  border: 1px solid var(--nuit);
  border-radius: 100px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur-1) var(--ease-out);
}

.beta-bouton:hover { background: var(--profond); }
.beta-bouton:disabled { opacity: 0.6; cursor: progress; }

.beta-bouton--second {
  color: var(--nuit);
  background: var(--surface);
  border-color: var(--border);
}

.beta-bouton--second:hover { background: var(--cream); }

.beta-statut {
  margin-top: 10px;
  font-size: 14px;
  color: #8A4334;
}

.beta-statut:empty { display: none; }

.beta-erreur-globale {
  margin-bottom: 14px;
  font-size: 14px;
  color: #8A4334;
}

.beta-mention {
  margin-top: 16px;
  font-size: 12px;
  line-height: 1.5;
  text-align: justify;
  color: var(--muted);
}

.beta-mention a { color: var(--nuit); }

/* L'astérisque d'une case obligatoire, dans la couleur des refus. */
.beta-obligatoire { color: #8A4334; font-weight: 600; }

/* ─── Les étapes de la bêta ────────────────────────────────────────────── */
/* Masquées tant que l'inscription n'est pas faite : affichées par le script
   (classe), ou sans script par l'ancre #etapes de la redirection (:target). */
.beta-etapes { display: none; }
.beta-etapes:target,
.beta-etapes.est-visible { display: block; }
.beta-etapes:focus { outline: none; }

.beta-merci {
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 10px;
}

/* Un bouton par système, côte à côte même sur un téléphone : « Inscription »
   en petit, le système en grand. iPhone est grisé, sans être `disabled` : il
   garde le focus et le toucher, qui font paraître sa bulle. */
.beta-plateformes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

/* Sur un téléphone, le seul bouton de son système, sur toute la largeur. */
.beta-plateformes--seule { grid-template-columns: 1fr; }

.beta-plateforme {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
  min-height: 60px;
  padding: 9px 10px;
  font: inherit;
  color: var(--cream);
  background: var(--nuit);
  border: 1px solid var(--nuit);
  border-radius: 14px;
  cursor: pointer;
  transition: background-color var(--dur-1) var(--ease-out);
}

.beta-plateforme:hover { background: var(--profond); }
a.beta-plateforme { text-decoration: none; }

.beta-plateforme-petit {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.8;
}

.beta-plateforme-nom {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
}

.beta-plateforme-iphone { position: relative; display: block; }

/* Dans le formulaire, à la place de « Rejoindre la bêta » (19/10/2026) : pendant
   l'envoi, le bouton touché attend, sans être `disabled`. */
.beta-plateformes--formulaire { margin: 4px 0 0; }
/* « Rejoindre la bêta » sur une ligne, même sur un téléphone de 360 px de large. */
.beta-plateformes--formulaire .beta-plateforme-petit { letter-spacing: 0.04em; white-space: nowrap; }
.beta-plateforme[aria-busy="true"] { opacity: 0.6; cursor: progress; }

.beta-plateforme--bientot,
.beta-plateforme--bientot:hover {
  color: var(--sub);
  background: var(--cream);
  border-color: var(--border);
  cursor: not-allowed;
}

/* La bulle, au-dessus du bouton iPhone. Au survol d'une souris, au clavier, ou
   au toucher (classe posée par beta.js, retirée après quelques secondes). */
.beta-bulle {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--cream);
  background: var(--nuit);
  border-radius: 8px;
  box-shadow: var(--shadow-2);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--dur-1) var(--ease-out), visibility var(--dur-1) var(--ease-out);
}

.beta-bulle::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--nuit);
}

.beta-plateforme--bientot:focus-visible + .beta-bulle,
.beta-bulle.est-visible {
  opacity: 1;
  visibility: visible;
}

@media (hover: hover) {
  .beta-plateforme-iphone:hover .beta-bulle { opacity: 1; visibility: visible; }
}

/* La suite de « Inscription Android » : la consigne pendant l'aller-retour
   vers la page du groupe, puis le décompte avant Google Play. */
.beta-suite {
  padding: 14px;
  margin-bottom: 18px;
  background: var(--cream);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
}

.beta-suite-texte {
  font-size: 15px;
  color: var(--nuit);
  margin-bottom: 12px;
}

.beta-suite-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.beta-suite-actions .beta-bouton { width: auto; min-height: 44px; font-size: 15px; }

.beta-suite-annuler {
  padding: 8px 2px;
  font: inherit;
  font-size: 14px;
  color: var(--muted);
  background: none;
  border: 0;
  text-decoration: underline;
  cursor: pointer;
}

.beta-aide {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 14px;
}

.beta-liste { list-style: none; }

.beta-liste li {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--border-soft);
}

.beta-liste li:first-child { border-top: 0; padding-top: 4px; }
.beta-liste li > div { flex: 1; min-width: 0; }

.beta-num {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-weight: 600;
  font-size: 15px;
  color: var(--teal);
  border: 1px solid rgba(20, 130, 135, 0.45);
  font-variant-numeric: tabular-nums;
}

.beta-liste h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--nuit);
  margin: 3px 0 2px;
}

.beta-liste p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 10px;
}

.beta-note {
  font-size: 14px;
  color: var(--muted);
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}

/* ─── Pied ─────────────────────────────────────────────────────────────── */
/* Une ligne de liens sur le crème, et non le pied bleu nuit du site. */
.beta-pied {
  background: none;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  padding: 18px 16px 26px;
  font-size: 13px;
}

.beta-pied a { color: var(--muted); text-decoration: none; }
.beta-pied a:hover { color: var(--nuit); text-decoration: underline; }

/* ─── À partir d'une tablette ──────────────────────────────────────────── */
@media (min-width: 560px) {
  .beta-page { padding-top: 36px; }
  .beta-panneau { padding: 30px 30px 26px; }
  .beta-ligne { grid-template-columns: 1fr 1fr; }
  .beta-bouton--second,
  .beta-liste .beta-bouton { width: auto; }
}

/* ─── La consigne avant la page Google ou Apple (19/10/2026) ───────────── */
/* Une fenêtre sur un voile bleu nuit, le panneau de la page en plus grand :
   ce qu'il faudra toucher, puis « Compris » après un rond d'une seconde. */
.beta-consigne {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(18, 38, 62, 0.55);
  animation: beta-voile 200ms ease-out;
}

.beta-consigne-fenetre {
  width: 100%;
  max-width: 420px;
  max-height: 100%;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  box-shadow: 0 18px 48px rgba(18, 38, 62, 0.28);
  padding: 26px 22px 22px;
  animation: beta-fenetre 200ms ease-out;
}

.beta-consigne-fenetre:focus { outline: none; }

.beta-consigne-fenetre h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.15;
  color: var(--nuit);
  margin-bottom: 14px;
}

.beta-consigne-liste {
  margin: 0 0 18px;
  padding-left: 22px;
  font-size: 16px;
  color: var(--text);
}

.beta-consigne-liste li { padding-left: 4px; margin-bottom: 10px; }
.beta-consigne-liste li::marker { font-weight: 600; color: var(--teal); }

/* La connexion à Google, avant les étapes d'Android : un encadré clair, le
   premier lu (Samuel, 20/10/2026 : plus clair et plus visible). Un filet fin
   tout autour, comme le reste du site. */
.beta-consigne-google {
  margin: 0 0 16px;
  padding: 12px 14px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  background: #FBF0DA;
  border: 1px solid #E8CF9C;
  border-radius: 12px;
}

.beta-consigne-google-titre {
  font-weight: 600;
  color: var(--nuit);
  margin-bottom: 4px;
}

.beta-consigne-ok { gap: 10px; }
.beta-consigne-rond[hidden] { display: none; }
.beta-consigne-ok:disabled { cursor: wait; }
.beta-consigne-ok.est-pret { animation: beta-pret 400ms ease-out; }

/* Le rond de dix secondes : un cercle qui se trace jusqu'au passage, de
   lui-même, à la page suivante. */
.beta-consigne-rond { width: 20px; height: 20px; transform: rotate(-90deg); }
.beta-consigne-rond circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 50.27;
  stroke-dashoffset: 50.27;
}
.beta-consigne-rond.est-anime circle { animation: beta-rond 10s linear forwards; }

@keyframes beta-rond { to { stroke-dashoffset: 0; } }
@keyframes beta-voile { from { opacity: 0; } }
@keyframes beta-fenetre { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
@keyframes beta-pret { 40% { transform: scale(1.03); } }

@media (prefers-reduced-motion: reduce) {
  .beta-consigne,
  .beta-consigne-fenetre,
  .beta-consigne-ok.est-pret { animation: none; }
}

@media (prefers-reduced-motion: reduce) {
  .beta-champ input,
  .beta-champ select,
  .beta-bouton,
  .beta-plateforme,
  .beta-bulle { transition: none; }
}
