/* Maquette : la mise en ligne, une étape par écran (même style que le questionnaire en ligne). */
html, body { height: 100%; }
body { display: flex; flex-direction: column; min-height: 100dvh; overflow: hidden; }
:root { --repere: #d9480f; }

.bandeau-maquette .reglages { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .2em .9em; }
.bandeau-maquette label { display: inline-flex; align-items: center; gap: .3em; cursor: pointer; }

.progression { position: relative; height: 6px; background: var(--filet-doux); flex: none; }
.progression span { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--accent); transition: width .5s var(--douceur); }
.entete { display: flex; align-items: center; justify-content: space-between; gap: 1em; padding: 14px clamp(16px, 4vw, 48px); flex: none; font-size: .85rem; color: var(--encre-douce); }
.signature { font-weight: 700; color: var(--encre); }
.ou { text-align: right; }
.ou strong { color: var(--encre); }

#scene { position: relative; flex: 1; min-height: 0; }
.ecran { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; display: grid; padding: 24px clamp(16px, 6vw, 96px) 120px; }
.ecran-contenu { width: 100%; max-width: 46rem; margin: auto; }
.entre-bas { animation: entre-bas .55s var(--douceur) both; }
.entre-haut { animation: entre-haut .55s var(--douceur) both; }
.sort-haut { animation: sort-haut .35s ease-in both; pointer-events: none; }
.sort-bas { animation: sort-bas .35s ease-in both; pointer-events: none; }
@keyframes entre-bas { from { opacity: 0; transform: translateY(48px); } }
@keyframes entre-haut { from { opacity: 0; transform: translateY(-48px); } }
@keyframes sort-haut { to { opacity: 0; transform: translateY(-48px); } }
@keyframes sort-bas { to { opacity: 0; transform: translateY(48px); } }

/* Accueil */
.accueil-titre { font-size: clamp(2.4rem, 1.3rem + 4.6vw, 5.6rem); line-height: .98; font-weight: 800; letter-spacing: -.03em; }
.accueil-texte { margin-top: .8em; font-size: var(--t-aide); color: var(--encre-douce); max-width: 38rem; }
.points { list-style: none; padding: 0; margin: 1.2em 0 0; display: grid; gap: .4em; font-size: var(--t-aide); }
.points li { display: flex; gap: .6em; align-items: baseline; }
.points li::before { content: ""; flex: none; width: .55em; height: .55em; border-radius: 50%; background: var(--accent); transform: translateY(-.1em); }
.bloc-titre { margin-top: 2em; font-size: .8em; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); font-weight: 700; }

/* Le plan des étapes, sur l'accueil et à la fin */
.plan { list-style: none; padding: 0; margin: .7em 0 0; display: grid; gap: .5em; }
.plan button {
  width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .3em .9em;
  padding: .7em 1em; border: 1.5px solid var(--filet-doux); border-radius: var(--rayon); background: var(--surface); text-align: left;
  transition: border-color .15s, transform .15s var(--douceur);
}
.plan button:hover { border-color: var(--filet); }
.plan button:active { transform: scale(.985); }
.plan-num { display: grid; place-items: center; width: 2em; height: 2em; border-radius: 50%; border: 1.5px solid var(--filet); font-weight: 700; font-size: .85em; }
.plan-titre { font-weight: 600; }
.plan-titre small { display: block; font-weight: 400; font-size: .8em; color: var(--encre-douce); }
.plan-duree { font-size: .8em; color: var(--encre-douce); white-space: nowrap; }
.plan .fait .plan-num { background: var(--accent); border-color: var(--accent); color: var(--accent-texte); }

/* Une étape */
.etape-num { display: flex; flex-wrap: wrap; align-items: center; gap: .4em .7em; color: var(--accent); font-weight: 700; font-size: .9em; margin-bottom: .6em; }
.pastille { display: inline-flex; align-items: center; min-height: 1.8em; padding: 0 .7em; border-radius: 999px; font-size: .8em; font-weight: 600; color: var(--encre-douce); border: 1px solid var(--filet-doux); }
.pastille.forte { color: var(--accent); border-color: currentColor; }
.etape-titre { font-size: var(--t-titre); line-height: 1.12; font-weight: 700; letter-spacing: -.015em; }
.etape-aide { margin-top: .6em; font-size: var(--t-aide); color: var(--encre-douce); }
.ouvrir { margin-top: 1.2em; }
.ouvrir svg { width: 1em; height: 1em; }

