:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  --ink: #14202c;
  --muted: #5c6a78;
  --paper: #f6f8fa;
  --surface: #ffffff;
  --line: #d5dee6;
  /* Palette Cadastro : bleu nuit du logo, vert de la coche. */
  --navy: #16345a;
  --navy-dark: #0e2440;
  --green: #5aa632;
  --green-dark: #46801f;
  --blue: #16345a;
  --orange: #dc7826;
  --purple: #7045a0;
  --shadow: 0 16px 40px rgb(22 52 90 / 10%);
  --shadow-hover: 0 20px 44px rgb(22 52 90 / 16%);
  --radius: 14px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }

/* Confort visuel additionnel : cartes et boutons plus arrondis et plus
   réactifs au survol, sans modifier la structure ni les classes existantes. */
.process-step,
.search-panel,
.selection-panel,
.address-suggestions {
  border-radius: var(--radius);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), border-color .15s var(--ease);
}
.process-step:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
.primary-link,
.utility-button,
button {
  transition: transform .1s var(--ease), box-shadow .15s var(--ease), background-color .15s var(--ease), border-color .15s var(--ease);
}
.primary-link:hover,
.utility-button:hover:not(:disabled) {
  transform: translateY(-1px);
}
.primary-link:active,
button:active { transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .process-step, .primary-link, .utility-button, button { transition: none !important; transform: none !important; }
}

