/* ===== Écrans d'accès : connexion, invitation, anneau de scan, robustesse, iris ===== */
.acces {
  display: flex; flex-direction: column; gap: 18px;
  min-height: calc(100dvh - 64px - var(--zone-haut) - var(--zone-bas));
  position: relative; isolation: isolate;
}
/* Le fond « on air » (lueurs, voyant) vient du fond global de base.css. */
.acces__marque { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.acces__marque .marque__logo svg { stroke: #fff; fill: none; }
.acces__corps { display: flex; flex-direction: column; gap: 14px; margin-top: auto; }
.acces__titre {
  display: flex; align-items: center; gap: 12px;
  font: 800 clamp(2.4rem, 11vw, 3.2rem)/0.98 var(--police-titre); letter-spacing: 0.02em; text-transform: uppercase;
  overflow-wrap: anywhere;
}
.acces__titre::before {
  content: ""; flex: none; align-self: stretch; width: 5px; border-radius: 3px;
  background: linear-gradient(180deg, #FF3B47, #A60F1B); box-shadow: var(--lueur-antenne);
}
.acces__sous { color: var(--muted); font-size: 1.0625rem; max-width: 34ch; margin-top: -4px; }
.acces__vide { display: grid; justify-items: start; gap: 14px; }
.acces__formulaire { display: grid; gap: 14px; margin-bottom: 0; }
.acces__valider { width: 100%; }
.acces__actions { display: grid; gap: 6px; }
.acces__actions .bouton { width: 100%; }

.squelette--titre { height: 56px; width: 70%; }
.squelette--carte { height: 190px; }

/* Bouton discret : « Plus tard » */
.bouton--discret { background: transparent; color: var(--muted); font-weight: 600; }
.bouton--discret:hover { color: var(--ink); }

/* Champs */
.champ label {
  display: block; margin-bottom: 6px; color: var(--muted);
  font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
}
.champ input {
  width: 100%; min-height: 52px; padding: 0 16px; border: 1px solid var(--ligne); border-radius: var(--rayon-m);
  background: var(--champ); color: var(--ink); font-size: 1.0625rem;
  transition: border-color var(--duree-courte), box-shadow var(--duree-courte);
}
.champ input:focus-visible { outline: none; }
.champ input:focus { border-color: var(--focus); box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 24%, transparent); }
.champ input[readonly] { color: var(--muted); }
.champ__ligne { position: relative; }
.champ__ligne input { padding-right: 104px; }
.champ__bascule {
  position: absolute; top: 4px; right: 4px; bottom: 4px; min-width: 92px; padding: 0 12px; border: 0; border-radius: var(--rayon-m);
  background: transparent; color: var(--toi); font-weight: 700; font-size: 0.9375rem;
}
.champ__bascule:active { background: var(--toi-fond); }

/* Messages (statuts, erreurs) */
.messages:empty { display: none; }
.message { padding: 12px 14px; border-radius: var(--rayon-m); font-size: 0.975rem; line-height: 1.4; border: 1px solid transparent; }
.message--erreur { background: color-mix(in srgb, var(--antenne) 13%, transparent); border-color: color-mix(in srgb, var(--antenne) 40%, transparent); color: light-dark(#9B1020, #FFB3B8); }
.message--doux { background: var(--champ); border-color: var(--ligne); color: var(--ink); }
.message--ok { background: color-mix(in srgb, var(--ok) 14%, transparent); border-color: color-mix(in srgb, var(--ok) 40%, transparent); color: light-dark(#0F6B30, #86EFAC); }

/* Indicateur de robustesse */
.robustesse { display: grid; gap: 8px; --couleur: var(--ligne); }
.robustesse[data-niveau="0"] { --couleur: var(--antenne); }
.robustesse[data-niveau="1"] { --couleur: light-dark(#B45309, #FBBF24); }
.robustesse[data-niveau="2"] { --couleur: light-dark(#4D7C0F, #A3E635); }
.robustesse[data-niveau="3"] { --couleur: var(--ok); }
.robustesse__piste { height: 8px; border-radius: var(--rayon-pilule); background: var(--ligne); overflow: hidden; }
.robustesse__jauge { display: block; height: 100%; border-radius: inherit; background: var(--couleur); box-shadow: 0 0 12px color-mix(in srgb, var(--couleur) 55%, transparent); transition: background var(--duree-moyenne); }
.robustesse__texte { color: var(--muted); font-size: 0.9rem; font-weight: 500; }
.robustesse:not([data-niveau="vide"]) .robustesse__texte { color: var(--ink); font-weight: 600; }

/* Bouton d'empreinte (connexion) */
.acces__empreinte { display: grid; gap: 14px; }
.scan-bouton {
  display: grid; justify-items: center; gap: 2px; justify-self: center; min-width: 44px; min-height: 44px; padding: 4px 18px 6px;
  border: 0; border-radius: var(--rayon-l); background: transparent; color: var(--ink);
  transition: transform var(--duree-courte) var(--ease-sortie);
}
.scan-bouton:active { transform: scale(0.96); }
.scan-bouton__libelle { font: 800 1.6rem/1 var(--police-titre); letter-spacing: 0.14em; text-transform: uppercase; }
.scan-bouton__aide { color: var(--muted); font-size: 0.875rem; }
.scan-bouton--en-avant .scan-bouton__libelle { color: var(--antenne); }
.scan-bouton--en-avant .scan__anneau { stroke-width: 3.5; }
.scan-bouton--en-avant .scan { animation: lueur-en-avant 1.6s ease-in-out infinite; }
@keyframes lueur-en-avant { 0%, 100% { filter: drop-shadow(0 0 4px rgb(255 59 71 / 0.3)); } 50% { filter: drop-shadow(0 0 20px rgb(255 59 71 / 0.85)); } }
.acces__separateur { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 0.875rem; }
.acces__separateur::before, .acces__separateur::after { content: ""; flex: 1; height: 1px; background: var(--ligne); }

/* Anneau de scan */
.scan { --taille: 132px; position: relative; display: block; width: var(--taille); height: var(--taille); }
.scan__svg { width: 100%; height: 100%; overflow: visible; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.scan__anneau { fill: color-mix(in srgb, var(--antenne) 9%, transparent); stroke: var(--antenne); stroke-width: 2.5; filter: drop-shadow(0 0 8px rgb(255 59 71 / 0.45)); transition: stroke var(--duree-moyenne), fill var(--duree-moyenne); }
.scan__halo { stroke: var(--antenne); stroke-width: 1.5; opacity: 0; }
.scan__arc { stroke: var(--antenne); stroke-width: 4; opacity: 0; transition: opacity var(--duree-moyenne); }
.scan__empreinte { stroke: var(--ink); stroke-width: 4.2; opacity: 0.92; }
.scan__laser { stroke: var(--antenne); stroke-width: 2.5; opacity: 0; filter: drop-shadow(0 0 4px #FF3B47); }
.scan__coche { stroke: var(--ok); stroke-width: 7; opacity: 0; }
.scan[data-etat="ecoute"] .scan__arc, .scan[data-etat="ecoute"] .scan__laser { opacity: 1; }
.scan[data-etat="ecoute"] .scan__anneau { stroke-width: 3; }
.scan[data-etat="succes"] .scan__anneau { stroke: var(--ok); fill: color-mix(in srgb, var(--ok) 14%, transparent); filter: drop-shadow(0 0 10px color-mix(in srgb, var(--ok) 55%, transparent)); }
.scan[data-etat="succes"] .scan__coche { opacity: 1; }

/* Ouverture en iris à la réussite : voile qui s'élargit depuis l'anneau (clip-path posé par le script). */
.iris {
  position: fixed; inset: 0; z-index: 95;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), #FF3B47 0, #C4141F 9%, #1A0E11 42%, #0E1013 100%);
}

@media (prefers-reduced-motion: reduce) {
  .scan-bouton--en-avant .scan { animation: none; filter: drop-shadow(0 0 14px rgb(255 59 71 / 0.7)); }
}

/* Motif d'ondes : remplit l'espace libre des écrans d'invitation, disparaît quand la hauteur manque. */
.acces__onde, .acces__onde-place { flex: 1; min-height: 0; }
.acces__onde { position: relative; display: grid; place-items: center; overflow: hidden; }
.acces__onde-anneau {
  position: absolute; width: 120px; height: 120px; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--antenne) 55%, transparent);
  animation: onde 3.6s ease-out infinite;
}
.acces__onde-anneau:nth-child(2) { animation-delay: 1.2s; }
.acces__onde-anneau:nth-child(3) { animation-delay: 2.4s; }
.acces__onde-coeur {
  position: relative; width: 92px; height: 92px; display: grid; place-items: center; border-radius: 30px; color: var(--antenne);
  background: var(--carte-sans-flou); border: 1px solid var(--verre-bord); box-shadow: var(--ombre-1), var(--lueur-antenne);
}
@keyframes onde { from { transform: scale(0.8); opacity: 0.9; } to { transform: scale(2.6); opacity: 0; } }
.acces[data-etape="invalide"] .acces__onde-anneau { display: none; }
/* Étape empreinte : l'anneau de scan tient la vedette dans l'espace libre, au-dessus du titre. */
.acces[data-etape="empreinte"] .acces__onde-place { display: grid; place-items: center; min-height: 190px; }
.acces[data-etape="empreinte"] .acces__onde-place .scan { --taille: min(66vw, 260px); }
@media (max-height: 700px) { .acces__onde { display: none; } .acces[data-etape="empreinte"] .acces__onde-place .scan { --taille: 150px; } }
@media (prefers-reduced-motion: reduce) { .acces__onde-anneau { animation: none; opacity: 0.35; } .acces__onde-anneau:nth-child(2) { transform: scale(1.7); } .acces__onde-anneau:nth-child(3) { transform: scale(2.4); } }
