/* Pierre & Capital — design system
   Neutres chauds + accent vert forêt profond, serif éditorial pour titres */

:root {
  /* Palette */
  --bg: oklch(0.985 0.005 85);
  --bg-elev: oklch(0.998 0.003 85);
  --bg-warm: oklch(0.965 0.012 85);
  --ink-1: oklch(0.18 0.012 85);
  --ink-2: oklch(0.38 0.010 85);
  --ink-3: oklch(0.55 0.008 85);
  --ink-4: oklch(0.72 0.006 85);
  --line: oklch(0.90 0.008 85);
  --line-soft: oklch(0.94 0.006 85);

  --accent: oklch(0.36 0.07 155);
  --accent-ink: oklch(0.28 0.07 155);
  --accent-soft: oklch(0.92 0.025 155);
  --accent-fg: oklch(0.99 0.005 85);

  /* Score colors */
  --score-excellent: oklch(0.52 0.13 150);
  --score-good: oklch(0.62 0.10 130);
  --score-fair: oklch(0.72 0.08 75);
  --score-avoid: oklch(0.58 0.14 28);

  --severity-critical: oklch(0.55 0.16 28);
  --severity-warning: oklch(0.68 0.12 70);
  --severity-info: oklch(0.55 0.06 240);
  --severity-ok: oklch(0.52 0.13 150);

  /* Type */
  --serif: "Fraunces", "Source Serif Pro", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, monospace;

  --radius: 6px;
  --radius-lg: 12px;
  --radius-xl: 18px;

  --shadow-sm: 0 1px 2px oklch(0.18 0.012 85 / 0.06), 0 1px 1px oklch(0.18 0.012 85 / 0.04);
  --shadow-md: 0 4px 12px oklch(0.18 0.012 85 / 0.08), 0 2px 4px oklch(0.18 0.012 85 / 0.04);
  --shadow-lg: 0 12px 40px oklch(0.18 0.012 85 / 0.16), 0 4px 12px oklch(0.18 0.012 85 / 0.08);

  --header-h: 64px;
  --filterbar-h: 56px;
}

* { box-sizing: border-box; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink-1);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  height: 100vh;
  overflow: hidden;
}

button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }

/* Layout */
.app-root {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}
.app-root > .main-grid {
  flex: 1;
  min-height: 0;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: var(--header-h);
  flex-shrink: 0;
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev);
  z-index: 50;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-fg);
  display: grid; place-items: center;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.02em;
  font-style: italic;
}

.brand-text {
  display: flex; flex-direction: column;
  line-height: 1.1;
}
.brand-name {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.brand-tag {
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}

.header-nav {
  display: flex;
  gap: 4px;
  align-items: center;
}
.nav-link {
  padding: 8px 14px;
  border-radius: 6px;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s;
}
.nav-link:hover { background: var(--bg-warm); color: var(--ink-1); }
.nav-link.active { color: var(--ink-1); background: var(--bg-warm); }

.header-search {
  flex: 1;
  max-width: 480px;
  margin: 0 32px;
  position: relative;
}
.header-search input {
  width: 100%;
  padding: 9px 14px 9px 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  font-size: 13px;
  color: var(--ink-1);
  transition: border-color 0.15s;
}
.header-search input:focus {
  outline: none;
  border-color: var(--accent);
}
.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-3);
}

.header-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.lang-switch {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  font-size: 11px;
  font-weight: 600;
}
.lang-switch button {
  background: transparent;
  border: none;
  padding: 5px 10px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.lang-switch button.active {
  background: var(--ink-1);
  color: var(--bg-elev);
}

.btn {
  background: var(--accent);
  color: var(--accent-fg);
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: background 0.15s;
}
.btn:hover { background: var(--accent-ink); }
.btn-ghost {
  background: transparent;
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--bg-warm); color: var(--ink-1); }

/* ── Profile selector ── */
.profile-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.profile-selector::-webkit-scrollbar { display: none; }

.profile-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-elev);
  font-size: 12px;
  color: var(--ink-2);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.profile-tab:hover {
  border-color: var(--accent);
  color: var(--ink-1);
  background: var(--accent-soft);
}
.profile-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 500;
}
.profile-tab-icon { font-size: 13px; line-height: 1; }
.profile-tab-label { letter-spacing: 0.01em; }

@media (max-width: 900px) {
  .profile-selector { padding: 6px 14px; }
  .profile-tab { padding: 4px 10px; font-size: 11px; }
}

/* Filter bar */
.filterbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 24px;
  height: var(--filterbar-h);
  flex-shrink: 0;
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev);
  z-index: 40;
  overflow: visible;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  font-size: 12px;
  color: var(--ink-2);
  white-space: nowrap;
  transition: all 0.15s;
}
.filter-pill:hover { border-color: var(--ink-4); color: var(--ink-1); }
.filter-pill.active {
  background: var(--ink-1);
  color: var(--bg-elev);
  border-color: var(--ink-1);
}
.filter-pill svg { flex-shrink: 0; }

.filter-divider {
  width: 1px;
  height: 24px;
  background: var(--line);
  margin: 0 4px;
}

.results-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--ink-3);
  white-space: nowrap;
}
.results-count strong { color: var(--ink-1); font-weight: 600; }

.sort-select {
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 6px 28px 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--ink-2);
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><path d='M2 4l3 3 3-3' fill='none' stroke='%23666' stroke-width='1.2'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

/* Main area: list + map */
.main-grid {
  display: grid;
  grid-template-columns: minmax(420px, 38%) 1fr;
  overflow: hidden;
}

/* Sidebar list */
.list-pane {
  border-right: 1px solid var(--line);
  background: var(--bg);
  overflow-y: auto;
  padding: 16px 20px 80px;
}

.list-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 1100px) {
  .list-grid { grid-template-columns: 1fr; }
}

.listing-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.18s;
  display: flex;
  flex-direction: column;
}
.listing-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--ink-4);
}
.listing-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.listing-image {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--bg-warm);
  overflow: hidden;
}
.listing-image .img-bg {
  position: absolute; inset: 0;
}
.listing-image .img-stripes {
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(45deg,
    transparent 0, transparent 14px,
    rgba(255,255,255,0.06) 14px, rgba(255,255,255,0.06) 15px);
}
.listing-image .img-label {
  position: absolute;
  inset: 0;
  display: grid; place-items: center;
  color: rgba(255,255,255,0.85);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.score-badge {
  position: absolute;
  top: 10px; left: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-elev);
  border-radius: 999px;
  padding: 4px 10px 4px 4px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.score-dot {
  width: 22px; height: 22px;
  border-radius: 999px;
  display: grid; place-items: center;
  color: white;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
}

.fav-btn {
  position: absolute;
  top: 10px; right: 10px;
  width: 32px; height: 32px;
  border-radius: 999px;
  background: var(--bg-elev);
  border: none;
  display: grid; place-items: center;
  box-shadow: var(--shadow-sm);
  color: var(--ink-2);
  transition: color 0.15s;
}
.fav-btn:hover { color: var(--severity-critical); }
.fav-btn.active { color: var(--severity-critical); }

.viewed-badge {
  position: absolute;
  bottom: 10px; left: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink-2);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(4px);
}

.listing-body {
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.listing-price {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink-1);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.listing-price-suffix {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 400;
}

.listing-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--ink-2);
}
.listing-meta span { white-space: nowrap; }
.listing-meta strong { color: var(--ink-1); font-weight: 600; }

.listing-address {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.4;
}

