/* Loyer gelé — feuille de style */
@font-face { font-family: "Archivo"; src: url("/assets/fonts/archivo-var.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("/assets/fonts/public-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("/assets/fonts/public-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("/assets/fonts/public-sans-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --encre: #16263a;
  --encre-douce: #46566b;
  --fond: #eef3f6;
  --papier: #ffffff;
  --givre: #cfe5ee;
  --trait: #c9d4dd;
  --rouge: #c8201c;
  --vert: #1f7a52;
  /* Échelle officielle du DPE */
  --dpe-a: #009c6d; --dpe-b: #52b153; --dpe-c: #78bd76; --dpe-d: #f4e70f;
  --dpe-e: #f0b50f; --dpe-f: #eb8235; --dpe-g: #d7221f;
  --rayon: 6px;
  --large: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--encre); font: 400 17px/1.6 "Public Sans", system-ui, sans-serif; }
img, svg { max-width: 100%; }
a { color: var(--encre); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--dpe-f); outline-offset: 2px; }
.enveloppe { max-width: var(--large); margin: 0 auto; padding: 0 20px; }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { font-family: "Archivo", "Public Sans", sans-serif; font-stretch: 112%; line-height: 1.08; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(32px, 4.6vw, 52px); font-weight: 800; font-stretch: 118%; }
h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 750; }
h3 { font-size: 21px; font-weight: 700; font-stretch: 100%; }
p { margin: 0 0 1em; }
.chapeau { font-size: clamp(18px, 2vw, 21px); color: var(--encre-douce); max-width: 34em; }

