/* ============================================================
   Callejear.fr — Design System
   ============================================================ */

:root {
  /* Colors */
  --ink:           #1a1a2e;
  --ink-soft:      #3a3a5c;
  --paper:         #f7f5f0;
  --paper-warm:    #eeeae3;
  --accent:        #2d5a7b;
  --accent-light:  #4a8bb5;
  --accent-glow:   rgba(45, 90, 123, 0.15);
  --green:         #2e7d47;
  --green-bg:      #e8f5ee;
  --amber:         #b45309;
  --amber-bg:      #fef3c7;
  --red:           #c0392b;
  --red-bg:        #fdecea;
  --border:        #ddd9d2;
  --border-light:  #edeae4;
  --card-bg:       #ffffff;
  --muted:         #54546b; /* WCAG AA fix: contrast 5.5:1 sobre --paper (antes #6b6b80 = 4.10:1, falla AA) */

  /* Typography */
  --serif: 'Instrument Serif', Georgia, serif;
  --sans:  'DM Sans', -apple-system, system-ui, sans-serif;
  --mono:  'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --radius:    8px;
  --radius-lg: 16px;
}

/* ============================================================
   RESET + BASE
   ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { overflow-x: hidden; scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  font-size: 16px;
}

a { color: var(--accent); }
a:hover { color: var(--accent-light); }

/* ============================================================
   ACCESSIBILITY — Focus & Skip Link (WCAG 2.1 SC 2.4.7 + 2.4.1)
   ============================================================ */
/* Outline visible solo cuando el foco viene de teclado (no de click). */
*:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
  border-radius: 2px;
}
.topnav a:focus-visible,
.topnav .breadcrumb a:focus-visible {
  outline-color: #fff;
}
.vivre-a-cta:focus-visible,
.region-card:focus-visible,
.commune-card:focus-visible,
.rue-card:focus-visible {
  outline-offset: 4px;
}

/* Skip-to-content link : oculto pero visible on focus. */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 1000;
  text-decoration: none;
  font-weight: 600;
  border-radius: 0 0 4px 0;
}
.skip-link:focus {
  top: 0;
  color: #fff;
  outline: 2px solid var(--accent-light);
  outline-offset: -2px;
}

/* ============================================================
   TOPNAV
   ============================================================ */
.topnav {
  background: var(--ink);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.topnav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.logo {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo span { color: var(--accent-light); }

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.2rem;
  font-size: 0.8rem;
  overflow: hidden;
}
.breadcrumb a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color 0.15s;
}
.breadcrumb a:hover { color: #fff; }
.bc-sep { color: rgba(255,255,255,0.25); margin: 0 0.15rem; }
.bc-current { color: rgba(255,255,255,0.9); }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

main.container { padding-top: 2rem; padding-bottom: 4rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer .sources { margin-bottom: 0.35rem; }

/* ============================================================
   TYPOGRAPHY (non-rue pages)
   ============================================================ */
h1 {
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}
h2 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 400;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
section { margin-bottom: 2.5rem; }

/* ============================================================
   SHARED COMPONENTS (used across non-rue pages)
   ============================================================ */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td {
  padding: 0.6rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}
.data-table th { color: var(--muted); font-weight: 500; width: 40%; }

.count { color: var(--muted); margin-bottom: 1rem; }

/* Cards */
.rues-grid, .quartiers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.6rem;
}
.rue-card, .quartier-card {
  display: flex; flex-direction: column;
  padding: 0.75rem 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.rue-card:hover, .quartier-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(45,90,123,0.1);
}
.rue-name, .quartier-name { font-weight: 500; }
.rue-meta, .quartier-meta { font-size: 0.8rem; color: var(--muted); margin-top: 0.2rem; }

/* Rankings widgets */
.iris-classements { margin-top: 2rem; }
.rankings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; margin-top: 1rem; }
.ranking-widget { background: var(--paper-warm); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem; }
.ranking-widget h3 { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.6rem; }
.ranking-widget h3 a { color: var(--ink); text-decoration: none; }
.ranking-mini-list { margin: 0 0 0.6rem 1.2rem; padding: 0; }
.ranking-mini-list li { font-size: 0.85rem; margin-bottom: 0.25rem; }
.ranking-mini-list a { color: var(--ink); text-decoration: none; }
.ranking-mini-list a:hover { color: var(--accent); }
.voir-tout-link { font-size: 0.8rem; color: var(--accent); text-decoration: none; font-weight: 500; }
.voir-tout-link:hover { text-decoration: underline; }

/* Vivre-à */
.vivre-a-page .urban-score-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--accent); color: #fff; border-radius: var(--radius);
  padding: 0.5rem 1rem; margin-top: 0.75rem;
}
.vivre-a-page .score-value { font-size: 1.5rem; font-weight: 700; }
.vivre-a-page .score-label { font-size: 0.8rem; opacity: 0.9; }
.pros-cons { margin-top: 2rem; }
.pros-cons-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 1rem; }
@media (max-width: 600px) { .pros-cons-grid { grid-template-columns: 1fr; } }
.pros, .cons { border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem; }
.pros { border-left: 4px solid var(--green); }
.cons { border-left: 4px solid var(--red); }
.pros-title { color: var(--green); font-size: 1rem; margin-bottom: 0.6rem; }
.cons-title { color: var(--red); font-size: 1rem; margin-bottom: 0.6rem; }
.pros-list, .cons-list { margin: 0; padding-left: 1.2rem; }
.pros-list li, .cons-list li { font-size: 0.9rem; margin-bottom: 0.35rem; }
.profils-section { margin-top: 2rem; }
.profils-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; margin-top: 1rem; }
.profil-card { text-align: center; background: var(--paper-warm); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem; }
.profil-emoji { font-size: 2rem; display: block; margin-bottom: 0.4rem; }
.profil-label { font-size: 0.9rem; font-weight: 500; }
.profil-raison { font-size: 0.8rem; color: var(--muted); margin-top: 0.3rem; }