.listing-kpis {
  display: flex;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  margin-top: auto;
}
.kpi-mini {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.kpi-mini-label {
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.kpi-mini-value {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-1);
}
.kpi-mini-value.pos { color: var(--score-excellent); }
.kpi-mini-value.neg { color: var(--score-avoid); }

/* Map pane */
.map-pane {
  position: relative;
  background: oklch(0.94 0.013 85);
  overflow: hidden;
}

.leaflet-container-wrap {
  position: absolute;
  inset: 0;
  background: oklch(0.96 0.008 85);
}
.leaflet-container-wrap .leaflet-container {
  width: 100%; height: 100%;
  font-family: var(--sans);
  background: oklch(0.96 0.008 85);
}
.leaflet-container-wrap .leaflet-control-zoom {
  border: 1px solid var(--line) !important;
  border-radius: 8px !important;
  box-shadow: var(--shadow-md) !important;
  margin-top: 16px !important;
  margin-right: 16px !important;
}
.leaflet-container-wrap .leaflet-control-zoom a {
  background: var(--bg-elev) !important;
  color: var(--ink-1) !important;
  border-color: var(--line) !important;
  width: 32px !important;
  height: 32px !important;
  line-height: 32px !important;
  font-size: 16px !important;
}
.leaflet-container-wrap .leaflet-control-zoom a:hover {
  background: var(--bg-warm) !important;
}
.leaflet-container-wrap .leaflet-control-attribution {
  background: oklch(1 0 0 / 0.7) !important;
  font-size: 9px !important;
  padding: 2px 6px !important;
}

/* Custom Leaflet pin */
.leaflet-pin-wrap { background: transparent !important; border: none !important; }
.leaflet-pin {
  display: flex;
  justify-content: center;
  cursor: pointer;
  --pin-color: var(--ink-3);
}
.leaflet-pin-bubble {
  background: var(--bg-elev);
  color: var(--ink-1);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  border: 2px solid var(--pin-color);
  box-shadow: var(--shadow-md);
  white-space: nowrap;
  letter-spacing: -0.02em;
  position: relative;
  transition: transform 0.15s;
}
.leaflet-pin-bubble::after {
  content: '';
  position: absolute;
  bottom: -7px; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 7px solid var(--pin-color);
}
.leaflet-pin:hover .leaflet-pin-bubble,
.leaflet-pin.active .leaflet-pin-bubble {
  transform: scale(1.12);
  z-index: 10;
}
.leaflet-pin.active .leaflet-pin-bubble {
  background: var(--ink-1);
  color: var(--bg-elev);
}

/* Popover dropdown items */
.popover-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.popover-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: none;
  padding: 8px 10px;
  text-align: left;
  font-size: 13px;
  color: var(--ink-2);
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
}
.popover-item:hover { background: var(--bg-warm); color: var(--ink-1); }
.popover-item.active { color: var(--accent); font-weight: 600; }

/* Map legend & controls */
.map-legend {
  position: absolute;
  bottom: 24px; left: 24px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 11px;
  box-shadow: var(--shadow-md);
  z-index: 5;
}
.map-legend h4 {
  margin: 0 0 8px;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
}
.legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
  color: var(--ink-2);
  font-size: 11px;
}
.legend-swatch {
  width: 12px; height: 12px;
  border-radius: 3px;
}

.map-toggle {
  position: absolute;
  bottom: 24px; right: 24px;
  display: flex;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  box-shadow: var(--shadow-md);
  z-index: 5;
}
.map-toggle button {
  background: transparent;
  border: none;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 500;
}
.map-toggle button.active {
  background: var(--ink-1);
  color: var(--bg-elev);
}

/* Drawer / Detail panel */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: oklch(0.18 0.012 85 / 0.32);
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0; right: 0;
  width: min(820px, 96vw);
  height: 100vh;
  background: var(--bg);
  z-index: 501;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.drawer.open { transform: translateX(0); }

.drawer-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  border-radius: 999px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--ink-2);
  z-index: 5;
}
.drawer-close:hover { color: var(--ink-1); background: var(--bg-warm); }

.drawer-hero {
  position: relative;
  width: 100%;
  height: 320px;
  flex-shrink: 0;
  background: var(--bg-warm);
  overflow: hidden;
}
.drawer-hero .img-bg { position: absolute; inset: 0; }
.drawer-hero .img-stripes {
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(45deg,
    transparent 0, transparent 24px,
    rgba(255,255,255,0.06) 24px, rgba(255,255,255,0.06) 25px);
}
.drawer-hero .img-label {
  position: absolute;
  bottom: 16px; left: 16px;
  color: rgba(255,255,255,0.78);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.drawer-thumbs {
  position: absolute;
  bottom: 16px; right: 16px;
  display: flex;
  gap: 6px;
}
.drawer-thumb {
  width: 60px; aspect-ratio: 4/3;
  border-radius: 4px;
  border: 2px solid rgba(255,255,255,0.4);
  cursor: pointer;
  transition: border-color 0.15s;
}
.drawer-thumb.active { border-color: white; }

.drawer-body {
  padding: 32px 40px 80px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
}
.drawer-title-block .eyebrow {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.drawer-title {
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink-1);
  margin: 0 0 4px;
}
.drawer-address {
  font-size: 14px;
  color: var(--ink-2);
  margin: 0;
}
.drawer-meta-row {
  display: flex;
  gap: 18px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-2);
}
.drawer-meta-row span { display: flex; gap: 4px; }
.drawer-meta-row strong { color: var(--ink-1); font-weight: 600; }

.drawer-score-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.score-ring-wrap {
  position: relative;
  width: 96px; height: 96px;
}
.score-ring-wrap svg { transform: rotate(-90deg); }
.score-ring-bg { stroke: var(--line); }
.score-ring-fg { stroke-linecap: round; transition: stroke-dashoffset 0.6s; }
.score-ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.score-ring-num {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}
.score-ring-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 4px;
}
.verdict-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  color: white;
}

/* Section blocks inside drawer */
.section-title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink-1);
  margin: 0 0 14px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.section-title small {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}

.summary-text {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.45;
  color: var(--ink-1);
  font-weight: 400;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

/* KPI grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.kpi-card {
  background: var(--bg-elev);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.kpi-label {
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
}
.kpi-value {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink-1);
}
.kpi-value.pos { color: var(--score-excellent); }
.kpi-value.neg { color: var(--score-avoid); }
.kpi-help {
  font-size: 11px;
  color: var(--ink-3);
  line-height: 1.35;
  margin-top: 2px;
}

/* Calculator panel */
.calc-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.calc-controls { display: flex; flex-direction: column; gap: 18px; }
.calc-results { display: flex; flex-direction: column; gap: 12px; border-left: 1px solid var(--line); padding-left: 28px; }

.calc-row label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
  font-weight: 500;
}
.calc-row .calc-value-display {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-1);
  margin-bottom: 8px;
}
.calc-row input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  outline: none;
}
.calc-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px; height: 18px;
  border-radius: 999px;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 1px 4px oklch(0.18 0.012 85 / 0.2);
}
.calc-row input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 999px;
  background: var(--accent);
  cursor: pointer;
  border: none;
}

.calc-result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  padding: 6px 0;
}
.calc-result-row + .calc-result-row { border-top: 1px dashed var(--line); }
.calc-result-row .label { color: var(--ink-2); }
.calc-result-row .value {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--ink-1);
  font-size: 14px;
}
.calc-result-row .value.pos { color: var(--score-excellent); }
.calc-result-row .value.neg { color: var(--score-avoid); }
.calc-result-row.highlight {
  background: var(--accent-soft);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 4px -14px;
  border-top: none !important;
}
.calc-result-row.highlight .label {
  color: var(--accent-ink);
  font-weight: 600;
}
.calc-result-row.highlight .value { font-size: 18px; }

/* Today vs market */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.compare-col {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  background: var(--bg-elev);
}
.compare-col.market {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.compare-col h4 {
  margin: 0 0 12px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
}
.compare-col.market h4 { color: var(--accent-ink); }
.compare-row {
  display: flex; justify-content: space-between;
  font-size: 12px;
  padding: 4px 0;
  color: var(--ink-2);
}
.compare-row .v { font-family: var(--mono); font-weight: 600; color: var(--ink-1); }

/* Risks */
.risk-list { display: flex; flex-direction: column; gap: 10px; }
.risk-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
}
.risk-item .severity-icon {
  width: 28px; height: 28px;
  border-radius: 999px;
  display: grid; place-items: center;
  color: white;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}
