/* ==========================================================================
   comparatif-sechoir-solaire.fr — feuille de style
   Identité : GUIDE D'ACHAT / COMPARATEUR. Ton neutre, factuel.
   Palette : blanc + gris neutres + un bleu ardoise sobre. Zéro couleur
   "vendeuse". Beaucoup de tableaux, verdicts par pastilles de niveau.
   System fonts uniquement, mobile-first, zéro dépendance externe.
   ========================================================================== */

:root {
  --encre: #1b2733;
  --encre-doux: #4a5966;
  --encre-faible: #6b7885;
  --bleu: #2f5d86;
  --bleu-fonce: #234a6d;
  --bleu-clair: #eef3f8;
  --bleu-voile: #f6f9fc;
  --ligne: #d9e0e7;
  --ligne-forte: #c3ccd5;
  --fond: #f4f6f8;
  --fond2: #eceff2;
  --blanc: #ffffff;
  /* verdicts (sobres, pas criards) */
  --bon: #2f7d55;
  --bon-fond: #eaf3ee;
  --moyen: #8c5f14;        /* assombri pour contraste AA (texte + libellé blanc) */
  --moyen-fond: #f4ecdd;
  --faible: #b0533c;
  --faible-fond: #f6ebe7;
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--encre);
  background: var(--blanc);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

/* ---------- En-tête ---------- */

.entete {
  background: var(--blanc);
  border-bottom: 1px solid var(--ligne);
}
.entete-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0.95rem 1.25rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.logo-mark { flex: 0 0 auto; line-height: 0; }
.marque {
  text-decoration: none;
  color: var(--encre);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.marque b { color: var(--bleu); font-weight: 700; }
.sous-marque {
  flex: 1 1 100%;
  font-size: 0.8rem;
  color: var(--encre-faible);
  margin-top: 0.1rem;
}

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

.nav { background: var(--fond); border-bottom: 1px solid var(--ligne); }
.nav ul {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 0.65rem;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
}
.nav a {
  display: block;
  padding: 0.6rem 0.8rem;
  color: var(--encre-doux);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a:focus { color: var(--bleu); }
.nav a[aria-current="page"] { color: var(--bleu); border-bottom-color: var(--bleu); }
.nav .nav-cta { margin-left: auto; color: var(--bleu); }

/* ---------- Hero (sobre, clair) ---------- */

.hero { background: var(--bleu-voile); border-bottom: 1px solid var(--ligne); }
.hero-inner { max-width: 900px; margin: 0 auto; padding: 2.2rem 1.25rem 2.3rem; }
.kicker {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bleu);
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.hero h1 {
  font-size: 1.85rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--encre);
  margin-bottom: 0.85rem;
}
.hero-sub {
  font-size: 1.06rem;
  color: var(--encre-doux);
  max-width: 42em;
  margin-bottom: 1.3rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; }

/* ---------- Boutons (discrets) ---------- */

.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.65rem 1.05rem;
  border-radius: 4px;
  letter-spacing: 0.005em;
}
.btn-primary { background: var(--bleu); color: #fff; border: 1px solid var(--bleu); }
.btn-primary:hover { background: var(--bleu-fonce); border-color: var(--bleu-fonce); }
.btn-ghost { background: var(--blanc); color: var(--bleu); border: 1px solid var(--ligne-forte); }
.btn-ghost:hover { border-color: var(--bleu); }

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

main { max-width: 900px; margin: 0 auto; padding: 1.9rem 1.25rem 3rem; }

.maj { font-size: 0.8rem; color: var(--encre-faible); margin-bottom: 1.4rem; }

.chapeau { font-size: 1.1rem; color: var(--encre-doux); margin-bottom: 1.5rem; }

h2 {
  font-size: 1.42rem;
  line-height: 1.28;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--encre);
  margin: 2.4rem 0 0.85rem;
  padding-top: 1rem;
  border-top: 2px solid var(--ligne);
}
h2 .num {
  color: var(--bleu);
  font-weight: 700;
  font-size: 0.95rem;
  margin-right: 0.5rem;
}
h3 { font-size: 1.1rem; font-weight: 700; color: var(--bleu-fonce); margin: 1.5rem 0 0.5rem; }

p { margin-bottom: 1rem; }
ul, ol { margin: 0 0 1rem 1.35rem; }
li { margin-bottom: 0.4rem; }

a { color: var(--bleu); }
a:hover { color: var(--bleu-fonce); }
strong { color: var(--encre); }