/* Quartiers prix */
.quartiers-list { margin-top: 1.5rem; }
.quartiers-ranking { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.quartier-row { display: flex; align-items: center; gap: 1rem; padding: 0.85rem 1rem; background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); }
.quartier-rank { font-size: 1rem; font-weight: 700; color: var(--muted); min-width: 1.6rem; text-align: center; }
.quartier-info { flex: 1; }
.quartier-name { font-weight: 600; color: var(--accent); text-decoration: none; }
.quartier-name:hover { text-decoration: underline; }
span.quartier-name { color: var(--ink); }
.quartier-nb-rues { font-size: 0.78rem; color: var(--muted); }
.quartier-prix-info { display: flex; flex-direction: column; align-items: flex-end; gap: 0.15rem; }
.quartier-prix-val { font-size: 1.05rem; font-weight: 700; color: var(--accent); }
.quartier-pop { font-size: 0.78rem; color: var(--muted); }

/* Pages thématiques */
.pages-thematiques { margin-top: 2rem; }
.thematiques-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.35rem 1rem; padding: 0; list-style: none; margin-top: 0.6rem; }
.thematiques-list li a { color: var(--accent); text-decoration: none; font-size: 0.88rem; }
.thematiques-list li a:hover { text-decoration: underline; }

/* Région / département */
.departements-grid, .communes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.6rem; margin-top: 1rem; }
.departement-card, .commune-card { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.85rem 1rem; background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: inherit; transition: border-color 0.15s; }
.departement-card:hover, .commune-card:hover { border-color: var(--accent); }
.dept-code { font-size: 0.78rem; font-weight: 700; color: var(--accent); }
.dept-name, .commune-name { font-weight: 600; }
.dept-meta, .commune-meta { font-size: 0.78rem; color: var(--muted); }

/* Home */
.hero-home { text-align: center; padding: 3rem 0 2rem; }
.regions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.6rem; margin-top: 1rem; }
.region-card { display: flex; flex-direction: column; gap: 0.2rem; padding: 0.9rem 1rem; background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: inherit; transition: border-color 0.15s; }
.region-card:hover { border-color: var(--accent); }
.region-name { font-weight: 700; font-size: 0.95rem; }
.region-meta { font-size: 0.78rem; color: var(--muted); }

/* SEO text / FAQ (non-rue) */
.seo-text p { margin-bottom: 1rem; }
.faq-section { margin-top: 2rem; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 0.75rem; overflow: hidden; }
.faq-question { font-size: 0.95rem; font-weight: 600; padding: 0.9rem 1.1rem; background: var(--paper-warm); cursor: default; border-bottom: 1px solid var(--border); }
.faq-answer { padding: 0.9rem 1.1rem; }
.faq-answer p { margin: 0; }

/* Bruit (non-rue, vivre-à reuse) */
.bruit-section { margin-top: 2rem; }
.bruit-gauge { margin-top: 1rem; }
.bruit-score { display: inline-flex; align-items: center; gap: 0.75rem; padding: 0.5rem 1rem; border-radius: var(--radius); margin-bottom: 0.6rem; }
.bruit-db { font-size: 1.3rem; font-weight: 700; }
.bruit-label { font-size: 0.82rem; font-weight: 500; }
.bruit-tres_calme  { background: var(--green-bg); color: #1a5c35; }
.bruit-calme       { background: #e8f5e9; color: #2e7d32; }
.bruit-moderee     { background: var(--amber-bg); color: var(--amber); }
.bruit-bruyante    { background: #fbe9e7; color: #bf360c; }
.bruit-tres_bruyante { background: var(--red-bg); color: var(--red); }
.bruit-bar-wrap { background: var(--border); border-radius: 4px; height: 6px; width: 100%; max-width: 280px; margin-bottom: 0.4rem; }
.bruit-bar { background: var(--green); border-radius: 4px; height: 6px; transition: width 0.5s ease; }
.bruit-score-text { font-size: 0.85rem; color: var(--muted); }

/* Text colors */
.text-hausse { color: var(--red); }
.text-baisse { color: var(--green); }

/* ============================================================
   RUE PAGE — HERO (full-bleed)
   ============================================================ */
.rue-hero {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  background: linear-gradient(135deg, #1a1a2e 0%, #2d3a5c 55%, #1e3a5f 100%);
  position: relative;
  overflow: hidden;
  padding: 3rem 0 2.5rem;
}

/* Subtle dot pattern */
.rue-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.rue-hero-inner {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 3rem;
}

/* Left side: name + chips */
.rue-hero-left {
  flex: 1;
  min-width: 0;
}

.rue-hero-left h1 {
  font-family: var(--serif);
  font-size: 2.6rem;
  font-weight: 400;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 0.35rem;
}

.rue-city {
  font-size: 1rem;
  color: rgba(255,255,255,0.65);
  font-family: var(--sans);
  margin-bottom: 1.25rem;
}

.rue-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.85);
  border-radius: 20px;
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  font-family: var(--sans);
}
.chip a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
}
.chip a:hover { color: #fff; }

/* Right side: score ring */
.rue-hero-score {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(4px);
}

.score-ring {
  position: relative;
  width: 110px;
  height: 110px;
}

.score-svg {
  width: 110px;
  height: 110px;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: rgba(255,255,255,0.12);
  stroke-width: 8;
}

.ring-fill {
  fill: none;
  stroke: var(--accent-light);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 326.73;
  stroke-dashoffset: 326.73; /* JS animates from 326.73 to computed value */
  transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.score-value-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.score-num {
  font-family: var(--mono);
  font-size: 1.75rem;
  font-weight: 500;
  color: #fff;
  line-height: 1;
}
.score-lbl {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.5);
  margin-top: 0.15rem;
}

.score-percentile {
  font-size: 0.75rem;
  color: var(--accent-light);
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Score breakdown bars */
.score-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  width: 180px;
}

.score-dim {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dim-label {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.6);
  width: 80px;
  flex-shrink: 0;
  text-align: right;
}

.dim-bar {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.12);
  border-radius: 2px;
  overflow: hidden;
}

.dim-fill {
  height: 100%;
  background: var(--accent-light);
  border-radius: 2px;
  transition: width 0.8s ease;
}

.dim-val {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: rgba(255,255,255,0.7);
  width: 22px;
  text-align: right;
}

/* ============================================================
   RUE PAGE — MAIN LAYOUT
   ============================================================ */
.rue-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  padding-top: 2rem;
  padding-bottom: 4rem;
  align-items: start;
}

