/* Récupérer mon loyer — feuille de style
 * Idée directrice : l'émail bleu des plaques de rue parisiennes.
 * Un seul élément fort (le résultat en forme de plaque), tout le reste sobre.
 */
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }

:root {
  --plaque: #1d3a72;        /* bleu émail des plaques de rue */
  --plaque-fonce: #142a54;
  --cadre: #2e6b4f;         /* liseré vert des plaques */
  --fond: #e9eef4;          /* gris bleuté, pierre de Paris par temps clair */
  --surface: #ffffff;
  --texte: #18233a;
  --texte-doux: #4a566e;
  --trait: #c9d2de;
  --alerte: #b42318;
  --alerte-fond: #fdecea;
  --ok: #2e6b4f;
  --ok-fond: #e7f2ec;
  --info-fond: #fff6e0;
  --info-trait: #e0b84a;
  --focus: #f2a900;
  --rayon: 6px;
  --mesure: 68ch;
  --titre: "Barlow Condensed", "Arial Narrow", sans-serif;
  --corps: "Atkinson Hyperlegible", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: var(--corps);
  font-size: 1.0625rem;
  line-height: 1.55;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--plaque); text-underline-offset: 0.18em; }
a:hover { color: var(--plaque-fonce); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.enveloppe { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* ---------- En-tête ---------- */
.entete { background: var(--plaque); color: #fff; }
.entete .enveloppe { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.marque { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: var(--titre); font-weight: 700; font-size: 1.45rem; letter-spacing: 0.01em; }
.marque:hover { color: #fff; }
.marque svg { width: 38px; height: 38px; flex: none; }
.entete nav a { color: #fff; font-weight: 700; text-decoration: none; border-bottom: 2px solid rgba(255,255,255,0.45); padding-bottom: 2px; }
.entete nav a:hover { border-bottom-color: #fff; }

/* ---------- Accroche + simulateur ---------- */
.accroche { padding: 48px 0 56px; }
.accroche .grille { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: start; }
h1, h2, h3 { font-family: var(--titre); font-weight: 700; line-height: 1.08; margin: 0 0 0.5em; color: var(--plaque-fonce); }
h1 { font-size: clamp(2.3rem, 4.6vw, 3.5rem); letter-spacing: -0.005em; }
h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
h3 { font-size: 1.35rem; }
.chapeau { font-size: 1.2rem; color: var(--texte-doux); max-width: 34ch; margin: 0 0 28px; }
.reperes { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.reperes li { display: grid; grid-template-columns: 5.2rem 1fr; gap: 14px; align-items: baseline; border-top: 1px solid var(--trait); padding-top: 12px; }
.reperes strong { font-family: var(--titre); font-size: 2rem; line-height: 1; color: var(--plaque); }
.reperes span { color: var(--texte-doux); font-size: 0.98rem; }
.source { font-size: 0.85rem; color: var(--texte-doux); margin-top: 14px; }

/* Carte du simulateur */
.simulateur { background: var(--surface); border-radius: var(--rayon); border: 1px solid var(--trait); padding: 28px; }
.simulateur h2 { font-size: 1.7rem; margin-bottom: 4px; }
.simulateur > p { margin: 0 0 20px; color: var(--texte-doux); }
.champ { margin-bottom: 18px; position: relative; }
.champ > label, .champ > .legende { display: block; font-weight: 700; margin-bottom: 6px; }
.aide { display: block; font-weight: 400; font-size: 0.9rem; color: var(--texte-doux); margin-top: 2px; }
input[type="text"], input[type="number"], input[type="email"], select, textarea {
  width: 100%; font: inherit; color: var(--texte); background: #fff;
  border: 1.5px solid #9aa7ba; border-radius: 4px; padding: 10px 12px; min-height: 46px;
}
input:focus, select:focus, textarea:focus { border-color: var(--plaque); }
.deux { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.suffixe { position: relative; }
.suffixe input { padding-right: 48px; }
.suffixe span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--texte-doux); pointer-events: none; }

/* Choix en boutons */
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.choix { display: flex; flex-wrap: wrap; gap: 8px; }
.choix input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choix label { display: inline-flex; align-items: center; justify-content: center; min-width: 54px; min-height: 44px; padding: 8px 16px; border: 1.5px solid #9aa7ba; border-radius: 4px; cursor: pointer; font-weight: 700; background: #fff; }
.choix input:checked + label { background: var(--plaque); border-color: var(--plaque); color: #fff; }
.choix input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Suggestions d'adresse */
.suggestions { list-style: none; margin: 4px 0 0; padding: 4px 0; position: absolute; left: 0; right: 0; z-index: 5; background: #fff; border: 1.5px solid var(--plaque); border-radius: 4px; max-height: 260px; overflow-y: auto; }
.suggestions[hidden] { display: none; }
.suggestions li { padding: 10px 12px; cursor: pointer; }
.suggestions li[aria-selected="true"], .suggestions li:hover { background: #edf2fa; }
.quartier-trouve { margin-top: 8px; font-size: 0.95rem; color: var(--ok); font-weight: 700; }
.quartier-trouve.erreur { color: var(--alerte); }

.case { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; font-size: 0.95rem; }
.case input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--plaque); }

.bouton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; padding: 12px 20px; border: 0; border-radius: 4px; background: var(--plaque); color: #fff; font: inherit; font-weight: 700; font-size: 1.1rem; cursor: pointer; text-decoration: none; }
.bouton:hover { background: var(--plaque-fonce); color: #fff; }
.bouton[disabled] { background: #8b97ab; cursor: not-allowed; }
.bouton.second { background: #fff; color: var(--plaque); border: 1.5px solid var(--plaque); }
.erreur-form { color: var(--alerte); font-weight: 700; margin: 10px 0 0; }

/* ---------- Le résultat : une plaque de rue ---------- */
.resultat { margin-top: 24px; }
.resultat[hidden] { display: none; }
.plaque {
  background: var(--plaque); color: #fff; border-radius: 10px;
  padding: 6px; box-shadow: 0 0 0 4px var(--cadre);
}
.plaque-interieur { border: 3px solid #fff; border-radius: 6px; padding: 20px 22px; text-align: center; }
.plaque-petit { font-size: 1rem; margin: 0; opacity: 0.92; }
.plaque-grand { font-family: var(--titre); font-weight: 700; font-size: clamp(2.6rem, 8vw, 4rem); line-height: 1; margin: 6px 0 4px; letter-spacing: 0.01em; }
.plaque.conforme { background: var(--cadre); box-shadow: 0 0 0 4px var(--plaque); }
@media (prefers-reduced-motion: no-preference) {
  .plaque { animation: pose 420ms cubic-bezier(.2,.8,.2,1); }
  @keyframes pose { from { transform: translateY(8px) rotate(-1deg); opacity: 0; } to { transform: none; opacity: 1; } }
}
.detail { width: 100%; border-collapse: collapse; margin: 18px 0 6px; font-size: 1rem; }
.detail th, .detail td { padding: 9px 0; border-bottom: 1px solid var(--trait); text-align: left; vertical-align: top; }
.detail td { text-align: right; font-weight: 700; white-space: nowrap; padding-left: 12px; }
.detail tr.total th, .detail tr.total td { border-bottom: 0; font-size: 1.15rem; color: var(--alerte); }
.note { font-size: 0.9rem; color: var(--texte-doux); }
.encart { border-left: 4px solid var(--info-trait); background: var(--info-fond); padding: 12px 14px; border-radius: 0 4px 4px 0; margin: 14px 0; font-size: 0.97rem; }
.encart.rouge { border-color: var(--alerte); background: var(--alerte-fond); }
.encart.vert { border-color: var(--ok); background: var(--ok-fond); }
.encart p { margin: 0 0 6px; }
.encart p:last-child { margin: 0; }
.offre { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--trait); }
.offre h3 { margin-bottom: 6px; }
.offre ul { margin: 0 0 12px; padding-left: 1.2em; }
.prix { font-family: var(--titre); font-size: 2.2rem; font-weight: 700; color: var(--plaque); line-height: 1; margin: 8px 0 12px; }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section.blanche { background: var(--surface); }
.section .intro { max-width: var(--mesure); color: var(--texte-doux); margin: 0 0 28px; }
.etapes { list-style: none; counter-reset: etape; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin: 0; padding: 0; }
.etapes li { counter-increment: etape; }
.etapes li::before {
  content: counter(etape); display: inline-grid; place-items: center; width: 44px; height: 44px; margin-bottom: 12px;
  background: var(--plaque); color: #fff; border-radius: 6px; box-shadow: 0 0 0 3px var(--cadre);
  font-family: var(--titre); font-weight: 700; font-size: 1.5rem;
}
.etapes p { margin: 0; color: var(--texte-doux); max-width: 34ch; }
.contenu { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: start; }
.liste-contenu { margin: 0; padding: 0; list-style: none; }
.liste-contenu li { padding: 14px 0; border-bottom: 1px solid var(--trait); }
.liste-contenu strong { display: block; }
.liste-contenu span { color: var(--texte-doux); }
.encadre-prix { background: var(--fond); border-radius: var(--rayon); padding: 24px; }
.encadre-prix .prix { font-size: 3rem; }
.faq { max-width: var(--mesure); }
.faq details { border-bottom: 1px solid var(--trait); padding: 4px 0; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 28px 14px 0; position: relative; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-size: 1.5rem; color: var(--plaque); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 14px; color: var(--texte-doux); }

/* ---------- Pages de texte ---------- */
.page-texte { padding: 40px 0 64px; }
.page-texte .feuille { background: var(--surface); border-radius: var(--rayon); border: 1px solid var(--trait); padding: 32px; max-width: 820px; }
.page-texte h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.page-texte h2 { font-size: 1.5rem; margin-top: 1.6em; }
.page-texte p, .page-texte li { max-width: var(--mesure); }
.a-completer { background: #fff3c4; padding: 0 4px; border-radius: 3px; }

/* ---------- Pied de page ---------- */
.pied { background: var(--plaque-fonce); color: #d9e1ee; padding: 32px 0; font-size: 0.93rem; }
.pied .enveloppe { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.pied a { color: #fff; }
.pied nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.pied p { margin: 0; max-width: 60ch; }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .accroche .grille, .contenu { grid-template-columns: 1fr; gap: 32px; }
  .etapes { grid-template-columns: 1fr; gap: 22px; }
  .chapeau { max-width: none; }
}
@media (max-width: 520px) {
  .simulateur, .page-texte .feuille { padding: 20px 16px; }
  .deux { grid-template-columns: 1fr; }
  .accroche { padding-top: 32px; }
  .entete nav { display: none; }
}

/* ---------- Pages de contenu (arrondissements, guides) ---------- */
.fil { font-size: 0.92rem; color: var(--texte-doux); margin: 0 0 14px; }
.fil a { color: var(--texte-doux); }
.maj { font-size: 0.92rem; color: var(--texte-doux); margin: -4px 0 22px; }
.article h2 { margin-top: 1.8em; }
.article h3 { margin-top: 1.4em; }
.article p, .article li { max-width: var(--mesure); }
.defile { overflow-x: auto; margin: 10px 0 6px; -webkit-overflow-scrolling: touch; }
.tableau { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 0.97rem; }
.tableau caption { text-align: left; font-weight: 700; padding: 0 0 6px; }
.tableau th, .tableau td { border: 1px solid var(--trait); padding: 8px 10px; text-align: right; }
.tableau thead th { background: var(--plaque); color: #fff; font-weight: 700; text-align: center; }
.tableau tbody th { text-align: left; background: #f3f6fa; font-weight: 700; }
.appel { background: var(--plaque); color: #fff; border-radius: var(--rayon); box-shadow: 0 0 0 4px var(--cadre); padding: 22px; margin: 28px 0; max-width: var(--mesure); }
.appel h2, .appel h3 { color: #fff; margin: 0 0 6px; }
.appel p { margin: 0 0 14px; }
.appel .bouton { background: #fff; color: var(--plaque); width: auto; }
.appel .bouton:hover { background: #e9eef4; color: var(--plaque-fonce); }
.grille-arr { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.grille-arr a { display: block; padding: 10px 12px; border: 1.5px solid var(--trait); border-radius: 4px; background: #fff; text-decoration: none; font-weight: 700; }
.grille-arr a:hover, .grille-arr a[aria-current="page"] { border-color: var(--plaque); background: var(--plaque); color: #fff; }
.liens-guides { margin: 0; padding-left: 1.2em; }
.liens-guides li { margin: 6px 0; }
.tableau.texte { min-width: 0; }
.tableau.texte td { text-align: left; }
