/* =========================================================
   LES DÉMARCHES EN LIGNE
   Un formulaire administratif se lit mal quand il est dense.
   Ici : une colonne de mesure lisible, des sous-titres qui
   découpent, des champs hauts, et des erreurs qui disent quoi
   faire plutôt que « champ invalide ».
   ========================================================= */
.vue--formulaire, .vue--actes, .vue--legal, .vue--kiosque { background: var(--bg); }

/* ---------- La barre du haut, commune aux trois vues ---------- */
.fx-barre {
  position: sticky; top: 0; z-index: 40;
  background: var(--c-vert);
  color: #fff;
}
.fx-barre__in {
  display: flex; align-items: center; gap: 1rem;
  min-height: 52px; padding-block: .5rem;
}
.fx-barre__t {
  font-family: var(--f-titre, inherit);
  font-size: 1.15rem; letter-spacing: .02em;
}
.fx-barre__aide { margin-left: auto; color: #fff; font-size: .82rem; font-weight: 600; }
.fx-retour {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .4rem .8rem; border-radius: 999px;
  background: rgba(255, 255, 255, .16); color: #fff;
  text-decoration: none; font-weight: 600; font-size: .8rem;
  transition: background-color .18s;
}
.fx-retour:hover { background: rgba(255, 255, 255, .32); }

.fx-main { padding: clamp(1.4rem, 4vw, 2.8rem) 0 clamp(3rem, 8vw, 5rem); }

/* ---------- Fil d'Ariane ---------- */
.fx-fil { margin-bottom: 1.2rem; font-size: .78rem; }
.fx-fil ol {
  display: flex; flex-wrap: wrap; gap: .4rem;
  list-style: none; margin: 0; padding: 0; color: var(--texte-doux);
}
.fx-fil li + li::before { content: "›"; margin-right: .4rem; opacity: .6; }
.fx-fil a { color: var(--c-bleu); }

/* ---------- En-tête d'une démarche ---------- */
.fx-tete { max-width: 56ch; margin-bottom: 2rem; }
.fx-tete__sur {
  margin: 0 0 .2rem; font-size: .72rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--c-bleu);
}
.fx-tete h1 { margin: 0 0 .5rem; line-height: 1.04; }
.fx-tete__chapo { margin: 0; color: var(--texte-doux); font-size: var(--fs-md); line-height: 1.6; }

.fx-reperes {
  display: grid; gap: .8rem; margin: 1.4rem 0 0;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}
.fx-reperes div {
  padding: .7rem .9rem; border-radius: var(--r-sm, 10px);
  background: #fff; box-shadow: inset 0 0 0 1px var(--trait);
}
.fx-reperes dt {
  font-size: .68rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--texte-doux);
}
.fx-reperes dd { margin: .2rem 0 0; font-weight: 600; font-size: .9rem; }

