/* Demande de rappel (outils/rappel.html) : un écran à la fois, carte blanche. Même feuille pour la page dédiée
   (héros vert pâle) et pour la section sombre d'appel des pages (.appel-outil). Les sélecteurs ne dépendent pas de
   .prose : dans les pages, le formulaire est hors du texte. S'appuie sur les variables du thème, comme le simulateur. */

.rappel {
  margin-block: var(--e5);
  margin-inline: calc(50% - 50vw);
  padding: var(--e5) calc(50vw - 50%);
  background: var(--surface);
}
.rappel > * { max-width: 640px; margin-inline: auto; }
/* Dans le héros de la page de rappel : la carte occupe la colonne de droite, sans bande pleine largeur */
.parcours-outil .rappel { margin: 0; padding: 0; background: none; }
.parcours-outil .rappel > * { max-width: none; }
/* Dans la section sombre d'appel des pages : la carte blanche seule, textes aux couleurs de la carte */
.appel-outil .rappel { margin: 0; padding: 0; background: none; }
.appel-outil .rappel > * { max-width: none; }
.appel-outil .rappel-sans-script { color: var(--texte); }
.rappel .rappel-carte :is(h2, h3) { color: var(--titre); }
.rappel .rappel-carte :is(p, li) { max-width: none; }
.rappel [hidden] { display: none !important; }
/* Page dédiée, mobile et tablette : la carte n'apparaît qu'une fois le script lu. Sa place est réservée d'ici là,
   sinon le texte placé sous elle descend d'un coup (décalage de mise en page mesuré à 0,31). Hauteurs relevées
   sur le premier écran ; sans script, pas de réservation. */
@media (scripting: enabled) and (max-width: 47.99em) {
  .parcours-outil .rappel:has(> .rappel-carte[hidden]) { min-height: clamp(600px, calc(1099px - 94vw), 800px); }
}
@media (scripting: enabled) and (min-width: 48em) and (max-width: 61.99em) {
  .parcours-outil .rappel:has(> .rappel-carte[hidden]) { min-height: 535px; }
}

.rappel-sans-script {
  padding: 18px;
  border-radius: var(--rayon-moyen);
  background: var(--carte-fond);
  font-weight: 700;
}

.rappel-carte {
  padding: 22px 18px;
  border-radius: var(--rayon-grand);
  background: var(--carte-fond);
  color: var(--texte);
  box-shadow: 0 0 0 1px var(--bordure), 0 24px 48px -28px rgba(12, 26, 19, 0.35);
  scroll-margin-top: 12px;
}

.rappel-etape-texte { display: flex; justify-content: space-between; gap: 12px; margin: 0; font-size: 16px; color: var(--texte-secondaire); }
.rappel-etape-num { font-weight: 800; color: var(--titre); white-space: nowrap; }
.rappel-barres { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 10px 0 var(--e5); }
.rappel-barres span { height: 8px; border-radius: 999px; background: var(--bordure); }
.rappel-barres .fait { background: var(--lien); }
.rappel-barres .en-cours { background: var(--sombre-fond); }

.rappel-repris {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  margin-bottom: var(--e4);
  padding: 10px 14px;
  border-radius: var(--rayon-petit);
  background: var(--lime);
  color: var(--vert-profond);
  font-size: 16px;
}
.rappel-repris p { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-weight: 700; }
.rappel-repris .ico { flex: none; margin-top: 3px; }

.rappel fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.rappel legend { padding: 0; width: 100%; }
.rappel .rappel-question {
  margin: 0 0 var(--e4);
  font-family: var(--police-titres);
  font-size: 26px;
  line-height: 1.2;
  color: var(--titre);
}
.rappel-question:focus { outline: none; }

.rappel-choix { display: grid; gap: 12px; }
.rappel .rappel-groupe { margin-top: var(--e5); }
.rappel .rappel-sous-question { margin: 0 0 var(--e3); font-weight: 800; font-size: 19px; color: var(--titre); }
.rappel .choix-carte {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--fond);
  cursor: pointer;
  box-shadow: inset 0 0 0 2px var(--bordure-forte);
}
.rappel .choix-carte:hover { box-shadow: inset 0 0 0 2px var(--lien); }
.rappel .choix-carte:has(input:checked) { background: var(--lime); box-shadow: inset 0 0 0 2px var(--sombre-fond); }
.rappel .choix-carte:has(input:focus-visible) { outline: 3px solid var(--lien); outline-offset: 2px; }
.rappel .choix-icone {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--titre);
}
.rappel .choix-carte:has(input:checked) .choix-icone { background: var(--accent); color: var(--accent-texte); }
.rappel .choix-icone .ico { width: 22px; height: 22px; }
.rappel .choix-texte { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.rappel .choix-libelle { font-weight: 800; color: var(--titre); line-height: 1.3; }
.rappel .choix-detail { font-size: 15.5px; color: var(--texte-secondaire); line-height: 1.35; }
.rappel .choix-carte input[type="radio"] {
  appearance: none;
  flex: none;
  width: 26px;
  height: 26px;
  margin: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--bordure-forte);
  background: var(--fond);
}
.rappel .choix-carte input[type="radio"]:checked {
  background: var(--sombre-fond) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4L18 8'/%3E%3C/svg%3E") center / 16px no-repeat;
  box-shadow: none;
}
.rappel .choix-carte input:focus-visible { outline: none; }

