@font-face {
  font-family: "Source Serif";
  src: url("/static/fonts/source-serif-4-latin-opsz-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f5f3ee;
  --sheet: #ffffff;
  --ink: #1d1c1a;
  --ink-2: #5a564e;
  --ink-3: #8a857b;
  --rule: #d8d3c8;
  --rule-2: #ebe8e1;
  --blue: #1f3d8f;
  --blue-2: #16306f;
  --blue-soft: #e9edf7;
  --rust: #a5401b;
  --rust-soft: #f8ece6;
  --green: #2c6a3d;
  --green-soft: #e7f1e8;
  --serif: "Source Serif", "Iowan Old Style", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r: 3px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.5 var(--sans);
  font-variant-numeric: tabular-nums;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body > main { flex: 1; }
a { color: var(--blue); text-underline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.005em; }
h1 { font-size: 30px; font-variation-settings: "opsz" 40; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { margin: 0 0 .75em; }
abbr { text-decoration: none; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---- Barre ---- */
.bar {
  display: flex; align-items: center; gap: 16px;
  padding: 0 24px; height: 52px;
  background: var(--sheet); border-bottom: 1px solid var(--rule);
  position: relative; z-index: 5;
}
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-family: var(--serif); font-size: 20px; font-weight: 600; }
.mark { width: 20px; height: 20px; color: var(--blue); }
.crumbs { display: flex; align-items: center; gap: 10px; min-width: 0; padding-left: 16px; border-left: 1px solid var(--rule); color: var(--ink-2); font-size: 14px; }
.crumbs a, .crumbs span:first-child { color: var(--ink-2); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.bar-nav { margin-left: auto; font-size: 14px; white-space: nowrap; }
.bar-nav a { color: var(--ink-2); text-decoration: none; }
.bar-nav a:hover { color: var(--ink); }
.tag { flex: none; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); border: 1px solid var(--rule); border-radius: var(--r); padding: 1px 6px; }

.foot { padding: 24px; color: var(--ink-3); font-size: 12.5px; border-top: 1px solid var(--rule-2); margin-top: 48px; }
.foot p { max-width: 860px; margin: 0; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 32px 24px 0; }
.wrap.narrow { max-width: 640px; }

/* ---- Contrôles ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: 600 14px/1 var(--sans); padding: 9px 14px; border-radius: var(--r);
  background: var(--blue); color: #fff; border: 1px solid var(--blue); cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--blue-2); border-color: var(--blue-2); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-quiet { background: var(--sheet); color: var(--ink); border-color: var(--rule); }
.btn-quiet:hover { background: var(--paper); border-color: var(--ink-3); }
.link { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; color: var(--blue); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.link-danger { color: var(--rust); }
.x { width: 26px; height: 26px; border: 0; background: none; color: var(--ink-3); font-size: 18px; line-height: 1; border-radius: var(--r); cursor: pointer; }
.x:hover { background: var(--rust-soft); color: var(--rust); }

input, select, textarea { font: inherit; color: inherit; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea {
  width: 100%; padding: 7px 9px; border: 1px solid #cdc7ba; border-radius: var(--r); background: var(--sheet); min-height: 36px;
}
input:not([type=checkbox]):not([type=radio]):disabled, textarea:disabled, select:disabled { background: transparent; border-color: transparent; color: var(--ink); -webkit-text-fill-color: var(--ink); opacity: 1; padding-left: 0; resize: none; }
textarea { resize: vertical; line-height: 1.45; }
input[type=checkbox], input[type=radio] { accent-color: var(--blue); width: 16px; height: 16px; margin: 0; }
.field { display: flex; flex-direction: column; gap: 4px; margin: 0 0 14px; border: 0; padding: 0; min-width: 0; }
.field > span:first-child, .field legend { font-size: 13px; color: var(--ink-2); padding: 0; }
.field em { font-style: normal; color: var(--ink-3); }
.field.inline { flex-direction: row; align-items: center; gap: 10px; margin: 0; }
.field.inline > span:first-child { white-space: nowrap; }
.field.inline input, .field.inline select { width: auto; }
.money { position: relative; display: block; }
.money input { padding-right: 24px !important; text-align: right; }
.money i { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--ink-3); pointer-events: none; }
.choice, .checks { display: flex; gap: 18px; flex-wrap: wrap; }
.choice label, .checks label { display: flex; align-items: center; gap: 7px; font-size: 14px; }
.checks { margin: 0 0 14px; }
.row2, .row3 { display: grid; gap: 12px; }
.row2 { grid-template-columns: 1fr 1fr; }
.row3 { grid-template-columns: repeat(3, 1fr); }
.hint { font-size: 13px; color: var(--ink-2); }
.muted { color: var(--ink-3); }
.form-error { color: var(--rust); background: var(--rust-soft); padding: 8px 10px; border-radius: var(--r); font-size: 14px; }
.deg { color: var(--rust); font-weight: 600; }
.ok { color: var(--green); font-weight: 600; }
progress { width: 100%; max-width: 320px; height: 6px; appearance: none; border: 0; background: var(--rule-2); border-radius: 3px; overflow: hidden; display: block; margin: 0 0 12px; }
progress::-webkit-progress-bar { background: var(--rule-2); }
progress::-webkit-progress-value { background: var(--blue); }
progress::-moz-progress-bar { background: var(--blue); }

.panel { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); padding: 18px; }
.h-small { font-family: var(--sans); font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 10px; }
.banner { background: #fbf6e3; border: 1px solid #eadfb4; color: #5e5020; padding: 8px 12px; border-radius: var(--r); font-size: 14px; }
.notice { background: var(--blue-soft); border: 1px solid #c9d3ec; padding: 14px 16px; border-radius: var(--r); margin-bottom: 24px; }
.notice p { margin-bottom: 10px; }
.copyline { display: flex; gap: 8px; }
.copyline input { font-size: 13px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink-2); }
.warn { border-color: #e5c3b4; background: var(--rust-soft); color: #6a2a12; font-size: 14px; }
.warn p:last-child { margin: 0; }
.late { color: var(--rust); font-size: 13.5px; }
.warn-line { font-size: 13px; color: var(--rust); margin: 10px 0 0; }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 9px 14px; border-radius: var(--r); font-size: 14px; z-index: 50; max-width: calc(100vw - 32px); }
.toast.is-error { background: var(--rust); }

/* ---- Accueil ---- */
.home { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 56px; padding-top: 56px; align-items: start; }
.home h1 { font-size: 40px; line-height: 1.12; font-variation-settings: "opsz" 60; max-width: 17ch; margin-bottom: 20px; }
.lede { font-size: 17px; color: var(--ink-2); max-width: 54ch; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 32px 0; border-top: 1px solid var(--rule); }
.steps li { counter-increment: s; padding: 14px 0 14px 40px; border-bottom: 1px solid var(--rule); position: relative; color: var(--ink-2); max-width: 60ch; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 13px; font-family: var(--serif); font-size: 20px; color: var(--blue); }
.steps strong { color: var(--ink); }
.sample-form { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sample-form .hint { margin: 0; }
.new-form h2 { margin-bottom: 16px; }
.new-form .btn { width: 100%; padding: 12px; margin-top: 4px; }
.new-form .hint:last-child { margin: 10px 0 0; }
.mine { margin-bottom: 24px; }
.mine-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.mine-list li { border-bottom: 1px solid var(--rule); }
.mine-list a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 2px; text-decoration: none; color: var(--ink); }
.mine-list a:hover .addr { text-decoration: underline; }
.mine-list .st { color: var(--ink-2); font-size: 13px; white-space: nowrap; }

/* ---- Dossier ---- */
.dossier-head { margin-bottom: 28px; }
.dossier-head h1 { margin-bottom: 4px; }
.lot { color: var(--ink-2); margin-bottom: 8px; }
.facts { display: flex; flex-wrap: wrap; gap: 4px 0; font-size: 14px; color: var(--ink-2); }
.facts span:not(:last-child)::after { content: "·"; margin: 0 9px; color: var(--ink-3); }
.dossier-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
.dossier-side { display: flex; flex-direction: column; gap: 16px; }
.lease-form summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.lease-form summary::-webkit-details-marker { display: none; }
.lease-form summary::after { content: "Modifier"; font-size: 13px; color: var(--blue); }
.lease-form[open] summary::after { content: "Fermer"; }
.lease-form summary h2 { margin: 0; }
.lease-form form { margin-top: 14px; }
.danger-zone { padding: 0 2px; }

.stage-list { list-style: none; margin: 0; padding: 0; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); }
.stage { display: grid; grid-template-columns: 44px 1fr; gap: 14px; padding: 22px 22px 20px 18px; border-bottom: 1px solid var(--rule-2); }
.stage:last-child { border-bottom: 0; }
.stage-num { width: 30px; height: 30px; border: 1.5px solid var(--rule); border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-size: 16px; color: var(--ink-3); margin-top: -3px; }
.stage.is-current .stage-num { border-color: var(--blue); color: var(--blue); }
.stage.is-done .stage-num { background: var(--ink); border-color: var(--ink); color: #fff; }
.stage.is-later h2 { color: var(--ink-3); }
.stage-body p:last-child { margin-bottom: 0; }
.stage-body h2 { margin-bottom: 6px; }
.actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.start-form { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; margin-top: 6px; }
.room-pick summary { cursor: pointer; font-size: 14px; color: var(--blue); }
.room-pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 16px; margin: 10px 0 6px; }
.room-pick-list label { display: flex; gap: 7px; align-items: center; font-size: 14px; }
.figure { font-family: var(--serif); font-size: 26px; font-weight: 600; margin-bottom: 6px; }
.figure span { font-family: var(--sans); font-size: 14px; font-weight: 400; color: var(--ink-2); }

/* ---- Tableaux ---- */
.grid-table { width: 100%; border-collapse: collapse; }
.grid-table th, .grid-table td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--rule-2); vertical-align: top; }
.grid-table thead th { font-size: 11.5px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); border-bottom: 1px solid var(--rule); padding-top: 4px; padding-bottom: 6px; white-space: nowrap; }
.grid-table tbody th { font-weight: 500; }
.grid-table .num { text-align: right; }
.grid-table .num input { text-align: right; }
.grid-table input[type=number] { width: 64px !important; }
.col-x { width: 34px; text-align: right !important; padding-left: 0 !important; padding-right: 0 !important; }
.was { color: var(--ink-2); }

