/* Page « Le DPE de votre adresse » : styles propres à la page, appuyés sur les variables du site (style.css).
   Seules couleurs hors charte : l'échelle officielle des étiquettes DPE (A à G), celle du climat (GES) et les teintes de qualité d'isolation, reprises de la page de secteur. */

.dpe-page { --dpe-A: #00854A; --dpe-B: #50AE30; --dpe-C: #A3C900; --dpe-D: #FFF200; --dpe-E: #FFB600; --dpe-F: #F77D00; --dpe-G: #E1261C;
  --ges-A: #E3E9F7; --ges-B: #C5CEF0; --ges-C: #A3AEE6; --ges-D: #8590D9; --ges-E: #6A6CC8; --ges-F: #5148AC; --ges-G: #3A2E88;
  --q-0: #D5CCBA; --q-1: #C0572F; --q-2: #D0893E; --q-3: #B9A45C; --q-4: #2F6B45; }

/* ---------- recherche (dans le bloc d'introduction) ---------- */
.dpe-recherche { position: relative; max-width: 680px; display: flex; flex-direction: column; gap: 12px; }
.dpe-recherche__label { font-family: var(--police-mono); font-size: var(--fs-eyebrow); letter-spacing: 0.1em; text-transform: uppercase; color: rgba(243,238,228,0.7); }
.dpe-recherche__champ { position: relative; display: flex; align-items: center; background: var(--blanc); border-radius: 16px; border: 2px solid var(--or); box-shadow: 0 14px 40px rgba(0,0,0,0.25); }
.dpe-recherche__champ:focus-within { outline: 3px solid rgba(205,175,96,0.55); outline-offset: 3px; }
.dpe-recherche__icone { flex: none; margin-left: 18px; color: var(--or-fonce); }
.dpe-recherche input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 18px; color: var(--marine); padding: 18px 12px; min-height: 60px; outline: none; }
.dpe-recherche input::placeholder { color: var(--gris); }
.dpe-recherche__effacer { flex: none; border: 0; background: transparent; color: var(--gris); font-size: 26px; line-height: 1; width: 44px; height: 44px; margin-right: 4px; border-radius: 12px; cursor: pointer; }
.dpe-recherche__effacer:hover, .dpe-recherche__effacer:focus-visible { color: var(--marine); background: var(--ivoire); }
.dpe-recherche__bouton { flex: none; margin: 6px; padding-inline: 22px; min-height: 48px; }
.dpe-suggestions { position: absolute; left: 0; right: 0; top: calc(100% - 4px); z-index: 20; list-style: none; margin: 0; padding: 6px; background: var(--blanc); border-radius: 14px; border: 1px solid var(--border-line); box-shadow: 0 18px 44px rgba(11,22,38,0.28); max-height: 380px; overflow: auto; }
.dpe-suggestions[hidden] { display: none; }
.dpe-sugg { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; min-height: 48px; border-radius: 10px; color: var(--marine); cursor: pointer; font-size: 16px; }
.dpe-sugg--actif, .dpe-sugg:hover { background: var(--ivoire); }
.dpe-sugg--hors { color: var(--gris); cursor: not-allowed; background: transparent; }
.dpe-sugg--hors:hover { background: transparent; }
.dpe-sugg__tag { flex: none; font-family: var(--police-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gris); border: 1px solid var(--border-line); border-radius: 999px; padding: 3px 10px; }
.dpe-sugg__tag--ok { color: var(--or-fonce); border-color: var(--or); }
.dpe-message { margin: 0; font-size: 15px; color: var(--ivoire); background: rgba(205,175,96,0.16); border-radius: 12px; padding: 10px 14px; }
.dpe-message[hidden] { display: none; }
.dpe-puces { display: flex; flex-wrap: wrap; gap: 10px; }
.dpe-puce { font-family: var(--police-mono); font-size: var(--fs-eyebrow); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ivoire); border: 1px solid rgba(243,238,228,0.35); border-radius: 999px; padding: 8px 14px; }
.dpe-discretion { margin: 0; max-width: 680px; font-size: 13px; line-height: 1.5; color: rgba(243,238,228,0.62); }

