/* Espace de suivi — feuille de style.
   Parti pris : les matières du produit (PVD noir, inox, PEEK) pour les couleurs, deux caractères pour deux maisons
   (Bodoni Moda pour les noms et les grands chiffres, Outfit pour tout le reste), et le filet fin qui sépare,
   repris de la boîte du Triarch. L'ambre ne sert qu'à une chose : ce qui est à payer. */

@font-face { font-family: "Outfit"; src: url("fonts/outfit-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Outfit"; src: url("fonts/outfit-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Bodoni Moda"; src: url("fonts/bodoni-moda-latin-opsz-normal.woff2") format("woff2"); font-weight: 400 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Bodoni Moda"; src: url("fonts/bodoni-moda-latin-ext-opsz-normal.woff2") format("woff2"); font-weight: 400 900; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --paper: #F2F3F5;
  --surface: #FFFFFF;
  --ink: #1E2024;        /* PVD satin noir */
  --ink-2: #474C54;
  --muted: #69707A;
  --line: #D6DADF;
  --line-2: #E7E9EC;
  --steel-1: #CDD2D8;    /* inox clair */
  --steel-2: #A0A8B1;
  --steel-3: #5E666F;    /* inox sombre */
  --peek: #DCCBA4;       /* bague PEEK */
  --amber: #E0A22B;      /* Ultem : uniquement ce qui est à payer */
  --amber-ink: #8A5B00;
  --oxide: #A2392B;      /* déficit, retard */
  --serif: "Bodoni Moda", Didot, "Bodoni 72", Georgia, serif;
  --sans: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 15.5px/1.5 var(--sans); font-variant-numeric: tabular-nums lining-nums; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
small { font-size: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 1160px; margin-inline: auto; padding-inline: 32px; }
.neg { color: var(--oxide); }
.due { color: var(--amber-ink); }

/* Bandeau des données d'exemple */
.demo-band { background: var(--peek); padding: 7px 16px; text-align: center; font-size: 13.5px; }

/* Barre du haut */
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: stretch; gap: 36px; min-height: 62px; }
.lockup { display: flex; align-items: center; gap: 14px; text-decoration: none; white-space: nowrap; }
.lockup-a { font: 600 21px/1 var(--serif); font-variation-settings: "opsz" 14; letter-spacing: .01em; }
.lockup-b { font-weight: 500; font-size: 15px; letter-spacing: .02em; }
.lockup-a + .lockup-b { padding-left: 14px; border-left: 1px solid var(--ink); line-height: 1.5; }
.projnav { display: flex; gap: 26px; }
.projnav a { display: flex; align-items: center; text-decoration: none; color: var(--muted); font-size: 15px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.projnav a:hover { color: var(--ink); }
.projnav a[aria-current] { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.tools { margin-left: auto; display: flex; align-items: center; gap: 20px; font-size: 14px; }
.tool { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: none; cursor: pointer; }
.tool:hover { color: var(--ink); text-decoration: underline; }
.who { display: flex; align-items: center; gap: 12px; }
.who-name { font-weight: 500; }
.langs { display: flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.langs button { background: none; border: 0; padding: 4px 9px; font-size: 12.5px; font-weight: 500; color: var(--muted); cursor: pointer; }
.langs button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* En-tête de page et onglets */
.phead { padding-top: 46px; }
.phead h1 { font: 500 54px/1.02 var(--serif); font-variation-settings: "opsz" 22; letter-spacing: -.012em; }
.phead-sub { margin-top: 10px; font-size: 17.5px; color: var(--ink-2); max-width: 60ch; }
.phead-meta { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 14px; color: var(--muted); }
.phead-meta span:not(.status) { padding-left: 14px; border-left: 1px solid var(--line); }
.status { display: inline-flex; align-items: center; gap: 7px; padding: 2px 10px 2px 9px; border: 1px solid var(--line); border-radius: 99px; font-size: 13px; color: var(--ink-2); background: var(--surface); }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--steel-2); }
.status-actif::before { background: var(--ink); }
.tabs { margin-top: 30px; display: flex; gap: 30px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 12px 0 11px; white-space: nowrap; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current] { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.phead-home { padding-bottom: 30px; }

/* Boutons et champs */
.btn { display: inline-block; background: var(--ink); color: #fff; border: 1px solid var(--ink); border-radius: 8px; padding: 9px 18px; font-weight: 500; text-decoration: none; cursor: pointer; }
.btn:hover { background: #000; }
.btn-quiet { background: var(--surface); color: var(--ink); border-color: var(--steel-1); }
.btn-quiet:hover { background: var(--line-2); }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="number"], input[type="url"], select, textarea {
  background: var(--surface); border: 1px solid var(--steel-1); border-radius: 8px; padding: 9px 12px; min-height: 42px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 0; border-color: var(--ink); border-radius: 8px; }

/* Date d'arrêté */
.asof { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 26px 0 18px; font-size: 14.5px; }
.asof label { color: var(--muted); }
.js .asof .btn { display: none; }
.asof-links { margin-left: auto; display: flex; gap: 20px; }
.asof-links a { color: var(--muted); text-decoration: none; }
.asof-links a:hover { color: var(--ink); text-decoration: underline; }
.asof-links a[aria-current] { color: var(--ink); font-weight: 600; }

/* Répartition des encaissements : le seul geste fort de la page */
.share { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; padding: 30px 34px 28px; }
.share h2, .answers h2, .calc h2, .side h2, .todo h2 { font: 600 16.5px/1.3 var(--sans); }
.share-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 20px; }
.share-total { color: var(--muted); font-size: 14.5px; }
.fig-xl { font: 600 40px/1 var(--sans); color: var(--ink); letter-spacing: -.01em; margin-right: 8px; }
.sharebar { display: block; width: 100%; height: 64px; border-radius: 8px; overflow: hidden; }
.sharebar-mini { height: 12px; border-radius: 4px; }
.seg-P, .seg-D { fill: var(--steel-1); }
.hatch-line { fill: var(--steel-3); opacity: .5; }
.seg-V { fill: var(--peek); }
.seg-M { fill: var(--ink); }
.seg-I { fill: var(--steel-3); }
.seg-none { fill: var(--line-2); }
.uncovered { fill: var(--surface); opacity: .78; }
.uncovered-hatch { opacity: .55; }
.marker { fill: var(--ink); }
.sharebar:not(.sharebar-mini) .seg, .sharebar:not(.sharebar-mini) .seg-hatch { transform-box: fill-box; transform-origin: left center; animation: grow .8s cubic-bezier(.2, .75, .2, 1) both; }
@keyframes grow { from { transform: scaleX(0); } }
.share-note { margin-top: 14px; font-size: 14.5px; color: var(--ink-2); max-width: 78ch; }
.legend { margin-top: 18px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px 22px; }
.legend li { display: grid; grid-template-columns: 12px 1fr; column-gap: 9px; align-items: baseline; }
.sw { width: 12px; height: 12px; border-radius: 3px; align-self: center; }
.sw-P { background: var(--steel-1); }
.sw-D { background: repeating-linear-gradient(45deg, var(--steel-1) 0 3px, var(--steel-2) 3px 4.5px); }
.sw-V { background: var(--peek); }
.sw-M { background: var(--ink); }
.sw-I { background: var(--steel-3); }
.lg-label { font-size: 13.5px; color: var(--muted); }
.lg-amount { grid-column: 2; font-size: 17px; font-weight: 500; }
.lg-pct { grid-column: 2; font-size: 13px; color: var(--muted); }

/* Les trois réponses */
.answers { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); }
.answers article { padding: 26px 34px 30px; }
.answers article + article { border-left: 1px solid var(--line); }
.answers h2 { font-weight: 500; font-size: 14.5px; color: var(--muted); }
.fig-lg { margin-top: 6px; font: 600 31px/1.15 var(--sans); letter-spacing: -.005em; }
.facts { margin-top: 12px; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.facts li + li { margin-top: 6px; }

/* Calcul et colonne latérale */
.cols { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 44px; margin-top: 44px; align-items: start; }
.calc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 34px 14px; }
.hint { margin-top: 4px; font-size: 13.5px; color: var(--muted); }
.ledger { width: 100%; border-collapse: collapse; margin-top: 14px; }
.ledger th { position: relative; padding: 13px 16px 13px 38px; text-align: left; font-weight: 400; vertical-align: top; }
.ledger th small { display: block; font-size: 13.5px; color: var(--muted); }
.ledger td { padding: 13px 0; text-align: right; white-space: nowrap; font-size: 16.5px; font-weight: 500; vertical-align: top; }
.ledger tr { border-bottom: 1px solid var(--line-2); }
.ledger tbody:last-child tr:last-child { border-bottom: 0; }
.key { position: absolute; left: 0; top: 13px; width: 23px; height: 23px; display: grid; place-items: center; border: 1px solid var(--steel-1); border-radius: 5px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.key-none { border-color: transparent; }
.ledger .total tr { border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.ledger .total th { font-weight: 600; padding-top: 16px; padding-bottom: 16px; }
.ledger .total .key { top: 16px; background: var(--ink); border-color: var(--ink); color: #fff; }
.ledger .total td { font: 600 24px/1.2 var(--sans); padding-top: 14px; }
.side section + section, .outside { margin-top: 38px; padding-top: 30px; border-top: 1px solid var(--line); }
.outside { margin-inline: 34px; }
.outside h2 { font: 600 16.5px/1.3 var(--sans); }
.chart-key { margin: 8px 0 6px; display: flex; gap: 22px; font-size: 14px; color: var(--muted); }
.chart-key b { color: var(--ink); font-weight: 500; }
.ck::before { content: ""; display: inline-block; width: 18px; margin-right: 8px; vertical-align: middle; border-top: 3px solid var(--ink); }
.ck-out::before { border-top: 3px dashed var(--steel-2); }
.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .tick { font: 400 14.5px var(--sans); fill: var(--muted); }
.chart polyline { fill: none; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.line-in { stroke: var(--ink); }
.line-out { stroke: var(--steel-2); stroke-dasharray: 2 8; }
.dot { stroke: var(--paper); stroke-width: 2.5; }
.line-in-dot { fill: var(--ink); }
.line-out-dot { fill: var(--steel-2); }
.cats { margin-top: 14px; }
.cats li { display: grid; grid-template-columns: 1fr auto; gap: 5px 16px; padding: 9px 0; }
.cat-amount { font-weight: 500; }
.catbar { grid-column: 1 / -1; width: 100%; height: 6px; border-radius: 3px; background: var(--line-2); }
.cat-paid { fill: var(--steel-3); }
.cat-due { fill: var(--amber); }
.cat-due-note { grid-column: 1 / -1; font-size: 13.5px; color: var(--amber-ink); }
.pairs { margin-top: 8px; }
.pairs > div { display: flex; justify-content: space-between; gap: 20px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.pairs > div:last-child { border-bottom: 0; }
.pairs dt small { display: block; font-size: 13.5px; color: var(--muted); }
.pairs dd { font-weight: 500; white-space: nowrap; }
.pairs dd small { font-weight: 400; color: var(--muted); }
.pairs .dd-text { white-space: normal; text-align: right; }

/* Accueil */
.todo { margin-bottom: 34px; }
.todo ul { margin-top: 10px; border-top: 1px solid var(--line); }
.todo li { display: grid; grid-template-columns: 150px 1fr auto; gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.todo-date { color: var(--muted); }
.todo-date em { font-style: normal; color: var(--oxide); }
.todo-proj { color: var(--muted); }
.register { display: grid; gap: 20px; }
.reg-row { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 34px 26px; }
.reg-id { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; }
.reg-id h2 { font: 500 34px/1.1 var(--serif); font-variation-settings: "opsz" 20; letter-spacing: -.01em; }
.reg-id h2 a { text-decoration: none; }
.reg-id h2 a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.reg-id p { color: var(--muted); font-size: 14.5px; display: flex; align-items: center; gap: 12px; }
.reg-bar { margin: 20px 0 18px; }
.reg-figs { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 16px 18px; }
.reg-figs dt { font-size: 13.5px; color: var(--muted); }
.reg-figs dd { font-size: 19px; font-weight: 500; white-space: nowrap; }
.reg-figs dd small { font-size: 13.5px; font-weight: 400; color: var(--muted); }

/* Ventes, réglages */
.figs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.figs > div { padding: 20px 26px 22px; }
.figs > div + div { border-left: 1px solid var(--line); }
.figs span { display: block; font-size: 14px; color: var(--muted); }
.figs b { display: block; margin-top: 4px; font-size: 25px; font-weight: 600; white-space: nowrap; }
.source { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin: 18px 0 6px; font-size: 14.5px; color: var(--ink-2); }
.source-ko { color: var(--oxide); }
.source .btn { padding: 6px 14px; font-size: 14.5px; }
.diag { width: 100%; order: 3; font-size: 13px; color: var(--muted); word-break: break-word; }
.tablewrap { margin-top: 18px; overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.grid { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.grid th { padding: 12px 16px; text-align: left; font-weight: 500; font-size: 13.5px; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
.grid td { padding: 11px 16px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.grid tbody tr:last-child td { border-bottom: 0; }
.grid .num { text-align: right; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 13px; background: var(--line-2); color: var(--ink-2); }
.tag-encaissee { background: var(--ink); color: #fff; }
.tag-livree, .tag-acompte { background: #F6E7C4; color: var(--amber-ink); }
.tag-retour { color: var(--oxide); }
.setblock { margin-bottom: 44px; max-width: 560px; }
.setblock h2 { font: 600 18px/1.3 var(--sans); }
.setform { margin-top: 18px; padding: 20px 22px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.setform h3 { font: 500 24px/1.1 var(--serif); font-variation-settings: "opsz" 18; }
.setform .btn { justify-self: start; }
.alert-ok { border-left-color: var(--ink); color: var(--ink); margin-bottom: 26px; }

.figs-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.entry { margin-top: 26px; padding: 24px 28px 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.entry h2 { font: 600 17px/1.3 var(--sans); }
.entryform { margin-top: 16px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px 18px; align-items: end; }
.entryform label { display: grid; gap: 5px; font-size: 14px; color: var(--ink-2); }
.entryform input:not([type="checkbox"]), .entryform select { width: 100%; }
.entryform input[type="file"] { padding: 7px 10px; min-height: 42px; background: var(--surface); border: 1px solid var(--steel-1); border-radius: 8px; font-size: 14px; }
.f-date { grid-column: span 3; } .f-cat { grid-column: span 3; } .f-label { grid-column: span 6; }
.f-amount { grid-column: span 3; } .f-file { grid-column: span 4; } .f-file2 { grid-column: span 5; } .f-priv { grid-column: span 6; }
.kept { color: var(--muted); font-size: 13.5px; }
.tag-shared { background: var(--ink); color: #fff; }
.partner-note { margin-top: 18px; max-width: 86ch; }
.entryform .f-check { grid-column: span 4; display: flex; margin-top: 0 !important; padding-bottom: 9px; }
.entryform .btn { grid-column: span 4; justify-self: start; }
.grid td.wrap { white-space: normal; min-width: 180px; }
.grid td.files { white-space: normal; width: 210px; max-width: 210px; overflow-wrap: anywhere; font-size: 14px; }
.docline { display: block; } .docline + .docline { margin-top: 6px; }
.grid small.priv { display: block; font-size: 13px; color: var(--muted); }
.grid .is-budget td { color: var(--muted); }
.doc { text-decoration: underline; }
.rowmenu summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.rowmenu[open] summary { color: var(--ink); margin-bottom: 10px; }
.rowmenu form { display: grid; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line-2); min-width: 250px; white-space: normal; }
.rowmenu label { display: grid; gap: 4px; font-size: 13.5px; color: var(--ink-2); }
.rowmenu .checkline { display: flex; margin-top: 0 !important; font-size: 14px !important; }
.rowmenu .btn { justify-self: start; padding: 6px 14px; font-size: 14.5px; }
.btn-danger { color: var(--oxide); border-color: var(--oxide); }

/* Connexion, messages */
body.bare { min-height: 100vh; display: flex; flex-direction: column; }
.bare main { flex: 1; display: grid; place-items: center; width: 100%; padding-block: 40px; }
.login { width: min(100%, 380px); }
.lockup-lg { margin-bottom: 34px; }
.login h1 { font: 500 44px/1.05 var(--serif); font-variation-settings: "opsz" 22; letter-spacing: -.012em; }
.lede { margin-top: 10px; color: var(--ink-2); font-size: 16.5px; max-width: 62ch; }
.form { margin-top: 26px; display: grid; gap: 8px; }
.form label { font-size: 14px; color: var(--ink-2); margin-top: 8px; }
.form .btn { margin-top: 18px; padding-block: 12px; }
.alert { margin-top: 18px; padding: 11px 14px; border-left: 3px solid var(--oxide); background: var(--surface); color: var(--oxide); border-radius: 0 8px 8px 0; }
.langs-login { margin-top: 28px; width: max-content; }
.langs-login button { padding: 6px 12px; font-size: 13.5px; }
.install { width: min(100%, 460px); }
.checks { margin-top: 24px; border-top: 1px solid var(--line); font-size: 14.5px; }
.checks li { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.checks b { font-weight: 500; white-space: nowrap; }
.checks .is-ko b { color: var(--oxide); }
.checks .is-warn b { color: var(--amber-ink); }
.alert p + p { margin-top: 4px; }
.checkline { display: flex; align-items: flex-start; gap: 10px; margin-top: 18px !important; color: var(--ink) !important; font-size: 15.5px !important; }
.checkline input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--ink); }
.form fieldset { margin: 18px 0 0; padding: 14px 16px 18px; border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 8px; }
.form legend { padding: 0 6px; font-weight: 500; font-size: 14.5px; }
input[aria-invalid="true"] { border-color: var(--oxide); }
.notice { padding: 70px 0 40px; }
.notice h1 { font: 500 44px/1.05 var(--serif); font-variation-settings: "opsz" 22; }
.notice .btn { margin-top: 24px; }
.foot { padding-block: 44px 34px; font-size: 13.5px; color: var(--muted); }

/* Écrans étroits */
@media (max-width: 900px) {
  .legend { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cols { grid-template-columns: 1fr; gap: 34px; }
  .reg-figs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  body { font-size: 15px; }
  .wrap { padding-inline: 18px; }
  .top-in { flex-wrap: wrap; gap: 0 18px; padding-top: 10px; }
  .lockup { min-height: 40px; }
  .lockup-a { font-size: 19px; }
  .projnav { order: 3; width: 100%; gap: 22px; overflow-x: auto; scrollbar-width: none; }
  .projnav a { padding: 10px 0 9px; white-space: nowrap; }
  .tools { gap: 14px; }
  .who-name, .tools > .tool { display: none; }
  .phead { padding-top: 30px; }
  .phead h1 { font-size: 38px; }
  .phead-sub { font-size: 16px; }
  .tabs { gap: 24px; margin-inline: -18px; padding-inline: 18px; }
  .asof-links { margin-left: 0; width: 100%; }
  .share { padding: 22px 18px 22px; }
  .fig-xl { font-size: 32px; display: block; margin-bottom: 4px; }
  .sharebar { height: 52px; }
  .legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .answers { grid-template-columns: 1fr; }
  .answers article { padding: 22px 18px 24px; }
  .answers article + article { border-left: 0; border-top: 1px solid var(--line); }
  .fig-lg { font-size: 28px; }
  .calc { padding: 22px 18px 8px; }
  .outside { margin-inline: 0; }
  .ledger td { font-size: 15.5px; }
  .ledger .total td { font-size: 21px; }
  .todo li { grid-template-columns: 1fr; gap: 2px; }
  .figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .entry { padding: 20px 18px; }
  .entryform { grid-template-columns: 1fr; }
  .entryform > * { grid-column: 1 / -1 !important; }
  .figs > div { padding: 16px 18px; }
  .figs > div:nth-child(3) { border-left: 0; }
  .figs > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .figs b { font-size: 21px; }
  .reg-row { padding: 22px 18px; }
  .reg-id h2 { font-size: 30px; }
  .reg-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .sharebar .seg, .sharebar .seg-hatch { animation: none !important; }
}
@media print {
  body { background: #fff; }
  .top, .tabs, .asof, .demo-band, .foot { display: none; }
  .share, .answers, .calc { border-color: #999; }
}

/* Onglet Fichiers */
.entryform .f-wide { grid-column: 1 / -1; }
.entryform p.hint { margin-top: -6px; }
.filesec { margin-top: 34px; }
.filesec h2 { font: 600 17px/1.3 var(--sans); padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.filelist { list-style: none; margin: 0; padding: 0; }
.filelist li { display: flex; align-items: center; gap: 18px; padding: 16px 4px; border-bottom: 1px solid var(--line-2); }
.filelist li.is-old { opacity: .62; }
.thumb { flex: 0 0 92px; height: 68px; border-radius: 8px; overflow: hidden; background: var(--line-2); border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.file-main { flex: 1 1 auto; min-width: 0; }
.file-title { font-size: 16.5px; font-weight: 500; overflow-wrap: anywhere; }
.file-version { margin-left: 6px; font-weight: 400; color: var(--muted); }
.file-meta { margin-top: 5px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere; }
.file-note { margin-top: 5px; font-size: 13.5px; color: var(--muted); }
.file-actions { flex: 0 0 auto; display: flex; align-items: flex-start; gap: 14px; }
.file-actions .rowmenu form { min-width: 210px; }
@media (max-width: 720px) {
  .filelist li { flex-wrap: wrap; }
  .file-actions { width: 100%; }
}
.entryform label.checkline { display: flex; margin-top: 0 !important; padding-bottom: 4px; font-size: 15px !important; }

/* Onglet du partenaire */
.entryform .f-third { grid-column: span 4; }
.filesec .tablewrap { margin-top: 16px; }
.filesec .figs { margin-top: 16px; }
.emptyline { margin-top: 14px; }
.twoforms { margin-top: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.miniform { display: grid; gap: 10px; align-content: start; padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.miniform h3 { font: 600 15.5px/1.3 var(--sans); }
.miniform label { display: grid; gap: 5px; font-size: 14px; color: var(--ink-2); }
.miniform .btn { justify-self: start; margin-top: 4px; }
@media (max-width: 720px) { .twoforms { grid-template-columns: 1fr; } .entryform .f-third { grid-column: 1 / -1; } }

/* Références et stock */
.rowmenu form .f-priv, .rowmenu form .f-date { grid-column: auto; }
.lot { margin-top: 16px; padding: 20px 24px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.lot h3 { font: 600 16.5px/1.3 var(--sans); }
.lot .lotlines { margin-top: 12px; width: 100%; }
.lot .lotlines th, .lot .lotlines td { padding-left: 0; }
.lot > .rowmenu { margin-top: 12px; }
.lot > .rowmenu form { max-width: 420px; }
.qtygrid { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 18px; }
.qtygrid legend { padding: 0; margin-bottom: 8px; font-size: 14px; color: var(--ink-2); }
.entryform .f-qty { grid-column: span 2; }
.filesec > .entry { margin-top: 18px; }
@media (max-width: 720px) { .qtygrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .entryform .f-qty { grid-column: 1 / -1; } }

/* Relevés */
.entryform .f-note { grid-column: span 9; }
.statement { margin-top: 28px; max-width: 860px; }
.stm-note { margin-top: 12px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.stm-actions { margin-top: 20px; }
html:not(.js) [data-print] { display: none; }
@media (max-width: 720px) { .entryform .f-note { grid-column: 1 / -1; } }
@media print {
  .noprint, header.top, .tabs, .demo-band { display: none !important; }
  body { background: #fff; }
  .statement { max-width: none; margin-top: 0; }
}
.statement h2 { margin-top: 12px; }
.statement .ledger + .hint { margin-top: 14px; }

/* Menu d'une ligne : sur grand écran il s'ouvre en panneau par-dessus le tableau, sans l'élargir */
@media (min-width: 1000px) {
  .tablewrap:has(.rowmenu[open]) { overflow: visible; }
  .grid td:has(> .rowmenu) { position: relative; min-width: 96px; }
  .grid .rowmenu[open] { position: absolute; right: 10px; top: 8px; z-index: 5; width: 310px; padding: 12px 16px 4px; background: var(--surface);
    border: 1px solid var(--steel-1); border-radius: 10px; box-shadow: 0 14px 34px rgba(30, 32, 36, .16); white-space: normal; text-align: left; }
  .grid .rowmenu[open] form { min-width: 0; }
}