.risk-item.critical .severity-icon { background: var(--severity-critical); }
.risk-item.warning .severity-icon { background: var(--severity-warning); }
.risk-item.info .severity-icon { background: var(--severity-info); }
.risk-item.ok .severity-icon { background: var(--severity-ok); }

.risk-item h5 {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-1);
}
.risk-item p { margin: 0; font-size: 12px; color: var(--ink-2); line-height: 1.45; }
.risk-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 2px;
}

/* No results */
.no-results {
  grid-column: 1 / -1;
  padding: 60px 20px;
  text-align: center;
  color: var(--ink-3);
}
.no-results .nr-title {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--ink-1);
  margin-bottom: 8px;
}

/* Scrollbar */
.list-pane::-webkit-scrollbar { width: 10px; }
.list-pane::-webkit-scrollbar-track { background: transparent; }
.list-pane::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; border: 2px solid var(--bg); }
.list-pane::-webkit-scrollbar-thumb:hover { background: var(--ink-4); }

/* Methodology footnote */
.methodology {
  font-size: 11px;
  color: var(--ink-3);
  line-height: 1.5;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 8px;
}
.methodology strong { color: var(--ink-2); }

/* Tooltip */
.tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.tooltip .tooltip-trigger {
  width: 14px; height: 14px;
  border-radius: 999px;
  background: var(--line);
  color: var(--ink-3);
  display: grid; place-items: center;
  font-size: 9px;
  font-weight: 700;
  cursor: help;
}

/* ============ Mobile / Tablet ============ */

/* Mobile view toggle (hidden on desktop) */
.mobile-view-toggle {
  display: none;
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  background: var(--ink-1);
  color: var(--bg-elev);
  border-radius: 999px;
  padding: 4px;
  box-shadow: var(--shadow-lg);
}
.mobile-view-toggle button {
  background: transparent;
  border: none;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: oklch(0.85 0.005 85);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.mobile-view-toggle button.active {
  background: var(--bg-elev);
  color: var(--ink-1);
}

@media (max-width: 900px) {
  :root {
    --header-h: 56px;
    --filterbar-h: 52px;
  }

  .header { padding: 0 14px; }
  .brand-text { display: none; }
  .header-nav { display: none; }
  .header-search {
    flex: 1;
    margin: 0 10px;
    max-width: none;
  }
  .header-search input {
    padding: 8px 12px 8px 36px;
    font-size: 13px;
  }
  .header-actions .btn-ghost { display: none; }

  .filterbar {
    padding: 0 14px;
    -webkit-overflow-scrolling: touch;
  }
  .results-count { display: none; }
  .sort-select { font-size: 11px; }

  /* Stack the main grid : the visible pane is controlled by data-view */
  .main-grid {
    grid-template-columns: 1fr;
    position: relative;
  }
  .list-pane {
    border-right: none;
    padding: 12px 12px 110px;
  }
  .list-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .map-pane {
    position: absolute;
    inset: 0;
  }

  /* Show one pane at a time */
  .main-grid[data-view="list"] .map-pane { display: none; }
  .main-grid[data-view="map"] .list-pane { display: none; }

  .mobile-view-toggle { display: flex; }

  /* Map UI tightened */
  .map-legend {
    bottom: 90px;
    left: 12px;
    padding: 10px 12px;
    font-size: 10px;
  }
  .map-toggle {
    bottom: 90px;
    right: 12px;
    padding: 3px;
  }
  .map-toggle button {
    padding: 5px 10px;
    font-size: 11px;
  }

  /* Drawer becomes full screen */
  .drawer {
    width: 100vw;
    max-width: 100vw;
  }
  .drawer-body {
    padding: 20px 18px 100px;
    gap: 24px;
  }
  .drawer-hero { height: 220px; }
  .drawer-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 16px;
  }
  .drawer-title { font-size: 28px; }
  .drawer-meta-row {
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 12px;
  }
  .drawer-score-block {
    flex-direction: row;
    align-items: center;
    align-self: flex-start;
  }
  .score-ring-wrap { width: 72px; height: 72px; }
  .score-ring-wrap svg { width: 72px; height: 72px; }
  .score-ring-wrap circle { cx: 36; cy: 36; r: 30; }
  .score-ring-num { font-size: 22px; }

  .summary-text { font-size: 16px; }

  /* KPI grid : 2 columns on mobile */
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .kpi-card { padding: 12px 14px; }
  .kpi-value { font-size: 18px; }

  /* Calculator stacks */
  .calc-card {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 18px;
  }
  .calc-results {
    border-left: none;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 16px;
  }

  .compare-grid { grid-template-columns: 1fr; gap: 12px; }

  .listing-image { aspect-ratio: 16/10; }

  /* Filter pill popovers should be wider but not overflow */
  .filter-pill { font-size: 11px; padding: 5px 10px; }

  /* Drawer thumbs smaller */
  .drawer-thumb { width: 48px; }

  /* Section titles smaller on mobile */
  .section-title { font-size: 17px; }
}

@media (max-width: 480px) {
  .lang-switch button { padding: 4px 7px; font-size: 10px; }
  .listing-price { font-size: 19px; }
  .listing-meta { font-size: 11px; gap: 6px; }
  .drawer-title { font-size: 24px; }
  .kpi-value { font-size: 16px; }
}

/* ============ Drawer — nouvelles sections ============ */

/* Mini-nav sticky intra-drawer */
.drawer-mini-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
  display: flex;
  gap: 2px;
  padding: 8px 16px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.drawer-mini-nav::-webkit-scrollbar { display: none; }
.drawer-mini-nav-btn {
  flex-shrink: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
  white-space: nowrap;
  transition: all 0.15s;
}
.drawer-mini-nav-btn:hover {
  background: var(--bg-warm);
  color: var(--ink-1);
  border-color: var(--line);
}
.drawer-mini-nav-btn.active {
  background: var(--ink-1);
  color: var(--bg-elev);
}

/* Signal chips sous le titre */
.signal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.signal-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.signal-chip.chip-tag {
  background: var(--bg-warm);
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.signal-chip.chip-ok {
  background: oklch(0.92 0.04 150);
  color: var(--score-excellent);
  border: 1px solid oklch(0.85 0.07 150);
}
.signal-chip.chip-info {
  background: oklch(0.93 0.025 240);
  color: var(--severity-info);
  border: 1px solid oklch(0.86 0.04 240);
}
.signal-chip.chip-warn {
  background: oklch(0.94 0.04 70);
  color: var(--severity-warning);
  border: 1px solid oklch(0.88 0.07 70);
}
.signal-chip.chip-critical {
  background: oklch(0.94 0.04 28);
  color: var(--severity-critical);
  border: 1px solid oklch(0.88 0.08 28);
}

/* Barre source */
.source-link-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  font-size: 12px;
}
.source-name {
  font-weight: 600;
  color: var(--ink-1);
}
.source-id {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11px;
}
.source-link-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: var(--accent-fg);
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s;
}
.source-link-btn:hover { background: var(--accent-ink); }

/* Market position card */
.market-position-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-elev);
}
.vs-market-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.vs-market-badge .vm-icon {
  width: 32px; height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
  color: white;
}
.vs-market-badge .vm-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-1);
}
.vm-below .vm-icon { background: var(--score-excellent); }
.vm-at .vm-icon { background: var(--ink-4); }
.vm-premium .vm-icon { background: var(--severity-warning); }
.vm-unknown .vm-icon { background: var(--ink-4); }