/* En-tête */
.entete { background: var(--encre); color: #fff; }
.entete .enveloppe { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.marque { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font: 800 21px/1 "Archivo", sans-serif; font-stretch: 125%; }
.marque img { width: 30px; height: 30px; flex: none; }
.entete nav { display: flex; gap: 20px; font-size: 15px; }
.entete nav a { color: #dfe8ef; text-decoration: none; }
.entete nav a:hover { color: #fff; text-decoration: underline; }
@media (max-width: 720px) { .entete nav { display: none; } }

/* Ouverture : titre + étiquette DPE */
.ouverture { padding: 56px 0 40px; }
.ouverture .enveloppe { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); gap: 48px; align-items: center; }
@media (max-width: 860px) { .ouverture .enveloppe { grid-template-columns: 1fr; gap: 28px; } .ouverture { padding-top: 36px; } }
.ouverture .bouton { margin-top: 8px; }

.etiquette-dpe { margin: 0; background: var(--papier); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 22px 22px 18px; }
.etiquette-dpe ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.etiquette-dpe li { display: flex; align-items: center; gap: 10px; }
.barre { height: 38px; display: flex; align-items: center; padding: 0 14px; color: #fff; font: 800 22px/1 "Archivo", sans-serif; clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 0 100%); transition: transform .35s ease, filter .35s ease; }
.barre-a { width: 30%; background: var(--dpe-a); } .barre-b { width: 37%; background: var(--dpe-b); } .barre-c { width: 44%; background: var(--dpe-c); }
.barre-d { width: 58%; background: var(--dpe-d); color: var(--encre); } .barre-e { width: 65%; background: var(--dpe-e); color: var(--encre); }
.barre-f { width: 72%; background: var(--dpe-f); } .barre-g { width: 78%; background: var(--dpe-g); }
.etiquette-dpe .note { font-size: 14px; color: var(--encre-douce); white-space: nowrap; }
.etiquette-dpe .legende { margin: 14px 0 0; font-size: 14px; color: var(--encre-douce); }
.etiquette-dpe[data-classe] .barre { filter: saturate(.25) opacity(.45); }
.etiquette-dpe[data-classe="A"] .barre-a, .etiquette-dpe[data-classe="B"] .barre-b, .etiquette-dpe[data-classe="C"] .barre-c,
.etiquette-dpe[data-classe="D"] .barre-d, .etiquette-dpe[data-classe="E"] .barre-e, .etiquette-dpe[data-classe="F"] .barre-f,
.etiquette-dpe[data-classe="G"] .barre-g { filter: none; transform: translateX(10px); }
.etiquette-dpe .gel { display: none; align-items: center; gap: 4px; white-space: nowrap; font-weight: 700; font-size: 15px; color: var(--encre); }
.etiquette-dpe .gel svg { width: 18px; height: 18px; vertical-align: -3px; }
.etiquette-dpe li:nth-child(n+6) .gel { display: inline-flex; }
.etiquette-dpe li > .barre { flex: none; }
@media (prefers-reduced-motion: reduce) { .barre { transition: none; } }

/* Boutons et champs */
.bouton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 24px; border: 0; border-radius: var(--rayon); background: var(--encre); color: #fff; font: 700 17px/1.2 "Public Sans", sans-serif; text-decoration: none; cursor: pointer; }
.bouton:hover { background: #24395a; }
.bouton[disabled] { opacity: .55; cursor: wait; }
.bouton-clair { background: var(--papier); color: var(--encre); border: 2px solid var(--encre); }
.bouton-clair:hover { background: var(--givre); }
.lien-bouton { background: none; border: 0; padding: 0; font: inherit; color: var(--encre); text-decoration: underline; cursor: pointer; }

label { display: block; font-weight: 600; margin: 0 0 6px; }
.aide { display: block; font-weight: 400; font-size: 14px; color: var(--encre-douce); margin-top: 2px; }
input[type=text], input[type=number], input[type=date], input[type=email], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; border: 1.5px solid #9fb0bf; border-radius: var(--rayon); background: #fff; color: var(--encre); font: 400 17px/1.4 "Public Sans", sans-serif; }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--encre); outline: 3px solid var(--givre); outline-offset: 0; }
.champ { margin-bottom: 18px; }
.ligne { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .ligne { grid-template-columns: 1fr; } }
.choix { display: flex; gap: 10px; flex-wrap: wrap; }
.choix label { display: flex; align-items: center; gap: 8px; font-weight: 400; border: 1.5px solid #9fb0bf; border-radius: var(--rayon); padding: 10px 14px; background: #fff; cursor: pointer; margin: 0; }
.choix input { accent-color: var(--encre); width: 18px; height: 18px; }
.erreur { color: var(--rouge); font-weight: 600; margin: 8px 0 0; }

/* Simulateur */
.simulateur { padding: 24px 0 56px; }
.feuille { background: var(--papier); border: 1px solid var(--trait); border-radius: var(--rayon); padding: clamp(20px, 4vw, 40px); }
.etapes { list-style: none; counter-reset: etape; margin: 0; padding: 0; display: grid; gap: 34px; }
.etapes > li { counter-increment: etape; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; }
.etapes > li::before { content: counter(etape); width: 40px; height: 40px; border-radius: 50%; background: var(--givre); color: var(--encre); font: 800 19px/40px "Archivo", sans-serif; text-align: center; }
.etapes > li[aria-disabled="true"] { opacity: .45; }
.etapes h3 { margin-top: 6px; }
.recherche { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
@media (max-width: 560px) { .recherche { grid-template-columns: 1fr; } }
.suggestions { list-style: none; margin: 6px 0 0; padding: 0; border: 1px solid var(--trait); border-radius: var(--rayon); background: #fff; }
.suggestions li + li { border-top: 1px solid var(--trait); }
.suggestions button { width: 100%; text-align: left; padding: 12px 14px; border: 0; background: none; font: inherit; color: var(--encre); cursor: pointer; display: flex; gap: 12px; align-items: center; }
.suggestions button:hover, .suggestions button:focus-visible { background: var(--fond); }
.pastille { flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 4px; color: #fff; font: 800 18px/1 "Archivo", sans-serif; }
.pastille-A { background: var(--dpe-a); } .pastille-B { background: var(--dpe-b); } .pastille-C { background: var(--dpe-c); }
.pastille-D { background: var(--dpe-d); color: var(--encre); } .pastille-E { background: var(--dpe-e); color: var(--encre); }
.pastille-F { background: var(--dpe-f); } .pastille-G { background: var(--dpe-g); }
.dpe-trouve { display: flex; gap: 14px; align-items: center; background: var(--fond); border-radius: var(--rayon); padding: 14px 16px; margin-top: 12px; }
.dpe-trouve .pastille { width: 52px; height: 52px; font-size: 30px; }
.hausses { display: grid; gap: 10px; margin-bottom: 10px; }
.hausse { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
.hausse .retirer { min-height: 48px; }
@media (max-width: 560px) { .hausse { grid-template-columns: 1fr 1fr; } .hausse .retirer { grid-column: 1 / -1; min-height: 0; justify-self: start; } }

.resultat { border-top: 3px solid var(--encre); margin-top: 8px; padding-top: 24px; }
.montant { font: 800 clamp(44px, 8vw, 76px)/1 "Archivo", sans-serif; font-stretch: 125%; color: var(--rouge); margin: 4px 0 10px; }
.resultat .detail { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 18px 0; padding: 0; list-style: none; }
.resultat .detail li { background: var(--fond); border-radius: var(--rayon); padding: 12px 14px; }
.resultat .detail strong { display: block; font: 750 22px/1.2 "Archivo", sans-serif; }
.offre { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; background: var(--encre); color: #fff; border-radius: var(--rayon); padding: 20px 22px; margin-top: 20px; }
.offre p { margin: 0; color: #dfe8ef; }
.offre strong { color: #fff; }
.offre .bouton { background: var(--dpe-f); color: var(--encre); font-size: 18px; padding-inline: 26px; box-shadow: 0 4px 14px rgba(235,130,53,.45); }
.offre .bouton:hover { background: #f39a55; transform: translateY(-1px); }
@media (max-width: 640px) { .offre { grid-template-columns: 1fr; } }
.negatif { background: var(--fond); border-radius: var(--rayon); padding: 16px 18px; }

/* Sections */
.section { padding: 56px 0; }
.section-papier { background: var(--papier); border-block: 1px solid var(--trait); }
.colonnes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
@media (max-width: 820px) { .colonnes { grid-template-columns: 1fr; gap: 20px; } }
.texte > * { max-width: 44em; }
.faq details { border-bottom: 1px solid var(--trait); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 18px; }
.faq details p { margin: 10px 0 0; }

/* Pages de contenu */
.page-texte { padding: 40px 0 64px; }
.page-texte .feuille { max-width: 860px; }
.page-texte h2 { font-size: 26px; margin-top: 1.4em; }
.page-texte li { margin-bottom: .4em; }
.fil { font-size: 15px; margin-bottom: 14px; }
.encadre { background: var(--fond); border-left: 4px solid var(--dpe-f); padding: 14px 18px; margin: 20px 0; }
table { border-collapse: collapse; width: 100%; margin: 16px 0; font-size: 16px; }
th, td { border: 1px solid var(--trait); padding: 8px 10px; text-align: left; }
th { background: var(--fond); }

/* Pied de page */
.pied { background: var(--encre); color: #c3cfda; padding: 36px 0; font-size: 15px; }
.pied a { color: #fff; }
.pied .enveloppe { display: grid; gap: 14px; }
.pied nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.pied p { margin: 0; max-width: 60em; }

[hidden] { display: none !important; }
.consentement { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; font-size: 15px; line-height: 1.5; margin-top: 14px; padding: 12px 14px; background: var(--fond); border-radius: var(--rayon); cursor: pointer; }
.consentement a { white-space: nowrap; }
.consentement input { width: 20px; height: 20px; flex: none; margin-top: 2px; accent-color: var(--encre); }
.consentement.a-cocher { color: var(--rouge); font-weight: 600; }

.page-texte h1 { font-size: clamp(28px, 3.6vw, 40px); }
