/* =========================================================
   Bailleur — design system (planche « Bailleur. Design System »)
   Forêt porte l'action, champagne la nuance, verre = navigation.
   ========================================================= */

:root {
  --sans: system-ui, -apple-system, "SF Pro Text", "SF Pro Display", Inter, "Helvetica Neue", sans-serif;

  --canvas: #F6F4EF;
  --surface: #FFFFFF;
  --subtle: #F3F1EC;
  --subtle-2: #ECE9E2;
  --ink: #0F172A;
  --muted: #5B6B80;
  --faint: #8A97A8;
  --line: #ECE9E2;
  --forest: #1F3D2E;
  --forest-h: #163024;
  --forest-ink: #FFFFFF;
  --forest-soft: #E8EFEA;
  --champ: #D4B06A;
  --champ-bg: #F7EEDB;
  --champ-ink: #7A5A1E;
  --ok: #15803D; --ok-bg: #E3F7EA; --ok-fill: #22C55E;
  --warn: #B45309; --warn-bg: #FEF3D7; --warn-fill: #F59E0B;
  --bad: #B91C1C; --bad-bg: #FDE7E7; --bad-fill: #EF4444;
  --info: #1D4ED8; --info-bg: #E3EDFE; --info-fill: #3B82F6;
  --neutral: #475569; --neutral-bg: #F1EFE9; --neutral-fill: #CBD5E1;
  --focus: #3B82F6;

  --glass: rgba(255,255,255,.52);
  --glass-strong: rgba(255,255,255,.74);
  --card-glass: rgba(255,255,255,.68);
  --nav-glass: rgba(250,248,243,.66);
  --subnav-glass: rgba(250,248,243,.5);
  --hover-glass: rgba(255,255,255,.45);
  --glass-stroke: rgba(255,255,255,.75);
  --glass-edge: inset 0 1px 0 rgba(255,255,255,.9), inset 0 -1px 0 rgba(255,255,255,.25);
  --veil: linear-gradient(180deg, rgba(246,244,239,.58) 0%, rgba(246,244,239,.42) 40%, rgba(246,244,239,.62) 100%);
  --scrim: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.55) 100%);

  --sh1: 0 1px 2px #0F172A0A, 0 4px 16px #0F172A0D;
  --sh2: 0 10px 40px #0F172A1A;
  --sh3: 0 24px 64px #0F172A2E;

  --r-xs: 8px; --r-sm: 10px; --r-md: 14px; --r-lg: 18px; --r-xl: 24px; --r-2xl: 28px;
  --ease: cubic-bezier(.2,0,0,1);
  --t-fast: 140ms; --t: 220ms; --t-slow: 320ms;
  --sidebar: 256px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --canvas: #0D1210;
  --surface: #161C19;
  --subtle: #1E2521;
  --subtle-2: #252D28;
  --ink: #F3F2EE;
  --muted: #A9B4AD;
  --faint: #7D8A82;
  --line: #262E29;
  --forest: #9CC7AE;
  --forest-h: #B6D8C4;
  --forest-ink: #0F1E16;
  --forest-soft: #1E3128;
  --champ: #D4B06A;
  --champ-bg: #352C1D;
  --champ-ink: #E8CC8F;
  --ok: #86EFAC; --ok-bg: #14301F;
  --warn: #FCD34D; --warn-bg: #3A2E14;
  --bad: #FCA5A5; --bad-bg: #3D1C1C;
  --info: #93C5FD; --info-bg: #1B2A44;
  --neutral: #A9B4AD; --neutral-bg: #1E2521; --neutral-fill: #3A453F;
  --focus: #93C5FD;
  --glass: rgba(20,26,23,.5);
  --glass-strong: rgba(30,36,33,.74);
  --card-glass: rgba(22,28,25,.66);
  --nav-glass: rgba(16,20,18,.62);
  --subnav-glass: rgba(16,20,18,.46);
  --hover-glass: rgba(255,255,255,.08);
  --glass-stroke: rgba(255,255,255,.10);
  --glass-edge: inset 0 1px 0 rgba(255,255,255,.08);
  --veil: linear-gradient(180deg, rgba(6,10,8,.5) 0%, rgba(6,10,8,.7) 100%);
  --sh1: 0 1px 2px #00000040, 0 4px 16px #00000030;
  --sh2: 0 12px 40px #00000060;
  --sh3: 0 24px 64px #00000080;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--canvas);
  color: var(--ink);
  font: 400 15px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}
a { color: var(--forest); text-decoration: none; }
a:hover { color: var(--forest-h); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }
*:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--surface); padding: 10px 14px; border-radius: 10px; box-shadow: var(--sh2); }
.skip:focus { top: 12px; }

/* ---------- icônes ---------- */
.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i.sm { width: 16px; height: 16px; }
.i.xs { width: 14px; height: 14px; }
.i.lg { width: 24px; height: 24px; }

/* ---------- fond : villa de luxe, flou doux ---------- */
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; background: #2b2a26; }
.bg img { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); object-fit: cover; filter: blur(14px) saturate(1.15); transform: scale(1.02); }
.bg::after { content: ""; position: absolute; inset: 0; background: var(--veil); }

/* ---------- navigation globale (façon apple.com) ---------- */
.gnav {
  position: sticky; top: 0; z-index: 40; height: 54px;
  background: var(--nav-glass);
  -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  border-bottom: 1px solid var(--glass-stroke);
}
.gnav-in { max-width: 1240px; margin: 0 auto; height: 100%; display: flex; align-items: center; gap: 8px; padding: 0 22px; }
.gnav .logo { display: flex; align-items: center; gap: 9px; padding: 4px 6px; border-radius: 12px; border: 0; background: transparent; color: var(--ink); }
.gnav .logo img { width: 38px; height: 38px; display: block; filter: drop-shadow(0 2px 6px rgba(90,64,20,.28)); }
.gnav .logo span { font: 700 20px/1 var(--sans); letter-spacing: -.02em; }
.gnav .vols { flex: 1; display: flex; justify-content: center; gap: 2px; }
.gnav .vol { border: 0; background: transparent; color: var(--ink); opacity: .78; font-size: 14px; font-weight: 500; letter-spacing: -.005em; padding: 8px 13px; border-radius: 999px; transition: opacity var(--t-fast), background var(--t-fast); white-space: nowrap; }
.gnav .vol:hover { opacity: 1; background: var(--hover-glass); }
.gnav .vol.on { opacity: 1; font-weight: 650; background: var(--glass-strong); box-shadow: var(--glass-edge), 0 1px 4px rgba(0,0,0,.06); }
.gnav .tools { display: flex; align-items: center; gap: 4px; }
.gnav .tool { position: relative; width: 38px; height: 38px; border-radius: 50%; border: 0; background: transparent; color: var(--ink); display: grid; place-items: center; opacity: .85; }
.gnav .tool:hover { background: var(--hover-glass); opacity: 1; }
.gnav .tool .count { position: absolute; top: 2px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--bad-fill); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
.gnav .me { display: flex; align-items: center; gap: 6px; border: 0; background: var(--glass-strong); border-radius: 999px; padding: 3px 10px 3px 3px; box-shadow: var(--glass-edge); color: var(--ink); font-size: 13px; font-weight: 600; }
.gnav .me .avatar { width: 30px; height: 30px; font-size: 12px; }
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--neutral-fill); flex: none; }
.sync-dot.ok { background: var(--ok-fill); } .sync-dot.warn { background: var(--warn-fill); } .sync-dot.bad { background: var(--bad-fill); }
.gnav .burger { display: none; }

.lnav {
  position: sticky; top: 54px; z-index: 35;
  background: var(--subnav-glass);
  -webkit-backdrop-filter: blur(24px) saturate(170%); backdrop-filter: blur(24px) saturate(170%);
  border-bottom: 1px solid var(--glass-stroke);
}
.lnav-in { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; gap: 18px; padding: 0 22px; height: 50px; }
.lnav .ltitle { font: 650 19px/1 var(--sans); letter-spacing: -.015em; white-space: nowrap; }
.lnav .links { margin-left: auto; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.lnav .links::-webkit-scrollbar { display: none; }
.lnav .links a { font-size: 13px; color: var(--ink); opacity: .72; padding: 7px 11px; border-radius: 999px; white-space: nowrap; }
.lnav .links a:hover { opacity: 1; }
.lnav .links a.on { opacity: 1; font-weight: 650; color: var(--forest); background: var(--glass-strong); box-shadow: var(--glass-edge); }

.mnav { position: fixed; inset: 54px 0 0 0; z-index: 39; background: var(--canvas); padding: 18px 18px 110px; overflow-y: auto; animation: pageIn var(--t) var(--ease); }
.mnav .mn-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 760px; margin: 0 auto; }
.mnav .mn-card { background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 20px; padding: 14px; }
.mnav a.v { display: flex; align-items: center; gap: 10px; font: 650 18px/1.2 var(--sans); color: var(--ink); }
.mnav .subs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.mnav .subs a { font-size: 13px; color: var(--ink); background: var(--subtle); border-radius: 999px; padding: 6px 11px; }
.mnav .mn-util { display: flex; flex-wrap: wrap; gap: 8px; max-width: 760px; margin: 16px auto 0; }
.mnav .mn-util a { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; }
@media (max-width: 560px) { .mnav .mn-grid { grid-template-columns: 1fr; } }
/* barre d'onglets en bas (iPad en vertical) */
.tabbar { display: none; }
@media (max-width: 900px) {
  .tabbar { display: flex; position: fixed; z-index: 41; left: 50%; transform: translateX(-50%); bottom: max(12px, env(safe-area-inset-bottom)); gap: 2px; padding: 6px; border-radius: 26px; background: var(--nav-glass); border: 1px solid var(--line); -webkit-backdrop-filter: blur(24px) saturate(170%); backdrop-filter: blur(24px) saturate(170%); box-shadow: 0 8px 30px rgba(0,0,0,.12); max-width: calc(100vw - 24px); }
  .tabbar .tb { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; border: 0; background: transparent; color: var(--muted); font-size: 11px; font-weight: 600; padding: 7px 12px; border-radius: 20px; min-width: 70px; }
  .tabbar .tb.on { color: var(--forest); background: var(--forest-soft); }
  .tabbar .tb-dot { position: absolute; top: 5px; right: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad-fill); }
  .main { padding-bottom: 120px; }
  .gnav .burger { display: none !important; }
}
@media (max-width: 560px) { .tabbar .tb { min-width: 0; padding: 7px 6px; font-size: 10px; } }