/* Repli minimal si la feuille externe Leaflet tarde à être disponible. */
.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer { position: absolute; left: 0; top: 0; }
.leaflet-container { overflow: hidden; }
.leaflet-map-pane { z-index: 400; }
.leaflet-tile-pane { z-index: 200; }
.leaflet-overlay-pane { z-index: 400; }
.leaflet-shadow-pane { z-index: 500; }
.leaflet-marker-pane { z-index: 600; }
.leaflet-tooltip-pane { z-index: 650; }
.leaflet-popup-pane { z-index: 700; }
.leaflet-zoom-animated { transform-origin: 0 0; }
.leaflet-pane > svg path { pointer-events: none; }
.leaflet-pane > svg path.leaflet-interactive { cursor: pointer; pointer-events: auto; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

button, input, textarea { font: inherit; }

.hero {
  padding: 2rem clamp(1rem, 5vw, 5rem) 1.5rem;
  color: white;
  background: linear-gradient(125deg, #0b4935, #147352 60%, #21906b);
}

.hero > div, .layout { max-width: 1440px; margin: 0 auto; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: .6rem; font-size: clamp(2rem, 4vw, 3.4rem); }
.intro { max-width: 760px; margin-bottom: 0; line-height: 1.55; }
.eyebrow { margin-bottom: .35rem; font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }

.layout { padding: 1.5rem clamp(1rem, 4vw, 3rem) 3rem; }
.process-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: .8rem; margin-bottom: 1.25rem; }
.process-step { display: grid; gap: .28rem; min-height: 118px; padding: 1rem; border: 2px solid var(--line); text-align: left; color: var(--ink); background: white; box-shadow: var(--shadow); }
.process-step:hover:not(:disabled), .process-step.active { border-color: var(--green); color: var(--ink); background: #edf7f2; }
.process-step span { color: var(--green); font-size: .74rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.process-step strong { font-size: 1.05rem; }
.process-step small { color: var(--muted); line-height: 1.35; }
.search-panel, .selection-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.search-panel { padding: 1.25rem; margin-bottom: 1.25rem; }
.search-row { display: flex; gap: .75rem; }
.address-autocomplete { position: relative; flex: 1; min-width: 0; }
.address-autocomplete input { width: 100%; }
.address-suggestions {
  position: absolute;
  z-index: 1100;
  top: calc(100% + .3rem);
  right: 0;
  left: 0;
  max-height: 18rem;
  margin: 0;
  padding: .3rem;
  overflow-y: auto;
  list-style: none;
  border: 1px solid #9eaca3;
  border-radius: 10px;
  background: white;
  box-shadow: 0 12px 28px rgb(23 33 27 / 18%);
}
.address-suggestions[hidden] { display: none; }
.address-suggestion {
  display: block;
  width: 100%;
  padding: .7rem .8rem;
  border-radius: 7px;
  text-align: left;
  color: var(--ink);
  background: transparent;
  font-weight: 650;
}
.address-suggestion:hover,
.address-suggestion.active {
  color: var(--ink);
  background: #e6f1ec;
}
label { display: block; margin-bottom: .5rem; font-weight: 700; }
input { flex: 1; min-width: 0; padding: .8rem 1rem; border: 1px solid #9eaca3; border-radius: 10px; color: var(--ink); background: white; }
input:focus { outline: 3px solid rgb(39 100 197 / 18%); border-color: var(--blue); }
textarea { width: 100%; padding: .8rem 1rem; border: 1px solid #9eaca3; border-radius: 10px; resize: vertical; color: var(--ink); }
textarea:focus { outline: 3px solid rgb(39 100 197 / 18%); border-color: var(--blue); }
button { padding: .8rem 1rem; border: 0; border-radius: 10px; color: white; background: var(--green); font-weight: 800; cursor: pointer; }
button:hover:not(:disabled) { background: var(--green-dark); }
button:disabled { cursor: not-allowed; opacity: .45; }
button.secondary { color: var(--green-dark); background: #e6f1ec; }
.plu-file-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .65rem; }
.plu-file-link {
  display: inline-flex;
  align-items: center;
  padding: .8rem 1rem;
  border-radius: 10px;
  color: var(--green-dark);
  background: #e6f1ec;
  font-weight: 800;
  text-decoration: none;
}
.plu-file-link:hover { background: #d4e8df; }
.status { min-height: 1.4rem; margin: .75rem 0 0; color: var(--muted); }
.status.error { color: #a1271c; font-weight: 700; }

.workspace { display: grid; grid-template-columns: minmax(0, 2fr) minmax(290px, .8fr); gap: 1.25rem; align-items: start; }
.workspace[hidden] { display: none !important; }
.map-panel { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #dce8e2; box-shadow: var(--shadow); }
#map { width: 100%; height: min(70vh, 760px); min-height: 520px; }
.legend { position: absolute; z-index: 500; left: 12px; bottom: 12px; display: flex; flex-wrap: wrap; gap: .7rem; padding: .65rem .8rem; border-radius: 10px; background: rgb(255 255 255 / 92%); box-shadow: 0 5px 18px rgb(0 0 0 / 16%); font-size: .78rem; }
.swatch { display: inline-block; width: 16px; height: 12px; margin-right: .3rem; border: 2px solid; vertical-align: -1px; }
.swatch-default { border-color: #66736b; background: rgb(130 144 137 / 13%); }
.swatch-auto { border-color: var(--orange); background: rgb(220 120 38 / 25%); }
.swatch-selected { border-color: var(--green-dark); background: rgb(18 107 78 / 55%); }
.swatch-confirmed { border-color: #452270; background: rgb(112 69 160 / 62%); }

.selection-panel { display: grid; gap: 1.25rem; padding: 1.25rem; }
.muted { color: var(--muted); line-height: 1.45; }
.exploration { display: grid; gap: .55rem; margin-top: .8rem; }
.exploration[hidden] { display: none; }
.exploration .muted { min-height: 1.3rem; margin: 0; font-size: .86rem; }
.scope-notice { margin: 0; padding: .8rem; border-left: 4px solid var(--blue); background: #eef4ff; line-height: 1.45; font-size: .9rem; }
.decision { padding: 1rem; border: 1px solid var(--line); border-radius: 12px; line-height: 1.5; }
.decision h3 { margin-bottom: .45rem; }
.decision p:last-child { margin-bottom: 0; }
.decision.high-confidence { border-color: #e6a56d; background: #fff5eb; }
.decision.uncertain { border-color: #b8c3bd; background: #f2f5f3; }
.proposal { margin-top: .9rem; padding-top: .8rem; border-top: 1px solid rgb(23 33 27 / 12%); }
.proposal-list { display: grid; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.proposal-list li { padding: .5rem .65rem; border: 2px solid var(--orange); border-radius: 8px; background: #fff; color: #733a0d; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 800; }
.selected-list { min-height: 4rem; margin: 0; padding: 0; list-style: none; }
.selected-list li { margin-bottom: .45rem; padding: .55rem .7rem; border-radius: 8px; background: #e9f4ef; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; }
.selected-list li.empty-selection { color: var(--muted); background: #f0f2f0; font-family: inherit; font-weight: 400; }
.actions { display: grid; gap: .65rem; }
.warning { margin-bottom: 0; padding: .9rem; border-left: 4px solid var(--orange); background: #fff4e8; line-height: 1.45; font-size: .9rem; }
.confirmation { scroll-margin-top: 1rem; padding: 1rem; border: 2px solid var(--purple); border-radius: 12px; background: #f8f4fc; }
.confirmation:focus { outline: 3px solid rgb(69 34 112 / 22%); outline-offset: 3px; }
.confirmation-summary { display: grid; gap: .7rem; margin: 0 0 1rem; }
.confirmation-summary div { display: grid; grid-template-columns: minmax(115px, .8fr) minmax(0, 1.4fr); gap: .75rem; padding-bottom: .55rem; border-bottom: 1px solid rgb(69 34 112 / 15%); }
.confirmation-summary dt { color: var(--muted); font-weight: 700; }
.confirmation-summary dd { margin: 0; overflow-wrap: anywhere; font-weight: 700; }
.confirmed-parcels { display: grid; gap: .65rem; }
.confirmed-parcel { padding: .75rem; border: 1px solid rgb(69 34 112 / 28%); border-radius: 9px; background: white; }
.confirmed-parcel h4 { margin: 0 0 .25rem; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.confirmed-parcel p { margin: 0; color: var(--muted); }
.legal-notice { margin: 1rem 0; padding: .8rem; border-left: 4px solid var(--purple); background: white; line-height: 1.45; font-size: .9rem; }
.confirmation-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem; }
.confirmation details { margin-top: .9rem; }
.confirmation summary { cursor: pointer; font-weight: 700; }
.confirmation pre { overflow: auto; max-height: 340px; padding: .8rem; border-radius: 8px; background: #14231b; color: #dff5e8; font-size: .74rem; white-space: pre-wrap; }
.parcel-label { padding: 0; border: 0; background: rgb(255 255 255 / 86%); color: #152018; box-shadow: 0 1px 4px rgb(0 0 0 / 22%); pointer-events: auto; }
.parcel-label-button { padding: 1px 4px; border: 0; border-radius: 0; color: inherit; background: transparent; font-size: 10px; font-weight: 800; cursor: pointer; }
.parcel-label-button:hover:not(:disabled) { color: white; background: var(--green-dark); }
.parcel-label-button:focus { outline: 3px solid rgb(39 100 197 / 45%); outline-offset: 2px; }
.address-marker { filter: hue-rotate(120deg) saturate(1.2); }
.zoning { scroll-margin-top: 1rem; padding: 1rem; border: 2px solid #2764c5; border-radius: 12px; background: #f3f7ff; }
.zoning:focus { outline: 3px solid rgb(39 100 197 / 22%); outline-offset: 3px; }
.zoning-status { padding: .8rem; border-left: 4px solid #2764c5; background: white; line-height: 1.45; font-weight: 700; }
.zoning-status-rnu, .zoning-status-requires_verification { border-left-color: var(--orange); background: #fff7ee; }
.zoning-status-not_found, .zoning-error { padding: .8rem; border-left: 4px solid #a1271c; background: #fff3f1; color: #841d15; font-weight: 700; }
.zoning-summary { display: grid; gap: .55rem; margin: 1rem 0; }
.zoning-summary div { display: grid; grid-template-columns: minmax(120px, .8fr) minmax(0, 1.4fr); gap: .7rem; padding-bottom: .45rem; border-bottom: 1px solid rgb(39 100 197 / 16%); }
.zoning-summary dt { color: var(--muted); font-weight: 700; }
.zoning-summary dd { margin: 0; overflow-wrap: anywhere; font-weight: 700; }
.zoning-list { display: grid; gap: .45rem; margin: 0 0 1rem; padding-left: 1.2rem; }
.zoning-list li { line-height: 1.45; }
.zone-override { display: grid; gap: .7rem; margin: 0 0 1rem; }
.zone-override-warning { margin: 0; }
.zone-override-form { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.zone-override-form label { font-weight: 700; color: var(--muted); }
.zone-override-form input { flex: 1 1 10rem; min-width: 8rem; padding: .6rem .7rem; border: 1px solid rgb(39 100 197 / 30%); border-radius: 8px; font: inherit; }
.zone-override-active { margin: 0; }
.zone-override-clear { align-self: flex-start; }
.zoning-source { padding-top: .75rem; border-top: 1px solid rgb(39 100 197 / 18%); color: var(--muted); font-size: .88rem; line-height: 1.45; }
.constraints-actions { display: flex; justify-content: flex-start; margin-top: 1rem; }
.heritage { scroll-margin-top: 1rem; padding: 1rem; border: 2px solid #9b5c12; border-radius: 12px; background: #fff9ef; }
.heritage:focus { outline: 3px solid rgb(155 92 18 / 22%); outline-offset: 3px; }
.heritage-status { padding: .8rem; border-left: 4px solid #9b5c12; background: white; line-height: 1.45; font-weight: 700; }
.heritage-status-no_protection_detected { border-left-color: var(--green-dark); background: #f0f8f4; }
.heritage-status-source_unavailable, .heritage-status-requires_human_verification { border-left-color: var(--orange); background: #fff4e8; }
.heritage-protection { margin-top: .85rem; padding: .9rem; border: 1px solid rgb(155 92 18 / 30%); border-radius: 10px; background: white; }
.heritage-protection h4 { margin: 0 0 .7rem; }
.heritage-summary { display: grid; gap: .45rem; margin: 0; }
.heritage-summary div { display: grid; grid-template-columns: minmax(140px, .8fr) minmax(0, 1.4fr); gap: .7rem; padding-bottom: .4rem; border-bottom: 1px solid rgb(155 92 18 / 14%); }
.heritage-summary dt { color: var(--muted); font-weight: 700; }
.heritage-summary dd { margin: 0; overflow-wrap: anywhere; font-weight: 700; }
.heritage-document { line-height: 1.45; }
.heritage-document a { color: #6d3b04; font-weight: 800; }
.heritage-warnings { padding-left: 1.2rem; color: #74420c; line-height: 1.45; }
.heritage-legal { margin: 1rem 0 0; padding: .9rem; border-left: 4px solid var(--orange); background: #fff4e8; line-height: 1.5; font-weight: 700; }
.heritage-error { padding: .8rem; border-left: 4px solid #a1271c; background: #fff3f1; color: #841d15; font-weight: 700; }
.risks { scroll-margin-top: 1rem; padding: 1rem; border: 2px solid #315d78; border-radius: 12px; background: #f3f9fc; }
.risks:focus { outline: 3px solid rgb(49 93 120 / 22%); outline-offset: 3px; }
.risks-status { padding: .8rem; border-left: 4px solid #315d78; background: white; line-height: 1.45; font-weight: 700; }
.risks-status-no_risk_plan_detected { border-left-color: var(--green-dark); background: #f0f8f4; }
.risks-status-source_unavailable, .risks-status-partial_result, .risks-status-requires_local_document_check { border-left-color: var(--orange); background: #fff4e8; }
.risk-plan { margin-top: .85rem; padding: .9rem; border: 1px solid rgb(49 93 120 / 30%); border-radius: 10px; background: white; }
.risk-plan h4 { margin: 0 0 .7rem; }
.risk-summary { display: grid; gap: .45rem; margin: 0; }
.risk-summary div { display: grid; grid-template-columns: minmax(140px, .8fr) minmax(0, 1.4fr); gap: .7rem; padding-bottom: .4rem; border-bottom: 1px solid rgb(49 93 120 / 14%); }
.risk-summary dt { color: var(--muted); font-weight: 700; }
.risk-summary dd { margin: 0; overflow-wrap: anywhere; font-weight: 700; }
.risk-zone { margin-top: .7rem; padding: .7rem; border-left: 4px solid #315d78; background: #eef6fa; }
.risk-document a { color: #174963; font-weight: 800; }
.risk-warnings { padding-left: 1.2rem; color: #5d4612; line-height: 1.45; }
.risks-legal { margin: 1rem 0 0; padding: .9rem; border-left: 4px solid var(--orange); background: #fff4e8; line-height: 1.5; font-weight: 700; }
.risks-error { padding: .8rem; border-left: 4px solid #a1271c; background: #fff3f1; color: #841d15; font-weight: 700; }
.plu-panel { scroll-margin-top: 1rem; padding: 1rem; border: 2px solid #126b4e; border-radius: 12px; background: #f2f8f5; }
.plu-panel:focus { outline: 3px solid rgb(18 107 78 / 22%); outline-offset: 3px; }
.plu-context { margin: 1rem 0; padding: .85rem; border-radius: 10px; background: white; }
.checkbox-row { display: flex; gap: .55rem; align-items: center; margin: .7rem 0 0; font-weight: 650; }
.checkbox-row input { flex: 0 0 auto; width: 18px; height: 18px; }
.plu-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; margin-top: 1rem; padding: .3rem; border-radius: 11px; background: #dfeae5; }
.plu-tab { color: var(--green-dark); background: transparent; }
.plu-tab:hover:not(:disabled) { color: white; }
.plu-tab.active { color: white; background: var(--green); }
.plu-tab-pane { padding: 1rem 0 .25rem; }
.plu-tab-pane form { display: grid; gap: .75rem; }
.plu-tab-pane input[type="file"] { width: 100%; padding: .65rem; background: white; }
.plu-file-card { margin-top: .65rem; padding: .8rem; border: 1px solid rgb(18 107 78 / 28%); border-radius: 10px; background: white; }
.plu-file-card strong { display: block; margin-bottom: .3rem; overflow-wrap: anywhere; }
.plu-file-name {
  display: block;
  margin-bottom: .3rem;
  color: var(--green-dark);
  font-weight: 850;
  overflow-wrap: anywhere;
}
.plu-file-name:hover { text-decoration-thickness: 2px; }
.plu-file-card > button { margin-top: .55rem; }
.plu-recommended { display: inline-block; margin-left: .4rem; padding: .15rem .45rem; border-radius: 999px; color: #69420c; background: #fff0cf; font-size: .72rem; }
.plu-loading { margin-top: 1rem; padding: .9rem; border-left: 4px solid var(--blue); background: #eef4ff; font-weight: 700; }
.plu-brief { margin-top: 1rem; padding: 1rem; border: 2px solid var(--green); border-radius: 12px; background: white; }
.plu-level { color: var(--green-dark); font-weight: 850; }
.plu-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: .55rem; margin: .8rem 0; }
.plu-kpi { padding: .65rem; border-radius: 8px; background: #eaf4ef; }
.plu-kpi strong { display: block; font-size: 1.2rem; color: var(--green-dark); }
.plu-brief li { margin-bottom: .45rem; line-height: 1.4; }
.plu-details { margin-top: .8rem; }
.plu-details summary { cursor: pointer; font-weight: 750; }
.plu-details pre { overflow: auto; max-height: 360px; padding: .8rem; border-radius: 8px; background: #14231b; color: #dff5e8; font-size: .7rem; white-space: pre-wrap; }
.plu-universal { margin-top: 1rem; }
.plu-completeness { padding: .65rem .8rem; border-radius: 8px; background: #f2f7f4; }
.plu-table-scroll { overflow-x: auto; border: 1px solid #d7e3dc; border-radius: 10px; }
.plu-table { width: 100%; min-width: 980px; border-collapse: collapse; font-size: .86rem; }
.plu-table th, .plu-table td { padding: .7rem; border-bottom: 1px solid #e2e9e5; text-align: left; vertical-align: top; line-height: 1.35; }
.plu-table thead th { position: sticky; top: 0; background: #173f2b; color: white; }
.plu-table tbody th { min-width: 180px; color: var(--green-dark); }
.plu-table tbody tr:nth-child(even) { background: #f8fbf9; }
.plu-status { min-width: 90px; font-weight: 750; }
.plu-status-renseigne { color: #12683c; }
.plu-status-a-verifier { color: #8b5a00; }
.plu-status-non-repere { color: #8c2f39; }
.plu-error { margin-top: .8rem; padding: .8rem; border-left: 4px solid #a1271c; background: #fff3f1; color: #841d15; font-weight: 700; }
.site-plan-panel { scroll-margin-top: 1rem; padding: 1rem; border: 2px solid #452270; border-radius: 12px; background: #faf7fd; }
.site-plan-panel:not([hidden]) { position: fixed; top: 2vh; right: 2vw; bottom: 2vh; width: min(52vw, 900px); z-index: 3000; overflow: auto; padding: 1.1rem; box-shadow: 0 20px 70px rgb(18 25 21 / 42%); }
.site-plan-close { position: sticky; top: 0; float: right; z-index: 2; padding: .65rem 1rem; background: #452270; color: white; }
.site-plan-panel:focus { outline: 3px solid rgb(69 34 112 / 22%); outline-offset: 3px; }
.site-plan-layout { display: grid; gap: 1rem; }
.site-plan-drawing { overflow: hidden; border: 1px solid #b9abc7; border-radius: 12px; background: white; }
#site-plan-canvas { display: block; width: 100%; height: auto; aspect-ratio: 14 / 9; min-height: 0; background: #fcfcfa; }
.site-plan-legend { display: flex; flex-wrap: wrap; gap: 1rem; padding: .65rem .8rem; border-top: 1px solid var(--line); font-size: .78rem; }
.plan-swatch { display: inline-block; width: 18px; height: 10px; margin-right: .3rem; border: 2px solid; }
.plan-swatch.parcel { border-color: #b42318; background: rgb(180 35 24 / 8%); }
.plan-swatch.project { border-color: #126b4e; background: rgb(18 107 78 / 35%); }
.plan-swatch.dimension { border-color: #2764c5; }
.plan-swatch.street { border-color: #4e5660; background: #d9dde0; }
.plan-swatch.buildable { border-color: #a36b00; background: rgb(244 185 66 / 20%); }
.site-plan-controls, .plan-heights { padding: .9rem; border-radius: 10px; background: white; }
.boundary-reading { padding: 1rem; border: 1px solid #b9abc7; border-radius: 12px; background: white; }
.boundary-reading h4 { margin-bottom: .35rem; font-size: 1.1rem; }
.boundary-reading-status { margin: 0 0 .85rem; padding: .75rem; border-left: 4px solid var(--purple); background: #f8f4fc; line-height: 1.45; }
.boundary-reading-status.warning { border-left-color: var(--orange); background: #fff7ee; }
.boundary-reading-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem; }
.boundary-card { padding: .75rem; border: 1px solid var(--line); border-radius: 9px; background: #f8faf9; }
.boundary-card strong { display: block; margin-bottom: .3rem; color: var(--green-dark); }
.boundary-card span { display: block; color: var(--muted); font-size: .84rem; line-height: 1.4; }
.boundary-card .confidence { margin-top: .45rem; color: #452270; font-size: .75rem; font-weight: 800; text-transform: uppercase; }
.urban-glossary { margin-top: .85rem; }
.urban-glossary summary { cursor: pointer; color: #452270; font-weight: 800; }
.urban-glossary dl { display: grid; gap: .6rem; margin-bottom: 0; }
.urban-glossary dt { margin-top: .55rem; font-weight: 850; }
.urban-glossary dd { margin: 0; color: var(--muted); line-height: 1.45; }
.plan-chat-history { min-height: 150px; max-height: 340px; overflow-y: auto; padding: .7rem; border: 1px solid var(--line); border-radius: 9px; background: #f7faf8; }
.plan-chat-message { max-width: 88%; margin: .45rem 0; padding: .6rem .75rem; border-radius: 10px; white-space: pre-wrap; }
.plan-chat-message.user { margin-left: auto; background: #452270; color: white; }
.plan-chat-message.assistant { background: #eaf4ef; color: #143b2c; }
.plan-chat-key { display: block; margin: .65rem 0; }
.plan-chat-key input { width: 100%; margin-top: .3rem; }
.control-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
.control-grid label { margin: 0; font-size: .86rem; }
.control-grid input, .control-grid select { width: 100%; margin-top: .3rem; padding: .65rem; border: 1px solid #9eaca3; border-radius: 8px; background: white; }
.site-plan-actions, .site-plan-final-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; margin-top: .9rem; }
.plan-check { margin-top: .55rem; padding: .7rem; border-left: 4px solid #66736b; background: white; }
.plan-check.CONFORME { border-left-color: var(--green); }
.plan-check.NON_CONFORME { border-left-color: #a1271c; background: #fff3f1; }
.plan-check.A_VERIFIER { border-left-color: var(--orange); background: #fff7ee; }
.check-source { display: block; margin-top: .45rem; padding-top: .45rem; border-top: 1px solid var(--line); color: var(--muted); font-style: italic; line-height: 1.45; }
.plan-approved { padding: .85rem; border-left: 4px solid var(--green); background: #eaf4ef; color: var(--green-dark); font-weight: 800; }
.building-3d-panel:not([hidden]) { position: fixed; top: 4vh; left: 12vw; right: 12vw; bottom: 4vh; z-index: 3100; overflow: auto; padding: 1.2rem; border: 2px solid #126b4e; border-radius: 14px; background: #f5faf7; box-shadow: 0 20px 70px rgb(18 25 21 / 42%); }
#building-3d-canvas { display: block; width: 100%; height: auto; aspect-ratio: 11 / 7.2; border: 1px solid #9caf9f; border-radius: 12px; background: linear-gradient(#dff1fb 0 62%, #e8ecdf 62%); }
.building-3d-controls { display: flex; align-items: end; gap: 1rem; padding: .7rem 0; }
.building-3d-controls label { flex: 1; }
.building-3d-controls input { width: 100%; }
.building-chat { max-width: 720px; margin: 1rem auto 0; padding: .85rem; border-radius: 10px; background: white; }

@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr; }
  #map { min-height: 460px; height: 58vh; }
  .site-plan-panel:not([hidden]) { left: 2vw; width: auto; }
  .building-3d-panel:not([hidden]) { left: 2vw; right: 2vw; }
}

@media (max-width: 620px) {
  .search-row { flex-direction: column; }
  .hero { padding-top: 1.4rem; }
  .layout { padding-inline: .75rem; }
  .legend { right: 12px; }
  .confirmation-actions { grid-template-columns: 1fr; }
  .confirmation-summary div { grid-template-columns: 1fr; gap: .2rem; }
  .zoning-summary div { grid-template-columns: 1fr; gap: .2rem; }
  .heritage-summary div { grid-template-columns: 1fr; gap: .2rem; }
  .risk-summary div { grid-template-columns: 1fr; gap: .2rem; }
  .plu-tabs, .plu-kpis { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr; }
  .process-step { min-height: auto; }
  .control-grid, .site-plan-actions, .site-plan-final-actions { grid-template-columns: 1fr; }
  .boundary-reading-list { grid-template-columns: 1fr; }
}

/* Cadastro 5.0 — interface guidée, chaleureuse et accessible */
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 2%, rgb(207 235 221 / 46%), transparent 25rem),
    linear-gradient(180deg, #fbfaf5 0, #f5f6f1 100%);
  line-height: 1.5;
}
body.large-text { font-size: 118%; }
body.high-contrast {
  --ink: #050705;
  --muted: #303630;
  --line: #687168;
  --green: #005b3b;
  --green-dark: #003b27;
  --blue: #064eae;
  --orange: #a94b00;
  background: #fff;
}
.skip-link {
  position: fixed; top: .5rem; left: .5rem; z-index: 9999;
  padding: .75rem 1rem; border-radius: 8px; color: #fff; background: #050705;
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }
.accessibility-bar {
  display: flex; justify-content: flex-end; align-items: center; gap: .55rem;
  min-height: 42px; padding: .35rem clamp(1rem, 5vw, 5rem);
  color: #d9eee4; background: #082f24; font-size: .78rem;
}
.utility-button {
  padding: .38rem .65rem; border: 1px solid rgb(255 255 255 / 36%);
  color: #fff; background: transparent; font-size: .76rem;
}
.utility-button:hover:not(:disabled), .utility-button[aria-pressed="true"] {
  color: #082f24; background: #fff;
}
.hero {
  position: relative; overflow: hidden;
  padding: clamp(2.6rem, 7vw, 6rem) clamp(1rem, 5vw, 5rem);
  background: linear-gradient(120deg, #0a3e2e 0%, #126b4e 55%, #16825f 100%);
}
.hero::after {
  content: ""; position: absolute; right: -8rem; bottom: -14rem;
  width: 34rem; height: 34rem; border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 50%; box-shadow: 0 0 0 5rem rgb(255 255 255 / 3%);
}
.hero-grid {
  position: relative; z-index: 1; display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(290px, .75fr);
  gap: clamp(2rem, 6vw, 6rem); align-items: center;
}
.brand-line { display: flex; align-items: center; gap: .65rem; margin-bottom: 2rem; font-weight: 850; }
.brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: 11px 11px 11px 3px; color: #0b4935; background: #d8f0e4;
  font-family: Georgia, serif; font-size: 1.35rem;
}
.hero h1 { max-width: 850px; margin-bottom: 1.15rem; font-family: Georgia, "Times New Roman", serif; font-weight: 600; line-height: 1.06; }
.hero .intro { max-width: 720px; color: #e0f1e8; font-size: clamp(1.05rem, 2vw, 1.28rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-top: 1.7rem; }
.primary-link {
  padding: .9rem 1.2rem; border-radius: 10px; color: #0b4935;
  background: #fff; box-shadow: 0 8px 20px rgb(0 0 0 / 18%); font-weight: 850; text-decoration: none;
}
.text-link { color: #fff; font-weight: 750; text-underline-offset: 4px; }
.hero-promise { padding: 1.35rem; border: 1px solid rgb(255 255 255 / 24%); border-radius: 18px; background: rgb(6 46 33 / 42%); backdrop-filter: blur(8px); }
.hero-promise ul { display: grid; gap: .95rem; margin: 0; padding: 0; list-style: none; }
.hero-promise li { display: grid; gap: .12rem; padding-left: 1.8rem; position: relative; }
.hero-promise li::before { content: "✓"; position: absolute; left: 0; top: .05rem; display: grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: 50%; color: #0b4935; background: #bfe8d4; font-weight: 900; }
.hero-promise span { color: #d6eee3; font-size: .87rem; }
.layout { max-width: 1540px; padding-top: clamp(1.4rem, 4vw, 3rem); }
.welcome-guide {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: end;
  margin-bottom: 1.25rem; padding: 1.4rem 1.6rem; border: 1px solid #d7e2db;
  border-radius: 18px; background: rgb(255 255 255 / 78%);
}
.welcome-guide h2 { margin-bottom: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.45rem, 3vw, 2.1rem); }
.welcome-guide > p { margin: 0; color: var(--muted); line-height: 1.65; }
.process-steps { counter-reset: journey; gap: .65rem; }
.process-step {
  position: relative; min-height: 126px; padding: 1rem; border-width: 1px;
  border-radius: 14px; box-shadow: 0 6px 22px rgb(23 33 27 / 7%);
}
.process-step span { display: flex; align-items: center; gap: .5rem; }
.process-step span b { display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; color: #fff; background: var(--green); font-size: .78rem; }
.process-step.active { border-color: var(--green); box-shadow: 0 9px 28px rgb(18 107 78 / 14%); }
.search-panel { padding: clamp(1.25rem, 3vw, 2rem); border-radius: 20px; }
.primary-stage-grid { display: grid; grid-template-columns: 1.12fr .88fr; gap: 1.25rem; align-items: stretch; margin-bottom: 1.25rem; }
.primary-stage-grid .search-panel { margin-bottom: 0; }
.stage-overview { padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid #cfd9ea; border-radius: 20px; background: #f7faff; box-shadow: var(--shadow); }
.stage-overview h2 { margin-bottom: .2rem; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.35rem, 2.5vw, 1.85rem); }
.secondary-number { background: var(--blue); }
.stage-checklist { display: grid; gap: .5rem; margin: 1rem 0; padding: 0; list-style: none; }
.stage-checklist li { position: relative; padding-left: 1.7rem; }
.stage-checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--blue); font-weight: 900; }
.stage-availability { margin: 0; padding: .7rem .8rem; border-left: 4px solid var(--blue); background: #eaf2ff; color: #174963; font-weight: 750; }
.section-heading { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1rem; }
.section-heading h2 { margin-bottom: .25rem; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.4rem, 3vw, 2rem); }
.section-heading p:last-child { margin-bottom: 0; color: var(--muted); }
.section-number { display: grid; flex: 0 0 auto; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; color: #fff; background: var(--green); font-size: 1.2rem; font-weight: 900; }
input, textarea, select { min-height: 46px; }
button { min-height: 44px; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid #f4b942; outline-offset: 3px;
}
.workspace { grid-template-columns: minmax(0, 1.45fr) minmax(340px, .75fr); }
.map-panel, .selection-panel { border-radius: 20px; }
.selection-panel { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow: auto; }
.site-plan-panel:not([hidden]) { left: auto; right: 1vw; width: min(52vw, 920px); max-width: none; border-radius: 20px; }
.site-plan-layout { grid-template-columns: minmax(0, 1.55fr) minmax(290px, .75fr); align-items: start; }
.site-plan-controls { position: sticky; top: 0; }

@media (max-width: 900px) {
  .hero-grid, .welcome-guide, .site-plan-layout, .primary-stage-grid { grid-template-columns: 1fr; }
  .selection-panel { position: static; max-height: none; }
}
@media (max-width: 620px) {
  .accessibility-bar { justify-content: center; flex-wrap: wrap; }
  .accessibility-bar > span { width: 100%; text-align: center; }
  .hero { padding-top: 2.4rem; }
  .hero-promise { display: none; }
  .welcome-guide { gap: .75rem; padding: 1.1rem; }
  .process-steps { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .5rem; }
  .process-step { min-width: 245px; scroll-snap-align: start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Cadastro 5.1 — parcours simple, sans bandeau latéral */
.accessibility-bar { min-height: 36px; }
.hero { padding: 1.5rem clamp(1rem, 4vw, 3rem); }
.hero::after, .hero-promise, .hero-actions { display: none; }
.hero-grid { display: block; }
.brand-line { margin-bottom: .7rem; }
.hero .eyebrow { margin-bottom: .25rem; }
.hero h1 {
  max-width: 900px; margin-bottom: .5rem;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.7rem); font-weight: 800; line-height: 1.12;
}
.hero .intro { max-width: 900px; font-size: 1rem; }
.welcome-guide { display: none; }
.layout { max-width: 1180px; padding-top: 1.25rem; }
.process-steps {
  display: flex; gap: .45rem; overflow-x: auto; margin-bottom: 1rem;
  padding: .35rem; border: 1px solid var(--line); border-radius: 14px;
  background: #fff; box-shadow: 0 5px 18px rgb(23 33 27 / 6%);
}
.process-step {
  flex: 1 0 175px; min-height: 76px; padding: .65rem .75rem;
  border: 0; border-radius: 10px; box-shadow: none;
}
.process-step span { font-size: .68rem; }
.process-step span b { width: 1.35rem; height: 1.35rem; }
.process-step strong { font-size: .88rem; }
.process-step small { display: none; }
.process-step.locked { opacity: .62; background: #f2f4f2; }
.process-step.locked::after { content: "À venir"; color: var(--muted); font-size: .68rem; font-weight: 750; }
.process-step.locked:hover { color: var(--ink); background: #e9eeeb; }
.primary-stage-grid { grid-template-columns: 1fr; gap: .75rem; }
.stage-overview { padding: 1rem 1.25rem; box-shadow: none; }
.stage-overview .section-heading { margin-bottom: .45rem; }
.stage-overview > p:not(.stage-availability), .stage-checklist { display: none; }
.search-panel { padding: 1.25rem; box-shadow: 0 6px 24px rgb(23 33 27 / 7%); }
.section-heading { margin-bottom: .75rem; }
.section-heading h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); }
.workspace { display: grid; grid-template-columns: 1fr; gap: .75rem; }
.map-panel { border-radius: 14px; }
#map { height: min(58vh, 620px); min-height: 400px; }
.selection-panel {
  position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: none; padding: 1.25rem; border-radius: 14px; overflow: visible;
  box-shadow: 0 6px 24px rgb(23 33 27 / 7%);
}
.selection-panel > .actions,
.selection-panel > .warning,
.selection-panel > .scope-notice,
.selection-panel > section { grid-column: 1 / -1; }
.confirmation, .zoning, .heritage, .risks, .plu-panel {
  margin-top: .25rem; border-width: 1px; border-radius: 12px;
}
.site-plan-panel:not([hidden]) { inset: 1vh 1vw; }

@media (max-width: 700px) {
  .accessibility-bar { display: none; }
  .hero { padding: 1.1rem; }
  .brand-line { margin-bottom: .45rem; }
  .hero h1 { font-size: 1.65rem; }
  .hero .intro { font-size: .92rem; }
  .layout { padding: .75rem; }
  .process-steps { margin-inline: -.15rem; }
  .process-step { flex-basis: 145px; min-width: 145px; }
  .selection-panel { grid-template-columns: 1fr; }
  .selection-panel > * { grid-column: 1; }
  #map { min-height: 350px; height: 52vh; }
}

/* ==========================================================================
   Cadastro 8.0 — étape 3 (analyse fine) et étape 4 (éditeur de plan de masse)
   ========================================================================== */

.c8-block {
  margin-top: 1.6rem;
  padding: 1.2rem;
  border: 1px solid #d8d2c6;
  border-radius: 12px;
  background: #fdfcf9;
}
.c8-block h4 { margin: 0 0 .4rem; }
.c8-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: .8rem 0; }
.c8-diagnostic {
  margin: .3rem 0; padding: .5rem .7rem; border-left: 3px solid #b8862f;
  background: #fdf6e6; font-size: .9rem;
}
.c8-piece-group { margin-top: .8rem; }
.c8-piece-group h5 { margin: .4rem 0; font-size: .92rem; color: #5b5346; }
.c8-piece {
  display: grid; grid-template-columns: auto 1fr auto; gap: .6rem;
  align-items: start; padding: .45rem .6rem; border-radius: 8px;
  border: 1px solid transparent;
}
.c8-piece.retained { background: #f2f8f4; border-color: #cfe3d6; }
.c8-piece.excluded { opacity: .72; }
.c8-piece-body { display: flex; flex-direction: column; gap: .15rem; }
.c8-piece-reason, .c8-piece-excluded { font-size: .82rem; color: #6a6255; }
.c8-piece-excluded { color: #8c4a2f; }
.c8-piece-link { font-size: .82rem; white-space: nowrap; }

.c8-level {
  margin-top: 1.1rem; padding-top: .9rem; border-top: 1px solid #e3ddd1;
}
.c8-level h5 { margin: 0 0 .5rem; font-size: 1rem; }
.c8-kpis { display: flex; flex-wrap: wrap; gap: .6rem; }
.c8-kpi {
  min-width: 140px; padding: .6rem .8rem; border-radius: 10px;
  background: #f2f6f4; border: 1px solid #cfe0d7;
  display: flex; flex-direction: column; gap: .1rem;
}
.c8-kpi.unknown { background: #fbf4e8; border-color: #e6d3ae; }
.c8-kpi strong { font-size: 1.15rem; }
.c8-kpi span { font-size: .84rem; color: #4d5a52; }
.c8-kpi small { font-size: .74rem; color: #77705f; }
.c8-certainty { font-style: italic; }
.c8-consequences li { margin-bottom: .3rem; }

.c8-roof.incompatible { background: #fdf0ec; border-radius: 10px; padding: .8rem; }
.c8-scenario { margin: .2rem 0; font-size: .88rem; }

.c8-rule {
  margin: .5rem 0; padding: .6rem .8rem; border-radius: 9px;
  background: #ffffff; border: 1px solid #dfd9cd;
}
.c8-rule.review { border-left: 4px solid #c98a2f; }
.c8-rule-head { display: flex; justify-content: space-between; gap: .8rem; }
.c8-rule-value { font-weight: 600; color: #126b4e; white-space: nowrap; }
.c8-statement { margin: .35rem 0; font-size: .9rem; line-height: 1.45; }
.c8-facts { margin: .3rem 0 .3rem 1.1rem; font-size: .84rem; color: #4f4a3f; }
.c8-source { display: block; font-size: .76rem; color: #7a7365; }

.c8-vigilance { margin: .3rem 0; }
.c8-vigilance summary { cursor: pointer; font-weight: 600; }
.c8-vigilance.bloquant summary { color: #8c1d18; }
.c8-vigilance.information summary { color: #8a6d1f; }
.c8-rubric summary { cursor: pointer; padding: .3rem 0; }
.c8-theme { margin: .15rem 0; font-size: .85rem; }

.c8-existing { background: #f7f4ee; border-radius: 10px; padding: .9rem; }
.c8-legality { margin: .5rem 0; padding: .6rem .8rem; background: #fff; border-radius: 8px; }
.c8-matrix { width: 100%; border-collapse: collapse; font-size: .84rem; margin: .6rem 0; }
.c8-matrix th, .c8-matrix td {
  border: 1px solid #ddd6c8; padding: .4rem .5rem; text-align: left; vertical-align: top;
}
.c8-matrix th { background: #efeadf; }
.c8-conclusion { font-weight: 600; }
.c8-threshold { margin: .4rem 0; padding: .4rem .6rem; background: #fff; border-radius: 8px; }
.c8-question { font-size: .84rem; color: #5b5346; margin: .15rem 0; }
.c8-warning { font-size: .85rem; color: #8c4a2f; }

.c8-open-editor {
  margin-top: 1rem; padding: .7rem 1.1rem; border-radius: 9px;
  background: #126b4e; color: #fff; border: none; cursor: pointer;
}
.c8-open-editor.ready { box-shadow: 0 0 0 3px rgba(18,107,78,.18); }

/* ------------------------------ éditeur ---------------------------------- */

.c8-editor {
  position: fixed; inset: 1.5vh 1.5vw; z-index: 4000;
  background: #ffffff; border-radius: 14px; box-shadow: 0 18px 60px rgba(0,0,0,.32);
  display: flex; flex-direction: column; overflow: hidden;
}
.c8-editor[hidden] { display: none; }
.c8-editor-bar {
  display: flex; align-items: center; gap: .8rem; flex-wrap: wrap;
  padding: .6rem 1rem; border-bottom: 1px solid #e3ddd1; background: #f7f5f0;
}
.c8-editor-tools { display: flex; gap: .4rem; flex-wrap: wrap; margin-left: auto; }
/* Les boutons de l'application sont blancs sur fond sombre : dans la barre
   d'outils de l'éditeur, qui est claire, la couleur du texte doit être
   redéclarée explicitement, sinon les libellés deviennent invisibles. */
.c8-editor-tools button,
.c8-editor-tools select,
.c8-editor-bar button,
.c8-editor-bar select {
  padding: .45rem .85rem;
  border-radius: 9px;
  border: 1px solid #c7c0b1;
  background: #ffffff;
  color: #22303a;
  cursor: pointer;
  font-size: .85rem;
  font-weight: 600;
  line-height: 1.2;
  text-shadow: none;
  opacity: 1;
  box-shadow: 0 1px 2px rgba(30, 41, 46, .06), 0 1px 0 rgba(255,255,255,.6) inset;
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease,
              border-color .12s ease, color .12s ease;
}
.c8-editor-tools button:hover:not(:disabled),
.c8-editor-bar button:hover:not(:disabled) {
  background: #126b4e;
  border-color: #126b4e;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(18, 107, 78, .28);
}
.c8-editor-tools button:active:not(:disabled),
.c8-editor-bar button:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(30, 41, 46, .12) inset;
}
.c8-editor-tools button:disabled {
  background: #eeeae2; color: #8a8378; cursor: not-allowed; box-shadow: none;
}
.c8-editor-tools #c8-editor-close {
  background: #22303a; border-color: #22303a; color: #ffffff;
}
.c8-editor-tools #c8-add {
  background: #126b4e; border-color: #126b4e; color: #ffffff;
}
.c8-editor-bar strong, .c8-editor-bar .muted, .c8-snap { color: #22303a; }
.c8-snap { display: flex; align-items: center; gap: .3rem; font-size: .85rem; }
.c8-editor-body { display: flex; flex: 1; min-height: 0; }
/* Fabric.js enveloppe le <canvas> dans son propre `.canvas-container` (deux
   canvas superposés) et lui donne une taille explicite en pixels, calculée
   par `fitView()` — ce conteneur n'a donc pas besoin de flex:1, juste de ne
   pas ajouter de marge parasite dans la ligne flex du corps de l'éditeur. */
.c8-editor-body .canvas-container { background: #fbfaf7; }
.c8-editor-body canvas { cursor: grab; outline: none; }
.c8-urbanism-warning {
  position: absolute; z-index: 6; left: 12px; top: 48px;
  padding: 5px 9px; border: 1px solid #e0b58a; border-radius: 6px;
  background: rgba(255,248,239,.94); color: #8c4a2f;
  font-size: 11px; line-height: 1.2; pointer-events: none;
}
.c8-urbanism-warning[hidden] { display: none !important; }
.c8-editor-side {
  width: 330px; display: flex; flex-direction: column; min-height: 0;
  border-left: 1px solid #e3ddd1; background: #fcfbf8;
}
/* Contrôles + mesures toujours visibles, jamais enterrés sous le
   formulaire du volume (qui peut dépasser 1400px avec toitures/façades) :
   zone haute indépendante, avec son propre défilement si la liste de
   contrôles est longue, plutôt qu'empilée dans le même flux que le
   formulaire — cf. retour utilisateur du 2026-09-03, « mets la partie
   contrôle bien visible, à côté du plan de masse, pour qu'on puisse en
   direct voir ce qui ne va pas ». */
.c8-editor-feedback {
  flex: 0 1 auto; max-height: 48%; overflow-y: auto;
  padding: .8rem 1rem; border-bottom: 2px solid #e3ddd1;
}
.c8-editor-form-scroll { flex: 1 1 auto; overflow-y: auto; padding: .8rem 1rem; min-height: 0; }
.c8-editor-side h5 { margin: .8rem 0 .4rem; }
.c8-editor-side h5:first-child { margin-top: 0; }
.c8-field { display: flex; align-items: center; gap: .5rem; margin: .3rem 0; font-size: .85rem; }
.c8-field span { flex: 1; }
.c8-field input, .c8-field select {
  width: 110px; padding: .25rem .4rem; border: 1px solid #cfc8ba; border-radius: 6px;
}
.c8-field input[type="checkbox"] { width: auto; }
.c8-measure { display: grid; grid-template-columns: 1fr auto; gap: .2rem .6rem; font-size: .85rem; }
.c8-measure dt { color: #5b5346; }
.c8-measure dd { margin: 0; font-weight: 600; text-align: right; }
.c8-check {
  display: flex; flex-direction: column; gap: .12rem;
  margin: .35rem 0; padding: .45rem .6rem; border-radius: 8px; font-size: .83rem;
  border-left: 4px solid #bbb;
}
.c8-check.conforme { background: #f1f8f3; border-left-color: #2f8c56; }
.c8-check.non_conforme { background: #fdeeea; border-left-color: #b8402f; }
.c8-check.a_verifier { background: #fdf6e6; border-left-color: #c98a2f; }
/* Verdict en clair d'abord (gros, en tête), détail technique ensuite en
   plus petit — un client non spécialiste lit la ligne du haut et s'arrête
   là s'il le souhaite. */
.c8-check-headline { font-size: .95rem; }
.c8-check.conforme .c8-check-headline { color: #1f6e46; }
.c8-check.non_conforme .c8-check-headline { color: #9a2c1c; }
.c8-check.a_verifier .c8-check-headline { color: #8a5c14; }
.c8-check-detail { color: #4a4238; }
.c8-check-excerpt-toggle summary { cursor: pointer; color: #5b5346; font-size: .78rem; }
.c8-excerpt { font-style: italic; color: #6a6255; }
.c8-editor-status {
  margin: 0; padding: .5rem 1rem; border-top: 1px solid #e3ddd1;
  background: #f7f5f0; font-size: .87rem;
}

@media (max-width: 900px) {
  .c8-editor-body { flex-direction: column; }
  .c8-editor-side { width: auto; max-height: 45%; border-left: none; border-top: 1px solid #e3ddd1; }
}

/* Volet de recherche des pièces : les deux actions de l'étape 3 */
.plu-search-actions {
  display: flex; flex-wrap: wrap; gap: .6rem; margin: .8rem 0;
}
.plu-search-actions button {
  padding: .5rem .9rem; border-radius: 8px; border: 1px solid #126b4e;
  background: #126b4e; color: #ffffff; font-weight: 600; cursor: pointer;
}
.plu-search-actions button:disabled {
  background: #e8e4db; border-color: #cfc8ba; color: #8a8378; cursor: not-allowed;
}

.app-version {
  display: inline-block; margin-left: .6rem; padding: .1rem .5rem;
  border-radius: 999px; background: rgba(255,255,255,.14);
  font-size: .72rem; letter-spacing: .02em; vertical-align: middle;
}
.app-version.stale { background: #b8402f; color: #fff; cursor: help; }

/* ==========================================================================
   Cadastro 8.0 — barre supérieure, identité et espace utilisateur
   ========================================================================== */

/* Barre claire : le logo est un PNG à fond transparent, il se fond dans le
   bandeau sans cartouche blanc ni contour visible. Un fond sombre obligerait
   à une version en réserve du logo, que nous n'avons pas. */
.top-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  padding: .45rem 1.4rem;
  background: linear-gradient(180deg, #ffffff 0%, #eef2f6 100%);
  border-bottom: 1px solid #dbe3ea;
  color: var(--navy);
  position: sticky; top: 0; z-index: 900;
  backdrop-filter: saturate(1.1);
}
.top-bar-brand {
  display: flex; align-items: center; gap: .55rem;
  text-decoration: none; color: inherit;
}
.top-bar-logo {
  height: 38px; width: auto; object-fit: contain; display: block;
}
.top-bar-name {
  font-size: 1.12rem; font-weight: 700; letter-spacing: .005em;
  color: var(--navy);
}
.top-bar-name::first-letter { color: var(--navy); }
.top-bar-baseline {
  font-size: .74rem; color: var(--muted); letter-spacing: .04em;
  text-transform: uppercase; padding-left: .6rem; margin-left: .2rem;
  border-left: 1px solid #cfd9e2;
}
@media (max-width: 820px) { .top-bar-baseline { display: none; } }
.top-bar-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.top-bar-actions .utility-button {
  background: #fff; border: 1px solid #c8d3dd; color: var(--navy);
  padding: .35rem .8rem; border-radius: 999px; font-size: .84rem; cursor: pointer;
}
.top-bar-actions .utility-button[aria-pressed="true"] {
  background: var(--navy); color: #fff; border-color: var(--navy);
}
.account-button {
  padding: .4rem .95rem; border-radius: 999px; font-size: .86rem;
  font-weight: 600; cursor: pointer;
  border: 1px solid var(--navy); background: #fff; color: var(--navy);
}
.account-button.primary {
  background: var(--green); border-color: var(--green); color: #fff;
}
.account-button:hover { background: var(--navy); color: #fff; }
.account-button.primary:hover { background: var(--green-dark); border-color: var(--green-dark); }
.top-bar .app-version {
  background: #e6edf3; color: var(--navy);
}

.hero-logo { max-width: 320px; width: 100%; height: auto; margin-bottom: .6rem; }

/* Espace utilisateur ---------------------------------------------------- */

.account-dialog { position: fixed; inset: 0; z-index: 5000; }
.account-dialog[hidden] { display: none; }
.account-backdrop { position: absolute; inset: 0; background: rgb(14 36 64 / 55%); }
.account-card {
  position: relative; margin: 6vh auto 0; max-width: 520px;
  background: #fff; border-radius: 16px; padding: 1.6rem 1.8rem;
  box-shadow: 0 24px 70px rgb(14 36 64 / 35%);
  max-height: 86vh; overflow-y: auto;
}
.account-card h2 { margin: .2rem 0 .6rem; color: var(--navy); }
.account-lead { margin: 0 0 .8rem; }
.account-benefits { margin: 0 0 1rem 1.1rem; }
.account-benefits li { margin-bottom: .3rem; }
.account-notice {
  padding: .7rem .9rem; border-radius: 10px;
  background: #fdf6e6; border-left: 4px solid #c98a2f; font-size: .88rem;
}
.account-field { display: block; margin-top: 1rem; font-weight: 600; font-size: .9rem; }
.account-card input[type="email"] {
  width: 100%; padding: .5rem .7rem; margin-top: .3rem;
  border: 1px solid var(--line); border-radius: 8px;
}
.account-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }
.account-actions button {
  padding: .5rem 1rem; border-radius: 9px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--navy); background: #fff; color: var(--navy);
}
.account-actions .account-save { background: var(--navy); color: #fff; }
.account-close {
  position: absolute; top: .6rem; right: .8rem;
  background: none; border: none; font-size: 1.6rem; line-height: 1;
  color: var(--muted); cursor: pointer;
}
.account-status { margin-top: .7rem; font-size: .86rem; color: var(--navy); }

@media (max-width: 640px) {
  .top-bar { justify-content: center; text-align: center; }
  .account-card { margin: 3vh 1rem 0; }
}

/* Cadrage de lecture et valeurs écartées */
.c8-scoping { background: #eef3f8; border-radius: 10px; padding: .9rem 1rem; }
.c8-scoping.zone_absente_du_document,
.c8-scoping.structure_illisible { background: #fdeeea; }
.c8-chapter { margin: .2rem 0; font-weight: 600; font-size: .9rem; }
.c8-rejected { margin: .2rem 0 .4rem 1.1rem; font-size: .85rem; color: #5c6a78; }
.c8-implausible { background: #fdf6e6; border-radius: 10px; padding: .9rem 1rem; }

.c8-organisation { font-weight: 600; margin: .3rem 0; }

/* Fiche PLU de référence : le dépouillement déjà vérifié par l'agence */
.c8-reference-sheet {
  border-top: none; margin-top: .6rem; padding: .9rem 1rem;
  border: 1px solid #cfe0d7; border-left: 4px solid #2f6f52;
  border-radius: 12px; background: #f4f9f6;
}
.c8-reference-sheet h5 { color: #245140; }
.c8-fiche th:first-child, .c8-fiche td:first-child { width: 2.4rem; }
.c8-fiche td:nth-child(2) { width: 12rem; font-weight: 600; }
.c8-fiche-text { max-width: 22rem; }
.c8-fiche-full {
  margin: 0; white-space: pre-wrap; font-family: inherit; font-size: .82rem;
  line-height: 1.35; color: #33403a;
}
.c8-fiche-text summary { cursor: pointer; color: #245140; }
.c8-fiche summary::marker { color: #2f6f52; }
.c8-subrow td:nth-child(2) { padding-left: 1.2rem; font-weight: 500; font-style: italic; }
.c8-fiche-values { margin-top: .5rem; font-size: .84rem; }
.c8-fiche-values summary { cursor: pointer; color: #245140; font-weight: 600; }
.c8-fiche-values ul { margin: .4rem 0 0 1rem; display: flex; flex-direction: column; gap: .25rem; }

/* Source en rouge/gras avant chaque information — même convention que la
   fiche xlsx exportée (marqueur [[SRC]]...[[/SRC]] converti côté serveur en
   texte riche, côté écran en <strong> ici). */
.c8-src-marker { color: #c92a2a; font-weight: 700; }
.c8-badge-line {
  display: inline-block; padding: .2rem .6rem; border-radius: 8px;
  font-size: .82rem; font-weight: 600; margin: .3rem 0;
}
.c8-badge-line.fiable { background: #e6f4ea; color: #1e6b3a; }
.c8-badge-line.correcte { background: #fdf3e2; color: #8a5a12; }
.c8-badge-line.faible { background: #fbe9e7; color: #a13a1f; }
.c8-row-number { display: flex; flex-direction: column; gap: .2rem; align-items: flex-start; }
.c8-origin {
  padding: .05rem .4rem; border-radius: 999px; font-size: .68rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .02em;
}
.c8-origin.fiche_reference { background: #e6f4ea; color: #1e6b3a; }
.c8-origin.lecture_ia { background: #eaf1fb; color: #1f4e8c; }
.c8-origin.lecture_ia_cache { background: #f1eefb; color: #5533a0; }

/* Fiche du projet : une ligne par règle, toujours renseignée */
.c8-sheet { width: 100%; border-collapse: collapse; font-size: .87rem; margin: .6rem 0; }
.c8-sheet th, .c8-sheet td {
  border-bottom: 1px solid #e3e8ee; padding: .5rem .6rem;
  text-align: left; vertical-align: top;
}
.c8-sheet th { background: #eef3f8; color: var(--navy); font-size: .82rem; }
.c8-value strong { font-size: 1.05rem; color: var(--navy); }
.c8-reference { color: #6a7480; font-style: italic; }
.c8-caveat, .c8-comment, .c8-src small { display: block; font-size: .76rem; color: #77808a; }
.c8-excerpt { font-style: italic; }
.c8-badge {
  display: inline-block; padding: .1rem .5rem; border-radius: 999px;
  font-size: .74rem; font-weight: 600;
}
.c8-badge.sourcé { background: #e6f4ea; color: #1e6b3a; }
.c8-badge.à-confirmer { background: #fdf3e2; color: #8a5a12; }
.c8-badge.non-trouvé { background: #eef1f4; color: #5c6a78; }
.c8-row.non-trouvé { background: #fbfcfd; }
.c8-coherence { margin-top: .8rem; }
.c8-check-line {
  display: flex; flex-direction: column; gap: .1rem;
  padding: .45rem .7rem; margin: .3rem 0; border-radius: 8px;
  border-left: 4px solid #cfd7df; background: #f7f9fb; font-size: .85rem;
}
.c8-check-line.coherent { border-left-color: #2f8c56; background: #f2f9f5; }
.c8-check-line.vigilance { border-left-color: #c98a2f; background: #fdf6e6; }
.c8-check-line.incoherent { border-left-color: #b8402f; background: #fdeeea; }

.c8-facades { margin: .6rem 0; padding: .5rem .7rem; border-radius: 8px; background: #f3f6f9; }
.c8-facades strong { display: block; font-size: .85rem; }
.c8-facade-row { display: flex; align-items: center; gap: .4rem; font-size: .85rem; margin: .15rem 0; }

/* ========================================================================
   Studio de potentiel — expérience client pédagogique
   ======================================================================== */
.c8-studio-bar {
  padding: .75rem 1rem;
  background: linear-gradient(135deg, #f8fbff 0%, #eef8f2 100%);
  border-bottom: 1px solid #d7e4df;
  gap: 1rem;
}
.c8-studio-title { display:flex; align-items:baseline; gap:.65rem; min-width:220px; }
.c8-studio-title strong { font-size:1.08rem; color:#173b33; }
.c8-studio-kicker { font-size:.68rem; font-weight:800; letter-spacing:.12em; color:#21845f; }
.c8-studio-title .muted { font-size:.78rem; }
.c8-studio-tools { align-items:center; gap:.55rem; }
.c8-tool-cluster { display:flex; align-items:center; gap:.35rem; padding:.25rem; border-radius:10px; background:rgba(255,255,255,.68); border:1px solid #dbe7e2; }
.c8-tool-cluster select { max-width:145px; }
.c8-studio-tools .c8-tool { border:0; box-shadow:0 2px 7px rgba(25,55,45,.08); }
.c8-studio-tools .c8-tool-building { background:#1c79b8 !important; border-color:#1c79b8 !important; color:#fff !important; }
.c8-studio-tools .c8-tool-green { background:#4f9b45 !important; border-color:#4f9b45 !important; color:#fff !important; }
.c8-studio-tools .c8-tool-dimension { background:#7650b8 !important; border-color:#7650b8 !important; color:#fff !important; }
.c8-studio-tools .c8-tool-dimension.active { box-shadow:0 0 0 4px rgba(118,80,184,.2); transform:translateY(-1px); }
.c8-export-cluster button { font-weight:700; }
.c8-studio-body { background:#edf3f1; gap:0; }
.c8-plan-stage { position:relative; flex:1; min-width:0; min-height:0; display:flex; align-items:stretch; justify-content:stretch; background:#f7faf9; }
.c8-plan-stage .canvas-container { box-shadow: inset -1px 0 0 #dce6e1; }
.c8-live-hint { position:absolute; z-index:5; left:18px; top:16px; max-width:520px; padding:.52rem .8rem; border-radius:999px; background:rgba(24,58,74,.9); color:#fff; font-size:.78rem; font-weight:600; box-shadow:0 4px 15px rgba(0,0,0,.12); pointer-events:none; }
.c8-studio-side { width:360px; padding:.8rem; gap:.7rem; overflow-y:auto; background:#f4f7f5; border-left:1px solid #d8e2de; }
.c8-potential-card,.c8-rules-card,.c8-selection-card,.c8-mini-help { background:#fff; border:1px solid #dfe8e4; border-radius:14px; padding:.85rem; box-shadow:0 4px 14px rgba(34,62,52,.05); }
.c8-potential-heading { display:flex; align-items:center; justify-content:space-between; gap:.6rem; margin-bottom:.7rem; }
.c8-potential-heading span,.c8-rules-heading { font-weight:800; color:#173b33; }
.c8-potential-heading small { color:#568174; font-weight:600; }
.c8-live-kpis { display:grid; grid-template-columns:1fr 1fr; gap:.55rem; }
.c8-live-kpi { display:flex; flex-direction:column; gap:.15rem; padding:.7rem; border-radius:11px; background:#f4f7f7; border:1px solid #e1e9e6; }
.c8-live-kpi span { font-size:.75rem; color:#687874; }
.c8-live-kpi strong { font-size:1.15rem; color:#203a34; }
.c8-live-kpi small { font-size:.7rem; color:#6a7773; }
.c8-live-kpi.ok { background:#edf8f1; border-color:#bfe2ca; }
.c8-live-kpi.bad { background:#fff0ed; border-color:#efc1b8; }
.c8-live-kpi.neutral { background:#f2f5f8; }
.c8-potential-line { margin:.65rem 0 0; padding:.48rem .6rem; border-radius:9px; background:#eef5ff; color:#28516c; font-size:.78rem; font-weight:700; }
.c8-rule-table { display:flex; flex-direction:column; margin-top:.65rem; border:1px solid #e4ebe8; border-radius:10px; overflow:hidden; }
.c8-rule-row { display:grid; grid-template-columns:1.35fr .75fr 1fr; align-items:center; gap:.4rem; min-height:38px; padding:.42rem .55rem; border-bottom:1px solid #e8eeeb; font-size:.78rem; }
.c8-rule-row:last-child { border-bottom:0; }
.c8-rule-row strong { color:#344a43; }
.c8-rule-row span { font-weight:800; text-align:right; }
.c8-rule-row small { text-align:right; color:#6f7e79; }
.c8-rule-row.conforme { background:#f1faf4; }
.c8-rule-row.conforme span { color:#25704b; }
.c8-rule-row.non_conforme { background:#fff0ed; }
.c8-rule-row.non_conforme span { color:#a43d30; }
.c8-rule-row.a_verifier { background:#fff9e9; }
.c8-rule-row.a_verifier span { color:#8a681f; }
.c8-rule-note { margin:.6rem 0 0; font-size:.72rem; line-height:1.35; color:#687873; }
.c8-selection-card h5 { margin:0 0 .35rem; color:#173b33; }
.c8-selection-value { margin:.2rem 0; font-size:1.05rem; font-weight:800; color:#315d52; }
.c8-mini-help { display:flex; flex-direction:column; gap:.2rem; font-size:.71rem; color:#66766f; }
.c8-mini-help strong { color:#38564d; }
.c8-studio-side .muted { font-size:.75rem; line-height:1.35; }
.c8-editor-status { background:#eef4f1; border-top:1px solid #d8e3de; color:#526a62; }
@media (max-width: 1050px) {
  .c8-studio-side { width:320px; }
  .c8-tool-cluster select { max-width:120px; }
}
@media (max-width: 820px) {
  .c8-studio-body { flex-direction:column; }
  .c8-studio-side { width:auto; max-height:42%; border-left:0; border-top:1px solid #d8e2de; }
  .c8-live-kpis { grid-template-columns:1fr 1fr; }
}
.c8-studio-tools .c8-tool-existing { background:#59656f !important; border-color:#59656f !important; color:#fff !important; }
.c8-studio-tools .c8-tool-parking { background:#5a6470 !important; border-color:#5a6470 !important; color:#fff !important; }

/* ========================================================================
   QueBâtir.fr — Studio de potentiel — base historique
   Interface commerciale pour architectes et professionnels de l'immobilier.
   ======================================================================== */
.c8-editor {
  inset: .8vh .65vw;
  border-radius: 22px;
  box-shadow: 0 28px 90px rgba(16, 38, 47, .28);
  border: 1px solid rgba(31, 72, 78, .12);
}
.c8-studio-bar {
  padding: .72rem .9rem;
  background: linear-gradient(120deg, #f9fcfb 0%, #f2f8f6 48%, #f7f5fb 100%);
  border-bottom: 1px solid #dce8e4;
}
.c8-studio-kicker {
  color: #0f755d;
  letter-spacing: .14em;
  font-size: .71rem;
}
.c8-studio-title strong { font-size: 1.13rem; letter-spacing: -.02em; color: #143c38; }
.c8-studio-title .muted { padding-left: .25rem; color: #68807a; }
.c8-tool-cluster {
  padding: .3rem;
  border-radius: 12px;
  border-color: #dce7e3;
  background: rgba(255,255,255,.86);
  box-shadow: 0 3px 12px rgba(30,65,55,.04);
}
.c8-studio-tools .c8-tool,
.c8-studio-tools button,
.c8-studio-tools select { min-height: 34px; border-radius: 9px; }
.c8-studio-tools .c8-tool-building { background:#176faa !important; }
.c8-studio-tools .c8-tool-green { background:#3f954e !important; }
.c8-studio-tools .c8-tool-dimension { background:#7153ad !important; }
.c8-studio-tools .c8-tool-existing { background:#4f626d !important; }
.c8-studio-tools .c8-tool-parking { background:#4f5c68 !important; }
.c8-studio-body { background: #eaf1ef; }
.c8-plan-stage {
  background:
    radial-gradient(circle at 16px 16px, rgba(49,82,76,.045) 1px, transparent 1.2px) 0 0/32px 32px,
    #f8fbfa;
}
.c8-live-hint {
  left: 20px; top: 18px;
  background: rgba(18,54,63,.92);
  padding: .56rem .85rem;
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 8px 24px rgba(15,43,50,.14);
}
.c8-studio-side {
  width: 392px;
  padding: .75rem;
  gap: .62rem;
  background: #f3f7f5;
  border-left: 1px solid #d9e4e0;
}
.c8-parcel-card,.c8-potential-card,.c8-rules-card,.c8-dimensions-card,.c8-selection-card,.c8-mini-help {
  background: rgba(255,255,255,.96);
  border: 1px solid #dfe9e5;
  border-radius: 16px;
  padding: .82rem;
  box-shadow: 0 5px 18px rgba(30,61,54,.055);
}
.c8-parcel-card {
  background: linear-gradient(145deg,#123f3a 0%,#174f48 100%);
  border: 0;
  color: #fff;
  box-shadow: 0 10px 26px rgba(17,68,60,.16);
}
.c8-parcel-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:.8rem; }
.c8-parcel-heading > div { display:flex; flex-direction:column; gap:.12rem; }
.c8-parcel-heading strong { font-size:1.72rem; line-height:1; letter-spacing:-.035em; }
.c8-card-eyebrow { font-size:.66rem; font-weight:800; letter-spacing:.13em; color:#b7d9d0; }
.c8-matrix-badge {
  padding:.27rem .52rem; border-radius:999px; background:rgba(255,255,255,.13);
  color:#e9f7f2; border:1px solid rgba(255,255,255,.18); font-size:.7rem; font-weight:800;
}
.c8-boundary-grid { display:grid; grid-template-columns:1fr 1fr; gap:.34rem; margin-top:.72rem; }
.c8-boundary-row {
  display:flex; align-items:center; justify-content:space-between; gap:.5rem;
  padding:.38rem .48rem; border-radius:9px; background:rgba(255,255,255,.08);
  font-size:.73rem;
}
.c8-boundary-row span { color:#d2e8e1; }
.c8-boundary-row strong { color:#fff; font-size:.79rem; }
.c8-source-line { margin:.58rem 0 0; padding-top:.5rem; border-top:1px solid rgba(255,255,255,.12); color:#c8ded8; font-size:.67rem; line-height:1.3; }
.c8-potential-heading { margin-bottom:.58rem; }
.c8-potential-heading span { font-size:.9rem; }
.c8-potential-heading small { color:#77918a; font-size:.68rem; }
.c8-live-kpis { grid-template-columns:1fr 1fr; gap:.45rem; }
.c8-live-kpi { min-height:92px; padding:.65rem; border-radius:12px; }
.c8-live-kpi strong { font-size:1.22rem; letter-spacing:-.02em; }
.c8-live-kpi small { line-height:1.25; }
.c8-progress-rail { height:5px; margin-top:auto; border-radius:999px; overflow:hidden; background:rgba(32,66,57,.10); }
.c8-progress-bar { display:block; height:100%; border-radius:inherit; background:currentColor; opacity:.55; }
.c8-live-kpi.ok .c8-progress-bar { background:#2b8a58; }
.c8-live-kpi.bad .c8-progress-bar { background:#bd4b3c; }
.c8-potential-line { margin:.52rem 0 0; background:#eaf3fb; color:#27566f; }
.c8-rule-fallback { margin:.42rem 0 0; padding:.45rem .55rem; border-radius:9px; background:#fff8e9; color:#755d2d; font-size:.68rem; line-height:1.3; }
.c8-rules-titlebar { display:flex; justify-content:space-between; align-items:flex-start; gap:.6rem; }
.c8-rules-titlebar small { display:block; margin-top:.1rem; color:#778a84; font-size:.67rem; }
.c8-connected-badge { color:#1d865e; font-size:.66rem; font-weight:800; white-space:nowrap; }
.c8-rule-summary-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:.28rem; margin:.58rem 0 .65rem; }
.c8-rule-summary-item {
  min-width:0; padding:.42rem .25rem; text-align:center; border-radius:9px;
  background:#f3f7f6; border:1px solid #e5ece9;
}
.c8-rule-summary-item span { display:block; overflow:hidden; text-overflow:ellipsis; font-size:.62rem; color:#71837e; }
.c8-rule-summary-item strong { display:block; margin-top:.08rem; font-size:.72rem; color:#254941; white-space:nowrap; }
.c8-distance-heading { margin:.15rem 0 .38rem; font-size:.72rem; font-weight:800; color:#3d5e56; }
.c8-distance-table { border:1px solid #e4ece9; border-radius:11px; overflow:hidden; }
.c8-distance-row {
  display:grid; grid-template-columns:9px 1fr .7fr .95fr; align-items:center; gap:.35rem;
  padding:.4rem .48rem; border-bottom:1px solid #e9efed; font-size:.72rem;
}
.c8-distance-row:last-child { border-bottom:0; }
.c8-distance-row strong { color:#38534c; }
.c8-distance-row small { color:#75847f; text-align:right; }
.c8-distance-measured { text-align:right; font-weight:800; color:#445b55; }
.c8-distance-dot { width:7px; height:7px; border-radius:50%; background:#b9c4c0; }
.c8-distance-row.ok { background:#f2faf5; }
.c8-distance-row.ok .c8-distance-dot { background:#2f9a63; box-shadow:0 0 0 3px rgba(47,154,99,.12); }
.c8-distance-row.bad { background:#fff3f0; }
.c8-distance-row.bad .c8-distance-dot { background:#c84e3f; box-shadow:0 0 0 3px rgba(200,78,63,.11); }
.c8-rule-note { font-size:.68rem; }
.c8-dimensions-heading { display:flex; align-items:center; justify-content:space-between; margin-bottom:.4rem; }
.c8-dimensions-heading strong { color:#263f39; font-size:.83rem; }
.c8-dimensions-heading small { min-width:20px; text-align:center; padding:.1rem .35rem; border-radius:999px; background:#eee9f8; color:#654c9a; font-weight:800; }
.c8-dimension-list { display:flex; flex-direction:column; gap:.28rem; }
.c8-dimension-row { display:grid; grid-template-columns:1fr auto 26px; gap:.3rem; align-items:center; padding:.28rem; border-radius:9px; background:#f8f6fc; border:1px solid #ece7f5; }
.c8-dimension-row.active { border-color:#b9a7df; box-shadow:0 0 0 2px rgba(113,83,173,.08); }
.c8-dimension-select { border:0 !important; background:transparent !important; padding:.2rem .25rem !important; text-align:left; color:#4c4065 !important; font-size:.7rem !important; min-height:0 !important; }
.c8-dimension-value { font-size:.72rem; font-weight:800; color:#5c438f; }
.c8-dimension-remove {
  width:25px; height:25px; min-height:25px !important; padding:0 !important; border:0 !important;
  border-radius:7px !important; background:#f1e9f5 !important; color:#7f447c !important; font-size:1rem !important;
}
.c8-dimension-remove:hover { background:#9f456b !important; color:#fff !important; }
.c8-inline-delete { margin-top:.45rem; padding:.4rem .58rem; border:0; border-radius:8px; background:#f8e9e7; color:#9c4137; font-weight:800; cursor:pointer; }
.c8-selection-card { background:#fbfcfc; }
.c8-mini-help { background:transparent; box-shadow:none; border-style:dashed; }
.c8-editor-status { font-size:.74rem; padding:.4rem .85rem; }
@media (max-width: 1180px) {
  .c8-studio-side { width:350px; }
  .c8-rule-summary-grid { grid-template-columns:repeat(3,1fr); }
}
@media (max-width: 860px) {
  .c8-studio-side { width:auto; max-height:47%; }
  .c8-boundary-grid { grid-template-columns:repeat(4,1fr); }
}
.c8-green-target { margin:.35rem 0 0; padding:.45rem .58rem; border-radius:9px; font-size:.72rem; font-weight:800; }
.c8-green-target.missing { background:#f1f7eb; color:#55712e; }
.c8-green-target.ok { background:#eaf8ef; color:#26714a; }
.quebatir-mark {
  width:34px; height:34px; border-radius:10px; display:inline-grid; place-items:center;
  background:linear-gradient(145deg,#167a61,#123f3a); color:#fff; font-size:.72rem;
  font-weight:900; letter-spacing:-.03em; box-shadow:0 5px 14px rgba(18,83,72,.2);
}
.quebatir-wordmark {
  display:inline-flex; align-items:baseline; margin-bottom:.55rem; color:#193e39;
  font-size:2rem; font-weight:350; letter-spacing:-.055em;
}
.quebatir-wordmark span { font-weight:850; }
.quebatir-wordmark small { margin-left:.12rem; color:#178266; font-size:.88rem; font-weight:850; letter-spacing:-.02em; }

/* QueBâtir.fr — verdict commercial et rappel réglementaire discret */
.c8-scenario-verdict {
  display:flex; flex-direction:column; gap:.12rem; margin:.58rem 0; padding:.58rem .65rem;
  border-radius:11px; border:1px solid #e3ebe8; background:#f5f8f7;
}
.c8-scenario-verdict strong { font-size:.78rem; color:#2e4b44; }
.c8-scenario-verdict span { font-size:.66rem; line-height:1.3; color:#71817c; }
.c8-scenario-verdict.ok { background:#edf8f1; border-color:#c3e3ce; }
.c8-scenario-verdict.ok strong { color:#26734c; }
.c8-scenario-verdict.bad { background:#fff2ef; border-color:#ecc8c0; }
.c8-scenario-verdict.bad strong { color:#a4493d; }
.c8-scenario-verdict.idle { background:linear-gradient(135deg,#f2f7f6,#f6f3fb); }
.c8-matrix-details { margin-top:.55rem; border-top:1px solid #e7eeeb; padding-top:.48rem; }
.c8-matrix-details summary { cursor:pointer; font-size:.69rem; font-weight:800; color:#44665d; list-style-position:inside; }
.c8-matrix-detail-row { margin:.38rem 0 0; padding:.42rem .5rem; border-radius:8px; background:#f6f8f7; color:#65746f; font-size:.66rem; line-height:1.35; }
.c8-matrix-detail-row strong { color:#36554d; }

/* ========================================================================
   QueBâtir.fr 20 — Studio final : lecture rendez-vous client
   ======================================================================== */
.c8-editor {
  inset: .55vh .45vw;
  border-radius: 24px;
  overflow: hidden;
  background: #eef4f2;
  box-shadow: 0 32px 110px rgba(8, 31, 39, .32);
}
.c8-studio-bar {
  min-height: 68px;
  padding: .72rem 1rem;
  background: linear-gradient(115deg, #ffffff 0%, #f5faf8 50%, #eef7f4 100%);
}
.c8-studio-title { gap: .45rem; flex-wrap: wrap; }
.c8-studio-title strong { font-size: 1.18rem; color: #122f36; }
.c8-studio-title .muted {
  padding: .2rem .5rem;
  border-radius: 999px;
  background: #e8f4ef;
  color: #26745d;
  font-size: .68rem;
  font-weight: 800;
}
.c8-studio-tools { gap: .42rem; }
.c8-tool-cluster {
  border: 1px solid #dbe7e3;
  box-shadow: 0 5px 16px rgba(18, 59, 50, .045);
}
.c8-studio-tools .c8-tool,
.c8-studio-tools button,
.c8-studio-tools select {
  min-height: 36px;
  padding: .5rem .68rem;
  font-size: .75rem;
  font-weight: 800;
}
.c8-studio-tools .c8-tool-building { background: linear-gradient(145deg,#166fa9,#145f93) !important; }
.c8-studio-tools .c8-tool-existing { background: linear-gradient(145deg,#566671,#45545e) !important; }
.c8-studio-tools .c8-tool-green { background: linear-gradient(145deg,#48a15b,#378549) !important; }
.c8-studio-tools .c8-tool-dimension { background: linear-gradient(145deg,#7656b6,#63459d) !important; }
.c8-studio-tools .c8-tool-parking { background: linear-gradient(145deg,#5a6470,#48515c) !important; }
.c8-plan-stage {
  background:
    radial-gradient(circle at 16px 16px, rgba(28,77,68,.045) 1px, transparent 1.25px) 0 0/32px 32px,
    linear-gradient(180deg,#fbfdfc,#f5faf8);
}
.c8-live-hint {
  top: 16px; left: 18px;
  max-width: 440px;
  border-radius: 12px;
  background: rgba(16, 47, 55, .93);
  font-size: .72rem;
  letter-spacing: .005em;
}
.c8-studio-side {
  width: 420px;
  padding: .78rem;
  gap: .62rem;
  background: #f1f6f4;
}
.c8-parcel-card,.c8-potential-card,.c8-rules-card,.c8-dimensions-card,.c8-selection-card,.c8-mini-help {
  border-radius: 17px;
  border-color: #dce8e4;
  box-shadow: 0 7px 22px rgba(19, 56, 49, .055);
}
.c8-parcel-card {
  background:
    radial-gradient(circle at 92% 8%, rgba(255,255,255,.14), transparent 31%),
    linear-gradient(145deg,#103d38,#16574d);
}
.c8-parcel-heading strong { font-size: 1.95rem; }
.c8-boundary-grid { gap: .38rem; }
.c8-boundary-row { padding: .44rem .52rem; }
.c8-boundary-row strong { font-size: .82rem; }
.c8-potential-heading { display:flex; align-items:center; justify-content:space-between; }
.c8-live-kpis { display:grid; grid-template-columns: 1fr 1fr; gap:.48rem; }
.c8-live-kpi {
  min-height: 118px;
  display:flex;
  flex-direction:column;
  gap:.3rem;
  padding:.7rem;
  border:1px solid #e3ece9;
  background:#f8fbfa;
}
.c8-live-kpi.ok { background:#eef8f2; border-color:#c9e4d3; color:#236846; }
.c8-live-kpi.bad { background:#fff2ef; border-color:#efcbc4; color:#9f4135; }
.c8-live-kpi.neutral { background:#f6f8fb; border-color:#e1e6eb; color:#3f5561; }
.c8-kpi-head { display:flex; align-items:center; justify-content:space-between; gap:.4rem; }
.c8-kpi-head span { color:#647a74; font-size:.66rem; font-weight:800; text-transform:uppercase; letter-spacing:.05em; }
.c8-kpi-head b { font-size:.7rem; }
.c8-live-kpi strong { color:inherit; font-size:1.35rem; line-height:1.05; }
.c8-live-kpi small { margin-top:auto; color:#667b75; font-size:.65rem; line-height:1.25; }
.c8-potential-ledger { margin-top:.5rem; border:1px solid #e1ebe7; border-radius:11px; overflow:hidden; }
.c8-potential-row { display:flex; justify-content:space-between; gap:.75rem; padding:.48rem .58rem; background:#fbfdfc; border-bottom:1px solid #e8efec; font-size:.7rem; }
.c8-potential-row:last-child { border-bottom:0; }
.c8-potential-row span { color:#61756f; }
.c8-potential-row strong { color:#234f45; }
.c8-potential-row.attention strong { color:#976227; }
.c8-potential-row.ok strong { color:#23744c; }
.c8-rules-card { padding:.84rem; }
.c8-rules-titlebar { padding-bottom:.55rem; border-bottom:1px solid #e4ece9; }
.c8-rules-heading { font-size:.88rem; font-weight:900; color:#203f39; }
.c8-connected-badge { padding:.2rem .4rem; border-radius:999px; background:#e9f7ef; color:#217650; }
.c8-scenario-verdict { margin:.58rem 0 .62rem; }
.c8-rule-ledger {
  border:1px solid #e2eae7;
  border-radius:13px;
  overflow:hidden;
  background:#fff;
}
.c8-rule-ledger-row {
  display:grid;
  grid-template-columns: 10px minmax(0,1fr) 58px 112px;
  align-items:center;
  gap:.42rem;
  padding:.48rem .5rem;
  border-bottom:1px solid #e9efed;
}
.c8-rule-ledger-row:last-child { border-bottom:0; }
.c8-rule-ledger-text { min-width:0; display:flex; flex-direction:column; gap:.06rem; }
.c8-rule-ledger-text strong { font-size:.71rem; color:#314f48; }
.c8-rule-ledger-text small {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#879691;
  font-size:.59rem;
}
.c8-rule-current { text-align:right; font-size:.7rem; font-weight:850; color:#425e56; }
.c8-rule-target { text-align:right; font-size:.67rem; color:#254b42; line-height:1.15; }
.c8-rule-status-dot { width:8px; height:8px; border-radius:50%; background:#b7c2be; }
.c8-rule-ledger-row.ok { background:#f2faf5; }
.c8-rule-ledger-row.ok .c8-rule-status-dot { background:#2a9560; box-shadow:0 0 0 3px rgba(42,149,96,.1); }
.c8-rule-ledger-row.bad { background:#fff3f0; }
.c8-rule-ledger-row.bad .c8-rule-status-dot { background:#ca4f40; box-shadow:0 0 0 3px rgba(202,79,64,.1); }
.c8-rule-ledger-row.conditional { background:#fffaf0; }
.c8-rule-ledger-row.conditional .c8-rule-status-dot { background:#d4972d; box-shadow:0 0 0 3px rgba(212,151,45,.1); }
.c8-rule-ledger-row.free { background:#f4f7f8; }
.c8-rule-ledger-row.free .c8-rule-status-dot { background:#7b8f96; }
.c8-rule-legend { display:flex; flex-wrap:wrap; gap:.55rem; margin:.46rem 0 0; font-size:.61rem; color:#71827d; }
.c8-rule-legend .ok { color:#2a8458; }
.c8-rule-legend .bad { color:#b64a3e; }
.c8-rule-legend .conditional { color:#a56e20; }
.c8-matrix-details { margin-top:.5rem; }
.c8-matrix-details summary { cursor:pointer; color:#48635c; font-size:.67rem; font-weight:850; }
.c8-matrix-detail-row { font-size:.65rem; line-height:1.35; color:#65756f; }
.c8-rule-note { margin:.5rem 0 0; padding:.48rem .55rem; border-radius:10px; background:#f1f6f4; color:#667a74; line-height:1.3; }
.c8-dimensions-card { background:#fcfbff; }
.c8-selection-card { border-left:3px solid #cbd8d4; }
.c8-mini-help { color:#72827d; }
.c8-editor-status { background:#143b39; color:#dfeeea; }

@media (max-width: 1280px) {
  .c8-studio-side { width: 380px; }
  .c8-rule-ledger-row { grid-template-columns: 9px minmax(0,1fr) 54px 98px; }
}
@media (max-width: 920px) {
  .c8-studio-body { flex-direction:column; }
  .c8-studio-side { width:auto; max-height:47%; }
}
.quebatir-brand-lockup {
  width:min(520px, 100%);
  margin-bottom:.85rem;
  padding:.35rem .6rem;
  border-radius:16px;
  background:#fff;
  box-shadow:0 12px 34px rgba(6,35,31,.16);
}
.quebatir-brand-lockup img { display:block; width:100%; height:auto; border-radius:11px; }

/* QueBâtir 20.1 — commandes de rotation et source cadastrale */
.c8-rotation-row { display:grid; grid-template-columns:1fr 1fr; gap:.5rem; margin-top:.65rem; }
.c8-rotate-btn { border:1px solid #c9d9d3; background:#fff; color:#183e35; border-radius:10px; padding:.5rem .65rem; font-weight:700; cursor:pointer; }
.c8-rotate-btn:hover:not(:disabled) { background:#edf7f3; border-color:#86b9a8; }
.c8-rotate-btn:disabled { opacity:.42; cursor:not-allowed; }
.c8-cadastre-source { margin:.45rem 0 0; padding:.5rem .6rem; border-radius:9px; background:#eef3f5; color:#4c626d; font-size:.78rem; line-height:1.35; }

/* ======================================================================
   QUEBÂTIR.FR 21 — INTERFACE DE DÉCISION
   Après la recherche d'adresse, priorité aux réponses métier : parcelle,
   PLU/PLUi, PPRI, ABF et potentiel. Les détails techniques restent dans
   leurs onglets sans être répétés sur la page principale.
   ====================================================================== */

/* Le parcours 5 étapes de l'ancien produit n'est plus l'interface primaire. */
.welcome-guide,
.process-steps,
.stage-overview {
  display: none !important;
}

.primary-stage-grid {
  display: block;
}

.search-panel {
  max-width: 1180px;
  margin-inline: auto;
}

.qb-property-dashboard {
  max-width: 1080px;
  margin: 36px auto 64px;
  padding: 0 18px;
}

.qb-dashboard-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.qb-dashboard-kicker,
.qb-card-label {
  display: block;
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: .13em;
  text-transform: uppercase;
  font-weight: 800;
  color: #697386;
}

.qb-dashboard-header h2 {
  margin: 6px 0 4px;
  max-width: 820px;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.05;
  letter-spacing: -.035em;
  color: #14213d;
}

.qb-dashboard-header p {
  margin: 0;
  color: #6d7482;
}

.qb-fact-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #e3e7ee;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(29, 43, 68, .07);
}
.qb-fact-strip.qb-fact-strip-simple { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.qb-fact-strip article {
  min-width: 0;
  padding: 17px 18px 15px;
  border-right: 1px solid #edf0f4;
}

.qb-fact-strip article:last-child { border-right: 0; }
.qb-fact-strip span,
.qb-fact-strip small {
  display: block;
  color: #7d8490;
  font-size: 12px;
}

.qb-fact-strip strong {
  display: block;
  margin: 4px 0 2px;
  min-height: 28px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #182237;
  font-size: 19px;
  font-weight: 800;
}

.qb-status.ok { color: #177a58 !important; }
.qb-status.warn { color: #b46b00 !important; }
.qb-status.bad { color: #bb3f49 !important; }
.qb-status.neutral { color: #697386 !important; }

.qb-topic-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 22px 0 0;
  padding: 6px;
  border: 1px solid #e3e7ee;
  border-radius: 16px;
  background: #f5f7fa;
}

.qb-topic-tab {
  min-height: 46px;
  border: 0 !important;
  border-radius: 11px !important;
  background: transparent !important;
  color: #586174 !important;
  box-shadow: none !important;
  font-weight: 750 !important;
}

.qb-topic-tab:hover { background: #fff !important; color: #162139 !important; }
.qb-topic-tab.active {
  background: #fff !important;
  color: #17233d !important;
  box-shadow: 0 4px 15px rgba(32, 48, 78, .09) !important;
}

.qb-topic-content {
  margin-top: 12px;
  min-height: 360px;
  padding: 24px;
  border: 1px solid #e4e8ef;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(31, 44, 66, .055);
}

.qb-topic-pane[hidden] { display: none !important; }
.qb-topic-pane.active { animation: qbPaneIn .18s ease-out; }
@keyframes qbPaneIn { from { opacity: .25; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.qb-pane-heading,
.qb-potential-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 18px;
}
.qb-pane-heading h3,
.qb-potential-intro h3 { margin: 4px 0 0; font-size: 25px; color: #17233d; }
.qb-pane-heading p,
.qb-potential-intro p { max-width: 570px; margin: 4px 0 0; color: #717888; line-height: 1.5; }

.qb-plu-key-rules {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 20px;
}
.qb-rule-card {
  min-width: 0;
  padding: 15px;
  border-radius: 14px;
  border: 1px solid #e5e9ef;
  background: #f8fafb;
}
.qb-rule-card > span { display: block; color: #727a88; font-size: 12px; font-weight: 700; }
.qb-rule-card > strong { display: block; margin: 8px 0 5px; color: #17233d; font-size: 16px; line-height: 1.25; }
.qb-rule-card > small { display: block; color: #7d8490; font-size: 11px; line-height: 1.35; }
.qb-rule-card.numeric { border-color: #d8e8e1; background: #f4faf7; }
.qb-rule-card.conditional { border-color: #f0dfb9; background: #fffbf2; }
.qb-empty-state { grid-column: 1 / -1; margin: 0; padding: 18px; border-radius: 13px; background: #f7f8fa; color: #697386; }

.qb-technical-mount > section {
  margin: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0 !important;
}
.qb-property-dashboard .zoning > .eyebrow,
.qb-property-dashboard .heritage > .eyebrow,
.qb-property-dashboard .risks > .eyebrow,
.qb-property-dashboard .plu-panel > .eyebrow,
.qb-property-dashboard .zoning > h3,
.qb-property-dashboard .heritage > h3,
.qb-property-dashboard .risks > h3,
.qb-property-dashboard .plu-panel > h3,
.qb-property-dashboard .plu-panel > p.muted,
.qb-property-dashboard #analyze-heritage-button,
.qb-property-dashboard #analyze-risks-button,
.qb-property-dashboard #open-plu-button {
  display: none !important;
}

.qb-property-dashboard .plu-panel .plu-context {
  margin: 10px 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8fafb;
}
.qb-property-dashboard .plu-panel .field-help { font-size: 12px; }
.qb-property-dashboard .plu-tabs { margin-top: 8px; }
.qb-property-dashboard #plu-search-pane > p { font-size: 13px; color: #737a87; }
.qb-property-dashboard #plu-files { max-height: 280px; overflow: auto; }

/* Autorisations d'urbanisme : un rappel court du passé de la parcelle,
   sans ajouter une rubrique ni un écran à l'étude réglementaire. */
.qb-parcel-authorizations {
  margin: 0 0 18px;
  padding: 15px 16px;
  border: 1px solid #dfe8e4;
  border-radius: 14px;
  background: #f8fbfa;
}
.qb-parcel-authorizations-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.qb-parcel-authorizations h4 {
  margin: 4px 0 0;
  color: #17233d;
  font-size: 16px;
}
.qb-parcel-authorizations-header > p {
  margin: 4px 0 0;
  color: #356458;
  font-size: 13px;
  font-weight: 750;
  text-align: right;
  white-space: nowrap;
}
.qb-parcel-authorizations-list { display: grid; gap: 7px; margin-top: 12px; }
.qb-parcel-authorization-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px;
  padding: 8px 0;
  border-top: 1px solid #e5eeea;
  color: #596b65;
  font-size: 13px;
  line-height: 1.4;
}
.qb-parcel-authorization-line:first-child { border-top: 0; padding-top: 0; }
.qb-parcel-authorization-line strong { color: #183d34; font-weight: 800; }
.qb-parcel-authorization-archive {
  flex-basis: 100%;
  width: max-content;
  margin-top: 1px;
  color: #1a6751;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.qb-parcel-authorization-archive:hover,
.qb-parcel-authorization-archive:focus-visible { text-decoration: underline; }
.qb-parcel-authorizations-message {
  margin: 0;
  color: #697b74;
  font-size: 13px;
  line-height: 1.45;
}
.qb-parcel-authorizations-details { margin-top: 10px; border-top: 1px solid #dfe9e5; padding-top: 9px; }
.qb-parcel-authorizations-details > summary {
  width: max-content;
  color: #276551;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
}
.qb-parcel-authorizations-details-list { display: grid; gap: 10px; margin-top: 12px; }
.qb-parcel-authorization-detail { padding: 10px 11px; border-radius: 10px; background: #fff; }
.qb-parcel-authorization-detail > strong { display: block; margin-bottom: 7px; color: #183d34; font-size: 13px; }
.qb-parcel-authorization-detail dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; margin: 0; }
.qb-parcel-authorization-detail dl > div { min-width: 0; }
.qb-parcel-authorization-detail dt { color: #76827e; font-size: 11px; }
.qb-parcel-authorization-detail dd { margin: 1px 0 0; color: #344740; font-size: 12px; overflow-wrap: anywhere; }
.qb-parcel-authorizations-source { margin: 11px 0 0; color: #7d8985; font-size: 11px; }

.qb-potential-intro #qb-studio-action-mount {
  min-width: 230px;
  text-align: right;
}
.qb-potential-intro #open-site-plan-button {
  width: 100%;
  min-height: 48px;
}

/* La fiche de confirmation historique existe encore pour la logique métier,
   mais ne surcharge plus l'expérience après validation. */
#confirmation-panel { display: none !important; }

/* Une fois la parcelle confirmée, les contrôles automatiques n'ont pas besoin
   de boutons intermédiaires dans la nouvelle interface. */
#analyze-zoning-button { display: none !important; }

/* Bâti cadastral : le même bouton devient une bascule visible. */
.c8-tool-existing.active {
  background: #fff1ef !important;
  border-color: #e4aca5 !important;
  color: #9b3d34 !important;
}

@media (max-width: 980px) {
  .qb-fact-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qb-fact-strip.qb-fact-strip-simple { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qb-fact-strip article { border-bottom: 1px solid #edf0f4; }
  .qb-plu-key-rules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .qb-dashboard-header,
  .qb-pane-heading,
  .qb-potential-intro { align-items: stretch; flex-direction: column; }
  .qb-topic-tabs { grid-template-columns: 1fr 1fr; }
  .qb-fact-strip,
  .qb-plu-key-rules { grid-template-columns: 1fr; }
  .qb-fact-strip.qb-fact-strip-simple { grid-template-columns: 1fr; }
  .qb-fact-strip article { border-right: 0; }
  .qb-parcel-authorizations-header { align-items: stretch; flex-direction: column; gap: 4px; }
  .qb-parcel-authorizations-header > p { text-align: left; white-space: normal; }
  .qb-parcel-authorization-detail dl { grid-template-columns: 1fr; }
}

/* Quatre entrées métier, sans écran ni onglet intermédiaire. */
.qb-topic-tabs.qb-topic-tabs-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.qb-inline-actions,
.qb-potential-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}
.qb-excel-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 16px 0;
  padding: 16px 18px;
  border: 1px solid #dfe6ec;
  border-radius: 15px;
  background: #f8fafb;
}
.qb-excel-card strong {
  display: block;
  color: #17233d;
  font-size: 16px;
}
.qb-excel-card small {
  display: block;
  margin-top: 4px;
  color: #6d7482;
  line-height: 1.35;
}
.qb-abf-nearby {
  margin: 14px 0 18px;
}
.qb-abf-nearby h4 {
  margin: 0 0 9px;
  color: #17233d;
}
.qb-monument-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
}
.qb-monument-grid article {
  padding: 14px 15px;
  border: 1px solid #e2e7ed;
  border-radius: 13px;
  background: #fbfcfd;
}
.qb-monument-grid strong,
.qb-monument-grid span {
  display: block;
}
.qb-monument-grid strong {
  color: #17233d;
  line-height: 1.25;
}
.qb-monument-grid span {
  margin-top: 5px;
  color: #697386;
  font-size: 12.5px;
  line-height: 1.4;
}
/* Le panneau historique est désormais la vue "Pièces officielles" : son
   contexte construction existante n'est plus affiché ni utilisé. */
#plu-panel > .eyebrow { display: none; }
#plu-panel .plu-context { display: none !important; }
.plu-upload-details {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid #e4e8e6;
}
.plu-upload-details > summary {
  cursor: pointer;
  color: #126b4e;
  font-weight: 750;
}
.plu-upload-details[open] > summary { margin-bottom: 16px; }
@media (max-width: 680px) {
  .qb-topic-tabs.qb-topic-tabs-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qb-excel-card { align-items: stretch; flex-direction: column; }
  .qb-inline-actions,
  .qb-potential-actions { justify-content: stretch; }
  .qb-inline-actions > button,
  .qb-potential-actions > button,
  .qb-potential-actions > div > button { width: 100%; }
}


/* =====================================================================
   VALEURS EXACTES — écran court
   ---------------------------------------------------------------------
   Hiérarchie assumée : deux chiffres de tête, six cotes, puis ce qu'il
   reste à décider. Tout le reste est replié. Une règle sans limite ne
   doit jamais attirer l'œil autant qu'une cote opposable.
   ===================================================================== */

.qb-precision { display: flex; flex-direction: column; gap: 22px; }

.qb-precision-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px; flex-wrap: wrap;
  padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.qb-precision-head h3 { margin: 0; font-size: 20px; line-height: 1.25; }
.qb-precision-sub { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.qb-precision-badge {
  display: flex; align-items: baseline; gap: 8px;
  padding: 8px 14px; border-radius: 999px; background: #eef6e8;
}
.qb-precision-badge strong { font-size: 16px; color: var(--green-dark); }
.qb-precision-badge span { font-size: 12px; color: var(--muted); }

/* --- Deux chiffres de tête --------------------------------------------- */

.qb-kpi-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.qb-kpi {
  padding: 20px 22px; border-radius: var(--radius);
  background: #0e2440; color: #fff; box-shadow: var(--shadow);
}
.qb-kpi span {
  display: block; font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: #9fc6ff; font-weight: 600;
}
.qb-kpi strong {
  display: block; margin-top: 8px; font-size: 32px; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.qb-calc-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.qb-calc-list li { display: grid; gap: 2px; font-size: 12.5px; }
.qb-calc-list strong { font-variant-numeric: tabular-nums; }
.qb-calc-list span, .qb-calc-list em { color: var(--muted); font-size: 11.5px; }

/* --- Les six cotes ------------------------------------------------------ */

.qb-param-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.qb-param {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 17px; background: var(--surface);
  display: grid; gap: 8px; align-content: start;
  transition: box-shadow .15s var(--ease);
}
.qb-param:hover { box-shadow: var(--shadow); }
.qb-param-ok { border-top: 3px solid var(--green); }
.qb-param-warn { border-top: 3px solid var(--orange); }
.qb-param-info { border-top: 3px solid var(--blue); }
.qb-param-mute { border-top: 3px solid #c6d0da; background: #fbfcfd; }

.qb-param-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.qb-param-label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.qb-param-value { font-size: 27px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.qb-param-mute .qb-param-value { font-size: 16px; color: var(--muted); }
.qb-param-input {
  width: 100%; padding: 8px 10px; border: 1px dashed var(--blue);
  border-radius: 9px; font: inherit; background: #f7fafd;
}
.qb-param-proof summary {
  cursor: pointer; font-size: 11.5px; color: var(--navy); font-weight: 600;
}
.qb-param-proof code {
  display: block; margin: 8px 0; padding: 6px 8px; border-radius: 8px;
  background: #f2f6fa; color: var(--navy);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px; overflow-wrap: anywhere;
}
.qb-param-proof blockquote {
  margin: 8px 0; padding-left: 10px; border-left: 2px solid var(--line);
  font-size: 11.5px; font-style: italic;
}
.qb-param-link { font-size: 11.5px; }

.qb-badge {
  font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; white-space: nowrap;
}
.qb-badge-ok { background: #e8f5e0; color: var(--green-dark); }
.qb-badge-warn { background: #fdf0e0; color: #a35b12; }
.qb-badge-info { background: #e6eef8; color: var(--navy); }
.qb-badge-mute { background: #eef2f6; color: var(--muted); }

/* --- Décisions de projet ------------------------------------------------ */

.qb-precision-decisions {
  border: 1px solid var(--line); border-left: 4px solid var(--orange);
  border-radius: var(--radius); padding: 18px 20px; background: #fffdf9;
  display: grid; gap: 12px;
}
.qb-precision-decisions h4 { margin: 0; font-size: 16px; }
.qb-precision-decisions-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
}
.qb-reset-hypotheses { border-color: var(--line); color: var(--muted, #6b7280); background: #fff; }
.qb-reset-hypotheses:hover { background: #f5f5f4; }

.qb-height-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: 12px; background: #fff;
  border: 1px solid var(--line);
}
.qb-height-label { font-size: 13px; font-weight: 600; }
.qb-height-input {
  width: 110px; padding: 9px 11px; border: 1px solid var(--line);
  border-radius: 10px; font: inherit; font-variant-numeric: tabular-nums;
}
.qb-height-input:focus-visible { outline: 2px solid var(--navy); outline-offset: 1px; }
.qb-height-row small { flex-basis: 100%; }

.qb-inline-action {
  padding: 8px 12px; border-radius: 999px;
  border: 1px dashed var(--green-dark); background: #f4faef;
  color: var(--green-dark); font-size: 12px; font-weight: 600; cursor: pointer;
}
.qb-inline-action:hover { background: #eaf5e0; }

.qb-question {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; background: #fff; display: grid; gap: 9px;
}
.qb-question > strong { font-size: 14px; }
.qb-choice-row { display: flex; flex-wrap: wrap; gap: 9px; }
.qb-choice {
  flex: 1 1 170px; text-align: left; cursor: pointer;
  border: 1px solid var(--line); border-radius: 11px; background: #fff;
  padding: 11px 13px; display: grid; gap: 3px;
}
.qb-choice:hover { border-color: var(--navy); }
.qb-choice.active {
  border-color: var(--green-dark); background: #f2f9ec;
  box-shadow: inset 0 0 0 1px var(--green-dark);
}
.qb-choice-label { font-size: 12.5px; color: var(--muted); }
.qb-choice-value { font-size: 18px; font-variant-numeric: tabular-nums; color: var(--ink); }
.qb-choice-row.compact { gap: 8px; }
.qb-choice.compact {
  flex: 0 1 auto; min-width: 92px;
  display: flex; align-items: baseline; gap: 8px; padding: 9px 12px;
}
.qb-choice.compact .qb-choice-label { font-size: 11.5px; font-weight: 700; color: var(--ink); }
.qb-choice.compact .qb-choice-value { font-size: 14px; }

.qb-answered-chip {
  justify-self: start;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--green-dark); background: #f2f9ec;
  color: var(--green-dark); font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.qb-answered-chip:hover { background: #e6f3da; }
.qb-answered-clear { font-size: 15px; line-height: 1; opacity: .7; }

/* --- Replis et pied ----------------------------------------------------- */

.qb-precision-details summary {
  cursor: pointer; font-weight: 600; font-size: 13px; color: var(--navy); padding: 6px 0;
}
.qb-secondary-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.qb-secondary-list li {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 7px 10px; border-radius: 8px; background: #f7fafc; font-size: 12.5px;
}
.qb-secondary-list strong { font-variant-numeric: tabular-nums; }
.qb-secondary-mute { color: var(--muted); font-weight: 500; }

.qb-precision-muted { color: var(--muted); font-size: 12px; margin: 0; }
.qb-precision-warning {
  margin: 8px 0 0; padding: 10px 12px; border-radius: 10px;
  background: #fdf3e0; color: #7a4d05; font-size: 12.5px;
}
.qb-precision-error {
  padding: 12px 14px; border-radius: 10px; background: #fdecec;
  color: #8c2020; font-size: 13px;
}
.qb-precision-empty { color: var(--muted); font-size: 13px; }
.qb-precision-actions { display: grid; gap: 8px; justify-items: start; }
.qb-precision-primary {
  background: var(--green-dark); color: #fff; border: 0;
  padding: 11px 22px; border-radius: 999px; font-weight: 650; cursor: pointer;
}
.qb-precision-primary:hover { background: var(--green); }
.qb-precision-legalese { margin: 0; font-size: 11px; color: var(--muted); max-width: 80ch; }

@media (max-width: 760px) {
  .qb-kpi-row { grid-template-columns: 1fr; }
  .qb-precision-head { flex-direction: column; align-items: flex-start; }
}

/* Quatre rubriques : PLU, PPRI, ABF, potentiel. */
.qb-topic-tabs.qb-topic-tabs-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .qb-topic-tabs.qb-topic-tabs-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Mention « mesure droite » : lisible sur le fond sombre du panneau parcelle,
   sans concurrencer la cote elle-même. */
.c8-straightened {
  display: block; font-size: 10px; font-weight: 500;
  color: rgba(255, 255, 255, .62); letter-spacing: .01em;
}
.c8-boundary-row { align-items: center; }
.c8-boundary-row strong { white-space: nowrap; }
.c8-tool-green-auto {
  background: #eef7e4 !important; color: #3f6e1f !important;
  border: 1px solid #b9d79a !important;
}
.c8-tool-green-auto:hover:not(:disabled) { background: #e2f1d3 !important; }

/* Étape 1 réduite à l'essentiel : carte, sélection, validation. */
.selection-address { font-size: 15px; font-weight: 650; margin: 0 0 2px; }
.current-study-context { margin: .65rem 0 .8rem; padding: .8rem .9rem; border: 1px solid #b7d5ca; border-left: 4px solid var(--green); border-radius: 9px; background: #f4faf7; }
.current-study-context h3 { margin: 0 0 .65rem; color: var(--green); font-size: .88rem; text-transform: uppercase; letter-spacing: .04em; }
.current-study-context > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: .55rem; padding: .3rem 0; border-top: 1px solid rgb(11 73 53 / 12%); }
.current-study-context > div:first-of-type { border-top: 0; }
.current-study-context strong { color: var(--muted); font-size: .73rem; text-transform: uppercase; }
.current-study-context p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; font-weight: 700; line-height: 1.35; }
.confirmation-summary-court {
  display: grid; gap: 8px; margin: 0 0 14px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.confirmation-summary-court > div {
  padding: 10px 12px; border-radius: 12px; background: #f4f7fa; border: 1px solid var(--line);
}
.confirmation-summary-court dt {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); font-weight: 700; margin: 0;
}
.confirmation-summary-court dd {
  margin: 4px 0 0; font-size: 15px; font-weight: 650; overflow-wrap: anywhere;
}

/* 21.11: explicit selection of overlapping entities */
#c8-entity-picker { width: 100%; min-height: 40px; margin: .5rem 0; border: 1px solid #b9cfca; border-radius: 8px; background: white; color: #193f3b; }
#c8-entity-picker:focus-visible { outline: 3px solid #4b9b89; outline-offset: 2px; }

/* Espace professionnel : outils regroupés, sélection immédiatement visible. */
.hero { padding-top: 1.8rem; padding-bottom: 1.4rem; }
.hero h1 { letter-spacing: -.04em; }
.hero .intro { line-height: 1.7; max-width: 65ch; }
.c8-tool-cluster { padding: .3rem; border: 1px solid #dce7e2; border-radius: 10px; }
.c8-editor-tools button { min-height: 38px; border-radius: 7px; }
.c8-editor-tools { gap: .45rem; flex-wrap: wrap; }
.c8-studio-side > section { border: 1px solid #dce7e2; border-radius: 12px; }
.c8-selection-card small { display: block; color: #526a63; line-height: 1.45; }
button:focus-visible, summary:focus-visible { outline: 3px solid #4b9b89; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* Refonte du 2026-09-10 (« tout les onglets sont mélangés sur le haut,
   c'est horrible et incompréhensible ») : les trois groupes d'outils du
   Studio (dessiner / modifier / scénario & export) existaient déjà en HTML
   (.c8-tool-cluster) mais leur séparation visuelle — un simple filet gris
   très clair — se noyait dans la rangée de boutons colorés. Chaque groupe
   porte maintenant un cartouche propre (fond distinct, bordure nette,
   étiquette de catégorie en majuscules) et un vrai espace entre eux, pour
   que les trois familles d'actions se lisent d'un coup d'œil, jamais comme
   une seule rangée continue. */
.c8-studio-tools {
  gap: 1.1rem !important;
  row-gap: .6rem !important;
  align-items: flex-start !important;
}
.c8-tool-cluster {
  position: relative;
  display: flex !important;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem !important;
  padding: 1.4rem .55rem .5rem !important;
  border-radius: 12px !important;
  border-width: 1px !important;
  border-style: solid !important;
}
.c8-tool-cluster::before {
  content: attr(data-cluster-label);
  position: absolute;
  top: .3rem;
  left: .6rem;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  opacity: .68;
}
.c8-tool-cluster.c8-tool-create {
  background: rgba(28, 121, 184, .07) !important;
  border-color: rgba(28, 121, 184, .35) !important;
}
.c8-tool-cluster.c8-tool-create::before { color: #145f93; }
.c8-tool-cluster.c8-tool-history {
  background: rgba(89, 101, 111, .07) !important;
  border-color: rgba(89, 101, 111, .35) !important;
}
.c8-tool-cluster.c8-tool-history::before { color: #45545e; }
.c8-tool-cluster.c8-export-cluster {
  background: rgba(79, 155, 69, .08) !important;
  border-color: rgba(79, 155, 69, .38) !important;
}
.c8-tool-cluster.c8-export-cluster::before { color: #3a7a30; }
.c8-tool-cluster #c8-editor-close {
  margin-left: auto;
}

/* Atelier 21.14 : dessin architectural, outils de projet et volume synchronisé. */
.c8-editor{inset:0!important;border-radius:0!important;background:#f5f7f9!important;font-family:Arial,Tahoma,sans-serif;color:#253443;display:flex;flex-direction:column}.c8-editor[hidden]{display:none!important}.c8-studio-bar{background:#fff!important;color:#243746!important;box-shadow:none!important;border-bottom:1px solid #d9e1e8;padding:14px 20px!important;gap:14px!important}.c8-studio-title strong{font-size:20px!important;color:#203647!important}.c8-studio-title .muted{font-size:11px!important;color:#657584!important}.c8-studio-kicker{color:#3c6a86!important;letter-spacing:2px}.c8-editor-tools{gap:8px!important;align-items:center!important}.c8-tool-cluster{background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important;gap:4px!important}.c8-tool-cluster:before{display:none!important}.c8-editor button,.c8-editor select,.c8-editor input{font-family:inherit}.c8-editor button{border-radius:5px!important;box-shadow:none!important;font-size:12px!important;min-height:32px;background:#fff;color:#31475b;border:1px solid #d5dee6}.c8-editor button:hover{background:#eef4f8}.c8-editor button:focus-visible,.c8-editor input:focus-visible,.c8-editor select:focus-visible{outline:3px solid #79a4dc;outline-offset:2px}.c8-workspace-bar{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:10px 18px;background:#fff;border-bottom:1px solid #dce4ea}.c8-view-switch,.c8-draw-tools{display:flex;gap:4px}.c8-view-switch button[aria-pressed=true]{background:#243e54;color:#fff;border-color:#243e54}.c8-workspace-bar #c8-live-state{font-size:11px;color:#637b88;margin-left:auto}.c8-live-metrics{display:grid;grid-template-columns:repeat(4,1fr) 1.4fr;background:#fff;border-bottom:1px solid #dce4ea;padding:10px 20px;gap:16px}.c8-live-metrics>div{border-right:1px solid #e1e8ed;display:grid;gap:4px}.c8-live-metrics small{color:#6f7f8a;font-size:11px}.c8-live-metrics strong{font-size:18px;font-weight:500;color:#263f4e}.c8-live-metrics.is-stale strong{opacity:.5}.c8-editor-body{display:flex!important;flex:1;min-height:0!important;overflow:hidden;gap:0!important}.c8-plan-stage{position:relative;display:flex!important;flex:1;min-width:0;min-height:0;padding:0!important;background:#fff!important;overflow:hidden;align-items:stretch!important}.c8-live-hint{position:absolute!important;top:10px;left:12px;right:12px;z-index:4;pointer-events:none;font-size:11px!important;padding:6px 10px!important;background:rgba(255,255,255,.94)!important;color:#697b88!important;width:auto!important}.c8-plan-viewport,.c8-volume-viewport{flex:1;min-width:0;min-height:0;overflow:hidden;position:relative}.c8-volume-viewport{border-left:1px solid #d8e2e9}.c8-volume-viewport canvas{width:100%;height:100%;display:block;touch-action:none;cursor:grab}.c8-editor-body[data-view=plan] .c8-volume-viewport,.c8-editor-body[data-view=volume] .c8-plan-viewport{display:none}.c8-editor-side{flex:0 0 330px!important;width:330px!important;overflow:auto!important;background:#f7f9fa!important;padding:14px!important;border-left:1px solid #dce4ea;box-sizing:border-box}.c8-editor-side section{background:#fff!important;border:1px solid #e1e7ec!important;border-radius:6px!important;padding:13px!important;margin-bottom:10px!important;box-shadow:none!important}.c8-parcel-card,.c8-potential-card{display:none!important}.c8-editor-side h4,.c8-editor-side h5{font-size:14px!important;color:#283c4a!important;margin:4px 0 12px}.c8-editor-side small,.c8-editor-side .muted{font-size:11px;line-height:1.5;color:#6e7c85}.c8-architecture{display:grid;gap:10px;margin-top:16px}.c8-architecture>label{display:flex;align-items:center;justify-content:space-between;font-size:12px}.c8-architecture input[type=number]{width:92px;min-height:32px;padding:4px 8px;border:1px solid #ccd7df;border-radius:4px}.c8-architecture label.c8-facade{justify-content:flex-start;gap:8px}.c8-check{border:1px solid #e4e9ed;border-left:3px solid #c19947;border-radius:4px;margin-top:8px;padding:9px;font-size:12px;line-height:1.5}.c8-check.conforme{border-left-color:#58906b}.c8-check.non_conforme{border-left-color:#c65c5c}.c8-check summary{cursor:pointer;font-weight:500}.c8-check p,.c8-rule-sources p{overflow-wrap:anywhere}.c8-check small{display:block}.c8-rule-sources{margin-top:16px;font-size:11px;line-height:1.6}.c8-diagnostic-total{font-size:12px;color:#596c7b}.c8-editor-status{margin:0!important;min-height:24px;background:#fff;padding:5px 18px!important;font-size:11px!important;border-top:1px solid #e2e8ed}.c8-tool-menu{position:relative;display:block!important}.c8-tool-menu summary{padding:8px 12px;font-size:12px;cursor:pointer;border:1px solid #d5dee6;border-radius:5px;white-space:nowrap}.c8-menu-content{position:absolute;top:100%;right:0;z-index:20;width:210px;background:#fff;border:1px solid #dce4ea;padding:10px;box-shadow:0 10px 30px #22334420;display:grid;gap:6px}.c8-menu-content label{font-size:12px;padding:8px}.c8-tool-create{flex-wrap:wrap!important}
@media(max-width:1200px){.c8-studio-bar{flex-wrap:wrap!important}.c8-plan-stage{flex-direction:column}.c8-volume-viewport{border-left:0;border-top:1px solid #d8e2e9}.c8-editor-side{flex-basis:300px!important;width:300px!important}.c8-live-metrics strong{font-size:15px}}
@media(max-width:760px){.c8-editor{overflow:auto!important}.c8-editor-body{display:block!important;overflow:visible;flex:none}.c8-plan-stage{height:660px;display:flex!important}.c8-editor-side{width:100%!important;overflow:visible!important}.c8-workspace-bar{padding:8px}.c8-workspace-bar #c8-live-state{margin:0}.c8-live-metrics{grid-template-columns:repeat(2,1fr);padding:12px}.c8-live-metrics>div:last-child{grid-column:span 2}.c8-studio-tools{flex-wrap:wrap}.c8-tool-create{width:100%}.c8-studio-title strong{font-size:18px!important}}

/* Atelier 21.15 : volumétrie, altimétrie et contrôles réglementaires directs. */
.c8-potential-card,.c8-altimetry-card{display:block!important}
.c8-altimetry-grid{display:grid;gap:6px;margin:.25rem 0 .55rem}
.c8-altimetry-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:7px 8px;border:1px solid #e4dfef;border-radius:5px;background:#faf8fd;font-size:11px}
.c8-altimetry-row strong{color:#5c427f;font-size:12px}
.c8-terrain-slope{margin:.55rem 0 .3rem;padding:.55rem .65rem;border-left:3px solid #74569d;background:#f5f1fa;color:#493864;font-size:12px;font-weight:650}
.c8-preset-tabs,.c8-roof-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
.c8-roof-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}
.c8-editor .c8-preset-tab,.c8-editor .c8-roof-tab{min-height:36px!important;padding:5px 7px!important;white-space:normal;line-height:1.15}
.c8-editor .c8-preset-tab.active,.c8-editor .c8-roof-tab.active{background:#264a65!important;border-color:#264a65!important;color:#fff!important;font-weight:700}
.c8-live-compliance{padding:7px 9px;border:1px solid transparent;border-radius:5px}
.c8-live-compliance.ok{background:#edf8f1;border-color:#b9ddc6}
.c8-live-compliance.bad{background:#fff0ed;border-color:#eebbb1}
.c8-live-compliance.neutral{background:#f4f6f8;border-color:#e0e5e8}
.c8-live-compliance.ok strong,.c8-live-compliance.ok .c8-live-requirement{color:#236b45}
.c8-live-compliance.bad strong,.c8-live-compliance.bad .c8-live-requirement{color:#a53e31}
.c8-live-requirement{font-size:10px;font-weight:700;line-height:1.25}
.c8-live-kpi .c8-kpi-gap{font-weight:700}
.c8-live-kpi.ok .c8-kpi-gap{color:#236b45}
.c8-live-kpi.bad .c8-kpi-gap{color:#a53e31}
@media(max-width:1200px){.c8-preset-tabs{grid-template-columns:1fr}.c8-roof-tabs{grid-template-columns:1fr 1fr}}

/* Atelier 21.16 : état existant LiDAR HD (MNT/MNS), terrain maillé et hauteurs NGF. */
.c8-lidar-row{border-color:#d9e4df;background:#f7faf8}
.c8-lidar-row strong{color:#355f54}

/* Atelier : navigation distincte, panneaux lisibles et export accessible. */
.c8-inspector-tabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:4px; position:sticky; top:0; z-index:5; background:#edf3f2; padding:8px 4px; border-bottom:1px solid #ccdcd8; }
.c8-inspector-tabs button { padding:11px 2px; border:1px solid transparent; border-radius:7px; background:transparent; color:#405c59; font-size:12px; font-weight:700; cursor:pointer; }
.c8-inspector-tabs button[aria-selected="true"] { background:#17675d; color:white; box-shadow:0 2px 5px #173f3020; }
.c8-inspector-tabs button:focus-visible,.c8-client-export:focus-visible { outline:3px solid #dfab51; outline-offset:2px; }
.c8-inspector-panel[hidden] { display:none !important; }
.c8-inspector-panel { display:grid; gap:12px; padding-top:12px; }
.c8-client-export { width:100%; padding:12px; border:0; border-radius:8px; background:#17675d; color:#fff; font-weight:700; cursor:pointer; }
.c8-draw-tools button { min-height:36px; }
.c8-live-hint { font-size:12px; line-height:1.5; }
.c8-volume-viewport canvas { touch-action:none; }
.c8-webgl-caption{position:absolute;z-index:3;top:14px;left:18px;display:grid;gap:4px;pointer-events:none;color:#566b7c;font:12px Arial,sans-serif;text-shadow:0 1px 0 rgba(255,255,255,.9)}
.c8-webgl-caption strong{font-weight:500;letter-spacing:.15px}.c8-webgl-caption span{font-size:11px;color:#617484}

/* Atelier 21.17.2 : création regroupée, cotes visibles et volumétrie combinable. */
.c8-inspector-tabs{grid-template-columns:repeat(5,minmax(0,1fr))}
.c8-workspace-bar{align-items:flex-start}
.c8-draw-tools{display:flex;flex-wrap:wrap;align-items:center;gap:5px;flex:1}
.c8-draw-tools select{min-height:36px;max-width:160px;border:1px solid #d5dee6;border-radius:5px;padding:0 8px;background:#fff;color:#31475b;font-size:12px}
.c8-editor .c8-draw-tools .c8-tool-building{background:#176faa!important;border-color:#176faa!important;color:#fff!important}
.c8-editor .c8-draw-tools .c8-tool-green{background:#3f954e!important;border-color:#3f954e!important;color:#fff!important}
.c8-editor .c8-draw-tools .c8-tool-dimension{background:#7153ad!important;border-color:#7153ad!important;color:#fff!important}
.c8-editor .c8-draw-tools .c8-tool-dimension.active{box-shadow:0 0 0 3px rgba(113,83,173,.2)!important}
.c8-editor .c8-draw-tools .c8-tool-existing{background:#4f626d!important;border-color:#4f626d!important;color:#fff!important}
.c8-editor .c8-draw-tools .c8-tool-parking{background:#5a6470!important;border-color:#5a6470!important;color:#fff!important}
.c8-parcel-card{display:block!important}
.c8-project-dimension-group{border:1px solid #e0e7eb;border-radius:6px;padding:9px;margin-top:8px;background:#fbfcfd}
.c8-project-dimension-group.active{border-color:#7696ac;box-shadow:inset 3px 0 0 #365f7b}
.c8-editor .c8-project-dimension-title{width:100%;text-align:left;font-weight:700;background:transparent!important;border:0!important;padding:3px 0!important;min-height:24px!important;color:#29465a}
.c8-project-dimension-subtitle{display:block;margin:8px 0 4px;font-size:11px;color:#61737f;text-transform:uppercase;letter-spacing:.04em}
.c8-project-dimension-grid{display:grid;gap:4px}
.c8-project-dimension-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:5px 7px;border-radius:4px;background:#f4f7f9;font-size:11px}
.c8-project-dimension-row strong{font-size:12px;color:#263f4e;white-space:nowrap}
.c8-preset-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}
.c8-roof-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}
.c8-editor .c8-attic-toggle{width:100%;min-height:38px!important;border:1px dashed #8b77b4!important;background:#f8f5fc!important;color:#5e4789!important;font-weight:700}
.c8-editor .c8-attic-toggle.active{border-style:solid!important;background:#ede6f7!important;color:#4e3879!important}
.c8-editor .c8-attic-toggle:disabled{opacity:.5;cursor:not-allowed}
.c8-client-export-secondary{margin-top:8px!important;background:#fff!important;color:#17675d!important;border:1px solid #17675d!important}
@media(max-width:1200px){.c8-inspector-tabs{grid-template-columns:repeat(5,minmax(58px,1fr))}.c8-workspace-bar{gap:8px}.c8-roof-tabs{grid-template-columns:1fr}.c8-draw-tools select{max-width:130px}}
@media(max-width:760px){.c8-inspector-tabs{grid-template-columns:repeat(5,minmax(64px,1fr));overflow-x:auto}.c8-inspector-tabs button{font-size:11px}.c8-draw-tools{width:100%}.c8-draw-tools select{max-width:none;flex:1 1 150px}}

/* Atelier 21.17.2 — volumétrie directement visible + 2D épuré. */
.c8-direct-volume{
  display:flex;align-items:center;gap:3px;flex-wrap:nowrap;padding:3px 5px;
  border:1px solid #cfd9e1;border-radius:6px;background:#f7fafb;
}
.c8-direct-volume-label{font-size:10px;font-weight:800;color:#415866;white-space:nowrap;margin-right:2px}
.c8-direct-roof-label{font-size:9px;font-weight:800;color:#74848f;text-transform:uppercase;letter-spacing:.4px;margin-left:4px}
.c8-editor .c8-volume-tab{min-height:30px!important;padding:5px 8px!important;font-size:11px!important;white-space:nowrap;background:#fff;border-color:#cfd9e1}
.c8-editor .c8-volume-tab.active,.c8-editor .c8-volume-tab[aria-pressed="true"]{background:#274d63!important;color:#fff!important;border-color:#274d63!important;font-weight:700}
.c8-editor .c8-roof-direct.active,.c8-editor .c8-roof-direct[aria-pressed="true"]{background:#6a568d!important;border-color:#6a568d!important}
.c8-editor .c8-volume-tab:disabled{opacity:.42;cursor:not-allowed}
.c8-direct-volume-note{margin:0 0 8px!important;padding:8px 9px;border-radius:5px;background:#f3f7f9;color:#526975!important;font-size:11px!important}
@media(max-width:1450px){.c8-direct-volume{order:4;flex-basis:100%;width:max-content}.c8-workspace-bar{align-items:center}.c8-direct-volume-label{min-width:122px}}
@media(max-width:760px){.c8-direct-volume{width:100%;overflow-x:auto}.c8-direct-volume-label{min-width:auto}.c8-editor .c8-volume-tab{flex:0 0 auto}}
.c8-surface-audit{margin-top:8px;border-top:1px solid #e5ebef;padding-top:7px;font-size:10.5px;color:#526773}
.c8-surface-audit summary{cursor:pointer;font-weight:700;color:#385365}
.c8-surface-audit p{margin:6px 0 0;line-height:1.4}


/* Atelier 21.18 : insertion photoréaliste guidée par le plan de masse. */
.c8-editor .c8-draw-tools .c8-tool-visual{background:#8b5b21!important;border-color:#8b5b21!important;color:#fff!important;font-weight:750}
.c8-editor .c8-draw-tools .c8-tool-visual:hover{filter:brightness(.96)}
.c8-visualizer[hidden]{display:none!important}
.c8-visualizer{position:absolute;inset:0;z-index:90;overflow:auto;padding:24px;background:rgba(22,35,43,.72);backdrop-filter:blur(3px)}
.c8-visualizer-card{width:min(1180px,100%);margin:0 auto;background:#fff;border-radius:12px;box-shadow:0 24px 70px rgba(18,31,39,.3);padding:20px}
.c8-visualizer-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;padding-bottom:12px;border-bottom:1px solid #dde5e9}
.c8-visualizer-head h2{margin:3px 0 0;color:#253f4d;font-size:22px;line-height:1.2}
.c8-visualizer-head button{min-height:34px!important;background:#fff!important;border:1px solid #ccd7dd!important;color:#405764!important}
.c8-visualizer-lead{margin:14px 0 18px;padding:12px 14px;border-left:4px solid #d39a43;background:#fff9ee;color:#4c4a42;line-height:1.5;font-size:13px}
.c8-no-key{display:inline-block;margin-left:5px;color:#17675d;font-weight:750}
.c8-visualizer-grid{display:grid;grid-template-columns:minmax(300px,.82fr) minmax(420px,1.18fr);gap:20px;align-items:start}
.c8-visualizer-inputs{display:grid;gap:12px}
.c8-visualizer-inputs>label{display:grid;gap:6px;color:#314b59;font-size:12px;font-weight:750}
.c8-visualizer-inputs select,.c8-visualizer-inputs textarea{width:100%;border:1px solid #ccd8df;border-radius:7px;background:#fff;padding:9px 10px;color:#263f4e;font:inherit;font-weight:500;box-sizing:border-box}
.c8-upload-card{padding:12px;border:1px dashed #9eb2bd;border-radius:8px;background:#f8fbfc}
.c8-upload-card span{color:#7a8991;font-size:10px;font-weight:650;text-transform:uppercase;letter-spacing:.04em}
.c8-upload-card input{width:100%;font-size:11px;color:#536b78}
.c8-visualizer-preview{min-width:0;border:1px solid #dbe4e8;border-radius:9px;background:#f4f7f8;padding:10px}
.c8-placement-help{display:grid;gap:3px;margin-bottom:9px;color:#405966;font-size:11px;line-height:1.4}
.c8-placement-help strong{font-size:12px;color:#27495c}
#c8-visual-photo-canvas{display:block;width:100%;height:auto;max-height:62vh;object-fit:contain;background:#dfe6e9;border-radius:6px;cursor:crosshair}
.c8-placement-actions{display:flex;justify-content:flex-end;margin-top:8px}
.c8-visualizer .secondary{background:#fff!important;border:1px solid #bfcdd4!important;color:#3f5866!important}
.c8-visual-project-summary{border:1px solid #dce5e9;border-radius:8px;background:#fbfcfd;padding:11px}
.c8-visual-project-head{display:flex;justify-content:space-between;gap:8px;align-items:baseline;margin-bottom:9px;color:#294758;font-size:12px}
.c8-visual-project-head span{color:#607681;font-size:10.5px;text-align:right}
.c8-visual-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
.c8-visual-kpi{display:grid;gap:2px;padding:7px;background:#f1f5f6;border-radius:5px}
.c8-visual-kpi small{font-size:9px;color:#71838c;text-transform:uppercase}
.c8-visual-kpi strong{font-size:12px;color:#283f4c}
.c8-visual-setbacks{display:grid;gap:5px;margin-top:9px;padding-top:8px;border-top:1px solid #e2e8eb;font-size:10px}
.c8-visual-setback{display:block;padding:5px 6px;border-radius:4px;background:#f0f3f5;color:#52636c}
.c8-visual-setback.conforme{background:#edf8f1;color:#246544}
.c8-visual-setback.non_conforme{background:#fff0ed;color:#9a3d31}
.c8-visual-setback.a_verifier{background:#fff8e9;color:#805c24}
.c8-visual-warning,.c8-visual-error{margin:8px 0 0;padding:7px;border-radius:5px;font-size:10.5px;font-weight:650}
.c8-visual-warning{background:#fff8e9;color:#805c24}.c8-visual-error{background:#fff0ed;color:#9a3d31}
.c8-visualizer-actions{display:flex;gap:8px;justify-content:flex-end;margin:18px 0 6px}
.c8-visualizer-actions button{min-height:40px!important;padding:8px 15px!important;background:#17675d!important;border-color:#17675d!important;color:#fff!important;font-weight:750}
.c8-visual-status{min-height:20px;margin:7px 0 10px;color:#536b78;font-size:11px;text-align:right}
.c8-visual-result{margin:14px 0 0;padding:10px;border:1px solid #dbe4e8;border-radius:9px;background:#f6f8f9}
.c8-visual-result img{display:block;max-width:100%;width:100%;height:auto;border-radius:6px}
.c8-visual-result figcaption{padding:8px 4px 0;color:#667a84;font-size:10.5px;line-height:1.4}
.c8-visual-legal{margin:12px 0 0;padding:9px 11px;border-radius:6px;background:#eef3f5;color:#516671;font-size:10.5px;line-height:1.45}
@media(max-width:900px){.c8-visualizer{padding:10px}.c8-visualizer-card{padding:14px}.c8-visualizer-grid{grid-template-columns:1fr}.c8-visual-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.c8-visualizer-actions{justify-content:stretch}.c8-visualizer-actions button{flex:1}}

/* Atelier 21.19 — lecture calme, repères métriques et décision. */
:root{--paper:#f4f6f3;--navy:#173f3c;--navy-dark:#102e2c;--green:#168170;--green-dark:#0d6558;--blue:#285b59;--line:#dce5df;--shadow:0 12px 36px rgb(27 65 52 / 7%)}
body{background:#f4f6f3;color:#203933}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #329788;outline-offset:3px}
button:disabled{cursor:wait;opacity:.55}
.c8-editor{font-family:Inter,ui-sans-serif,system-ui,sans-serif}
.c8-studio-bar{background:#f8faf7!important;border-bottom:1px solid #dae5dc!important;padding:16px 20px!important}
.c8-studio-kicker{letter-spacing:.16em!important;color:#548171!important;font-size:10px!important}
.c8-studio-title strong{font-size:21px!important;letter-spacing:-.5px}
.c8-workspace-bar{background:#fff!important;padding:12px 16px!important;border-bottom:1px solid #e2e9e4!important}
.c8-editor button{border-radius:8px!important;min-height:34px}
.c8-editor-side{background:#f6f8f5!important}
.c8-live-metrics{background:#fff!important;gap:10px!important;padding:10px 16px!important;border-bottom:1px solid #dce5df}
.c8-live-metric{border:1px solid #e0e8e2!important;background:#f8faf7!important;border-radius:10px;padding:10px 14px!important}
.c8-live-metric strong{font-variant-numeric:tabular-nums;letter-spacing:-.2px}
.c8-live-metric.bad{background:#fff3ef!important;border-color:#efc7b8!important}
.c8-live-metric.ok{background:#edf7f1!important;border-color:#bcdccd!important}
.c8-live-hint{background:#f4f8f3!important;color:#406454!important}
.c8-check{border-radius:9px!important;padding:10px!important;margin:8px 0!important}
.c8-check summary{line-height:1.5;font-weight:650}
.c8-check-action{padding:9px;background:#fff0e8;border-radius:6px;color:#93432a}
.c8-editor .c8-draw-tools .c8-tool-visual{background:#146c5e!important;border-color:#146c5e!important}
.c8-visualizer{position:fixed;padding:28px;background:rgba(16,40,33,.74);backdrop-filter:blur(8px)}
.c8-visualizer-card{max-width:1360px;border-radius:20px;padding:28px;background:#fcfdfb}
.c8-visualizer-head h2{font-size:32px;letter-spacing:-1px;color:#173f35}
.c8-visualizer-head{border-color:#e1e8e1;padding-bottom:18px}
.c8-visualizer-lead{border:0;padding:0;background:none;color:#61716b;font-size:14px}
.c8-insertion-steps{list-style:none;display:flex;gap:10px;padding:0;margin:20px 0 24px}
.c8-insertion-steps li{flex:1;display:flex;gap:10px;align-items:center;background:#eef4ef;padding:13px;border-radius:9px;font-size:12px;color:#395b4d}
.c8-insertion-steps b{color:#168170;font-size:18px}
.c8-visualizer-grid{grid-template-columns:minmax(300px,.8fr) minmax(420px,1.2fr);gap:26px}
.c8-visualizer-inputs{gap:16px}
.c8-visualizer-inputs>label{font-size:13px;gap:8px}
.c8-upload-card{background:#f4f8f1;border:1px dashed #a0b99f;padding:16px;border-radius:12px}
.c8-upload-card input::file-selector-button{border:0;background:#dcebe0;color:#214e3d;border-radius:6px;padding:8px;margin-right:10px;cursor:pointer}
.c8-visualizer-preview{padding:16px;background:#f1f5f0;border:1px solid #dce5dc;border-radius:14px}
.c8-visualizer-preview label{display:grid;gap:7px;font-size:12px;font-weight:650;color:#365348;margin-bottom:12px}
.c8-visualizer-preview input,.c8-visualizer-preview select{padding:10px;border:1px solid #c5d4c8;border-radius:7px;background:white;width:100%;min-width:0}
.c8-visualizer-preview small{font-size:11px;line-height:1.5;font-weight:400}
.c8-placement-help{line-height:1.6;font-size:12px;margin-top:12px}
#c8-calibration-plan{width:100%;height:auto;background:#fff;border:1px solid #dce5df;border-radius:9px;cursor:crosshair}
#c8-visual-photo-canvas{height:auto;max-height:none;width:100%;object-fit:fill}
#c8-visual-photo-canvas[hidden],[hidden]{display:none!important}
.c8-calibration-toolbar{display:flex;gap:8px;margin:12px 0}
.c8-calibration-toolbar button{flex:1;border:1px solid #b9d0bf!important;background:white!important;color:#36584c!important;padding:8px!important}
.c8-calibration-toolbar button[aria-pressed=true]{background:#d9ebdf!important;border-color:#80b39a!important}
.c8-calibration-note{font-size:11px;color:#6a736c;line-height:1.5}
.c8-photo-empty{padding:50px 26px;min-height:200px;background:#e4ece1;border-radius:10px;display:grid;align-content:center;text-align:center;gap:12px;color:#46694e;font-size:13px;line-height:1.6}
.c8-photo-empty strong{font-size:21px;color:#315641}
#c8-calibration-feedback{font-size:12px;color:#245a48;line-height:1.6;min-height:20px}
.c8-placement-actions{gap:8px;flex-wrap:wrap}
.c8-placement-actions button{font-size:11px;padding:8px}
.c8-visual-project-summary{padding:16px;border-radius:12px;background:#fff}
.c8-visual-kpi{padding:10px 7px;background:#edf4ed}
.c8-visual-kpi strong{font-size:14px}
.c8-visual-setbacks{font-size:12px;line-height:1.4}
.c8-visual-warning,.c8-visual-error{font-size:12px;line-height:1.6}
.c8-visualizer-actions{border-top:1px solid #dce5df;padding-top:20px;margin-top:24px}
.c8-visualizer-actions button{min-height:46px!important;padding:10px 22px!important}
.c8-visual-status{text-align:left;font-size:13px;line-height:1.6}
.c8-compare-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 0;color:#2b5145;font-size:14px}
.c8-compare-heading span{font-size:11px;color:#78847b}
.c8-compare-stage{position:relative;overflow:hidden;border-radius:10px}
.c8-compare-stage #c8-visual-before{position:absolute;inset:0;width:100%;height:100%;object-fit:fill;clip-path:inset(0 50% 0 0);border-radius:0}
.c8-before-label,.c8-after-label{position:absolute;top:12px;padding:6px 10px;background:#fffde8e8;color:#2f4e43;border-radius:5px;font-size:11px}
.c8-before-label{left:12px}.c8-after-label{right:12px}
.c8-compare-control{display:flex;align-items:center;gap:20px;font-size:12px;padding:15px 0}.c8-compare-control input{flex:1;accent-color:#168170}
.c8-review-help{font-size:12px;line-height:1.6;color:#506a5f}
.c8-neighbor-card{background:#fff;border:1px solid #dce5df;border-radius:12px;padding:12px}
.c8-neighbor-card button{font-size:11px!important;padding:7px!important;color:#22634d!important;border:1px solid #b6cebd!important;background:#eef6ee!important}
#c8-neighbors-status{font-size:11px;line-height:1.6;color:#687b71}
#c8-neighbors-list{max-height:270px;overflow:auto}
.c8-neighbor-row{display:grid;gap:6px;padding:10px 0;border-top:1px solid #e3e9e3;font-size:12px;color:#3c5c4c}
.c8-neighbor-row small{font-size:10px;line-height:1.5;color:#6a7d70}
@media(max-width:900px){.c8-visualizer{padding:10px}.c8-visualizer-card{padding:18px;border-radius:12px}.c8-visualizer-grid{grid-template-columns:1fr}.c8-visualizer-head h2{font-size:26px}.c8-insertion-steps{gap:5px}.c8-insertion-steps li{padding:9px;font-size:10px;display:grid;gap:4px}.c8-visualizer-actions{flex-wrap:wrap}.c8-compare-heading{flex-wrap:wrap}}
.c8-local-prescriptions{padding:12px 0 0;margin-top:12px;border-top:1px solid #dde7dc;font-size:12px;line-height:1.6;color:#42604c}
.c8-local-prescriptions p{margin:6px 0}.c8-local-prescriptions small{font-size:11px;color:#768274}.c8-local-prescriptions details{margin-top:6px}
[aria-busy=true] #c8-calibration-plan,[aria-busy=true] #c8-visual-photo-canvas{pointer-events:none;opacity:.65}
.c8-material-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.c8-material-grid label{display:grid;gap:7px;font-size:12px;font-weight:650;color:#365348}.c8-material-grid select{font-size:11px;min-width:0}

/* Atelier insertion simplifié — plan de masse + vue frontale + matériaux. */
.c8-insertion-workshop{width:min(1240px,100%)!important;max-width:1240px!important;padding:26px!important;background:#f7f9f5!important}
.c8-insertion-workshop .c8-visualizer-head{align-items:center!important;margin-bottom:22px!important;padding-bottom:18px!important}
.c8-insertion-workshop .c8-visualizer-head>div{max-width:760px}
.c8-insertion-workshop .c8-visualizer-head h2{margin:3px 0 7px!important;font-size:30px!important;line-height:1.1!important}
.c8-insertion-workshop .c8-visualizer-head p{margin:0;color:#64756c;font-size:13px;line-height:1.55}
.c8-workshop-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:start}
.c8-workshop-zone{background:#fff;border:1px solid #dce6df;border-radius:14px;padding:18px;box-shadow:0 8px 24px rgb(31 66 51 / 4%)}
.c8-workshop-zone>header{display:flex;gap:12px;align-items:flex-start;margin-bottom:14px}
.c8-workshop-zone>header>span{display:grid;place-items:center;flex:0 0 34px;height:34px;border-radius:10px;background:#e7f2ea;color:#176b5d;font-size:12px;font-weight:800;letter-spacing:.04em}
.c8-workshop-zone h3{margin:1px 0 4px;color:#1d463b;font-size:17px;line-height:1.2}
.c8-workshop-zone header p{margin:0;color:#6c7b73;font-size:12px;line-height:1.45}
.c8-workshop-plan #c8-calibration-plan{display:block;width:100%;height:auto;min-height:240px;border:1px solid #dbe5de;border-radius:10px;background:#fcfdfb;pointer-events:none;cursor:default}
.c8-workshop-note{margin:10px 0 0;color:#728079;font-size:11px;line-height:1.45}
.c8-workshop-photo .c8-upload-main{margin:0 0 12px;padding:14px;background:#f1f7f1;border:1px dashed #9ebaa5}
.c8-workshop-photo .c8-upload-main small{display:block;margin-top:7px;color:#6b7a72;font-size:11px;line-height:1.45;text-transform:none;letter-spacing:0}
.c8-workshop-photo .c8-photo-empty{min-height:240px;padding:30px 22px;background:#eef3ed;border:1px solid #dce6dd;border-radius:10px}
.c8-workshop-photo .c8-photo-empty strong{font-size:18px}
.c8-workshop-photo #c8-visual-photo-canvas{display:block;width:100%;height:auto;max-height:420px;object-fit:contain;border-radius:10px;background:#e9eeea;cursor:default}
.c8-workshop-photo #c8-visual-photo-canvas[hidden]{display:none!important}
.c8-workshop-materials,.c8-workshop-render{grid-column:1/-1}
.c8-material-grid-simple{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.c8-material-grid-simple label,.c8-finish-note{display:grid;gap:7px;color:#355347;font-size:12px;font-weight:700}
.c8-material-grid-simple select,.c8-finish-note input{width:100%;min-width:0;box-sizing:border-box;border:1px solid #cbd8cf;border-radius:8px;background:#fff;padding:10px 11px;color:#263f35;font:inherit;font-weight:500}
.c8-finish-note{margin-top:12px;max-width:700px}
.c8-workshop-render .c8-visualizer-actions{justify-content:flex-start!important;margin:0 0 10px!important;padding:0!important;border:0!important}
.c8-workshop-render #c8-generate-visual{font-size:14px!important;min-height:48px!important;padding:11px 20px!important;background:#176b5d!important;border-color:#176b5d!important}
.c8-workshop-render .c8-visual-status{text-align:left!important;margin:4px 0 0!important;color:#536b61!important}
.c8-workshop-render .c8-visual-result{margin-top:16px!important;background:#f4f7f3!important;border-color:#dce5df!important}
.c8-insertion-workshop .c8-visual-legal{margin:16px 0 0!important;background:transparent!important;border-top:1px solid #dce5df;border-radius:0!important;padding:14px 2px 0!important;color:#718078!important}
@media(max-width:900px){.c8-insertion-workshop{padding:16px!important}.c8-workshop-grid{grid-template-columns:1fr}.c8-workshop-materials,.c8-workshop-render{grid-column:auto}.c8-material-grid-simple{grid-template-columns:1fr}.c8-insertion-workshop .c8-visualizer-head{align-items:flex-start!important}.c8-insertion-workshop .c8-visualizer-head h2{font-size:25px!important}}

/* Atelier : étapes lisibles, historique toujours accessible. */
.c8-workflow-hint { margin:0; padding:10px 12px 4px; font-size:11px; color:#52645f; background:#edf3f2; }
.c8-inspector-tabs { grid-template-columns:repeat(3,minmax(0,1fr)); position:sticky; }
.c8-inspector-tabs button { padding:10px 7px; font-size:12px; }
#c8-undo, #c8-redo { min-height:36px; border:1px solid #baccc6; background:#fff; color:#264f45; border-radius:7px; padding:7px 10px; }
#c8-undo:disabled, #c8-redo:disabled { opacity:.45; cursor:default; }
.c8-visual-warning button { margin-top:8px; border:1px solid currentColor; background:white; border-radius:6px; padding:8px 12px; cursor:pointer; }
@media(max-width:760px) { .c8-inspector-tabs { grid-template-columns:repeat(3,minmax(0,1fr)); overflow:visible; } }

/* Correctif ergonomie 21.20.1 — historique réellement visible et navigation lisible. */
.c8-history-actions{
  display:flex;
  align-items:center;
  gap:4px;
  padding:3px;
  border:1px solid #cbd8d3;
  border-radius:8px;
  background:#f2f7f5;
  flex:0 0 auto;
}
.c8-history-actions #c8-undo,.c8-history-actions #c8-redo{
  min-width:92px;
  font-weight:700;
  background:#fff!important;
  border-color:#b9cbc5!important;
  color:#244c42!important;
}
.c8-history-actions #c8-undo:not(:disabled):hover,.c8-history-actions #c8-redo:not(:disabled):hover{
  background:#e3f0eb!important;
}
.c8-inspector-tabs{
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:3px!important;
  position:sticky!important;
  top:0;
  z-index:8;
  padding:6px 0 8px;
  background:#f7f9fa;
}
.c8-inspector-tabs button{
  min-width:0;
  padding:8px 3px!important;
  font-size:10.5px!important;
  line-height:1.1;
  white-space:nowrap;
}
.c8-inspector-tabs button[aria-selected="true"]{
  background:#264a65!important;
  color:#fff!important;
  border-color:#264a65!important;
  font-weight:800;
}
.c8-workflow-hint{
  border:1px solid #dce6e2;
  border-radius:6px;
  margin-bottom:6px!important;
  padding:8px 10px!important;
  background:#eef4f2!important;
}
@media(max-width:900px){
  .c8-history-actions{order:-1}
  .c8-history-actions #c8-undo,.c8-history-actions #c8-redo{min-width:82px}
  .c8-inspector-tabs button{font-size:10px!important}
}

.c8-workshop-plan #c8-calibration-plan{pointer-events:none;cursor:default;}

/* Implantation accessible : trois actions, champs explicites et outils secondaires repliés. */
.c8-implantation-tools { background:#fff;border:1px solid #dce5e0;border-radius:14px;padding:12px; }
.c8-implantation-tools details {padding:10px 0;border-bottom:1px solid #e7eeea;}
.c8-implantation-tools summary {cursor:pointer;font-weight:650;color:#195541;}
.c8-implantation-tools select,.c8-implantation-tools input {width:100%;min-height:38px;margin:5px 0;border:1px solid #cad9d1;border-radius:7px;padding:6px;background:white;color:#233d33;}
.c8-rule-field {display:block;font-size:13px;margin-top:10px;}
.c8-rule-field small {display:block;color:#64736c;}
.c8-implantation-tools p {font-size:13px;line-height:1.45;}
.c8-implantation-tools button {margin-top:8px;width:100%;}
.c8-workshop-materials > summary {cursor:pointer;font-weight:600;padding:8px;}
/* 21.23.0 — cinq onglets d'inspecteur lisibles sans débordement (« Implantation ») */
.c8-inspector-tabs{gap:2px;padding:6px 2px}
.c8-inspector-tabs button{padding:9px 1px;font-size:11px;letter-spacing:-.01em;white-space:normal;overflow-wrap:anywhere;line-height:1.15}
/* Pleine terre : action principale, visible dans la barre comme « Tracer le projet » */
.c8-draw-tools #c8-trace-ground{order:0}
/* Fiche parcelle — moteur de règles QueBâtir */
.rule-sheet{display:grid;gap:12px;margin-top:10px}
.rule-sheet-kicker{margin:0;font-size:12px;font-weight:700;color:#1f5f55;letter-spacing:.02em}
.rule-sheet-mode{display:flex;gap:6px;flex-wrap:wrap}
.rule-sheet-mode button{padding:7px 12px;border:1px solid #c9d8d3;border-radius:999px;background:#fff;color:#1f5f55;cursor:pointer;font-size:12px}
.rule-sheet-mode button[aria-pressed="true"]{background:#1f5f55;border-color:#1f5f55;color:#fff}
.rule-questions{display:grid;gap:8px;padding:12px;border:1px solid #f0d49a;border-radius:10px;background:#fffaf0}
.rule-questions label{display:grid;gap:4px;font-size:13px}
.rule-questions select,.rule-questions input{max-width:240px;padding:6px}
.rule-questions button{justify-self:start;padding:7px 14px}
.rule-sheet-table{width:100%;border-collapse:collapse;font-size:13px}
.rule-sheet-table th{background:#1f5f55;color:#fff;text-align:left;padding:7px 8px;font-weight:600}
.rule-sheet-table td{padding:8px;border-bottom:1px solid #e3ebe8;vertical-align:top}
.rule-sheet-table .rule-n{width:28px;color:#6b7c77}
.rule-sheet-table .rule-label{width:32%;font-weight:600;color:#23413b}
.rule-sheet-table .rule-value strong{display:block;color:#162d28}
.rule-sheet-table .rule-value small{display:block;color:#5d6f69;margin-top:3px;line-height:1.4}
.rule-sheet-table details{margin-top:4px;font-size:12px}
.rule-sheet-table blockquote{margin:6px 0 0;padding:6px 8px;border-left:3px solid #9cc2b7;background:#f4f8f6;font-style:italic}
.rule-sheet-table .rule-status{white-space:nowrap;font-size:12px;font-weight:600}
.rule-sheet-table .rule-etabli .rule-status{color:#2f7a4c}
.rule-sheet-table .rule-a_confirmer .rule-status{color:#a86a0d}
.rule-sheet-table .rule-non_trouve .rule-status{color:#a33c3c}
.rule-warning{margin:0;font-size:12px;color:#7a5a1c}
@media(max-width:700px){.rule-sheet-table .rule-label{width:auto}.rule-sheet-table th:nth-child(1),.rule-sheet-table td:nth-child(1){display:none}}

/* Citations d'une règle : l'article est visible sur la ligne et ouvre le
   règlement officiel à sa page. Le repli ne sert qu'à lire les citations. */
.rule-sheet-table .rule-proof{margin-top:5px}
.rule-sheet-table .rule-cite{margin-top:6px}
.rule-sheet-table .rule-article{display:inline-block;font-weight:700;font-size:12px;color:#1f5f55}
.rule-sheet-table a.rule-article{text-decoration:none;border-bottom:1px solid #9cc2b7;padding:1px 3px;border-radius:3px}
.rule-sheet-table a.rule-article::after{content:" ↗";font-weight:400;opacity:.7}
.rule-sheet-table a.rule-article:hover,.rule-sheet-table a.rule-article:focus-visible{color:#0f3a33;background:#e3f0ea;border-bottom-color:#1f5f55}
.rule-sheet-table .rule-proof>details{margin-top:3px}
.rule-sheet-table .rule-proof>details>summary{color:#6b7c77;font-size:11.5px;cursor:pointer}

/* Hauteur du projet : choix explicite, saisie conditionnelle accessible. */
.height-project-question{margin:4px 0;padding:18px;border:1px solid #cfdfdb;border-radius:12px;background:#fff;min-width:0}
.height-project-question legend{padding:0 6px;font-size:16px;font-weight:700;color:#122c4a}
.height-help{margin:6px 0 12px;color:#52666c;font-size:13px;line-height:1.5}
.height-choices{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0}
.rule-questions .height-choice{padding:11px 16px;border:1px solid #adc5bc;border-radius:8px;background:white;color:#173f35;cursor:pointer}
.rule-questions .height-choice[aria-pressed="true"]{background:#1f5f55;color:white;border-color:#1f5f55}
.height-custom{max-width:420px;padding-top:8px;font-weight:600}
.height-custom[hidden]{display:none!important}
.rule-questions .height-custom input{width:180px;font-size:18px;padding:10px;border:1px solid #a7bcb5;border-radius:8px}
.height-choice:focus-visible,.height-custom input:focus-visible{outline:3px solid #7caca0;outline-offset:3px}

/* Reconstruction 3D : avancement fondé sur les étapes effectivement reçues. */
.c8-lidar-progress{padding:10px 18px;border-bottom:1px solid #d7e2de;background:#f6faf8;color:#183d34}
.c8-lidar-progress[hidden]{display:none!important}
.c8-lidar-progress-head,.c8-lidar-progress-foot{display:flex;align-items:center;justify-content:space-between;gap:14px;font-size:12px}
.c8-lidar-progress-head strong{font-size:13px}
.c8-lidar-progress-track{height:8px;margin:7px 0;border-radius:999px;background:#dce8e3;overflow:hidden}
.c8-lidar-progress-track span{display:block;width:0;height:100%;border-radius:inherit;background:#1f765c;transition:width .2s ease}
.c8-lidar-progress-foot{color:#5a6e67}
.c8-lidar-diagnostic{display:inline-block;margin-top:7px;font-size:12px;font-weight:700;color:#175d48;text-decoration:underline;cursor:pointer}