.percentile-section {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.percentile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--ink-2);
}
.percentile-value {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-1);
}
.percentile-bar {
  height: 8px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.percentile-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.cap-rate-compare {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 14px 18px;
}
.crc-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.crc-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  font-weight: 500;
}
.crc-value {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.crc-divider {
  font-size: 11px;
  color: var(--ink-4);
  padding: 0 14px;
  font-weight: 600;
  margin-top: 10px;
}

/* Deep analysis */
.deep-analysis-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}
@media (max-width: 700px) {
  .deep-analysis-grid { grid-template-columns: 1fr; }
}
.analysis-col {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elev);
}
.analysis-col-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}
.analysis-col-header .col-icon {
  width: 20px; height: 20px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.analysis-col-header.strengths { color: var(--score-excellent); background: oklch(0.95 0.02 150); }
.analysis-col-header.strengths .col-icon { background: var(--score-excellent); }
.analysis-col-header.weaknesses { color: var(--severity-warning); background: oklch(0.96 0.02 70); }
.analysis-col-header.weaknesses .col-icon { background: var(--severity-warning); }
.analysis-col-header.risks { color: var(--severity-critical); background: oklch(0.96 0.02 28); }
.analysis-col-header.risks .col-icon { background: var(--severity-critical); }

.analysis-bullets {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.analysis-item {
  display: flex;
  gap: 8px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-2);
}
.analysis-icon {
  flex-shrink: 0;
  width: 16px;
  text-align: center;
  font-size: 11px;
  margin-top: 1px;
}
.analysis-bullets.strengths .analysis-icon { color: var(--score-excellent); }
.analysis-bullets.weaknesses .analysis-icon { color: var(--severity-warning); }
.analysis-bullets.risks .analysis-icon { color: var(--severity-critical); }

.analysis-expand-btn {
  align-self: flex-start;
  background: none;
  border: none;
  font-size: 11px;
  color: var(--accent);
  padding: 2px 0;
  cursor: pointer;
  font-weight: 500;
}
.analysis-expand-btn:hover { color: var(--accent-ink); }

.analysis-footer {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.investor-profile-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.investor-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  font-weight: 600;
  white-space: nowrap;
}
.investor-tag {
  display: inline-block;
  background: var(--ink-1);
  color: var(--bg-elev);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.final-note-box {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  background: var(--accent-soft);
  border: 1px solid oklch(0.84 0.04 155);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--accent-ink);
  line-height: 1.5;
}
.final-note-icon {
  flex-shrink: 0;
  font-size: 16px;
  margin-top: 1px;
}

/* Stress test table */
.stress-table {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-elev);
}
.stress-header {
  display: grid;
  grid-template-columns: 100px 1fr 1fr 1fr;
  background: var(--bg-warm);
  border-bottom: 1px solid var(--line);
  padding: 0;
}
.stress-header > div {
  padding: 8px 14px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.stress-row {
  display: grid;
  grid-template-columns: 100px 1fr 1fr 1fr;
  border-top: 1px solid var(--line);
  transition: background 0.12s;
}
.stress-row:first-of-type { border-top: none; }
.stress-row:hover { background: var(--bg-warm); }
.stress-row.base { background: oklch(0.97 0.008 155); }
.stress-row.base:hover { background: oklch(0.94 0.014 155); }
.stress-row > div {
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.stress-rate-label {
  color: var(--ink-1);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.stress-base-tag {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--accent);
  color: var(--accent-fg);
  padding: 2px 6px;
  border-radius: 999px;
}
.stress-dscr { color: var(--ink-1); }
.stress-icon { font-size: 12px; }
.stress-val.pos { color: var(--score-excellent); }
.stress-val.neg { color: var(--score-avoid); }
.stress-note {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 8px;
  line-height: 1.5;
}

/* Quartier section — StatCan Census data */
.quartier-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.quartier-row:last-of-type { border-bottom: none; }
.quartier-label {
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 500;
  line-height: 1.4;
}
.quartier-value {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-1);
  white-space: nowrap;
}

/* Time signals */
.time-badges-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.time-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  min-width: 100px;
  text-align: center;
}
.time-badge.note {
  border-color: oklch(0.82 0.05 240);
  background: oklch(0.95 0.012 240);
}
.time-badge.warn {
  border-color: oklch(0.82 0.08 70);
  background: oklch(0.96 0.025 70);
}
.time-badge-num {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink-1);
  line-height: 1;
}
.time-badge.note .time-badge-num { color: var(--severity-info); }
.time-badge.warn .time-badge-num { color: var(--severity-warning); }
.time-badge-label {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 4px;
  text-align: center;
}

.price-timeline {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elev);
}
.price-timeline-header {
  padding: 8px 14px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: var(--bg-warm);
  border-bottom: 1px solid var(--line);
}
.price-timeline-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  font-size: 13px;
  border-top: 1px solid var(--line-soft);
}
.price-timeline-item:first-of-type { border-top: none; }
.ptl-icon {
  width: 22px; height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  background: var(--bg-warm);
  color: var(--ink-3);
}
.price-timeline-item.down .ptl-icon { background: oklch(0.94 0.04 28); color: var(--score-avoid); }
.price-timeline-item.up .ptl-icon { background: oklch(0.94 0.04 150); color: var(--score-excellent); }
.ptl-price {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--ink-1);
  font-size: 14px;
}
.price-timeline-item.down .ptl-price { color: var(--score-avoid); }
.price-timeline-item.up .ptl-price { color: var(--score-excellent); }
.ptl-date {
  margin-left: auto;
  font-size: 12px;
  color: var(--ink-3);
}
.ptl-current-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--accent-soft);
  color: var(--accent-ink);
  padding: 2px 7px;
  border-radius: 999px;
}

/* Mobile adaptations for new sections */
@media (max-width: 900px) {
  .stress-header,
  .stress-row {
    grid-template-columns: 80px 1fr 1fr 1fr;
  }
  .stress-row > div { padding: 10px 10px; font-size: 12px; }
  .stress-header > div { padding: 6px 10px; }
  .deep-analysis-grid { grid-template-columns: 1fr; }
  .drawer-mini-nav { padding: 6px 12px; }
  .drawer-mini-nav-btn { padding: 4px 10px; font-size: 11px; }
}

/* ============================================================
   Refactor recherche v2 — autocomplete, chips actifs, pin score,
   search-this-area, mobile filter drawer.
   ============================================================ */

/* Header search autocomplete */
.search-autocomplete {
  position: relative;
}
.search-autocomplete-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: max(100%, 360px);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  max-height: 360px;
  overflow-y: auto;
  z-index: 60;
  padding: 4px;
}
.search-autocomplete-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: 6px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink-1);
}
.search-autocomplete-item:hover,
.search-autocomplete-item--highlighted {
  background: var(--bg-warm);
}
.search-autocomplete-item .ac-icon {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  font-size: 13px;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--bg-warm);
}
.search-autocomplete-item--neighborhood .ac-icon { background: var(--accent-soft); color: var(--accent-ink); }
.search-autocomplete-item--city .ac-icon       { background: oklch(0.92 0.025 240); color: var(--severity-info); }
.search-autocomplete-item .ac-main {
  display: flex; flex-direction: column;
  gap: 1px; flex: 1; min-width: 0;
}
.search-autocomplete-item .ac-label {
  font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-autocomplete-item .ac-sub {
  font-size: 11px;
  color: var(--ink-3);
}
.search-autocomplete-item .ac-count {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  flex-shrink: 0;
}

/* Mode zone unique (héritage) — remplacé par search-multizone en mode multi */
.search-active-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 6px 0 8px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 999px;
  font-size: 12px;
  color: var(--accent-ink);
  flex-shrink: 0;
  white-space: nowrap;
}
.search-active-pill .pill-kind {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--bg-elev);
  color: var(--accent-ink);
}
.search-active-pill .pill-value {
  font-weight: 500;
  max-width: 120px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-active-pill .pill-clear {
  width: 18px; height: 18px;
  border-radius: 999px;
  background: transparent;
  border: none;
  display: grid; place-items: center;
  color: var(--accent-ink);
  cursor: pointer;
  flex-shrink: 0;
}
.search-active-pill .pill-clear:hover {
  background: var(--bg-elev);
}

/* Barre de recherche en mode multi-zones (flex wrap, chips inline + input) */
.search-multizone {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-height: 40px;
  height: auto;
  padding: 4px 10px 4px 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-elev);
  transition: border-color 0.15s;
}
.search-multizone:focus-within {
  border-color: var(--accent);
}
/* Retire les styles de l'input enfant dans le mode multizone */
.search-multizone input.search-zone-input {
  flex: 1;
  min-width: 120px;
  border: none;
  background: transparent;
  padding: 0;
  font-size: 13px;
  color: var(--ink-1);
  outline: none;
}
.search-multizone input.search-zone-input::placeholder {
  color: var(--ink-3);
}
/* L'icône search reste positionnée en absolu via .search-icon du parent */
/* Écraser les styles génériques header-search input pour l'input inline multi-zones */
.header-search.search-multizone input.search-zone-input {
  width: auto;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  font-size: 13px;
  color: var(--ink-1);
  transition: none;
}
.header-search.search-multizone input.search-zone-input:focus {
  outline: none;
  border-color: transparent;
}