.shell { position: relative; z-index: 1; min-height: 100vh; }
.main { padding: 26px 22px 90px; }
.page { max-width: 1240px; margin: 0 auto; animation: pageIn var(--t) var(--ease); }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- en-tête de page ---------- */
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .t { flex: 1; min-width: 240px; }
.eyebrow { font-size: 14px; color: var(--muted); margin-bottom: 4px; text-transform: capitalize; }
.large-title { font: 650 34px/41px var(--sans); letter-spacing: -.02em; }
.title { font: 650 28px/34px var(--sans); letter-spacing: -.015em; }
.h2 { font: 650 20px/26px var(--sans); letter-spacing: -.01em; }
.h3 { font: 650 17px/23px var(--sans); }
.sub { color: var(--muted); font-size: 15px; margin-top: 4px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.strong { font-weight: 650; }
.money { font-weight: 650; color: var(--forest); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 28px 0 12px; }
.section-head:first-child { margin-top: 0; }
.bld-group { border: 1px solid var(--line); border-radius: 26px; padding: 18px; margin-bottom: 22px; background: color-mix(in srgb, var(--subtle) 55%, transparent); }
.bld-head { display: flex; align-items: center; gap: 12px; margin: 0 2px 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.bld-head .h3 { margin: 0; }
@media (max-width: 760px) { .bld-group { padding: 0; border: 0; border-radius: 0; background: none; margin-bottom: 30px; } .bld-head { margin: 0 0 12px; } }
.section-head .link { font-size: 14px; font-weight: 500; color: var(--champ-ink); background: none; border: 0; padding: 6px 0; }
:root[data-theme="dark"] .section-head .link { color: var(--champ); }

/* ---------- surfaces ---------- */
.card { background: var(--card-glass); border: 1px solid var(--glass-stroke); border-radius: 22px; box-shadow: var(--glass-edge), var(--sh1); -webkit-backdrop-filter: blur(26px) saturate(170%); backdrop-filter: blur(26px) saturate(170%); }
.card.solid { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
.card.pad { padding: 20px; }
.card.pad-sm { padding: 14px; }
.card.flat { box-shadow: none; }
.card.interactive { cursor: pointer; transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.card.interactive:hover { box-shadow: var(--sh2); transform: translateY(-1px); }
.pane {
  background: var(--glass);
  -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--glass-stroke); box-shadow: var(--glass-edge), var(--sh1);
  border-radius: var(--r-2xl); padding: 18px;
}
.pane-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.pane-title .dot { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; }

.grid { display: grid; gap: 16px; }
.grid.g2 { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
@media (max-width: 720px) { .grid.g2 { grid-template-columns: minmax(0,1fr); } }
.cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.auto-300 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.auto-240 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.auto-180 { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack-lg { display: flex; flex-direction: column; gap: 16px; }
.hstack { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; } .mb16 { margin-bottom: 16px; }

/* ---------- boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--glass-stroke);
  background: var(--glass-strong); color: var(--ink); box-shadow: var(--glass-edge); font-size: 14px; font-weight: 600; white-space: nowrap;
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), opacity var(--t-fast);
}
.btn:hover { background: var(--card-glass); filter: brightness(1.02); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--forest); color: var(--forest-ink); border-color: transparent; box-shadow: 0 4px 14px rgba(31,61,46,.25); }
.btn.primary:hover { background: var(--forest-h); }
.btn.champ { background: var(--champ); color: #2A1F08; border-color: transparent; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--subtle); }
.btn.danger { color: var(--bad); }
.btn.danger.solid { background: var(--bad-fill); color: #fff; border-color: transparent; }
.btn.sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn.lg { height: 52px; padding: 0 24px; font-size: 15px; }
.btn.block { width: 100%; }
.btn.done { background: var(--ok-bg); color: var(--ok); border-color: transparent; box-shadow: none; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  transition: background var(--t-fast);
}
.icon-btn:hover { background: var(--subtle); }
.icon-btn.sm { width: 34px; height: 34px; }
.icon-btn.forest { background: var(--forest); color: var(--forest-ink); border-color: transparent; }
.icon-btn.glass {
  background: var(--glass-strong); border-color: var(--glass-stroke);
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  box-shadow: var(--glass-edge), var(--sh1);
}

/* ---------- puces, segments ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  white-space: nowrap; flex: none;
  height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--glass-stroke);
  background: var(--glass); box-shadow: var(--glass-edge); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); font-size: 13px; font-weight: 550; display: inline-flex; align-items: center; gap: 6px;
  transition: background var(--t-fast), color var(--t-fast);
}
.chip:hover { background: var(--subtle); }
.chip.on { background: var(--forest); color: var(--forest-ink); border-color: transparent; }
.chip .n { opacity: .7; font-weight: 500; }
.seg {
  display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--glass-stroke);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: var(--glass-edge); max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg button {
  height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent;
  font-size: 13.5px; font-weight: 550; color: var(--muted); white-space: nowrap;
  transition: background var(--t-fast) var(--ease), color var(--t-fast);
}
.seg button.on { background: var(--forest); color: var(--forest-ink); box-shadow: var(--sh1); }
.seg.light button.on { background: var(--surface); color: var(--ink); }
.seg.solid { background: var(--subtle); border-color: var(--line); -webkit-backdrop-filter: none; backdrop-filter: none; }

/* ---------- badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--neutral-bg); color: var(--neutral);
}
.badge .i { width: 13px; height: 13px; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.champ { background: var(--champ-bg); color: var(--champ-ink); }
.badge.forest { background: var(--forest-soft); color: var(--forest); }
.badge.photo {
  position: absolute; left: 8px; bottom: 8px; height: 22px; font-size: 11px;
  background: rgba(255,255,255,.82); color: var(--forest);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
:root[data-theme="dark"] .badge.photo { background: rgba(20,26,23,.75); }

/* ---------- lignes ---------- */
.list { display: flex; flex-direction: column; }
.list.card > .row:not(:last-child) { border-bottom: 1px solid var(--line); }
.row {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px; min-height: 64px;
  background: transparent; border: 0; width: 100%; text-align: left;
}
.row.click { cursor: pointer; transition: background var(--t-fast); }
.row.click:hover { background: var(--subtle); }
.list.card > .row.click:first-child { border-radius: var(--r-lg) var(--r-lg) 0 0; }
.list.card > .row.click:last-child { border-radius: 0 0 var(--r-lg) var(--r-lg); }
.row .body { flex: 1; min-width: 0; display: block; }
.row .title-l, .row .sub-l { display: block; }
.row .clamp2 { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row .title-l { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .sub-l { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .trail { display: flex; align-items: center; gap: 10px; flex: none; }
.row .chev { color: var(--faint); }
.tint { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.tint.ok { background: var(--ok-bg); color: var(--ok); }
.tint.warn { background: var(--warn-bg); color: var(--warn); }
.tint.bad { background: var(--bad-bg); color: var(--bad); }
.tint.info { background: var(--info-bg); color: var(--info); }
.tint.champ { background: var(--champ-bg); color: var(--champ-ink); }
.tint.forest { background: var(--forest-soft); color: var(--forest); }
.tint.neutral { background: var(--neutral-bg); color: var(--neutral); }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--champ-bg); color: var(--champ-ink); font-size: 14px; font-weight: 650; letter-spacing: .02em;
}
.avatar.sm { width: 32px; height: 32px; font-size: 12px; }
.avatar.lg { width: 56px; height: 56px; font-size: 18px; }
.avatars { display: flex; }
.avatars .avatar { border: 2px solid var(--surface); margin-left: -8px; }
.avatars .avatar:first-child { margin-left: 0; }

/* ---------- carte bien (horizontale) ---------- */
.prop-card { display: flex; gap: 14px; padding: 10px; align-items: center; }
.prop-card .ph { position: relative; width: 132px; height: 100px; border-radius: 16px; overflow: hidden; flex: none; background: var(--subtle); }
.prop-card .ph img { width: 100%; height: 100%; object-fit: cover; }
.prop-card .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.prop-card .name { font-size: 16px; font-weight: 650; }
.prop-card .addr { font-size: 13px; color: var(--muted); }
.prop-card .meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.prop-card .meta span { display: inline-flex; gap: 4px; align-items: center; }
.ph-fallback { width: 100%; height: 100%; display: grid; place-items: center; color: var(--faint); background: linear-gradient(160deg, var(--subtle), var(--subtle-2)); }

/* ---------- carte bien (verticale / média) ---------- */
.media-card { overflow: hidden; }
.media-card .ph { position: relative; aspect-ratio: 16/10; background: var(--subtle); }
.media-card .ph img { width: 100%; height: 100%; object-fit: cover; }
.media-card .fav { position: absolute; top: 10px; right: 10px; }
.media-card .body { padding: 14px 16px 16px; }

/* ---------- héros ---------- */
.hero-card {
  position: relative; border-radius: var(--r-2xl); overflow: hidden; min-height: 240px; color: #fff;
  box-shadow: var(--sh2); isolation: isolate;
}
.hero-card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10,20,15,.15) 0%, rgba(10,20,15,.55) 100%); }
.hero-inner { padding: 22px; display: flex; flex-direction: column; gap: 18px; height: 100%; }
.glass-tile {
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35);
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  border-radius: 18px; padding: 12px 14px; box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}
.glass-tile b { display: block; font-size: 22px; font-weight: 650; letter-spacing: -.01em; }
.glass-tile span { font-size: 12px; opacity: .9; }
.glass-tile.champ { background: rgba(212,176,106,.55); border-color: rgba(255,255,255,.45); }
.hero-amount { font: 650 40px/1.05 var(--sans); letter-spacing: -.02em; }
.hero-label { font-size: 14px; opacity: .92; }

.prop-hero { position: relative; height: 320px; border-radius: 30px; overflow: hidden; background: var(--subtle); box-shadow: var(--sh2); }
.prop-hero img { width: 100%; height: 100%; object-fit: cover; }
.prop-hero .tl { position: absolute; top: 16px; left: 16px; display: flex; gap: 8px; }
.prop-hero .tr { position: absolute; top: 16px; right: 16px; display: flex; gap: 8px; }
.prop-hero .counter { position: absolute; right: 16px; bottom: 80px; }
.title-card { position: relative; margin: -64px 16px 0; padding: 20px 22px; border-radius: 24px; z-index: 2; }

/* ---------- tuiles ---------- */
.tile { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; background: var(--card-glass); border: 1px solid var(--glass-stroke); box-shadow: var(--glass-edge); -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%); }
.tile b { display: block; font-size: 16px; font-weight: 650; }
.tile span { font-size: 12.5px; color: var(--muted); }
.metric { padding: 16px 18px; }
.metric .lbl { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.metric .val { font: 650 26px/1.15 var(--sans); letter-spacing: -.015em; margin-top: 6px; }
.metric .cmp { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

/* ---------- barres ---------- */
.bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--subtle-2); gap: 2px; }
.bar > i { display: block; height: 100%; }
.bar .ok { background: var(--ok-fill); } .bar .warn { background: var(--warn-fill); } .bar .bad { background: var(--bad-fill); } .bar .neutral { background: var(--neutral-fill); }
.bar.on-photo { background: rgba(255,255,255,.3); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.steps { display: flex; gap: 4px; }
.steps i { flex: 1; height: 5px; border-radius: 99px; background: var(--subtle-2); }
.steps i.done { background: var(--forest); }
.steps i.cur { background: var(--champ); }
.progress { height: 6px; border-radius: 99px; background: var(--subtle-2); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--forest); border-radius: 99px; transition: width var(--t) var(--ease); }

/* graphique barres (planche Finances) */
.chart { display: flex; align-items: flex-end; gap: 8px; height: 150px; padding-top: 10px; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart .b { width: 100%; max-width: 22px; border-radius: 6px; background: var(--forest-soft); min-height: 3px; transition: height var(--t) var(--ease); }
.chart .b.cur { background: var(--forest); }
.chart .m { font-size: 11px; color: var(--faint); }

/* ---------- formulaires ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .lbl-t { font-size: 13px; font-weight: 550; color: var(--ink); }
.field .help { font-size: 12px; color: var(--muted); }
.field .err { font-size: 12px; color: var(--bad); }
.input, .field input:not([type=checkbox]):not([type=radio]):not([type=file]), .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 11px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--subtle); color: var(--ink);
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}
.field textarea { min-height: 90px; resize: vertical; line-height: 1.45; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--focus); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 18%, transparent);
}
.field.inline { flex-direction: row; align-items: center; justify-content: space-between; }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.fgrid.c3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.fgrid .full { grid-column: 1 / -1; }
.search {
  display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border-radius: 999px;
  background: var(--glass-strong); border: 1px solid var(--glass-stroke); color: var(--muted); box-shadow: var(--glass-edge);
  min-width: 220px; flex: 1; max-width: 420px;
}
.search input { border: 0; background: transparent; outline: none; flex: 1; min-width: 0; color: var(--ink); height: 100%; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; cursor: pointer; padding: 6px 0; }
.check input { width: 20px; height: 20px; accent-color: var(--forest); margin: 1px 0 0; flex: none; }
.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--neutral-fill); transition: background var(--t) var(--ease); }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: transform var(--t) var(--ease); }
.switch input:checked + span { background: var(--ok-fill); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.state-seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 3px; background: var(--subtle); border-radius: 12px; }
.state-seg button.on { box-shadow: var(--sh1); font-weight: 700; }
.state-seg button { height: 34px; border: 0; border-radius: 9px; background: transparent; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.state-seg button.on[data-v="Neuf"] { background: var(--info-bg); color: var(--info); }
.state-seg button.on[data-v="Bon"] { background: var(--ok-bg); color: var(--ok); }
.state-seg button.on[data-v="Usé"] { background: var(--warn-bg); color: var(--warn); }
.state-seg button.on[data-v="Dégradé"] { background: var(--bad-bg); color: var(--bad); }

/* ---------- alertes ---------- */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; font-size: 14px; }
.alert b { display: block; margin-bottom: 2px; }
.alert.info { background: var(--info-bg); color: var(--info); }
.alert.warn { background: var(--warn-bg); color: var(--warn); }
.alert.bad { background: var(--bad-bg); color: var(--bad); }
.alert.ok { background: var(--ok-bg); color: var(--ok); }
.alert.champ { background: var(--champ-bg); color: var(--champ-ink); }
.alert p { color: inherit; opacity: .92; }

/* ---------- vide ---------- */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .tint { margin: 0 auto 12px; width: 52px; height: 52px; border-radius: 16px; }
.empty h3 { color: var(--ink); font-size: 17px; font-weight: 650; margin-bottom: 4px; }
.empty p { max-width: 380px; margin: 0 auto 14px; font-size: 14px; }

/* ---------- frise ---------- */
.timeline { display: flex; flex-direction: column; }
.tl-step { display: flex; gap: 12px; position: relative; padding-bottom: 14px; }
.tl-step:not(:last-child)::before { content: ""; position: absolute; left: 11px; top: 24px; bottom: 0; width: 2px; background: var(--line); }
.tl-step.done:not(:last-child)::before { background: var(--forest); }
.tl-dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); display: grid; place-items: center; flex: none; z-index: 1; }
.tl-step.done .tl-dot { background: var(--forest); border-color: var(--forest); color: var(--forest-ink); }
.tl-step.cur .tl-dot { border-color: var(--champ); background: var(--champ-bg); box-shadow: 0 0 0 4px color-mix(in srgb, var(--champ) 25%, transparent); }
.tl-step .tl-t { font-size: 14px; font-weight: 550; padding-top: 2px; }
.tl-step.cur .tl-t { font-weight: 700; }
.tl-step:not(.done):not(.cur) .tl-t { color: var(--muted); }