.rue-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}

.rue-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: sticky;
  top: 68px; /* below topnav */
}

/* ============================================================
   RUE PAGE — MODULE CARDS
   ============================================================ */
.mod-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.mod-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--border-light);
}

.mod-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0;
}

.mod-icon {
  font-size: 1rem;
  opacity: 0.7;
}

.mod-badge {
  font-family: var(--mono);
  font-size: 0.72rem;
  background: var(--accent-glow);
  color: var(--accent);
  border-radius: 12px;
  padding: 0.2rem 0.6rem;
  font-weight: 500;
}

.mod-body { padding: 1.1rem 1.25rem; }

.mod-source {
  font-size: 0.73rem;
  color: var(--muted);
  padding: 0 1.25rem 0.75rem;
  border-top: 1px solid var(--border-light);
  margin-top: 0.5rem;
  padding-top: 0.6rem;
}

/* PRIX MODULE */
.prix-hero {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.prix-big {
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 500;
  color: var(--ink);
}

.prix-unit {
  font-size: 0.9rem;
  color: var(--muted);
}

.prix-evo {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}
.prix-evo.hausse { background: var(--red-bg); color: var(--red); }
.prix-evo.baisse { background: var(--green-bg); color: var(--green); }

.prix-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.prix-stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.6rem 0.75rem;
  background: var(--paper);
  border-radius: var(--radius);
}

.prix-stat-val {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 500;
}

.prix-stat-lbl { font-size: 0.72rem; color: var(--muted); }

.prix-evolutions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.evo-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  gap: 0.1rem;
}
.evo-pill .evo-val { font-family: var(--mono); font-weight: 500; }
.evo-pill.hausse .evo-val { color: var(--red); }
.evo-pill.baisse .evo-val { color: var(--green); }
.evo-pill .evo-period { font-size: 0.68rem; color: var(--muted); }

.prix-ratio {
  margin-top: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: var(--amber-bg);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--amber);
}
.prix-ratio strong { font-family: var(--mono); }

/* COMMERCES MODULE */
.commerce-bars { display: flex; flex-direction: column; gap: 0.6rem; }

.commerce-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.commerce-label {
  font-size: 0.82rem;
  color: var(--ink-soft);
  width: 120px;
  flex-shrink: 0;
}

.commerce-track {
  flex: 1;
  height: 8px;
  background: var(--border-light);
  border-radius: 4px;
  overflow: hidden;
}

.commerce-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--accent);
  transition: width 0.6s ease;
}

.commerce-count {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  width: 24px;
  text-align: right;
}

/* SERVICES MODULE */
.services-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

.svc-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.75rem 0.5rem;
  background: var(--paper);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  text-align: center;
}

.svc-num {
  font-family: var(--mono);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--ink);
}

.svc-lbl {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* TRANSPORT MODULE */
.transport-list { display: flex; flex-direction: column; gap: 0.5rem; }

.transport-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-light);
}
.transport-row:last-child { border-bottom: none; }