/* Active filter chips */
.active-filter-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--ink-1);
  color: var(--bg-elev);
  border: 1px solid var(--ink-1);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.filter-chip:hover {
  background: var(--severity-critical);
  border-color: var(--severity-critical);
}
.filter-chip svg { opacity: 0.7; flex-shrink: 0; }
.filter-chip--place {
  background: var(--accent);
  border-color: var(--accent);
}
.filter-chip-clear-all {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 6px;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-family: inherit;
}
.filter-chip-clear-all:hover { color: var(--accent-ink); }

/* Popover sections supplémentaires */
.popover-section-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
}
.popover-list-scroll {
  max-height: 280px;
  overflow-y: auto;
}
.popover-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  font-size: 13px;
  color: var(--ink-1);
  cursor: pointer;
  user-select: none;
}
.popover-checkbox input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* Quick chip (boutons sous slider) */
.chip-quick {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 11px;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 999px;
  color: var(--ink-2);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.chip-quick:hover { border-color: var(--ink-4); color: var(--ink-1); }
.chip-quick.active {
  background: var(--ink-1);
  color: var(--bg-elev);
  border-color: var(--ink-1);
}

/* Filter bar : conteneur des pills */
.filterbar-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.filterbar-pills::-webkit-scrollbar { display: none; }

/* Mobile filter trigger (bouton dans la filterbar, caché sur desktop) */
.mobile-filter-trigger {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--ink-1);
  border-radius: 999px;
  background: var(--ink-1);
  color: var(--bg-elev);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  position: relative;
}
.mobile-filter-trigger-badge {
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  min-width: 18px;
  text-align: center;
}

/* Pin score (refactor de l'ancien pin prix) */
.leaflet-pin-bubble--score {
  font-family: var(--mono);
  font-size: 12px;
  min-width: 28px;
  text-align: center;
  padding: 3px 7px;
}
.leaflet-pin-bubble--score::before {
  /* Tooltip prix au hover */
  content: attr(data-price);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink-1);
  color: var(--bg-elev);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 11;
}
.leaflet-pin:hover .leaflet-pin-bubble--score::before,
.leaflet-pin.active .leaflet-pin-bubble--score::before {
  opacity: 1;
}

/* Search this area button */
.search-this-area-btn {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--ink-1);
  color: var(--bg-elev);
  border: none;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  z-index: 410;
  animation: fadeInDown 0.2s ease-out;
}
.search-this-area-btn:hover {
  background: var(--accent);
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translate(-50%, -8px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* Mobile filter drawer (bottom sheet) */
.mobile-filter-drawer {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  flex-direction: column;
}
.mobile-filter-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: oklch(0.18 0.012 85 / 0.4);
  animation: fadeIn 0.2s ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.mobile-filter-drawer-panel {
  position: relative;
  margin-top: auto;
  background: var(--bg);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  border-radius: 18px 18px 0 0;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.mobile-filter-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.mobile-filter-drawer-header h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  margin: 0;
  letter-spacing: -0.02em;
}
.mobile-filter-drawer-close {
  width: 32px; height: 32px;
  border-radius: 999px;
  background: var(--bg-warm);
  border: none;
  display: grid; place-items: center;
  color: var(--ink-2);
  cursor: pointer;
}
.mobile-filter-drawer-close:hover { color: var(--ink-1); background: var(--line-soft); }
.mobile-filter-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 20px 24px;
}
.mobile-filter-section {
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
}
.mobile-filter-section:last-child { border-bottom: none; }
.mobile-filter-section h4 {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--ink-1);
}
.mobile-filter-drawer-footer {
  display: flex;
  gap: 10px;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  background: var(--bg-elev);
  flex-shrink: 0;
}
.mobile-filter-drawer-footer button { flex: 1; padding: 12px; font-size: 13px; }

/* Multi-select chip (utilisé dans drawer mobile + popovers) */
.chip-multiselect {
  display: flex;
  flex-direction: row;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.chip-multiselect-wrap { flex-wrap: wrap; overflow-x: visible; }
.chip-multiselect::-webkit-scrollbar { display: none; }
.chip-multiselect-option {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 999px;
  font-size: 12px;
  color: var(--ink-2);
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  flex-shrink: 0;
}
.chip-multiselect-option:hover { border-color: var(--ink-4); color: var(--ink-1); }
.chip-multiselect-option.active {
  background: var(--ink-1);
  color: var(--bg-elev);
  border-color: var(--ink-1);
}
.chip-multiselect-option small {
  font-size: 10px;
  opacity: 0.7;
}

/* Listing card : selected (cliqué via map) */
.listing-card.selected {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}

/* Responsive : ≤900px = mobile-first */
@media (max-width: 900px) {
  .filterbar-pills { display: none; }
  .mobile-filter-trigger { display: inline-flex; }
  .filter-divider { display: none; }
  .sort-select { display: none; }
  .filterbar { padding: 0 14px; gap: 10px; }
  .results-count { font-size: 11px; }

  .active-filter-chips { padding: 8px 14px; }

  /* Header : autocomplete prend tout l'espace */
  .header { padding: 0 14px; gap: 8px; }
  .header-nav { display: none; }
  .brand-text { display: none; }
  .header-search { margin: 0; max-width: none; }

  .search-this-area-btn { font-size: 11px; padding: 6px 12px; top: 12px; }
}

@media (max-width: 600px) {
  .header-actions .btn { display: none; }
}

/* ===================================================================
   ANALYZE PAGE — Étape 3 : analyse complète 3 scénarios A/B/C
   =================================================================== */

/* Couleurs par scénario */
.ap-col-0 { --col-color: oklch(0.52 0.13 240); }   /* bleu */
.ap-col-1 { --col-color: oklch(0.52 0.13 150); }   /* vert */
.ap-col-2 { --col-color: oklch(0.60 0.12 40); }    /* orange */

/* Root page */
/* Quand la page analyse est montée, body et .app-root ne doivent plus bloquer le scroll */
body.analyze-active,
body.analyze-active .app-root {
  height: auto;
  overflow: visible;
}

.ap-root {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

/* Header */
.ap-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  height: var(--header-h);
  flex-shrink: 0;
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev);
  position: sticky;
  top: 0;
  z-index: 40;
}
.ap-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
  flex-shrink: 0;
}
.ap-back-btn:hover { background: var(--bg-warm); color: var(--ink-1); }
.ap-header-title {
  flex: 1;
  min-width: 0;
}
.ap-header-address {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ap-header-meta {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 12px;
  color: var(--ink-3);
}
.ap-header-price {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  color: var(--ink-1);
  letter-spacing: -0.01em;
}
.ap-header-type,
.ap-header-units { font-size: 12px; color: var(--ink-3); }
.ap-header-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.ap-btn-sm { padding: 7px 14px !important; font-size: 12px !important; }
.ap-print-btn { background: var(--accent) !important; color: white !important; }

/* Barre copier scénarios */
.ap-copy-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.ap-copy-label {
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-right: 4px;
}
.ap-copy-btn {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--mono);
  color: var(--ink-2);
}
.ap-copy-btn:hover { background: var(--bg-warm); color: var(--ink-1); border-color: var(--ink-4); }

/* Scénario header bandes colorées */
.ap-scenario-header {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-bottom: 2px solid var(--line);
}
.ap-scenario-col-head {
  padding: 10px 16px;
  border-top: 4px solid var(--col-color);
  background: var(--bg-elev);
}
.ap-scenario-col-head + .ap-scenario-col-head {
  border-left: 1px solid var(--line);
}
.ap-scenario-label-input {
  background: transparent;
  border: none;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  color: var(--col-color);
  width: 100%;
  padding: 0;
  letter-spacing: -0.01em;
}
.ap-scenario-label-input:focus {
  outline: 1px dashed var(--col-color);
  border-radius: 2px;
}