/* ---------- agenda ---------- */
.day { width: 52px; flex: none; text-align: center; border-radius: 14px; padding: 6px 0; background: var(--forest-soft); color: var(--forest); }
.day b { display: block; font-size: 18px; line-height: 1.1; }
.day span { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }

/* ---------- table ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t .r { text-align: right; }
table.t tr.best td { background: color-mix(in srgb, var(--ok-bg) 55%, transparent); }

/* ---------- overlay : panneau, modale, feuille ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 60; background: rgba(15,23,42,.28);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity var(--t) var(--ease);
}
.overlay.in { opacity: 1; }
.drawer {
  position: fixed; top: 12px; right: 12px; bottom: 12px; z-index: 61; width: min(520px, calc(100vw - 24px));
  display: flex; flex-direction: column; border-radius: 28px; overflow: hidden;
  background: var(--glass-strong); border: 1px solid var(--glass-stroke);
  -webkit-backdrop-filter: blur(40px) saturate(180%); backdrop-filter: blur(40px) saturate(180%);
  box-shadow: var(--glass-edge), var(--sh3);
  transform: translateX(30px); opacity: 0; transition: transform var(--t-slow) var(--ease), opacity var(--t) var(--ease);
}
.drawer.wide { width: min(880px, calc(100vw - 24px)); }
.drawer.full { width: min(1100px, calc(100vw - 24px)); }
.drawer.in { transform: none; opacity: 1; }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px 12px; }
.drawer-head .t { flex: 1; min-width: 0; }
.drawer-head .t h2 { font: 650 20px/26px var(--sans); letter-spacing: -.01em; }
.drawer-head .t p { font-size: 13px; color: var(--muted); }
.drawer-body { flex: 1; overflow-y: auto; padding: 4px 18px 20px; overscroll-behavior: contain; }
.drawer-foot { display: flex; gap: 10px; align-items: center; padding: 12px 18px 16px; border-top: 1px solid var(--line); background: var(--glass-strong); flex-wrap: wrap; }
.drawer .card { box-shadow: none; }

.modal {
  position: fixed; left: 50%; top: 50%; z-index: 62; width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow: auto;
  transform: translate(-50%, -48%) scale(.98); opacity: 0; transition: transform var(--t) var(--ease), opacity var(--t) var(--ease);
  background: var(--surface); border-radius: 24px; box-shadow: var(--sh3); padding: 22px; border: 1px solid var(--line);
}
.modal.in { transform: translate(-50%, -50%); opacity: 1; }
.modal h2 { font: 650 19px/25px var(--sans); margin-bottom: 6px; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }

.toast-wrap { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px; font-size: 14px; font-weight: 550;
  background: var(--glass-strong); border: 1px solid var(--glass-stroke); box-shadow: var(--glass-edge), var(--sh2);
  -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  animation: toastIn var(--t) var(--ease);
}
.toast .tint { width: 26px; height: 26px; border-radius: 50%; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- assistant (wizard) ---------- */
.wizard-steps { display: flex; gap: 6px; padding: 0 18px 10px; overflow-x: auto; scrollbar-width: none; }
.wizard-steps button { flex: 1; min-width: 92px; border: 0; background: transparent; text-align: left; padding: 0; }
.wizard-steps button i { display: block; height: 4px; border-radius: 99px; background: var(--subtle-2); margin-bottom: 6px; }
.wizard-steps button.done i { background: var(--forest); }
.wizard-steps button.cur i { background: var(--champ); }
.wizard-steps button span { font-size: 12px; font-weight: 600; color: var(--muted); }
.wizard-steps button.cur span { color: var(--ink); }

.check-list { display: flex; flex-direction: column; gap: 8px; }
.check-item { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--subtle); font-size: 14px; }
.check-item .tint { width: 26px; height: 26px; border-radius: 8px; }
.check-item b { display: block; font-weight: 600; }
.check-item p { font-size: 13px; color: var(--muted); }

/* ---------- signature ---------- */
.sig-pad { position: relative; border: 1.5px dashed var(--line); border-radius: 16px; background: var(--surface); height: 160px; touch-action: none; }
.sig-pad canvas { width: 100%; height: 100%; display: block; border-radius: 16px; cursor: crosshair; }
.sig-pad .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); pointer-events: none; font-size: 13px; }
.sig-img { height: 60px; object-fit: contain; }