.transport-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
  min-width: 48px;
  text-align: center;
}
.badge-metro { background: #1976d2; color: #fff; }
.badge-rer   { background: #7b1fa2; color: #fff; }
.badge-tram  { background: #388e3c; color: #fff; }
.badge-bus   { background: #f57c00; color: #fff; }
.badge-velo  { background: #0097a7; color: #fff; }
.badge-total { background: var(--paper-warm); color: var(--ink-soft); }

.transport-name { font-size: 0.88rem; flex: 1; }

.transport-lignes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.2rem;
}

.ligne-tag {
  font-size: 0.68rem;
  font-family: var(--mono);
  background: var(--ink);
  color: #fff;
  border-radius: 3px;
  padding: 0.1rem 0.3rem;
}

.transport-count {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-soft);
}

/* VERDURE MODULE */
.verdure-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.verdure-stat {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.verdure-stat-val {
  font-family: var(--mono);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--green);
}
.verdure-stat-lbl { font-size: 0.72rem; color: var(--muted); }

.verdure-bar-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.verdure-bar-track {
  flex: 1;
  height: 10px;
  background: var(--border-light);
  border-radius: 5px;
  overflow: hidden;
}

.verdure-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #66bb6a, #2e7d47);
  border-radius: 5px;
  transition: width 0.6s ease;
}

.verdure-bar-label { font-size: 0.78rem; color: var(--green); font-weight: 500; }

/* DPE MODULE */
.dpe-scale {
  display: flex;
  gap: 0.3rem;
  align-items: flex-end;
  margin-bottom: 0.75rem;
}

.dpe-class {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.4rem 0;
  width: 40px;
  border-radius: var(--radius);
  opacity: 0.3;
  transition: opacity 0.2s;
}

.dpe-class.active { opacity: 1; transform: scale(1.05); }

.dpe-letter {
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.dpe-A .dpe-letter { background: #1e7e34; }
.dpe-B .dpe-letter { background: #28a745; }
.dpe-C .dpe-letter { background: #8cc63f; }
.dpe-D .dpe-letter { background: #f0c020; }
.dpe-E .dpe-letter { background: #f4801a; }
.dpe-F .dpe-letter { background: #e84030; }
.dpe-G .dpe-letter { background: #c0000b; }

.dpe-label { font-size: 0.6rem; color: var(--muted); }

.dpe-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.dpe-meta span { color: var(--muted); }
.dpe-meta strong { color: var(--ink); font-family: var(--mono); }

/* BRUIT MODULE */
.bruit-mod-gauge {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.bruit-mod-val {
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}

.bruit-mod-right { flex: 1; }

.bruit-mod-label {
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.bruit-mod-label.tres_calme { color: #1a5c35; }
.bruit-mod-label.calme      { color: #2e7d32; }
.bruit-mod-label.moderee    { color: var(--amber); }
.bruit-mod-label.bruyante   { color: #bf360c; }
.bruit-mod-label.tres_bruyante { color: var(--red); }

.bruit-track {
  height: 8px;
  background: var(--border-light);
  border-radius: 4px;
  overflow: hidden;
}

.bruit-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #4caf50, #ff9800, #f44336);
  transition: width 0.6s ease;
}

/* SEO TEXT in rue page */
.rue-seo { font-size: 0.92rem; line-height: 1.7; color: var(--ink-soft); }
.rue-seo p { margin-bottom: 0.9rem; }
.rue-seo h2 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
  padding-bottom: 0;
  border-bottom: none;
  color: var(--ink);
}

/* FAQ in rue page */
.rue-faq .faq-item {
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  margin-bottom: 0.6rem;
  overflow: hidden;
}
.rue-faq .faq-question {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.8rem 1rem;
  background: var(--paper);
  border-bottom: 1px solid var(--border-light);
}
.rue-faq .faq-answer { padding: 0.8rem 1rem; font-size: 0.88rem; }
.rue-faq .faq-answer p { margin: 0; }

/* ============================================================
   RUE PAGE — SIDEBAR WIDGETS
   ============================================================ */
.sidebar-widget {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.sidebar-widget-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.sidebar-widget-body { padding: 0.75rem 1rem; }

/* Rankings widget */
.sidebar-rankings { display: flex; flex-direction: column; gap: 0.35rem; }

.ranking-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border-light);
  text-decoration: none;
  color: var(--ink);
  font-size: 0.83rem;
  transition: color 0.15s;
}
.ranking-row:last-child { border-bottom: none; }
.ranking-row:hover { color: var(--accent); }
.ranking-row:hover .rank-arrow { opacity: 1; }

.rank-number {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  width: 28px;
  flex-shrink: 0;
}

.rank-label { flex: 1; }

.rank-arrow {
  opacity: 0;
  color: var(--accent);
  transition: opacity 0.15s;
}

/* IRIS widget */
.iris-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.iris-stat {
  padding: 0.5rem 0.6rem;
  background: var(--paper);
  border-radius: var(--radius);
}
.iris-stat-val { font-family: var(--mono); font-size: 0.9rem; font-weight: 500; }
.iris-stat-lbl { font-size: 0.68rem; color: var(--muted); margin-top: 0.1rem; }

/* Rues proches */
.rues-proches-list { list-style: none; display: flex; flex-direction: column; gap: 0.3rem; }
.rues-proches-list li { font-size: 0.83rem; }
.rues-proches-list a {
  color: var(--ink-soft);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.rues-proches-list a:hover { color: var(--accent); }

.rp-score {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent-light);
  background: var(--accent-glow);
  border-radius: 10px;
  padding: 0.1rem 0.4rem;
}

/* Sources widget */
.sources-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.sources-list li { font-size: 0.75rem; color: var(--muted); display: flex; align-items: center; gap: 0.4rem; }
.src-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .rue-layout {
    grid-template-columns: 1fr;
  }
  .rue-sidebar {
    position: static;
    top: auto;
  }
  .rue-hero-inner {
    flex-direction: column-reverse;
    gap: 1.5rem;
  }
  .rue-hero-score {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 1rem;
  }
  .score-breakdown {
    width: auto;
    flex: 1;
    min-width: 200px;
  }
  .score-ring { width: 90px; height: 90px; }
  .score-svg { width: 90px; height: 90px; }
  .score-num { font-size: 1.4rem; }
  .rue-hero-left h1 { font-size: 2rem; }
}

@media (max-width: 600px) {
  .prix-stats { grid-template-columns: 1fr 1fr; }
  .services-tiles { grid-template-columns: repeat(2, 1fr); }
  .dpe-scale { gap: 0.2rem; }
  .dpe-class { width: 34px; }
  .dpe-letter { width: 24px; height: 24px; font-size: 0.75rem; }
  .topnav-inner { gap: 1rem; }
  .breadcrumb { font-size: 0.72rem; }
}

/* ============================================================
   MAP MODULE (Leaflet + OpenStreetMap)
   ============================================================ */

.map-container {
  height: 280px;
  width: 100%;
  background: var(--paper-warm);
  display: block;
}

/* Leaflet overrides — blend with design system */
.map-container.leaflet-container {
  font-family: var(--sans);
  font-size: 0.8rem;
}
.leaflet-popup-content-wrapper {
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  font-family: var(--sans);
}
.leaflet-popup-content {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  margin: 8px 12px;
}
.leaflet-control-attribution { font-size: 0.68rem !important; }
.leaflet-control-zoom a { color: var(--ink) !important; font-weight: 600; }

@media (max-width: 768px) {
  .map-container { height: 220px; }
}

/* ---- Vivre-a CTA (rue page) ---- */
.vivre-a-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 1.5rem;
  margin-top: 1.5rem;
  background: linear-gradient(135deg, var(--accent), #1a3d5c);
  border-radius: 12px;
  color: #fff;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.vivre-a-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45, 90, 123, 0.35);
}
.vivre-a-cta-icon { font-size: 1.6rem; flex-shrink: 0; }
.vivre-a-cta-text { flex: 1; }
.vivre-a-cta-text strong {
  display: block;
  font-size: 1rem;
  font-family: var(--serif);
  margin-bottom: 0.15rem;
}
.vivre-a-cta-text span {
  font-size: 0.82rem;
  opacity: 0.85;
}
.vivre-a-cta-arrow {
  font-size: 1.4rem;
  font-weight: 600;
  opacity: 0.7;
  transition: opacity 0.2s, transform 0.2s;
}
.vivre-a-cta:hover .vivre-a-cta-arrow {
  opacity: 1;
  transform: translateX(3px);
}

/* Sidebar vivre-a link */
.sidebar-vivre-a-link {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
}
.sidebar-vivre-a-link:hover { text-decoration: underline; }

/* ============================================================
   MÉTÉO MODULE
   ============================================================ */
.meteo-hero {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.meteo-temp {
  font-family: var(--mono);
  font-size: 2.2rem;
  font-weight: 500;
  color: var(--ink);
}
.meteo-desc { font-size: 0.85rem; color: var(--muted); }

.meteo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.5rem;
}
.meteo-stat {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.6rem 0.75rem;
  background: var(--paper);
  border-radius: var(--radius);
}
.meteo-stat-val {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
}
.meteo-stat-lbl { font-size: 0.68rem; color: var(--muted); }

/* ============================================================
   QUALITÉ DE L'AIR MODULE
   ============================================================ */
.air-gauge { margin-bottom: 1rem; }

.air-gauge-track {
  height: 12px;
  background: var(--border-light);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 0.3rem;
}
.air-gauge-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.6s ease;
}
.ica-fill-1 { background: #50f0e6; }
.ica-fill-2 { background: #50ccaa; }
.ica-fill-3 { background: #f0e641; }
.ica-fill-4 { background: #ff5050; }
.ica-fill-5 { background: #960032; }
.ica-fill-6 { background: #7d2181; }

.air-gauge-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--muted);
}

.mod-badge.ica-1 { background: #e0faf5; color: #0d7a5f; }
.mod-badge.ica-2 { background: #e0f5ee; color: #1a6b4a; }
.mod-badge.ica-3 { background: #fdf8d8; color: #8a7a00; }
.mod-badge.ica-4 { background: #fde0e0; color: #c62828; }
.mod-badge.ica-5 { background: #f3d5e0; color: #960032; }
.mod-badge.ica-6 { background: #ead5f0; color: #7d2181; }

.air-indices {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.air-idx {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.5rem 0.75rem;
  background: var(--paper);
  border-radius: var(--radius);
  min-width: 60px;
}
.air-idx-lbl { font-size: 0.7rem; color: var(--muted); font-weight: 600; }
.air-idx-val { font-family: var(--mono); font-size: 0.85rem; font-weight: 500; }

/* ============================================================
   ARCEP / COUVERTURE NUMÉRIQUE MODULE
   ============================================================ */
.arcep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}
.arcep-stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.arcep-stat-val {
  font-family: var(--mono);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--ink);
}
.arcep-stat-lbl { font-size: 0.72rem; color: var(--muted); }

.arcep-bar-track {
  height: 8px;
  background: var(--border-light);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 0.2rem;
}
.arcep-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}
.arcep-bar-fill.fibre { background: linear-gradient(90deg, #7c4dff, #448aff); }
.arcep-bar-fill.mobile { background: linear-gradient(90deg, #00bcd4, #26a69a); }

/* ============================================================
   COMMUNE — ENV CARDS (meteo, air, arcep)
   ============================================================ */
.commune-env { margin-top: 2rem; }
.commune-env h2 { margin-bottom: 1rem; }

.commune-env-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.env-card {
  display: flex;
  gap: 0.75rem;
  padding: 1.2rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.env-card-icon { font-size: 1.6rem; flex-shrink: 0; }
.env-card-body { flex: 1; }
.env-card-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.3rem;
}
.env-card-big {
  font-family: var(--mono);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.2;
}
.env-card-sub { font-size: 0.8rem; color: var(--ink-soft); margin-top: 0.15rem; }
.env-card-details { font-size: 0.75rem; color: var(--muted); margin-top: 0.3rem; }

.ica-text-1 { color: #0d7a5f; }
.ica-text-2 { color: #1a6b4a; }
.ica-text-3 { color: #8a7a00; }
.ica-text-4 { color: #c62828; }
.ica-text-5 { color: #960032; }
.ica-text-6 { color: #7d2181; }

/* ============================================================
   APERÇU RAPIDE MODULE
   ============================================================ */
.apercu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
}
.apercu-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius);
  border-left: 3px solid var(--border);
}
.apercu-pos { border-left-color: var(--green); background: var(--green-bg); }
.apercu-neg { border-left-color: var(--red); background: var(--red-bg); }
.apercu-neu { border-left-color: var(--amber); background: var(--amber-bg); }

.apercu-q {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
}
.apercu-a {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

/* ============================================================
   RISQUE BANNER (on map card)
   ============================================================ */
.risque-banner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  font-size: 0.82rem;
  font-weight: 500;
}
.risque-banner.risque-inondation {
  background: #e3f2fd;
  color: #1565c0;
  border-top: 2px solid #90caf9;
}
.risque-banner.risque-seisme {
  background: #fff3e0;
  color: #e65100;
  border-top: 2px solid #ffcc80;
}
.risque-icon { font-size: 1.1rem; flex-shrink: 0; }
.risque-text { flex: 1; }

/* ============================================================
   PROFIL DU QUARTIER MODULE
   ============================================================ */
.quartier-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}
.quartier-stat {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.6rem 0.75rem;
  background: var(--paper);
  border-radius: var(--radius);
}
.quartier-stat-val {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--ink);
}
.quartier-stat-lbl { font-size: 0.68rem; color: var(--muted); }

.quartier-context {
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0;
}

/* ============================================================
   RISQUES NATURELS MODULE
   ============================================================ */
.risques-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.risque-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.85rem;
}
.risque-row:last-child { border-bottom: none; }
.risque-row-icon { font-size: 1rem; flex-shrink: 0; }
.risque-row-type { color: var(--ink-soft); }

/* ============================================================
   COMMUNE EN CHIFFRES (sidebar)
   ============================================================ */
.commune-chiffres {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.chiffre-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.82rem;
}
.chiffre-row:last-child { border-bottom: none; }
.chiffre-lbl { color: var(--muted); }
.chiffre-val { font-weight: 500; color: var(--ink); }

/* ============================================================
   QUALITÉ DES DONNÉES (sidebar)
   ============================================================ */
.coverage-bar-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}
.coverage-bar-track {
  flex: 1;
  height: 8px;
  background: var(--border-light);
  border-radius: 4px;
  overflow: hidden;
}
.coverage-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), #448aff);
  transition: width 0.6s ease;
}
.coverage-pct {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
}
.coverage-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
}
.coverage-tag {
  font-size: 0.65rem;
  font-family: var(--mono);
  padding: 0.15rem 0.4rem;
  background: var(--paper);
  border: 1px solid var(--border-light);
  border-radius: 3px;
  color: var(--ink-soft);
}
.coverage-note {
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0;
}

/* ============================================================
   LIVE STRIP (metrics bar under hero)
   ============================================================ */
.live-strip {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 0;
  overflow-x: auto;
  flex-wrap: wrap;
  justify-content: center;
}
.live-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  padding: 0.5rem 0.85rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  min-width: 80px;
}
.live-val {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 600;
}
.live-lbl {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.live-pos .live-val { color: var(--green); }
.live-neg .live-val { color: var(--red); }
.live-neu .live-val { color: var(--amber); }
.live-pos { border-color: rgba(46,125,50,0.2); }
.live-neg { border-color: rgba(198,40,40,0.2); }
.live-neu { border-color: rgba(245,124,0,0.2); }

/* ============================================================
   PROFILS STRIP (tags under live strip)
   ============================================================ */
.profils-strip {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: center;
  padding-bottom: 1rem;
}
.profil-tag {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.3rem 0.7rem;
  border-radius: 16px;
  white-space: nowrap;
}
.profil-green  { background: var(--green-bg); color: var(--green); }
.profil-red    { background: var(--red-bg); color: var(--red); }
.profil-blue   { background: var(--accent-glow); color: var(--accent); }
.profil-orange { background: var(--amber-bg); color: var(--amber); }
.profil-purple { background: #f3e5f5; color: #7b1fa2; }

/* ============================================================
   CONVIENT À MODULE
   ============================================================ */
.convient-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.convient-item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.6rem 0.75rem;
  background: var(--paper);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
}
.convient-profil {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}
.convient-reason {
  font-size: 0.78rem;
  color: var(--muted);
}

/* ============================================================
   POINTS DE VIGILANCE MODULE
   ============================================================ */
.mod-vigilance { border-left: 3px solid var(--amber); }

.vigilance-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.vigilance-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.vigilance-item:last-child { border-bottom: none; }
.vigilance-icon { font-size: 1rem; flex-shrink: 0; }

/* ============================================================
   RUES COMPARABLES MODULE
   ============================================================ */
.comparables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.6rem;
}
.comparable-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.8rem;
  background: var(--paper);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.comparable-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(45,90,123,0.1);
}
.comparable-name {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
}
.comparable-stats {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.comparable-stat {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
}

/* ============================================================
   PAGE /a-propos/ + /methodologie/  (Core-A defensivo)
   ============================================================ */

.page-a-propos,
.page-methodologie {
  max-width: 820px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  font-family: var(--sans);
  color: var(--ink);
  line-height: 1.65;
}

.page-a-propos h1,
.page-methodologie h1 {
  font-family: var(--serif);
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  line-height: 1.1;
  margin-bottom: 0.5rem;
  color: var(--ink);
}

.page-a-propos .subtitle,
.page-methodologie .subtitle {
  font-size: 1.125rem;
  color: var(--ink-soft);
  margin-bottom: 2.5rem;
}

.page-a-propos h2,
.page-methodologie h2 {
  font-family: var(--serif);
  font-size: 1.75rem;
  margin: 3rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
}

.page-a-propos h3,
.page-methodologie h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  margin: 1.5rem 0 0.5rem;
  color: var(--ink);
}

.page-a-propos p,
.page-methodologie p {
  margin-bottom: 1rem;
}

.page-a-propos ul,
.page-methodologie ul {
  margin: 0.5rem 0 1rem 1.25rem;
}

.page-a-propos li,
.page-methodologie li {
  margin-bottom: 0.35rem;
}

.page-a-propos code,
.page-methodologie code {
  font-family: var(--mono);
  font-size: 0.88em;
  padding: 0.1em 0.35em;
  background: var(--paper-warm);
  border-radius: 4px;
  border: 1px solid var(--border-light);
}

/* ─── Author bio (partial: author-bio.hbs) ─── */
.author-bio {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin: 2rem 0;
}

.author-bio .author-photo img {
  width: 100%;
  height: auto;
  border-radius: 50%;
  display: block;
  background: var(--paper-warm);
}

.author-bio .author-text h3 {
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
}

.author-bio .author-role {
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.author-bio .author-links {
  margin: 0.75rem 0 0.25rem;
  font-size: 0.88rem;
  color: var(--muted);
  word-break: break-all;
}

.author-bio .author-links a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent-glow);
}

.author-bio .author-contact {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
}

.author-bio .author-contact a {
  color: var(--accent);
  text-decoration: underline;
  font-weight: 500;
}

@media (max-width: 620px) {
  .author-bio {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .author-bio .author-photo img {
    max-width: 140px;
    margin: 0 auto;
  }
}

/* ─── Agents stack (partial: agents-stack.hbs) ─── */
.agents-stack {
  margin: 1.5rem 0 2rem;
}

.agents-stack > h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--ink);
}

.agents-stack > p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.agents-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.agent-item {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.75rem;
  align-items: start;
  padding: 0.75rem 0.9rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 0;
}

.agent-item .agent-id {
  grid-row: 1 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 50%;
}

.agent-item .agent-role {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
}

.agent-item .agent-purpose {
  color: var(--muted);
  font-size: 0.82rem;
}

/* ─── Sources table (a-propos.hbs) ─── */
.sources-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 0.75rem;
  font-size: 0.92rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.sources-table th,
.sources-table td {
  padding: 0.6rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.sources-table thead {
  background: var(--paper-warm);
  font-family: var(--sans);
}

.sources-table th {
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
}

.sources-table tbody tr:nth-child(odd) {
  background: rgba(238, 234, 227, 0.35);
}

.sources-table tbody tr:last-child td {
  border-bottom: none;
}

.sources-table td:first-child {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--accent);
  white-space: nowrap;
}

.sources-table a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--border);
}

.sources-table a:hover {
  text-decoration-color: var(--accent);
}

.page-a-propos .license {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.75rem;
}

/* ─── Methodologie : dimension cards ─── */
.page-methodologie .dimension {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  margin: 1rem 0;
}

.page-methodologie .dimension h3 {
  margin: 0 0 0.5rem;
  color: var(--accent);
}

.page-methodologie .dimension p {
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.page-methodologie .dimension p:last-child {
  margin-bottom: 0;
}

.page-methodologie .dimension strong {
  color: var(--ink);
}

.page-methodologie .anti-thin,
.page-methodologie .aggregation,
.page-methodologie .limits,
.page-methodologie .comparison,
.page-methodologie .update-cadence,
.page-methodologie .intro {
  padding: 0.25rem 0 0.5rem;
}

.page-methodologie .anti-thin {
  background: var(--amber-bg);
  border-left: 4px solid var(--amber);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}

.page-methodologie .anti-thin h2 {
  border-bottom: none;
  margin-top: 0;
  color: var(--amber);
}

.page-methodologie .comparison p:last-child {
  background: var(--green-bg);
  border-left: 4px solid var(--green);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin-top: 1rem;
}

/* ─── Mini methodology (partial: methodology-score.hbs) ─── */
.mini-methodology {
  background: var(--paper-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  font-size: 0.88rem;
  margin: 1rem 0;
}

.mini-methodology h4 {
  font-family: var(--serif);
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: var(--ink);
}

.mini-methodology a {
  color: var(--accent);
  text-decoration: underline;
  font-weight: 500;
}


/* ─── E-E-A-T trust pages: a-propos, methodologie, contact, auteur ───────── */

.author-card {
  background: #fff;
  border: 1px solid #E5DDD3;
  border-top: 3px solid var(--accent);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 4px;
}
.author-card .name {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ink);
}
.author-card .role {
  color: #6B7D7E;
  font-size: 0.9rem;
  margin: 0.2rem 0 0.75rem;
}
.author-card .author-links a {
  color: var(--accent);
  text-decoration: none;
  margin-right: 1rem;
  font-size: 0.9rem;
}
.author-card .author-links a:hover {
  text-decoration: underline;
}

.formula {
  background: #FAF7F2;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent);
  margin: 1rem 0;
  font-family: var(--mono, 'JetBrains Mono', monospace);
  font-size: 0.9rem;
  overflow-x: auto;
}

.disclaimer {
  background: #FFF8E7;
  border: 1px solid #E5DDD3;
  border-left: 3px solid var(--accent);
  padding: 1rem 1.25rem;
  margin: 2rem 0;
  font-size: 0.9rem;
  color: #4A5859;
  border-radius: 4px;
}

/* Contact page */
.t-contact .info-card {
  background: #fff;
  border: 1px solid #E5DDD3;
  border-top: 3px solid var(--accent);
  padding: 1.5rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
}
.t-contact .email-cta {
  font-size: 1.4rem;
  font-weight: 600;
  word-break: break-all;
}
.t-contact .email-cta a {
  color: var(--accent);
  text-decoration: none;
}
.t-contact .email-cta a:hover {
  text-decoration: underline;
}
.meta-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0.5rem 1rem;
  margin-top: 1rem;
  font-size: 0.95rem;
}
.meta-row dt {
  color: #6B7D7E;
  font-weight: 600;
}
.meta-row dd {
  margin: 0;
}
@media (max-width: 600px) {
  .meta-row { grid-template-columns: 1fr; gap: 0.1rem 0; }
  .meta-row dt { margin-top: 0.6rem; }
}
.t-contact .uses {
  list-style: none;
  padding: 0;
  margin: 0;
}
.t-contact .uses li {
  padding: 0.7rem 0;
  border-bottom: 1px solid #F0EAE2;
  display: flex;
  gap: 1rem;
  align-items: baseline;
}
.t-contact .uses li:last-child {
  border-bottom: 0;
}
.t-contact .uses .tag {
  display: inline-block;
  background: #FAF7F2;
  border: 1px solid #E5DDD3;
  padding: 0.2rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
  color: #4A5859;
  white-space: nowrap;
}

/* Author page */
.t-author .hero {
  padding: 1.5rem 0 2rem;
  border-bottom: 1px solid #E5DDD3;
  margin-bottom: 2rem;
}
.t-author .role {
  color: var(--accent);
  font-weight: 600;
  margin: 0.25rem 0 0.75rem;
}
.t-author .links a {
  color: var(--accent);
  text-decoration: none;
  margin-right: 1rem;
  font-size: 0.9rem;
}
.t-author .links a:hover {
  text-decoration: underline;
}

/* ─── Site footer (4-col E-E-A-T trust + bottom bar) ─────────────────────── */
.site-footer {
  background: var(--ink);
  color: #d8d2c5;
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
  font-size: 0.9rem;
  line-height: 1.5;
}
.site-footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem 2rem;
}
.site-footer-col h4 {
  color: #fff;
  font-family: var(--serif, Georgia, serif);
  font-size: 1.05rem;
  margin: 0 0 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.site-footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-footer-col li {
  margin: 0.45rem 0;
}
.site-footer-col a {
  color: #d8d2c5;
  text-decoration: none;
  transition: color 0.15s ease;
}
.site-footer-col a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.site-footer-col .sources {
  font-size: 0.85rem;
  margin: 0;
  color: #c8c2b5;
}
.site-footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(216, 210, 197, 0.15);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 1.5rem;
  font-size: 0.85rem;
  color: #aaa9a3;
}
.site-footer-bottom p { margin: 0; }
.site-footer-bottom a { color: #c8c2b5; }
@media (max-width: 960px) {
  .site-footer-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem 1.5rem; }
}
@media (max-width: 600px) {
  .site-footer { padding: 2.25rem 0 1.25rem; }
  .site-footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .site-footer-bottom { flex-direction: column; align-items: flex-start; gap: 0.4rem; margin-top: 2rem; padding-top: 1.25rem; }
}

/* ============================================================
   P7 — Region & Departement enriched stats
   ============================================================ */
.hero-region,
.hero-departement {
  text-align: center;
  padding: 3rem 1.5rem 2.5rem;
  background: linear-gradient(180deg, var(--paper-warm) 0%, var(--paper) 100%);
  margin-bottom: 2rem;
}
.hero-region h1,
.hero-departement h1 {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  color: var(--ink);
  margin-bottom: 0.75rem;
}
.hero-region .subtitle,
.hero-departement .subtitle {
  color: var(--ink-soft);
  font-size: 1rem;
  max-width: 760px;
  margin: 0 auto;
}

.region-stats,
.dept-stats {
  max-width: 1200px;
  margin: 0 auto 2.5rem;
  padding: 0 1.5rem;
}
.region-stats h2,
.dept-stats h2 {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--ink);
  margin-bottom: 1.25rem;
  text-align: center;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  text-align: center;
  transition: border-color 0.15s, transform 0.15s;
}
.stat-card:hover {
  border-color: var(--accent);
}
.stat-value {
  display: block;
  font-family: var(--mono);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.3rem;
  line-height: 1.1;
}
.stat-label {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.section-intro {
  color: var(--ink-soft);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  max-width: 760px;
}

.commune-card-featured {
  border-color: var(--accent-light) !important;
  background: linear-gradient(135deg, #fff 0%, var(--paper-warm) 100%);
}
.commune-card-featured:hover {
  border-color: var(--accent) !important;
  transform: translateY(-1px);
}

.data-sources {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-light);
  color: var(--muted);
}

@media (max-width: 600px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-value { font-size: 1.3rem; }
  .hero-region, .hero-departement { padding: 2.25rem 1rem 1.75rem; }
}
