/* ==========================================================================
   sechoir-solaire-avis.fr — feuille de style
   Identité : REVUE D'AVIS ÉDITORIALE. Papier chaud, encre brune, vert forêt
   (atouts/verdict) + terracotta assombri (limites/alertes).
   Typo : Fraunces (titres) + Source Serif 4 (corps) via Google Fonts.
   Layout : article + sommaire latéral collant (desktop), 1 colonne mobile.
   Mobile-first, contrastes AA, zéro framework, zéro JS.
   ========================================================================== */

:root {
  --papier: #faf7f1;
  --papier-carte: #ffffff;
  --papier-doux: #f3eee3;
  --encre: #262218;
  --encre-douce: #55503f;   /* AA sur papier */
  --vert: #2e5e43;
  --vert-fonce: #1e4530;
  --vert-voile: #e9f0e9;
  --brique: #9c4620;        /* terracotta assombrie, AA sur papier */
  --brique-voile: #f6e9df;
  --filet: #e2dbcb;
  --filet-fort: #cfc6b0;
  --jaune-marque: #f5e9c9;  /* surlignage discret */
  --serif-titre: "Fraunces", Georgia, "Times New Roman", serif;
  --serif-corps: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--serif-corps);
  font-size: 1.075rem;
  line-height: 1.78;
  color: var(--encre);
  background: var(--papier);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; }

a { color: var(--vert-fonce); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brique); }

:focus-visible {
  outline: 3px solid var(--vert);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: 0; top: -3.2rem;
  z-index: 200;
  background: var(--encre);
  color: var(--papier);
  padding: 0.6rem 1.1rem;
  font-family: var(--sans-ui);
  font-size: 0.9rem;
  text-decoration: none;
  transition: top .15s ease;
}
.skip-link:focus { top: 0; }

/* ---------- Bandeau supérieur ---------- */

.bandeau {
  background: var(--encre);
  color: #f0ead9;
  font-family: var(--sans-ui);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-align: center;
  padding: 0.5rem 1rem;
}
.bandeau a { color: #f0ead9; }
.bandeau a:hover { color: var(--jaune-marque); }

/* ---------- Masthead façon revue ---------- */

.masthead {
  border-bottom: 3px double var(--filet-fort);
  background: var(--papier);
}
.masthead-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 1.6rem 1.25rem 1.1rem;
  text-align: center;
}
.logotype {
  font-family: var(--serif-titre);
  font-weight: 900;
  font-size: clamp(1.55rem, 5vw, 2.3rem);
  letter-spacing: -0.015em;
  color: var(--encre);
  text-decoration: none;
  display: inline-block;
  line-height: 1.15;
}
.logotype .point { color: var(--vert); }
.devise {
  font-family: var(--sans-ui);
  font-size: 0.85rem;
  color: var(--encre-douce);
  margin-top: 0.35rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Navigation ---------- */

.nav {
  border-bottom: 1px solid var(--filet);
  background: var(--papier);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav ul {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 0.75rem;
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.15rem;
}
.nav a {
  display: block;
  padding: 0.7rem 0.85rem;
  font-family: var(--sans-ui);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--encre);
  text-decoration: none;
  border-bottom: 3px solid transparent;
}
.nav a:hover { color: var(--vert-fonce); border-bottom-color: var(--filet-fort); }
.nav a[aria-current="page"] { color: var(--vert-fonce); border-bottom-color: var(--vert); }

/* ---------- Gabarit article + sommaire ---------- */

.page {
  max-width: 1060px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}
@media (min-width: 1000px) {
  .page.avec-sommaire {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 264px;
    gap: 3rem;
    align-items: start;
  }
}
.article { max-width: 720px; }

.sommaire {
  display: none;
  border: 1px solid var(--filet);
  background: var(--papier-carte);
  padding: 1.15rem 1.25rem 1.3rem;
  position: sticky;
  top: 4.2rem;
  font-family: var(--sans-ui);
}
@media (min-width: 1000px) { .sommaire { display: block; } }
.sommaire h2 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--encre-douce);
  margin-bottom: 0.7rem;
}
.sommaire ol { list-style: none; counter-reset: som; }
.sommaire li { counter-increment: som; margin-bottom: 0.45rem; }
.sommaire a {
  font-size: 0.9rem;
  color: var(--encre);
  text-decoration: none;
  display: flex;
  gap: 0.5rem;
  line-height: 1.4;
}
.sommaire a::before {
  content: counter(som, decimal-leading-zero);
  color: var(--vert);
  font-weight: 700;
  font-size: 0.8rem;
  padding-top: 0.1rem;
}
.sommaire a:hover { color: var(--vert-fonce); text-decoration: underline; }
.sommaire .som-hors { border-top: 1px solid var(--filet); margin-top: 0.9rem; padding-top: 0.9rem; }
.sommaire .som-hors a::before { content: "→"; }

/* ---------- Tête d'article ---------- */