.taches { list-style: none; padding: 0; margin: 1.6em 0 0; display: grid; gap: .7em; counter-reset: tache; }
.tache {
  counter-increment: tache; position: relative; display: grid; grid-template-columns: auto 1fr; gap: .2em .9em;
  padding: .9em 1em; border: 1.5px solid var(--filet-doux); border-radius: var(--rayon); background: var(--surface);
  transition: border-color .2s, background-color .2s;
}
.tache.fait { border-color: var(--accent); background: var(--choix); }
.tache-case { grid-row: 1 / span 2; position: relative; width: 1.6em; height: 1.6em; margin-top: .05em; }
.tache-case input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tache-case span {
  pointer-events: none; position: absolute; inset: 0; display: grid; place-items: center;
  border: 2px solid var(--filet); border-radius: 7px; background: var(--surface); font-size: .78em; font-weight: 700; color: var(--encre-douce);
  transition: background-color .15s, border-color .15s, transform .2s var(--douceur);
}
.tache-case span::before { content: counter(tache); }
.tache-case input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-texte); transform: scale(1.06); }
.tache-case input:checked + span::before { content: ""; width: .35em; height: .7em; border: solid currentColor; border-width: 0 .18em .18em 0; transform: translateY(-.08em) rotate(45deg); }
.tache-case input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 3px; }
.tache-texte { font-size: 1em; }
.tache.fait .tache-texte { color: var(--encre-douce); }
.tache-plus { grid-column: 2; display: grid; gap: .7em; margin-top: .5em; }
.ui { font-weight: 700; color: var(--encre); padding: 0 .25em; border-radius: 5px; background: color-mix(in srgb, var(--filet-doux) 55%, transparent); white-space: nowrap; }
.rep { display: inline-grid; place-items: center; min-width: 1.35em; height: 1.35em; padding: 0 .2em; border-radius: 999px; background: var(--repere); color: #fff; font-size: .72em; font-weight: 700; vertical-align: .12em; }

/* Les captures d'écran, avec leurs pastilles numérotées ; un toucher les agrandit */
.capture { margin: 0; }
.capture-bouton { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: zoom-in; }
.capture-cadre { position: relative; display: block; border-radius: 8px; overflow: hidden; border: 1px solid var(--filet-doux); background: #fff; }
.capture-cadre img { display: block; width: 100%; height: auto; }
.capture-cadre .rep { position: absolute; transform: translate(-50%, -50%); font-size: .8rem; min-width: 1.6em; height: 1.6em; box-shadow: 0 0 0 2px #fff; }
/* La légende seule sous l'image ; « agrandir » est une loupe dans le coin de l'image. Le texte « Toucher pour
   agrandir » à côté de la légende se tassait en deux colonnes sous les petites captures (9 novembre 2026) */
.capture figcaption { margin-top: .35em; font-size: .78em; line-height: 1.45; color: var(--encre-douce); }
.capture-bouton { position: relative; }
.capture-loupe {
  position: absolute; top: .45em; right: .45em; width: 1.9em; height: 1.9em; border-radius: 50%; pointer-events: none;
  background: rgba(17, 22, 28, .78) 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.2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 20 20M10.5 7.8v5.4M7.8 10.5h5.4'/%3E%3C/svg%3E") center / 60% no-repeat;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .9), 0 1px 4px rgba(0, 0, 0, .3);
  transition: transform .15s ease;
}
.capture-bouton:hover .capture-loupe, .capture-bouton:focus-visible .capture-loupe { transform: scale(1.12); }
.capture.etroite { max-width: 18rem; }

/* Copier une adresse ou le nom de domaine */
.copie { display: flex; flex-wrap: wrap; align-items: center; gap: .3em .8em; padding: .55em .9em; border-radius: 12px; border: 1.5px dashed var(--accent); background: color-mix(in srgb, var(--choix) 60%, transparent); }
.copie-etiquette { flex-basis: 100%; font-size: .75em; color: var(--encre-douce); font-weight: 600; }
.copie code { font-family: inherit; font-weight: 700; font-size: 1.1em; overflow-wrap: anywhere; }
.copie .btn { min-height: 40px; padding: .3em 1em; font-size: .85em; margin-left: auto; }
.copie .btn.copie-ok { background: var(--accent); border-color: var(--accent); color: var(--accent-texte); }

/* Encadrés : rappel, à garder pour vous */
.encadre { padding: .9em 1.1em; border-radius: var(--rayon); background: var(--surface); border-left: 5px solid var(--accent); font-size: .92em; box-shadow: var(--ombre); }
.encadre strong { display: block; margin-bottom: .2em; }
.encadre.garde { border-left-color: var(--rouge); }
.apres { margin-top: 1.4em; font-size: var(--t-aide); color: var(--encre-douce); }

/* La clé du formulaire, collée ici */
.cle .saisie { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .95em; }
.cle-etat { font-size: .85em; font-weight: 600; margin-top: .3em; }
.cle-etat.ok { color: var(--accent); }
.cle-etat.non { color: var(--rouge); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .8em 1.2em; margin-top: 1.8em; }
.compte { font-size: .85rem; color: var(--encre-douce); }
.btn-bloque { margin-left: auto; }

.btn-retour { position: fixed; left: clamp(16px, 3vw, 40px); bottom: clamp(16px, 3vw, 32px); z-index: 5; border-color: var(--filet); box-shadow: var(--ombre); }
.btn-retour svg { width: 1.1em; height: 1.1em; margin-left: -.2em; }

/* Fin */
.fin-titre { font-size: var(--t-titre); line-height: 1.1; font-weight: 800; letter-spacing: -.02em; }
.fin-titre:focus { outline: none; }
.recap { list-style: none; padding: 0; margin: 1.2em 0 0; display: grid; gap: .5em; }
.recap li { display: flex; gap: .7em; align-items: baseline; }
.recap .ok::before, .recap .manque::before { flex: none; font-weight: 800; }
.recap .ok::before { content: "✓"; color: var(--accent); }
.recap .manque { color: var(--encre-douce); }
.recap .manque::before { content: "○"; }
.envoye { margin-top: 1.2em; padding: 1em 1.2em; border-radius: var(--rayon); background: var(--choix); animation: entre-bas .45s var(--douceur) both; }
.petit-mot { margin-top: .7em; font-size: .8em; color: var(--encre-douce); max-width: 34rem; }
.ecran-contenu > .erreur { margin-top: .8em; }
.envoye .erreur { display: block; }
.essai { margin-top: 1em; font-size: .85em; color: var(--encre-douce); }
.essai summary { cursor: pointer; font-weight: 700; }
.essai pre { white-space: pre-wrap; font-family: inherit; margin: .6em 0 0; color: var(--encre); }

/* Fenêtres : la loupe et « Je bloque ici » */
dialog { border: 0; border-radius: 18px; padding: 1.2em; background: var(--surface); color: var(--encre); box-shadow: var(--ombre); max-width: min(92vw, 1100px); }
dialog::backdrop { background: rgb(10 15 13 / .6); }
dialog[open] { animation: entre-bas .35s var(--douceur) both; }
.loupe-cadre { position: relative; }
.loupe-cadre img { display: block; max-width: 100%; max-height: 72vh; width: auto; height: auto; border-radius: 8px; }
.loupe-cadre .rep { position: absolute; transform: translate(-50%, -50%); font-size: 1rem; min-width: 1.7em; height: 1.7em; box-shadow: 0 0 0 2px #fff; }
.loupe-legende { margin: .7em 0; font-size: .9em; color: var(--encre-douce); }
.bloque { width: min(92vw, 34rem); }
.bloque h2 { font-size: 1.4em; line-height: 1.2; }
.bloque-ou { margin: .5em 0 1em; color: var(--encre-douce); font-size: .95em; }
.bloque-rappel { margin-top: .5em; font-size: .8em; color: var(--encre-douce); }

@media (max-width: 600px) {
  .ecran { padding-bottom: 96px; }
  .actions .btn-principal { flex: 1 1 100%; min-height: 56px; font-size: 1.1em; }
  .btn-bloque { margin-left: 0; }
  .ou span { display: none; }
  .tache { padding: .8em .8em; gap: .2em .7em; }
}
@media (prefers-reduced-motion: reduce) {
  .entre-bas, .entre-haut, .sort-haut, .sort-bas, dialog[open], .envoye { animation: none; }
}

/* Traduction d'une liste que Cloudflare laisse en anglais (rôles de l'étape 4) */
.traduction { padding: .75em .9em; border-radius: 12px; background: var(--papier); border: 1px solid var(--filet-doux); font-size: .88em; }
.traduction-titre { color: var(--encre-douce); margin-bottom: .5em; }
.traduction dl { margin: 0; display: grid; gap: .45em; }
.traduction dl > div { display: grid; grid-template-columns: minmax(0, 15em) 1fr; gap: .1em 1em; padding: .35em .55em; border-radius: 8px; }
.traduction dt { font-weight: 700; }
.traduction dd { margin: 0; color: var(--encre-douce); }
.traduction .actif { background: var(--choix); box-shadow: inset 3px 0 0 var(--accent); }
.traduction .actif dd { color: var(--encre); font-weight: 600; }
@media (max-width: 600px) { .traduction dl > div { grid-template-columns: 1fr; } }
