/* logenergie.fr
   Fond « enduit à la chaux », encre ardoise, un seul accent vert isolant.
   Les seules couleurs vives du site sont celles, officielles, des étiquettes DPE. */

:root {
  --fond: #f3f5f2;
  --papier: #ffffff;
  --encre: #1c2a2e;
  --gris: #5b6b6e;
  --trait: #d5dcd8;
  --accent: #1f6f5c;
  --accent-clair: #e3efe9;
  --dpe-a: #009c6d; --dpe-b: #52b153; --dpe-c: #a5cc74; --dpe-d: #f4e70f;
  --dpe-e: #f0b40f; --dpe-f: #eb8235; --dpe-g: #d7221f;
  --titre: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --texte: "Source Serif 4", Georgia, "Times New Roman", serif;
  --large: 960px;
  --lecture: 680px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font: 400 1.0625rem/1.68 var(--texte);
  font-optical-sizing: auto;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--titre); line-height: 1.15; letter-spacing: -.01em; margin: 0; }
h1 { font-size: clamp(2rem, 5.2vw, 3.1rem); font-weight: 700; }
h2 { font-size: 1.55rem; font-weight: 650; margin: 3rem 0 1rem; }
h3 { font-size: 1.1rem; font-weight: 650; margin: 1.6rem 0 .4rem; }
p { margin: 0 0 1.05rem; }

.conteneur { max-width: var(--large); margin: 0 auto; padding: 0 16px; }
.lecture { max-width: var(--lecture); }

/* En-tête */
.entete { border-bottom: 1px solid var(--trait); background: var(--papier); }
.entete .conteneur { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 1rem; }
.marque { display: flex; align-items: center; gap: .55rem; font: 700 1.2rem var(--titre); color: var(--encre); text-decoration: none; }
.marque svg { width: 26px; height: 22px; }
.entete nav a { font: 500 .95rem var(--titre); color: var(--gris); text-decoration: none; margin-left: 1.2rem; }
.entete nav a:hover { color: var(--encre); }

.ariane { font: 400 .9rem var(--titre); color: var(--gris); margin: 1.6rem 0 1rem; }
.ariane a { color: var(--gris); }

/* Le bloc signature : l'étiquette DPE de la commune */
.tete { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem; align-items: end; padding-bottom: 2.4rem; border-bottom: 1px solid var(--trait); }
.tete .chapo { font-size: 1.15rem; color: var(--gris); margin-top: 1rem; }
.tete .constat { font: 500 1.2rem/1.45 var(--titre); margin: 1.4rem 0 0; }
.tete .constat strong { font-weight: 700; }

.etiquette { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.etiquette li { display: grid; grid-template-columns: 1fr 3.6rem; align-items: center; gap: .6rem; }
.etiquette .barre {
  --l: 30%;
  position: relative; height: 34px; min-width: 46px; width: var(--l);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%);
  display: flex; align-items: center; padding-left: 12px;
  font: 700 1.05rem var(--titre); color: #fff;
}
.etiquette .val { font: 600 1rem var(--titre); font-variant-numeric: tabular-nums; text-align: right; }
.etiquette .A .barre { background: var(--dpe-a); } .etiquette .B .barre { background: var(--dpe-b); }
.etiquette .C .barre { background: var(--dpe-c); color: var(--encre); } .etiquette .D .barre { background: var(--dpe-d); color: var(--encre); }
.etiquette .E .barre { background: var(--dpe-e); color: var(--encre); } .etiquette .F .barre { background: var(--dpe-f); }
.etiquette .G .barre { background: var(--dpe-g); }
.etiquette-legende { font: 400 .85rem var(--titre); color: var(--gris); margin-top: .7rem; }

/* Chiffres secondaires : une ligne de faits, pas des cartes */
.faits { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); border-bottom: 1px solid var(--trait); }
.faits div { padding: 1.1rem 1rem 1.1rem 0; }
.faits dt { font: 400 .88rem/1.3 var(--titre); color: var(--gris); }
.faits dd { margin: .25rem 0 0; font: 650 1.35rem var(--titre); font-variant-numeric: tabular-nums; }
.faits dd small { font-size: .85rem; font-weight: 400; color: var(--gris); }