/* ---------- résultats ---------- */
.dpe-resultat { scroll-margin-top: 84px; }
.dpe-resultat[hidden] { display: none; }
.dpe-contenu { display: flex; flex-direction: column; gap: 40px; min-height: 160px; }
.dpe-h2 { margin: 6px 0 0; }
.dpe-chargement { margin: 0; font-size: 18px; color: var(--texte-secondaire); }
.dpe-chargement::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 12px; border: 2px solid var(--or); border-right-color: transparent; border-radius: 50%; vertical-align: -2px; animation: dpe-tour 0.9s linear infinite; }
@keyframes dpe-tour { to { transform: rotate(360deg); } }
.dpe-note { margin: 0; font-size: 15px; line-height: 1.55; color: var(--texte-secondaire); }
.dpe-note--attention { background: rgba(192,87,47,0.1); border-left: 3px solid var(--q-1); padding: 10px 14px; border-radius: 0 10px 10px 0; }
.dpe-note--mention { font-size: 13px; font-style: italic; color: var(--gris); max-width: 760px; }

.dpe-etat { border-radius: 24px; padding: 32px 36px; display: flex; flex-direction: column; gap: 12px; background: var(--blanc); border: 1px solid var(--border-line); }
.dpe-etat--vide { background: var(--ivoire); }
.dpe-etat--erreur { border-color: var(--q-1); }
.dpe-etat__titre { margin: 0; font-family: var(--police-serif); font-weight: 400; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); line-height: 1.1; color: var(--marine); }
.dpe-etat__texte { margin: 0; font-size: 17px; line-height: 1.6; color: var(--texte-secondaire); max-width: 640px; }
.dpe-bouton-sombre { align-self: flex-start; }

/* onglets (plusieurs logements à la même adresse) */
.dpe-logements { display: flex; flex-direction: column; gap: 12px; }
.dpe-logements:empty { display: none; }
.dpe-onglets { display: flex; gap: 10px; flex-wrap: wrap; }
.dpe-onglet { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 18px 8px 10px; border-radius: 999px; border: 1px solid var(--border-line); background: var(--blanc); color: var(--marine); font: inherit; font-size: 15px; cursor: pointer; text-align: left; }
.dpe-onglet:hover { border-color: var(--or-fonce); }
.dpe-onglet:focus-visible, .dpe-pastille:focus-visible, .dpe-recherche__bouton:focus-visible { outline: 3px solid var(--or); outline-offset: 2px; }
.dpe-onglet--actif { background: var(--marine); border-color: var(--marine); color: var(--ivoire); }