.article-head { margin-bottom: 1.8rem; }
.kicker {
  font-family: var(--sans-ui);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--brique);
  margin-bottom: 0.7rem;
}
h1 {
  font-family: var(--serif-titre);
  font-weight: 900;
  font-size: clamp(1.75rem, 5.5vw, 2.7rem);
  line-height: 1.14;
  letter-spacing: -0.02em;
  margin-bottom: 0.9rem;
}
.byline {
  font-family: var(--sans-ui);
  font-size: 0.88rem;
  color: var(--encre-douce);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  border-top: 1px solid var(--filet);
  border-bottom: 1px solid var(--filet);
  padding: 0.55rem 0;
}
.byline strong { color: var(--encre); font-weight: 600; }

.chapo {
  font-size: 1.2rem;
  line-height: 1.65;
  color: var(--encre);
  margin: 1.4rem 0 0;
}

/* ---------- Corps ---------- */

h2 {
  font-family: var(--serif-titre);
  font-weight: 800;
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  line-height: 1.22;
  letter-spacing: -0.015em;
  margin: 2.6rem 0 0.9rem;
  scroll-margin-top: 4.5rem;
}
h2 .num {
  color: var(--vert);
  font-size: 0.95em;
  margin-right: 0.35rem;
}
h3 {
  font-family: var(--serif-titre);
  font-weight: 700;
  font-size: 1.18rem;
  margin: 1.9rem 0 0.6rem;
  scroll-margin-top: 4.5rem;
}
p { margin-bottom: 1.05rem; }
ul, ol { margin: 0 0 1.05rem 1.35rem; }
li { margin-bottom: 0.45rem; }
strong { font-weight: 700; }
mark { background: var(--jaune-marque); color: var(--encre); padding: 0 0.15em; }

hr.sep {
  border: none;
  border-top: 1px solid var(--filet);
  margin: 2.2rem 0;
}

.note-bas {
  font-family: var(--sans-ui);
  font-size: 0.83rem;
  color: var(--encre-douce);
  border-top: 1px solid var(--filet);
  padding-top: 0.6rem;
  margin-top: 2rem;
}

/* ---------- Encadré verdict ---------- */

.verdict {
  background: var(--papier-carte);
  border: 1px solid var(--filet-fort);
  border-left: 6px solid var(--vert);
  padding: 1.4rem 1.5rem 1.5rem;
  margin: 1.8rem 0 0.5rem;
  box-shadow: 0 2px 10px rgba(38, 34, 24, .05);
}
.verdict .etiquette {
  font-family: var(--sans-ui);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--vert-fonce);
  margin-bottom: 0.6rem;
}
.verdict p { margin-bottom: 0.8rem; }
.verdict p:last-child { margin-bottom: 0; }

.pour-contre {
  display: grid;
  gap: 1rem;
  margin: 1.1rem 0 0.4rem;
}
@media (min-width: 640px) { .pour-contre { grid-template-columns: 1fr 1fr; } }
.pc-col {
  border: 1px solid var(--filet);
  padding: 0.95rem 1.05rem 1rem;
  background: var(--papier);
}
.pc-col h3 {
  margin: 0 0 0.55rem;
  font-family: var(--sans-ui);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.pc-pour h3 { color: var(--vert-fonce); }
.pc-contre h3 { color: var(--brique); }
.pc-col ul { list-style: none; margin: 0; }
.pc-col li {
  font-size: 0.95rem;
  line-height: 1.55;
  padding-left: 1.4rem;
  position: relative;
  margin-bottom: 0.55rem;
}
.pc-col li::before {
  position: absolute;
  left: 0;
  font-weight: 700;
}
.pc-pour li::before { content: "✓"; color: var(--vert); }
.pc-contre li::before { content: "–"; color: var(--brique); font-size: 1.2em; line-height: 1.2; }

/* ---------- Cartes atouts / limites ---------- */

.carte {
  background: var(--papier-carte);
  border: 1px solid var(--filet);
  padding: 1.15rem 1.3rem 1.05rem;
  margin: 0 0 1rem;
}
.carte h3 { margin-top: 0; }
.carte-limite { border-left: 5px solid var(--brique); }
.carte-atout { border-left: 5px solid var(--vert); }
.carte p:last-child { margin-bottom: 0; }

/* ---------- Grille de vérification (page CEE) ---------- */

.etape {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr);
  gap: 1.1rem;
  margin-bottom: 1.6rem;
}
.etape-num {
  font-family: var(--serif-titre);
  font-weight: 900;
  font-size: 1.9rem;
  line-height: 1;
  color: var(--vert);
  border-top: 3px solid var(--vert);
  padding-top: 0.45rem;
}
.etape h3 { margin-top: 0.1rem; }
.etape p:last-child { margin-bottom: 0; }
.etape .alerte {
  font-family: var(--sans-ui);
  font-size: 0.9rem;
  background: var(--brique-voile);
  border-left: 4px solid var(--brique);
  padding: 0.6rem 0.85rem;
  margin-top: 0.6rem;
}