/* Contenu principal */
.ap-content {
  padding: 0 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.ap-section {
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}
.ap-section:last-child { border-bottom: none; }

/* Tables A/B/C */
.ap-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.ap-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.ap-th-label {
  text-align: left;
  padding: 10px 14px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: var(--bg-warm);
  border-bottom: 1px solid var(--line);
  min-width: 200px;
}
.ap-th-col {
  text-align: right;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--col-color);
  background: var(--bg-warm);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  white-space: nowrap;
  min-width: 140px;
}
.ap-td-label {
  padding: 9px 14px;
  font-size: 12px;
  color: var(--ink-2);
  border-top: 1px solid var(--line-soft);
}
.ap-td {
  text-align: right;
  padding: 9px 14px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-1);
  border-top: 1px solid var(--line-soft);
  border-left: 1px solid var(--line-soft);
}
.ap-row:hover .ap-td-label,
.ap-row:hover .ap-td { background: var(--bg-warm); }
.ap-row-bold .ap-td-label,
.ap-row-bold .ap-td { font-weight: 700; }
.ap-row-bold .ap-td { font-size: 13px; }
.ap-row-highlight .ap-td-label,
.ap-row-highlight .ap-td {
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 700;
}
.ap-row-highlight .ap-td { font-size: 14px; }
.ap-row-group-header .ap-block-header {
  padding: 5px 14px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-top: 1px solid var(--line);
}
.ap-block-header[data-block="A"] { background: oklch(0.97 0.008 240); color: oklch(0.45 0.10 240); }
.ap-block-header[data-block="B"] { background: oklch(0.97 0.008 70);  color: oklch(0.55 0.10 70); }
.ap-block-header[data-block="C"] { background: oklch(0.97 0.008 155); color: oklch(0.45 0.10 155); }
.ap-block-header[data-block="D"] { background: oklch(0.97 0.008 28);  color: oklch(0.50 0.12 28); }

.ap-td-indent { padding-left: 22px; }
.ap-block-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 999px;
  margin-right: 6px;
  vertical-align: middle;
}
.ap-block-dot[data-block="A"] { background: oklch(0.52 0.10 240); }
.ap-block-dot[data-block="B"] { background: oklch(0.62 0.10 70); }
.ap-block-dot[data-block="C"] { background: oklch(0.52 0.10 155); }
.ap-block-dot[data-block="D"] { background: oklch(0.55 0.12 28); }

.ap-expense-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--ink-3);
}
.ap-expense-legend .ap-block-dot { margin-right: 4px; }

/* Inline editable */
.ap-editable {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  border-bottom: 1px dashed var(--ink-4);
  padding-bottom: 1px;
  transition: border-color 0.15s;
}
.ap-editable:hover { border-color: var(--accent); color: var(--accent-ink); }
.ap-edit-icon {
  font-size: 10px;
  color: var(--ink-4);
  opacity: 0;
  transition: opacity 0.15s;
}
.ap-editable:hover .ap-edit-icon { opacity: 1; }
.ap-inline-input {
  width: 90px;
  text-align: right;
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: var(--mono);
  font-size: 12px;
  background: var(--bg-elev);
  color: var(--ink-1);
}

/* Badge RBE */
.ap-pct-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 500;
  color: var(--ink-3);
  margin-left: 4px;
  white-space: nowrap;
}
.ap-td-inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}

/* Badges colorés */
.ap-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--mono);
}
.badge-green { background: oklch(0.92 0.04 150); color: var(--score-excellent); }
.badge-yellow { background: oklch(0.94 0.04 70); color: var(--severity-warning); }
.badge-red { background: oklch(0.94 0.04 28); color: var(--severity-critical); }

/* Section 4 — Financement */
.ap-financing-inputs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.ap-fin-col {
  background: var(--bg-elev);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ap-fin-col-head {
  font-size: 12px;
  font-weight: 700;
  color: var(--col-color);
  margin-bottom: 4px;
  letter-spacing: 0.01em;
}
.ap-fin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  gap: 8px;
}
.ap-fin-label {
  color: var(--ink-3);
  font-size: 11px;
}

/* Section 5 — KPI */
.ap-kpi-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.ap-kpi-col {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border-top: 3px solid var(--col-color);
}
.ap-kpi-col-head {
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--col-color);
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev);
}
.ap-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
}
.ap-kpi-card {
  background: var(--bg-elev);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ap-kpi-label {
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
}
.ap-kpi-value {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-1);
}
.ap-kpi-value.pos { color: var(--score-excellent); }
.ap-kpi-value.neg { color: var(--score-avoid); }

/* Section 6 — Projection */
.ap-proj-selector {
  display: flex;
  gap: 4px;
}
.ap-proj-tab {
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  background: var(--bg);
  color: var(--ink-3);
}
.ap-proj-tab:hover { border-color: var(--ink-4); color: var(--ink-1); }
.ap-proj-tab.active {
  background: var(--col-color);
  border-color: var(--col-color);
  color: white;
}
.ap-projection-table { font-size: 12px; }
.ap-projection-table th {
  background: var(--bg-warm);
  padding: 8px 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: right;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.ap-projection-table th:first-child { text-align: left; }
.ap-projection-table td {
  padding: 8px 12px;
  text-align: right;
  font-family: var(--mono);
  font-size: 12px;
  border-top: 1px solid var(--line-soft);
}
.ap-projection-table td:first-child { text-align: left; font-family: var(--sans); font-weight: 600; }
.ap-row-alt td { background: var(--bg-warm); }
.ap-td-year { font-family: var(--mono); font-weight: 700; color: var(--ink-2); }
.ap-pos { color: var(--score-excellent); }
.ap-neg { color: var(--score-avoid); }

/* Section 7 — Tornado */
.ap-tornado-note {
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 16px;
}
.ap-tornado-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ap-tornado-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ap-tornado-label {
  width: 160px;
  flex-shrink: 0;
  font-size: 12px;
  color: var(--ink-2);
  text-align: right;
}
.ap-tornado-bars {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0;
  height: 28px;
}
.ap-tornado-neg-zone,
.ap-tornado-pos-zone {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
}
.ap-tornado-neg-zone { justify-content: flex-end; }
.ap-tornado-pos-zone { justify-content: flex-start; }
.ap-tornado-center {
  width: 2px;
  height: 100%;
  background: var(--ink-4);
  flex-shrink: 0;
}
.ap-tornado-bar {
  height: 22px;
  border-radius: 2px;
  display: flex;
  align-items: center;
  min-width: 4px;
  position: relative;
  transition: width 0.3s;
}
.ap-tornado-bar.pos { background: var(--score-excellent); justify-content: flex-start; }
.ap-tornado-bar.neg { background: var(--score-avoid); justify-content: flex-end; }
.ap-tornado-val {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  color: white;
  padding: 0 5px;
  white-space: nowrap;
  overflow: hidden;
}

/* Section 8 — Verdict */
.ap-verdict-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.ap-verdict-col {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border-top: 3px solid var(--col-color);
  display: flex;
  flex-direction: column;
  gap: 0;
}
.ap-verdict-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev);
}
.ap-verdict-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--col-color);
}
.ap-verdict-badge {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: white;
}
.verdict-excellent { background: var(--score-excellent); }
.verdict-good { background: var(--score-good); }
.verdict-fair { background: var(--score-fair); }
.verdict-avoid { background: var(--score-avoid); }