/* étiquettes colorées (A à G) */
.dpe-etiquette { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; font-family: var(--police-mono); font-weight: 700; font-size: 15px; color: var(--marine); background: var(--q-0); flex: none; }
.dpe-etiquette--A { background: var(--dpe-A); color: #fff; } .dpe-etiquette--B { background: var(--dpe-B); } .dpe-etiquette--C { background: var(--dpe-C); }
.dpe-etiquette--D { background: var(--dpe-D); } .dpe-etiquette--E { background: var(--dpe-E); } .dpe-etiquette--F { background: var(--dpe-F); } .dpe-etiquette--G { background: var(--dpe-G); color: #fff; }

/* fiche */
.dpe-fiche { display: flex; flex-direction: column; gap: 40px; scroll-margin-top: 90px; }
.dpe-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; justify-content: space-between; }
.dpe-tete__gauche { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.dpe-tete__meta, .dpe-tete__adresse { margin: 0; font-size: 14px; color: var(--gris); }
.dpe-validite { display: inline-block; font-family: var(--police-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; border-radius: 999px; padding: 7px 14px; }
.dpe-validite--ok { background: rgba(47,107,69,0.12); color: var(--vert); }
.dpe-validite--expire { background: rgba(154,47,31,0.12); color: var(--rouge); }

.dpe-echelles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.dpe-echelle { background: var(--blanc); border: 1px solid var(--border-line); border-radius: 24px; padding: 28px 28px 22px; }
.dpe-echelle__titre { margin: 0 0 18px; font-family: var(--police-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--or-fonce); font-weight: 500; }
.dpe-echelle__lignes { display: flex; flex-direction: column; gap: 6px; }
.dpe-echelle__ligne { display: grid; grid-template-columns: minmax(0, 1fr) 66px; align-items: center; column-gap: 12px; opacity: 0.5; min-height: 30px; transition: opacity 0.3s ease; }
.dpe-echelle__ligne--actif { opacity: 1; min-height: 62px; row-gap: 4px; }
.dpe-barre { display: flex; align-items: center; justify-content: flex-start; width: 0; max-width: var(--l); height: 28px; padding-left: 12px; border-radius: 6px 14px 14px 6px; font-family: var(--police-mono); font-weight: 700; font-size: 14px; color: var(--marine); transition: width 0.7s cubic-bezier(.2,.7,.2,1); }
.dpe-anime .dpe-barre { width: var(--l); }
.dpe-echelle__ligne--actif .dpe-barre { height: 52px; font-size: 26px; padding-left: 18px; box-shadow: 0 8px 22px rgba(11,22,38,0.22); }
.dpe-barre--dpe.dpe-barre--A, .dpe-barre--A { background: var(--dpe-A); color: #fff; } .dpe-barre--B { background: var(--dpe-B); } .dpe-barre--C { background: var(--dpe-C); }
.dpe-barre--D { background: var(--dpe-D); } .dpe-barre--E { background: var(--dpe-E); } .dpe-barre--F { background: var(--dpe-F); } .dpe-barre--G { background: var(--dpe-G); color: #fff; }
.dpe-barre--ges.dpe-barre--A { background: var(--ges-A); color: var(--marine); } .dpe-barre--ges.dpe-barre--B { background: var(--ges-B); } .dpe-barre--ges.dpe-barre--C { background: var(--ges-C); }
.dpe-barre--ges.dpe-barre--D { background: var(--ges-D); color: #fff; } .dpe-barre--ges.dpe-barre--E { background: var(--ges-E); color: #fff; } .dpe-barre--ges.dpe-barre--F { background: var(--ges-F); color: #fff; } .dpe-barre--ges.dpe-barre--G { background: var(--ges-G); color: #fff; }
.dpe-echelle__seuil { font-family: var(--police-mono); font-size: 11px; color: var(--gris); text-align: right; white-space: nowrap; }
.dpe-echelle__valeur { grid-column: 1 / -1; font-size: 15px; color: var(--marine); padding-left: 2px; }
.dpe-echelle__valeur strong { font-family: var(--police-serif); font-weight: 400; font-size: 32px; line-height: 1; margin-right: 4px; }

.dpe-chiffres { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.dpe-chiffre { background: var(--blanc); border: 1px solid var(--border-line); border-radius: 20px; padding: 22px 24px; display: flex; flex-direction: column; gap: 6px; }
.dpe-chiffre__valeur { font-family: var(--police-serif); font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem); line-height: 1; color: var(--marine); }
.dpe-chiffre__libelle { font-size: 14px; color: var(--gris); }

.dpe-bloc { background: var(--blanc); border: 1px solid var(--border-line); border-radius: 24px; padding: 30px 32px; display: flex; flex-direction: column; gap: 18px; }
.dpe-bloc__titre { margin: 0; font-family: var(--police-serif); font-weight: 400; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); line-height: 1.1; color: var(--marine); }
.dpe-bloc__intro { margin: 0; font-size: 16px; line-height: 1.55; color: var(--texte-secondaire); }

.dpe-facture { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.dpe-facture__montant { font-family: var(--police-serif); font-weight: 400; font-size: clamp(2rem, 1.4rem + 2vw, 3rem); line-height: 1; color: var(--marine); }
.dpe-facture__plage { font-size: 15px; color: var(--gris); }
.dpe-pile { display: flex; height: 22px; border-radius: 999px; overflow: hidden; background: var(--sable); }
.dpe-pile__seg { display: block; height: 100%; width: 0; transition: width 0.8s cubic-bezier(.2,.7,.2,1); }
.dpe-anime .dpe-pile__seg { width: var(--l); }
.dpe-usage--chauffage { background: var(--marine); } .dpe-usage--ecs { background: var(--or); } .dpe-usage--eclairage { background: #8A93A6; } .dpe-usage--aux { background: var(--or-fonce); } .dpe-usage--froid { background: #5B8DB8; }
.dpe-legende { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px 24px; }
.dpe-legende__item { display: grid; grid-template-columns: 14px 1fr; column-gap: 10px; align-items: baseline; font-size: 15px; color: var(--texte-secondaire); }
.dpe-legende__pastille { width: 14px; height: 14px; border-radius: 4px; align-self: center; }
.dpe-legende__valeur { grid-column: 2; font-size: 13px; color: var(--gris); }

.dpe-isolation { display: grid; grid-template-columns: minmax(180px, 280px) minmax(0, 1fr); gap: 32px; align-items: center; }
.dpe-maison { width: 100%; height: auto; max-height: 260px; }
.dpe-q { fill: var(--q-0); stroke: rgba(11,22,38,0.25); stroke-width: 1.5; transition: fill 0.5s ease; }
.dpe-q--1 { fill: var(--q-1); } .dpe-q--2 { fill: var(--q-2); } .dpe-q--3 { fill: var(--q-3); } .dpe-q--4 { fill: var(--q-4); }
.dpe-q--fen { stroke: rgba(11,22,38,0.4); } .dpe-q--porte { fill: var(--marine-secondaire); }
.dpe-jauges { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.dpe-jauge { display: grid; grid-template-columns: 110px minmax(90px, 1fr) minmax(0, 110px); align-items: center; gap: 14px; font-size: 15px; color: var(--marine); }
.dpe-jauge__barre { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.dpe-jauge__cran { height: 12px; border-radius: 4px; background: var(--sable); }
.dpe-jauge__cran.dpe-q--1 { background: var(--q-1); } .dpe-jauge__cran.dpe-q--2 { background: var(--q-2); } .dpe-jauge__cran.dpe-q--3 { background: var(--q-3); } .dpe-jauge__cran.dpe-q--4 { background: var(--q-4); }
.dpe-jauge__cran.dpe-q--1, .dpe-jauge__cran.dpe-q--2, .dpe-jauge__cran.dpe-q--3, .dpe-jauge__cran.dpe-q--4 { stroke: none; }
.dpe-jauge__etat { font-size: 14px; color: var(--gris); }

.dpe-deperditions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.dpe-deperdition { display: grid; grid-template-columns: 170px minmax(0, 1fr) 52px; align-items: center; gap: 14px; font-size: 15px; color: var(--marine); }
.dpe-deperdition__piste { height: 14px; border-radius: 999px; background: var(--sable); overflow: hidden; }
.dpe-deperdition__barre { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--or), var(--or-fonce)); transition: width 0.8s cubic-bezier(.2,.7,.2,1); }
.dpe-anime .dpe-deperdition__barre { width: var(--l); }
.dpe-deperdition__pct { text-align: right; font-family: var(--police-mono); font-size: 13px; color: var(--texte-secondaire); }

.dpe-equipements { margin: 0; display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); gap: 10px 24px; font-size: 16px; }
.dpe-equipements__nom { color: var(--gris); }
.dpe-equipements__valeur { margin: 0; color: var(--marine); }

.dpe-repartition { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-width: 520px; }
.dpe-repartition__item { display: grid; grid-template-columns: 30px minmax(0, 1fr) 34px; align-items: center; gap: 12px; }
.dpe-repartition__piste { height: 12px; border-radius: 999px; background: var(--sable); overflow: hidden; }
.dpe-repartition__barre { display: block; height: 100%; width: 0; border-radius: 999px; transition: width 0.8s cubic-bezier(.2,.7,.2,1); }
.dpe-anime .dpe-repartition__barre, .dpe-rue .dpe-repartition__barre { width: var(--l); }
.dpe-repartition__n { font-family: var(--police-mono); font-size: 13px; color: var(--texte-secondaire); text-align: right; }
.dpe-pastilles { display: flex; flex-wrap: wrap; gap: 8px; }
.dpe-pastille { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 10px 6px 14px; border-radius: 999px; border: 1px solid var(--border-line); background: var(--blanc); color: var(--marine); font: inherit; font-size: 15px; cursor: pointer; }
.dpe-pastille:hover { border-color: var(--or-fonce); }
.dpe-pastille--actif { background: var(--marine); border-color: var(--marine); color: var(--ivoire); }
.dpe-pastille__num { font-family: var(--police-mono); font-weight: 500; }

/* ---------- sections statiques ---------- */
.dpe-points { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; list-style: none; margin: 0; padding: 0; }
.dpe-point { background: var(--blanc); border: 1px solid var(--border-line); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.dpe-point__titre { margin: 0; font-family: var(--police-serif); font-weight: 400; font-size: 1.5rem; line-height: 1.1; color: var(--marine); }
.dpe-point__texte { margin: 0; font-size: 15px; line-height: 1.55; color: var(--texte-secondaire); }
.dpe-liens { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.dpe-lien { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 22px 24px; border-radius: 20px; border: 1px solid var(--border-line); background: var(--blanc); color: var(--marine); text-decoration: none; transition: border-color 0.2s ease, transform 0.2s ease; }
.dpe-lien:hover, .dpe-lien:focus-visible { border-color: var(--or-fonce); transform: translateY(-2px); }
.dpe-lien__titre { font-family: var(--police-serif); font-size: 1.5rem; line-height: 1.1; }
.dpe-lien__texte { font-size: 14px; color: var(--gris); }
.dpe-source { margin: 28px 0 0; font-size: 13px; line-height: 1.55; color: var(--gris); max-width: 760px; }
.dpe-source a { color: inherit; text-decoration: underline; }

@media (max-width: 56.25rem) {
  .dpe-echelles { grid-template-columns: 1fr; }
  .dpe-points { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dpe-isolation { grid-template-columns: 1fr; }
  .dpe-maison { max-width: 260px; margin-inline: auto; }
}
@media (max-width: 40rem) {
  .dpe-recherche input { font-size: 16px; padding-inline: 6px; }
  .dpe-recherche__bouton { padding-inline: 14px; }
  .dpe-recherche__bouton .dpe-bouton-texte { display: none; }
  .dpe-chiffres { grid-template-columns: 1fr; }
  .dpe-points { grid-template-columns: 1fr; }
  .dpe-etat, .dpe-bloc, .dpe-echelle { padding: 22px 20px; border-radius: 20px; }
  .dpe-jauge { grid-template-columns: 84px minmax(60px, 1fr); }
  .dpe-jauge__etat { grid-column: 1 / -1; margin-top: -8px; }
  .dpe-deperdition { grid-template-columns: minmax(0, 1fr) 52px; }
  .dpe-deperdition__piste { grid-column: 1 / -1; grid-row: 2; }
  .dpe-deperdition__pct { grid-row: 1; grid-column: 2; }
  .dpe-equipements { grid-template-columns: 1fr; gap: 2px; }
  .dpe-equipements__valeur { margin-bottom: 12px; }
  .dpe-onglet__texte { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .dpe-barre, .dpe-pile__seg, .dpe-deperdition__barre, .dpe-repartition__barre, .dpe-q, .dpe-lien, .dpe-echelle__ligne { transition: none; }
  .dpe-chargement::before { animation: none; }
}
.dpe-choix-logement { max-width: 560px; }
