/* Yverdon Immobilier: calm, plain, phone first. System fonts only (nothing to download). */
:root {
  --bg: #f4f6f7;
  --card: #ffffff;
  --ink: #18242f;
  --ink-soft: #46535f;
  --line: #d5dce1;
  --navy: #1d3446;
  --roof: #9a3f1c;        /* terracotta, 6.6:1 on white */
  --roof-soft: #f6e7df;
  --focus: #0b63ce;
  --radius: 10px;
  --wrap: 68rem;
  --text: 42rem;
  font-size: 100%;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;   /* 17 px */
  line-height: 1.6;
}
a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--roof); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
img, svg { max-width: 100%; height: auto; }

.skip { position: absolute; left: -999px; top: 0; background: var(--card); padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }

/* Header */
.top { background: var(--navy); color: #fff; }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding-top: .9rem; padding-bottom: .9rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.15rem; letter-spacing: .01em; }
.brand:hover { color: #fff; }
.brand svg { width: 30px; height: 30px; flex: none; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; }
.nav a { color: #e9eef2; text-decoration: none; font-size: 1rem; padding: .35rem 0; display: inline-block; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; border-bottom-color: #e7a07f; }

/* Main */
main { display: block; padding: 2rem 0 3.5rem; }
.crumbs { font-size: 1rem; color: var(--ink-soft); margin: 0 0 1rem; }
.crumbs a { color: var(--ink-soft); }
h1, h2, h3 { line-height: 1.25; color: var(--navy); }
h1 { font-size: clamp(1.8rem, 1.2rem + 2.6vw, 2.6rem); margin: 0 0 .8rem; letter-spacing: -.01em; }
h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.7rem); margin: 2.4rem 0 .7rem; }
h3 { font-size: 1.2rem; margin: 1.6rem 0 .4rem; }
p, ul, ol, dl { margin: 0 0 1rem; }
.lead { font-size: clamp(1.15rem, 1.05rem + .5vw, 1.3rem); color: var(--ink-soft); max-width: var(--text); }
.text { max-width: var(--text); }
.text li { margin-bottom: .45rem; }
.muted { color: var(--ink-soft); }
.small { font-size: 1rem; }

/* Home */
.hero { padding: 1rem 0 1.5rem; }
.hero .lead { margin-bottom: 0; }
.doors { display: grid; gap: 1rem; grid-template-columns: 1fr; margin: 1.5rem 0 2rem; }
@media (min-width: 760px) { .doors { grid-template-columns: repeat(3, 1fr); } }
.door { display: block; background: var(--card); border: 1px solid var(--line); border-top: 5px solid var(--roof); border-radius: var(--radius); padding: 1.25rem 1.25rem 1.1rem; text-decoration: none; color: var(--ink); }
.door:hover { border-color: var(--navy); border-top-color: var(--roof); color: var(--ink); box-shadow: 0 4px 14px rgba(24,36,47,.08); }
.door h2 { margin: 0 0 .4rem; font-size: 1.3rem; }
.door p { margin: 0 0 .6rem; color: var(--ink-soft); }
.door .go { color: var(--roof); font-weight: 600; }

.note { background: var(--roof-soft); border-left: 4px solid var(--roof); border-radius: 0 var(--radius) var(--radius) 0; padding: 1rem 1.2rem; max-width: var(--text); }
.note p:last-child { margin-bottom: 0; }

/* Cards and lists */
.cards { display: grid; gap: 1rem; grid-template-columns: 1fr; margin: 1rem 0 1.5rem; padding: 0; list-style: none; }
@media (min-width: 700px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .35rem; }
.card h3 { margin: 0; font-size: 1.15rem; }
.card p { margin: 0; }
.card .addr { color: var(--ink-soft); }
.card .site { margin-top: auto; padding-top: .5rem; word-break: break-word; }
.card .flag { font-size: 1rem; color: var(--roof); }

.jump { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 1rem 0 1.5rem; list-style: none; }
.jump a { display: inline-block; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: .35rem .85rem; text-decoration: none; font-size: 1rem; }
.jump a:hover { border-color: var(--navy); }

/* Figures */
.figs { display: grid; gap: 1rem; grid-template-columns: 1fr; margin: 1rem 0 1.5rem; }
@media (min-width: 700px) { .figs { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .figs { grid-template-columns: repeat(3, 1fr); } }
.fig { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; }
.fig .label { margin: 0; color: var(--ink-soft); }
.fig .value { margin: .15rem 0 .35rem; font-size: 1.9rem; font-weight: 700; color: var(--navy); line-height: 1.2; font-variant-numeric: tabular-nums; }
.fig .src { margin: 0; font-size: 1rem; color: var(--ink-soft); }

.table-wrap { overflow-x: auto; margin: 1rem 0 1.5rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
caption { text-align: left; padding: .8rem 1rem 0; color: var(--ink-soft); position: sticky; left: 0; max-width: calc(100vw - 3rem); box-sizing: border-box; }
th, td { text-align: left; padding: .6rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
td.num, th.num { text-align: right; white-space: nowrap; }
thead th { color: var(--navy); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }

/* Steps */
.steps { list-style: none; counter-reset: step; padding: 0; max-width: var(--text); }
.steps > li { counter-increment: step; position: relative; padding: 0 0 1.2rem 3.2rem; margin: 0; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; display: grid; place-items: center; }
.steps > li h3 { margin: .2rem 0 .4rem; }

.source { font-size: 1rem; color: var(--ink-soft); }
.sources { font-size: 1rem; }
.sources li { margin-bottom: .5rem; word-break: break-word; }

details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem 1rem; margin: 0 0 .8rem; max-width: var(--text); }
summary { cursor: pointer; font-weight: 600; color: var(--navy); }
details[open] summary { margin-bottom: .5rem; }

/* Footer */
.foot { background: #e8ecef; border-top: 1px solid var(--line); padding: 1.8rem 0 2.2rem; font-size: 1rem; color: var(--ink-soft); }
.foot .wrap { display: grid; gap: 1rem; }
@media (min-width: 760px) { .foot .wrap { grid-template-columns: 2fr 1fr; } }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin-bottom: .35rem; }
.foot a { color: var(--ink); }
.foot p { margin: 0 0 .5rem; }

@media print { .top, .foot, .skip { display: none; } body { background: #fff; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.swipe { display: none; margin: 1rem 0 0; }
@media (max-width: 700px) { .swipe { display: block; } }
@media (max-width: 700px) {
  table.stack thead { position: absolute; left: -9999px; }
  table.stack caption { display: block; position: static; max-width: none; padding-bottom: .4rem; }
  table.stack, table.stack tbody, table.stack tr, table.stack th, table.stack td { display: block; width: auto; }
  table.stack tr { padding: .6rem 0; border-top: 1px solid var(--line); }
  table.stack th, table.stack td { border: 0; padding: .2rem 1rem; }
  table.stack td[data-label]::before { content: attr(data-label) "\00a0: "; font-weight: 600; }
}