.ap-verdict-section {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
}
.ap-verdict-section:last-child { border-bottom: none; }
.ap-verdict-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.ap-verdict-section-title.ap-pos { color: var(--score-excellent); }
.ap-verdict-section-title.ap-neg { color: var(--score-avoid); }
.ap-verdict-item {
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.4;
  margin-bottom: 5px;
}
.ap-verdict-item.ap-pos { color: var(--score-excellent); }
.ap-verdict-item.ap-neg { color: var(--score-avoid); }
.ap-finançable {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
}
.ap-finançable.ap-pos { color: var(--score-excellent); }
.ap-finançable.ap-neg { color: var(--score-avoid); }
.ap-feu { font-size: 14px; }
.ap-alt-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 3px 0;
}
.ap-alt-label { color: var(--ink-2); flex: 1; }
.ap-alt-rate { font-family: var(--mono); font-weight: 600; color: var(--ink-1); }

/* Export & footer */
.ap-export-bar {
  display: flex;
  justify-content: center;
  padding: 32px 0 8px;
}
.ap-print-btn-lg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 600;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
}
.ap-print-btn-lg:hover { background: var(--accent-ink); }
.ap-methodology {
  font-size: 11px;
  color: var(--ink-3);
  line-height: 1.5;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 8px;
}

/* Drawer — bouton Analyse complète */
.drawer-mini-nav-divider {
  width: 1px;
  height: 20px;
  background: var(--line);
  flex-shrink: 0;
  margin: 0 2px;
}
.drawer-analyze-btn {
  background: var(--accent) !important;
  color: var(--accent-fg) !important;
  border-color: var(--accent) !important;
  font-weight: 600 !important;
}
.drawer-analyze-btn:hover {
  background: var(--accent-ink) !important;
  border-color: var(--accent-ink) !important;
  color: white !important;
}

/* ===================================================================
   USER PROFILE MODAL
   =================================================================== */
.upm-backdrop {
  position: fixed;
  inset: 0;
  background: oklch(0.18 0.012 85 / 0.45);
  z-index: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.upm-panel {
  background: var(--bg);
  border-radius: var(--radius-xl);
  width: min(560px, 100%);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.upm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.upm-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink-1);
}
.upm-close {
  width: 32px; height: 32px;
  border-radius: 999px;
  background: var(--bg-warm);
  border: none;
  display: grid; place-items: center;
  color: var(--ink-2);
}
.upm-close:hover { color: var(--ink-1); background: var(--line-soft); }

.upm-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 24px 8px;
}
.upm-section {
  padding: 20px 0;
  border-bottom: 1px solid var(--line-soft);
}
.upm-section:last-child { border-bottom: none; }
.upm-section-title {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-1);
  margin: 0 0 14px;
}
.upm-row {
  margin-bottom: 14px;
}
.upm-row:last-child { margin-bottom: 0; }
.upm-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.upm-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
}
.upm-display {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-ink);
}
.upm-note {
  font-size: 11px;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.upm-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  outline: none;
}
.upm-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 999px;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 1px 4px oklch(0.18 0.012 85 / 0.2);
}
.upm-slider::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 999px;
  background: var(--accent);
  cursor: pointer;
  border: none;
}
.upm-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--ink-4);
  margin-top: 3px;
}
.upm-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.upm-chip {
  padding: 5px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: var(--bg);
  color: var(--ink-2);
}
.upm-chip:hover { border-color: var(--ink-4); color: var(--ink-1); }
.upm-chip.active { background: var(--accent); border-color: var(--accent); color: white; }

.upm-toggles {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}
.upm-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}
.upm-toggle {
  position: relative;
  width: 36px; height: 20px;
  background: var(--line);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s;
}
.upm-toggle.on { background: var(--accent); }
.upm-toggle-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 999px;
  background: white;
  transition: left 0.2s;
  box-shadow: 0 1px 3px oklch(0.18 0.012 85 / 0.2);
}
.upm-toggle.on .upm-toggle-thumb { left: 18px; }

.upm-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  background: var(--bg-elev);
  flex-shrink: 0;
  flex-wrap: wrap;
}
.upm-footer-left { display: flex; gap: 8px; flex-wrap: wrap; }
.upm-btn-sm { padding: 7px 14px !important; font-size: 12px !important; }
.upm-btn-save { min-width: 120px; }
.upm-btn-save.saved { background: var(--score-excellent) !important; }
.upm-import-label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

/* ===================================================================
   PRINT MEDIA — masquer nav, 3 colonnes côte à côte
   =================================================================== */
@media print {
  .ap-header,
  .ap-copy-bar,
  .ap-back-btn,
  .ap-header-actions,
  .ap-export-bar,
  .drawer-overlay,
  .drawer { display: none !important; }

  .ap-root { min-height: unset; }
  .ap-content { padding: 0; }
  .ap-scenario-header { break-inside: avoid; }
  .ap-section { break-inside: avoid; page-break-inside: avoid; }

  /* 3 colonnes en impression */
  .ap-kpi-cols,
  .ap-verdict-cols,
  .ap-financing-inputs {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .ap-table { font-size: 10px; }
  .ap-th-col, .ap-td { padding: 5px 8px; }
}

/* ===================================================================
   RESPONSIVE AnalyzePage ≤ 900px
   =================================================================== */
@media (max-width: 900px) {
  .ap-header { padding: 0 14px; gap: 10px; }
  .ap-content { padding: 0 14px 60px; }
  .ap-copy-bar { padding: 8px 14px; }

  .ap-scenario-header {
    display: none; /* caché sur mobile, remplacé par tabs */
  }

  /* Sur mobile, scénarios en onglets via les proj-tabs */
  .ap-kpi-cols,
  .ap-verdict-cols {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .ap-financing-inputs {
    grid-template-columns: 1fr;
  }

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

  .ap-tornado-label { width: 100px; font-size: 11px; }

  .ap-header-price { font-size: 16px; }
  .ap-header-address { font-size: 13px; }
  .ap-header-actions .ap-print-btn { display: none; }

  .ap-table-wrap { border-radius: var(--radius); }
  .ap-th-col, .ap-td { min-width: 110px; }
}

/* ===================================================================
   ONBOARDING WIZARD
   =================================================================== */

.onboarding-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}

.onboarding-card {
  background: var(--bg-elev);
  border-radius: 16px;
  max-width: 1100px;
  width: 100%;
  box-shadow: 0 24px 64px oklch(0.18 0.012 85 / 0.28), 0 4px 16px oklch(0.18 0.012 85 / 0.12);
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

.onboarding-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
}

.onboarding-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.onboarding-progress {
  display: flex;
  align-items: center;
  gap: 8px;
}

.onboarding-progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  transition: all 0.2s;
}
.onboarding-progress-dot.active {
  background: var(--accent);
  width: 24px;
  border-radius: 4px;
}
.onboarding-progress-dot.done {
  background: var(--accent-soft);
  border: 1.5px solid var(--accent);
}

.onboarding-step-label {
  font-size: 12px;
  color: var(--ink-3);
  font-family: var(--mono);
  flex-shrink: 0;
}

.onboarding-step { display: flex; flex-direction: column; gap: 0; }
.onboarding-step-content { flex: 1; }

.onboarding-title {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  color: var(--ink-1);
  margin: 0 0 8px 0;
  line-height: 1.2;
}

.onboarding-subtitle {
  font-size: 15px;
  color: var(--ink-3);
  margin: 0 0 28px 0;
}

.onboarding-strategy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 900px) {
  .onboarding-strategy-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 500px) {
  .onboarding-strategy-grid { grid-template-columns: 1fr; }
}

.onboarding-strategy-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 20px;
  border: 2px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.18s, transform 0.18s, background 0.18s, box-shadow 0.18s;
  background: var(--bg-elev);
  text-align: left;
}

.onboarding-strategy-card:hover {
  border-color: var(--accent-soft);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px oklch(0.18 0.012 85 / 0.08);
}

.onboarding-strategy-card.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.onboarding-check-mark {
  position: absolute;
  top: 12px; right: 12px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-fg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.onboarding-card-icon { display: block; color: var(--accent); }

.onboarding-card-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--ink-1);
  line-height: 1.2;
}

.onboarding-card-desc { font-size: 13px; color: var(--ink-3); }

