/* ============================================================
   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:         #6b6b80;

  /* 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); }

/* ============================================================
   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 {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  color: var(--muted);
  font-size: 0.82rem;
}
.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;
}

.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; }
}
