:root {
  --bg: #f4f7f6;
  --surface: #ffffff;
  --surface-soft: #edf5f2;
  --ink: #162321;
  --muted: #5a6966;
  --line: #d9e3df;
  --brand: #0d3f3a;
  --brand-2: #17675e;
  --accent: #d9912b;
  --accent-soft: #fff3dc;
  --success: #176a44;
  --danger: #9d2f2f;
  --shadow: 0 18px 50px rgba(12, 49, 44, 0.10);
  --radius: 20px;
  --radius-sm: 12px;
  --container: 1180px;
  --focus: 0 0 0 4px rgba(217, 145, 43, 0.24);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--brand-2); text-underline-offset: 3px; }
a:hover { color: var(--brand); }
button, input { font: inherit; }
button { cursor: pointer; }
.container { width: min(calc(100% - 32px), var(--container)); margin-inline: auto; }
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; z-index: 10000; top: 12px; left: 12px;
  padding: 10px 14px; background: #fff; color: var(--brand);
  border-radius: 8px; transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); box-shadow: var(--focus); }
.prototype-banner {
  display: flex; justify-content: center; gap: 12px; flex-wrap: wrap;
  padding: 7px 16px; background: #2c2923; color: #fff3dc;
  font-size: 0.86rem; text-align: center;
}
.prototype-banner strong { color: #ffd28a; }
.site-header {
  position: sticky; top: 0; z-index: 900;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(217, 227, 223, 0.9);
  backdrop-filter: blur(14px);
}
.header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand-mark {
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 13px; background: var(--brand); color: #fff;
  font-weight: 800; letter-spacing: -0.04em;
}
.brand-copy { display: grid; line-height: 1.15; }
.brand-copy strong { font-size: 1rem; }
.brand-copy small { margin-top: 4px; color: var(--muted); font-size: 0.75rem; }
.main-nav { display: flex; align-items: center; gap: 22px; }
.main-nav a { color: var(--ink); text-decoration: none; font-weight: 650; font-size: 0.92rem; }
.main-nav a:last-child { padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; }
.main-nav a:hover { color: var(--brand-2); }
.nav-toggle { display: none; border: 0; background: transparent; padding: 8px; }
.nav-toggle span:not(.sr-only) { display: block; width: 24px; height: 2px; margin: 5px 0; background: var(--ink); }

.hero {
  padding: 68px 0 48px;
  background:
    radial-gradient(circle at 86% 18%, rgba(217,145,43,.14), transparent 26%),
    radial-gradient(circle at 14% 12%, rgba(23,103,94,.12), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #f4f7f6 100%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(310px, .85fr); gap: 52px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--brand-2); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; }
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--accent); }
h1, h2, h3 { line-height: 1.16; letter-spacing: -0.028em; }
h1 { margin: 16px 0 18px; font-size: clamp(2.35rem, 5vw, 4.5rem); max-width: 840px; }
.hero-lead { max-width: 740px; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.25rem); margin-bottom: 28px; }
.search-shell { position: relative; max-width: 760px; }
.search-row {
  display: grid; grid-template-columns: 1fr auto; gap: 10px;
  padding: 9px; border: 1px solid var(--line); background: var(--surface);
  border-radius: 17px; box-shadow: var(--shadow);
}
.search-input-wrap { position: relative; display: flex; align-items: center; }
.search-icon { position: absolute; left: 16px; color: var(--brand-2); font-size: 1.25rem; }
.search-row input {
  width: 100%; min-height: 54px; padding: 0 16px 0 48px;
  border: 0; outline: 0; color: var(--ink); background: transparent;
  font-size: 1rem;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border-radius: 12px;
  border: 1px solid transparent; font-weight: 800; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, input:focus-visible, summary:focus-visible, a:focus-visible { outline: none; box-shadow: var(--focus); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: #092f2b; color: #fff; box-shadow: 0 8px 24px rgba(13,63,58,.22); }
.btn-secondary { background: #fff; color: var(--brand); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--brand-2); }
.btn-ghost { background: transparent; color: var(--brand); border-color: transparent; }
.btn-small { min-height: 38px; padding: 0 12px; font-size: .88rem; }
.search-actions { display: flex; gap: 12px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.search-actions button { padding-left: 0; }
.search-hint { color: var(--muted); font-size: .88rem; }
.search-suggestions {
  position: absolute; z-index: 1050; top: calc(100% + 8px); left: 0; right: 0;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15,50,46,.16); overflow: hidden;
}
.search-suggestions[hidden] { display: none; }
.suggestion-button {
  width: 100%; display: grid; gap: 2px; padding: 13px 16px;
  text-align: left; border: 0; border-bottom: 1px solid var(--line);
  background: #fff; color: var(--ink);
}
.suggestion-button:last-child { border-bottom: 0; }
.suggestion-button:hover, .suggestion-button[aria-selected="true"] { background: var(--surface-soft); }
.suggestion-button strong { font-size: .96rem; }
.suggestion-button span { color: var(--muted); font-size: .84rem; }
.hero-trust { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 26px; color: var(--muted); font-size: .88rem; }
.hero-trust span { display: inline-flex; align-items: center; gap: 7px; }
.hero-trust span::before { content: "✓"; color: var(--success); font-weight: 900; }
.hero-visual {
  position: relative; min-height: 430px; border-radius: 28px; overflow: hidden;
  background: #dbe9e5; box-shadow: var(--shadow); border: 1px solid rgba(13,63,58,.08);
}
.map-illustration { position: absolute; inset: 0; background:
  linear-gradient(31deg, transparent 47%, rgba(255,255,255,.75) 48%, rgba(255,255,255,.75) 53%, transparent 54%),
  linear-gradient(125deg, transparent 45%, rgba(255,255,255,.66) 46%, rgba(255,255,255,.66) 51%, transparent 52%),
  repeating-linear-gradient(90deg, transparent 0 80px, rgba(13,63,58,.08) 81px 82px),
  repeating-linear-gradient(0deg, transparent 0 70px, rgba(13,63,58,.07) 71px 72px),
  #dcece7;
}
.parcel-shape { position: absolute; background: rgba(217,145,43,.34); border: 3px solid var(--accent); transform: rotate(-7deg); }
.parcel-shape.one { width: 190px; height: 145px; left: 24%; top: 28%; clip-path: polygon(10% 4%, 96% 14%, 83% 96%, 0 78%); }
.parcel-shape.two { width: 145px; height: 120px; right: 8%; bottom: 16%; clip-path: polygon(15% 0, 100% 15%, 88% 100%, 0 82%); background: rgba(255,255,255,.45); border-color: rgba(13,63,58,.28); }
.result-preview {
  position: absolute; left: 24px; right: 24px; bottom: 24px;
  padding: 19px; background: rgba(255,255,255,.94); border-radius: 17px;
  box-shadow: 0 12px 32px rgba(13,63,58,.17); backdrop-filter: blur(8px);
}
.result-preview small { color: var(--muted); }
.result-preview strong { display: block; margin: 3px 0 10px; font-size: 1.15rem; }
.preview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.preview-grid span { display: grid; padding: 10px 12px; border-radius: 10px; background: var(--surface-soft); }
.preview-grid b { font-size: .92rem; }
.preview-grid small { font-size: .74rem; }

.section { padding: 74px 0; }
.section-white { background: #fff; }
.section-head { max-width: 760px; margin-bottom: 34px; }
.section-head h2 { font-size: clamp(1.85rem, 3vw, 2.7rem); margin: 10px 0 12px; }
.section-head p { color: var(--muted); margin: 0; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step-card { padding: 26px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.step-number { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--accent-soft); color: #8a5207; font-weight: 900; }
.step-card h3 { margin: 20px 0 10px; font-size: 1.25rem; }
.step-card p { margin: 0; color: var(--muted); }

.tool-section { padding: 34px 0 80px; }
.tool-shell { background: #fff; border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--shadow); overflow: hidden; }
.tool-header { padding: 22px 26px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.tool-header h2 { margin: 0; font-size: 1.35rem; }
.tool-header p { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.tool-status { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .86rem; }
.tool-status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #a5b4af; }
.tool-status.is-ready::before { background: var(--success); }
.tool-body { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .75fr); min-height: 560px; }
.map-panel { position: relative; min-height: 560px; background: #e7efed; }
#map { position: absolute; inset: 0; z-index: 1; }
.map-placeholder { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; padding: 32px; text-align: center; background: #e7efed; }
.map-placeholder[hidden] { display: none; }
.map-placeholder-card { max-width: 430px; padding: 30px; border-radius: 20px; background: rgba(255,255,255,.94); box-shadow: var(--shadow); }
.map-placeholder-card h3 { margin: 0 0 10px; }
.map-placeholder-card p { color: var(--muted); }
.side-panel { padding: 26px; border-left: 1px solid var(--line); background: #fbfcfc; }
.panel-empty { height: 100%; display: grid; place-items: center; text-align: center; color: var(--muted); }
.panel-empty-icon { width: 64px; height: 64px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 18px; background: var(--surface-soft); color: var(--brand); font-size: 1.8rem; }
.panel-card { display: grid; gap: 18px; }
.panel-card[hidden], .panel-empty[hidden] { display: none; }
.panel-kicker { color: var(--brand-2); text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 850; }
.panel-card h3 { margin: 3px 0 0; font-size: 1.45rem; }
.meta-list { display: grid; gap: 10px; margin: 0; }
.meta-row { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.meta-row dt { color: var(--muted); font-size: .82rem; }
.meta-row dd { margin: 0; font-weight: 750; }
.candidate-list { display: grid; gap: 8px; }
.candidate-button { width: 100%; padding: 12px; text-align: left; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); }
.candidate-button:hover, .candidate-button.is-selected { border-color: var(--brand-2); background: var(--surface-soft); }
.panel-actions { display: grid; gap: 10px; }
.notice { padding: 13px 14px; border-radius: 12px; background: var(--accent-soft); color: #6f4308; font-size: .86rem; }
.error-box { padding: 13px 14px; border-radius: 12px; background: #fff1f1; color: var(--danger); font-size: .88rem; }
.loading { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); }
.loading::before { content: ""; width: 15px; height: 15px; border: 2px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.result-box { display: grid; gap: 16px; }
.result-address { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.result-address strong { display: block; font-size: 1.15rem; }
.result-address span { color: var(--muted); }
.result-block { padding: 16px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.result-block h4 { margin: 0 0 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; font-size: .75rem; }
.result-value { font-size: 1.7rem; line-height: 1.15; font-weight: 900; color: var(--brand); }
.result-sub { color: var(--muted); font-size: .88rem; margin-top: 4px; }
.company-name { font-size: 1.25rem; font-weight: 900; }
.result-warning { padding: 14px; border-left: 4px solid var(--accent); background: var(--accent-soft); font-size: .86rem; }
.scenario-picker { padding: 13px; border: 1px dashed #d7ae6c; border-radius: 12px; background: #fffaf1; }
.scenario-picker strong { display: block; margin-bottom: 8px; font-size: .85rem; }
.scenario-buttons { display: flex; flex-wrap: wrap; gap: 7px; }
.scenario-buttons button { border: 1px solid #dbc69f; border-radius: 999px; background: #fff; padding: 6px 10px; font-size: .78rem; }
.scenario-buttons button.is-active { background: var(--brand); color: #fff; border-color: var(--brand); }

.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.feature-card { padding: 26px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.feature-card h3 { margin: 0 0 9px; }
.feature-card p { margin: 0; color: var(--muted); }
.feature-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: var(--surface-soft); color: var(--brand); margin-bottom: 18px; font-weight: 900; }

.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.article-card { display: grid; padding: 23px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; text-decoration: none; color: var(--ink); }
.article-card:hover { border-color: #a8c7bf; box-shadow: 0 12px 30px rgba(13,63,58,.08); }
.article-card small { color: var(--brand-2); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.article-card h3 { margin: 10px 0 10px; font-size: 1.15rem; }
.article-card p { margin: 0 0 18px; color: var(--muted); font-size: .9rem; }
.article-card span { margin-top: auto; font-weight: 800; color: var(--brand-2); }

.faq-list { display: grid; gap: 12px; max-width: 900px; }
.faq-list details { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 0 18px; }
.faq-list summary { list-style: none; cursor: pointer; padding: 18px 34px 18px 0; font-weight: 800; position: relative; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 0; top: 13px; font-size: 1.5rem; color: var(--brand-2); }
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { margin: 0 0 18px; color: var(--muted); }

.cta-box { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 34px; border-radius: 24px; background: var(--brand); color: #fff; }
.cta-box h2 { margin: 0 0 8px; }
.cta-box p { margin: 0; color: rgba(255,255,255,.78); }
.cta-box .btn { background: #fff; color: var(--brand); }

.page-hero { padding: 56px 0 36px; background: #fff; border-bottom: 1px solid var(--line); }
.page-hero .breadcrumbs { margin-bottom: 18px; color: var(--muted); font-size: .86rem; }
.page-hero h1 { max-width: 930px; font-size: clamp(2.1rem, 4vw, 3.8rem); }
.page-hero p { max-width: 820px; color: var(--muted); font-size: 1.1rem; }
.article-layout { display: grid; grid-template-columns: minmax(0, 760px) 280px; gap: 54px; align-items: start; }
.prose { font-size: 1.02rem; }
.prose h2 { margin: 42px 0 13px; font-size: 1.65rem; }
.prose p { color: #35423f; }
.prose .intro { font-size: 1.18rem; color: var(--muted); }
.prose .source-list { margin-top: 46px; padding: 20px; border-radius: 14px; background: var(--surface-soft); }
.prose .source-list h2 { margin-top: 0; font-size: 1.1rem; }
.prose .source-list ul { margin-bottom: 0; }
.sidebar-card { position: sticky; top: 108px; padding: 22px; border: 1px solid var(--line); background: #fff; border-radius: 18px; }
.sidebar-card h2 { margin: 0 0 10px; font-size: 1.2rem; }
.sidebar-card p { color: var(--muted); font-size: .9rem; }
.legal-card { padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: #fff; margin-bottom: 20px; }
.legal-card h2 { margin-top: 0; }

.site-footer { background: #102c29; color: #d7e4e0; padding: 54px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 48px; }
.footer-brand { color: #fff; }
.footer-brand .brand-mark { background: #fff; color: var(--brand); }
.footer-brand .brand-copy small { color: #aac2bc; }
.footer-note { max-width: 530px; color: #aac2bc; font-size: .88rem; }
.site-footer h2 { margin: 0 0 14px; color: #fff; font-size: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: #d7e4e0; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; margin-top: 42px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.13); color: #9db7b1; font-size: .8rem; }

.leaflet-container { font: inherit; }
.leaflet-popup-content-wrapper { border-radius: 12px; }

@media (max-width: 980px) {
  .hero-grid, .tool-body, .article-layout { grid-template-columns: 1fr; }
  .hero-visual { min-height: 350px; }
  .side-panel { border-left: 0; border-top: 1px solid var(--line); }
  .map-panel { min-height: 470px; }
  .article-grid { grid-template-columns: repeat(2, 1fr); }
  .sidebar-card { position: static; }
}

@media (max-width: 760px) {
  .prototype-banner span { display: none; }
  .header-inner { min-height: 66px; }
  .brand-copy small { display: none; }
  .nav-toggle { display: block; }
  .main-nav {
    display: none; position: absolute; left: 16px; right: 16px; top: calc(100% + 8px);
    padding: 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow);
    align-items: stretch; flex-direction: column; gap: 4px;
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 10px 12px; }
  .main-nav a:last-child { border-radius: 10px; }
  .hero { padding: 46px 0 34px; }
  .hero-grid { gap: 34px; }
  .hero-visual { display: none; }
  h1 { font-size: clamp(2.2rem, 11vw, 3.2rem); }
  .search-row { grid-template-columns: 1fr; }
  .search-row .btn { width: 100%; }
  .steps, .feature-grid, .article-grid, .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .tool-section { padding-bottom: 56px; }
  .tool-header { align-items: flex-start; flex-direction: column; }
  .map-panel { min-height: 430px; }
  .side-panel { padding: 20px; }
  .cta-box { grid-template-columns: 1fr; }
  .cta-box .btn { width: 100%; }
  .footer-grid { gap: 32px; }
  .footer-bottom { flex-direction: column; }
}

@media (max-width: 440px) {
  .container { width: min(calc(100% - 22px), var(--container)); }
  .hero-trust { display: grid; gap: 8px; }
  .search-actions { display: grid; }
  .tool-shell { border-radius: 18px; }
  .map-panel { min-height: 390px; }
  .meta-row { grid-template-columns: 96px 1fr; }
}

/* v0.2 - résultats open data réels */
.holder-item + .holder-item {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.result-source-note {
  margin-top: 12px;
  font-size: .76rem;
  color: var(--muted);
}
