/* Module page logement commune */
.commune-search-block{margin:0 0 26px;padding:20px;border:1px solid var(--line,#e6ebf2);border-radius:20px;background:linear-gradient(180deg,#fff,#f8fbff);box-shadow:0 12px 34px rgba(7,25,54,.07)}
.commune-search-block label{display:block;margin-bottom:8px;font-size:15px;font-weight:900;color:var(--ink,#071936)}
.commune-search-input{width:100%!important;max-width:none!important;min-height:52px;border:1px solid #d7e1ef;border-radius:15px;padding:12px 16px;font-size:17px;font-weight:850;background:#fff}
.commune-suggestions{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:8px;margin-top:14px;max-height:260px;overflow:auto}
.commune-suggestions a{padding:10px 12px;border-radius:12px;background:#fff;border:1px solid #e2e8f0;color:var(--ink,#071936);font-weight:850;text-decoration:none!important}
.commune-suggestions a:hover{background:var(--soft,#eef5ff);color:#075bd8}
.logement-hero{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr);gap:24px;align-items:stretch;margin-bottom:28px}
.logement-hero-card{padding:30px;border-radius:26px;background:linear-gradient(135deg,#071936,#12356e);color:#fff;box-shadow:0 18px 50px rgba(7,25,54,.18)}
.logement-hero-card h1{color:#fff;margin:0 0 10px;font-size:clamp(34px,5vw,54px)}
.logement-hero-card p{color:#dce9ff;font-size:18px;margin:0 0 18px}.hero-source{display:inline-flex;padding:8px 12px;border-radius:999px;background:rgba(255,255,255,.12);font-size:13px;font-weight:850;color:#fff}
.commune-info-card{border:1px solid var(--line,#e6ebf2);border-radius:26px;background:#fff;box-shadow:0 14px 34px rgba(7,25,54,.08);padding:22px}.commune-photo{aspect-ratio:16/9;border-radius:18px;background:linear-gradient(135deg,#dbeafe,#dcfce7);display:flex;align-items:center;justify-content:center;font-weight:950;color:#12356e;margin-bottom:16px}.info-list{display:grid;gap:8px}.info-list div{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid #eef2f7;padding-bottom:6px}.info-list span{color:#64748b}.info-list strong{text-align:right}
.kpi-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;margin:24px 0}.kpi{padding:18px;border-radius:20px;background:#fff;border:1px solid #e4ebf5;box-shadow:0 8px 24px rgba(7,25,54,.05)}.kpi strong{display:block;font-size:clamp(22px,3vw,32px);line-height:1.05;color:#071936}.kpi span{display:block;margin-top:6px;color:#64748b;font-weight:800;font-size:13px}
.section-card{margin:30px 0;padding:26px;border:1px solid var(--line,#e6ebf2);border-radius:24px;background:#fff;box-shadow:0 14px 34px rgba(7,25,54,.07)}.section-card h2{margin-top:0}.two-col{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}.three-col{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.donut-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.donut-card{padding:20px;border-radius:20px;background:#f8fbff;border:1px solid #e6edf7}.donut{--a:50;--b:50;width:180px;height:180px;margin:0 auto 14px;border-radius:50%;background:conic-gradient(#16a34a 0 calc(var(--a)*1%),#2563eb 0);display:grid;place-items:center}.donut.owner{background:conic-gradient(#0f766e 0 calc(var(--a)*1%),#f97316 0)}.donut.car{background:conic-gradient(#94a3b8 0 calc(var(--a)*1%),#2563eb 0 calc((var(--a) + var(--b))*1%),#16a34a 0)}.donut-inner{width:112px;height:112px;border-radius:50%;background:#fff;display:grid;place-items:center;text-align:center;font-weight:950;color:#071936;box-shadow:inset 0 0 0 1px #e5eaf2}.legend{display:flex;justify-content:center;gap:14px;flex-wrap:wrap;font-size:13px;font-weight:850;color:#475569}.dot{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:6px}.dot.green{background:#16a34a}.dot.blue{background:#2563eb}.dot.darkgreen{background:#0f766e}.dot.orange{background:#f97316}.dot.gray{background:#94a3b8}
.premium-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.premium-metric{padding:22px;border-radius:22px;background:linear-gradient(180deg,#f8fbff,#fff);border:1px solid #dfe7f2}.premium-metric strong{font-size:34px;line-height:1;color:#075bd8}.premium-metric span{display:block;margin-top:8px;font-weight:850;color:#475569}.premium-metric small{display:block;margin-top:6px;color:#64748b}
.badge-list{display:flex;flex-wrap:wrap;gap:12px}.profile-badge{display:inline-flex;align-items:center;gap:10px;padding:14px 18px;border-radius:999px;background:#f0fdf4;border:1px solid #bbf7d0;font-size:18px;font-weight:950;color:#14532d}.profile-badge.alt{background:#eff6ff;border-color:#bfdbfe;color:#1e3a8a}
.compare-bars{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.compare-row{padding:18px;border:1px solid #e5eaf2;border-radius:18px;background:#f8fbff}.compare-row h3{margin:0 0 14px;font-size:17px}.bar-line{display:grid;grid-template-columns:95px minmax(0,1fr) 64px;align-items:center;gap:10px;margin:9px 0}.bar-line span{font-weight:850;color:#334155;font-size:14px}.bar-track{height:12px;border-radius:999px;background:#e5e7eb;overflow:hidden}.bar-fill{height:100%;border-radius:999px}.bar-fill.commune{background:#16a34a}.bar-fill.france{background:#94a3b8}.bar-line strong{text-align:right;font-size:15px;color:#071936}
.stacked{height:24px;border-radius:999px;overflow:hidden;display:flex;background:#e5e7eb}.stacked span{height:100%;min-width:2px}.stacked-legend{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px;font-size:12px;font-weight:800;color:#475569}.s1{background:#1e3a8a}.s2{background:#2563eb}.s3{background:#38bdf8}.s4{background:#16a34a}.s5{background:#f59e0b}.s6{background:#ef4444}
.hbar{display:grid;grid-template-columns:150px minmax(0,1fr) 62px;gap:10px;align-items:center;margin:10px 0}.hbar .bar-track{height:14px}.hbar b{font-size:14px}.car-layout{display:grid;grid-template-columns:260px 1fr;gap:24px;align-items:center}.big-kpi{padding:24px;border-radius:22px;background:#071936;color:#fff;text-align:center}.big-kpi strong{display:block;font-size:54px;line-height:1}.big-kpi span{color:#dce9ff;font-weight:850}
.local-comparator{background:linear-gradient(135deg,#eef5ff,#f0fdf4)}.compare-form{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.compare-form label{font-weight:900;font-size:13px}.compare-form input{width:100%;max-width:none!important}.compare-form button{grid-column:auto}.compare-result{margin-top:18px;display:none}.gauge-line{margin:12px 0}.gauge-head{display:flex;justify-content:space-between;font-weight:850}.gauge-track{height:14px;background:#e5e7eb;border-radius:999px;overflow:hidden}.gauge-fill{height:100%;background:#16a34a;border-radius:999px}.verdict{margin-top:14px;padding:16px;border-radius:16px;background:#fff;border:1px solid #dfe7f2;font-weight:850}
.neighbor-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.neighbor-card{display:block;padding:16px;border-radius:16px;border:1px solid #e5eaf2;background:#fff;text-decoration:none!important;color:#071936}.neighbor-card strong{display:block}.neighbor-card span{color:#64748b;font-size:13px;font-weight:800}.faq details{padding:14px 0;border-top:1px solid #e5eaf2}.faq summary{font-weight:950;cursor:pointer}
@media(max-width:900px){.logement-hero,.two-col,.donut-grid,.compare-bars,.car-layout{grid-template-columns:1fr}.kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.premium-metrics,.three-col,.neighbor-grid,.compare-form{grid-template-columns:1fr}.bar-line{grid-template-columns:78px minmax(0,1fr) 54px}.hbar{grid-template-columns:120px minmax(0,1fr) 52px}.compare-form button{grid-column:1}}

.logement-top{
  display:grid;
  grid-template-columns:minmax(0,1.18fr) minmax(320px,.82fr);
  gap:28px;
  align-items:stretch;
  margin-bottom:26px;
}

.logement-top-left h1{
  margin:10px 0 10px;
  font-size:clamp(38px,5vw,56px);
  line-height:1.05;
  letter-spacing:-.045em;
  color:#071936;
}

.logement-subtitle{
  margin:0 0 12px;
  color:#071936;
  font-weight:750;
}

.logement-top .hero-source{
  display:block;
  color:#475569;
  font-size:14px;
  font-weight:750;
  margin-bottom:34px;
}

.hero-kpi-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(120px,1fr));
  gap:10px;
}

.hero-kpi{
  min-height:170px;
  padding:20px 12px;
  border:1px solid #dfe7f2;
  border-radius:10px;
  background:#fff;
  box-shadow:0 8px 22px rgba(7,25,54,.04);
  text-align:center;
}

.hero-kpi-icon{
  display:flex;
  align-items:center;
  justify-content:center;
  width:46px;
  height:46px;
  margin:0 auto 14px;
}

.hero-kpi-icon svg{
  width:46px;
  height:46px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.hero-kpi-icon.icon-green{
  color:#16853d;
}

.hero-kpi-icon.icon-blue{
  color:#075bd8;
}

.hero-kpi-icon.icon-teal{
  color:#0f8f79;
}

.hero-kpi-icon.icon-blue-dark{
  color:#0b4fd4;
}

.hero-kpi strong{
  display:block;
  font-size:24px;
  line-height:1;
  color:#08723b;
  font-weight:950;
  white-space:nowrap;
}

@media(max-width:520px){
  .hero-kpi strong{
    font-size:22px;
  }
}

.hero-kpi span{
  display:block;
  margin-top:8px;
  color:#071936;
  font-size:14px;
  font-weight:850;
}

.hero-kpi small{
  display:block;
  margin-top:12px;
  color:#64748b;
  font-size:12px;
  font-weight:750;
}

.commune-identity-card{
  border:1px solid #dfe7f2;
  border-radius:8px;
  overflow:hidden;
  background:#fff;
  box-shadow:0 10px 28px rgba(7,25,54,.06);
}

.commune-main-photo{
  display:block;
  width:100%;
  aspect-ratio:16/9;
  object-fit:cover;
  border-radius:0;
}

.commune-info-list{
  padding:14px 18px 16px;
  display:grid;
  gap:10px;
  background:#fff;
}

.commune-info-list div{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:14px;
  align-items:center;
  min-height:24px;
}

.commune-info-list span{
  display:flex;
  align-items:center;
  gap:9px;
  color:#071936;
  font-size:14px;
  line-height:1.25;
  font-weight:650;
}

.commune-info-list strong{
  text-align:right;
  color:#071936;
  font-size:14px;
  line-height:1.25;
  font-weight:650;
  white-space:nowrap;
}

.classement-commune-card{
  display:grid;
  grid-template-columns:72px minmax(0,.9fr) minmax(0,1.1fr);
  gap:22px;
  align-items:center;
  margin:26px 0 34px;
  padding:22px 26px;
  border:1px solid #dfe7f2;
  border-radius:10px;
  background:linear-gradient(180deg,#f8fbff,#ffffff);
  box-shadow:0 10px 28px rgba(7,25,54,.05);
}

.classement-icon{
  width:56px;
  height:56px;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:32px;
  background:#eef5ff;
  color:#075bd8;
}

.classement-main h2{
  margin:0 0 8px;
  font-size:18px;
  line-height:1.2;
  color:#071936;
}

.classement-main p,
.classement-description p{
  margin:0;
  color:#071936;
  font-size:15px;
  line-height:1.55;
}

@media(max-width:900px){
  .logement-top{
    grid-template-columns:1fr;
  }

  .hero-kpi-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .classement-commune-card{
    grid-template-columns:1fr;
  }

  .classement-icon{
    margin-bottom:0;
  }
}

@media(max-width:520px){
  .hero-kpi-grid{
    grid-template-columns:1fr;
  }

  .hero-kpi{
    min-height:auto;
  }
}

/* ===== Bloc 3 cartes logement / voiture / chauffage ===== */
.housing-insights-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:18px;
  margin:28px 0;
}

.insight-card{
  background:#fff;
  border:1px solid #e6ebf2;
  border-radius:16px;
  padding:18px 18px 16px;
  box-shadow:0 6px 18px rgba(18,38,63,.05);
}

.insight-card h2{
  margin:0 0 6px;
  font-size:24px;
  line-height:1.18;
  color:#102a5c;
}

.insight-subtitle{
  margin:0 0 14px;
  font-size:14px;
  color:#5f6f8d;
}

.insight-analysis{
  margin-top:14px;
}

.insight-analysis strong{
  display:block;
  margin-bottom:6px;
  color:#3c8f2f;
  font-size:15px;
}

.insight-analysis p{
  margin:0;
  font-size:14px;
  line-height:1.58;
  color:#23324f;
}

/* ===== mini rows ===== */
.mini-stat-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.mini-stat-row{
  display:grid;
  grid-template-columns:120px minmax(0,1fr) 100px;
  align-items:center;
  gap:12px;
}

.mini-stat-label{
  font-size:14px;
  font-weight:600;
  color:#20345c;
}

.mini-stat-bar{
  height:12px;
  background:#e7ebf0;
  border-radius:999px;
  overflow:hidden;
  position:relative;
}

.mini-stat-fill{
  display:block;
  height:100%;
  border-radius:999px;
}

.mini-stat-value{
  font-size:14px;
  font-weight:700;
  color:#20345c;
  text-align:right;
  white-space:nowrap;
}

.mini-stat-raw{
  font-weight:500;
  color:#5f6f8d;
}

/* couleurs logements récents */
.fill-green-1{background:#7ebc5d;}
.fill-green-2{background:#84c561;}
.fill-green-3{background:#8ccd67;}
.fill-green-4{background:#7fbd59;}
.fill-green-5{background:#91cf73;}
.fill-green-6{background:#69b248;}

/* ===== voiture ===== */
.insight-title-with-icon{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:10px;
}

.title-icon{
  width:30px;
  height:30px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#1e67d8;
  flex:0 0 30px;
}

.title-icon svg{
  width:26px;
  height:26px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.car-layout{
  display:grid;
  grid-template-columns:130px 1fr;
  gap:18px;
  align-items:center;
  margin-bottom:14px;
}

.donut-wrap{
  display:flex;
  justify-content:center;
  align-items:center;
}

.car-donut{
  width:112px;
  height:112px;
  border-radius:50%;
  background:
    conic-gradient(
      #78b84c 0 calc(var(--p1)*1%),
      #2f7dd1 calc(var(--p1)*1%) calc((var(--p1) + var(--p2))*1%),
      #f29122 calc((var(--p1) + var(--p2))*1%) 100%
    );
  position:relative;
}

.car-donut::after{
  content:"";
  position:absolute;
  inset:22px;
  border-radius:50%;
  background:#fff;
}

.car-legend{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.legend-item{
  display:grid;
  grid-template-columns:14px 1fr auto;
  align-items:center;
  gap:10px;
  font-size:14px;
  color:#20345c;
}

.legend-dot{
  width:12px;
  height:12px;
  border-radius:50%;
  display:inline-block;
}

.dot-green{background:#78b84c;}
.dot-blue{background:#2f7dd1;}
.dot-orange{background:#f29122;}

.parking-kpi{
  background:#f6f8fc;
  border-radius:14px;
  padding:18px 16px;
  margin-bottom:14px;
}

.parking-kpi-value{
  font-size:46px;
  font-weight:800;
  line-height:1;
  color:#172d61;
  margin-bottom:6px;
}

.parking-kpi-text{
  font-size:14px;
  line-height:1.55;
  color:#20345c;
  font-weight:600;
}

/* ===== chauffage ===== */
.heat-list{
  gap:14px;
}

.heat-row{
  display:grid;
  grid-template-columns:180px minmax(0,1fr) 48px;
  gap:12px;
  align-items:center;
}

.heat-label{
  display:flex;
  align-items:center;
  gap:10px;
  font-size:14px;
  font-weight:600;
  color:#20345c;
}

.heat-icon{
  width:18px;
  height:18px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 18px;
}

.heat-icon svg{
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.heat-bar{
  height:12px;
  background:#e7ebf0;
  border-radius:999px;
  overflow:hidden;
}

.heat-value{
  text-align:right;
  font-size:14px;
  font-weight:700;
  color:#20345c;
  white-space:nowrap;
}

.heat-blue{color:#1e67d8;}
.heat-green{color:#65b449;}
.heat-blue-dark{color:#2454a6;}
.heat-teal{color:#14a0a8;}
.heat-violet{color:#6b68d6;}

.fill-heat-gaz{background:#78b84c;}
.fill-heat-elec{background:#7dbd63;}
.fill-heat-fioul{background:#6eab52;}
.fill-heat-citerne{background:#8fcb77;}
.fill-heat-other{background:#70b160;}

/* responsive */
@media (max-width: 1100px){
  .housing-insights-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width: 700px){
  .mini-stat-row{
    grid-template-columns:110px minmax(0,1fr) 82px;
    gap:8px;
  }

  .heat-row{
    grid-template-columns:1fr;
    gap:8px;
  }

  .heat-value{
    text-align:left;
  }

  .car-layout{
    grid-template-columns:1fr;
  }

  .car-legend{
    margin-top:6px;
  }
}


/* ===== Cartes marché immobilier ===== */

.housing-cost-card,
.housing-size-card{
  background:#fbf8f2;
  border:1px solid #eadfce;
  border-radius:8px;
  padding:16px 18px;
  margin:24px 0;
}

.housing-cost-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin:0 0 14px;
}

.housing-cost-head h2,
.housing-size-card h2{
  margin:0;
  font-size:18px;
  line-height:1.2;
  font-weight:800;
  color:#0c2b66;
}

.housing-size-card h2 small{
  font-size:12px;
  font-weight:800;
  color:#1f2f55;
}

.cost-type-toggle{
  display:inline-flex;
  align-items:center;
  gap:3px;
  padding:2px;
  border-radius:999px;
  background:#edf3ff;
  border:1px solid #d8e2f3;
  flex:0 0 auto;
}

.cost-type-toggle label{
  margin:0;
  cursor:pointer;
}

.cost-type-toggle input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}

.cost-type-toggle span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 11px;
  border-radius:999px;
  font-size:12px;
  line-height:1;
  font-weight:800;
  color:#2f4f8f;
  white-space:nowrap;
  transition:background .15s ease, color .15s ease, box-shadow .15s ease;
}

.cost-type-toggle input:checked + span{
  background:#2563eb;
  color:#fff;
  box-shadow:0 1px 3px rgba(37,99,235,.25);
}

.housing-cost-inner{
  display:flex;
  align-items:flex-start;
  gap:18px;
}

.housing-cost-kpis{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  gap:12px;
  flex:0 0 720px;
  max-width:720px;
}

.market-kpi-card{
  min-height:112px;
  background:#fff;
  border:1px solid #dde5f0;
  border-radius:8px;
  padding:14px 16px;
  display:grid;
  grid-template-columns:25% minmax(0,1fr);
  align-items:center;
  gap:14px;
  box-shadow:none;
}

.market-kpi-icon{
  width:100%;
  min-width:60px;
  height:76px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:0;
  background:transparent !important;
}

.market-kpi-icon svg{
  width:44px;
  height:44px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.market-kpi-icon.orange{
  color:#f36a21;
  background:transparent;
}

.market-kpi-icon.blue{
  color:#1764d8;
  background:transparent;
}

.market-kpi-icon.green{
  color:#2f9d46;
  background:transparent;
}

.market-kpi-content{
  min-width:0;
}

.market-kpi-title{
  display:block;
  margin:0 0 8px;
  font-size:14px;
  line-height:1.25;
  font-weight:800;
  color:#1f2f55;
}

.market-kpi-value{
  display:block;
  font-size:clamp(25px,2.4vw,32px);
  line-height:1;
  font-weight:900;
  letter-spacing:-.035em;
  white-space:nowrap;
  margin:0 0 6px;
}

.market-kpi-value.orange{color:#f36a21;}
.market-kpi-value.blue{color:#1764d8;}
.market-kpi-value.green{color:#2f9d46;}

.market-kpi-content small{
  display:block;
  font-size:12px;
  line-height:1.35;
  color:#6b7280;
  font-weight:600;
}

.housing-cost-analysis{
  flex:1;
  min-width:260px;
  padding-top:2px;
}

.housing-cost-analysis p{
  margin:0;
  font-size:14px;
  line-height:1.65;
  color:#1f2f55;
  font-weight:500;
}

/* ===== Taille des logements ===== */

.housing-size-inner{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(260px,340px);
  gap:14px;
  align-items:stretch;
  margin-top:14px;
}

.room-size-card{
  background:#fff;
  border:1px solid #dde5f0;
  border-radius:8px;
  padding:16px;
}

.room-size-main{
  display:grid;
  grid-template-columns:220px minmax(0,1fr);
  gap:18px;
  align-items:center;
}

.room-donut-wrap{
  display:flex;
  align-items:center;
  justify-content:center;
}

.room-donut-chart{
  width:178px;
  height:178px;
  border-radius:50%;
  background:
    conic-gradient(
      #a7adb6 0 calc(var(--p1) * 1%),
      #6fb6df calc(var(--p1) * 1%) calc((var(--p1) + var(--p2)) * 1%),
      #9ed2e3 calc((var(--p1) + var(--p2)) * 1%) calc((var(--p1) + var(--p2) + var(--p3)) * 1%),
      #72ba56 calc((var(--p1) + var(--p2) + var(--p3)) * 1%) calc((var(--p1) + var(--p2) + var(--p3) + var(--p4)) * 1%),
      #5f9f48 calc((var(--p1) + var(--p2) + var(--p3) + var(--p4)) * 1%) 100%
    );
  position:relative;
}

.room-donut-hole{
  position:absolute;
  inset:44px;
  background:#fff;
  border-radius:50%;
  box-shadow:inset 0 0 0 1px #e5eaf2;
}

.room-legend-list{
  display:grid;
  gap:13px;
}

.room-legend-row{
  display:grid;
  grid-template-columns:12px minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  font-size:14px;
  color:#1f2f55;
}

.room-dot{
  width:11px;
  height:11px;
  border-radius:50%;
  display:inline-block;
}

.room-grey{background:#a7adb6;}
.room-blue{background:#6fb6df;}
.room-lightblue{background:#9ed2e3;}
.room-green{background:#72ba56;}
.room-darkgreen{background:#5f9f48;}

.room-label{
  font-weight:700;
}

.room-legend-row strong{
  font-size:14px;
  font-weight:900;
  color:#0c2b66;
  white-space:nowrap;
}

.room-legend-row em{
  font-style:normal;
  color:#1f2f55;
  font-weight:800;
}

.room-size-analysis{
  margin-top:16px;
  border:1px solid #dde5f0;
  border-radius:8px;
  padding:14px 16px;
  background:#fff;
}

.room-size-analysis strong{
  display:block;
  margin-bottom:7px;
  color:#2f9d46;
  font-size:13px;
  font-weight:900;
}

.room-size-analysis p{
  margin:0;
  font-size:14px;
  line-height:1.55;
  color:#1f2f55;
  font-weight:700;
}

.size-surface-card{
  min-height:100%;
}

/* Responsive */
@media(max-width:1180px){
  .housing-cost-inner{
    flex-direction:column;
  }

  .housing-cost-kpis{
    width:100%;
    max-width:none;
    flex:0 0 auto;
  }

  .housing-cost-analysis{
    min-width:0;
    width:100%;
  }
}

@media(max-width:900px){
  .housing-cost-kpis{
    grid-template-columns:1fr;
  }

  .housing-size-inner{
    grid-template-columns:1fr;
  }

  .room-size-main{
    grid-template-columns:1fr;
  }
}

@media(max-width:620px){
  .housing-cost-head{
    flex-direction:column;
    align-items:flex-start;
  }

  .room-donut-chart{
    width:150px;
    height:150px;
  }

  .room-donut-hole{
    inset:38px;
  }

  .room-legend-row{
    grid-template-columns:12px minmax(0,1fr);
  }

  .room-legend-row strong{
    grid-column:2;
  }

  .market-kpi-card{
    grid-template-columns:74px 1fr;
  }
}

.analysis-price-value{
  color:#f36a21;
  font-weight:900;
  white-space:nowrap;
}

.analysis-rent-value{
  color:#1764d8;
  font-weight:900;
  white-space:nowrap;
}

.housing-cost-analysis strong{
  font-weight:900;
}

/* ===== Évolutions UI logement commune ===== */

/* Recherche : titre des communes limitrophes */
.commune-suggestions-title{
  grid-column:1/-1;
  margin:2px 0 2px;
  color:#64748b;
  font-size:13px;
  font-weight:900;
}

/* En-tête : cartes KPI plus fines et plus aérées */
.logement-top{
  gap:42px;
}

.hero-kpi-grid{
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:14px;
}

.hero-kpi{
  min-height:168px;
  padding:22px 12px 18px;
}

.hero-kpi-icon{
  width:36px;
  height:36px;
  margin:0 auto 18px;
}

.hero-kpi-icon svg{
  width:36px;
  height:36px;
  stroke-width:1.25;
}

.hero-kpi strong{
  font-size:24px;
  font-weight:600;
  letter-spacing:-.02em;
}

.hero-kpi:nth-child(1) .hero-kpi-icon,
.hero-kpi:nth-child(1) strong{color:#16853d;}

.hero-kpi:nth-child(2) .hero-kpi-icon,
.hero-kpi:nth-child(2) strong{color:#075bd8;}

.hero-kpi:nth-child(3) .hero-kpi-icon,
.hero-kpi:nth-child(3) strong{color:#0f8f79;}

.hero-kpi:nth-child(4) .hero-kpi-icon,
.hero-kpi:nth-child(4) strong{color:#6b5fd6;}

.hero-kpi:nth-child(5) .hero-kpi-icon,
.hero-kpi:nth-child(5) strong{color:#f36a21;}

.hero-kpi small{
  display:none;
}

/* Répartition des logements */
.housing-repartition-card{
  background:#fff;
  border:1px solid #dde5f0;
  border-radius:10px;
  padding:18px;
  margin:24px 0;
}

.housing-repartition-card h2{
  margin:0 0 16px;
  font-size:20px;
  line-height:1.2;
  font-weight:900;
  color:#0c2b66;
}

.housing-repartition-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(260px,360px);
  gap:16px;
  align-items:stretch;
}

.repartition-donut-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}

.repartition-donut-card,
.repartition-analysis-card{
  background:#fff;
  border:1px solid #dde5f0;
  border-radius:8px;
  padding:16px;
}

.repartition-donut-card h3{
  margin:0 0 14px;
  color:#1f2f55;
  font-size:15px;
  font-weight:900;
}

.repartition-donut-main{
  display:grid;
  grid-template-columns:180px minmax(0,1fr);
  gap:16px;
  align-items:center;
}

.repartition-donut{
  width:164px;
  height:164px;
  border-radius:50%;
  position:relative;
}

.repartition-donut-type {
  background: conic-gradient(
    #76ad5c 0 calc(var(--a) * 1%),
    #2f80db calc(var(--a) * 1%) 100%
  );
}

.repartition-donut-type.has-other {
  background: conic-gradient(
    #76ad5c 0 calc(var(--a) * 1%),
    #2f80db calc(var(--a) * 1%) calc((var(--a) + var(--b)) * 1%),
    #94a3b8 calc((var(--a) + var(--b)) * 1%) 100%
  );
}

.repartition-donut-occupation{
  background:conic-gradient(#0f766e 0 calc(var(--a)*1%), #f97316 0);
}

.repartition-donut-hole{
  position:absolute;
  inset:40px;
  background:#fff;
  border-radius:50%;
  box-shadow:inset 0 0 0 1px #e5eaf2;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
}

.repartition-donut-hole strong{
  color:#0c2b66;
  font-size:18px;
  font-weight:900;
  line-height:1;
}

.repartition-donut-hole span{
  margin-top:4px;
  color:#64748b;
  font-size:11px;
  font-weight:800;
}

.repartition-legend-list{
  display:grid;
  gap:12px;
}

.repartition-legend-row{
  display:grid;
  grid-template-columns:12px minmax(0,1fr) auto;
  gap:9px;
  align-items:center;
  color:#1f2f55;
  font-size:13px;
  font-weight:750;
}

.repartition-legend-row strong{
  color:#0c2b66;
  font-weight:900;
  white-space:nowrap;
}

.repartition-legend-row em{
  font-style:normal;
  color:#64748b;
  font-weight:800;
}

.repartition-dot{
  width:11px;
  height:11px;
  border-radius:50%;
  display:inline-block;
}

.repartition-dot.green{background:#16a34a;}
.repartition-dot.blue{background:#2563eb;}
.repartition-dot.darkgreen{background:#0f766e;}
.repartition-dot.orange{background:#f97316;}

.repartition-analysis-card{
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.repartition-analysis-card strong{
  display:block;
  margin-bottom:8px;
  color:#2f9d46;
  font-size:14px;
  font-weight:900;
}

.repartition-analysis-card p{
  margin:0;
  color:#1f2f55;
  font-size:14px;
  line-height:1.65;
  font-weight:650;
}

/* Comparaison France enrichie */
.compare-section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin:0 0 16px;
}

.compare-section-head h2{
  margin:0;
}

.market-france-card .compare-type-label{
  display:inline-flex;
  margin-left:4px;
  padding:3px 8px;
  border-radius:999px;
  background:#edf3ff;
  color:#2f4f8f;
  font-size:11px;
  font-weight:900;
}

.market-france-card[data-format="loyer"] .bar-fill.commune{
  background:#1764d8;
}

.market-france-card[data-format="prix"] .bar-fill.commune{
  background:#f36a21;
}

.market-france-card .market-commune-value,
.market-france-card .market-france-value{
  white-space:nowrap;
}

/* Corrections marché / icônes transparentes */
.market-kpi-icon{
  background:transparent!important;
}

.market-kpi-icon svg{
  overflow:visible;
}

/* Responsive */
@media(max-width:1180px){
  .housing-repartition-layout{
    grid-template-columns:1fr;
  }
}

@media(max-width:960px){
  .repartition-donut-grid{
    grid-template-columns:1fr;
  }

  .repartition-donut-main{
    grid-template-columns:170px minmax(0,1fr);
  }
}

@media(max-width:760px){
  .compare-section-head{
    flex-direction:column;
    align-items:flex-start;
  }

  .hero-kpi-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:560px){
  .repartition-donut-main{
    grid-template-columns:1fr;
  }

  .repartition-donut{
    margin:0 auto;
  }

  .hero-kpi-grid{
    grid-template-columns:1fr;
  }
}


/* ===== Overrides v2 : bloc répartition / cartes hero / comparateur local ===== */
.logement-top{gap:34px;align-items:start;}
.hero-kpi-grid{grid-template-columns:repeat(5,minmax(128px,1fr));gap:14px;margin-right:8px;}
.hero-kpi{min-height:158px;padding:18px 14px;border-radius:12px;}
.hero-kpi-icon{width:42px;height:42px;margin:0 auto 12px;}
.hero-kpi-icon svg{width:38px;height:38px;stroke-width:1.45;}
.hero-kpi strong{font-size:clamp(23px,2.1vw,31px);font-weight:500;line-height:1.05;white-space:nowrap;letter-spacing:-.02em;}
.hero-kpi span{font-size:14px;line-height:1.28;font-weight:700;}
.hero-kpi:nth-child(1) .hero-kpi-icon,.hero-kpi:nth-child(1) strong{color:#2f8f4f;}
.hero-kpi:nth-child(2) .hero-kpi-icon,.hero-kpi:nth-child(2) strong{color:#1d68d9;}
.hero-kpi:nth-child(3) .hero-kpi-icon,.hero-kpi:nth-child(3) strong{color:#1d9d75;}
.hero-kpi:nth-child(4) .hero-kpi-icon,.hero-kpi:nth-child(4) strong{color:#4c6fd8;}
.hero-kpi:nth-child(5) .hero-kpi-icon,.hero-kpi:nth-child(5) strong{color:#2b73d2;}

.housing-repartition-card{background:#fff;border:1px solid #e4e8ef;border-radius:12px;padding:12px 12px 14px;box-shadow:none;}
.housing-repartition-card h2{margin:0 0 12px;font-size:20px;color:#0c2b66;}
.exact-repartition-layout{display:grid;grid-template-columns:1fr 1fr 0.88fr;gap:12px;align-items:stretch;}
.exact-card{background:#fcfcfb;border:1px solid #e5e8ef;border-radius:10px;padding:14px 14px 12px;min-height:214px;box-shadow:none;}
.repartition-donut-card h3{margin:0 0 10px;font-size:15px;line-height:1.25;font-weight:800;color:#172a55;}
.repartition-donut-main{display:grid;grid-template-columns:132px minmax(0,1fr);gap:12px;align-items:center;}
.repartition-donut{width:118px;height:118px;margin:0 auto;border-radius:50%;position:relative;}
.repartition-donut-type{background:conic-gradient(#76ad5c 0 calc(var(--a)*1%), #2f80db 0 100%);}
.repartition-donut-occupation{background:conic-gradient(#508f3f 0 calc(var(--a)*1%), #f28b20 0 100%);}
.repartition-donut-hole{position:absolute;inset:24px;border-radius:50%;background:#fff;box-shadow:inset 0 0 0 1px #e7ebf1;}
.repartition-legend-list{display:flex;flex-direction:column;gap:14px;}
.repartition-legend-row{display:grid;grid-template-columns:12px minmax(0,1fr) auto;gap:10px;align-items:center;font-size:14px;color:#1e325f;}
.repartition-legend-row strong{font-size:14px;font-weight:800;color:#0f234f;white-space:nowrap;}
.repartition-legend-row em{font-style:normal;font-weight:700;color:inherit;}
.repartition-dot{width:10px;height:10px;border-radius:50%;display:block;}
.repartition-analysis-card{display:flex;flex-direction:column;justify-content:flex-start;background:linear-gradient(180deg,#f8fbf6,#f5f8f2);}
.repartition-analysis-card strong{display:block;margin:0 0 10px;font-size:16px;font-weight:900;color:#4f8c2a;}
.repartition-analysis-card p{margin:0;font-size:14px;line-height:1.75;color:#111f3f;font-weight:500;}

.local-comparator-head{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:12px;}
.local-comparator-head h2{margin:0;}
.compare-form{display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) auto;gap:12px;align-items:end;}
.compare-form label{display:flex;flex-direction:column;gap:8px;font-size:13px;font-weight:900;color:#12264d;}
.compare-form input{min-height:48px;border:1px solid #d8e1ef;border-radius:12px;padding:11px 14px;font-size:16px;font-weight:700;}
.compare-form .button{align-self:end;min-height:48px;padding:0 22px;white-space:nowrap;}
.compare-result{display:none;margin-top:18px;background:#fff;border:1px solid #dbe4ef;border-radius:16px;padding:16px;}
.gauge-line{margin:0 0 14px;}
.gauge-line:last-of-type{margin-bottom:10px;}
.gauge-head{display:flex;justify-content:space-between;gap:12px;font-size:14px;font-weight:850;color:#102a5c;margin-bottom:6px;}
.gauge-head .gauge-values{color:#42516f;font-weight:700;text-align:right;}
.gauge-track{height:12px;background:#e5e7eb;border-radius:999px;overflow:hidden;}
.gauge-fill{height:100%;border-radius:999px;}
.gauge-fill.green{background:#3fa656;}
.gauge-fill.blue{background:#2e77da;}
.gauge-fill.orange{background:#ef8d2a;}
.gauge-fill.violet{background:#6d61d9;}
.gauge-caption{margin-top:5px;font-size:13px;line-height:1.45;color:#5a6885;}
.verdict{margin-top:8px;padding:14px 16px;border-radius:14px;background:#f8fbff;border:1px solid #dfe7f2;font-weight:700;line-height:1.6;color:#14284f;}

@media(max-width:1180px){
  .exact-repartition-layout{grid-template-columns:1fr;}
  .compare-form{grid-template-columns:repeat(2,minmax(0,1fr));}
  .compare-form .button{grid-column:1 / -1;}
}
@media(max-width:900px){
  .hero-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .exact-card{min-height:auto;}
  .repartition-donut-main{grid-template-columns:1fr;justify-items:center;}
  .repartition-legend-list{width:100%;}
  .local-comparator-head{align-items:flex-start;}
}
@media(max-width:640px){
  .compare-form{grid-template-columns:1fr;}
  .gauge-head{flex-direction:column;align-items:flex-start;}
  .gauge-head .gauge-values{text-align:left;}
}


/* ===== Correctifs v3 : mise en page bloc haut + répartition ===== */
.logement-top{
  grid-template-columns:minmax(0,1.55fr) minmax(320px,.85fr);
  gap:26px;
  align-items:start;
}

.hero-kpi-grid{
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:12px;
  margin-right:0;
}

.hero-kpi{
  min-width:0;
}

.hero-kpi strong{
  font-size:clamp(18px,2vw,24px);
}

.commune-identity-card{
  min-width:0;
}

.housing-repartition-card{
  overflow:hidden;
}

.exact-repartition-layout{
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(220px,.82fr);
}

.exact-card{
  min-width:0;
  overflow:hidden;
}

.repartition-donut-main{
  grid-template-columns:118px minmax(0,1fr);
  gap:14px;
  align-items:center;
}

.repartition-legend-list{
  gap:12px;
}

.repartition-legend-row{
  display:grid;
  grid-template-columns:10px minmax(0,1fr);
  grid-template-areas:
    "dot label"
    ". value";
  column-gap:10px;
  row-gap:3px;
  align-items:start;
}

.repartition-legend-row > .repartition-dot{
  grid-area:dot;
  margin-top:6px;
}

.repartition-legend-row > span:not(.repartition-dot){
  grid-area:label;
  min-width:0;
  font-weight:800;
  line-height:1.28;
}

.repartition-legend-row > strong{
  grid-area:value;
  display:block;
  min-width:0;
  white-space:normal;
  text-align:left;
  line-height:1.28;
}

.repartition-analysis-card{
  min-width:0;
}

@media(max-width:1280px){
  .logement-top{
    grid-template-columns:1fr;
  }

  .commune-identity-card{
    max-width:520px;
  }
}

@media(max-width:1080px){
  .exact-repartition-layout{
    grid-template-columns:1fr;
  }
}

@media(max-width:760px){
  .hero-kpi-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:560px){
  .hero-kpi-grid{
    grid-template-columns:1fr;
  }

  .repartition-donut-main{
    grid-template-columns:1fr;
    justify-items:center;
  }

  .repartition-legend-list{
    width:100%;
  }
}


/* ===== Harmonisation UI/UX v4 ===== */
:root{
  --sc-ink:#071936;
  --sc-muted:#5f6f8d;
  --sc-line:#e2e8f0;
  --sc-blue:#1764d8;
  --sc-green:#2f9d46;
  --sc-orange:#f36a21;
  --sc-card:#ffffff;
  --sc-soft:#f8fbff;
}

.section-card,
.housing-cost-card,
.housing-size-card,
.housing-repartition-card{
  border:1px solid var(--sc-line);
  border-radius:18px;
  background:var(--sc-card);
  box-shadow:0 12px 30px rgba(7,25,54,.055);
}

.housing-cost-card,
.housing-size-card{
  background:linear-gradient(180deg,#fff,#fbf8f2);
}

.section-title-block{
  margin:0 0 16px;
}

.section-title-block h2,
.section-card > h2,
.housing-cost-head h2,
.housing-size-card h2,
.housing-repartition-card h2,
.compare-section-head h2{
  margin:0;
  color:var(--sc-ink);
  font-size:clamp(19px,2vw,24px);
  line-height:1.18;
  font-weight:900;
  letter-spacing:-.02em;
}

.section-title-block p,
.insight-subtitle{
  margin:6px 0 0;
  color:var(--sc-muted);
  font-size:13px;
  line-height:1.45;
  font-weight:700;
}

/* Ancienneté d'installation : indicateur type référence */
.tenure-section{
  padding:22px 24px;
  background:#fff;
}

.tenure-indicator{
  margin-top:18px;
  max-width:920px;
}

.tenure-labels,
.tenure-values{
  display:flex;
  align-items:center;
  width:100%;
}

.tenure-labels span{
  display:flex;
  justify-content:center;
  text-align:center;
  color:#0f234f;
  font-size:12px;
  line-height:1.2;
  font-weight:900;
  white-space:nowrap;
}

.tenure-track{
  display:flex;
  overflow:hidden;
  height:24px;
  margin:12px 0 14px;
  border-radius:5px;
  background:#d9e8eb;
  box-shadow:inset 0 0 0 1px rgba(15,35,79,.04);
}

.tenure-track span{
  display:block;
  height:100%;
}

.tenure-seg-1{background:#6ab7e7;}
.tenure-seg-2{background:#33a9bd;}
.tenure-seg-3{background:#4fb5ad;}
.tenure-seg-4{background:#cfe1e4;}

.tenure-values strong{
  display:flex;
  justify-content:center;
  text-align:center;
  color:#102a5c;
  font-size:17px;
  line-height:1;
  font-weight:900;
}

.tenure-analysis{
  margin-top:22px;
  padding-left:12px;
}

.tenure-analysis strong{
  display:block;
  margin-bottom:7px;
  color:#2f9d46;
  font-size:14px;
  font-weight:900;
}

.tenure-analysis p{
  margin:0;
  max-width:760px;
  color:#1f2f55;
  font-size:14px;
  line-height:1.65;
  font-weight:650;
}

/* Comparaison France : carte harmonisée après ancienneté */
.france-compare-section{
  background:linear-gradient(180deg,#ffffff,#f8fbff);
}

.compare-section-head{
  margin-bottom:18px;
}

.compare-row{
  border-radius:16px;
  background:#fff;
  box-shadow:0 6px 18px rgba(7,25,54,.04);
}

.compare-row h3{
  color:#102a5c;
  font-weight:900;
}

/* FAQ moderne */
.faq details{
  padding:16px 0;
  border-top:1px solid #e7edf5;
}

.faq details:first-of-type{
  border-top:0;
}

.faq summary{
  color:#0f234f;
  font-size:15px;
  font-weight:900;
}

.faq p{
  margin:10px 0 0;
  color:#344260;
  line-height:1.65;
}

@media(max-width:760px){
  .tenure-labels span,
  .tenure-values strong{
    font-size:11px;
  }

  .tenure-track{
    height:20px;
  }

  .tenure-analysis{
    padding-left:0;
  }
}

@media(max-width:520px){
  .tenure-labels span{
    white-space:normal;
  }
}


/* ===== Harmonisation UI v5 : titres et alternance de fonds ===== */

:root{
  --sc-block-blue:#f7fbff;
  --sc-block-green:#f8fcf6;
  --sc-card-border:#dfe7f2;
  --sc-heading:#102a5c;
  --sc-muted:#5f6f8d;
}

/* Format de titre harmonisé sur le modèle "Les logements sont-ils récents ?" */
.content-card > section h2,
.insight-card h2,
.section-title-block h2,
.housing-cost-head h2,
.housing-size-card h2,
.housing-repartition-card h2,
.compare-section-head h2,
.local-comparator-head h2{
  margin:0 0 8px;
  font-size:clamp(22px,2.2vw,24px);
  line-height:1.18;
  letter-spacing:-.02em;
  font-weight:900;
  color:var(--sc-heading);
}

.housing-cost-head,
.compare-section-head,
.local-comparator-head{
  align-items:flex-start;
}

.housing-cost-head h2,
.compare-section-head h2,
.local-comparator-head h2{
  margin-bottom:0;
}

.section-title-block{
  margin:0 0 16px;
}

.section-title-block p,
.housing-repartition-card > p,
.section-card > p,
.logement-subtitle{
  color:var(--sc-muted);
}

/* Base commune pour les grands blocs éditoriaux */
.content-card > section.section-card,
.content-card > section.housing-cost-card,
.content-card > section.housing-repartition-card,
.content-card > section.housing-size-card,
.content-card > section.housing-insights-grid,
.content-card > section.classement-commune-card{
  border:1px solid var(--sc-card-border);
  border-radius:18px;
  box-shadow:0 10px 28px rgba(7,25,54,.045);
}

/* Alternance claire : bleu très léger / vert très léger */
.content-card > section:nth-of-type(odd):not(.commune-search-block):not(.logement-top):not(.sources){
  background:linear-gradient(180deg,var(--sc-block-blue),#fff);
}

.content-card > section:nth-of-type(even):not(.commune-search-block):not(.logement-top):not(.sources){
  background:linear-gradient(180deg,var(--sc-block-green),#fff);
}

/* Les sous-cartes restent blanches pour préserver le contraste */
.content-card > section .hero-kpi,
.content-card > section .market-kpi-card,
.content-card > section .repartition-donut-card,
.content-card > section .repartition-analysis-card,
.content-card > section .room-size-card,
.content-card > section .insight-card,
.content-card > section .compare-row,
.content-card > section .room-size-analysis,
.content-card > section .housing-size-analysis,
.content-card > section .compare-result,
.content-card > section details{
  background:#fff;
}

/* Le bloc des 3 cartes devient lui-même un vrai bloc alterné */
.housing-insights-grid{
  padding:22px;
  gap:18px;
}

/* Ancienneté : garde le style de l'indicateur avec le titre harmonisé */
.tenure-section{
  border-radius:18px;
  padding:22px 24px;
}

.tenure-section .section-title-block h2{
  margin-bottom:4px;
}

.tenure-section .section-title-block p{
  margin:0;
  font-size:13px;
  font-weight:700;
}

/* FAQ plus lisible et SEO-friendly */
.faq details{
  border:1px solid #e5eaf2;
  border-radius:14px;
  padding:14px 16px;
  margin:10px 0;
  background:#fff;
}

.faq summary{
  font-weight:900;
  color:#102a5c;
}

.faq details p{
  margin:10px 0 0;
  color:#334155;
  line-height:1.55;
}

/* Cohérence mobile */
@media(max-width:760px){
  .content-card > section h2,
  .insight-card h2,
  .section-title-block h2,
  .housing-cost-head h2,
  .housing-size-card h2,
  .housing-repartition-card h2,
  .compare-section-head h2,
  .local-comparator-head h2{
    font-size:21px;
  }

  .housing-insights-grid{
    padding:16px;
  }
}

/* ===== Correctif v7 : pourcentages arrondis à 100% ===== */
.repartition-dot.grey{background:#94a3b8;}
.repartition-donut-occupation{
  background:conic-gradient(
    #508f3f 0 calc(var(--a) * 1%),
    #f28b20 calc(var(--a) * 1%) calc((var(--a) + var(--b)) * 1%),
    #94a3b8 calc((var(--a) + var(--b)) * 1%) 100%
  );
}


/* ===== Correctif v8 : densité + titres plus modernes ===== */

/* Titres de blocs : police système moderne, moins grasse, plus éditoriale */
.content-card > section h2,
.insight-card h2,
.section-title-block h2,
.housing-cost-head h2,
.housing-size-card h2,
.housing-repartition-card h2,
.compare-section-head h2,
.local-comparator-head h2,
.classement-main h2{
  font-family:"Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight:520;
  font-size:clamp(22px,2.15vw,25px);
  line-height:1.16;
  letter-spacing:-.035em;
  color:#0b1f44;
}

/* Les titres internes restent lisibles mais moins massifs */
.compare-row h3,
.repartition-donut-card h3,
.room-size-analysis strong,
.insight-analysis strong,
.tenure-analysis strong,
.repartition-analysis-card strong{
  font-family:"Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight:560;
  letter-spacing:-.015em;
}

/* FAQ : questions moins grasses, plus modernes */
.faq summary{
  font-family:"Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight:560;
  letter-spacing:-.01em;
}

/* Petits écrans : conserver une hiérarchie douce */
@media(max-width:760px){
  .content-card > section h2,
  .insight-card h2,
  .section-title-block h2,
  .housing-cost-head h2,
  .housing-size-card h2,
  .housing-repartition-card h2,
  .compare-section-head h2,
  .local-comparator-head h2,
  .classement-main h2{
    font-size:21px;
    font-weight:540;
  }
}


/* ===== Correctif v9 : retour au style initial du titre "Les logements sont-ils récents ?" ===== */
/* Style appliqué à tous les titres principaux de blocs */
.content-card > section h2,
.insight-card h2,
.section-title-block h2,
.section-card > h2,
.housing-cost-head h2,
.housing-size-card h2,
.housing-repartition-card h2,
.compare-section-head h2,
.local-comparator-head h2,
.classement-main h2{
  margin:0 0 6px;
  font-family:inherit;
  font-size:24px;
  line-height:1.18;
  font-weight:700;
  letter-spacing:0;
  color:#102a5c;
}

/* Sous-titres / accroches sous les titres */
.section-title-block p,
.insight-subtitle,
.housing-repartition-card > p,
.section-card > p{
  margin:6px 0 0;
  color:#5f6f8d;
  font-size:14px;
  line-height:1.45;
  font-weight:400;
}

/* Titre des sous-cartes : hiérarchie plus discrète */
.repartition-donut-card h3,
.compare-row h3{
  color:#102a5c;
  font-weight:700;
  letter-spacing:0;
}

/* FAQ : conserver une lecture claire sans excès de graisse */
.faq summary{
  color:#102a5c;
  font-weight:700;
  letter-spacing:0;
}

/* Mobile */
@media(max-width:760px){
  .content-card > section h2,
  .insight-card h2,
  .section-title-block h2,
  .section-card > h2,
  .housing-cost-head h2,
  .housing-size-card h2,
  .housing-repartition-card h2,
  .compare-section-head h2,
  .local-comparator-head h2,
  .classement-main h2{
    font-size:22px;
  }
}


/* ===== Correctif v10 : vrai retour au premier style retravaillé du bloc "Les logements sont-ils récents ?" ===== */
/* Reprend le rendu éditorial v4 : titre compact, bleu nuit, très net, avec léger resserrement typographique. */
.content-card > section h2,
.insight-card h2,
.section-title-block h2,
.section-card > h2,
.housing-cost-head h2,
.housing-size-card h2,
.housing-repartition-card h2,
.compare-section-head h2,
.local-comparator-head h2,
.classement-main h2{
  margin:0;
  font-family:inherit;
  color:#071936;
  font-size:clamp(19px,2vw,24px);
  line-height:1.18;
  font-weight:900;
  letter-spacing:-.02em;
}

/* Sous-titres associés au même style */
.section-title-block p,
.insight-subtitle,
.housing-repartition-card > p,
.section-card > p{
  margin:6px 0 0;
  color:#5f6f8d;
  font-size:13px;
  line-height:1.45;
  font-weight:700;
}

/* Titres internes de cartes : même esprit, mais légèrement plus petits */
.repartition-donut-card h3,
.compare-row h3{
  color:#1f2f55;
  font-weight:900;
  letter-spacing:-.01em;
}

.faq summary{
  color:#0f234f;
  font-weight:900;
  letter-spacing:-.01em;
}

@media(max-width:760px){
  .content-card > section h2,
  .insight-card h2,
  .section-title-block h2,
  .section-card > h2,
  .housing-cost-head h2,
  .housing-size-card h2,
  .housing-repartition-card h2,
  .compare-section-head h2,
  .local-comparator-head h2,
  .classement-main h2{
    font-size:21px;
  }
}


/* ===== Correctif v11 : style exact du titre "Les logements sont-ils récents ?" sur tous les blocs ===== */
/* Titre principal des blocs */
.content-card > section h2,
.insight-card h2,
.section-title-block h2,
.section-card > h2,
.housing-cost-head h2,
.housing-size-card h2,
.housing-repartition-card h2,
.compare-section-head h2,
.local-comparator-head h2,
.classement-main h2{
  margin:0 0 6px;
  font-family:inherit;
  font-size:24px;
  line-height:1.18;
  font-weight:inherit;
  letter-spacing:0;
  color:#102a5c;
}

/* Sous-titre des blocs, aligné sur .insight-subtitle */
.section-title-block p,
.insight-subtitle,
.housing-repartition-card > p,
.section-card > p,
.compare-section-head p,
.local-comparator-head p{
  margin:0 0 14px;
  font-size:14px;
  line-height:1.45;
  font-weight:inherit;
  color:#5f6f8d;
}

/* Texte d'analyse harmonisé avec le style du bloc initial */
.insight-analysis{
  margin-top:14px;
}

.insight-analysis strong,
.repartition-analysis-card strong,
.room-size-analysis strong,
.tenure-analysis strong{
  display:block;
  margin-bottom:6px;
  color:#3c8f2f;
  font-size:15px;
  font-weight:inherit;
}

.insight-analysis p,
.repartition-analysis-card p,
.room-size-analysis p,
.tenure-analysis p{
  margin:0;
  font-size:14px;
  line-height:1.58;
  font-weight:inherit;
  color:#23324f;
}

/* Titres secondaires de cartes : même couleur, hiérarchie plus discrète */
.compare-row h3,
.repartition-donut-card h3{
  color:#102a5c;
  font-weight:inherit;
  letter-spacing:0;
}

/* Mobile */
@media(max-width:760px){
  .content-card > section h2,
  .insight-card h2,
  .section-title-block h2,
  .section-card > h2,
  .housing-cost-head h2,
  .housing-size-card h2,
  .housing-repartition-card h2,
  .compare-section-head h2,
  .local-comparator-head h2,
  .classement-main h2{
    font-size:22px;
  }
}


/* ===== Correctif v12 : respiration des titres + bloc sources détaillé ===== */

/* Le style des titres reste celui demandé, mais les blocs respirent mieux */
.content-card > section h2,
.insight-card h2,
.section-title-block h2,
.section-card > h2,
.housing-cost-head h2,
.housing-size-card h2,
.housing-repartition-card h2,
.compare-section-head h2,
.local-comparator-head h2,
.classement-main h2{
  margin:0 0 6px;
  font-family:inherit;
  font-size:24px;
  line-height:1.18;
  font-weight:inherit;
  letter-spacing:0;
  color:#102a5c;
}

/* Espace entre le titre d'un bloc et son contenu */
.section-title-block{
  margin:0 0 20px;
}

.section-card > h2{
  margin-bottom:18px;
}

/* Cas signalé : le titre "Profil logement de la commune" ne colle plus aux vignettes */
.section-card > h2 + .badge-list{
  margin-top:0;
}

.badge-list{
  margin-top:0;
  margin-bottom:16px;
}

/* En-têtes de blocs avec actions / toggle */
.housing-cost-head,
.compare-section-head,
.local-comparator-head{
  margin-bottom:20px;
}

/* Blocs sans .section-title-block */
.housing-repartition-card > h2,
.housing-size-card > h2{
  margin-bottom:18px;
}

/* Sous-titres plus lisibles sous les titres */
.section-title-block p,
.insight-subtitle,
.housing-repartition-card > p,
.section-card > p,
.compare-section-head p,
.local-comparator-head p{
  margin:0 0 14px;
  font-size:14px;
  line-height:1.45;
  font-weight:inherit;
  color:#5f6f8d;
}

/* Sources détaillées en bas de page */
.sources-section{
  margin:34px 0 0;
  padding:24px;
  border:1px solid #dfe7f2;
  border-radius:18px;
  background:linear-gradient(180deg,#f8fbff,#ffffff);
  box-shadow:0 10px 28px rgba(7,25,54,.045);
  color:#23324f;
}

.sources-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

.sources-grid article{
  padding:14px 16px;
  border:1px solid #e5eaf2;
  border-radius:14px;
  background:#fff;
}

.sources-grid strong{
  display:block;
  margin-bottom:6px;
  color:#102a5c;
  font-size:14px;
  line-height:1.25;
  font-weight:700;
}

.sources-grid span{
  display:block;
  color:#44516c;
  font-size:13px;
  line-height:1.5;
}

.sources-note{
  margin:16px 0 0;
  padding:12px 14px;
  border-radius:14px;
  background:#f0fdf4;
  border:1px solid #d8f3df;
  color:#24513a;
  font-size:13px;
  line-height:1.55;
}

@media(max-width:760px){
  .content-card > section h2,
  .insight-card h2,
  .section-title-block h2,
  .section-card > h2,
  .housing-cost-head h2,
  .housing-size-card h2,
  .housing-repartition-card h2,
  .compare-section-head h2,
  .local-comparator-head h2,
  .classement-main h2{
    font-size:22px;
  }

  .sources-grid{
    grid-template-columns:1fr;
  }

  .sources-section{
    padding:18px;
  }
}


/* ===== Correctif v13 : titres plus visibles + légende voiture plus compacte ===== */

/* Titres principaux : retour à un rendu proche de la v9, plus visible */
.content-card > section h2,
.insight-card h2,
.section-title-block h2,
.section-card > h2,
.housing-cost-head h2,
.housing-size-card h2,
.housing-repartition-card h2,
.compare-section-head h2,
.local-comparator-head h2,
.classement-main h2{
  margin:0 0 14px;
  font-family:inherit;
  font-size:clamp(24px,2.35vw,28px);
  line-height:1.14;
  font-weight:700;
  letter-spacing:-.015em;
  color:#102a5c;
}

/* Quand un titre est suivi d'un sous-titre, on garde une respiration plus naturelle */
.section-title-block h2{
  margin-bottom:6px;
}

.section-title-block{
  margin-bottom:22px;
}

.section-title-block p,
.insight-subtitle,
.housing-repartition-card > p,
.section-card > p,
.compare-section-head p,
.local-comparator-head p{
  color:#5f6f8d;
  font-size:14px;
  line-height:1.45;
}

/* Bloc voiture : légende plus compacte, alignée et agréable à lire */
.car-layout{
  grid-template-columns:128px minmax(0,1fr);
  gap:16px;
  align-items:center;
}

.car-legend{
  display:grid;
  gap:7px;
  align-content:center;
}

.legend-item{
  display:grid;
  grid-template-columns:12px minmax(0,1fr) auto;
  gap:8px;
  align-items:center;
  min-height:auto;
  font-size:14px;
  line-height:1.25;
  color:#20345c;
}

.legend-dot{
  width:11px;
  height:11px;
}

.legend-item span:not(.legend-dot){
  line-height:1.25;
  font-weight:500;
}

.legend-item strong{
  font-size:14px;
  line-height:1.2;
  font-weight:700;
  color:#102a5c;
  white-space:nowrap;
}

/* Évite que "Deux voitures ou +" occupe trop de hauteur */
.car-legend .legend-item span:not(.legend-dot){
  max-width:112px;
}

@media(max-width:700px){
  .car-layout{
    grid-template-columns:1fr;
    justify-items:center;
  }

  .car-legend{
    width:100%;
    max-width:320px;
  }

  .car-legend .legend-item span:not(.legend-dot){
    max-width:none;
  }
}

@media(max-width:760px){
  .content-card > section h2,
  .insight-card h2,
  .section-title-block h2,
  .section-card > h2,
  .housing-cost-head h2,
  .housing-size-card h2,
  .housing-repartition-card h2,
  .compare-section-head h2,
  .local-comparator-head h2,
  .classement-main h2{
    font-size:23px;
  }
}


/* ===== Correctif v14 : mobile hero + SEO commune + tableau limitrophes + maillage ===== */

/* Mobile : 5 cartes du premier bloc plus lisibles, avec 2 cartes par ligne */
@media(max-width:760px){
  .logement-top{
    gap:22px;
  }

  .hero-kpi-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:12px!important;
  }

  .hero-kpi{
    min-height:148px;
    padding:18px 10px 16px;
    border-radius:16px;
  }

  .hero-kpi-icon{
    width:48px;
    height:48px;
    margin:0 auto 12px;
  }

  .hero-kpi-icon svg{
    width:48px;
    height:48px;
    stroke-width:1.55;
  }

  .hero-kpi strong{
    font-size:clamp(25px,8vw,32px)!important;
    line-height:1;
    font-weight:750;
  }

  .hero-kpi span{
    font-size:15px;
    line-height:1.25;
    font-weight:750;
  }
}

@media(max-width:360px){
  .hero-kpi-grid{
    grid-template-columns:1fr!important;
  }
}

/* Description SEO visible sous le sous-titre principal */
.logement-quick-insight{
  margin:14px 0 16px;
  padding:14px 16px;
  max-width:900px;
  border:1px solid #dbe7f8;
  border-radius:16px;
  background:linear-gradient(180deg,#f8fbff,#ffffff);
  color:#102a5c;
  font-size:16px;
  line-height:1.55;
  font-weight:650;
  box-shadow:0 8px 22px rgba(7,25,54,.045);
}

/* Mini tableau communes limitrophes */
.nearby-market-section{
  overflow:hidden;
}

.nearby-market-head{
  align-items:flex-start;
}

.nearby-market-table-wrap{
  width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  border:1px solid #e2e8f0;
  border-radius:16px;
  background:#fff;
}

.nearby-market-table{
  width:100%;
  min-width:720px;
  border-collapse:separate;
  border-spacing:0;
}

.nearby-market-table th,
.nearby-market-table td{
  padding:14px 16px;
  text-align:left;
  border-bottom:1px solid #edf2f7;
  vertical-align:middle;
  font-size:14px;
}

.nearby-market-table th{
  color:#5f6f8d;
  font-size:12px;
  line-height:1.2;
  font-weight:850;
  text-transform:uppercase;
  letter-spacing:.035em;
  background:#f8fbff;
}

.nearby-market-table tr:last-child td{
  border-bottom:0;
}

.nearby-market-table td:not(:first-child){
  white-space:nowrap;
  color:#102a5c;
  font-weight:750;
}

.nearby-market-table a{
  color:#102a5c;
  font-weight:850;
  text-decoration:none;
}

.nearby-market-table a:hover{
  color:#075bd8;
}

.nearby-market-row.is-current td{
  background:#f0fdf4;
}

.current-pill{
  display:inline-flex;
  margin-left:8px;
  padding:3px 8px;
  border-radius:999px;
  background:#dcfce7;
  color:#166534;
  font-size:11px;
  font-weight:850;
}

/* Maillage SEO en bas de page */
.seo-links-section{
  margin-top:28px;
}

.seo-links-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}

.seo-link-group{
  padding:18px;
  border:1px solid #e2e8f0;
  border-radius:16px;
  background:#fff;
}

.seo-link-group h3{
  margin:0 0 12px;
  color:#102a5c;
  font-size:17px;
  line-height:1.25;
  font-weight:800;
}

.seo-link-list{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.seo-link-list a{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:8px 11px;
  border:1px solid #e2e8f0;
  border-radius:999px;
  background:#f8fbff;
  color:#102a5c;
  font-size:13px;
  line-height:1;
  font-weight:750;
  text-decoration:none;
}

.seo-link-list a:hover{
  border-color:#bfdbfe;
  background:#eff6ff;
  color:#075bd8;
}

.seo-link-list small{
  color:#64748b;
  font-size:11px;
  font-weight:700;
}

@media(max-width:760px){
  .logement-quick-insight{
    font-size:15px;
    padding:13px 14px;
  }

  .seo-links-grid{
    grid-template-columns:1fr;
  }

  .nearby-market-table th,
  .nearby-market-table td{
    padding:12px 13px;
  }
}


/* ===== v20 revenus, géolocalisation, tendances prix ===== */
.hero-kpi-income{ display:none; }

.price-trend{
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin-top:6px;
  padding:5px 9px;
  border-radius:999px;
  font-size:12px;
  font-weight:850;
  width:max-content;
}
.price-trend[hidden]{ display:none!important; }
.price-trend-arrow{ font-size:16px; line-height:1; }
.trend-up{ background:#dcfce7; color:#166534; }
.trend-down{ background:#fee2e2; color:#b91c1c; }
.trend-flat{ background:#dbeafe; color:#1d4ed8; }

.income-section{ margin-top:28px; }
.income-layout{
  display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(260px,.9fr) minmax(260px,.9fr);
  gap:18px;
  align-items:stretch;
}
.income-chart-card,
.income-analysis-card,
.income-calculator-card{
  border:1px solid #e2e8f0;
  border-radius:18px;
  background:#fff;
  padding:18px;
  box-shadow:0 10px 28px rgba(7,25,54,.045);
}
.income-chart-card h3,
.income-calculator-card h3{
  margin:0 0 14px;
  color:#102a5c;
  font-size:17px;
  line-height:1.25;
  font-weight:850;
}
.income-bars{ display:grid; gap:13px; }
.income-bar-row{
  display:grid;
  grid-template-columns:minmax(110px,150px) minmax(0,1fr) auto;
  gap:12px;
  align-items:center;
}
.income-bar-label{ color:#20345c; font-size:14px; font-weight:800; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.income-bar-track{ height:14px; border-radius:999px; background:#eef4fb; overflow:hidden; }
.income-bar-fill{ display:block; height:100%; border-radius:999px; }
.income-bar-fill.commune{ background:#2563eb; }
.income-bar-fill.departement{ background:#14b8a6; }
.income-bar-fill.france{ background:#94a3b8; }
.income-bar-row strong{ color:#102a5c; font-size:14px; font-weight:850; white-space:nowrap; }
.income-analysis-card strong{ display:block; margin-bottom:8px; color:#102a5c; font-size:16px; font-weight:900; }
.income-analysis-card p{ margin:0; color:#20345c; font-size:14px; line-height:1.55; }
.income-calculator-form{ display:grid; gap:10px; }
.income-calculator-form label{ display:grid; gap:6px; color:#5f6f8d; font-size:12px; font-weight:850; text-transform:uppercase; letter-spacing:.035em; }
.income-calculator-form input{
  width:100%;
  border:1px solid #dbe7f8;
  border-radius:12px;
  background:#f8fbff;
  color:#102a5c;
  font-size:15px;
  font-weight:750;
  padding:11px 12px;
  outline:none;
}
.income-calculator-form input:focus{ border-color:#93c5fd; box-shadow:0 0 0 3px rgba(37,99,235,.12); }
.income-calculator-result{
  margin-top:14px;
  padding:14px;
  border-radius:16px;
  background:linear-gradient(180deg,#eff6ff,#fff);
  border:1px solid #dbeafe;
  display:grid;
  gap:4px;
}
.income-calculator-result span{ color:#5f6f8d; font-size:12px; font-weight:850; text-transform:uppercase; letter-spacing:.035em; }
.income-calculator-result strong{ color:#075bd8; font-size:26px; line-height:1.1; font-weight:900; }
.income-calculator-result small{ color:#64748b; font-size:12px; line-height:1.35; }
.search-only-card{ min-height:45vh; display:grid; align-items:center; }
.search-only-note{ margin:12px 0 0; color:#5f6f8d; font-size:14px; line-height:1.45; }

@media(max-width:980px){
  .income-layout{ grid-template-columns:1fr; }
}

@media(max-width:760px){
  .hero-kpi-income{ display:flex; }
  .nearby-market-row.is-current td:first-child{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    gap:6px;
  }
  .nearby-market-row.is-current .current-pill{ margin-left:0; }
  .income-bar-row{ grid-template-columns:1fr; gap:7px; }
  .income-bar-row strong{ justify-self:start; }
}


/* ===== v21 : bloc revenu médian + comparateur local ===== */
.local-comparator-premium{
  background:linear-gradient(180deg,#f6f0ff 0%, #fbf8ff 100%);
  border-color:#e4d8fb;
  box-shadow:0 16px 36px rgba(97,59,194,.10);
}
.local-comparator-premium .local-comparator-head h2{
  color:#47207c;
}
.local-comparator-premium .compare-result{
  border-color:#e6dafc;
  background:rgba(255,255,255,.92);
}
.local-comparator-premium .verdict{
  background:linear-gradient(180deg,#faf5ff,#ffffff);
  border-color:#eadbff;
}

.income-layout-enhanced{
  grid-template-columns:minmax(0,1.25fr) minmax(280px,.82fr) minmax(280px,.92fr);
  align-items:stretch;
}
.income-neon-card{
  background:linear-gradient(180deg,#08142e 0%, #050d22 100%);
  border-color:#18284c;
  color:#eef4ff;
  position:relative;
  overflow:hidden;
}
.income-neon-card::before{
  content:"";
  position:absolute;
  inset:auto -10% -24% auto;
  width:220px;
  height:220px;
  background:radial-gradient(circle, rgba(160,255,73,.12), rgba(160,255,73,0));
  pointer-events:none;
}
.income-neon-card::after{
  content:"";
  position:absolute;
  inset:8% auto auto 28%;
  width:240px;
  height:240px;
  background:radial-gradient(circle, rgba(195,73,255,.12), rgba(195,73,255,0));
  pointer-events:none;
}
.income-neon-card h3{
  color:#f2f6ff;
  margin-bottom:18px;
}
.income-neon-chart{
  position:relative;
  min-height:420px;
  padding:42px 20px 16px 48px;
}
.income-neon-axis-title{
  position:absolute;
  left:0;
  top:0;
  color:#94a8d8;
  font-size:14px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.income-neon-grid{
  position:absolute;
  inset:78px 10px 86px 44px;
  display:grid;
  grid-template-rows:repeat(4,1fr);
  pointer-events:none;
}
.income-neon-grid span{
  border-top:1px dashed rgba(97,130,194,.28);
}
.income-neon-grid span:last-child{
  border-bottom:2px solid rgba(77,153,255,.45);
}
.income-neon-columns{
  position:relative;
  z-index:2;
  height:100%;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  align-items:end;
  gap:44px;
}
.income-neon-col{
  display:grid;
  grid-template-rows:auto 240px auto;
  align-items:end;
  justify-items:center;
  gap:16px;
}
.income-neon-value{
  text-align:center;
  min-height:84px;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
}
.income-neon-value strong{
  display:block;
  font-size:clamp(24px,2.3vw,34px);
  line-height:1.04;
  font-weight:900;
  white-space:nowrap;
  letter-spacing:.01em;
}
.income-neon-value span{
  display:block;
  margin-top:6px;
  color:#d9e6ff;
  font-size:14px;
  font-weight:700;
}
.income-neon-bar-wrap{
  width:100%;
  max-width:150px;
  height:240px;
  display:flex;
  align-items:flex-end;
  justify-content:center;
}
.income-neon-bar{
  display:block;
  width:min(78%,140px);
  min-height:18%;
  border-radius:18px 18px 12px 12px;
  box-shadow:0 0 0 2px rgba(255,255,255,.18) inset, 0 0 18px currentColor;
}
.income-neon-col-commune .income-neon-bar{
  color:#2ed1ff;
  background:linear-gradient(180deg,#39d7ff 0%, #1961ff 100%);
}
.income-neon-col-departement .income-neon-bar{
  color:#d66bff;
  background:linear-gradient(180deg,#e870ff 0%, #6e2dff 100%);
}
.income-neon-col-france .income-neon-bar{
  color:#b8ff42;
  background:linear-gradient(180deg,#ccff39 0%, #66c51e 100%);
}
.income-neon-col-commune .income-neon-value strong,
.income-neon-col-commune .income-neon-label{ color:#37cfff; }
.income-neon-col-departement .income-neon-value strong,
.income-neon-col-departement .income-neon-label{ color:#d96cff; }
.income-neon-col-france .income-neon-value strong,
.income-neon-col-france .income-neon-label{ color:#b8f63a; }
.income-neon-label{
  text-align:center;
  font-size:18px;
  line-height:1.2;
  font-weight:800;
  max-width:170px;
  text-wrap:balance;
}

.income-analysis-card-premium{
  background:linear-gradient(180deg,#f3fbf4 0%, #eef8f1 100%);
  border-color:#dcefdc;
}
.income-analysis-card-premium strong{
  color:#72a82d;
  font-size:32px;
  line-height:1.05;
  font-weight:500;
  letter-spacing:-.02em;
  margin-bottom:14px;
}
.income-analysis-card-premium p{
  color:#112650;
  font-size:16px;
  line-height:1.8;
  font-weight:500;
  margin:0;
}
.income-analysis-card-premium p strong{
  display:inline;
  margin:0;
  font-size:inherit;
  line-height:inherit;
  color:#102a5c;
  font-weight:850;
}

@media(max-width:1180px){
  .income-layout-enhanced{
    grid-template-columns:1fr;
  }
  .income-neon-chart{
    min-height:330px;
  }
}
@media(max-width:760px){
  .income-neon-chart{
    min-height:300px;
    padding:34px 4px 6px 18px;
  }
  .income-neon-grid{
    inset:34px 0 64px 18px;
  }
  .income-neon-columns{
    gap:14px;
  }
  .income-neon-col{
    grid-template-rows:auto 180px auto;
  }
  .income-neon-bar-wrap,
  .income-neon-col{
    height:auto;
  }
  .income-neon-bar-wrap{height:180px;}
  .income-neon-value strong{font-size:24px;}
  .income-neon-value span{font-size:12px;}
  .income-neon-label{font-size:13px;}
  .income-analysis-card-premium strong{font-size:26px;}
  .income-analysis-card-premium p{font-size:15px;line-height:1.65;}
}

.income-definition-note{
  margin-top:14px !important;
  color:#7b869f !important;
  font-size:13px !important;
  line-height:1.6 !important;
}
.income-definition-note em{
  color:inherit;
}

@media(max-width:760px){
  .income-neon-chart{
    min-height:360px;
    padding:38px 12px 10px 18px;
  }
  .income-neon-grid{
    inset:84px 6px 72px 18px;
  }
  .income-neon-columns{
    gap:12px;
  }
  .income-neon-col{
    grid-template-rows:auto 170px auto;
    gap:10px;
  }
  .income-neon-value{
    min-height:72px;
  }
  .income-neon-value strong{font-size:20px;}
  .income-neon-value span{font-size:12px; margin-top:4px;}
  .income-neon-bar-wrap{height:170px; max-width:120px;}
  .income-neon-label{font-size:12px; line-height:1.15;}
}


/* ===== v23 : ajustements revenus mobile + comparateur logement ===== */

/* Le bloc ressort en violet clair, mais le titre garde la couleur standard des autres titres */
.local-comparator-premium{
  background:linear-gradient(180deg,#f8f3ff 0%, #fbf8ff 100%);
  border-color:#e6d8fb;
  box-shadow:0 16px 36px rgba(97,59,194,.10);
}
.local-comparator-premium .local-comparator-head h2{
  color:#102a5c!important;
}

/* Histogramme niveau de vie : version mobile plus respirante */
@media(max-width:760px){
  .income-neon-card{
    padding:16px 14px 18px;
  }

  .income-neon-card h3{
    font-size:16px;
    line-height:1.25;
    margin-bottom:16px;
  }

  .income-neon-chart{
    min-height:390px;
    padding:38px 8px 8px 14px;
  }

  .income-neon-grid{
    inset:92px 4px 82px 14px;
  }

  .income-neon-columns{
    gap:10px;
  }

  .income-neon-col{
    grid-template-rows:78px 172px 42px;
    gap:12px;
    min-width:0;
  }

  .income-neon-value{
    min-height:78px;
    width:100%;
    justify-content:flex-end;
    overflow:visible;
  }

  .income-neon-value strong{
    font-size:clamp(16px,5.2vw,20px);
    line-height:1.05;
    white-space:normal;
    overflow-wrap:anywhere;
    text-wrap:balance;
  }

  .income-neon-value span{
    font-size:11px;
    line-height:1.15;
    margin-top:5px;
  }

  .income-neon-bar-wrap{
    height:172px;
    max-width:96px;
  }

  .income-neon-bar{
    width:min(72%,76px);
    border-radius:14px 14px 10px 10px;
  }

  .income-neon-label{
    font-size:12px;
    line-height:1.15;
    max-width:96px;
    overflow-wrap:anywhere;
  }
}

/* Carte niveau de vie médian mobile : même structure que les autres KPI, tout en violet */
@media(max-width:760px){
  .hero-kpi-income{
    display:flex!important;
    min-height:148px;
    padding:18px 10px 16px;
    border-radius:16px;
  }

  .hero-kpi-income .hero-kpi-icon{
    width:48px;
    height:48px;
    margin:0 auto 12px;
    color:#7c3aed!important;
  }

  .hero-kpi-income .hero-kpi-icon svg{
    width:48px;
    height:48px;
    stroke-width:1.55;
  }

  .hero-kpi-income strong{
    display:block;
    color:#7c3aed!important;
    font-size:clamp(22px,7vw,30px)!important;
    line-height:1;
    font-weight:750;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    max-width:100%;
  }

  .hero-kpi-income span:not(.hero-kpi-icon){
    color:#7c3aed!important;
    font-size:15px;
    line-height:1.25;
    font-weight:750;
    text-align:center;
  }
}


/* ===== v24 : correction définitive carte revenu mobile + histogramme revenu ===== */

/* Carte mobile "Niveau de vie médian" : même composition que les autres KPI */
@media(max-width:760px){
  .hero-kpi-grid .hero-kpi.hero-kpi-income{
    display:flex!important;
    flex-direction:column!important;
    justify-content:center!important;
    align-items:center!important;
    gap:0!important;
    min-height:148px!important;
    padding:18px 10px 16px!important;
    text-align:center!important;
    overflow:hidden!important;
  }

  .hero-kpi-grid .hero-kpi.hero-kpi-income .hero-kpi-icon{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    flex:0 0 auto!important;
    width:48px!important;
    height:48px!important;
    margin:0 auto 12px!important;
    color:#7c3aed!important;
  }

  .hero-kpi-grid .hero-kpi.hero-kpi-income .hero-kpi-icon svg{
    width:48px!important;
    height:48px!important;
    stroke-width:1.55!important;
  }

  .hero-kpi-grid .hero-kpi.hero-kpi-income strong{
    display:block!important;
    flex:0 0 auto!important;
    width:100%!important;
    max-width:100%!important;
    margin:0 0 10px!important;
    color:#7c3aed!important;
    font-size:clamp(20px,6.8vw,30px)!important;
    line-height:1!important;
    font-weight:750!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    text-align:center!important;
  }

  .hero-kpi-grid .hero-kpi.hero-kpi-income > span:not(.hero-kpi-icon){
    display:block!important;
    flex:0 0 auto!important;
    width:100%!important;
    max-width:120px!important;
    margin:0 auto!important;
    color:#7c3aed!important;
    font-size:15px!important;
    line-height:1.15!important;
    font-weight:750!important;
    text-align:center!important;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
  }
}

/* Histogramme revenu : éviter tout chevauchement des valeurs, surtout mobile */
.income-neon-card{
  overflow:hidden!important;
}

.income-neon-chart{
  min-height:430px!important;
  padding:46px 22px 18px 48px!important;
}

.income-neon-grid{
  inset:120px 10px 90px 44px!important;
}

.income-neon-columns{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:48px!important;
  align-items:end!important;
}

.income-neon-col{
  min-width:0!important;
  display:grid!important;
  grid-template-rows:96px 230px 46px!important;
  gap:16px!important;
  align-items:end!important;
  justify-items:center!important;
}

.income-neon-value{
  min-height:96px!important;
  width:100%!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:flex-end!important;
  align-items:center!important;
  overflow:visible!important;
  text-align:center!important;
}

.income-neon-value strong{
  display:block!important;
  max-width:100%!important;
  font-size:clamp(20px,2.05vw,31px)!important;
  line-height:1.05!important;
  font-weight:900!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  text-wrap:balance!important;
  letter-spacing:.01em!important;
}

.income-neon-value span{
  margin-top:7px!important;
  font-size:13px!important;
  line-height:1.15!important;
}

.income-neon-bar-wrap{
  height:230px!important;
  max-width:130px!important;
}

.income-neon-bar{
  width:min(70%,108px)!important;
}

.income-neon-label{
  max-width:130px!important;
  font-size:16px!important;
  line-height:1.15!important;
  overflow-wrap:anywhere!important;
}

/* Sur mobile, on empile les 3 indicateurs en lignes horizontales pour supprimer le chevauchement */
@media(max-width:760px){
  .income-neon-card{
    padding:16px 14px 18px!important;
  }

  .income-neon-card h3{
    font-size:16px!important;
    line-height:1.25!important;
    margin-bottom:16px!important;
  }

  .income-neon-chart{
    min-height:auto!important;
    padding:0!important;
  }

  .income-neon-axis-title,
  .income-neon-grid{
    display:none!important;
  }

  .income-neon-columns{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:14px!important;
  }

  .income-neon-col{
    display:grid!important;
    grid-template-columns:minmax(78px,96px) minmax(0,1fr) minmax(82px,auto)!important;
    grid-template-rows:auto!important;
    gap:10px!important;
    align-items:center!important;
    justify-items:stretch!important;
    min-height:64px!important;
    padding:10px 11px!important;
    border:1px solid rgba(116,142,194,.22)!important;
    border-radius:16px!important;
    background:rgba(255,255,255,.055)!important;
  }

  .income-neon-value{
    grid-column:3!important;
    grid-row:1!important;
    min-height:0!important;
    align-items:flex-end!important;
    justify-content:center!important;
    text-align:right!important;
    width:auto!important;
  }

  .income-neon-value strong{
    font-size:18px!important;
    line-height:1.05!important;
    white-space:nowrap!important;
    overflow:visible!important;
    text-wrap:nowrap!important;
  }

  .income-neon-value span{
    font-size:11px!important;
    margin-top:3px!important;
  }

  .income-neon-bar-wrap{
    grid-column:2!important;
    grid-row:1!important;
    height:16px!important;
    max-width:none!important;
    width:100%!important;
    justify-content:flex-start!important;
    align-items:center!important;
    border-radius:999px!important;
    background:rgba(255,255,255,.09)!important;
    overflow:hidden!important;
  }

  .income-neon-bar{
    height:100%!important;
    min-height:100%!important;
    width:auto!important;
    max-width:100%!important;
    border-radius:999px!important;
    box-shadow:0 0 0 1px rgba(255,255,255,.16) inset, 0 0 12px currentColor!important;
  }

  .income-neon-label{
    grid-column:1!important;
    grid-row:1!important;
    max-width:96px!important;
    font-size:13px!important;
    line-height:1.15!important;
    text-align:left!important;
    justify-self:start!important;
  }
}


/* ===== v25 : mobile histogramme revenu retour vertical v23, sans chevauchement ===== */
/* Desktop garde les règles v24. On ne réécrit ici que le mobile. */
@media(max-width:760px){
  .income-neon-chart{
    min-height:370px!important;
    padding:38px 10px 10px 18px!important;
  }

  .income-neon-axis-title{
    display:block!important;
    position:absolute!important;
    left:0!important;
    top:0!important;
    color:#94a8d8!important;
    font-size:13px!important;
    font-weight:800!important;
    letter-spacing:.08em!important;
    text-transform:uppercase!important;
  }

  .income-neon-grid{
    display:grid!important;
    position:absolute!important;
    inset:96px 4px 70px 18px!important;
    grid-template-rows:repeat(4,1fr)!important;
    pointer-events:none!important;
  }

  .income-neon-columns{
    position:relative!important;
    z-index:2!important;
    height:100%!important;
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    align-items:end!important;
    gap:12px!important;
  }

  .income-neon-col{
    display:grid!important;
    grid-template-columns:1fr!important;
    grid-template-rows:72px 170px 38px!important;
    gap:10px!important;
    align-items:end!important;
    justify-items:center!important;
    min-height:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    min-width:0!important;
  }

  .income-neon-value{
    grid-column:1!important;
    grid-row:1!important;
    min-height:72px!important;
    width:100%!important;
    display:flex!important;
    flex-direction:column!important;
    justify-content:flex-end!important;
    align-items:center!important;
    text-align:center!important;
    overflow:visible!important;
  }

  .income-neon-value strong{
    display:block!important;
    max-width:none!important;
    width:auto!important;
    font-size:clamp(14px,4.7vw,18px)!important;
    line-height:1.05!important;
    font-weight:900!important;
    white-space:nowrap!important;
    overflow:visible!important;
    overflow-wrap:normal!important;
    text-wrap:nowrap!important;
    letter-spacing:-.02em!important;
  }

  .income-neon-value span{
    display:block!important;
    margin-top:4px!important;
    font-size:11px!important;
    line-height:1.1!important;
    white-space:nowrap!important;
  }

  .income-neon-bar-wrap{
    grid-column:1!important;
    grid-row:2!important;
    width:100%!important;
    max-width:96px!important;
    height:170px!important;
    display:flex!important;
    align-items:flex-end!important;
    justify-content:center!important;
    border-radius:0!important;
    background:transparent!important;
    overflow:visible!important;
  }

  .income-neon-bar{
    display:block!important;
    width:min(68%,72px)!important;
    max-width:72px!important;
    min-height:18%!important;
    border-radius:14px 14px 10px 10px!important;
    box-shadow:0 0 0 1px rgba(255,255,255,.16) inset, 0 0 12px currentColor!important;
  }

  .income-neon-label{
    grid-column:1!important;
    grid-row:3!important;
    max-width:96px!important;
    font-size:12px!important;
    line-height:1.15!important;
    text-align:center!important;
    justify-self:center!important;
    overflow-wrap:anywhere!important;
  }
}

@media(max-width:380px){
  .income-neon-columns{
    gap:8px!important;
  }

  .income-neon-value strong{
    font-size:13px!important;
    letter-spacing:-.04em!important;
  }

  .income-neon-bar-wrap{
    max-width:82px!important;
  }

  .income-neon-bar{
    width:min(66%,58px)!important;
  }

  .income-neon-label{
    font-size:11px!important;
    max-width:82px!important;
  }
}


/* ===== v26 : taille des logements mobile, valeur sur la même ligne ===== */
@media(max-width:620px){
  .room-legend-list{
    gap:9px!important;
  }

  .room-legend-row{
    grid-template-columns:11px minmax(0,1fr) max-content!important;
    gap:8px!important;
    align-items:center!important;
  }

  .room-legend-row strong{
    grid-column:auto!important;
    justify-self:end!important;
    text-align:right!important;
    white-space:nowrap!important;
    font-size:14px!important;
    font-weight:900!important;
    color:#0c2b66!important;
  }

  .room-legend-row em{
    font-style:normal!important;
    font-weight:900!important;
    color:#0c2b66!important;
  }

  .room-label{
    min-width:0!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }

  .room-size-main{
    gap:12px!important;
  }
}


/* ===== v27 : échelle fixe revenu + valeurs sur une ligne ===== */
/* Desktop : valeurs toujours sur une seule ligne, sans retour. */
.income-neon-value strong{
  white-space:nowrap!important;
  overflow:visible!important;
  text-wrap:nowrap!important;
  overflow-wrap:normal!important;
  font-size:clamp(18px,1.65vw,28px)!important;
  letter-spacing:-.025em!important;
}

/* Les barres utilisent la hauteur calculée dans le PHP sur l'échelle globale :
   min base = 20% de l'échelle, max base = 100%. */
.income-neon-bar{
  height:var(--bar-height)!important;
}

/* Mobile : retour au rendu vertical, avec barres proportionnelles. */
@media(max-width:760px){
  .income-neon-bar{
    height:var(--bar-height)!important;
    min-height:14%!important;
  }

  .income-neon-value strong{
    white-space:nowrap!important;
    overflow:visible!important;
    text-wrap:nowrap!important;
    overflow-wrap:normal!important;
    font-size:clamp(12px,4.2vw,16px)!important;
    letter-spacing:-.04em!important;
  }

  .income-neon-value{
    overflow:visible!important;
  }

  .income-neon-col{
    overflow:visible!important;
  }
}

@media(max-width:380px){
  .income-neon-value strong{
    font-size:12px!important;
    letter-spacing:-.055em!important;
  }
}


/* ===== v28 : liens communes extrêmes niveau de vie ===== */
.income-extremes-note{
  margin:14px 0 0!important;
  color:#112650;
  font-size:15px;
  line-height:1.7;
  font-weight:500;
}
.income-extremes-note a{
  color:#075bd8;
  font-weight:850;
  text-decoration:none;
  border-bottom:1px solid rgba(7,91,216,.25);
}
.income-extremes-note a:hover{
  color:#063f9e;
  border-bottom-color:rgba(6,63,158,.55);
}
@media(max-width:760px){
  .income-extremes-note{
    font-size:14px;
    line-height:1.6;
  }
}


/* ===== v29 : histogramme niveau de vie plus compact et valeurs mieux espacées ===== */

/* Desktop : bloc moins haut, valeurs plus petites et plus lisibles */
.income-neon-chart{
  min-height:350px!important;
  padding:38px 18px 14px 42px!important;
}

.income-neon-grid{
  inset:98px 10px 76px 40px!important;
}

.income-neon-columns{
  gap:58px!important;
}

.income-neon-col{
  grid-template-rows:68px 178px 38px!important;
  gap:14px!important;
  min-width:0!important;
}

.income-neon-value{
  min-height:68px!important;
  width:100%!important;
  align-items:center!important;
  overflow:visible!important;
}

.income-neon-value strong{
  font-size:clamp(18px,1.28vw,24px)!important;
  line-height:1.05!important;
  white-space:nowrap!important;
  overflow:visible!important;
  overflow-wrap:normal!important;
  text-wrap:nowrap!important;
  letter-spacing:-.055em!important;
  font-variant-numeric:tabular-nums!important;
  font-feature-settings:"tnum" 1;
}

.income-neon-value span{
  margin-top:5px!important;
  font-size:12px!important;
}

.income-neon-bar-wrap{
  height:178px!important;
  max-width:124px!important;
}

.income-neon-bar{
  width:min(68%,96px)!important;
}

.income-neon-label{
  font-size:15px!important;
  max-width:124px!important;
}

/* Tablette et largeur intermédiaire : éviter que les montants se touchent */
@media(min-width:761px) and (max-width:1180px){
  .income-neon-columns{
    gap:42px!important;
  }

  .income-neon-value strong{
    font-size:clamp(17px,2.2vw,24px)!important;
  }
}

/* Mobile : on garde 3 barres verticales mais on réduit fortement la hauteur inutile */
@media(max-width:760px){
  .income-neon-card{
    padding:16px 12px 16px!important;
  }

  .income-neon-card h3{
    font-size:15px!important;
    line-height:1.22!important;
    margin-bottom:14px!important;
  }

  .income-neon-chart{
    min-height:300px!important;
    padding:34px 8px 8px 14px!important;
  }

  .income-neon-axis-title{
    font-size:12px!important;
  }

  .income-neon-grid{
    inset:82px 4px 62px 14px!important;
  }

  .income-neon-columns{
    gap:14px!important;
  }

  .income-neon-col{
    grid-template-rows:58px 138px 34px!important;
    gap:9px!important;
  }

  .income-neon-value{
    min-height:58px!important;
  }

  .income-neon-value strong{
    font-size:clamp(13px,3.65vw,16px)!important;
    line-height:1.05!important;
    letter-spacing:-.075em!important;
    white-space:nowrap!important;
    overflow:visible!important;
    text-wrap:nowrap!important;
    font-variant-numeric:tabular-nums!important;
    font-feature-settings:"tnum" 1;
  }

  .income-neon-value span{
    font-size:10px!important;
    line-height:1.05!important;
    margin-top:4px!important;
  }

  .income-neon-bar-wrap{
    height:138px!important;
    max-width:82px!important;
  }

  .income-neon-bar{
    width:min(66%,58px)!important;
    border-radius:12px 12px 9px 9px!important;
  }

  .income-neon-label{
    max-width:82px!important;
    font-size:12px!important;
    line-height:1.12!important;
  }
}

/* Très petits mobiles : compression supplémentaire des montants */
@media(max-width:380px){
  .income-neon-columns{
    gap:10px!important;
  }

  .income-neon-value strong{
    font-size:12px!important;
    letter-spacing:-.09em!important;
  }

  .income-neon-bar-wrap{
    max-width:72px!important;
  }

  .income-neon-bar{
    width:min(64%,50px)!important;
  }
}


/* ===== v30 : bloc analyse niveau de vie sous graphique + calculateur ===== */
.income-layout-enhanced{
  display:grid!important;
  grid-template-columns:minmax(0,1.25fr) minmax(300px,.75fr)!important;
  grid-template-areas:
    "chart calculator"
    "analysis analysis"!important;
  gap:18px!important;
  align-items:stretch!important;
}

.income-layout-enhanced .income-neon-card{
  grid-area:chart!important;
}

.income-layout-enhanced .income-calculator-card{
  grid-area:calculator!important;
}

.income-layout-enhanced .income-analysis-card-premium{
  grid-area:analysis!important;
}

.income-analysis-card-premium{
  padding:20px 22px!important;
}

.income-analysis-card-premium p{
  max-width:1100px;
}

@media(max-width:980px){
  .income-layout-enhanced{
    grid-template-columns:1fr!important;
    grid-template-areas:
      "chart"
      "calculator"
      "analysis"!important;
  }
}


/* ===== v31 : comparaison commune / France au format barre premium ===== */
.france-compare-section{
  background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%)!important;
}

.france-compare-section .compare-bars{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:14px!important;
}

.france-compare-section .compare-row{
  position:relative;
  overflow:hidden;
  padding:18px 22px 16px!important;
  border:1px solid #dfe7f6!important;
  border-radius:22px!important;
  background:
    radial-gradient(circle at 85% 20%, rgba(126,58,242,.055), transparent 28%),
    linear-gradient(180deg,#ffffff 0%,#fbfdff 100%)!important;
  box-shadow:0 12px 28px rgba(15,35,79,.075)!important;
}

.france-compare-section .compare-row::before{
  content:"";
  position:absolute;
  left:0;
  top:18px;
  bottom:18px;
  width:3px;
  border-radius:999px;
  background:linear-gradient(180deg,#1f7aff,#bb37ff);
  opacity:.75;
}

.france-compare-section .compare-row h3{
  margin:0 0 12px!important;
  padding-bottom:10px;
  border-bottom:1px solid #edf2fb;
  color:#102a5c!important;
  font-size:clamp(20px,2vw,27px)!important;
  line-height:1.12!important;
  font-weight:900!important;
  letter-spacing:-.025em;
}

.france-compare-section .bar-line{
  display:grid!important;
  grid-template-columns:minmax(110px,170px) minmax(0,1fr) minmax(82px,118px)!important;
  align-items:center!important;
  gap:14px!important;
  margin:10px 0!important;
}

.france-compare-section .bar-line span{
  color:#08194a!important;
  font-size:16px!important;
  line-height:1.2!important;
  font-weight:900!important;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.france-compare-section .bar-track{
  position:relative!important;
  height:22px!important;
  border-radius:999px!important;
  background:linear-gradient(180deg,#f8fafc,#edf2f8)!important;
  border:2px solid #ffffff;
  box-shadow:
    inset 0 0 0 1px #e5ecf7,
    0 8px 18px rgba(15,35,79,.06)!important;
  overflow:hidden!important;
}

.france-compare-section .bar-fill{
  height:100%!important;
  border-radius:999px!important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.28),
    0 8px 18px rgba(26,201,106,.18)!important;
}

.france-compare-section .bar-fill.commune{
  background:linear-gradient(90deg,#73e50f 0%,#20cf77 100%)!important;
}

.france-compare-section .bar-fill.france{
  background:linear-gradient(90deg,#1597f5 0%,#9435f3 100%)!important;
}

.france-compare-section .bar-line strong{
  position:relative;
  color:#27c96d!important;
  font-size:clamp(22px,2.4vw,34px)!important;
  line-height:1!important;
  font-weight:950!important;
  letter-spacing:-.045em;
  text-align:right!important;
  white-space:nowrap!important;
}

.france-compare-section .bar-line strong::before{
  content:"";
  display:inline-block;
  width:18px;
  margin:0 10px 6px 0;
  border-top:3px dotted currentColor;
  opacity:.85;
  vertical-align:middle;
}

.france-compare-section .bar-line:nth-of-type(2) strong{
  color:#7b3ff0!important;
}

/* Loyer : bleu de la carte loyer vers bleu très foncé */
.france-compare-section .market-france-card[data-format="loyer"] .bar-fill.commune{
  background:linear-gradient(90deg,#1764d8 0%,#061936 100%)!important;
}

/* Prix d'achat : orange de la carte prix vers orange très foncé */
.france-compare-section .market-france-card[data-format="prix"] .bar-fill.commune{
  background:linear-gradient(90deg,#f36a21 0%,#6b2100 100%)!important;
}

/* Valeurs des cartes prix / loyers : plus sobres, mais même composition */
.france-compare-section .market-france-card .bar-line strong{
  font-size:clamp(18px,2vw,28px)!important;
  letter-spacing:-.035em;
}

.france-compare-section .market-france-card[data-format="loyer"] .bar-line:first-of-type strong{
  color:#1764d8!important;
}
.france-compare-section .market-france-card[data-format="prix"] .bar-line:first-of-type strong{
  color:#f36a21!important;
}

/* Réduction verticale générale */
.france-compare-section .market-france-card .compare-type-label{
  vertical-align:middle;
  transform:translateY(-2px);
}

@media(max-width:760px){
  .france-compare-section .compare-row{
    padding:15px 14px 14px!important;
    border-radius:18px!important;
  }

  .france-compare-section .compare-row h3{
    font-size:20px!important;
    margin-bottom:10px!important;
    padding-bottom:9px!important;
  }

  .france-compare-section .bar-line{
    grid-template-columns:minmax(76px,92px) minmax(0,1fr) minmax(66px,82px)!important;
    gap:9px!important;
    margin:9px 0!important;
  }

  .france-compare-section .bar-line span{
    font-size:13px!important;
  }

  .france-compare-section .bar-track{
    height:17px!important;
  }

  .france-compare-section .bar-line strong{
    font-size:20px!important;
    letter-spacing:-.04em;
  }

  .france-compare-section .bar-line strong::before{
    display:none;
  }

  .france-compare-section .market-france-card .bar-line strong{
    font-size:16px!important;
  }
}


/* ===== v32 : refonte structurelle du bloc "commune comparée à la France" ===== */
.france-compare-v32{
  background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%)!important;
}

.france-compare-v32 .compare-bars{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:12px!important;
}

.france-compare-v32 .compare-matrix-card{
  position:relative!important;
  overflow:hidden!important;
  padding:18px 22px 16px!important;
  border:1px solid #dfe7f6!important;
  border-radius:24px!important;
  background:
    radial-gradient(circle at 88% 18%, rgba(126,58,242,.05), transparent 30%),
    linear-gradient(180deg,#ffffff 0%,#fbfdff 100%)!important;
  box-shadow:0 12px 28px rgba(15,35,79,.07)!important;
}

.france-compare-v32 .compare-matrix-card::before{
  content:""!important;
  position:absolute!important;
  left:0!important;
  top:18px!important;
  bottom:18px!important;
  width:3px!important;
  border-radius:999px!important;
  background:linear-gradient(180deg,#1f7aff,#bb37ff)!important;
  opacity:.75!important;
}

.france-compare-v32 .compare-matrix-card h3{
  margin:0 0 12px!important;
  padding-bottom:10px!important;
  border-bottom:1px solid #edf2fb!important;
  color:#102a5c!important;
  font-size:clamp(20px,2vw,27px)!important;
  line-height:1.12!important;
  font-weight:950!important;
  letter-spacing:-.025em!important;
}

.france-compare-v32 .compare-matrix-lines{
  display:grid!important;
  gap:10px!important;
}

.france-compare-v32 .compare-matrix-line,
.france-compare-v32 .bar-line.compare-matrix-line{
  display:grid!important;
  grid-template-columns:minmax(110px,170px) minmax(0,1fr) minmax(82px,118px)!important;
  align-items:center!important;
  gap:14px!important;
  margin:0!important;
}

.france-compare-v32 .compare-matrix-name,
.france-compare-v32 .bar-line > span{
  color:#08194a!important;
  font-size:16px!important;
  line-height:1.2!important;
  font-weight:900!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}

.france-compare-v32 .compare-matrix-track,
.france-compare-v32 .bar-track{
  position:relative!important;
  height:22px!important;
  border-radius:999px!important;
  background:linear-gradient(180deg,#f8fafc,#edf2f8)!important;
  border:2px solid #ffffff!important;
  box-shadow:inset 0 0 0 1px #e5ecf7,0 8px 18px rgba(15,35,79,.06)!important;
  overflow:hidden!important;
}

.france-compare-v32 .compare-matrix-fill,
.france-compare-v32 .bar-fill{
  height:100%!important;
  border-radius:999px!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.28),0 8px 18px rgba(26,201,106,.18)!important;
}

.france-compare-v32 .bar-fill.commune{
  background:linear-gradient(90deg,#73e50f 0%,#20cf77 100%)!important;
}

.france-compare-v32 .bar-fill.france{
  background:linear-gradient(90deg,#1597f5 0%,#9435f3 100%)!important;
}

.france-compare-v32 .compare-matrix-value,
.france-compare-v32 .bar-line strong{
  position:relative!important;
  color:#27c96d!important;
  font-size:clamp(22px,2.4vw,34px)!important;
  line-height:1!important;
  font-weight:950!important;
  letter-spacing:-.045em!important;
  text-align:right!important;
  white-space:nowrap!important;
}

.france-compare-v32 .compare-matrix-value::before,
.france-compare-v32 .bar-line strong::before{
  content:""!important;
  display:inline-block!important;
  width:18px!important;
  margin:0 10px 6px 0!important;
  border-top:3px dotted currentColor!important;
  opacity:.85!important;
  vertical-align:middle!important;
}

.france-compare-v32 .compare-matrix-line:nth-child(2) .compare-matrix-value,
.france-compare-v32 .bar-line:nth-of-type(2) strong{
  color:#7b3ff0!important;
}

/* Loyer : bleu de la carte loyer vers bleu très foncé */
.france-compare-v32 .market-france-card[data-format="loyer"] .bar-fill.commune{
  background:linear-gradient(90deg,#1764d8 0%,#061936 100%)!important;
}

/* Prix d'achat : orange de la carte prix vers orange très foncé */
.france-compare-v32 .market-france-card[data-format="prix"] .bar-fill.commune{
  background:linear-gradient(90deg,#f36a21 0%,#6b2100 100%)!important;
}

.france-compare-v32 .market-france-card[data-format="loyer"] .bar-line:first-of-type strong{
  color:#1764d8!important;
}

.france-compare-v32 .market-france-card[data-format="prix"] .bar-line:first-of-type strong{
  color:#f36a21!important;
}

.france-compare-v32 .market-france-card .bar-line strong{
  font-size:clamp(18px,2vw,28px)!important;
  letter-spacing:-.035em!important;
}

.france-compare-v32 .market-france-card .compare-type-label{
  vertical-align:middle!important;
  transform:translateY(-2px)!important;
}

@media(max-width:760px){
  .france-compare-v32 .compare-matrix-card{
    padding:15px 14px 14px!important;
    border-radius:18px!important;
  }

  .france-compare-v32 .compare-matrix-card h3{
    font-size:20px!important;
    margin-bottom:10px!important;
    padding-bottom:9px!important;
  }

  .france-compare-v32 .compare-matrix-line,
  .france-compare-v32 .bar-line.compare-matrix-line,
  .france-compare-v32 .market-france-card .bar-line{
    grid-template-columns:minmax(76px,92px) minmax(0,1fr) minmax(66px,82px)!important;
    gap:9px!important;
  }

  .france-compare-v32 .compare-matrix-name,
  .france-compare-v32 .bar-line > span{
    font-size:13px!important;
  }

  .france-compare-v32 .compare-matrix-track,
  .france-compare-v32 .bar-track{
    height:17px!important;
  }

  .france-compare-v32 .compare-matrix-value,
  .france-compare-v32 .bar-line strong{
    font-size:20px!important;
    letter-spacing:-.04em!important;
  }

  .france-compare-v32 .compare-matrix-value::before,
  .france-compare-v32 .bar-line strong::before{
    display:none!important;
  }

  .france-compare-v32 .market-france-card .bar-line strong{
    font-size:16px!important;
  }
}


/* ===== v33 : comparaison France desktop plus compacte, 2 cartes par ligne ===== */
@media(min-width:901px){
  .france-compare-v32 .compare-bars{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:14px!important;
  }

  .france-compare-v32 .compare-matrix-card{
    padding:14px 16px 13px!important;
    border-radius:18px!important;
    box-shadow:0 8px 20px rgba(15,35,79,.055)!important;
  }

  .france-compare-v32 .compare-matrix-card::before{
    top:14px!important;
    bottom:14px!important;
    width:2px!important;
  }

  .france-compare-v32 .compare-matrix-card h3{
    margin:0 0 9px!important;
    padding-bottom:8px!important;
    font-size:18px!important;
    line-height:1.16!important;
    letter-spacing:-.012em!important;
  }

  .france-compare-v32 .compare-matrix-lines{
    gap:7px!important;
  }

  .france-compare-v32 .compare-matrix-line,
  .france-compare-v32 .bar-line.compare-matrix-line,
  .france-compare-v32 .market-france-card .bar-line{
    grid-template-columns:minmax(82px,120px) minmax(0,1fr) minmax(62px,84px)!important;
    gap:9px!important;
    margin:0!important;
  }

  .france-compare-v32 .compare-matrix-name,
  .france-compare-v32 .bar-line > span{
    font-size:13px!important;
    line-height:1.15!important;
  }

  .france-compare-v32 .compare-matrix-track,
  .france-compare-v32 .bar-track{
    height:15px!important;
    border-width:1px!important;
    box-shadow:inset 0 0 0 1px #e5ecf7,0 5px 12px rgba(15,35,79,.045)!important;
  }

  .france-compare-v32 .compare-matrix-value,
  .france-compare-v32 .bar-line strong{
    font-size:20px!important;
    letter-spacing:-.04em!important;
  }

  .france-compare-v32 .compare-matrix-value::before,
  .france-compare-v32 .bar-line strong::before{
    width:10px!important;
    margin:0 5px 4px 0!important;
    border-top-width:2px!important;
  }

  .france-compare-v32 .market-france-card .bar-line strong{
    font-size:16px!important;
  }

  .france-compare-v32 .market-france-card .compare-type-label{
    padding:2px 7px!important;
    font-size:10px!important;
  }
}

@media(min-width:901px) and (max-width:1120px){
  .france-compare-v32 .compare-matrix-line,
  .france-compare-v32 .bar-line.compare-matrix-line,
  .france-compare-v32 .market-france-card .bar-line{
    grid-template-columns:minmax(72px,96px) minmax(0,1fr) minmax(56px,74px)!important;
    gap:7px!important;
  }

  .france-compare-v32 .compare-matrix-value,
  .france-compare-v32 .bar-line strong{
    font-size:18px!important;
  }

  .france-compare-v32 .compare-matrix-value::before,
  .france-compare-v32 .bar-line strong::before{
    display:none!important;
  }
}

/* Mobile/tablette : conserver une seule colonne lisible */
@media(max-width:900px){
  .france-compare-v32 .compare-bars{
    grid-template-columns:1fr!important;
  }
}


/* ===== v34 : barres prix/loyer sur échelle min-max globale ===== */
.france-compare-v32 .market-france-card .market-fill{
  transition:width .25s ease;
}
.france-compare-v32 .market-france-card .market-fill[style*="width: 0%"],
.france-compare-v32 .market-france-card .market-fill[style*="width:0%"]{
  opacity:.25;
}


/* ===== v40 : classement mobile compact, suggestions accueil, arrondissements ===== */
@media(max-width:760px){
  .classement-commune-card{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-areas:
      "main icon"
      "desc desc"!important;
    gap:10px 12px!important;
    align-items:start!important;
  }

  .classement-commune-card .classement-icon{
    grid-area:icon!important;
    align-self:start!important;
    justify-self:end!important;
    width:44px!important;
    height:44px!important;
    margin:0!important;
    font-size:24px!important;
  }

  .classement-commune-card .classement-main{
    grid-area:main!important;
    min-width:0!important;
  }

  .classement-commune-card .classement-main h2{
    margin:0!important;
    padding-right:0!important;
  }

  .classement-commune-card .classement-description{
    grid-area:desc!important;
  }
}

.fallback-commune-choices{
  margin:16px 0 0;
  padding:14px;
  border:1px solid #dbe7f8;
  border-radius:16px;
  background:linear-gradient(180deg,#f8fbff,#ffffff);
}
.fallback-commune-choices strong{
  display:block;
  margin-bottom:10px;
  color:#102a5c;
  font-size:14px;
  font-weight:900;
}
.fallback-commune-choices div{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
}
.fallback-commune-choices a{
  padding:9px 11px;
  border-radius:12px;
  border:1px solid #e2e8f0;
  background:#fff;
  color:#075bd8;
  font-weight:850;
  text-decoration:none!important;
  text-align:center;
}
.fallback-commune-choices a:hover{
  background:#eef5ff;
}
@media(max-width:760px){
  .fallback-commune-choices div{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .fallback-commune-choices a:nth-child(n+5){
    display:none;
  }
}

.nearby-market-row.is-current{
  background:#f8fbff;
}


/* ===== v41 : classement mobile renforcé + notes de moyennes arrondissements ===== */
@media(max-width:760px){
  .classement-commune-card .classement-icon{
    width:66px!important;
    height:66px!important;
    font-size:36px!important;
    border-radius:20px!important;
  }

  .classement-commune-card .classement-main h2{
    margin-bottom:12px!important;
  }

  .classement-commune-card .classement-main p{
    margin-top:10px!important;
    line-height:1.55!important;
  }
}

.market-kpi-note{
  display:block;
  margin-top:7px;
  color:#7b8798!important;
  font-size:12px!important;
  line-height:1.35!important;
  font-weight:750!important;
}

@media(min-width:761px){
  .fallback-commune-choices div{
    grid-template-columns:repeat(5,minmax(0,1fr));
  }
}

@media(max-width:760px){
  .fallback-commune-choices a:nth-child(n+5),
  .commune-suggestions a:nth-of-type(n+5){
    display:none!important;
  }
}


/* ===== v42 : éviter le doublon des suggestions sur la page sans commune ===== */
.page-logement-search-only .fallback-commune-choices{
  display:none!important;
}


/* ===== v44 : recherche tolérante aux tirets + 16 suggestions desktop ===== */
@media(max-width:760px){
  .commune-suggestions a:nth-of-type(n+5){
    display:none!important;
  }
}


/* ===== v46 : transfert surface/loyer sans mention visible ===== */

/* ===== v48 : arrondissements sous la recherche pour Paris, Lyon et Marseille ===== */
.commune-suggestion-label-mobile{
  display:none;
}

.commune-suggestions.commune-arrondissement-suggestions{
  grid-template-columns:repeat(auto-fit,minmax(170px,1fr));
}

.commune-suggestions.commune-arrondissement-suggestions a{
  text-align:center;
}

@media(max-width:760px){
  .commune-suggestions.commune-arrondissement-suggestions{
    grid-template-columns:repeat(2,minmax(0,1fr));
    max-height:260px;
  }

  .commune-suggestions.commune-arrondissement-suggestions a:nth-of-type(n+5){
    display:block!important;
  }

  .commune-suggestions.commune-arrondissement-suggestions .commune-suggestion-label-full{
    display:none;
  }

  .commune-suggestions.commune-arrondissement-suggestions .commune-suggestion-label-mobile{
    display:inline;
  }

  .commune-suggestions.commune-arrondissement-suggestions sup{
    font-size:.62em;
    line-height:0;
    vertical-align:super;
  }
}


/* ===== v49 : intitulés compacts du tableau arrondissements sur mobile ===== */
.nearby-title-mobile,
.nearby-name-mobile{
  display:none;
}

@media(max-width:760px){
  .nearby-market-section.is-arrondissement-market .nearby-title-full,
  .nearby-market-section.is-arrondissement-market .nearby-name-full{
    display:none!important;
  }

  .nearby-market-section.is-arrondissement-market .nearby-title-mobile,
  .nearby-market-section.is-arrondissement-market .nearby-name-mobile{
    display:inline!important;
  }

  .nearby-market-section.is-arrondissement-market sup{
    font-size:.62em;
    line-height:0;
    vertical-align:super;
  }

  .nearby-market-section.is-arrondissement-market .nearby-market-table td:first-child,
  .nearby-market-section.is-arrondissement-market .nearby-market-table th:first-child{
    min-width:88px;
  }
}


/* ===== v50 : tableau arrondissements sans doublon mobile ===== */
.nearby-market-section.is-arrondissement-market .nearby-title-mobile,
.nearby-market-section.is-arrondissement-market .nearby-name-mobile{
  display:none!important;
}

.nearby-market-section.is-arrondissement-market .nearby-name-compact sup{
  font-size:.62em;
  line-height:0;
  vertical-align:super;
}

@media(max-width:760px){
  .nearby-market-section.is-arrondissement-market h2,
  .nearby-market-section.is-arrondissement-market .nearby-title-full{
    display:block!important;
  }

  .nearby-market-section.is-arrondissement-market .nearby-name-full{
    display:inline!important;
  }
}


/* ===== v51 : correctif saisie mobile du champ de recherche commune ===== */
.commune-search-block{
  position:relative;
}

.commune-search-input{
  position:relative;
  z-index:3;
  pointer-events:auto;
  -webkit-user-select:text;
  user-select:text;
  touch-action:manipulation;
}

.commune-suggestions{
  position:relative;
  z-index:1;
}


/* ===== v52 : badge discret pour les villes de plus de 50 000 habitants ===== */
.commune-suggestions a.is-large-city{
  display:flex;
  align-items:center;
  gap:6px;
  border-color:rgba(37,99,235,.20);
  background:linear-gradient(90deg,#ffffff 0%,#f8fbff 100%);
}

.commune-suggestions a.is-large-city::after{
  content:"Grande ville";
  margin-left:auto;
  padding:3px 8px;
  border-radius:999px;
  background:#eef6ff;
  color:#2563eb;
  font-size:.72rem;
  font-weight:700;
  white-space:nowrap;
}

@media(max-width:520px){
  .commune-suggestions a.is-large-city::after{
    content:"+50k hab.";
  }
}


/* v57 — suggestions communes au format vignette territoire + breadcrumb */
.commune-breadcrumb{
  margin:18px 0 20px;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  color:#64748b;
  font-size:.95rem;
}
.commune-breadcrumb a{
  color:#2563eb;
  text-decoration:none;
  font-weight:700;
}
.commune-breadcrumb a:hover{text-decoration:underline;}
.commune-breadcrumb strong{color:#0f172a;}

.commune-info-list a,
.classement-commune-card a{
  color:inherit;
  text-decoration:underline;
  text-decoration-thickness:1px;
  text-underline-offset:3px;
}
.commune-info-list a:hover,
.classement-commune-card a:hover{
  color:#2563eb;
}

.commune-suggestions .commune-suggestion-card{
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:3px !important;
  padding:13px 16px !important;
  border-radius:16px !important;
  background:linear-gradient(135deg,#ffffff,#f8fafc) !important;
  border:1px solid rgba(148,163,184,.22) !important;
  box-shadow:0 10px 24px rgba(15,23,42,.08) !important;
  text-decoration:none !important;
}
.commune-suggestions .commune-suggestion-card .commune-suggestion-kind{
  color:#0f172a;
  font-size:.78rem;
  font-weight:900;
  letter-spacing:.05em;
  text-transform:uppercase;
}
.commune-suggestions .commune-suggestion-card strong{
  color:#0f172a;
  font-weight:850;
  line-height:1.12;
}
.commune-suggestions .commune-suggestion-territory-meta{
  color:#64748b;
  font-size:.88rem;
}


/* v58 — suggestions communes : retour au format précédent, seul le sous-texte change */
.commune-suggestions a.commune-suggestion-card,
.commune-suggestions a{
  text-decoration:none;
}

.commune-suggestions .commune-suggestion-name{
  display:block;
  color:#0f172a;
  font-weight:850;
  line-height:1.15;
}

.commune-suggestions .commune-suggestion-dep-full{
  display:block;
  margin-top:3px;
  color:#64748b;
  font-size:.88rem;
  font-weight:650;
}

.commune-suggestions .commune-suggestion-kind{
  display:none !important;
}

/* Neutralise le style carte v57 qui remplaçait trop fortement les suggestions */
.commune-suggestions .commune-suggestion-card{
  display:block !important;
  background:inherit !important;
  box-shadow:inherit !important;
}

/* Conserve les badges existants, notamment Grande ville, définis dans les versions précédentes */


/* v59 — mobile recherche commune : Nom (31), vignette compacte */
.commune-suggestions .commune-name-mobile{
  display:none;
}
.commune-suggestions .commune-name-desktop{
  display:inline;
}
@media(max-width:640px){
  .commune-suggestions a{
    padding:10px 12px !important;
    min-height:0 !important;
  }
  .commune-suggestions .commune-name-desktop,
  .commune-suggestions .commune-suggestion-dep-full{
    display:none !important;
  }
  .commune-suggestions .commune-name-mobile{
    display:inline !important;
  }
  .commune-suggestions .mobile-dep-code{
    color:#64748b;
    font-weight:750;
  }
}


/* v60 — recherche commune : tirets/apostrophes ignorés via JS, mobile compact */
@media(max-width:640px){
  .commune-suggestions a{
    padding:9px 12px !important;
    min-height:0 !important;
  }
}


/* =========================================================
   v62 — suggestions communes identiques aux pages territoires
   ========================================================= */

.commune-suggestions .territory-suggestion-commune{
  display:block !important;
  padding:12px 16px !important;
  border-radius:14px !important;
  background:#fff !important;
  border:1px solid rgba(226,232,240,.95) !important;
  box-shadow:0 8px 18px rgba(15,23,42,.06) !important;
  text-decoration:none !important;
  color:inherit !important;
}

.commune-suggestions .territory-suggestion-commune strong{
  display:block !important;
  color:#0f172a !important;
  font-weight:850 !important;
  line-height:1.14 !important;
}

.commune-suggestions .territory-suggestion-commune .commune-meta-desktop{
  display:block !important;
  margin-top:3px !important;
  color:#64748b !important;
  font-size:.88rem !important;
  font-weight:400 !important;
}

.commune-suggestions .territory-suggestion-commune .commune-name-mobile{
  display:none !important;
}

.commune-suggestions .territory-suggestion-commune .commune-name-desktop{
  display:inline !important;
}

.commune-suggestions .territory-suggestion-commune.is-large-city{
  position:relative !important;
  padding-right:118px !important;
  border-color:rgba(37,99,235,.20) !important;
  background:linear-gradient(90deg,#ffffff 0%,#f8fbff 100%) !important;
}

.commune-suggestions .territory-suggestion-commune.is-large-city::after{
  content:"Grande ville";
  position:absolute;
  right:14px;
  top:50%;
  transform:translateY(-50%);
  padding:3px 8px;
  border-radius:999px;
  background:#eef6ff;
  color:#2563eb;
  font-size:.72rem;
  font-weight:800;
  white-space:nowrap;
}

@media(max-width:640px){
  .commune-suggestions .territory-suggestion-commune{
    padding:9px 12px !important;
    min-height:0 !important;
  }

  .commune-suggestions .territory-suggestion-commune .commune-name-desktop,
  .commune-suggestions .territory-suggestion-commune .commune-meta-desktop{
    display:none !important;
  }

  .commune-suggestions .territory-suggestion-commune .commune-name-mobile{
    display:inline !important;
  }

  .commune-suggestions .territory-suggestion-commune .mobile-dep-code{
    color:#64748b;
    font-weight:750;
  }

  .commune-suggestions .territory-suggestion-commune.is-large-city{
    padding-right:84px !important;
  }

  .commune-suggestions .territory-suggestion-commune.is-large-city::after{
    right:10px;
    content:"+50k hab.";
    font-size:.68rem;
  }
}


/* =========================================================
   v63 — recherche commune alignée pages territoires
   ========================================================= */

.commune-search-block label{
  font-weight:850;
}

.commune-suggestions .territory-suggestion-commune strong,
.commune-suggestions .territory-suggestion-commune .commune-name-desktop,
.commune-suggestions .territory-suggestion-commune .commune-name-mobile{
  color:#334155 !important;
}

.commune-suggestions .territory-suggestion-commune .commune-meta-desktop{
  color:#64748b !important;
  font-weight:400 !important;
}

/* Vignettes Région / Dept dans les pages communes */
.commune-suggestions .territory-suggestion-region,
.commune-suggestions .territory-suggestion-departement{
  position:relative !important;
  display:block !important;
  padding:12px 74px 12px 16px !important;
  border-radius:14px !important;
  box-shadow:0 8px 18px rgba(15,23,42,.06) !important;
  text-decoration:none !important;
  min-height:0 !important;
}

.commune-suggestions .territory-suggestion-region{
  background:linear-gradient(135deg,#ecfdf5,#d1fae5) !important;
  border:1px solid rgba(16,185,129,.45) !important;
}

.commune-suggestions .territory-suggestion-departement{
  background:linear-gradient(135deg,#eff6ff,#dbeafe) !important;
  border:1px solid rgba(59,130,246,.42) !important;
}

.commune-suggestions .territory-suggestion-region strong,
.commune-suggestions .territory-suggestion-departement strong{
  display:block !important;
  color:#334155 !important;
  font-weight:850 !important;
  line-height:1.14 !important;
}

.commune-suggestions .territory-suggestion-region small,
.commune-suggestions .territory-suggestion-departement small{
  display:block !important;
  margin-top:3px !important;
  color:#64748b !important;
  font-size:.86rem !important;
  font-weight:400 !important;
}

.commune-suggestions .suggestion-side-badge{
  position:absolute;
  right:14px;
  top:50%;
  transform:translateY(-50%);
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  padding:4px 8px;
  border-radius:999px;
  font-size:.72rem;
  line-height:1;
  font-weight:900;
  color:#fff !important;
  white-space:nowrap;
  box-shadow:0 4px 12px rgba(15,23,42,.10);
}

.commune-suggestions .suggestion-side-badge sup{
  font-size:.58em;
  line-height:0;
  position:relative;
  top:-.35em;
  margin-left:1px;
}

.commune-suggestions .territory-suggestion-region .suggestion-side-badge{
  background:#16a34a !important;
}

.commune-suggestions .territory-suggestion-departement .suggestion-side-badge{
  background:#0b4fd8 !important;
  border:1px solid rgba(255,255,255,.48) !important;
  color:#fff !important;
  text-shadow:0 1px 1px rgba(15,23,42,.35);
}

@media(max-width:640px){
  .commune-suggestions .territory-suggestion-commune .commune-name-mobile{
    white-space:nowrap !important;
  }

  .commune-suggestions .territory-suggestion-region,
  .commune-suggestions .territory-suggestion-departement{
    padding:9px 72px 9px 12px !important;
  }

  .commune-suggestions .territory-suggestion-region small,
  .commune-suggestions .territory-suggestion-departement small{
    display:none !important;
  }

  .commune-suggestions .suggestion-side-badge{
    right:10px;
    padding:3px 7px;
    font-size:.68rem;
  }
}


/* =========================================================
   v64 — placeholder mobile et communes sur une seule ligne
   ========================================================= */

.commune-suggestions .suggestion-side-badge sup{
  font-size:.58em;
  line-height:0;
  position:relative;
  top:-.35em;
  margin-left:1px;
}

@media(max-width:640px){
  .commune-suggestions .territory-suggestion-commune{
    padding-top:8px !important;
    padding-bottom:8px !important;
  }

  .commune-suggestions .territory-suggestion-commune strong{
    display:block !important;
    min-width:0 !important;
    max-width:100% !important;
  }

  .commune-suggestions .territory-suggestion-commune .commune-name-mobile{
    display:block !important;
    max-width:100% !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    line-height:1.15 !important;
    font-size:.94rem !important;
  }

  .commune-suggestions .territory-suggestion-commune .mobile-dep-code{
    display:inline !important;
    white-space:nowrap !important;
  }

  .commune-search-input::placeholder{
    color:#94a3b8 !important;
    opacity:1 !important;
  }
}


/* =========================================================
   v67 — correctif champ recherche cliquable
   ========================================================= */
.commune-search-block{
  position:relative !important;
  isolation:isolate !important;
}
.commune-search-block label{
  position:relative !important;
  z-index:21 !important;
}
.commune-search-input{
  position:relative !important;
  z-index:22 !important;
  pointer-events:auto !important;
  -webkit-user-select:text !important;
  user-select:text !important;
  touch-action:manipulation !important;
}
.commune-suggestions{
  position:relative !important;
  z-index:10 !important;
}


/* =========================================================
   v68 — champ recherche cliquable sur mobile
   ========================================================= */

.page-logement-commune .commune-search-block,
.page-logement-commune #communeSearch,
.page-logement-commune #communeSuggestions,
.page-logement-commune .commune-suggestions{
  pointer-events:auto !important;
  touch-action:manipulation !important;
}

.page-logement-commune .commune-search-block{
  position:relative !important;
  z-index:20000 !important;
  isolation:isolate !important;
}

.page-logement-commune #communeSearch{
  position:relative !important;
  z-index:20002 !important;
  -webkit-user-select:text !important;
  user-select:text !important;
  cursor:text !important;
}

.page-logement-commune #communeSuggestions,
.page-logement-commune .commune-suggestions{
  position:relative !important;
  z-index:20001 !important;
}

.page-logement-commune .logement-map-search,
.page-logement-commune .logement-map-layout,
.page-logement-commune .logement-france-map{
  z-index:1 !important;
}

@media(max-width:760px){
  .page-logement-commune #communeSearch{
    min-height:46px !important;
    pointer-events:auto !important;
    touch-action:manipulation !important;
  }
}


/* =========================================================
   v69 — saisie mobile + badge Grande ville pages communes
   ========================================================= */

/* Champ de recherche mobile : cliquable ET saisissable */
.page-logement-commune #communeSearch,
.page-logement-commune .commune-search-input{
  pointer-events:auto !important;
  touch-action:auto !important;
  -webkit-user-select:auto !important;
  user-select:auto !important;
  -webkit-touch-callout:default !important;
  caret-color:auto !important;
}

.page-logement-commune .commune-search-block{
  position:relative !important;
  z-index:30000 !important;
}

.page-logement-commune .commune-search-block::before,
.page-logement-commune .commune-search-block::after{
  pointer-events:none !important;
}

.page-logement-commune .content-card,
.page-logement-commune .search-only-card{
  overflow:visible !important;
}

/* Badge Grande ville rétabli dans les suggestions des pages communes */
.page-logement-commune .commune-suggestions a.territory-suggestion-commune.is-large-city,
.page-logement-commune .commune-suggestions .territory-suggestion-commune.is-large-city{
  position:relative !important;
  padding-right:118px !important;
  border-color:rgba(37,99,235,.24) !important;
  background:linear-gradient(90deg,#ffffff 0%,#f8fbff 100%) !important;
}

.page-logement-commune .commune-suggestions a.territory-suggestion-commune.is-large-city::after,
.page-logement-commune .commune-suggestions .territory-suggestion-commune.is-large-city::after{
  content:"Grande ville" !important;
  position:absolute !important;
  right:14px !important;
  top:50% !important;
  transform:translateY(-50%) !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:3px 8px !important;
  border-radius:999px !important;
  background:#eef6ff !important;
  color:#2563eb !important;
  font-size:.72rem !important;
  font-weight:800 !important;
  line-height:1 !important;
  white-space:nowrap !important;
}

@media(max-width:640px){
  .page-logement-commune .commune-suggestions a.territory-suggestion-commune.is-large-city,
  .page-logement-commune .commune-suggestions .territory-suggestion-commune.is-large-city{
    padding-right:84px !important;
  }

  .page-logement-commune .commune-suggestions a.territory-suggestion-commune.is-large-city::after,
  .page-logement-commune .commune-suggestions .territory-suggestion-commune.is-large-city::after{
    content:"+50k hab." !important;
    right:10px !important;
    font-size:.68rem !important;
  }
}


/* =========================================================
   v70 — badge Grande ville pages communes : condition robuste
   ========================================================= */

/* Le badge doit apparaître dès que JS ajoute .is-large-city, quel que soit le format exact du lien */
.page-logement-commune .commune-suggestions a.is-large-city{
  position:relative !important;
  padding-right:118px !important;
  border-color:rgba(37,99,235,.24) !important;
  background:linear-gradient(90deg,#ffffff 0%,#f8fbff 100%) !important;
}

.page-logement-commune .commune-suggestions a.is-large-city::after{
  content:"Grande ville" !important;
  position:absolute !important;
  right:14px !important;
  top:50% !important;
  transform:translateY(-50%) !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:3px 8px !important;
  border-radius:999px !important;
  background:#eef6ff !important;
  color:#2563eb !important;
  font-size:.72rem !important;
  font-weight:800 !important;
  line-height:1 !important;
  white-space:nowrap !important;
}

@media(max-width:640px){
  .page-logement-commune .commune-suggestions a.is-large-city{
    padding-right:84px !important;
  }

  .page-logement-commune .commune-suggestions a.is-large-city::after{
    content:"+50k hab." !important;
    right:10px !important;
    font-size:.68rem !important;
  }
}


/* =========================================================
   v72 — menu au-dessus du hero et des suggestions
   ========================================================= */

/* La barre de navigation doit toujours passer au-dessus du bloc hero/recherche. */
.page-logement-territoire .site-header,
.page-logement-commune .site-header,
.site-header{
  position:relative !important;
  z-index:100000 !important;
  isolation:isolate !important;
}

.page-logement-territoire .site-header .primary-nav,
.page-logement-territoire .site-header .nav-toggle,
.page-logement-commune .site-header .primary-nav,
.page-logement-commune .site-header .nav-toggle,
.site-header .primary-nav,
.site-header .nav-toggle{
  position:relative !important;
  z-index:100001 !important;
}

/* Les blocs recherche restent au-dessus du contenu de page, mais sous le menu. */
.page-logement-territoire .territory-cyber-shell,
.page-logement-territoire .logement-top,
.page-logement-territoire .territory-cyber-top,
.page-logement-territoire .content-card,
.page-logement-commune .content-card{
  position:relative !important;
  z-index:1 !important;
}

.page-logement-territoire .territory-search-block,
.page-logement-territoire .commune-search-block,
.page-logement-commune .commune-search-block{
  position:relative !important;
  z-index:40 !important;
  isolation:isolate !important;
}

.page-logement-territoire .territory-search-input,
.page-logement-commune .commune-search-input,
.page-logement-commune #communeSearch{
  position:relative !important;
  z-index:42 !important;
}

.page-logement-territoire .territory-search-suggestions,
.page-logement-commune .commune-suggestions,
.page-logement-commune #communeSuggestions{
  position:relative !important;
  z-index:41 !important;
}

/* Empêche les anciens correctifs de type z-index 10000/30000 de dépasser le menu. */
@media(max-width:760px){
  .page-logement-territoire .territory-search-block,
  .page-logement-territoire .commune-search-block,
  .page-logement-commune .commune-search-block{
    z-index:40 !important;
  }
  .page-logement-territoire .territory-search-input,
  .page-logement-commune .commune-search-input,
  .page-logement-commune #communeSearch{
    z-index:42 !important;
  }
}


/* =========================================================
   v73 — menu visible en permanence au scroll
   ========================================================= */

/* La barre doit rester visible au scroll, tout en restant au-dessus du hero/recherche. */
.page-logement-territoire .site-header,
.page-logement-commune .site-header,
.site-header{
  position:sticky !important;
  position:-webkit-sticky !important;
  top:0 !important;
  z-index:1000000 !important;
  width:100% !important;
  background:#ffffff !important;
  isolation:isolate !important;
  transform:none !important;
  contain:none !important;
  overflow:visible !important;
  box-shadow:0 8px 22px rgba(15,23,42,.08) !important;
}

/* Les éléments du menu et le menu déroulant restent au-dessus de tout le contenu. */
.page-logement-territoire .site-header .header-main,
.page-logement-territoire .site-header .primary-nav,
.page-logement-territoire .site-header .nav-toggle,
.page-logement-commune .site-header .header-main,
.page-logement-commune .site-header .primary-nav,
.page-logement-commune .site-header .nav-toggle,
.site-header .header-main,
.site-header .primary-nav,
.site-header .nav-toggle{
  position:relative !important;
  z-index:1000001 !important;
}

/* Les suggestions restent visibles dans la page, mais ne peuvent plus passer au-dessus du menu sticky. */
.page-logement-territoire .territory-search-block,
.page-logement-territoire .commune-search-block,
.page-logement-commune .commune-search-block{
  position:relative !important;
  z-index:50 !important;
  isolation:isolate !important;
}

.page-logement-territoire .territory-search-suggestions,
.page-logement-territoire .commune-suggestions,
.page-logement-commune .commune-suggestions{
  position:relative !important;
  z-index:60 !important;
}

/* Empêche un parent de créer une couche qui pourrait recouvrir le header. */
.page-logement-territoire .territory-cyber-shell,
.page-logement-territoire .logement-top,
.page-logement-territoire .territory-cyber-top,
.page-logement-territoire .content-card,
.page-logement-commune .content-card,
.page-logement-commune .search-only-card{
  z-index:auto !important;
}

/* Ancrages : évite qu’un titre soit caché sous le menu sticky. */
html{
  scroll-padding-top:96px;
}