.rappel-champ { margin-top: var(--e5); }
.rappel-champ:first-child { margin-top: 0; }
.rappel-champ > label { display: block; margin-bottom: var(--e2); font-weight: 700; color: var(--titre); }
.rappel-facultatif { font-weight: 400; color: var(--texte-secondaire); }
.rappel .rappel-aide { margin: -4px 0 var(--e2); font-size: 16px; color: var(--texte-secondaire); }

.rappel input[type="text"],
.rappel input[type="tel"],
.rappel input[type="email"],
.rappel select {
  width: 100%;
  min-height: 56px;
  padding: 10px 16px;
  border: 0;
  border-radius: 14px;
  background: var(--fond);
  color: var(--texte);
  font: inherit;
  box-shadow: inset 0 0 0 2px var(--bordure-forte);
}
/* Menu déroulant dessiné par la page : sur iPhone, le menu natif ignore le contour (box-shadow) et paraît sans bord */
.rappel select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 48px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2313271c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
}
.rappel input:focus-visible,
.rappel select:focus-visible { outline: 3px solid var(--lien); outline-offset: 2px; }
/* Champ en erreur : contour rouge posé par aria-invalid seulement, jamais par le focus (le focus reste vert) */
.rappel :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea)[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--cta); }
.rappel fieldset[aria-invalid="true"] .choix-carte { box-shadow: inset 0 0 0 2px var(--cta); }
.rappel-accord:has(input[aria-invalid="true"]) { box-shadow: inset 0 0 0 2px var(--cta); }
#rappel-cp { max-width: 12ch; font-size: 22px; letter-spacing: 0.08em; }
.rappel-cp-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.rappel-cp-ligne #rappel-cp { flex: none; }
.rappel .rappel-commune { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 800; font-size: 19px; color: var(--titre); }
.rappel-commune .ico { flex: none; color: var(--lien); }

/* Case « Je n'ai pas de téléphone mobile » */
.rappel-case { display: flex; align-items: center; gap: 12px; margin-top: var(--e3); min-height: var(--cible); }
.rappel-case input[type="checkbox"] { flex: none; width: 24px; height: 24px; margin: 0; accent-color: var(--sombre-fond); cursor: pointer; }
.rappel-case label { font-size: 16.5px; color: var(--texte); cursor: pointer; }
#rappel-code { max-width: 10ch; font-size: 28px; font-weight: 800; letter-spacing: 0.25em; }

.rappel .rappel-note { display: flex; gap: 10px; margin: var(--e4) 0 0; font-size: 16px; color: var(--texte-secondaire); }
.rappel-note .ico { flex: none; margin-top: 3px; }

.rappel .rappel-erreur { margin: var(--e3) 0 0; color: var(--cta-survol); font-weight: 700; font-size: 17px; }
.rappel .rappel-champ .rappel-erreur,
.rappel fieldset .rappel-erreur { margin-top: var(--e2); font-size: 16.5px; }
.rappel-erreur:empty { display: none; }

.rappel-accord {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: var(--e5);
  padding: 16px;
  border-radius: var(--rayon-moyen);
  background: var(--fond);
  box-shadow: inset 0 0 0 2px var(--sombre-fond);
}
.rappel-accord input[type="checkbox"] {
  flex: none;
  width: 28px;
  height: 28px;
  margin: 2px 0 0;
  accent-color: var(--sombre-fond);
  cursor: pointer;
}
.rappel-accord label { font-size: 16.5px; line-height: 1.5; color: var(--texte); cursor: pointer; }
.rappel-accord-para { display: block; }
.rappel-accord-para + .rappel-accord-para { margin-top: 10px; }

.rappel .rappel-rgpd { margin: var(--e4) 0 0; padding-top: var(--e4); font-size: 15px; line-height: 1.55; color: var(--texte-secondaire); box-shadow: 0 -1px 0 var(--bordure); }
.rappel-turnstile { margin-top: var(--e4); min-height: 65px; }