/* ---------- Bandeau de repères ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--ligne);
  border: 1px solid var(--ligne);
  margin: 1.7rem 0;
}
.stat { background: var(--blanc); padding: 0.95rem 1.05rem; }
.stat .n { font-size: 1.45rem; font-weight: 800; color: var(--bleu); line-height: 1.1; letter-spacing: -0.01em; }
.stat .l { font-size: 0.84rem; color: var(--encre-doux); margin-top: 0.25rem; }

/* ---------- Tableaux (cœur du site) ---------- */

.tableau-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--ligne);
  border-radius: 4px;
  -webkit-overflow-scrolling: touch;
}
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; min-width: 560px; }
caption {
  caption-side: bottom;
  text-align: left;
  font-size: 0.8rem;
  color: var(--encre-faible);
  padding: 0.6rem 0.75rem;
}
th, td { border: 1px solid var(--ligne); padding: 0.6rem 0.75rem; text-align: left; vertical-align: top; }
thead th {
  background: var(--bleu);
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  position: sticky;
  top: 0;
}
tbody th {
  background: var(--fond);
  font-weight: 700;
  color: var(--encre);
  white-space: nowrap;
}
td.mono, th.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
tbody tr:nth-child(even) td { background: var(--bleu-voile); }
/* colonne recommandée mise en avant */
.col-reco { background: var(--bleu-clair) !important; }
th.col-reco { background: var(--bleu-fonce) !important; }
tbody tr:nth-child(even) td.col-reco { background: #e3edf6 !important; }

/* pastilles de verdict */
.pastille {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.86rem;
  white-space: nowrap;
}
.pastille::before {
  content: "";
  width: 0.7rem; height: 0.7rem;
  border-radius: 50%;
  flex: 0 0 auto;
}
.p-bon { color: var(--bon); }
.p-bon::before { background: var(--bon); }
.p-moyen { color: var(--moyen); }
.p-moyen::before { background: var(--moyen); }
.p-faible { color: var(--faible); }
.p-faible::before { background: var(--faible); }

.legende {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.4rem;
  font-size: 0.85rem;
  color: var(--encre-doux);
  margin: 0.4rem 0 1.6rem;
}

/* ---------- Encadrés ---------- */

.encadre {
  background: var(--fond);
  border: 1px solid var(--ligne);
  border-left: 4px solid var(--bleu);
  padding: 1rem 1.2rem;
  margin: 1.3rem 0;
  font-size: 0.98rem;
}
.encadre-titre { display: block; font-weight: 700; color: var(--encre); margin-bottom: 0.35rem; }
.encadre.exemple { border-left-color: var(--moyen); background: var(--moyen-fond); }
.encadre.note { border-left-color: var(--ligne-forte); background: var(--bleu-voile); }
.note-bas { font-size: 0.82rem; color: var(--encre-faible); margin-top: 0.5rem; }

/* ---------- Cartes "quand choisir" ---------- */

.cartes { display: grid; grid-template-columns: 1fr; gap: 1rem; margin: 1.5rem 0; }
.carte {
  border: 1px solid var(--ligne);
  border-top: 3px solid var(--bleu);
  border-radius: 4px;
  padding: 1.05rem 1.2rem;
  background: var(--blanc);
}
.carte h3 { margin-top: 0.15rem; color: var(--encre); }
.carte .tag {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--encre-faible);
  font-weight: 600;
}
.carte p { margin-bottom: 0; font-size: 0.96rem; color: var(--encre-doux); }

/* ---------- Barres de coût (data-viz simple) ---------- */

.barres { margin: 1.4rem 0; display: grid; gap: 0.65rem; }
.barre-ligne { display: grid; grid-template-columns: 1fr; gap: 0.2rem; }
.barre-lab { font-size: 0.9rem; color: var(--encre-doux); display: flex; justify-content: space-between; gap: 1rem; }
.barre-lab b { color: var(--encre); font-weight: 700; }
.barre-piste { background: var(--fond2); border-radius: 3px; height: 1.1rem; overflow: hidden; }
.barre-jauge { height: 100%; background: var(--bleu); border-radius: 3px 0 0 3px; }
.barre-jauge.j-energie { background: var(--faible); }
.barre-jauge.j-mo { background: var(--moyen); }
.barre-jauge.j-autre { background: var(--bleu); }

/* ---------- Barres empilées (structure de coût par mode) ---------- */