/* ---------- photos EDL ---------- */
.photos { display: flex; gap: 8px; flex-wrap: wrap; }
.photos .p { position: relative; width: 72px; height: 72px; border-radius: 12px; overflow: hidden; background: var(--subtle); }
.photos .p img { width: 100%; height: 100%; object-fit: cover; }
.photos .p button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; }
.photos .add { width: 72px; height: 72px; border-radius: 12px; border: 1.5px dashed var(--line); display: grid; place-items: center; color: var(--muted); cursor: pointer; background: transparent; position: relative; }
.photos .add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.room-nav { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.room-nav::-webkit-scrollbar { display: none; }
.edl-item { padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.edl-item .prev { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.edl-item.worse { border-color: color-mix(in srgb, var(--bad-fill) 45%, var(--line)); }

/* ---------- document (aperçu papier) ---------- */
.paper-wrap { background: var(--subtle); border-radius: 18px; padding: 18px; }
.paper {
  background: #fff; color: #111; max-width: 794px; margin: 0 auto; padding: 56px 60px; border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 8px 30px rgba(0,0,0,.08);
  font: 400 12.5px/1.6 Georgia, "Times New Roman", serif;
}
.paper[contenteditable="true"] { outline: 2px dashed var(--champ); outline-offset: 4px; }
.paper h1 { font: 700 20px/1.3 var(--sans); text-align: center; margin: 0 0 4px; letter-spacing: -.01em; color: #1F3D2E; }
.paper .doc-sub { text-align: center; font: 500 12px/1.4 var(--sans); color: #5B6B80; margin-bottom: 24px; }
.paper h2 { font: 700 13.5px/1.4 var(--sans); margin: 22px 0 8px; padding-bottom: 4px; border-bottom: 1.5px solid #1F3D2E; color: #1F3D2E; text-transform: uppercase; letter-spacing: .03em; }
.paper h3 { font: 650 12.5px/1.4 var(--sans); margin: 14px 0 4px; }
.paper p { margin: 0 0 8px; }
.paper table { width: 100%; border-collapse: collapse; margin: 8px 0 12px; font: 400 11.5px/1.45 var(--sans); }
.paper th, .paper td { border: 1px solid #DDD; padding: 6px 8px; text-align: left; vertical-align: top; }
.paper th { background: #F3F1EC; font-weight: 650; }
.paper td.r, .paper th.r { text-align: right; }
.paper .doc-head { display: flex; justify-content: space-between; gap: 24px; margin-bottom: 28px; font: 400 12px/1.5 var(--sans); }
.paper .doc-head .to { text-align: left; margin-left: auto; min-width: 220px; }
.paper .total { font-weight: 700; background: #F7EEDB; }
.paper .sigs { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; margin-top: 26px; }
.paper .sig { border: 1px solid #DDD; border-radius: 6px; padding: 10px; min-height: 110px; font: 400 11px/1.4 var(--sans); }
.paper .sig img { height: 60px; object-fit: contain; margin-top: 6px; }
.paper .note { font: 400 10.5px/1.5 var(--sans); color: #5B6B80; border-top: 1px solid #ECE9E2; margin-top: 26px; padding-top: 10px; }
.paper .box { border: 1px solid #DDD; border-radius: 6px; padding: 10px 12px; margin: 8px 0; }
.paper .photos-doc { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.paper .photos-doc img { width: 70px; height: 52px; object-fit: cover; border-radius: 3px; }
.paper .stamp { display: inline-block; font: 600 10px/1 var(--sans); padding: 4px 8px; border-radius: 99px; background: #E3F7EA; color: #15803D; }
.paper .draft { display: inline-block; font: 600 10px/1 var(--sans); padding: 4px 8px; border-radius: 99px; background: #FEF3D7; color: #B45309; }

#print-root { display: none; }
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff !important; }
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block !important; }
  #print-root .paper { box-shadow: none; padding: 0; max-width: none; border-radius: 0; font-size: 11.5px; }
  #print-root .paper h2 { break-after: avoid; }
  #print-root .paper table, #print-root .paper .sig { break-inside: avoid; }
}

/* ---------- divers ---------- */
.kbd { font: 600 11px/1 var(--sans); padding: 3px 6px; border-radius: 6px; background: var(--subtle); border: 1px solid var(--line); color: var(--muted); }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-weight: 550; }
.pill-count { font-size: 12px; color: var(--muted); font-weight: 500; }
.score { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; }
.score-ring { --p: 50; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700;
  background: conic-gradient(var(--c, var(--forest)) calc(var(--p) * 1%), var(--subtle-2) 0); position: relative; flex: none; }
.score-ring::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--surface); }
.score-ring span { position: relative; }
.demo-banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--champ-bg); color: var(--champ-ink); font-size: 13px; margin-bottom: 18px; }
.demo-banner .btn { margin-left: auto; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .cols-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .gnav .vol { padding: 8px 9px; font-size: 13.5px; }
  .gnav .me span.nm { display: none; }
}
@media (max-width: 900px) {
  .cols-3 { grid-template-columns: 1fr; }
  .cols-2 { grid-template-columns: 1fr; }
  .gnav .vols { display: none; }
  .gnav .burger { display: grid; }
  .gnav .logo { margin-right: auto; }
  .lnav .links { margin-left: 0; }
  .lnav-in { gap: 10px; }
}
@media (max-width: 760px) {
  .main { padding: 18px 14px 60px; }
  .gnav-in, .lnav-in { padding: 0 12px; }
  .lnav .ltitle { display: none; }
  .large-title { font-size: 30px; line-height: 36px; }
  .cols-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .fgrid, .fgrid.c3 { grid-template-columns: 1fr; }
  .drawer, .drawer.wide, .drawer.full { top: 0; right: 0; bottom: 0; width: 100vw; border-radius: 0; }
  .prop-hero { height: 260px; border-radius: 24px; }
  .title-card { margin: -56px 10px 0; }
  .paper { padding: 28px 22px; }
  .paper-wrap { padding: 8px; }
  .prop-card .ph { width: 104px; height: 88px; }
  .hero-amount { font-size: 34px; }
  .search { max-width: none; min-width: 0; }
  .hide-m { display: none !important; }
  .page-head .btn { height: 40px; }
  .gnav .tool.hide-s { display: none; }
}
@media (min-width: 761px) { .show-m { display: none !important; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .gnav, .lnav, .card, .tile, .chip, .pane, .drawer, .seg, .toast, .search, .icon-btn.glass { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--surface); }
}

/* ---------- v2 : import, livraison, régularisation, guide ---------- */
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 38px 20px; border-radius: 26px; cursor: pointer;
  border: 2px dashed color-mix(in srgb, var(--forest) 35%, transparent); background: var(--glass); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); transition: background var(--t), border-color var(--t), transform var(--t); }
.dropzone:hover, .dropzone.over { background: var(--glass-strong); border-color: var(--forest); transform: scale(1.005); }
.dropzone .dz-ic { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; color: var(--forest); background: var(--forest-soft); margin-bottom: 6px; }
.dropzone b { font-size: 17px; }
.deliver-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--subtle); }
.deliver-row .tint { width: 32px; height: 32px; border-radius: 10px; }
.paper .cert { margin-top: 22px; border: 1px solid #C9D6CD; background: #F3F7F4; border-radius: 6px; padding: 10px 12px; font: 400 10.5px/1.5 var(--sans); }
.paper .cert table { font-size: 10.5px; margin: 6px 0; }
.paper .cert code { font-size: 9.5px; word-break: break-all; }
.paper .cb { font-family: var(--sans); }
.paper ul { margin: 6px 0 0 18px; padding: 0; font: 400 11px/1.5 var(--sans); }
.paper .imported { font: 400 13px/1.6 var(--sans); color: #475569; text-align: center; padding: 40px 0; }
.paper .regul-head { font: 700 14px/1 var(--sans); color: #4A78A0; letter-spacing: .04em; border-top: 3px solid #4A78A0; padding-top: 12px; margin-bottom: 30px; }
.paper .regul-grid { display: grid; grid-template-columns: 170px 1fr; gap: 24px; font: 400 12px/1.6 var(--sans); }
.paper .regul-title { font: 400 17px/1.2 var(--sans); color: #333; margin-bottom: 18px; letter-spacing: .02em; }
.paper .regul-accent { color: #4A78A0; font-weight: 600; margin-bottom: 8px; }
.paper .regul-table th { background: #4A78A0; color: #fff; border-color: #4A78A0; }
.paper .regul-table td { border-left: 0; border-right: 1px dashed #ccc; border-bottom: 1px dashed #ccc; border-top: 0; }
.paper .regul-table .prov { background: #D4E5C4; font-weight: 600; }
.paper .regul-table .due { background: #F1A592; font-weight: 700; }
.paper .regul-table .back { background: #D4E5C4; font-weight: 700; }
.pdf-paper { box-shadow: none !important; border-radius: 0 !important; }
.guide-hero { position: relative; border-radius: 30px; overflow: hidden; min-height: 300px; color: #fff; display: flex; align-items: flex-end; box-shadow: var(--sh2); isolation: isolate; }
.guide-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.guide-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.55)); }
.guide-hero .in { padding: 30px; max-width: 640px; }
.guide-hero .appicon { width: 88px; height: 88px; border-radius: 22px; box-shadow: 0 10px 30px rgba(0,0,0,.25); margin-bottom: 16px; }
.guide-hero h1 { font: 700 44px/1.05 var(--sans); letter-spacing: -.03em; }
.guide-hero p { font-size: 17px; opacity: .92; margin-top: 8px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tags span { padding: 7px 16px; border-radius: 999px; font-size: 13px; background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.4); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.gstep { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 18px; }
.gstep .n { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--subtle-2); flex: none; }
.gstep.done .n { background: var(--ok-fill); color: #fff; }
.acc { border-radius: 20px; overflow: hidden; }
.acc details { border-bottom: 1px solid var(--line); }
.acc details:last-child { border-bottom: 0; }
.acc summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 16px 18px; font-weight: 600; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "+"; margin-left: auto; font-size: 20px; color: var(--muted); transition: transform var(--t); }
.acc details[open] summary::after { transform: rotate(45deg); }
.acc .ans { padding: 0 18px 18px 62px; font-size: 14.5px; color: var(--ink); }
.acc .ans p { margin-bottom: 8px; } .acc .ans ol, .acc .ans ul { margin: 6px 0 8px 18px; padding: 0; } .acc .ans li { margin: 3px 0; }
.bld-card { overflow: hidden; }
.bld-card .ph { height: 110px; position: relative; }
.bld-card .ph .ph-fallback { height: 100%; }
.bld-card .ph img { width: 100%; height: 100%; object-fit: cover; }
.bld-card .ph .ph-change { position: absolute; right: 12px; bottom: 12px; background: rgba(255,255,255,.92); color: #1f2a22; border-color: transparent; }
.bld-card .ph .ph-illu { position: absolute; left: 12px; bottom: 12px; height: 26px; }
.lots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.lot { padding: 10px 12px; border-radius: 14px; background: var(--subtle); font-size: 13px; }
.lot b { display: block; font-size: 14px; }
.sig-pad.big { height: 220px; }
.mention-box { padding: 12px 14px; border-radius: 14px; background: var(--subtle); font-size: 14px; font-style: italic; }
.who-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--glass-stroke); background: var(--glass-strong); cursor: pointer; font-weight: 600; }
.who-chip.on { background: var(--forest); color: var(--forest-ink); }
.side-by-side { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 760px) { .side-by-side { grid-template-columns: 1fr; } }
.state-seg.six { grid-template-columns: repeat(6, 1fr); }
.state-seg button.on[data-v="Très bon"] { background: var(--ok-bg); color: var(--ok); }
.state-seg button.on[data-v="Moyen"] { background: var(--warn-bg); color: var(--warn); }
.state-seg button.on[data-v="Mauvais"] { background: var(--bad-bg); color: var(--bad); }
.state-seg button.on[data-v="Non applicable"] { background: var(--neutral-bg); color: var(--neutral); }
.paper .pb { break-before: page; page-break-before: always; height: 0; }
@media (max-width: 560px) { .state-seg.six { grid-template-columns: repeat(3, 1fr); } }

/* =========================================================
   v3 — style « Ivoire » (sans fond photo), menu en haut ou à gauche,
   sous-parties en onglets sous le titre
   ========================================================= */
:root {
  --canvas: #F7F5F0; --card-glass: #FFFFFF; --glass: #FFFFFF; --glass-strong: #FFFFFF; --glass-stroke: #ECE8DF;
  --nav-glass: rgba(247,245,240,.86); --hover-glass: rgba(31,61,46,.06); --pane-bg: #EFECE4; --line: #ECE8DF;
  --sh1: 0 1px 2px rgba(40,30,10,.04), 0 6px 20px rgba(40,30,10,.06); --sh2: 0 2px 6px rgba(40,30,10,.05), 0 16px 40px rgba(40,30,10,.09);
  --glass-edge: 0 0 0 0 transparent;
}
:root[data-theme="dark"] {
  --canvas: #0F1311; --card-glass: #181D1A; --glass: #1E2421; --glass-strong: #222925; --glass-stroke: #262D29;
  --nav-glass: rgba(15,19,17,.86); --hover-glass: rgba(255,255,255,.06); --pane-bg: #141916; --line: #262D29;
  --sh1: 0 1px 2px rgba(0,0,0,.3); --sh2: 0 12px 36px rgba(0,0,0,.45);
}
body { background: var(--canvas); }
.bg { display: none !important; }
.card, .tile, .chip, .seg, .search, .btn, .icon-btn.glass { -webkit-backdrop-filter: none; backdrop-filter: none; }
.card { border-color: transparent; box-shadow: var(--sh1); }
:root[data-theme="dark"] .card { border-color: var(--line); box-shadow: none; }
.tile { border-color: transparent; box-shadow: var(--sh1); }
.pane { background: var(--pane-bg); border-color: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.pane .card { box-shadow: var(--sh1); }
.seg { background: var(--pane-bg); border-color: transparent; }
.chip { box-shadow: none; border-color: var(--line); }
.btn { box-shadow: none; border-color: var(--line); }
.btn.primary { box-shadow: 0 4px 14px rgba(31,61,46,.18); }
.drawer { background: var(--canvas); -webkit-backdrop-filter: none; backdrop-filter: none; border-color: var(--line); }
.drawer-foot { background: var(--canvas); }
.title-card.pane { background: var(--card-glass); box-shadow: var(--sh2); }
.gnav { background: var(--nav-glass); border-bottom-color: var(--line); }
.gnav .vol.on { background: var(--forest-soft); color: var(--forest); box-shadow: none; }
.vcount { display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 5px; margin-left: 5px; border-radius: 99px; font-size: 10.5px; font-weight: 700; background: var(--info-bg); color: var(--info); vertical-align: 1px; }
.vcount.bad { background: var(--bad-bg); color: var(--bad); }
.gnav .tool .sync-dot { position: absolute; right: 6px; bottom: 7px; width: 7px; height: 7px; border: 1.5px solid var(--canvas); }
.lnav { display: none !important; }
.main { padding-top: 30px; }

/* sous-parties : onglets soulignés sous le titre (option A) */
.ptabs { display: flex; gap: 26px; border-bottom: 1px solid var(--line); margin: -6px 0 22px; overflow-x: auto; scrollbar-width: none; }
.ptabs::-webkit-scrollbar { display: none; }
.ptabs a { position: relative; padding: 8px 0 12px; font-size: 15px; font-weight: 550; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; }
.ptabs a:hover { color: var(--ink); }
.ptabs a.on { color: var(--ink); font-weight: 650; }
.ptabs a.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2.5px; border-radius: 2px; background: var(--ink); }
.ptabs .cnt { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 99px; background: var(--bad-bg); color: var(--bad); font-size: 11px; font-weight: 700; }

/* menu à gauche (même pages, mêmes onglets) */
.snav { position: fixed; top: 0; bottom: 0; left: 0; width: 240px; z-index: 40; display: flex; flex-direction: column; gap: 2px; padding: 18px 12px 16px; background: var(--nav-glass); border-right: 1px solid var(--line); -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%); overflow-y: auto; }
.snav .logo { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; color: var(--ink); padding: 4px 8px 18px; }
.snav .logo img { width: 42px; height: 42px; display: block; filter: drop-shadow(0 2px 6px rgba(90,64,20,.28)); }
.snav .logo span { font: 700 21px/1 var(--sans); letter-spacing: -.02em; }
.snav-vols, .snav-foot { display: flex; flex-direction: column; gap: 2px; }
.snav-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.sv { position: relative; display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border: 0; border-radius: 11px; background: transparent; color: var(--ink); font-size: 14.5px; font-weight: 500; text-align: left; }
.sv:hover { background: var(--hover-glass); }
.sv.on { background: var(--forest-soft); color: var(--forest); font-weight: 650; }
.sv .vcount { margin-left: auto; }
.sv .sync-dot { margin-left: auto; }
.shell.is-left .main { margin-left: 240px; }
.gnav.mobile-only { display: none; }
@media (max-width: 900px) {
  .snav { display: none; }
  .shell.is-left .main { margin-left: 0; }
  .gnav.mobile-only { display: block; }
  .gnav.mobile-only .logo { margin-right: auto; }
}
@media (max-width: 760px) { .ptabs { gap: 20px; } .ptabs a { font-size: 14px; } }
.radio-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); cursor: pointer; transition: background var(--t-fast), border-color var(--t-fast); }
.radio-row input { accent-color: var(--forest); margin-top: 3px; width: 18px; height: 18px; flex: none; }
.radio-row b { display: block; font-weight: 600; }
.radio-row:has(input:checked) { border-color: var(--forest); background: var(--forest-soft); }
/* ajout DossierFacile : logement puis fichier */
.df-card { margin-bottom: 22px; }
.pchips { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.pchip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); text-align: left; transition: border-color var(--t-fast), background var(--t-fast); }
.pchip:hover { border-color: color-mix(in srgb, var(--forest) 40%, var(--line)); }
.pchip.on { border-color: var(--forest); background: var(--forest-soft); }
.pchip .pph { width: 54px; height: 44px; border-radius: 10px; overflow: hidden; flex: none; background: var(--subtle); }
.pchip .pph img { width: 100%; height: 100%; object-fit: cover; }
.pchip .pt { flex: 1; min-width: 0; } .pchip .pt b { display: block; font-size: 14px; } .pchip .pt span { font-size: 12px; color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pchip > svg { color: var(--forest); }
.how-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.how-tile { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); text-align: left; transition: border-color var(--t-fast), background var(--t-fast); }
.how-tile:hover { border-color: color-mix(in srgb, var(--forest) 40%, var(--line)); }
.how-tile.on { border-color: var(--forest); background: var(--forest-soft); }
.how-tile .ht { flex: 1; min-width: 0; } .how-tile .ht b { display: block; font-size: 15px; } .how-tile .ht span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
@media (max-width: 560px) { .how-row { grid-template-columns: minmax(0, 1fr); } }
.df-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; }
.df-drop { padding: 26px 16px; border-radius: 20px; background: var(--subtle); }
.df-link { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 20px; border: 1px solid var(--line); }
@media (max-width: 760px) { .df-row { grid-template-columns: minmax(0, 1fr); } }

/* =========================================================
   v3.1 — Ivoire (clair) + Graphite (sombre), couleurs d'état : palette C (olive, terre cuite, ocre)
   ========================================================= */
:root {
  --ok: #53702A; --ok-bg: #EDF1E0; --ok-fill: #93AE5E;
  --warn: #86641A; --warn-bg: #F5EDD8; --warn-fill: #D6A94A;
  --bad: #A0553A; --bad-bg: #F6E8E0; --bad-fill: #D98A66;
}
:root[data-theme="dark"] {
  --canvas: #0F1311; --surface: #181D1A; --subtle: #1E2421; --subtle-2: #262D29; --card-glass: #181D1A;
  --ink: #EEF0EC; --muted: #98A29B; --faint: #7A847D; --line: #262D29;
  --forest: #D9B878; --forest-h: #E6CA92; --forest-ink: #1A1408; --forest-soft: #2A2519;
  --champ: #D9B878; --champ-bg: #2E281C; --champ-ink: #E8CC8F;
  --ok: #BCD38E; --ok-bg: #252D16; --ok-fill: #93AE5E;
  --warn: #E8C98A; --warn-bg: #342913; --warn-fill: #D6A94A;
  --bad: #EEB295; --bad-bg: #3A2319; --bad-fill: #D98A66;
}
:root[data-theme="dark"] .btn.primary { box-shadow: none; }

/* barre de bascule Mac ↔ iPad (synchro iCloud sans lien direct) */
.sync-bar { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: min(620px, calc(100% - 24px)); display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; border-radius: 20px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--sh2); animation: sb-in .35s ease both; }
.sync-bar .sb-t { flex: 1; min-width: 0; } .sync-bar .sb-t b { display: block; font-size: 14px; } .sync-bar .sb-t span { display: block; font-size: 12.5px; color: var(--muted); }
.sync-bar .btn { flex: none; }
@keyframes sb-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .sync-bar { animation: none; } }

/* avenant : cases « ce qui change » */
.av-list { display: flex; flex-direction: column; gap: 8px; }
.av-item { border: 1.5px solid var(--line); border-radius: 16px; background: var(--surface); transition: border-color var(--t-fast); }
.av-item.on { border-color: var(--forest); }
.av-item .av-head { padding: 12px 14px; margin: 0; }
.av-item .av-body { padding: 0 14px 14px; }
.av-item .av-body[hidden] { display: none; }

/* signature : toujours sur papier blanc, lisible en clair comme en sombre */
.sig-pad { background: #FFFFFF; border-color: #D9D4C7; }
.sig-pad .ph { color: #8A877E; }
.sig-img-wrap { display: inline-flex; padding: 6px 12px; border-radius: 12px; background: #FFFFFF; border: 1px solid #E6E1D6; }

/* description de l'annonce : grande zone qui s'agrandit avec le texte */
.field textarea.desc-area { min-height: 220px; field-sizing: content; max-height: 60vh; resize: vertical; line-height: 1.55; }

/* choix en un clic (candidat retenu…) */
.choice-list { display: flex; flex-direction: column; gap: 8px; }
.choice-tile { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast); }
.choice-tile:hover, .choice-tile:focus-visible { border-color: var(--forest); background: var(--forest-soft); }
.choice-tile.main { border-color: color-mix(in srgb, var(--forest) 45%, var(--line)); }
.choice-tile .ct { flex: 1; min-width: 0; } .choice-tile .ct b { display: block; font-size: 15px; } .choice-tile .ct span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.choice-tile > svg:last-child { color: var(--faint); flex: none; }

/* fiche logement : DPE et équipements */
.dpe-box { padding: 14px; border-radius: 18px; background: var(--subtle); margin-bottom: 16px; }
.dpe-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 10px; align-items: stretch; }
.dpe-drop { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; text-align: left; }
.dpe-drop > span { display: flex; flex-direction: column; }
.dpe-num { display: flex; gap: 8px; align-items: center; } .dpe-num .input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .04em; }
@media (max-width: 640px) { .dpe-row { grid-template-columns: minmax(0, 1fr); } }
.field .just-filled, .input.just-filled { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok-fill) 45%, transparent); transition: box-shadow .4s; }
.equip-cat { margin-bottom: 16px; } .equip-cat h3 { margin: 0 0 8px; }
.equip-cat .equip-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 12px; cursor: pointer; }
.equip-row:hover { background: var(--subtle); }
.equip-row .en { flex: 1; min-width: 0; color: var(--muted); } .equip-row.on .en { color: var(--ink); font-weight: 550; }
.equip-row .eq-qty { width: 72px; min-height: 34px; padding: 4px 8px; text-align: center; }

