/* Espace communes UMVO : lisible, simple, une colonne, grands boutons. */
:root {
  --bleu: #1b4596;
  --bleu-fonce: #133170;
  --bleu-pale: #eaf0fb;
  --texte: #1c2230;
  --texte-doux: #4f5768;
  --bord: #cfd5e2;
  --fond: #f4f6fa;
  --blanc: #fff;
  --vert: #18753c;
  --vert-pale: #e6f4ea;
  --orange: #8d4a00;
  --orange-pale: #fff3e0;
  --rouge: #b3261e;
  --rouge-pale: #fdecea;
  --focus: #ffbf47;
  --rayon: 10px;
}
* { box-sizing: border-box; }
html { font-size: 112.5%; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; line-height: 1.55; color: var(--texte); background: var(--fond); }
a { color: var(--bleu); text-underline-offset: 3px; }
a:hover { color: var(--bleu-fonce); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1 { font-size: 1.75rem; line-height: 1.25; margin: .5rem 0 .75rem; }
h2 { font-size: 1.2rem; line-height: 1.3; margin: 0 0 .75rem; }
h3 { font-size: 1.05rem; margin: 0 0 .5rem; }
p { margin: 0 0 .9rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.evitement { position: absolute; left: -999px; top: 0; background: var(--blanc); padding: .5rem 1rem; z-index: 10; }
.evitement:focus { left: 1rem; }

/* En-tête et pied */
.entete { background: var(--blanc); border-bottom: 1px solid var(--bord); }
.entete-interieur, .pied-interieur { max-width: 60rem; margin: 0 auto; padding: .75rem 1rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.marque { display: flex; align-items: center; gap: .75rem; color: var(--texte); text-decoration: none; }
.marque img { border-radius: 8px; }
.marque span { display: flex; flex-direction: column; line-height: 1.2; }
.marque strong { font-size: 1.1rem; }
.marque small { color: var(--texte-doux); font-size: .8rem; }
.entete-menu { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; font-size: .95rem; }
.entete-menu form { margin: 0; }
.entete-commune { font-weight: 700; color: var(--texte-doux); }
.pied { background: var(--blanc); border-top: 1px solid var(--bord); margin-top: 3rem; font-size: .95rem; }
.pied-aide { display: flex; flex-direction: column; }
.pied-liens { display: flex; gap: 1rem; }

/* Contenu */
.page { max-width: 46rem; margin: 0 auto; padding: 1.25rem 1rem 2rem; }
.page--large { max-width: 60rem; }
.chapeau { font-size: 1.08rem; color: var(--texte-doux); }
.fil { font-size: .9rem; color: var(--texte-doux); margin-bottom: .25rem; }
.carte { background: var(--blanc); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 1.25rem; margin-bottom: 1.25rem; }
.carte--discrete { background: transparent; }
.carte--ok { border-left: 6px solid var(--vert); }
.carte--attente { border-left: 6px solid var(--bleu); }
.aide { color: var(--texte-doux); font-size: .92rem; margin: .1rem 0 .4rem; }
.non-renseigne { color: var(--texte-doux); font-style: italic; }
.valeur-multiligne { white-space: pre-line; }

/* Messages */
.message { border-radius: var(--rayon); padding: .9rem 1rem; margin-bottom: 1.25rem; border: 1px solid; }
.message ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.message--succes { background: var(--vert-pale); border-color: #9fd0ae; color: #0f4d27; }
.message--info { background: var(--bleu-pale); border-color: #a9bde6; color: #13306b; }
.message--alerte { background: var(--orange-pale); border-color: #f0c27d; color: #5e3200; }
.message--erreur { background: var(--rouge-pale); border-color: #ef9a94; color: #7d1a14; }

/* Boutons */
.bouton { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .7rem 1.3rem; border-radius: 8px; border: 2px solid transparent; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; text-align: center; }
.bouton--principal { background: var(--bleu); color: var(--blanc); }
.bouton--principal:hover { background: var(--bleu-fonce); color: var(--blanc); }
.bouton--secondaire { background: var(--blanc); color: var(--bleu); border-color: var(--bleu); }
.bouton--secondaire:hover { background: var(--bleu-pale); }
.bouton--attention { background: var(--blanc); color: var(--rouge); border-color: #e3a19c; }
.bouton--large { width: 100%; font-size: 1.05rem; min-height: 56px; }
.bouton[disabled] { opacity: .45; cursor: not-allowed; }
.lien-bouton { background: none; border: 0; padding: 0; font: inherit; color: var(--bleu); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.lien-bouton--danger { color: var(--rouge); }
.lien-secondaire { text-align: center; margin-top: 1rem; }

/* Formulaires */
.formulaire .champ, .champ { margin-bottom: 1.25rem; }
label, .libelle, legend { display: block; font-weight: 700; margin-bottom: .2rem; }
.facultatif { font-weight: 400; color: var(--texte-doux); }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="search"], input:not([type]), textarea, select {
  width: 100%; font: inherit; padding: .7rem .8rem; border: 2px solid #8a93a6; border-radius: 8px; background: var(--blanc); color: var(--texte); min-height: 48px;
}
textarea { min-height: 7rem; resize: vertical; }
.champ--erreur input, .champ--erreur textarea, .champ--erreur select { border-color: var(--rouge); }
.champ--erreur { border-left: 4px solid var(--rouge); padding-left: .8rem; }
.erreur { color: var(--rouge); font-weight: 700; margin: .2rem 0 .4rem; }
.champ--modifie input, .champ--modifie textarea, .champ--modifie select { background: #fffbea; border-color: #c99a1c; }
.valeur-actuelle { font-size: .9rem; color: var(--texte-doux); margin: .35rem 0 0; }
.valeur-fixe { margin: 0; padding: .6rem .8rem; background: var(--fond); border-radius: 8px; }
fieldset.groupe { border: 0; margin: 0; padding: 0; }
.choix-ligne { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.choix { display: inline-flex; align-items: center; gap: .5rem; font-weight: 400; padding: .55rem .9rem; border: 2px solid var(--bord); border-radius: 8px; cursor: pointer; }
.choix input, .case input { width: 1.3rem; height: 1.3rem; }
.case { display: flex; align-items: flex-start; gap: .6rem; font-weight: 400; margin: 0 0 1.25rem; cursor: pointer; }
.case--erreur { color: var(--rouge); font-weight: 700; }
.date-cases { display: flex; gap: .75rem; }
.date-cases label { font-weight: 400; font-size: .9rem; }
.date-cases input { width: 5.5rem; }
.mdp { display: flex; gap: .5rem; }
.bouton-afficher { flex: 0 0 auto; min-width: 6rem; border: 2px solid var(--bord); background: var(--blanc); border-radius: 8px; font: inherit; font-size: .9rem; color: var(--bleu); cursor: pointer; }
.champ-code { font-size: 1.6rem; letter-spacing: .35em; max-width: 12rem; text-align: center; }
.regles { list-style: none; padding: 0; margin: .5rem 0; font-size: .92rem; }
.regles li::before { content: "○ "; }
.regles li.ok { color: var(--vert); }
.regles li.ok::before { content: "✓ "; }
.resume-erreurs { background: var(--rouge-pale); border: 2px solid var(--rouge); border-radius: var(--rayon); padding: 1rem 1.25rem; margin-bottom: 1.25rem; }
.resume-erreurs h2 { color: var(--rouge); font-size: 1.05rem; }
.resume-erreurs ul { margin: 0; padding-left: 1.2rem; }
.resume-erreurs a { color: var(--rouge); font-weight: 700; }
.autosave { min-height: 1.4rem; font-size: .9rem; color: var(--texte-doux); text-align: right; margin: 0 0 .5rem; }
.actions-bas { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 1.5rem; }
.actions-bas .bouton--large { flex: 1 1 100%; }
.actions-bas-secondaires { margin-top: 1rem; font-size: .92rem; }

/* Accueil et étapes */
.cartes-services { display: grid; gap: 1rem; }
.etat { display: inline-block; font-weight: 700; padding: .25rem .75rem; border-radius: 999px; font-size: .92rem; }
.etat--afaire { background: var(--orange-pale); color: var(--orange); }
.etat--encours { background: var(--bleu-pale); color: var(--bleu-fonce); }
.etat--attente { background: var(--bleu-pale); color: var(--bleu-fonce); }
.etat--ok { background: var(--vert-pale); color: var(--vert); }
.etat--alerte { background: var(--rouge-pale); color: var(--rouge); }
.etat--neutre { background: var(--fond); color: var(--texte-doux); }
.etapes { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.etape a { display: flex; gap: 1rem; align-items: center; padding: .85rem 1rem; margin-bottom: .5rem; background: var(--blanc); border: 1px solid var(--bord); border-radius: var(--rayon); text-decoration: none; color: var(--texte); }
.etape a:hover { border-color: var(--bleu); }
.etape-numero { flex: 0 0 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--fond); border: 2px solid var(--bord); }
.etape--faite .etape-numero { background: var(--vert); border-color: var(--vert); color: var(--blanc); }
.etape--courante a { border: 2px solid var(--bleu); }
.etape--courante .etape-numero { background: var(--bleu); border-color: var(--bleu); color: var(--blanc); }
.etape-texte { display: flex; flex-direction: column; }
.etape-texte small { color: var(--texte-doux); }
.progression { margin: .5rem 0 1rem; }
.progression-texte { font-weight: 700; color: var(--bleu); margin: 0 0 .4rem; }
.progression ol { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: .3rem; }
.progression li a { display: block; height: 100%; padding: .45rem .3rem .3rem; border-top: 5px solid var(--bord); font-size: .78rem; color: var(--texte-doux); text-decoration: none; line-height: 1.25; }
.progression li.faite a { border-top-color: var(--vert); }
.progression li.courante a { border-top-color: var(--bleu); color: var(--texte); font-weight: 700; }

/* Fiche en lecture */
.fiche { margin: 0; }
.fiche-ligne { display: grid; grid-template-columns: minmax(9rem, 40%) 1fr; gap: .2rem 1rem; padding: .55rem 0; border-bottom: 1px solid #edf0f5; }
.fiche-ligne:last-child { border-bottom: 0; }
.fiche-ligne dt { color: var(--texte-doux); }
.fiche-ligne dd { margin: 0; font-weight: 600; word-break: break-word; }
.fiche-ligne--modifiee dd { background: #fffbea; border-radius: 4px; padding: 0 .3rem; }
.badge-modifie, .badge-parti { display: inline-block; font-size: .78rem; font-weight: 700; padding: .05rem .5rem; border-radius: 999px; margin-left: .3rem; vertical-align: middle; }
.badge-modifie { background: #fdf0c2; color: #6b4e00; }
.badge-parti { background: var(--rouge-pale); color: var(--rouge); }
.personne { padding: .75rem 0; border-bottom: 1px solid var(--bord); }
.personne:last-child { border-bottom: 0; }
.personne--partie { opacity: .7; }
fieldset.personne-saisie { border: 1px solid var(--bord); }
fieldset.personne-saisie legend { font-size: 1.1rem; padding: 0 .4rem; }
.question { background: var(--blanc); border: 2px solid var(--bleu); border-radius: var(--rayon); padding: 1.25rem; margin: 1.5rem 0; }
.question-titre { font-size: 1.3rem; }
.question-boutons { display: grid; gap: .75rem; }
.aide-ecran { margin: 1.5rem 0; background: var(--blanc); border: 1px solid var(--bord); border-radius: var(--rayon); padding: .75rem 1rem; }
.aide-ecran summary { cursor: pointer; font-weight: 700; color: var(--bleu); }
.aide-ecran div { margin-top: .5rem; }

/* Récapitulatif et confirmation */
.recap-entete { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.recap-liste { list-style: none; padding: 0; margin: 0; }
.recap-liste li { padding: .55rem 0; border-bottom: 1px solid #edf0f5; }
.recap-liste li:last-child { border-bottom: 0; }
.ancienne { color: var(--texte-doux); text-decoration: line-through; }
.nouvelle { font-weight: 700; color: var(--vert); }
.confirmation { text-align: center; }
.confirmation-icone { width: 4.5rem; height: 4.5rem; margin: 1rem auto; border-radius: 50%; background: var(--vert); color: var(--blanc); font-size: 2.5rem; display: grid; place-items: center; }
.liste-simple { padding-left: 1.3rem; }
.faq details { background: var(--blanc); border: 1px solid var(--bord); border-radius: var(--rayon); padding: .9rem 1rem; margin-bottom: .6rem; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { margin: .6rem 0 0; }
.gros-contact { font-size: 1.25rem; font-weight: 700; }

@media (min-width: 40rem) {
  .question-boutons { grid-template-columns: 1fr 1fr; }
  .actions-bas .bouton--large { flex: 1 1 auto; width: auto; }
  .cartes-services { grid-template-columns: 1fr; }
}
@media (max-width: 30rem) {
  .fiche-ligne { grid-template-columns: 1fr; }
  .progression li a { font-size: 0; }
  .date-cases input { width: 4.5rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print {
  .entete-menu, .pied, .sans-impression, .evitement { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .carte { border: 1px solid #999; break-inside: avoid; }
}