.onboarding-card-bullets {
  margin: 0;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.onboarding-card-bullets li { font-size: 12px; color: var(--ink-3); }

.lucide-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lucide-icon svg { width: var(--icon-size, 24px); height: var(--icon-size, 24px); }
.onboarding-card-icon .lucide-icon svg { width: 40px; height: 40px; }

.onboarding-financial-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 8px;
}

@media (max-width: 700px) {
  .onboarding-financial-grid { grid-template-columns: 1fr; }
}

.onboarding-financial-col { display: flex; flex-direction: column; gap: 16px; }

.onboarding-col-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-3);
  margin: 0 0 4px 0;
}

.onboarding-field { display: flex; flex-direction: column; gap: 6px; }

.onboarding-field-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.onboarding-field-label { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.onboarding-field-value { font-size: 13px; font-family: var(--mono); color: var(--ink-1); font-weight: 600; }
.onboarding-slider { width: 100%; accent-color: var(--accent); }

.onboarding-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
}

.onboarding-recap-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px; height: 72px;
  background: var(--accent-soft);
  border-radius: 50%;
  margin-bottom: 20px;
  color: var(--accent);
}

.onboarding-recap-icon .lucide-icon svg { width: 40px; height: 40px; }

.onboarding-summary-text {
  font-size: 16px;
  color: var(--ink-2);
  line-height: 1.6;
  margin: 0 0 28px 0;
  max-width: 640px;
}

.onboarding-recap-params {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 420px;
}

.onboarding-recap-param {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-warm);
  border-radius: 8px;
}

.onboarding-recap-param-icon { color: var(--accent); flex-shrink: 0; display: flex; align-items: center; }
.onboarding-recap-param-label { font-size: 13px; color: var(--ink-2); flex: 1; }
.onboarding-recap-param-value { font-size: 14px; font-weight: 600; font-family: var(--mono); color: var(--ink-1); }

.onboarding-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
}

.onboarding-btn-primary { min-width: 180px; }
.onboarding-btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }

.onboarding-skip-link {
  font-size: 13px;
  color: var(--ink-3);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  margin-right: auto;
}

.onboarding-skip-link:hover { color: var(--ink-2); }

.onboarding-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink-3);
  padding: 4px 0;
  margin-bottom: 4px;
}

.onboarding-back-btn:hover { color: var(--ink-1); }

@media (max-width: 700px) {
  .onboarding-card { padding: 24px 20px; }
  .onboarding-title { font-size: 22px; }
}

/* ===================================================================
   PROFILE CHIP (header)
   =================================================================== */

.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-warm);
  border: 1px solid var(--line);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  font-family: inherit;
}

.profile-chip:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.profile-chip-icon {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
}

.profile-chip-icon svg { width: 16px; height: 16px; }
.profile-chip-label { font-weight: 500; color: var(--ink-1); }

@media (max-width: 600px) {
  .profile-chip-label { display: none; }
}

/* ===================================================================
   UPM STRATEGY SELECTOR
   =================================================================== */

.upm-strategy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}

@media (max-width: 600px) {
  .upm-strategy-grid { grid-template-columns: repeat(2, 1fr); }
}

.upm-strategy-btn {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s;
  background: var(--bg-elev);
  color: var(--ink-2);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upm-strategy-btn:hover { border-color: var(--accent-soft); color: var(--ink-1); }

.upm-strategy-btn.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--ink-1);
  font-weight: 500;
}

/* === FILTERS — nouveaux champs PR #11 === */

/* Groupe de toggles exclusifs (bedrooms / bathrooms) */
.filter-toggle-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.filter-toggle-btn {
  padding: 4px 12px;
  border-radius: 20px;
  border: 1.5px solid var(--line);
  background: var(--bg);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  line-height: 1.4;
}

.filter-toggle-btn:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
}

.filter-toggle-btn.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 600;
}

/* Séparateur de section dans le popover "Plus de filtres" */
.popover-section-title + .filter-toggle-group {
  margin-top: 6px;
}

/* ──── Skeleton Loading ──── */
@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.skeleton-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.skeleton-image {
  aspect-ratio: 4/3;
  background: linear-gradient(90deg, var(--line) 25%, var(--line-soft) 50%, var(--line) 75%);
  background-size: 200% 100%;
  animation: pulse 2s infinite;
}

.skeleton-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.skeleton-price {
  height: 24px;
  background: var(--line-soft);
  border-radius: 4px;
  width: 60%;
  animation: pulse 2s infinite;
}

.skeleton-meta {
  height: 12px;
  background: var(--line-soft);
  border-radius: 3px;
  width: 100%;
  animation: pulse 2s infinite;
}

.skeleton-address {
  height: 14px;
  background: var(--line-soft);
  border-radius: 3px;
  width: 95%;
  margin-top: 4px;
  animation: pulse 2s infinite;
}

.skeleton-kpis {
  display: flex;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  margin-top: auto;
}

.skeleton-kpi {
  flex: 1;
  height: 32px;
  background: var(--line-soft);
  border-radius: 4px;
  animation: pulse 2s infinite;
}

/* ──── Empty State ──── */
.empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  text-align: center;
}

.empty-state-icon {
  width: 80px;
  height: 80px;
  color: var(--ink-3);
  margin-bottom: 24px;
  opacity: 0.7;
}

.empty-state-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink-1);
  margin: 0 0 8px;
}

.empty-state-subtitle {
  font-size: 14px;
  color: var(--ink-2);
  margin: 0 0 28px;
  line-height: 1.5;
}

.empty-state-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 500px;
}

.btn-empty-state {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-empty-state:hover {
  background: var(--accent);
  color: var(--accent-fg);
}

.btn-empty-state svg {
  flex-shrink: 0;
}

/* ── Section 9 : Fiscalité ───────────────────────────────────────────────── */
.ap-fisc-note {
  font-size: 12px;
  color: var(--muted);
  background: var(--surface-alt, #f7f7f5);
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 16px;
  line-height: 1.5;
}

.ap-fisc-subtitle {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 10px 0;
  padding-left: 2px;
}

.ap-fisc-disclaimer {
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--border-light, #e5e5e0);
  padding-top: 10px;
  margin-top: 16px;
  font-style: italic;
  line-height: 1.5;
}

/* ---- HypothesesStrip ---- */
.hypotheses-strip {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  height: 48px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  font-size: 12px;
  color: var(--ink-1, #374151);
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}
.hypotheses-strip::-webkit-scrollbar { display: none; }

.hypotheses-strip-label {
  font-weight: 600;
  font-size: 12px;
  color: var(--ink-1, #374151);
  white-space: nowrap;
  flex-shrink: 0;
}

.hypotheses-strip-control {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  white-space: nowrap;
}

.hypotheses-strip-control-label {
  font-size: 12px;
  color: var(--ink-2, #6b7280);
  white-space: nowrap;
}

.hypotheses-strip-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-1, #374151);
  min-width: 36px;
  text-align: right;
  font-family: var(--mono, monospace);
}

.hyp-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 120px;
  height: 4px;
  border-radius: 2px;
  background: #d1d5db;
  outline: none;
  cursor: pointer;
  accent-color: #1a56db;
}
.hyp-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #1a56db;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.hyp-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #1a56db;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.hyp-chips {
  display: flex;
  gap: 4px;
  align-items: center;
}

.hyp-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  font-size: 11px;
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 6px;
  color: #6b7280;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s;
  white-space: nowrap;
}
.hyp-chip:hover {
  border-color: #1a56db;
  color: #1a56db;
}
.hyp-chip.active {
  background: #1a56db;
  color: #fff;
  border-color: #1a56db;
  font-weight: 600;
}

.hyp-sep {
  width: 1px;
  height: 20px;
  background: #e5e7eb;
  flex-shrink: 0;
}

.hyp-collapse-btn {
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #6b7280;
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s;
  white-space: nowrap;
}
.hyp-collapse-btn:hover {
  border-color: #374151;
  color: #374151;
}

.hyp-summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  font-size: 12px;
  color: #1e40af;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s;
  white-space: nowrap;
}
.hyp-summary-chip:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}

/* Collapsed strip : réduit à 36px */
.hypotheses-strip.collapsed {
  height: 36px;
  gap: 10px;
}
