:root {
  --bg: #f6f7f9; --surface: #ffffff; --surface-2: #f1f3f6; --text: #0f172a; --muted: #64748b;
  --line: #e2e8f0; --accent: #0e9f6e; --accent-hover: #0b8a5f; --accent-ink: #ffffff;
  --accent-soft: #e7f7f0; --navy: #0f172a; --navy-ink: #e2e8f0; --warn: #b45309; --warn-soft: #fef3c7;
  --sold: #94a3b8; --radius: 12px;
  --shadow: 0 1px 2px rgb(15 23 42 / .06), 0 4px 16px rgb(15 23 42 / .05);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1120; --surface: #111a2e; --surface-2: #17223a; --text: #e5e9f0; --muted: #94a3b8;
    --line: #22304a; --accent: #34d399; --accent-hover: #6ee7b7; --accent-ink: #052e1f;
    --accent-soft: #0f2f27; --navy: #060b16; --navy-ink: #cbd5e1; --warn: #fbbf24; --warn-soft: #3a2a0a;
    --sold: #64748b; --shadow: none;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Barre du haut */
.top { background: var(--navy); color: var(--navy-ink); }
.top .wrap { display: flex; align-items: center; gap: 20px; height: 60px; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 17px; color: #fff;
  text-decoration: none; letter-spacing: -.01em; }
.logo svg { width: 28px; height: 28px; flex: none; }
.nav { display: flex; gap: 18px; margin-left: auto; align-items: center; font-size: 14px; }
.nav a { text-decoration: none; opacity: .8; }
.nav a:hover { opacity: 1; }
.lang { display: flex; border: 1px solid rgb(255 255 255 / .18); border-radius: 8px; overflow: hidden; }
.lang button { border: 0; background: transparent; padding: 4px 9px; font-size: 12px; cursor: pointer; color: var(--navy-ink); }
.lang button.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
@media (max-width: 640px) { .nav a { display: none; } }

/* Hero + recherche */
.hero { background: var(--navy); color: #fff; padding: 36px 0 44px; }
.hero h1 { font-size: clamp(26px, 4.4vw, 40px); line-height: 1.15; margin: 0 0 10px; letter-spacing: -.02em; max-width: 720px; }
.hero p { margin: 0 0 22px; color: var(--navy-ink); max-width: 640px; font-size: 16px; }
.search { display: flex; background: var(--surface); border-radius: var(--radius); padding: 6px; max-width: 720px; box-shadow: var(--shadow); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px 12px; font-size: 16px; color: var(--text); outline: none; }
.search button { border: 0; background: var(--accent); color: var(--accent-ink); border-radius: 9px; padding: 0 18px; font-weight: 600; cursor: pointer; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 18px; font-size: 13px; color: var(--navy-ink); }
.trust span::before { content: "✓"; color: var(--accent); font-weight: 700; margin-right: 6px; }

/* Domaine mis en avant (?d=) */
.spot { margin-top: -22px; position: relative; }
.spot .box { background: var(--surface); border: 2px solid var(--accent); border-radius: var(--radius); padding: 20px 22px;
  box-shadow: var(--shadow); display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.spot .tag { font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.spot .nom { font-size: clamp(22px, 4vw, 32px); font-weight: 800; letter-spacing: -.02em; word-break: break-all; }
.spot .meta { color: var(--muted); font-size: 14px; }
.spot .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spot .prix { font-size: 26px; font-weight: 800; margin-right: 6px; }

/* Filtres */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 28px 0 14px; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1 1 100%; padding-bottom: 2px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 13px; font-size: 13px;
  white-space: nowrap; cursor: pointer; }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.filters select { border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 7px 10px; font-size: 13px; }
.count { margin-left: auto; color: var(--muted); font-size: 13px; }

/* Liste */
.table { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.row { display: grid; grid-template-columns: minmax(190px, 2.2fr) 110px minmax(0, 1fr) 90px 230px; gap: 12px; align-items: center;
  padding: 14px 18px; border-top: 1px solid var(--line); }
.row.head { border-top: 0; background: var(--surface-2); font-size: 12px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); font-weight: 600; padding-top: 10px; padding-bottom: 10px; }
.row .dom { font-weight: 700; font-size: 16px; overflow-wrap: anywhere; min-width: 0; }
.row .dom .star { margin-right: 6px; }
.row .dom .star { color: var(--warn); font-size: 13px; }
.badge { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.row .prix { font-weight: 700; font-size: 16px; text-align: right; }
.row .prix.offre { font-weight: 500; color: var(--muted); font-size: 14px; }
.row .act { display: flex; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.row.vendu .dom, .row.vendu .prix { color: var(--sold); }
.row.vendu .dom { text-decoration: line-through; text-decoration-thickness: 1px; }
.sold { font-size: 12px; font-weight: 700; color: var(--sold); text-transform: uppercase; letter-spacing: .05em; }
.vide { padding: 36px 18px; text-align: center; color: var(--muted); }
@media (max-width: 880px) {
  .row.head { display: none; }
  .row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "dom prix" "meta meta" "act act"; gap: 4px 12px; }
  .row .dom { grid-area: dom; } .row .prix { grid-area: prix; }
  .row .cat, .row .lieu { display: none; }
  .row .meta-m { display: block !important; grid-area: meta; color: var(--muted); font-size: 13px; }
  .row .act { grid-area: act; justify-content: flex-start; margin-top: 6px; }
}
@media (max-width: 420px) {
  .search button { padding: 0 12px; font-size: 14px; }
  .search input { padding: 10px 8px; font-size: 15px; }
}
.meta-m { display: none; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 9px; padding: 8px 14px;
  font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; border: 1px solid transparent; white-space: nowrap; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn.ghost:hover { border-color: var(--text); }
.btn.danger { background: transparent; border-color: var(--line); color: #dc2626; }
.btn:disabled { opacity: .5; cursor: default; }

/* Comment ça marche / FAQ */
.section { margin: 56px 0; }
.section h2 { font-size: 22px; letter-spacing: -.01em; margin: 0 0 18px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; counter-reset: s; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.step::before { counter-increment: s; content: counter(s); display: inline-grid; place-items: center; width: 28px; height: 28px;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; margin-bottom: 10px; }
.step h3 { margin: 0 0 4px; font-size: 15px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }
details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 8px; }
summary { cursor: pointer; font-weight: 600; }
details p { color: var(--muted); margin: 8px 0 0; }
footer { border-top: 1px solid var(--line); padding: 22px 0 36px; color: var(--muted); font-size: 13px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 18px; }

/* Fenêtre d'offre */
dialog { border: 0; border-radius: 16px; padding: 0; width: min(460px, calc(100% - 32px)); background: var(--surface); color: var(--text);
  box-shadow: 0 20px 60px rgb(0 0 0 / .3); }
dialog::backdrop { background: rgb(15 23 42 / .55); }
.dlg { padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.dlg h2 { margin: 0; font-size: 19px; word-break: break-all; }
.dlg .sub { margin: -6px 0 4px; color: var(--muted); font-size: 14px; }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 500; }
label.f input, label.f textarea, label.f select { border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; background: var(--bg); color: var(--text); font-size: 15px; }
label.f input:focus, label.f textarea:focus, label.f select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.dlg .btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.msg { font-size: 14px; padding: 10px 12px; border-radius: 9px; }
.msg.ok { background: var(--accent-soft); color: var(--accent); }
.msg.err { background: #fee2e2; color: #b91c1c; }
.hp { position: absolute; left: -9999px; }
