/* Belvédère — bureau de vente (démo Démesure). Même charte que le site : papier, terre cuite, olive. */

:root {
  --sand: #efe8dc;
  --sand-2: #e5dccd;
  --paper: #f7f3ec;
  --white: #fffdf9;
  --ink: #1f1b16;
  --ink-2: #5a5146;
  --mute: #8a7f71;
  --line: rgba(31, 27, 22, .12);
  --terra: #b4532a;
  --olive: #6b7350;
  --amber: #c99a3b;
  --grey: #a39b8f;
  --red: #b8392c;
  --good: #4f7a36;
  --bad: #b8392c;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, sans-serif;
  --r: 16px;
  --top: 64px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; /* garde-fou iPhone : jamais de défilement horizontal */ }
body { margin: 0; min-height: 100vh; background: var(--sand); color: var(--ink); font-family: var(--sans); font-size: 14.5px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.chart-svg { stroke: none; }
:focus-visible { outline: 2px solid var(--terra); outline-offset: 2px; }
::selection { background: var(--terra); color: var(--paper); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.eyebrow { font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.link { color: var(--terra); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.hint { font-size: 13px; color: var(--ink-2); }
.dia { font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 1px 6px; border-radius: 999px; background: rgba(107, 115, 80, .14); color: var(--olive); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 999px; font-weight: 600; font-size: 14px; white-space: nowrap; text-decoration: none; transition: transform .3s var(--ease), background-color .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-2px); }
.btn--accent { background: var(--terra); color: var(--paper); box-shadow: 0 10px 28px -14px rgba(180, 83, 42, .8); }
.btn--accent:hover { background: #9c4522; }
.btn--dark { background: var(--ink); color: var(--paper); }
.btn--ghost { box-shadow: inset 0 0 0 1px var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--sm { height: 34px; padding: 0 14px; font-size: 12.5px; }
.x { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; font-size: 24px; line-height: 1; box-shadow: inset 0 0 0 1px var(--line); background: var(--white); transition: transform .3s var(--ease); }
.x:hover { transform: rotate(90deg); }

/* Bandeau démo */
.demo-bar { display: flex; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; padding: 8px 20px; background: var(--ink); color: rgba(247, 243, 236, .72); font-size: 12.5px; }
.demo-bar a { color: var(--paper); text-decoration: underline; text-underline-offset: 3px; }
.demo-bar__links { display: flex; flex-wrap: wrap; gap: 4px 18px; }

/* Barre du haut */
.top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 18px; height: var(--top); padding: 0 22px; background: rgba(247, 243, 236, .9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo svg { width: 28px; height: 28px; color: var(--terra); }
.logo span { font-family: var(--serif); font-size: 26px; font-weight: 500; line-height: 1; }
.logo small { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); padding: 3px 8px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); }
.top__right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.clock { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line); font-size: 18px; }
.icon-btn[aria-pressed="true"] { color: var(--terra); }
.icon-btn[aria-pressed="false"] { color: var(--mute); opacity: .6; }

/* Structure */
.shell { display: grid; grid-template-columns: 200px minmax(0, 1fr); min-height: calc(100vh - var(--top)); }
.side { position: sticky; top: var(--top); align-self: start; height: calc(100vh - var(--top)); display: flex; flex-direction: column; gap: 4px; padding: 18px 12px; border-right: 1px solid var(--line); }
.side a { position: relative; display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: 12px; font-weight: 600; font-size: 14.5px; text-decoration: none; color: var(--ink-2); transition: background-color .2s, color .2s; }
.side a svg { font-size: 20px; }
.side a:hover { background: var(--paper); color: var(--ink); }
.side a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--terra); color: var(--paper); font-size: 12px; font-weight: 700; }
.badge--warn { background: var(--red); }
.badge[hidden] { display: none; }
.side__foot { margin-top: 26px; padding: 14px 6px 0; border-top: 1px dashed var(--line); font-size: 12.5px; color: var(--ink-2); }
.side__foot button { margin-top: 6px; font-weight: 700; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
main { padding: 26px clamp(16px, 2.4vw, 34px) 60px; min-width: 0; }

.view[hidden] { display: none; }
.view { animation: view-in .45s var(--ease); }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } }
.view__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px 20px; flex-wrap: wrap; margin-bottom: 18px; }
.view__head h1 { margin-top: 4px; font-family: var(--serif); font-weight: 500; font-size: clamp(38px, 4.6vw, 60px); line-height: .95; letter-spacing: -.01em; }
.view__head h1 em, .welcome h2 em { font-style: italic; color: var(--terra); }
.view__note { font-size: 13.5px; color: var(--ink-2); }