.rappel-pastille {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: var(--e4);
  border-radius: 50%;
  background: var(--lime);
  color: var(--titre);
}
.rappel-pastille .ico { width: 30px; height: 30px; }
.rappel-test {
  margin-top: var(--e4);
  padding: 12px 16px;
  border-radius: var(--rayon-petit);
  background: var(--neutre-fond);
  color: var(--neutre-texte);
  box-shadow: inset 0 0 0 2px var(--neutre-filet);
}
.rappel .rappel-test p { margin: 0; font-size: 16px; }
.rappel-test-code { font-weight: 800; font-size: 20px; letter-spacing: 0.15em; }

.rappel-liens { display: flex; flex-direction: column; align-items: flex-start; margin-top: var(--e3); }
.rappel-lien {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--cible);
  padding: 0;
  border: 0;
  background: none;
  color: var(--lien);
  font: inherit;
  font-weight: 700;
  font-size: 16.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.rappel-lien:hover { text-decoration-thickness: 2px; }

.rappel-actions { display: flex; gap: 12px; margin-top: var(--e5); padding-top: var(--e4); box-shadow: 0 -1px 0 var(--bordure); }
.rappel-actions .bouton-principal { flex: 1 1 auto; padding-inline: 18px; }
.rappel-actions .bouton .ico { width: 20px; height: 20px; }
.rappel-actions .bouton[disabled] { opacity: 0.6; cursor: progress; }
.rappel-retour { flex: none; width: var(--bouton-hauteur); padding: 0; }
.rappel-actions [hidden] { display: none; }

.rappel .rappel-reassurance { display: flex; justify-content: center; gap: 8px; margin: var(--e3) 0 0; font-size: 15.5px; color: var(--texte-secondaire); text-align: center; }
.rappel-reassurance .ico { flex: none; margin-top: 3px; color: var(--lien); }

/* Confirmation */

.rappel-envoye {
  margin: -22px -18px var(--e5);
  padding: 28px 18px;
  border-radius: var(--rayon-grand) var(--rayon-grand) 0 0;
  background: var(--lime);
}
.rappel-coche {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: var(--e4);
  border-radius: 50%;
  background: var(--lien);
  color: #FFFFFF;
}
.rappel-coche .ico { width: 34px; height: 34px; stroke-width: 2.4; }
.rappel .rappel-envoye h2 { margin: 0 0 var(--e3); font-size: 28px; line-height: 1.2; }
.rappel-envoye h2:focus { outline: none; }
.rappel .rappel-envoye p { margin: 0; }

.rappel-installateur {
  padding: 16px 18px;
  border-radius: var(--rayon-moyen);
  box-shadow: inset 0 0 0 1px var(--bordure);
}
.rappel .rappel-installateur-nom { margin: 0 0 8px; font-family: var(--police-titres); font-weight: 700; font-size: 19px; color: var(--titre); }
.rappel .rappel-installateur-ligne { display: flex; gap: 10px; margin: 6px 0 0; font-size: 16px; }
.rappel-installateur-ligne .ico { flex: none; margin-top: 3px; color: var(--lien); }

.rappel .rappel-confirmation h3 { margin: var(--e5) 0 var(--e3); font-size: 24px; }
.rappel .rappel-suite { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.rappel .rappel-suite li { display: flex; gap: 14px; margin: 0; }
.rappel-suite-num {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-texte);
  font-family: var(--police-titres);
  font-weight: 700;
}
.rappel-suite li > span:last-child { font-size: 16.5px; line-height: 1.5; }
.rappel-suite b { display: block; font-size: 18px; color: var(--titre); }

.rappel-jamais {
  margin-top: var(--e5);
  padding: 16px 18px;
  border-radius: var(--rayon-moyen);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--bordure);
}
.rappel .rappel-jamais-titre { margin: 0 0 8px; font-family: var(--police-titres); font-weight: 700; font-size: 18px; color: var(--titre); }
.rappel .rappel-jamais ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rappel .rappel-jamais li { display: flex; gap: 10px; margin: 0; font-size: 16px; }
.rappel-jamais .ico { flex: none; margin-top: 3px; color: var(--cta-survol); }
.rappel .rappel-annuler { margin: var(--e4) 0; font-size: 16px; }
.rappel .rappel-confirmation a.bouton { text-decoration: none; color: var(--titre); }

@media (min-width: 48em) {
  .rappel { padding-block: var(--e6); }
  .rappel-carte { padding: 32px 36px; }
  .rappel-envoye { margin: -32px -36px var(--e5); padding: 32px 36px; }
  .rappel-choix { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 62em) {
  /* Hauteur stable d'un écran à l'autre : les boutons restent au même endroit sur les écrans courts */
  .parcours-outil .rappel-carte { display: flex; flex-direction: column; min-height: 640px; }
  .parcours-outil #rappel-formulaire { display: flex; flex-direction: column; flex: 1; }
  .parcours-outil .rappel-actions { margin-top: auto; }
  .parcours-outil .rappel-ecran { margin-bottom: var(--e5); }
}