.fx-promesses {
  display: grid; gap: .7rem; margin-top: 1.6rem;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.fx-promesses div {
  padding: .8rem .95rem; border-radius: var(--r-sm, 10px);
  background: var(--c-vert); color: #fff;
}
.fx-promesses b { display: block; font-size: .92rem; }
.fx-promesses span { display: block; margin-top: .15rem; font-size: .78rem; color: rgba(255, 255, 255, .84); }

/* ---------- L'index ---------- */
.fx-famille { margin-bottom: 2.2rem; }
.fx-famille h3 {
  margin: 0 0 .8rem; padding-bottom: .4rem;
  border-bottom: 2px solid var(--c-anis);
  font-family: var(--f-titre, inherit); font-size: 1.3rem; letter-spacing: .02em;
}
.fx-cartes { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); }
.fx-carte {
  display: flex; flex-direction: column; gap: .3rem;
  padding: 1rem 1.1rem; border-radius: var(--r-md, 14px);
  background: #fff; box-shadow: inset 0 0 0 1px var(--trait);
  text-decoration: none; color: inherit;
  transition: transform .18s, box-shadow .18s;
}
.fx-carte:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 2px var(--c-vert), var(--ombre-1, 0 8px 20px -12px rgba(0, 0, 0, .3));
}
.fx-carte b { font-size: 1rem; line-height: 1.25; }
.fx-carte small { color: var(--texte-doux); font-size: .82rem; line-height: 1.45; }
.fx-carte__pied { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: auto; padding-top: .6rem; }
.fx-carte__pied em, .fx-carte__pied i {
  font-style: normal; font-size: .68rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  padding: .18rem .5rem; border-radius: 999px;
}
.fx-carte__pied em { background: var(--c-bleu-50, #e8f1f5); color: var(--c-bleu); }
.fx-carte__pied i { background: var(--c-anis); color: #3b4000; }

.fx-aide-bas {
  margin-top: 1rem; padding: 1rem 1.2rem;
  border-radius: var(--r-md, 14px);
  background: var(--c-anis); color: #3b4000;
  font-size: .9rem; line-height: 1.6;
}

/* ---------- Les pièces à fournir ---------- */
.fx-pieces {
  max-width: 62ch; margin-bottom: 2rem; padding: 1.1rem 1.3rem;
  border-radius: var(--r-md, 14px);
  background: #fff; box-shadow: inset 0 0 0 1px var(--trait);
  border-left: 4px solid var(--c-orange);
}
.fx-pieces h2 { margin: 0 0 .6rem; font-size: 1.1rem; }
.fx-pieces ul { margin: 0; padding-left: 1.1rem; font-size: .9rem; line-height: 1.7; }
.fx-pieces__mot { margin: .8rem 0 0; font-size: .84rem; color: var(--texte-doux); }

/* ---------- Le formulaire ---------- */
.fx-form { max-width: 62ch; }
.fx-grille { display: grid; gap: 1.1rem; grid-template-columns: 1fr 1fr; }
.fx-champ { display: flex; flex-direction: column; gap: .3rem; grid-column: 1 / -1; }
.fx-champ--moitie { grid-column: auto; }
.fx-champ--large { grid-column: 1 / -1; }

.fx-sous { grid-column: 1 / -1; margin-top: 1rem; }
.fx-sous:first-child { margin-top: 0; }
.fx-sous h3 {
  margin: 0; padding-bottom: .35rem;
  border-bottom: 2px solid var(--c-anis);
  font-family: var(--f-titre, inherit); font-size: 1.22rem; letter-spacing: .02em;
}
.fx-sous p { margin: .4rem 0 0; font-size: .84rem; color: var(--texte-doux); }

.fx-champ label, .fx-groupe legend { font-weight: 600; font-size: .9rem; }
.fx-champ abbr, .fx-groupe abbr {
  color: #b4291f; text-decoration: none; font-weight: 700;
}
.fx-aide { color: var(--texte-doux); font-size: .78rem; line-height: 1.5; }

.fx-champ input, .fx-champ select, .fx-champ textarea {
  width: 100%; min-height: 44px;
  padding: .55rem .7rem;
  font: inherit; font-size: .95rem; color: inherit;
  background: #fff;
  border: 1.5px solid var(--trait);
  border-radius: var(--r-sm, 10px);
  transition: border-color .16s, box-shadow .16s;
}
.fx-champ textarea { min-height: 96px; resize: vertical; line-height: 1.55; }
.fx-champ input:focus, .fx-champ select:focus, .fx-champ textarea:focus {
  outline: 0; border-color: var(--c-vert);
  box-shadow: 0 0 0 3px rgba(63, 108, 91, .18);
}

/* ---------- Choix : radios et cases, en vraies cibles ---------- */
.fx-groupe { border: 0; margin: 0; padding: 0; }
.fx-groupe legend { padding: 0; margin-bottom: .35rem; }
.fx-options { display: grid; gap: .5rem; margin-top: .4rem; }
.fx-options--ligne { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.fx-option {
  display: flex; align-items: flex-start; gap: .65rem;
  min-height: 44px; padding: .6rem .8rem;
  background: #fff; border: 1.5px solid var(--trait);
  border-radius: var(--r-sm, 10px);
  cursor: pointer; font-weight: 400;
  transition: border-color .16s, background-color .16s;
}
.fx-option:hover { border-color: var(--c-vert); }
.fx-option input { flex: none; width: 20px; height: 20px; min-height: 0; margin-top: .1rem; accent-color: var(--c-vert); }
.fx-option b { display: block; font-size: .92rem; font-weight: 600; }
.fx-option small { display: block; margin-top: .1rem; color: var(--texte-doux); font-size: .78rem; line-height: 1.45; }
.fx-option:has(input:checked) { border-color: var(--c-vert); background: rgba(63, 108, 91, .07); }
.fx-option:focus-within { outline: 3px solid var(--c-anis); outline-offset: 2px; }
.fx-option--seule { align-items: flex-start; }

.fx-consent { margin-top: 1.4rem; }
.fx-consent .fx-option { border-color: var(--c-bleu); background: var(--c-bleu-50, #eef5f8); }
.fx-consent a { color: var(--c-bleu); }

/* ---------- Erreurs : dites en mots, pas seulement en rouge ---------- */
.fx-msg { font-size: .8rem; font-weight: 600; color: #b4291f; }
.fx-msg::before { content: "⚠ "; }
.erreur input, .erreur select, .erreur textarea,
.erreur .fx-option { border-color: #b4291f; }
.erreur > label, .erreur > legend { color: #8e1f17; }
.fx-erreur-haut {
  margin: 1.2rem 0 0; padding: .8rem 1rem;
  border-radius: var(--r-sm, 10px);
  background: #fdecea; color: #8e1f17;
  border-left: 4px solid #b4291f;
  font-weight: 600; font-size: .9rem;
}

.fx-pied {
  display: flex; gap: .7rem; flex-wrap: wrap;
  margin-top: 1.8rem; padding-top: 1.4rem;
  border-top: 1px solid var(--trait);
}
.fx-pied__mot { margin: .8rem 0 0; font-size: .8rem; color: var(--texte-doux); line-height: 1.6; }
.fx-pied__mot em { color: var(--c-orange-700, #8a5c10); font-style: normal; }

.btn--fantome-vert {
  --btn-fg: var(--c-vert); --btn-bg: transparent;
  box-shadow: inset 0 0 0 1.5px var(--c-vert);
}
.btn--vert { --btn-fg: #fff; --btn-bg: var(--c-vert); }

/* =========================================================
   L'ACCUSÉ DE RÉCEPTION
   C'est la page que l'usager garde, imprime, ou montre à
   l'accueil. Elle doit tenir debout toute seule.
   ========================================================= */
.fx-accuse { max-width: 64ch; }
.fx-accuse__sceau {
  display: grid; place-items: center;
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--c-anis); color: #2f3400;
  margin-bottom: 1rem;
}
.fx-accuse__sur {
  margin: 0 0 .2rem; font-size: .72rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--c-vert);
}
.fx-accuse h1 { margin: 0 0 1.2rem; line-height: 1.06; }

.fx-accuse__num {
  display: flex; align-items: center; gap: .8rem; flex-wrap: wrap;
  padding: 1rem 1.2rem; margin-bottom: 1.4rem;
  border-radius: var(--r-md, 14px);
  background: var(--c-vert); color: #fff;
}
.fx-accuse__num span {
  font-size: .7rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--c-anis);
}
.fx-accuse__num b {
  flex: 1 1 auto;
  font-family: var(--f-titre, inherit); font-size: clamp(1.4rem, 5vw, 2rem);
  letter-spacing: .06em; line-height: 1;
}
.fx-copier {
  padding: .4rem .8rem; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, .18); color: #fff;
  border: 1.5px solid rgba(255, 255, 255, .4);
  font: inherit; font-size: .78rem; font-weight: 600;
}
.fx-copier:hover { background: rgba(255, 255, 255, .34); }

.fx-accuse__faits {
  display: grid; gap: .1rem; margin: 0 0 1.4rem;
  border-radius: var(--r-md, 14px); overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--trait);
  background: #fff;
}
.fx-accuse__faits > div {
  display: grid; grid-template-columns: 11rem 1fr; gap: .8rem;
  padding: .6rem .9rem;
  border-bottom: 1px solid var(--trait);
  font-size: .88rem;
}
.fx-accuse__faits > div:last-child { border-bottom: 0; }
.fx-accuse__faits dt { color: var(--texte-doux); }
.fx-accuse__faits dd { margin: 0; font-weight: 600; }

.fx-note {
  padding: 1rem 1.2rem; margin-bottom: 1.4rem;
  border-radius: var(--r-md, 14px);
  background: var(--c-bleu-50, #eef5f8);
  border-left: 4px solid var(--c-bleu);
}
.fx-note--maquette { background: #fff7e6; border-left-color: var(--c-orange); }
.fx-note--echec { background: #fdecea; border-left-color: #b4291f; }
.fx-note b { display: block; font-size: .95rem; }
.fx-note p { margin: .35rem 0 0; font-size: .86rem; line-height: 1.6; color: var(--texte-doux); }
.fx-note__btns { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .9rem; }

.fx-suite { display: grid; gap: .1rem; margin-bottom: 1.4rem; }
.fx-suite__pas {
  display: grid; grid-template-columns: 9rem 1fr; gap: 1rem;
  padding: .85rem 0; border-top: 1px solid var(--trait);
}
.fx-suite__pas .quand {
  font-size: .7rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--c-vert); padding-top: .15rem;
}
.fx-suite__pas b { display: block; font-size: .95rem; }
.fx-suite__pas small { display: block; margin-top: .15rem; color: var(--texte-doux); font-size: .83rem; line-height: 1.55; }

.fx-corps {
  margin-bottom: 1.6rem; padding: .8rem 1rem;
  border-radius: var(--r-md, 14px);
  background: #fff; box-shadow: inset 0 0 0 1px var(--trait);
}
.fx-corps summary { cursor: pointer; font-weight: 600; font-size: .9rem; }
.fx-corps pre {
  margin: .9rem 0 .6rem; padding: .9rem;
  background: #f4f6f3; border-radius: var(--r-sm, 10px);
  font-size: .78rem; line-height: 1.6;
  white-space: pre-wrap; word-break: break-word;
  max-height: 340px; overflow: auto;
}
.fx-corps .fx-copier { background: var(--c-vert); border-color: var(--c-vert); }

.fx-accuse__actions { display: flex; gap: .7rem; flex-wrap: wrap; }

/* ---------- À l'impression : rien que l'accusé ---------- */
@media print {
  .fx-barre, .fx-accuse__actions, .fx-note__btns, .bouton-haut, .tg,
  .entete, .bandeau-alerte, .pied, .fx-copier { display: none !important; }
  .vue--formulaire { background: #fff; }
  .fx-accuse { max-width: none; }
  .fx-accuse__num { background: #fff; color: #000; box-shadow: inset 0 0 0 2px #000; }
  .fx-accuse__num span { color: #444; }
  .fx-corps { box-shadow: none; }
  .fx-corps[open] pre { max-height: none; }
}

/* ═══ TABLETTE ET TÉLÉPHONE ═══ */
@media (max-width: 760px) {
  .fx-grille { grid-template-columns: 1fr; }
  .fx-champ--moitie { grid-column: 1 / -1; }
  .fx-accuse__faits > div { grid-template-columns: 1fr; gap: .1rem; }
  .fx-suite__pas { grid-template-columns: 1fr; gap: .2rem; }
  .fx-barre__t { font-size: 1rem; }
  .fx-barre__aide { font-size: .76rem; }
  .fx-pied .btn { flex: 1 1 100%; justify-content: center; }
}
@media (max-width: 420px) {
  .fx-reperes, .fx-promesses { grid-template-columns: 1fr; }
}