/* Répartitions (périodes, énergies) */
.repartition { list-style: none; padding: 0; margin: 1rem 0 1.5rem; font-family: var(--titre); }
.repartition li { display: grid; grid-template-columns: minmax(8rem, 15rem) 1fr 3.4rem; gap: .8rem; align-items: center; padding: .3rem 0; font-size: .95rem; }
.repartition .jauge { height: 8px; background: var(--trait); border-radius: 4px; overflow: hidden; }
.repartition .jauge span { display: block; height: 100%; background: var(--encre); }
.repartition .n { text-align: right; font-variant-numeric: tabular-nums; color: var(--gris); }

/* Tableaux */
.tableau { width: 100%; border-collapse: collapse; font: 400 .95rem/1.4 var(--titre); margin: 1rem 0 1.5rem; }
.tableau th { text-align: left; font-weight: 600; color: var(--gris); border-bottom: 2px solid var(--encre); padding: .5rem .6rem .5rem 0; }
.tableau td { border-bottom: 1px solid var(--trait); padding: .65rem .6rem .65rem 0; vertical-align: top; }
.tableau .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tableau tr.ici td { font-weight: 650; background: var(--accent-clair); }
.tableau .detail { color: var(--gris); font-size: .85rem; display: block; margin-top: .15rem; }

/* Échéances de location */
.echeances { list-style: none; padding: 0; margin: 1rem 0 1.5rem; border-left: 3px solid var(--encre); }
.echeances li { padding: .35rem 0 .35rem 1rem; font-family: var(--titre); }
.echeances b { display: inline-block; min-width: 9.5rem; }
.pastille { display: inline-block; width: 1.4em; height: 1.4em; line-height: 1.4em; text-align: center; color: #fff; font-weight: 700; border-radius: 3px; margin-right: .3rem; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--trait); padding: .9rem 0; }
.faq summary { cursor: pointer; font: 600 1.05rem/1.4 var(--titre); list-style-position: outside; }
.faq details[open] summary { margin-bottom: .6rem; }

/* Publicité */
.pub { margin: 2.2rem 0; min-height: 0; }
.pub::before { content: "Publicité"; display: block; font: 400 .75rem var(--titre); color: var(--gris); margin-bottom: .3rem; }
.pub:empty { display: none; }

.note { font: 400 .88rem/1.5 var(--titre); color: var(--gris); }
.encart { background: var(--papier); border: 1px solid var(--trait); border-left: 4px solid var(--accent); padding: 1.1rem 1.2rem; margin: 1.6rem 0; }
.encart p:last-child { margin-bottom: 0; }

/* Listes de communes */
.colonnes { columns: 3 14rem; column-gap: 2rem; padding: 0; list-style: none; font-family: var(--titre); }
.colonnes li { break-inside: avoid; padding: .22rem 0; display: flex; justify-content: space-between; gap: .6rem; border-bottom: 1px dotted var(--trait); }
.colonnes .n { color: var(--gris); font-variant-numeric: tabular-nums; font-size: .9rem; }

/* Pied de page */
.pied { margin-top: 4rem; border-top: 1px solid var(--trait); background: var(--papier); padding: 2rem 0 2.4rem; font: 400 .9rem/1.6 var(--titre); color: var(--gris); }
.pied nav a { color: var(--gris); margin-right: 1.2rem; }
.pied p { margin: .8rem 0 0; }

@media (max-width: 760px) {
  .tete { grid-template-columns: 1fr; gap: 1.6rem; }
  .repartition li { grid-template-columns: minmax(0, 1fr) 4.5rem 2.8rem; }
  .entete .conteneur { flex-wrap: wrap; padding-top: .6rem; padding-bottom: .6rem; min-height: 0; }
  .entete nav a { margin: 0 .9rem 0 0; font-size: .9rem; }
  .echeances b { display: block; }
  .tableau .masquable { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .etiquette .barre { animation: pousse .7s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i) * 60ms); transform-origin: left; }
  @keyframes pousse { from { transform: scaleX(.15); opacity: 0; } to { transform: none; opacity: 1; } }
}