/* ---- État des lieux ---- */
.insp-head {
  position: sticky; top: 0; z-index: 4;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 12px 24px; background: rgba(245, 243, 238, .96); border-bottom: 1px solid var(--rule);
}
.insp-title { display: flex; align-items: baseline; gap: 24px; flex-wrap: wrap; }
.insp-title h1 { font-size: 22px; margin: 0; }
.insp-meta { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--ink-2); }
.sealed { color: var(--green); font-weight: 600; }
.insp-body { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 28px; max-width: 1240px; margin: 0 auto; padding: 24px 24px 0; }
.toc { position: sticky; top: 76px; align-self: start; font-size: 14px; max-height: calc(100vh - 96px); overflow: auto; }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule); }
.toc a { display: block; padding: 4px 12px; color: var(--ink-2); text-decoration: none; margin-left: -1px; border-left: 2px solid transparent; }
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--ink); border-left-color: var(--blue); }
.toc .count { color: var(--ink-3); font-size: 12px; margin-left: 4px; }
.sheet { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); padding: 8px 28px 28px; min-width: 0; }
.sheet > .banner { margin-top: 16px; }
.sealed-banner { background: var(--green-soft); border-color: #c4dcc8; color: #23502f; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--ink-2); padding: 14px 0 4px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.block { padding: 22px 0 6px; border-bottom: 1px solid var(--rule); scroll-margin-top: 72px; }
.block:last-child { border-bottom: 0; }
.block > h2 { margin-bottom: 12px; }
.room-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.room-head h2 { margin: 0; flex: 1 1 260px; }
.room-name { font: 600 20px/1.2 var(--serif) !important; border-color: transparent !important; padding: 2px 6px !important; margin-left: -7px; min-height: 0 !important; background: transparent !important; }
.room-name:hover { border-color: var(--rule) !important; }
.room-name:focus { border-color: var(--blue) !important; background: var(--sheet) !important; }
.room-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.room-actions .link { font-size: 13px; }

.code { display: inline-block; min-width: 28px; text-align: center; font: 700 11.5px/18px var(--sans); letter-spacing: .03em; border: 1px solid var(--rule); border-radius: 2px; color: var(--ink-2); background: var(--sheet); }
.code-none { color: var(--ink-3); }
.items .col-el { width: 24%; }
.items .col-was { width: 20%; font-size: 13.5px; }
.items .col-st { width: 158px; }
.was-notes { display: block; color: var(--ink-2); font-size: 13px; margin-top: 3px; }
.items tbody th { padding-top: 13px; }
.items tbody td { padding-top: 8px; padding-bottom: 8px; }
.items .col-was .code { margin-top: 4px; }
.deg-flag { display: block; color: var(--rust); font-size: 12px; font-weight: 650; letter-spacing: .02em; margin-top: 2px; }
.wear-flag { display: block; color: var(--ink-3); font-size: 12px; margin-top: 2px; font-weight: 400; }
.item.is-deg { background: var(--rust-soft); }
.item.is-deg th { box-shadow: inset 3px 0 0 var(--rust); }
tr.is-deg .num input { color: var(--rust); font-weight: 600; }

.states { display: inline-flex; border: 1px solid #cdc7ba; border-radius: var(--r); overflow: hidden; margin-top: 2px; background: var(--sheet); }
.states label { position: relative; display: block; }
.states input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.states span { display: block; width: 36px; height: 32px; line-height: 32px; text-align: center; font: 700 12px/32px var(--sans); color: var(--ink-2); border-right: 1px solid var(--rule-2); letter-spacing: .03em; }
.states label:last-child span { border-right: 0; }
.states label:hover span { background: var(--paper); }
.states input:checked + span { background: var(--blue); color: #fff; }
.states input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: -3px; }
.is-deg .states input:checked + span { background: var(--rust); }
.states input:disabled { cursor: default; }
.states:has(input:disabled) { border-color: transparent; background: none; }
.states:has(input:disabled) label:not(:has(input:checked)) { display: none; }
.states:has(input:disabled) span { border: 1px solid var(--rule); border-radius: 2px; background: var(--sheet) !important; color: var(--ink) !important; width: 34px; height: 22px; line-height: 20px; }
.is-deg .states:has(input:disabled) span { border-color: var(--rust); color: var(--rust) !important; }

.col-obs textarea { min-height: 34px; overflow: hidden; resize: none; }
.col-obs textarea:disabled { min-height: 0; padding-top: 5px; }
.obs-text { margin: 4px 0 0; white-space: pre-line; }
.photos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.photos:empty { display: none; }
.photos figure { position: relative; margin: 0; }
.photos img { width: 64px; height: 64px; object-fit: cover; border-radius: 2px; display: block; border: 1px solid var(--rule); background: var(--paper); }
.photos .x { position: absolute; top: -8px; right: -8px; width: 20px; height: 20px; font-size: 14px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 50%; display: none; }
.photos figure:hover .x, .photos figure:focus-within .x { display: block; }
.add-photo { display: inline-flex; align-items: center; height: 28px; padding: 0 9px; border: 1px dashed #c3bcae; border-radius: var(--r); font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.add-photo:hover { border-color: var(--blue); color: var(--blue); }
.add-photo:focus-within { outline: 2px solid var(--blue); }
.add-photo input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.add-photo.is-busy { opacity: .6; pointer-events: none; }
.add-line { display: flex; gap: 8px; margin: 10px 0 12px; max-width: 520px; }
.add-room { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.add-room input { max-width: 220px; }
.notes-general { max-width: 100%; }

.sigs { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.sig h3 { font-family: var(--sans); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); font-weight: 650; }
.pad { position: relative; border: 1px solid #cdc7ba; border-radius: var(--r); background: #fdfcfa; touch-action: none; }
.pad canvas { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1; cursor: crosshair; }
.pad-line { position: absolute; left: 16px; right: 16px; bottom: 26%; border-top: 1px solid var(--rule); font-size: 11px; color: var(--ink-3); padding-top: 2px; pointer-events: none; }
.pad.has-ink .pad-line { color: transparent; }
.sig-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; gap: 12px; }
.sig-svg { width: 100%; max-width: 300px; height: auto; color: #1a2f6e; display: block; border-bottom: 1px solid var(--rule); margin-bottom: 6px; }
.sig-meta { font-size: 13px; color: var(--ink-2); margin-bottom: 4px; }

/* ---- Restitution ---- */
.page-head { margin-bottom: 20px; }
.restit-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.restit-main { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); padding: 4px 24px 18px; min-width: 0; }
.restit-main .block { border-bottom: 1px solid var(--rule); }
.restit-main > :last-child { border-bottom: 0; }
.restit-main .block > .btn { margin-top: 12px; }
.restit-side { position: sticky; top: 16px; }
.table-scroll { overflow-x: auto; }
.deds { min-width: 620px; }
.deds-other { min-width: 0; }
.deds td { vertical-align: middle; }
.deds .col-chk { width: 28px; padding-right: 0; }
.deds .col-label { min-width: 170px; }
.deds td small { display: block; font-size: 12px; color: var(--ink-3); margin-top: 2px; white-space: nowrap; }
.deds .col-charged { min-width: 92px; padding-top: 10px; }
.deds .col-charged small::after { content: " à charge"; }
.no-wear .col-year > *, .no-wear .col-charged small { visibility: hidden; }
.ded-label { font-size: 14px; }
.deds select { width: 170px; font-size: 13.5px; }
.deds .year { width: 64px !important; }
.deds .money { width: 104px; margin-left: auto; }
.deds-other .money { width: 130px; }
.deds .strong { font-weight: 650; }
.deds td[data-out] { white-space: nowrap; }
tr.is-off td:not(.col-chk) { opacity: .45; }
.grid-edit summary { cursor: pointer; list-style: none; }
.grid-edit summary::-webkit-details-marker { display: none; }
.grid-edit summary h2 { display: inline; }
.grid-edit summary::after { content: " +"; color: var(--ink-3); font-family: var(--serif); font-size: 20px; }
.grid-edit[open] summary::after { content: " −"; }
.grid-edit table { margin: 8px 0 12px; }
.grid-edit td { white-space: nowrap; color: var(--ink-2); font-size: 13px; }
.summary { padding: 18px 18px 14px; }
.tally { margin: 0 0 16px; }
.tally div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--rule-2); font-size: 14px; }
.tally dt { color: var(--ink-2); }
.tally dd { margin: 0; white-space: nowrap; }
.tally .total { border-bottom: 0; border-top: 1.5px solid var(--ink); margin-top: 4px; padding-top: 10px; }
.tally .total dt { color: var(--ink); font-weight: 600; }
.tally .total dd { font-family: var(--serif); font-size: 24px; font-weight: 650; line-height: 1; }
.deadline, .paid { border-top: 1px solid var(--rule-2); padding: 14px 0 4px; font-size: 14px; }
.deadline .field, .paid .field { margin-bottom: 10px; justify-content: space-between; }
.summary .btn { width: 100%; margin-top: 8px; }

/* ---- Guide ---- */
.prose { max-width: 760px; }
.prose h2 { margin-top: 36px; }
.prose li { margin-bottom: 8px; }
.prose ul { padding-left: 20px; }
.example { background: var(--sheet); border: 1px solid var(--rule); border-left: 3px solid var(--blue); padding: 14px 16px; margin: 0 0 18px; border-radius: var(--r); }
.example p:last-child { margin: 0; }
.prose .grid-table { background: var(--sheet); margin-bottom: 12px; border: 1px solid var(--rule); }

/* ---- Petits écrans ---- */
@media (max-width: 980px) {
  .insp-body { grid-template-columns: 1fr; }
  .toc { display: none; }
  .dossier-grid, .restit-grid { grid-template-columns: 1fr; }
  .restit-side { position: static; }
}
@media (max-width: 860px) {
  .home { grid-template-columns: 1fr; gap: 32px; padding-top: 32px; }
  .home h1 { font-size: 32px; }
}
@media (max-width: 760px) {
  .bar { padding: 0 16px; gap: 12px; }
  .bar-nav a { font-size: 13px; }
  .crumbs { padding-left: 12px; }
  .wrap { padding: 24px 16px 0; }
  h1 { font-size: 26px; }
  .row3 { grid-template-columns: 1fr 1fr; }
  .row3 .field:first-child { grid-column: 1 / -1; }
  .row2 { grid-template-columns: 1fr; gap: 0; }
  .insp-head { padding: 10px 16px; position: static; }
  .insp-title { gap: 10px; }
  .insp-body { padding: 16px 0 0; }
  .sheet { border-left: 0; border-right: 0; border-radius: 0; padding: 4px 16px 20px; }
  .stage { grid-template-columns: 34px 1fr; padding: 18px 16px; gap: 10px; }
  .sigs { grid-template-columns: 1fr; }
  .add-room input { max-width: none; }

  .items thead { display: none; }
  .items, .items tbody, .items tr, .items th, .items td { display: block; width: auto !important; }
  .items tr.item { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 12px 0; border-bottom: 1px solid var(--rule-2); }
  .items tr.item.is-deg { margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
  .items .item > * { border: 0; padding: 0 !important; }
  .items .col-el { grid-column: 1; align-self: center; }
  .items .col-x { grid-column: 2; grid-row: 1; }
  .items .col-was { grid-column: 1 / -1; display: flex !important; gap: 8px; align-items: baseline; flex-wrap: wrap; }
  .items .col-was::before { content: "Entrée"; font-size: 12px; color: var(--ink-3); }
  .items .col-was .was-notes { display: inline; margin: 0; }
  .items .col-st, .items .col-obs { grid-column: 1 / -1; }
  .items .states { display: flex; width: 100%; }
  .items .states label { flex: 1; }
  .items .states span { width: auto; height: 40px; line-height: 40px; }
  .items .states:has(input:disabled) { width: auto; }
  .item.is-deg th { box-shadow: none; }
  .meters th, .meters td { padding-left: 4px; padding-right: 4px; }
  .meters thead th:nth-child(2), .meters td:nth-child(2) { display: none; }
  .facts { flex-direction: column; }
  .facts span:not(:last-child)::after { content: none; }
  .table-scroll { overflow: visible; }
  .deds:not(.deds-other) { min-width: 0; }
  .deds:not(.deds-other) thead { display: none; }
  .deds:not(.deds-other), .deds:not(.deds-other) tbody { display: block; }
  .deds:not(.deds-other) tr { display: grid; grid-template-columns: 24px repeat(3, minmax(0, 1fr)) 26px; gap: 8px 10px; padding: 14px 0; border-bottom: 1px solid var(--rule-2); align-items: start; }
  .deds:not(.deds-other) td { display: block; border: 0; padding: 0 !important; text-align: left; min-width: 0; }
  .deds:not(.deds-other) td[data-label]::before { content: attr(data-label); display: block; font-size: 11.5px; color: var(--ink-3); margin-bottom: 3px; }
  .deds:not(.deds-other) .col-chk { grid-column: 1; grid-row: 1; align-self: start; padding-top: 2px !important; }
  .deds:not(.deds-other) .col-label { grid-column: 2 / 5; grid-row: 1; min-width: 0; }
  .deds:not(.deds-other) .col-x { grid-column: 5; grid-row: 1; }
  .deds:not(.deds-other) .col-cat { grid-column: 2 / 5; }
  .deds:not(.deds-other) .col-cat select { width: 100%; }
  .deds:not(.deds-other) .col-year { grid-column: 2; }
  .deds:not(.deds-other) .col-cost { grid-column: 3; }
  .deds:not(.deds-other) .col-cost .money { width: auto; }
  .deds:not(.deds-other) .col-charged { grid-column: 4 / 6; text-align: right; }
  .deds:not(.deds-other) .col-charged::before { text-align: right; }
  .deds .year { width: 100% !important; }
  .deds-other .money { width: 100px; }
  .restit-main { padding: 4px 16px 16px; border-left: 0; border-right: 0; border-radius: 0; margin: 0 -16px; }
}
@media (max-width: 420px) {
  .bar-nav { display: none; }
  .home h1 { font-size: 28px; }
}