/* ---------- v3.2 : suppressions, bail existant, rentabilité ---------- */
ul.loss { margin: 6px 0 10px; padding-left: 18px; color: var(--ink); }
ul.loss li { margin: 3px 0; line-height: 1.4; }
ul.loss.keep { color: var(--muted); }
.chip .chip-x { border: 0; background: transparent; color: inherit; margin-left: 4px; padding: 0; display: inline-grid; place-items: center; cursor: pointer; opacity: .6; }
.chip .chip-x:hover { opacity: 1; }
.verdict.ok { box-shadow: inset 4px 0 0 var(--ok); }
.verdict.warn { box-shadow: inset 4px 0 0 var(--warn); }
.metric-inline { text-align: right; }
.ok-t { color: var(--ok); }
.bad-t { color: var(--bad); }
ul.loss li.sub { margin-left: 18px; list-style: circle; }
[hidden] { display: none !important; }

/* ---------- v3.3 : signature à distance ---------- */
.rsteps { display: flex; gap: 6px; flex-wrap: wrap; }
.rstep { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line); }
.rstep.on { background: var(--forest); color: var(--forest-ink); border-color: transparent; }
.rstep.done { color: var(--ok); border-color: transparent; background: var(--subtle); }

/* ---------- v3.4 : retours iPad ---------- */
/* champs date et heure : même taille que les autres champs sur iPad (sinon ils débordent et se centrent) */
.field input[type=date], .field input[type=time], .field input[type=datetime-local], input.input[type=date] {
  -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; text-align: left; line-height: 22px;
}
input[type=date]::-webkit-date-and-time-value, input[type=time]::-webkit-date-and-time-value { text-align: left; margin: 0; }
.fgrid > *, .fgrid .field { min-width: 0; }