.pile-bloc { margin: 1.2rem 0 0.6rem; display: grid; gap: 1.05rem; }
.pile-ligne { display: grid; gap: 0.32rem; }
.pile-titre { font-size: 0.92rem; font-weight: 700; color: var(--encre); }
.pile {
  display: flex;
  height: 1.75rem;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid var(--ligne);
}
.pile span {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  min-width: 0;
}
.seg-energie { background: var(--faible); }
.seg-invest { background: var(--bleu); }
.seg-maint { background: var(--moyen); }
.pile-legende {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.3rem;
  font-size: 0.82rem;
  color: var(--encre-doux);
  margin: 0.3rem 0 0.2rem;
}
.pile-legende span { display: inline-flex; align-items: center; gap: 0.4rem; }
.pile-legende i { width: 0.8rem; height: 0.8rem; border-radius: 2px; display: inline-block; flex: 0 0 auto; }
.i-energie { background: var(--faible); }
.i-invest { background: var(--bleu); }
.i-maint { background: var(--moyen); }

/* ---------- Bloc CTA (discret) ---------- */

.cta-bloc {
  background: var(--bleu-clair);
  border: 1px solid var(--ligne);
  border-left: 4px solid var(--bleu);
  border-radius: 4px;
  padding: 1.4rem 1.4rem;
  margin: 2.4rem 0 1rem;
}
.cta-bloc h2 { border-top: none; padding-top: 0; margin-top: 0; }
.cta-bloc p { color: var(--encre-doux); }
.cta-bloc .hero-actions { margin-top: 1rem; }

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

.faq-item { border-bottom: 1px solid var(--ligne); padding-bottom: 1rem; margin-bottom: 1.1rem; }
.faq-item h3 { margin-top: 1.1rem; color: var(--encre); }

/* ---------- Passerelle ---------- */

.passerelle {
  margin: 2rem 0 0;
  padding: 0.9rem 1.2rem;
  border: 1px solid var(--ligne);
  border-radius: 4px;
  background: var(--fond);
  font-size: 0.92rem;
  color: var(--encre-doux);
}
.passerelle a { font-weight: 600; text-decoration: none; }
.passerelle a:hover { text-decoration: underline; }

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

.pied { background: var(--fond); color: var(--encre-doux); margin-top: 2.5rem; border-top: 1px solid var(--ligne); }
.pied-inner { max-width: 900px; margin: 0 auto; padding: 1.6rem 1.25rem 2.2rem; font-size: 0.84rem; }
.pied-inner p { margin-bottom: 0.55rem; }
.pied-inner nav { margin-bottom: 0.9rem; }
.pied-inner nav a { color: var(--encre-doux); margin-right: 1.1rem; text-decoration: none; }
.pied-inner nav a:hover { color: var(--bleu); }
.pied-inner a { color: var(--bleu); }

/* ---------- Écrans larges ---------- */