.panel { background: var(--white); border-radius: var(--r); box-shadow: 0 0 0 1px var(--line); padding: 18px 20px; min-width: 0; }
.panel--flush { padding: 0; overflow: hidden; }
.panel h2 { font-family: var(--serif); font-size: 24px; font-weight: 500; line-height: 1.1; margin-bottom: 10px; }
.panel__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.panel__head h2 { margin-bottom: 0; }
.panel__sub { margin: 16px 0 6px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.sub { font-size: 13px; color: var(--ink-2); margin-top: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { height: 36px; padding: 0 16px; border-radius: 999px; font-weight: 600; font-size: 13.5px; box-shadow: inset 0 0 0 1px var(--line); background: var(--white); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); box-shadow: none; }

/* Pastilles */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill--dispo { color: var(--olive); background: rgba(107, 115, 80, .13); }
.pill--option { color: #94701f; background: rgba(201, 154, 59, .16); }
.pill--reserve { color: #94701f; background: rgba(201, 154, 59, .28); }
.pill--vendu { color: #6f675b; background: rgba(163, 155, 143, .22); }
.pill--late { color: var(--red); background: rgba(184, 57, 44, .12); }
.pill--wait { color: var(--ink-2); background: rgba(31, 27, 22, .06); }
.pill--claim { color: var(--terra); background: rgba(180, 83, 42, .14); }
.pill--claim::before { animation: claim 1.4s ease-in-out infinite; }
@keyframes claim { 50% { opacity: .25; } }
.pill--nouveau { color: var(--terra); background: rgba(180, 83, 42, .12); }
.pill--contacte { color: var(--ink-2); background: rgba(31, 27, 22, .07); }
.pill--visite { color: #2f6b7a; background: rgba(47, 107, 122, .12); }
.pill--signe { color: var(--olive); background: rgba(107, 115, 80, .15); }
.pill--perdu { color: var(--mute); background: rgba(31, 27, 22, .05); }
.meter { display: block; height: 7px; border-radius: 4px; background: var(--sand-2); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 4px; background: var(--ink); transition: width .6s var(--ease); }

/* ---------- LOTS ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) 1.6fr; gap: 10px; margin-bottom: 16px; }
.stats > div { display: flex; flex-direction: column; padding: 12px 16px; border-radius: 14px; background: var(--white); box-shadow: 0 0 0 1px var(--line); }
.stats span { font-size: 12.5px; color: var(--ink-2); }
.stats b { font-family: var(--serif); font-size: 34px; font-weight: 500; line-height: 1.05; }
.stats small { font-size: 12px; color: var(--ink-2); }
.stats .c-option, .stats .c-reserve { color: var(--amber); }
.stats .c-vendu { color: var(--grey); }
.stats__wide { background: var(--ink) !important; color: var(--paper); box-shadow: none !important; }
.stats__wide span, .stats__wide small { color: rgba(247, 243, 236, .7); }
.facade-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.facade { padding: 18px 20px 0; border-radius: 22px; background: linear-gradient(180deg, #e9e0d1, #f3ede3 70%); box-shadow: 0 0 0 1px var(--line); overflow-x: auto; }
.fa-roof, .fa-ground { margin-left: 46px; text-align: center; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.fa-roof span { display: block; margin: 0 8% 8px; padding: 8px; border-radius: 10px 10px 0 0; background: repeating-linear-gradient(90deg, rgba(31, 27, 22, .08) 0 2px, transparent 2px 14px); }
.fa-ground span { display: block; margin: 8px 3% 0; padding: 10px; background: rgba(31, 27, 22, .06); border-top: 2px solid var(--ink); }
.fa-head { display: grid; grid-template-columns: 46px 1fr 1fr; gap: 6px; margin-bottom: 6px; font-size: 11.5px; color: var(--ink-2); font-weight: 600; text-align: center; }
.fa-row { display: grid; grid-template-columns: 46px minmax(0, 1fr); align-items: stretch; margin-bottom: 6px; }
.fa-floor { display: flex; align-items: center; font-family: var(--serif); font-size: 22px; color: var(--ink-2); }
.fa-floor sup { font-size: 11px; }
.fa-cells { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 10px repeat(3, minmax(0, 1fr)); gap: 6px; }
.fa-core { background: repeating-linear-gradient(0deg, rgba(31, 27, 22, .12) 0 1px, transparent 1px 6px); border-radius: 3px; }
.cell { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 2px; min-width: 0; min-height: 70px; padding: 8px 10px; border-radius: 10px; background: var(--white); box-shadow: 0 0 0 1px var(--line), inset 0 4px 0 var(--olive); transition: transform .25s var(--ease), box-shadow .25s, opacity .3s; }
.cell:hover { transform: translateY(-2px); box-shadow: 0 0 0 1.5px var(--ink), inset 0 4px 0 var(--olive), 0 12px 24px -16px rgba(31, 27, 22, .5); z-index: 1; }
.cell__top { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.cell__top b { font-family: var(--serif); font-size: 21px; font-weight: 500; line-height: 1; }
.cell__top em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--ink-2); }
.cell__price { font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.cell__foot { display: flex; gap: 4px; font-size: 11px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell__foot span { display: inline-flex; align-items: center; gap: 3px; }
.cell--option { background: #fbf3df; box-shadow: 0 0 0 1px rgba(201, 154, 59, .4), inset 0 4px 0 var(--amber); }
.cell--reserve { background: #f2e2bb; box-shadow: 0 0 0 1px rgba(201, 154, 59, .5), inset 0 4px 0 var(--amber); }
.cell--vendu { background: #e2ddd4; box-shadow: 0 0 0 1px var(--line), inset 0 4px 0 var(--grey); }
.cell--vendu .cell__price { color: var(--ink-2); font-weight: 600; }
.cell.is-dim { opacity: .28; }
.facade-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: calc(var(--top) + 16px); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.st { width: 14px; height: 10px; border-radius: 3px; display: inline-block; }
.st--dispo { background: var(--olive); }
.st--option { background: #e6c983; }
.st--reserve { background: var(--amber); }
.st--vendu { background: var(--grey); }
.mini { display: flex; flex-direction: column; margin-bottom: 14px; }
.mini li { display: grid; grid-template-columns: 64px 1fr; grid-template-rows: auto auto; column-gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); cursor: pointer; }
.mini li b { grid-row: 1 / 3; font-family: var(--serif); font-size: 17px; font-weight: 500; }
.mini li span { font-weight: 600; font-size: 13.5px; }
.mini li small { font-size: 12px; color: var(--ink-2); }
.mini li.is-site span::after { content: " · site"; color: var(--terra); font-size: 11px; font-weight: 700; }
.panel .mini:last-child { margin-bottom: 0; }

/* ---------- Tiroir ---------- */
.drawer { position: fixed; inset: 0; z-index: 60; visibility: hidden; overflow: hidden; }
.drawer.is-open { visibility: visible; }
.drawer__backdrop { position: absolute; inset: 0; background: rgba(31, 27, 22, .4); opacity: 0; transition: opacity .35s; }
.drawer.is-open .drawer__backdrop { opacity: 1; }
.drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(520px, 100%); background: var(--paper); box-shadow: -20px 0 60px -30px rgba(31, 27, 22, .6); transform: translateX(100%); transition: transform .5s var(--ease); overflow-y: auto; }
.drawer.is-open .drawer__panel { transform: none; }
.drawer__x { position: absolute; top: 14px; right: 14px; z-index: 2; }
.d { display: flex; flex-direction: column; gap: 16px; padding: 26px 24px 34px; }
.d-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-right: 44px; }
.d-title h2 { font-family: var(--serif); font-size: 38px; font-weight: 500; line-height: 1; }
.d-title h2 em { font-style: italic; color: var(--terra); }
.d-phone { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.d-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0; border-radius: 14px; overflow: hidden; background: var(--line); box-shadow: 0 0 0 1px var(--line); }
.d-grid div { padding: 10px 12px; background: var(--white); }
.d-grid dt { font-size: 12px; color: var(--ink-2); }
.d-grid dd { margin: 2px 0 0; font-weight: 700; display: flex; flex-direction: column; }
.d-grid dd small { font-weight: 500; font-size: 12px; color: var(--ink-2); }
.d-price { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.money-in { position: relative; display: block; }
.money-in input { width: 100%; height: 56px; padding: 0 70px 0 16px; border: 0; border-radius: 14px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); font-family: var(--serif); font-size: 30px; font-weight: 500; color: var(--ink); }
.money-in input:focus { outline: 0; box-shadow: inset 0 0 0 1.5px var(--terra); }
.money-in input:disabled { opacity: .5; }
.money-in em { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-style: normal; font-weight: 700; color: var(--ink); }
.d-status { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); padding: 3px; border-radius: 999px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); }
.seg button { height: 38px; border-radius: 999px; text-align: center; font-weight: 700; font-size: 12.5px; color: var(--ink-2); transition: background-color .2s, color .2s; }
.seg button[aria-pressed="true"][data-status="dispo"] { background: var(--olive); color: var(--paper); }
.seg button[aria-pressed="true"][data-status="option"] { background: #e6c983; color: var(--ink); }
.seg button[aria-pressed="true"][data-status="reserve"] { background: var(--amber); color: var(--ink); }
.seg button[aria-pressed="true"][data-status="vendu"] { background: var(--grey); color: var(--ink); }
.d-holder, .d-int { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 14px; background: var(--white); box-shadow: 0 0 0 1px var(--line); }
.d-person { display: flex; flex-direction: column; gap: 1px; }
.d-person b { font-weight: 700; font-size: 15px; }
.d-person span { font-size: 12.5px; color: var(--ink-2); }
.d-person:hover b { color: var(--terra); }
.d-pay { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.d-pay p { display: flex; justify-content: space-between; gap: 10px; }
.d-note { font-size: 13px; color: var(--ink-2); }
.d-int ul { display: flex; flex-direction: column; }
.d-int li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.d-sync { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--olive); font-weight: 600; }
.tl { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.tl li { display: flex; flex-direction: column; gap: 2px; padding: 8px; border-radius: 10px; background: var(--white); box-shadow: 0 0 0 1px var(--line); font-size: 11.5px; color: var(--mute); }
.tl li b { font-size: 12px; }
.tl li.is-done { color: var(--ink-2); box-shadow: 0 0 0 1px var(--line), inset 0 3px 0 var(--olive); }
.tl li.is-done b { color: var(--ink); }
.d-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.d-lotlink { font-weight: 700; color: var(--terra); }

/* ---------- PROSPECTS ---------- */
.visits { margin-bottom: 16px; }
.vis { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.vis li { display: flex; gap: 12px; align-items: center; min-width: 250px; padding: 10px 12px; border-radius: 12px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.vis__d { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 48px; height: 52px; border-radius: 10px; background: var(--ink); color: var(--paper); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.vis__d b { font-family: var(--serif); font-size: 24px; line-height: 1; letter-spacing: 0; }
.vis li > span:last-child { display: flex; flex-direction: column; font-size: 13px; }
.vis li small { color: var(--ink-2); font-size: 12px; }
.kanban { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.kcol { display: flex; flex-direction: column; min-width: 0; padding: 10px; border-radius: 16px; background: rgba(255, 253, 249, .5); box-shadow: 0 0 0 1px var(--line); }
.kcol h2 { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 10px; font-family: var(--serif); font-size: 21px; font-weight: 500; }
.kcol h2 b { font-family: var(--sans); font-size: 12px; min-width: 24px; height: 24px; padding: 0 7px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--ink); color: var(--paper); }
.kcol--nouveau h2 b { background: var(--terra); }
.kcol--signe h2 b { background: var(--olive); }
.kcol__list { display: flex; flex-direction: column; gap: 8px; }
.kcol__more { padding: 8px; text-align: center; font-size: 12px; color: var(--ink-2); }
.lead { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 12px; background: var(--white); box-shadow: 0 0 0 1px var(--line); cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s; animation: lead-in .5s var(--ease); }
@keyframes lead-in { from { opacity: 0; transform: translateY(-8px); } }
.lead:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--ink-2), 0 14px 28px -20px rgba(31, 27, 22, .6); }
.lead.is-site { box-shadow: 0 0 0 1.5px var(--terra); }
.lead__site { position: absolute; top: -9px; right: 10px; padding: 2px 8px; border-radius: 999px; background: var(--terra); color: var(--paper); font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.lead header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.lead header b { font-size: 14px; }
.lead header small { font-size: 11.5px; color: var(--mute); white-space: nowrap; }
.lead p { font-size: 12.5px; color: var(--ink-2); }
.lead__tags { display: flex; flex-wrap: wrap; gap: 4px; }
.lead__tags span { padding: 1px 7px; border-radius: 999px; background: var(--paper); font-size: 11px; font-weight: 600; }
.lead__tags .dia { background: rgba(107, 115, 80, .14); }
.lead__visit { display: flex; align-items: center; gap: 6px; font-weight: 700; color: #2f6b7a !important; }
.lead footer { margin-top: 2px; }

/* ---------- PAIEMENTS ---------- */
.kpis { display: grid; grid-template-columns: 1.3fr; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; border-radius: var(--r); background: var(--white); box-shadow: 0 0 0 1px var(--line); min-width: 0; }
.kpi span { font-size: 12.5px; color: var(--ink-2); }
.kpi b { font-family: var(--serif); font-size: 34px; font-weight: 500; line-height: 1.1; white-space: nowrap; }
.kpi small { font-size: 12px; color: var(--ink-2); }
.kpi--hero { background: var(--ink); color: var(--paper); box-shadow: none; }
.kpi--hero span, .kpi--hero small { color: rgba(247, 243, 236, .7); }
.kpi--hero b { font-size: clamp(36px, 3.4vw, 46px); }
.kpi--bad b { color: var(--red); }
.kpi--claim { box-shadow: inset 0 0 0 1.5px rgba(180, 83, 42, .45); }
.kpi--claim b { color: var(--terra); }
.delta { font-weight: 700; }
.delta--good { color: var(--good); }
.delta--bad { color: var(--bad); }
.pay { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.pay th, .pay td { padding: 12px 14px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
.pay thead th { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); font-weight: 600; background: var(--paper); }
.pay tbody tr:last-child > * { border-bottom: 0; }
.pay td b { display: block; }
.pay td small { display: block; font-size: 12px; color: var(--ink-2); margin-top: 3px; }
.pay td .meter { width: 120px; }
.pay .act { text-align: right; white-space: nowrap; }
.pay .act .link { margin-left: 10px; }
.pay tr.is-late { background: rgba(184, 57, 44, .04); }

/* ---------- CHANTIER ---------- */
.build { margin-bottom: 16px; }
.build__main { display: flex; flex-direction: column; gap: 14px; }
.build__pct { display: flex; justify-content: space-between; align-items: baseline; }
.build__pct span { font-size: 13px; color: var(--ink-2); }
.build__pct b { font-family: var(--serif); font-size: 54px; font-weight: 500; line-height: 1; color: var(--terra); }
.build input[type="range"] { width: 100%; accent-color: var(--terra); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.steps li { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 12px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.steps li b { font-family: var(--serif); font-size: 19px; font-weight: 500; }
.steps li span { font-size: 12px; color: var(--ink-2); }
.steps li.is-done { box-shadow: 0 0 0 1px var(--line), inset 0 3px 0 var(--olive); }
.steps li.is-current { background: var(--ink); color: var(--paper); box-shadow: none; }
.steps li.is-current span { color: rgba(247, 243, 236, .7); }
.build .btn { align-self: flex-start; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.panel--wide { grid-column: 1 / -1; }
.jform { display: flex; gap: 8px; margin-bottom: 10px; }
.jform input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.jform input:focus { outline: 0; box-shadow: inset 0 0 0 1.5px var(--terra); }
.journal li { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.journal time { font-size: 12px; color: var(--ink-2); }
.calls li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--mute); }
.calls li b { color: var(--ink-2); }
.calls li .meter { grid-column: 1 / -1; }
.calls li.is-on b { color: var(--ink); }
.calls li.is-on { color: var(--ink-2); }
.calls li.is-on .meter i { background: var(--olive); }

/* ---------- CHIFFRES ---------- */
.insights { margin-bottom: 16px; background: var(--ink); color: var(--paper); box-shadow: none; }
.insights h2 { font-family: var(--sans); font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: #e6c983; margin-bottom: 12px; }
.insights ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; }
.ins { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; line-height: 1.5; color: rgba(247, 243, 236, .86); }
.ins svg { width: 22px; height: 22px; flex: none; margin-top: 1px; stroke: #e6c983; }
.ins--alert svg { stroke: #e98a74; }
.ins b { color: var(--paper); }
.ins a { color: #e6c983; text-underline-offset: 3px; }
.chart { position: relative; width: 100%; min-height: 200px; }
.chart-svg { display: block; overflow: visible; }
.chart-svg .gridline { stroke: var(--line); stroke-width: 1; }
.chart-svg .axis { stroke: rgba(31, 27, 22, .4); stroke-width: 1; }
.chart-svg .tick { fill: var(--ink-2); font-family: var(--sans); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.col__bar { fill: var(--ink); transition: fill .15s; }
.col__ghost { fill: var(--sand-2); }
.col--accent .col__bar { fill: var(--terra); }
.col.is-hover .col__bar { fill: var(--ink-2); }
.col__mark { fill: var(--terra); font-family: var(--sans); font-weight: 700; font-size: 12px; }
.hit { fill: transparent; cursor: crosshair; outline: none; }
.tip { position: fixed; left: 0; top: 0; z-index: 90; max-width: 260px; padding: 9px 12px; border-radius: 10px; background: var(--ink); color: var(--paper); font-size: 13px; line-height: 1.4; pointer-events: none; box-shadow: 0 10px 30px -10px rgba(31, 27, 22, .6); }
.tip .muted { color: rgba(247, 243, 236, .7); }
.tip[hidden] { display: none; }
.funnel li, .bars li { display: grid; grid-template-columns: 112px minmax(0, 1fr) 54px 44px; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.funnel li:last-child, .bars li:last-child { border-bottom: 0; }
.funnel b, .bars b { text-align: right; font-variant-numeric: tabular-nums; }
.funnel small, .bars li > span:last-child { text-align: right; font-size: 12px; color: var(--ink-2); }
.funnel li:last-child .meter i { background: var(--olive); }
.funnel .meter, .bars .meter { height: 10px; border-radius: 5px; }
.bars__label { font-weight: 600; }
.bars li:first-child .meter i { background: var(--terra); }
.rank__row { display: grid; grid-template-columns: 20px minmax(0, 1fr) 80px; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.rank__row:last-child { border-bottom: 0; }
.rank__n { font-family: var(--serif); font-size: 18px; color: var(--ink-2); }
.rank__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rank__name { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13.5px; }
.rank__num { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.rank__num b { font-size: 14px; }
.rank__num small { font-size: 11.5px; color: var(--ink-2); }
.rank__row:first-child .meter i { background: var(--terra); }

/* ---------- Notifications, accueil ---------- */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 80; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; pointer-events: none; }
.note-toast { pointer-events: auto; display: flex; flex-direction: column; max-width: 380px; padding: 12px 16px; border-radius: 14px; background: var(--white); color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 20px 50px -20px rgba(31, 27, 22, .6); font-size: 14px; animation: toast-in .5s var(--ease); transition: opacity .4s, transform .4s var(--ease); }
.note-toast span { font-size: 13px; color: var(--ink-2); }
.note-toast--hot { background: var(--terra); color: var(--paper); cursor: pointer; }
.note-toast--hot span { color: rgba(247, 243, 236, .85); }
.note-toast--ok { box-shadow: inset 4px 0 0 var(--olive), 0 0 0 1px var(--line), 0 20px 50px -20px rgba(31, 27, 22, .6); }
.note-toast--warn { box-shadow: inset 4px 0 0 var(--red), 0 0 0 1px var(--line), 0 20px 50px -20px rgba(31, 27, 22, .6); }
.note-toast.is-out { opacity: 0; transform: translateX(30px); }
@keyframes toast-in { from { transform: translateY(30px); opacity: 0; } }
.welcome { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(31, 27, 22, .55); opacity: 0; transition: opacity .35s; }
.welcome.is-on { opacity: 1; }
.welcome[hidden] { display: none; }
.welcome__card { width: min(580px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 32px; border-radius: 24px; background: var(--paper); box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .6); transform: translateY(16px); transition: transform .5s var(--ease); }
.welcome.is-on .welcome__card { transform: none; }
.welcome h2 { margin: 10px 0 14px; font-family: var(--serif); font-weight: 500; font-size: clamp(36px, 5vw, 50px); line-height: .95; }
.welcome p { color: var(--ink-2); }
.welcome ol { counter-reset: s; display: grid; gap: 10px; margin: 16px 0 24px; }
.welcome li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; font-size: 14.5px; color: var(--ink-2); }
.welcome li::before { content: counter(s); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--terra); color: var(--paper); font-weight: 700; }
.welcome li b { color: var(--ink); }
.welcome__ctas { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stats__wide { grid-column: 1 / -1; }
  .facade-wrap { grid-template-columns: 1fr; }
  .facade-side { position: static; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row; }
  .insights ul { grid-template-columns: 1fr; }
}
@media (max-width: 1000px) {
  .grid2 { grid-template-columns: 1fr; }
  .clock { display: none; }
  .pay thead { display: none; }
  .pay, .pay tbody, .pay tr { display: block; }
  .pay tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .pay th, .pay td { padding: 0; border: 0; }
  .pay .act { grid-column: 1 / -1; text-align: left; }
}
@media (max-width: 860px) {
  :root { --top: 58px; }
  .top { padding: 0 12px; gap: 10px; }
  .logo small, .top .btn { display: none; }
  .shell { display: block; }
  .side { position: fixed; top: auto; left: 0; right: 0; bottom: 0; z-index: 50; height: auto; flex-direction: row; gap: 2px; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); background: rgba(247, 243, 236, .96); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
  .side a { flex: 1; flex-direction: column; justify-content: center; gap: 2px; height: 54px; padding: 0 2px; font-size: 11px; }
  .side .badge { position: absolute; top: 2px; right: calc(50% - 24px); min-width: 18px; height: 18px; font-size: 10.5px; padding: 0 5px; margin: 0; }
  .side__foot { display: none; }
  main { padding: 18px 12px calc(96px + env(safe-area-inset-bottom)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats b { font-size: 28px; }
  .facade { padding: 12px 10px 0; }
  .fa-row, .fa-head { grid-template-columns: 26px minmax(0, 1fr); }
  .fa-head { grid-template-columns: 26px 1fr 1fr; }
  .fa-roof, .fa-ground { margin-left: 26px; }
  .fa-floor { font-size: 17px; }
  .fa-cells { grid-template-columns: repeat(3, minmax(0, 1fr)) 4px repeat(3, minmax(0, 1fr)); gap: 3px; }
  .cell { min-height: 52px; padding: 5px 4px; border-radius: 7px; }
  .cell__top b { font-size: 15px; }
  .cell__top em, .cell__foot { display: none; }
  .cell__price { font-size: 10px; }
  .kanban { grid-template-columns: repeat(5, 82%); scroll-snap-type: x mandatory; }
  .kcol { scroll-snap-align: start; }
  .kpi b { font-size: 26px; }
  .kpi--hero { grid-column: 1 / -1; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .tl { grid-template-columns: repeat(3, 1fr); }
  .funnel li, .bars li { grid-template-columns: 92px minmax(0, 1fr) 44px; }
  .funnel small, .bars li > span:last-child { display: none; }
  .drawer__panel { width: 100%; }
  .toasts { left: 12px; right: 12px; bottom: calc(80px + env(safe-area-inset-bottom)); align-items: stretch; }
  .note-toast { max-width: none; }
  .demo-bar { flex-wrap: nowrap; padding: 7px 14px; font-size: 11.5px; }
  .demo-bar > span:first-child { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .demo-bar__links { display: none; }
}
/* ---------- Menu groupé ---------- */
.side__group { margin: 12px 12px 4px; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); font-weight: 700; }
.side__group:first-child { margin-top: 0; }
.side a { height: 40px; }

/* ---------- TRÉSORERIE ---------- */
.treso-status { display: grid; grid-template-columns: 54px 1fr; gap: 16px; align-items: center; margin-bottom: 14px; padding: 18px 22px; border-radius: var(--r); background: var(--white); box-shadow: 0 0 0 1px var(--line); }
.treso-status__light { width: 54px; height: 54px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 8px rgba(79, 122, 54, .14), 0 0 30px rgba(79, 122, 54, .5); }
.treso-status.is-red { background: #fbf1ec; box-shadow: 0 0 0 1px rgba(184, 57, 44, .3); }
.treso-status.is-red .treso-status__light { background: var(--red); box-shadow: 0 0 0 8px rgba(184, 57, 44, .14), 0 0 30px rgba(184, 57, 44, .5); animation: light 1.8s ease-in-out infinite; }
@keyframes light { 50% { box-shadow: 0 0 0 14px rgba(184, 57, 44, .06), 0 0 40px rgba(184, 57, 44, .35); } }
.treso-status__t { margin: 2px 0; font-family: var(--serif); font-size: 27px; line-height: 1.15; }
.treso-status.is-red .treso-status__t b { color: var(--red); font-weight: 600; }
.treso-status.is-green .treso-status__t b { color: var(--good); font-weight: 600; }
.kpi b.neg { color: #ff9c86; }
.treso-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); gap: 16px; align-items: start; }
.treso-chart { grid-row: span 1; }
.cash .gridline.zero { stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: none; }
.cash__area { fill: rgba(79, 122, 54, .16); }
.cash__area--f { fill: rgba(79, 122, 54, .08); }
.cash__area--neg { fill: rgba(184, 57, 44, .22); }
.cash__line { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linejoin: round; }
.cash__line--f { stroke: var(--terra); stroke-dasharray: 5 4; }
.cash__today { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 2 3; }
.cash__lbl { font-size: 11.5px; font-weight: 700; fill: var(--ink); }
.cash__lbl--low { fill: var(--good); }
.cash__lbl--low.is-neg, .cash__low.is-neg { fill: var(--red); }
.cash__low { fill: var(--good); stroke: var(--white); stroke-width: 2; }
.cash__mark line { stroke: var(--olive); stroke-dasharray: 1 3; }
.cash__mark text { font-size: 10.5px; font-weight: 700; fill: var(--olive); }
.cash__cursor { stroke: var(--ink-2); stroke-width: 1; }
.cash__cursor[hidden] { display: none; }
.levers { display: grid; gap: 8px; margin-top: 12px; }
.levers li { display: grid; grid-template-columns: 26px 1fr auto; gap: 12px; align-items: center; padding: 11px 12px; border-radius: 14px; background: var(--paper); }
.levers li b { font-size: 13.5px; }
.levers li p { font-size: 12.5px; color: var(--ink-2); line-height: 1.4; }
.lever__dot { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--sand-2); font-size: 13px; font-weight: 800; color: var(--paper); }
.levers .is-on { background: rgba(79, 122, 54, .1); }
.levers .is-on .lever__dot { background: var(--good); box-shadow: none; }
.evening { background: linear-gradient(180deg, #fffaf2, var(--white)); }
.eve-auto { display: grid; gap: 8px; margin-bottom: 12px; }
.eve-auto li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: center; font-size: 13px; }
.eve-auto small { display: block; color: var(--ink-2); font-size: 12px; }
.eve-ic { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: rgba(107, 115, 80, .14); color: var(--olive); font-size: 15px; }
.eve-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px; border-radius: 14px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.eve-form label { display: grid; gap: 4px; font-size: 12px; color: var(--ink-2); font-weight: 600; }
.eve-form label:nth-child(2) { grid-column: 1 / -1; grid-row: 1; }
.eve-form select, .eve-form input { height: 40px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--white); font-size: 14px; color: var(--ink); min-width: 0; width: 100%; }
.eve-form .money-in { display: flex; align-items: center; gap: 6px; }
.eve-form .money-in input { height: 40px; padding: 0 40px 0 10px; border: 1px solid var(--line); border-radius: 10px; box-shadow: none; font-family: var(--sans); font-size: 14px; font-weight: 600; }
.eve-form .money-in em { font-style: normal; font-weight: 700; color: var(--ink-2); }
.eve-form__end { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.eve-photo { height: 34px; padding: 0 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); background: var(--white); font-size: 12.5px; font-weight: 600; }
.eve-photo[aria-pressed="true"] { background: rgba(79, 122, 54, .14); color: var(--good); box-shadow: none; }
.eve-list { display: grid; margin-top: 10px; max-height: 210px; overflow-y: auto; }
.eve-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 2px; border-bottom: 1px dashed var(--line); font-size: 13px; }
.eve-list li small { display: block; color: var(--ink-2); font-size: 11.5px; }
.eve-list li > b { white-space: nowrap; color: var(--red); }
.eve-list .empty { color: var(--mute); }
.eve-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; font-size: 13px; }
.budget { display: grid; gap: 10px; }
.budget li { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(80px, 1fr) 62px; gap: 12px; align-items: center; }
.budget__l b { display: block; font-size: 13px; line-height: 1.25; }
.budget__l small { font-size: 11.5px; color: var(--ink-2); }
.budget__bar { position: relative; height: 10px; border-radius: 5px; background: var(--sand-2); }
.budget__bar i { position: absolute; inset: 0 auto 0 0; border-radius: 5px; background: var(--olive); }
.budget__bar i.is-over { background: var(--red); }
.budget__bar em { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--ink); }
.budget__gap { text-align: right; font-weight: 700; font-size: 13px; }
.budget__gap small { display: block; font-size: 11px; color: var(--ink-2); font-weight: 600; }
.budget__gap.is-bad, .budget__gap.is-bad small { color: var(--red); }
.budget__gap.is-good small { color: var(--good); }
.budget__legend { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 11.5px; color: var(--ink-2); }
.budget__legend i { width: 18px; height: 8px; border-radius: 4px; background: var(--olive); }
.budget__legend em { width: 2px; height: 14px; margin-left: 10px; background: var(--ink); }
.budget__sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.budget__sum span { display: block; font-size: 11.5px; color: var(--ink-2); }
.budget__sum b { display: block; font-family: var(--serif); font-size: 24px; font-weight: 500; line-height: 1.15; }
.budget__sum small { font-size: 11.5px; color: var(--ink-2); }
.flows { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 6px 22px; }
.flows li { display: grid; grid-template-columns: 92px 1fr auto; gap: 10px; align-items: baseline; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.flows time { color: var(--ink-2); font-size: 12px; }
.flows small { display: block; color: var(--ink-2); font-size: 11.5px; }
.flows b { white-space: nowrap; }
.flows .is-in b { color: var(--good); }
.flows .is-out b { color: var(--red); }
.flows .is-moved { opacity: .6; }

/* ---------- MATÉRIAUX ---------- */
.alerts { display: grid; gap: 8px; margin-bottom: 16px; }
.alert { display: grid; grid-template-columns: 12px 1fr auto; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 14px; background: var(--white); box-shadow: 0 0 0 1px var(--line); font-size: 13.5px; }
.alert__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--amber); }
.alert--bad { background: #fbf1ec; box-shadow: 0 0 0 1px rgba(184, 57, 44, .3); }
.alert--bad .alert__dot { background: var(--red); animation: claim 1.4s infinite; }
.mats { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 16px; }
.mat { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: var(--r); background: var(--white); box-shadow: 0 0 0 1px var(--line); }
.mat--crit { box-shadow: 0 0 0 1.5px rgba(184, 57, 44, .45); }
.mat header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mat h3 { font-size: 14.5px; }
.mat__lvl { font-size: 13px; color: var(--ink-2); }
.mat__lvl b { font-family: var(--serif); font-size: 36px; font-weight: 500; line-height: 1; color: var(--ink); }
.mat--crit .mat__lvl b { color: var(--red); }
.mat__days { font-size: 12px; color: var(--ink-2); }
.mat .spark { width: 100%; height: 46px; }
.spark path { fill: none; stroke: var(--ink); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.spark__seuil { stroke: var(--red); stroke-dasharray: 3 3; stroke-width: 1; vector-effect: non-scaling-stroke; }
.mat dl { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0; }
.mat dt { font-size: 11px; color: var(--ink-2); }
.mat dd { margin: 0; font-weight: 700; font-size: 13px; }
.mat__next { font-size: 12.5px; min-height: 34px; }
.mat__next small { display: block; color: var(--ink-2); font-size: 11.5px; }
.mat__act { margin-top: auto; }
.gap { width: 100%; border-collapse: collapse; font-size: 13px; }
.gap th, .gap td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--line); }
.gap thead th { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); font-weight: 600; }
.gap tr.is-bad td, .gap tr.is-bad th { color: var(--red); }
.gap tbody tr:last-child > * { border-bottom: 0; }

/* ---------- ÉQUIPES ---------- */
.grid2--team { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.grid2--team .payroll { grid-column: 1; }
.grid2--team [data-pointage] { grid-row: span 2; }
.trades td .pill { margin-left: 4px; padding: 1px 7px; }
.subs { display: grid; gap: 10px; }
.subs li { display: grid; grid-template-columns: minmax(0, 1fr) 90px 40px; gap: 12px; align-items: center; font-size: 13px; }
.subs small { display: block; font-size: 11.5px; color: var(--ink-2); }
.subs .meter i { background: var(--olive); }
.punch { display: grid; max-height: 560px; overflow-y: auto; }
.punch li { display: grid; grid-template-columns: 32px minmax(0, 1fr) 58px 86px 74px; gap: 10px; align-items: center; padding: 8px 2px; border-bottom: 1px solid var(--line); font-size: 13px; }
.punch__av { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--sand); font-weight: 700; color: var(--ink-2); }
.punch small { display: block; color: var(--ink-2); font-size: 11.5px; }
.punch__t { font-variant-numeric: tabular-nums; color: var(--ink-2); }
.payroll { background: var(--ink); color: var(--paper); box-shadow: none; }
.payroll .sub { color: rgba(247, 243, 236, .72); margin: 4px 0 14px; }
.payroll .btn--ghost { box-shadow: inset 0 0 0 1px rgba(247, 243, 236, .5); color: var(--paper); }
.pay-big { font-family: var(--serif); font-size: 44px; line-height: 1.05; }

@media (max-width: 1200px) {
  .treso-grid { grid-template-columns: 1fr; }
  .grid2--team { grid-template-columns: 1fr; }
  .grid2--team [data-pointage] { grid-row: auto; }
}
@media (max-width: 860px) {
  .side { overflow-x: auto; scrollbar-width: none; }
  .side::-webkit-scrollbar { display: none; }
  .side a { flex: 0 0 72px; }
  .side__group { display: none; }
  .treso-status { grid-template-columns: 40px 1fr; padding: 14px; }
  .treso-status__light { width: 40px; height: 40px; }
  .treso-status__t { font-size: 21px; }
  .budget__sum { grid-template-columns: 1fr 1fr; }
  .punch li { grid-template-columns: 32px minmax(0, 1fr) 52px 74px; }
  .punch li > :last-child:not(button) { display: none; }
  .punch li > button { grid-column: 2 / -1; justify-self: start; }
  .flows { grid-template-columns: 1fr; }
  .gap th, .gap td { padding: 8px 6px; }
}

/* Démo : passer de la gestion promoteur au site client */
.pmode { position: fixed; z-index: 45; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; gap: 3px; padding: 4px; border-radius: 999px; background: rgba(31, 27, 22, .92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .5); transition: opacity .4s; }
.pmode a { display: grid; place-items: center; height: 36px; padding: 0 16px; border-radius: 999px; color: #e3a07c; font-size: 13px; font-weight: 700; white-space: nowrap; text-decoration: none; }
.pmode a[aria-current="page"] { background: var(--paper); color: var(--ink); }
html:has(.drawer.is-open, .welcome:not([hidden])) .pmode { opacity: 0; pointer-events: none; }
@media (max-width: 860px) {
  .pmode { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .pmode a { padding: 0 14px; font-size: 12.5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