/* EDL : l'état choisi se voit au premier coup d'œil */
.state-seg { background: var(--subtle); border: 1px solid var(--line); }
.state-seg button { color: var(--ink); opacity: .72; transition: background var(--t-fast), color var(--t-fast); }
.state-seg button:hover { opacity: 1; background: var(--hover-glass); }
.state-seg button.on { opacity: 1; color: #fff !important; font-weight: 700; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.state-seg button.on[data-v="Neuf"] { background: #2563EB; }
.state-seg button.on[data-v="Très bon"] { background: #15803D; }
.state-seg button.on[data-v="Bon"] { background: #65A30D; }
.state-seg button.on[data-v="Moyen"] { background: #D97706; }
.state-seg button.on[data-v="Mauvais"] { background: #DC2626; }
.state-seg button.on[data-v="Non applicable"] { background: #475569; }
.state-seg button.on::before { content: "✓ "; }

/* EDL : retirer un élément qui ne concerne pas ce logement */
.edl-item { position: relative; }
.edl-item .edl-hide { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--muted); display: grid; place-items: center; cursor: pointer; font-size: 18px; line-height: 1; }
.edl-item .edl-hide:hover { color: var(--bad); border-color: var(--bad); }
.edl-item .hstack:first-child, .edl-item > b:first-child { padding-right: 40px; }
.edl-hidden-note { font-size: 13px; color: var(--muted); }
.edl-hidden-note button { border: 0; background: none; color: var(--forest); font-weight: 600; cursor: pointer; padding: 0; }

/* photos : un toucher ouvre la photo en grand */
.photos .p img, .paper .ph-card img, .lightbox-able { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; padding: 24px; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.lightbox .lb-x, .lightbox .lb-p, .lightbox .lb-n { position: absolute; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lightbox .lb-x { top: 18px; right: 18px; } .lightbox .lb-p { left: 18px; top: 50%; } .lightbox .lb-n { right: 18px; top: 50%; }
.lightbox .lb-c { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: #fff; font-size: 14px; opacity: .85; }

/* PDF de l'EDL : renvoi aux photos et planche en grand */
.paper .ph-ref { font: 600 10.5px/1.4 var(--sans); color: #1F3D2E; margin-top: 3px; }
.paper .ph-plate { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.paper .ph-card { margin: 0; border: 1px solid #DDD; border-radius: 6px; padding: 6px; background: #fff; }
.paper .ph-card img { display: block; width: 100%; height: 300px; object-fit: contain; background: #F3F1EC; border-radius: 4px; }
.paper .ph-card figcaption { font: 400 10.5px/1.4 var(--sans); padding: 6px 2px 0; color: #333; }
.mail-row { padding: 10px 12px; border-radius: 12px; background: var(--subtle); display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
/* rappel de synchronisation : discret, dans la colonne de gauche */
.sync-side { margin: 10px 4px 0; padding: 10px 12px; border-radius: 14px; background: var(--subtle); border: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.sync-side .ss-h { display: flex; align-items: center; gap: 6px; color: var(--ink); }
.sync-side .ss-h b { flex: 1; font-weight: 600; }
.sync-side .ss-x { border: 0; background: none; color: var(--muted); padding: 2px; cursor: pointer; display: grid; place-items: center; }
.sync-side .ss-btn { display: block; width: 100%; margin-top: 8px; padding: 7px 10px; border-radius: 10px; border: 0; background: var(--forest); color: var(--forest-ink); font-size: 12.5px; font-weight: 600; text-align: center; cursor: pointer; }
.sync-side.floating { position: fixed; left: 16px; bottom: 16px; z-index: 45; width: 220px; margin: 0; box-shadow: var(--sh2); background: var(--surface); }
/* textes longs : sauts de ligne, « Lire la suite » */
.more-text .mt-body { white-space: pre-line; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.more-text.folded .mt-body { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--lines, 8); overflow: hidden; }
.more-text .mt-btn { border: 0; background: none; padding: 4px 0 0; color: var(--forest); font-weight: 600; font-size: 13.5px; cursor: pointer; }
.kv dd.kv-long { text-align: left; }
.kv dd.kv-long .mt-body { font-size: inherit; }
/* photo du logement : la photo entière au centre, les bords prolongés par la même photo estompée */
.prop-hero > img:not(.ph-fill) { position: relative; z-index: 1; object-fit: contain; }
.prop-hero .ph-fill { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); object-fit: cover; filter: blur(28px) saturate(1.1) brightness(.92); transform: scale(1.08); z-index: 0; }
.prop-hero .tl, .prop-hero .tr { z-index: 2; }
.prop-hero { height: 380px; }
.prop-hero > img:not(.ph-fill) { height: calc(100% - 64px); }
@media (max-width: 760px) { .prop-hero { height: 300px; } .prop-hero > img:not(.ph-fill) { height: calc(100% - 56px); } }
.appdoc-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 14px; }
.appdoc-view { border-radius: 12px; overflow: hidden; background: var(--subtle); border: 1px solid var(--line); max-height: 62vh; display: flex; justify-content: center; }
.appdoc-view img { max-width: 100%; max-height: 62vh; object-fit: contain; }
.appdoc-view iframe { width: 100%; height: 62vh; border: 0; background: #fff; }
/* annexes / équipements : choix à cocher + « autres » */
.chip-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 10px; }
.chip-pick .cp { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--subtle); color: var(--ink); font-size: 14px; cursor: pointer; transition: background var(--t-fast), border-color var(--t-fast); user-select: none; }
.chip-pick .cp input { position: absolute; opacity: 0; pointer-events: none; }
.chip-pick .cp.on { background: var(--forest-soft); border-color: var(--forest); color: var(--forest); font-weight: 600; }
.chip-pick .cp.on::before { content: "✓ "; margin-right: 4px; }
.photo-tips { padding: 12px 14px; border-radius: 14px; background: var(--subtle); font-size: 13.5px; color: var(--muted); }
.photo-tips b:first-child { color: var(--ink); }
.photo-tips ul { margin: 8px 0 0; padding-left: 18px; } .photo-tips li { margin: 4px 0; line-height: 1.45; }
.choice-tile.disabled { opacity: .45; cursor: not-allowed; filter: grayscale(1); }
.choice-tile.disabled:hover { border-color: var(--line); background: var(--surface); }

/* import de documents en grand (panneau « + Document ») */
.import-big .dropzone { min-height: 280px; gap: 10px; padding: 48px 24px; border-radius: 30px; }
.import-big .dropzone .dz-ic { width: 88px; height: 88px; border-radius: 26px; margin-bottom: 10px; }
.import-big .dropzone .dz-ic svg { width: 40px; height: 40px; }
.import-big .dropzone b { font-size: 24px; letter-spacing: -.01em; }
.import-big .dropzone .small { font-size: 15.5px; }
.import-big .section-head h2 { font-size: 20px; }
.import-big .import-job { padding: 22px 24px; border-radius: 22px; }
.import-big .import-job > .hstack:first-child { gap: 16px; }
.import-big .import-job .tint { width: 52px; height: 52px; border-radius: 16px; }
.import-big .import-job .tint svg { width: 26px; height: 26px; }
.import-big .import-job b.ellipsis { font-size: 19px; }
.import-big .import-job .xs { font-size: 14px; }
.import-big .import-job .badge { font-size: 14px; padding: 6px 12px; }
.import-big .import-job select.input { min-height: 46px !important; font-size: 16px; padding: 8px 14px !important; }
.import-big .import-job .field > label { font-size: 14.5px; }
.import-big .import-job .btn.primary { min-height: 50px; padding: 0 26px; font-size: 16px; }
.job-done { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 18px; background: var(--ok-bg); color: var(--ok); }
.job-done > svg { width: 28px; height: 28px; flex: none; }
.job-done .jd-t { flex: 1; font-size: 16.5px; font-weight: 600; line-height: 1.35; }
.job-done .btn { min-height: 46px; }

/* sélecteur de date */
input.dp-input { cursor: pointer; }
.dpick { position: fixed; z-index: 100000; padding: 12px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh3, 0 24px 64px rgba(0,0,0,.4)); color: var(--ink); }
.dpick .dp-top { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.dpick .dp-nav { flex: none; width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--subtle); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.dpick select { flex: 1; min-width: 0; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--subtle); color: var(--ink); padding: 0 8px; font-size: 15px; text-transform: capitalize; }
.dpick .dp-y { flex: .8; }
.dpick .dp-wk, .dpick .dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.dpick .dp-wk span { font-size: 11.5px; color: var(--muted); padding: 4px 0; }
.dpick .dp-d { height: 40px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); font-size: 15px; cursor: pointer; }
.dpick .dp-d:hover { background: var(--hover-glass); }
.dpick .dp-d.now { box-shadow: inset 0 0 0 1.5px var(--forest); }
.dpick .dp-d.sel { background: var(--forest); color: var(--forest-ink); font-weight: 700; }
.dpick .dp-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.dpick .dp-type { flex: 1; min-width: 0; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--subtle); color: var(--ink); padding: 0 12px; font-size: 15px; }
.dpick .dp-type.bad { border-color: var(--bad); }
.year-strip button { min-width: 64px; }
.year-strip button:last-child { padding: 0 16px; }
@media (max-width: 760px) { .year-strip { flex-wrap: wrap; } }
.exp-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.exp-filters .seg { margin: 0; }
.exp-filters .seg .n { opacity: .6; margin-left: 4px; font-weight: 500; }
.exp-filters .exp-sel { width: auto; min-width: 190px; max-width: 280px; min-height: 42px; padding: 6px 12px; border-radius: 999px; }
.df-msg { padding: 12px 14px; border-radius: 14px; background: var(--subtle); font-size: 14px; }
.df-msg p { margin: 6px 0 0; line-height: 1.5; color: var(--muted); }
.df-person { padding: 12px 14px; border-radius: 14px; background: var(--subtle); }
.mail-pick-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--subtle); }
.mail-pick-row.off { opacity: .6; }
.mail-pick-row .mp { padding: 6px 4px; }
.avatar-pair { display: inline-flex; flex: none; } .avatar-pair .avatar:nth-child(2) { margin-left: -12px; box-shadow: 0 0 0 2px var(--card-glass, var(--surface)); }
.fiche-row[hidden] { display: none !important; }
.check-item.has-fix { align-items: flex-start; }
.check-item .fx-form { margin-top: 10px; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.check-item .fx-sub + .fx-sub { margin-top: 10px; }
.check-item .fx-form .fgrid { gap: 10px; }

/* ---------- accueil : lisibilité et hiérarchie ---------- */
.eyebrow { text-transform: none; }
.eyebrow::first-letter { text-transform: uppercase; }
.hero-card::before { background: linear-gradient(180deg, rgba(10,20,15,.5) 0%, rgba(10,20,15,.22) 40%, rgba(10,20,15,.74) 100%); }
.glass-tile { background: rgba(14,26,20,.46); border-color: rgba(255,255,255,.2); }
.glass-tile span { opacity: .82; }
.glass-tile.champ { background: rgba(212,176,106,.86); color: #1E180B; border-color: rgba(255,255,255,.4); }
.bar.on-photo .ok { background: var(--champ); }
.row .title-l.clamp2, .row .sub-l.clamp2 { white-space: normal; }
.pane .stack { gap: 0; }
.pane .stack > .card.pad-sm { background: transparent; box-shadow: none; border: 0; border-radius: 0 !important; padding: 14px 2px; border-top: 1px solid var(--line); -webkit-backdrop-filter: none; backdrop-filter: none; }
.pane .stack > .card.pad-sm:first-child { border-top: 0; padding-top: 4px; }
.pane .stack > .card.pad-sm.interactive:hover { background: transparent; }
.pane .stack .steps i:not(.done):not(.cur) { background: rgba(20,32,26,.14); }
:root[data-theme="dark"] .pane .stack .steps i:not(.done):not(.cur) { background: rgba(255,255,255,.14); }

/* ---------- bibliothèque de photos ---------- */
.lib-cats { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; scrollbar-width: none; }
/* la zone qui défile est séparée de la grille : sinon Safari écrase les lignes et les vignettes se chevauchent */
.lib-scroll { max-height: min(56vh, 520px); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); grid-auto-rows: max-content; align-content: start; gap: 10px; padding: 3px; }
.lib-ph { position: relative; display: block; width: 100%; aspect-ratio: 3 / 2; padding: 0; border: 0; border-radius: var(--r-md); overflow: hidden; background: var(--subtle); cursor: pointer; outline-offset: 2px; }
.lib-ph img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t) var(--ease); }
.lib-ph:hover img { transform: scale(1.03); }
.lib-ph.on { box-shadow: 0 0 0 3px var(--forest); }
.lib-ph .ok { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--forest); color: var(--forest-ink); }
.ph-badge { display: inline-flex; align-items: center; gap: 6px; height: 32px; align-self: center; padding: 0 12px; border-radius: 999px; background: rgba(15,23,20,.55); color: #fff; font-size: 12px; font-weight: 600; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }

/* ---------- actions d'une location ---------- */
.act-next { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: var(--r-lg); background: var(--forest-soft); }
.act-next .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.act-next .t .k { font-size: 12px; color: var(--muted); }
.act-next .t b { font-size: 15px; font-weight: 650; color: var(--ink); }
.act-next .act-go { height: 40px; padding: 0 16px; border-radius: 999px; background: var(--forest); color: var(--forest-ink); border: 0; box-shadow: 0 4px 14px rgba(31,61,46,.22); font-size: 0; gap: 0; }
.act-next .act-go svg { width: 18px; height: 18px; }
.act-next .act-go::after { content: "Ouvrir"; font-size: 14px; margin-left: 8px; }
.act-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 8px; margin-top: 12px; }
.act-grid .act-tile { justify-content: flex-start; height: 46px; padding: 0 14px; border-radius: 14px; background: var(--subtle); border: 1px solid transparent; box-shadow: none; font-size: 14px; font-weight: 600; }
.act-grid .act-tile svg { color: var(--forest); }
.act-grid .act-tile:hover { background: var(--subtle-2); filter: none; }
.act-manage { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.act-manage .act-link { height: 32px; padding: 0; background: none; border: 0; box-shadow: none; color: var(--muted); font-size: 13px; font-weight: 500; }
.act-manage .act-link:hover { color: var(--ink); background: none; }
.act-manage .act-link.danger { color: var(--bad); }
/* enregistrement impossible : bandeau rouge fixe, impossible à rater */
#save-fail { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 9999; display: flex; align-items: center; gap: 10px; max-width: min(720px, calc(100vw - 32px)); padding: 12px 14px; border-radius: 16px; background: var(--bad); color: #fff; font: 600 13px/1.4 var(--sans); box-shadow: 0 10px 30px rgba(0,0,0,.25); }
#save-fail .btn { background: #fff; color: var(--bad); border-color: transparent; flex: none; }
/* onglet Safari alors que l'app du Dock existe */
#tab-warn { position: fixed; left: 50%; top: 14px; transform: translateX(-50%); z-index: 9998; display: flex; align-items: center; gap: 12px; max-width: min(760px, calc(100vw - 32px)); padding: 12px 14px; border-radius: 16px; background: var(--warn); color: #fff; font: 500 13px/1.45 var(--sans); box-shadow: 0 10px 30px rgba(0,0,0,.25); }
#tab-warn .btn { background: #fff; color: #1f2a22; border-color: transparent; flex: none; }
/* « Joindre un document » : zone de dépôt compacte */
.dropzone.att-drop { flex-direction: row; gap: 14px; padding: 22px 20px; border-radius: 20px; text-align: left; }
.dropzone.att-drop > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dropzone.att-drop b { font-size: 15px; overflow-wrap: anywhere; }
.dropzone.att-drop.filled { border-style: solid; border-color: var(--forest); }
/* fiche logement : une carte par location (départ / en cours / arrivée) */
.lease-cards { align-items: stretch; }
.lease-card { display: flex; flex-direction: column; gap: 14px; height: 100%; }
.lease-card .lc-head { display: flex; align-items: flex-start; gap: 12px; }
.lease-card .lc-title { flex: 1; min-width: 0; }
.lease-card .lc-title .h3 { margin: 0; text-wrap: balance; }
.lease-card .lc-title p { margin: 2px 0 0; text-wrap: pretty; }
.lease-card .lc-badges { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.lease-card .lc-people { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px 0; }
.lease-card .lc-actions { margin-top: auto; }
.mini-steps { list-style: none; margin: 0; padding: 0; display: flex; }
.mini-steps li { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font: 500 12px/1.25 var(--sans); color: var(--muted); }
.mini-steps li::before { content: ""; position: absolute; top: 10px; left: calc(-50% + 14px); right: calc(50% + 14px); height: 2px; border-radius: 2px; background: color-mix(in srgb, var(--muted) 35%, transparent); }
.mini-steps li:first-child::before { display: none; }
.mini-steps li.done::before, .mini-steps li.cur::before { background: var(--forest); }
.mini-steps li i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 2px solid color-mix(in srgb, var(--muted) 55%, transparent); background: var(--surface); font-style: normal; position: relative; }
.mini-steps li.done { color: var(--ink); } .mini-steps li.done i { background: var(--forest); border-color: var(--forest); color: var(--forest-ink); }
.mini-steps li.cur { color: var(--ink); font-weight: 650; } .mini-steps li.cur i { border-color: var(--champ); box-shadow: 0 0 0 4px var(--champ-bg); }
@media (max-width: 760px) { .lease-card .lc-head { flex-wrap: wrap; } .lease-card .lc-badges { flex-direction: row; } }

/* image introuvable : masquée */
img.img-broken { visibility: hidden; }
/* immeuble : tableau des lots */
.lots-t { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.lt-row { display: grid; grid-template-columns: minmax(90px, 1fr) minmax(150px, 1.3fr) 80px minmax(110px, 1.4fr); gap: 14px; align-items: center; width: 100%; padding: 12px 16px; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; font-size: 14px; }
.lt-row.click { cursor: pointer; } .lt-row.click:hover { background: var(--subtle); }
.lt-head { border-top: 0; background: var(--subtle); font-size: 12px; font-weight: 600; color: var(--muted); padding-top: 9px; padding-bottom: 9px; }
.lt-tant { display: flex; align-items: center; gap: 4px; }
.lt-bar { flex: 1; height: 6px; border-radius: 99px; background: var(--subtle-2); margin-left: 8px; overflow: hidden; display: block; }
.lt-bar > i { display: block; height: 100%; background: var(--forest); border-radius: 99px; }
@media (max-width: 640px) { .lt-row { grid-template-columns: minmax(70px, 1fr) minmax(110px, 1.2fr) minmax(90px, 1.3fr); } .lt-surf { display: none; } }
/* inventaire : quantité seulement */
.inv-list { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); }
.inv-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--line); }
.inv-row:first-child { border-top: 0; }
.inv-row.worse { background: var(--bad-bg, #fbeaea); }
.inv-n { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; }
.inv-step { display: inline-flex; align-items: center; gap: 4px; }
.inv-step .input { width: 52px; text-align: center; padding-left: 4px; padding-right: 4px; }
.inv-note { width: 170px; }
@media (max-width: 640px) { .inv-row { flex-wrap: wrap; } .inv-note { width: 100%; order: 5; } }
/* départ / parti : bien distincts des autres états */
.badge.depart { background: var(--warn-fill); color: #fff; }
.badge.parti { background: #3D5A80; color: #fff; }
.badge.retard { background: var(--bad-fill); color: #fff; }
.badge.depart svg, .badge.parti svg, .badge.retard svg { color: #fff; }
.badge.lot { background: var(--subtle-2); color: var(--ink); }
.status-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: -4px 0 18px; }
.status-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.lm-calc { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; font-size: 17px; font-variant-numeric: tabular-nums; }
.lm-calc b { color: var(--forest); font-size: 20px; }
.bld-card > .pad { padding: 18px 20px 20px; }
.home-top { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
@media (max-width: 1000px) { .home-top { grid-template-columns: minmax(0, 1fr); } .home-top .hero-card { min-height: 0; } }
.mail-steps { margin: 8px 0 6px; padding-left: 20px; display: grid; gap: 4px; }
/* bouton nuage Mac ↔ iPad */
.cloud-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--warn-fill); flex: none; }
.gnav .tool { position: relative; }
.gnav .tool .cloud-dot { position: absolute; top: 6px; right: 6px; border: 2px solid var(--canvas); width: 10px; height: 10px; }
.snav .sv .cloud-dot { margin-left: auto; }
.sync-opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; }
.sync-opt b { display: block; }
.sync-opt.hot { border-color: var(--warn-fill); box-shadow: 0 0 0 1px var(--warn-fill) inset; }
/* EDL : sommaire et plan */
.rot90 { transform: rotate(90deg); }
.edl-plan { display: grid; gap: 8px; }
.edl-step { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 4px 6px 4px 4px; }
.edl-step.done { border-color: color-mix(in srgb, var(--ok-fill) 50%, var(--line)); background: color-mix(in srgb, var(--ok-fill) 7%, var(--surface)); }
.edl-step.part .es-ic { color: var(--warn-fill); }
.edl-step.done .es-ic { color: var(--ok-fill); }
.es-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; border: 0; background: none; color: var(--ink); padding: 10px; text-align: left; font: inherit; cursor: pointer; }
.es-ic { width: 32px; height: 32px; border-radius: 10px; background: var(--subtle); display: grid; place-items: center; flex: none; }
.es-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.es-move { display: flex; gap: 2px; }
.edl-item .prev { display: flex; align-items: center; gap: 6px; }
.same-btn { height: 30px; padding: 0 10px; }
.same-btn.on { background: var(--ok-fill); color: #fff; border-color: transparent; }
.plan-room { border: 1px solid var(--line); border-radius: 16px; padding: 12px; background: var(--surface); display: grid; gap: 10px; }
.plan-n { width: 26px; height: 26px; border-radius: 50%; background: var(--forest); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; }
.plan-room .hstack .input { flex: 1; min-width: 0; font-weight: 600; }
.plan-items { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.plan-chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: var(--subtle); color: var(--ink); border-radius: 999px; padding: 5px 10px; font-size: 13px; cursor: pointer; }
.plan-chip:hover { border-color: var(--bad-fill); }
.plan-add .input { width: 150px; min-height: 32px; padding: 4px 10px; border-radius: 999px; font-size: 13px; }
.room-nav .chip-n { font-size: 11px; opacity: .65; margin-left: 4px; font-variant-numeric: tabular-nums; }
.room-nav .chip.ok:not(.on) { color: var(--ok); }
.prop-card .pc-status { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; }
/* photo absente : vignette au nom du lot */
.ph-fallback .phf-l { font: 650 15px/1.2 var(--sans); letter-spacing: .02em; color: var(--muted); padding: 6px 12px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 70%, transparent); }
.ph-gone { background: linear-gradient(160deg, var(--subtle), var(--subtle-2)) !important; }

.today-band { margin-top: 14px; background: color-mix(in srgb, var(--forest-soft) 55%, var(--surface)); border: 1px solid color-mix(in srgb, var(--forest) 22%, var(--line)); border-radius: 18px; padding: 12px 16px; display: grid; gap: 6px; }
.tb-h { display: flex; align-items: center; gap: 8px; }
.tb-row { display: flex; align-items: center; gap: 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.tb-t { flex: 1; min-width: 0; display: flex; flex-direction: column; border: 0; background: none; text-align: left; color: var(--ink); padding: 0; font: inherit; cursor: pointer; }
details.ten-group > summary { list-style: none; cursor: pointer; }
details.ten-group > summary::-webkit-details-marker { display: none; }
details.ten-group[open] > summary .xs { display: none; }
/* cycles : cartes compactes, trois colonnes dès qu'il y a la place */
.cyc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
@media (max-width: 1100px) { .cyc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cyc-grid > :first-child { grid-row: span 2; } }
@media (max-width: 600px) { .cyc-grid { grid-template-columns: minmax(0, 1fr); } .cyc-grid > :first-child { grid-row: auto; } }
.cyc-ph { width: 40px; height: 40px; border-radius: 11px; overflow: hidden; flex: none; }
.cyc-card .btn.sm { flex: none; }
.ph-fallback { container-type: size; }
@container (max-width: 90px) { .phf-w { display: none; } .ph-fallback .phf-l { padding: 0; background: none; font-size: 16px; } }
.cyc-ctx { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* accueil : carte des loyers dans l'esprit d'avant, mais ajustée à son contenu */
.home-top { align-items: stretch; }
.home-top .hero-card.compact .hero-inner { height: 100%; justify-content: space-between; }
.hero-card.compact { min-height: 0; }
.hero-card.compact .hero-inner { padding: 16px 18px; gap: 12px; height: auto; }
.hero-card.compact .hero-amount { font-size: 32px; }
.hero-card.compact .glass-tile { padding: 8px 12px; }
.hero-card.compact .glass-tile b { font-size: 18px; }
.hero-card.compact .bar { height: 6px; }
.mt4 { margin-top: 4px; }

/* retours du 1er novembre : frise reliée aux tuiles, coche sur ce qui est fait */
.lease-card .lc-badges { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; }
.mini-steps.linked li::before { top: 11px; }
.mini-steps .ms-btn { all: unset; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 0 2px 4px; border-radius: 12px; cursor: pointer; font: inherit; color: inherit; text-align: center; -webkit-tap-highlight-color: transparent; }
.mini-steps .ms-btn:disabled { cursor: default; }
.mini-steps .ms-btn:not(:disabled):hover span { text-decoration: underline; text-underline-offset: 3px; }
.mini-steps .ms-btn:focus-visible { outline: 2px solid var(--champ); outline-offset: 2px; }
.mini-steps .ms-ok, .mini-steps .ms-wait { font: 500 11px/1.2 var(--sans); font-style: normal; display: inline-flex; align-items: center; gap: 3px; }
.mini-steps .ms-ok { color: var(--ok); } .mini-steps .ms-ok svg { width: 10px; height: 10px; }
.mini-steps .ms-wait { color: var(--champ-ink); }
:root[data-theme="dark"] .mini-steps .ms-wait { color: var(--champ); }
.act-grid .act-tile { position: relative; }
.act-grid .act-tile .act-ok { margin-left: auto; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-fill); color: #fff; flex: none; }
.act-grid .act-tile .act-ok svg { width: 12px; height: 12px; color: #fff; stroke-width: 3; }
/* réglages : sections réglées une fois, repliées */
.set-once details.once { padding: 0; margin-bottom: 8px; overflow: hidden; }
.set-once details.once > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px 18px; cursor: pointer; font: 600 15px/1.3 var(--sans); color: var(--ink); }
.set-once details.once > summary::-webkit-details-marker { display: none; }
.set-once details.once > summary .once-t { flex: 1; min-width: 0; }
.set-once details.once > summary .once-chev { color: var(--muted); transition: transform .2s; }
.set-once details.once[open] > summary .once-chev { transform: rotate(180deg); }
.set-once details.once > section.card { border: 0; box-shadow: none; background: none; border-radius: 0; margin: 0; padding-top: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
.set-once details.once > section.card > h2:first-child, .set-once details.once > section.card > .hstack:first-child > h2 { display: none; }
/* signature pour le compte d'un autre */
.proxy-btn { flex: none; }
.proxy-note { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -2px 0 8px; padding: 8px 12px; border-radius: 12px; background: var(--champ-bg); color: var(--ink); }
.proxy-note[hidden] { display: none; }
.proxy-note > span { flex: 1; min-width: 180px; }
.warn-t { color: var(--warn, #B45309); font-weight: 600; }
/* la prochaine étape suit directement les personnes : le vide éventuel reste en bas de la carte */
.lease-card .lc-actions { margin-top: 0; }
/* import : nouvelle personne */
.imp-newp { padding: 14px; border-radius: 16px; background: var(--subtle); }
.imp-newp[hidden] { display: none; }
/* page ouverte comme simple fichier : ce n'est pas Bailleur */
.file-guard { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--canvas, #0f1411) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.file-guard .fg-card { width: min(520px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 28px; display: grid; gap: 14px; box-shadow: var(--shadow-lg, 0 20px 60px rgba(0,0,0,.35)); }
.file-guard .fg-card p { margin: 0; line-height: 1.5; }
/* rond à cocher des pense-bêtes */
.check-btn { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: none; border: 0; color: var(--muted); cursor: pointer; }
.check-btn.on { color: var(--ok, #1F7A45); }
.check-btn .ring { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid currentColor; opacity: .6; }
.check-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* champ obligatoire oublié */
.field [aria-invalid="true"] { border-color: var(--bad) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 22%, transparent) !important; }
/* en ligne, l'écran de connexion est une page à part entière : rien de l'app ne transparaît derrière */
.file-guard.cloud-gate { background: var(--canvas) !important; -webkit-backdrop-filter: none; backdrop-filter: none; }
.file-guard .fg-zone { display: grid; gap: 10px; padding-top: 6px; border-top: 1px solid var(--line); }

/* Bailleur en ligne : pastille d'état et progression des envois */
.cloud-pill { position: fixed; left: 14px; bottom: 14px; z-index: 60; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass-strong, var(--surface)); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: var(--muted); font-size: 12px; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.cloud-pill.ok { color: var(--ok); }
.cloud-pill.error { color: var(--warn); }
.cloud-pill.sync svg { animation: cloud-spin 1s linear infinite; }
@keyframes cloud-spin { to { transform: rotate(360deg); } }
.cloud-progress { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 80; padding: 10px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0,0,0,.15); font-size: 14px; }
@media print { .cloud-pill, .cloud-progress { display: none !important; } }

/* ---------- plusieurs immeubles : pilules et vue globale ---------- */
.bld-seg { display: flex; width: max-content; }
.bld-sums { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.bld-sum { padding: 18px; border-radius: 24px; }
.bld-sum .h3 { margin: 0; }
.bld-kpis { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; margin-top: 16px; }
.bld-kpis > div { display: flex; flex-direction: column; min-width: 0; }
.bld-kpis b { font-size: 18px; font-weight: 650; letter-spacing: -.01em; white-space: nowrap; }
.bld-kpis span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bld-kpis .bad-t { color: var(--bad); }
.bld-scope { margin: 0 2px 16px; }
@media (max-width: 760px) { .bld-seg { width: auto; } }
/* sur téléphone, la recherche des logements prend toute la ligne, les filtres passent dessous */
@media (max-width: 560px) { #prop-search { min-width: 0; } label.search:has(#prop-search) { flex: 1 1 100%; max-width: none; } }

/* ---------- abonnement : les formules ---------- */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 12px; }
.plan-card { position: relative; border: 1px solid var(--line); border-radius: 20px; padding: 18px 16px 16px; background: var(--surface); display: flex; flex-direction: column; }
.plan-card.on { border-color: var(--forest); box-shadow: 0 0 0 1px var(--forest) inset, var(--sh1); }
.plan-card .plan-name { font-family: var(--serif, 'Fraunces', serif); font-size: 20px; margin-top: 6px; }
.plan-card .plan-price { font-size: 26px; font-weight: 650; letter-spacing: -.02em; margin: 6px 0 2px; }
.plan-card .plan-price span { font-size: 13px; font-weight: 500; color: var(--muted); }
.plan-card .btn.block { margin-top: auto; }
.plan-card .plan-tag { position: absolute; top: -11px; left: 14px; }
.plan-card .plan-tag.ghost { background: var(--subtle); }

/* ---------- écran de connexion : modes, mot de passe visible ---------- */
.cl-card form { display: grid; gap: 12px; }
.cl-card #cl-msg:empty { display: none; }
.cl-pwd { position: relative; }
.cl-pwd input { width: 100%; padding-right: 48px; }
.cl-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; background: transparent; color: var(--muted); border-radius: 12px; display: grid; place-items: center; cursor: pointer; }
.cl-eye:hover { color: var(--ink); }
.cl-links { display: flex; justify-content: center; }
.cl-switch { text-align: center; margin: 4px 0 0; color: var(--muted); }
.cl-card .link { background: none; border: 0; padding: 8px 4px; min-height: 44px; font: inherit; font-weight: 600; color: var(--champ-ink); cursor: pointer; }
:root[data-theme="dark"] .cl-card .link { color: var(--champ); }
.cl-card .link:hover { text-decoration: underline; text-underline-offset: 3px; }
.cl-card .cl-links { margin-top: -6px; }

/* ---------- lecture seule : bandeau ---------- */
#ro-banner { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top, 0px) + 74px);
  display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius: 999px; max-width: calc(100vw - 24px);
  background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--line); box-shadow: var(--sh2, 0 10px 30px rgba(0,0,0,.15));
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); font-size: 13.5px; color: var(--ink); white-space: nowrap; }
#ro-banner > svg { color: var(--warn); flex: none; }
#ro-banner span { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 560px) { #ro-banner { top: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 92px); } }

/* ---------- page du fondateur (avant-première) ---------- */
.fd-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 560px) { .fd-kpis { grid-template-columns: repeat(2, 1fr); } }
.fd-kpi { display: flex; flex-direction: column; gap: 2px; border-radius: 20px; padding: 16px; }
.fd-kpi b { font-size: 30px; font-weight: 650; letter-spacing: -.02em; line-height: 1.1; }
.fd-kpi span { font-size: 13.5px; color: var(--ink); }
.fd-kpi small { font-size: 12px; color: var(--muted); }
.fd-bars { display: grid; gap: 12px; }
.fd-bar { display: grid; grid-template-columns: 110px 1fr 36px; align-items: center; gap: 12px; font-size: 14px; }
.fd-bar > i { display: block; height: 10px; border-radius: 99px; background: var(--subtle-2); overflow: hidden; }
.fd-bar > i > i { display: block; height: 100%; border-radius: 99px; background: var(--champ, var(--gold, #A07F3F)); }
.fd-bar b { text-align: right; }