@media (min-width: 640px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .cartes { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 720px) {
  body { font-size: 1.1rem; }
  .hero h1 { font-size: 2.3rem; }
  h2 { font-size: 1.6rem; }
  .hero-inner { padding: 2.8rem 1.25rem 2.9rem; }
}

/* ==========================================================================
   PREMIUM POLISH (2026-07) — finition design + accessibilité.
   Ajouts non destructifs : on préserve l'identité "comparateur neutre".
   ========================================================================== */

:root {
  --rayon: 6px;
  --rayon-lg: 10px;
  --ombre-sm: 0 1px 2px rgba(27, 39, 51, .06);
  --ombre: 0 1px 2px rgba(27, 39, 51, .04), 0 8px 20px -8px rgba(27, 39, 51, .14);
  --ombre-lg: 0 12px 32px -12px rgba(27, 39, 51, .24);
  --trans: 160ms ease;
  --anneau: 0 0 0 3px rgba(47, 93, 134, .35);
}

/* ---------- Accessibilité : focus visible homogène ---------- */
a:focus-visible,
.btn:focus-visible,
.nav a:focus-visible,
.tableau-wrap:focus-visible {
  outline: 2px solid var(--bleu);
  outline-offset: 2px;
  border-radius: 3px;
}
.btn:focus-visible { outline-offset: 3px; box-shadow: var(--anneau); }
.tableau-wrap:focus-visible { outline-offset: -2px; }

::selection { background: rgba(47, 93, 134, .16); }

/* ---------- Lien d'évitement (skip link) ---------- */
.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3.5rem;
  z-index: 60;
  background: var(--bleu);
  color: #fff;
  padding: 0.55rem 0.95rem;
  border-radius: 0 0 6px 6px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: top var(--trans);
}
.skip-link:focus { top: 0; color: #fff; }

/* ---------- Hero : profondeur sobre ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(130% 150% at 100% 0%, #eef3f8 0%, transparent 55%),
    linear-gradient(180deg, #f9fbfd 0%, var(--bleu-voile) 100%);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--bleu) 0%, #4d7ba6 45%, transparent 100%);
}
.kicker { display: inline-flex; align-items: center; gap: 0.5rem; }
.kicker::before {
  content: "";
  width: 1.4rem; height: 2px;
  background: var(--bleu);
  border-radius: 2px;
}

/* ---------- Boutons : micro-interactions ---------- */
.btn {
  transition: background var(--trans), border-color var(--trans),
              box-shadow var(--trans), transform var(--trans);
}
.btn-primary { box-shadow: var(--ombre-sm); }
.btn-primary:hover { box-shadow: var(--ombre); transform: translateY(-1px); }
.btn-ghost:hover { background: var(--bleu-voile); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* ---------- Navigation ---------- */
.nav a { transition: color var(--trans), border-color var(--trans); }
.nav-cta { border-bottom-color: transparent; }
.nav-cta:hover { border-bottom-color: var(--bleu); }

/* ---------- Stats : relief léger ---------- */
.stats { border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre-sm); }
.stat { transition: background var(--trans); }
.stat:hover { background: var(--bleu-voile); }
.stat .n { font-variant-numeric: tabular-nums; }

/* ---------- Tableaux : finition ---------- */
.tableau-wrap { position: relative; box-shadow: var(--ombre); }
table { font-variant-numeric: tabular-nums; }
thead th { box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .12); }
th.col-reco { box-shadow: inset 0 3px 0 #6fa0c7, inset 0 -2px 0 rgba(0, 0, 0, .15); }
tbody tr { transition: background var(--trans); }
tbody tr:hover td { background: #e8eef4; }
tbody tr:hover td.col-reco { background: #dbe8f3 !important; }

/* Pastilles : contour discret pour rester nettes sur fonds colorés */
.pastille::before { box-shadow: 0 0 0 1px rgba(255, 255, 255, .6); }
.col-reco .pastille::before { box-shadow: 0 0 0 1px rgba(255, 255, 255, .9); }

/* Légende du comparatif : encadrée */
.legende {
  padding: 0.7rem 0.95rem;
  background: var(--fond);
  border: 1px solid var(--ligne);
  border-radius: var(--rayon);
}

/* Indice de défilement horizontal (mobile) */
.scroll-note {
  display: none;
  font-size: 0.76rem;
  color: var(--encre-faible);
  letter-spacing: 0.03em;
  margin: 0 0 0.4rem;
}
@media (max-width: 680px) { .scroll-note { display: block; } }

/* ---------- Cartes : élévation au survol ---------- */
.carte {
  transition: transform var(--trans), box-shadow var(--trans), border-color var(--trans);
}
.carte:hover {
  transform: translateY(-2px);
  box-shadow: var(--ombre);
  border-top-color: var(--bleu-fonce);
}

/* ---------- Data-viz : barres soignées ---------- */
.barre-piste { box-shadow: inset 0 0 0 1px var(--ligne); }
.barre-jauge {
  position: relative;
  box-shadow: inset 0 -0.35rem 0.4rem -0.3rem rgba(0, 0, 0, .15);
}
.pile { box-shadow: var(--ombre-sm); }
.pile span { letter-spacing: 0.01em; text-shadow: 0 1px 1px rgba(0, 0, 0, .18); }

@media (prefers-reduced-motion: no-preference) {
  .barre-jauge {
    animation: pousse-barre 900ms cubic-bezier(.22, .61, .36, 1) both;
    transform-origin: left;
  }
  @keyframes pousse-barre { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

/* ---------- CTA & ancres ---------- */
.cta-bloc { box-shadow: var(--ombre); }
[id] { scroll-margin-top: 1rem; }

/* Soulignements de liens de contenu, propres */
main a:not(.btn) { text-underline-offset: 0.15em; text-decoration-thickness: 0.06em; }
main a:not(.btn):hover { text-decoration-thickness: 0.12em; }