/* ---------- Tableaux ---------- */

.table-scroll { overflow-x: auto; margin: 1.2rem 0 1.4rem; }
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 520px;
  font-family: var(--sans-ui);
  font-size: 0.93rem;
  background: var(--papier-carte);
}
caption {
  text-align: left;
  font-size: 0.85rem;
  color: var(--encre-douce);
  padding-bottom: 0.5rem;
}
th, td {
  border: 1px solid var(--filet);
  padding: 0.65rem 0.8rem;
  text-align: left;
  vertical-align: top;
  line-height: 1.5;
}
thead th {
  background: var(--papier-doux);
  font-size: 0.83rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.oui { color: var(--vert-fonce); font-weight: 700; }
.non { color: var(--brique); font-weight: 700; }

/* ---------- FAQ ---------- */

.faq details {
  background: var(--papier-carte);
  border: 1px solid var(--filet);
  margin-bottom: 0.75rem;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 2.6rem 1rem 1.2rem;
  font-family: var(--serif-titre);
  font-weight: 700;
  font-size: 1.08rem;
  line-height: 1.35;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--sans-ui);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--vert);
}
.faq details[open] summary::after { content: "–"; color: var(--brique); }
.faq details[open] summary { border-bottom: 1px solid var(--filet); }
.faq .faq-corps { padding: 1rem 1.2rem 0.3rem; }

/* ---------- Encadré transparence ---------- */

.transparence {
  background: var(--papier-doux);
  border: 1px solid var(--filet-fort);
  padding: 1.25rem 1.4rem;
  margin: 2rem 0;
}
.transparence h2, .transparence h3 { margin-top: 0; font-size: 1.15rem; }
.transparence p { font-size: 0.98rem; }
.transparence p:last-child { margin-bottom: 0; }

/* ---------- CTA doux ---------- */

.cta {
  background: var(--vert-fonce);
  color: #f2efe6;
  padding: 1.6rem 1.5rem 1.7rem;
  margin: 2.4rem 0 0.6rem;
}
.cta h2 {
  color: #ffffff;
  margin: 0 0 0.6rem;
  font-size: 1.45rem;
}
.cta p { color: #e4e9dd; font-size: 0.99rem; }
.cta .boutons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 1.1rem 0 0.7rem;
}
.btn {
  font-family: var(--sans-ui);
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  padding: 0.75rem 1.3rem;
  display: inline-block;
  border: 2px solid transparent;
}
.btn-plein { background: var(--jaune-marque); color: var(--encre); }
.btn-plein:hover { background: #ffffff; color: var(--vert-fonce); }
.btn-contour { border-color: #b6c4ad; color: #ffffff; }
.btn-contour:hover { background: rgba(255,255,255,.12); color: #ffffff; }
.cta .petit { font-size: 0.83rem; color: #c9d3bf; margin-bottom: 0; font-family: var(--sans-ui); }
.cta a:not(.btn) { color: #f2efc9; }

/* ---------- Maillage interne ---------- */

.lire-aussi {
  border: 1px solid var(--filet);
  border-top: 3px solid var(--encre);
  background: var(--papier-carte);
  padding: 1.1rem 1.3rem;
  margin: 2.2rem 0 0;
  font-family: var(--sans-ui);
}
.lire-aussi h2 {
  font-family: var(--sans-ui);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--encre-douce);
  margin: 0 0 0.7rem;
}
.lire-aussi ul { list-style: none; margin: 0; }
.lire-aussi li { margin-bottom: 0.5rem; font-size: 0.97rem; }

/* ---------- Pied de page ---------- */

.pied {
  border-top: 3px double var(--filet-fort);
  background: var(--papier-doux);
  margin-top: 3rem;
  font-family: var(--sans-ui);
}
.pied-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 2rem 1.25rem 2.4rem;
  font-size: 0.88rem;
  color: var(--encre-douce);
}
.pied nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  margin-bottom: 1.1rem;
}
.pied nav a { color: var(--encre); font-weight: 600; text-decoration: none; }
.pied nav a:hover { color: var(--vert-fonce); text-decoration: underline; }
.pied p { margin-bottom: 0.7rem; line-height: 1.6; }
.pied .legal { font-size: 0.8rem; }

/* ---------- Divers ---------- */

.illustration {
  border: 1px solid var(--filet);
  background: var(--papier-carte);
  padding: 0.6rem;
  margin: 1.4rem 0;
}
.illustration figcaption {
  font-family: var(--sans-ui);
  font-size: 0.82rem;
  color: var(--encre-douce);
  padding: 0.5rem 0.4rem 0.2rem;
}

@media (max-width: 480px) {
  body { font-size: 1.03rem; }
  .etape { grid-template-columns: 2.4rem minmax(0, 1fr); gap: 0.8rem; }
  .etape-num { font-size: 1.5rem; }
}
