/* =====================================================================
   BelleChezVous — feuille de style de la page de préinscription
   ---------------------------------------------------------------------
   Complément de `style.css`, chargé APRÈS lui (les tokens sont donc
   déjà définis, et ces règles l'emportent en cas de homonymie).
   Aucun CDN, aucune police externe : le site reste 100 % statique et
   lisible hors ligne.

   Règles reprises des corrections du 23/11 :
   - tailles de police en px (plancher) ou enherit : jamais de `clamp()`
     en `rem` sur un texte dans un conteneur étroit (le réglage de
     police du système s'applique alors et fait déborder) ;
   - largeur des champs = 100 % du conteneur, `box-sizing: border-box` ;
   - cibles tactiles ≥ 24 px (WCAG 2.5.8) : on vise 48 px.
   ===================================================================== */

/* ---------- 1. Bloc de formulaire ---------- */
.formulaire {
  position: relative; /* ancre du champ-piège, hors du flux visible */
  max-width: 44rem;
  margin-inline: auto;
  background: var(--blanc);
  border: 1px solid var(--trait);
  border-radius: var(--rayon-lg);
  padding: 1.25rem;
  box-shadow: var(--ombre-douce);
}

@media (min-width: 700px) {
  .formulaire {
    padding: 2rem 2.25rem;
  }
}

/* ---------- 2. Choix du profil (deux chemins visibles) ---------- */
.choix-profil {
  border: 0;
  padding: 0;
  margin: 0 0 1.75rem;
}

.choix-profil__legende {
  padding: 0;
  font-weight: 700;
  color: var(--vert-sombre);
  margin-bottom: 0.75rem;
}

.choix-cartes {
  display: grid;
  gap: var(--espace-sm);
}

@media (min-width: 860px) {
  .choix-cartes {
    grid-template-columns: 1fr 1fr;
    gap: var(--espace-md);
  }
}

.choix-carte {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  min-height: 48px;
  padding: 1rem;
  background: var(--creme-rose);
  border: 2px solid var(--trait);
  border-radius: var(--rayon);
  cursor: pointer;
}

.choix-carte:hover {
  border-color: var(--peche);
}

/* La carte sélectionnée se distingue par sa bordure ET son fond :
   l'information ne repose jamais sur la seule couleur du bouton radio. */
.choix-carte:has(:checked) {
  border-color: var(--vert);
  background: var(--sauge-50);
}

.choix-carte:has(:focus-visible) {
  outline: 3px solid var(--peche-fonce);
  outline-offset: 3px;
}

.choix-carte__radio {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  margin: 2px 0 0;
  accent-color: var(--vert);
}

.choix-carte__corps {
  display: block;
}

.choix-carte__titre {
  display: block;
  font-weight: 700;
  color: var(--vert-sombre);
}

.choix-carte__texte {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.95rem;
  color: var(--texte-doux);
}

/* ---------- 3. Champs ---------- */
.champ {
  margin-bottom: 1.35rem;
}

.champ__label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 700;
  color: var(--vert-sombre);
}

.champ__obligatoire {
  color: var(--peche-fonce);
}

.champ__saisie {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.85rem;
  font-family: inherit;
  /* 16 px minimum : en dessous, iOS zoome sur le champ au focus */
  font-size: 16px;
  color: var(--texte);
  background: var(--blanc);
  border: 1.5px solid var(--trait-fonce);
  border-radius: 10px;
}

.champ__saisie::placeholder {
  color: #8b968f;
}

.champ__saisie:focus-visible {
  outline: 3px solid var(--peche-fonce);
  outline-offset: 2px;
  border-color: var(--vert);
}

.champ__saisie[aria-invalid="true"] {
  border-color: #b3261e;
  background: #fff7f6;
}

.champ__aide {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: var(--texte-doux);
}

.champ__erreur {
  margin: 0.35rem 0 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: #a8241b;
}

/* ---------- 4. Case du consentement (facultative, décochée) ---------- */
.case-consentement {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  margin-top: 0.5rem;
  padding: 1rem;
  background: var(--sauge-50);
  border: 1px solid var(--sauge-200);
  border-radius: var(--rayon);
}

.case-consentement__boite {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  margin: 2px 0 0;
  accent-color: var(--vert);
}

.case-consentement__texte {
  display: block;
  font-size: 0.98rem;
}

.case-consentement__titre {
  display: block;
  font-weight: 700;
  color: var(--vert-sombre);
}

.case-consentement__detail {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.9rem;
  color: var(--texte-doux);
}

/* ---------- 5. Actions ---------- */
.actions-formulaire {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1.25rem;
  margin-top: 1.75rem;
}

.actions-formulaire .btn[disabled] {
  opacity: 0.65;
  cursor: progress;
}

.actions-formulaire__note {
  flex: 1 1 16rem;
  margin: 0;
  font-size: 0.9rem;
  color: var(--texte-doux);
}

/* ---------- 6. Retour (succès / erreur) ---------- */
.retour {
  margin-top: 1.5rem;
}

.retour:empty {
  display: none;
}

.retour__texte {
  margin: 0;
  padding: 1rem 1.1rem;
  border-radius: var(--rayon);
  font-weight: 600;
}

.retour__texte--succes {
  color: var(--vert-sombre);
  background: var(--sauge-50);
  border: 1px solid var(--sauge-200);
}

.retour__texte--erreur {
  color: #8f2317;
  background: #fff4f2;
  border: 1px solid var(--rose-300);
}

.retour__texte--info {
  color: var(--vert-sombre);
  background: var(--creme-rose);
  border: 1px solid var(--rose-200);
}

/* ---------- 7. Confirmation ---------- */
.confirmation {
  padding: 1.5rem;
  background: var(--sauge-50);
  border: 1px solid var(--sauge-200);
  border-radius: var(--rayon-lg);
}

.confirmation h2 {
  margin-top: 0;
}

.confirmation__recap {
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
  color: var(--texte-doux);
}

.confirmation__recap li {
  margin-bottom: 0.35rem;
}

/* ---------- 8. Champ-piège anti-robot ---------- */
/* Le champ existe réellement (les robots remplissent tous les champs),
   mais il est invisible et hors des deux navigationnaires : ni la vue,
   ni le lecteur d'écran, ni le clavier ne le rencontrent.
   Il est placé dans le coin du formulaire (left: 0) pour ne pas créer
   de débordement horizontal. */
.pot-de-miel {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* Le champ lui-même est réduit à 1 px : il ne peut pas recouvrir quoi
   que ce soit, même dans un navigateur qui ignorerait `overflow`. */
.pot-de-miel input {
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  border: 0;
  font-size: 1px;
}

/* ---------- 9. Encadré « ce qu'on garde / ce qu'on ne fait pas » ---------- */
.encadres-donnees {
  display: grid;
  gap: var(--espace-md);
}

@media (min-width: 860px) {
  .encadres-donnees {
    grid-template-columns: repeat(3, 1fr);
  }
}

.encadre-donnee {
  padding: 1.15rem;
  background: var(--blanc);
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
}

.encadre-donnee h3 {
  margin: 0 0 0.5rem;
  font-size: 1.02rem;
  color: var(--vert-sombre);
}

.encadre-donnee p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--texte-doux);
}

.encadre-donnee ul {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.95rem;
  color: var(--texte-doux);
}
