/* Démarche Facile — feuille de style unique */
:root {
  --bleu: #1d4ed8;
  --bleu-fonce: #1e3a8a;
  --bleu-clair: #eff4ff;
  --texte: #1f2937;
  --gris: #6b7280;
  --bord: #e5e7eb;
  --fond: #f8fafc;
  --vert: #15803d;
  --rouge: #b91c1c;
  --rayon: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--texte);
  background: var(--fond);
  line-height: 1.6;
}
a { color: var(--bleu); }
img { max-width: 100%; }

/* En-tête */
.entete { background: #fff; border-bottom: 1px solid var(--bord); }
.entete .conteneur { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.logo { font-weight: 800; font-size: 1.2rem; text-decoration: none; color: var(--bleu-fonce); }
.logo span { color: var(--bleu); }
.nav { display: flex; gap: 4px 18px; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--texte); font-weight: 500; font-size: .95rem; }
.nav a:hover { color: var(--bleu); }

.conteneur { max-width: 1060px; margin: 0 auto; padding: 0 20px; }
main.conteneur { padding-top: 28px; padding-bottom: 48px; }

h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.2; margin: 0 0 12px; color: var(--bleu-fonce); }
h2 { font-size: 1.35rem; margin: 36px 0 12px; color: var(--bleu-fonce); }
h3 { font-size: 1.05rem; margin: 20px 0 6px; }
.chapo { font-size: 1.1rem; color: #374151; max-width: 760px; margin: 0 0 24px; }

.fil { font-size: .85rem; color: var(--gris); margin-bottom: 12px; }
.fil a { color: var(--gris); }

/* Badges confiance */
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; }
.badges li { background: var(--bleu-clair); color: var(--bleu-fonce); border-radius: 999px; padding: 4px 12px; font-size: .88rem; font-weight: 500; }

/* Cartes */
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.carte { display: block; background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon); padding: 18px; text-decoration: none; color: var(--texte); transition: border-color .15s, box-shadow .15s; }
.carte:hover { border-color: var(--bleu); box-shadow: 0 4px 14px rgba(29, 78, 216, .08); }
.carte strong { display: block; color: var(--bleu-fonce); font-size: 1.05rem; margin-bottom: 4px; }
.carte span { font-size: .92rem; color: var(--gris); }
.liste-liens { columns: 2 220px; padding-left: 18px; }
.liste-liens li { margin-bottom: 4px; break-inside: avoid; }

/* Boîtes */
.boite { background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon); padding: 20px; }
.astuce { background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--rayon); padding: 14px 18px; margin: 16px 0; }
.partenaire { background: var(--bleu-clair); border: 1px solid #c7d7fe; border-radius: var(--rayon); padding: 16px 18px; margin: 24px 0; }
.partenaire .mention { font-size: .78rem; color: var(--gris); display: block; margin-top: 6px; }
.avertissement { font-size: .85rem; color: var(--gris); border-top: 1px solid var(--bord); margin-top: 36px; padding-top: 16px; }

/* Générateur de lettre */
.generateur { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 24px; align-items: start; }
@media (max-width: 860px) { .generateur { grid-template-columns: 1fr; } }
.champ { margin-bottom: 14px; }
.champ label { display: block; font-weight: 600; font-size: .93rem; margin-bottom: 4px; }
.champ .aide { display: block; font-size: .8rem; color: var(--gris); margin-top: 3px; }
.champ input[type=text], .champ input[type=date], .champ textarea, select {
  width: 100%; font: inherit; font-size: 1rem; padding: 9px 11px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: var(--texte);
}
.champ textarea { min-height: 78px; resize: vertical; }
.champ input:focus, .champ textarea:focus, select:focus { outline: 2px solid #93b4fd; border-color: var(--bleu); }
.champ-case label { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; }
.champ-case input { margin-top: 5px; }
.requis { color: var(--rouge); }

.apercu-zone { position: sticky; top: 16px; }
.papier {
  background: #fff; border: 1px solid var(--bord); border-radius: 6px; box-shadow: 0 6px 24px rgba(0,0,0,.06);
  padding: 34px 36px; font-family: Helvetica, Arial, sans-serif; font-size: .82rem; line-height: 1.5; min-height: 420px; white-space: normal;
}
.papier .exp { margin-bottom: 14px; }
.papier .dest { margin-left: 52%; margin-bottom: 14px; }
.papier .lieu { text-align: right; margin-bottom: 18px; }
.papier .reco { font-weight: 700; margin-bottom: 4px; }
.papier .objet { font-weight: 700; margin-bottom: 14px; }
.papier .titre { text-align: center; font-weight: 700; font-size: 1.05rem; margin: 8px 0 22px; }
.papier p { margin: 0 0 10px; }
.papier .sign { margin-left: 52%; margin-top: 22px; }
.papier .vide { color: #b45309; background: #fef3c7; border-radius: 3px; padding: 0 2px; }
.papier .lieu-gauche { margin-top: 18px; }

/* Boutons */
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.btn { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-weight: 600; border: 0; border-radius: 10px; padding: 11px 18px; cursor: pointer; background: var(--bleu); color: #fff; text-decoration: none; }
.btn:hover { background: var(--bleu-fonce); }
.btn:disabled { opacity: .55; cursor: wait; }
.btn.secondaire { background: #fff; color: var(--bleu); border: 1px solid var(--bleu); }
.btn.secondaire:hover { background: var(--bleu-clair); }
.btn-mini { font: inherit; font-size: .85rem; border: 1px solid var(--bord); background: #fff; border-radius: 6px; padding: 2px 8px; cursor: pointer; }
.btn-mini:hover { border-color: var(--bleu); }

/* Outils PDF */
.depot {
  display: block; border: 2px dashed #93b4fd; background: #fff; border-radius: var(--rayon); padding: 34px 20px; text-align: center; cursor: pointer; transition: background .15s;
}
.depot:hover, .depot.survol { background: var(--bleu-clair); }
.depot strong { display: block; font-size: 1.1rem; color: var(--bleu-fonce); }
.depot span { color: var(--gris); font-size: .9rem; }
.depot input { display: none; }
.fichiers { list-style: none; padding: 0; margin: 16px 0 0; }
.fichiers li { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--bord); border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; }
.fichiers img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; background: #f1f5f9; }
.fichiers .nom { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; }
.fichiers .taille { color: var(--gris); font-size: .82rem; white-space: nowrap; }
.options { display: flex; flex-wrap: wrap; gap: 14px 24px; margin: 18px 0 4px; align-items: center; }
.options label { font-weight: 500; }
.options select { width: auto; }
.statut { margin-top: 14px; font-weight: 500; min-height: 1.6em; }
.statut.ok { color: var(--vert); }
.statut.erreur { color: var(--rouge); }

/* FAQ */
details { background: #fff; border: 1px solid var(--bord); border-radius: 10px; padding: 12px 16px; margin-bottom: 10px; }
summary { font-weight: 600; cursor: pointer; }
details p { margin: 10px 0 0; }

ol.etapes li, ul.conseils li { margin-bottom: 6px; }

/* Pied de page */
.pied { background: #fff; border-top: 1px solid var(--bord); padding: 24px 0; font-size: .88rem; color: var(--gris); }
.pied .conteneur { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.pied a { color: var(--gris); margin-right: 14px; }
