/* Sfez Family Office : gris perle, blanc, noir et argent ; Playfair Display pour les titres. */

@font-face { font-family: "Public Sans"; font-weight: 400; font-display: swap; src: url("../fonts/public-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 500; font-display: swap; src: url("../fonts/public-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 600; font-display: swap; src: url("../fonts/public-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 700; font-display: swap; src: url("../fonts/public-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-weight: 400; font-display: swap; src: url("../fonts/playfair-display-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-weight: 400; font-style: italic; font-display: swap; src: url("../fonts/playfair-display-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-weight: 500; font-display: swap; src: url("../fonts/playfair-display-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-weight: 600; font-display: swap; src: url("../fonts/playfair-display-latin-600-normal.woff2") format("woff2"); }

:root {
  --pearl: #E8E8E4;
  --pearl-2: #DEDED9;
  --pearl-3: #D2D2CC;
  --ink: #141414;
  --ink-2: #2B2D30;
  --paper: #F5F5F3;
  --sheet: #FFFFFF;
  --rule: #D6D7D4;
  --rule-soft: #E9E9E6;
  --silver: #A6A9AD;
  --text: #141414;
  --muted: #55585D;
  --faint: #85888D;
  --primary: #141414;
  --primary-hover: #34363A;
  --brass: #4A4D52;
  --brass-soft: #EDEDEA;
  --pos: #2E5E45;
  --pos-soft: #E4EDE7;
  --neg: #9A3A30;
  --neg-soft: #F5E6E3;
  --warn: #7A5A1E;
  --warn-soft: #F3EEE2;
  --info-soft: #E9EAEC;
  --radius-s: 2px;
  --radius: 3px;
  --radius-l: 4px;
  --sidebar: 252px;
  --font: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Playfair Display", "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { font-size: 14px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--paper); line-height: 1.45; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--silver); text-underline-offset: 2px; }
a:hover { text-decoration-color: var(--ink); }
h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 400; color: var(--ink); font-family: var(--serif); font-variant-numeric: lining-nums; }
.legend .k-in { background: var(--primary); }
.legend .k-out { background: var(--silver); }
h1 { font-size: 2.1rem; letter-spacing: 0; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.08rem; }
p { margin: 0 0 .75rem; }
small, .small { font-size: .875rem; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.num, td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tab-nums { font-variant-numeric: tabular-nums; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Coque ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { background: var(--pearl); color: var(--ink); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; overflow-x: hidden; border-right: 1px solid var(--pearl-3); }
.sidebar a { text-decoration: none; }
.brand { display: flex; align-items: center; gap: .7rem; padding: 1.2rem 1.1rem 1rem; color: var(--ink); }
.brand img { height: 44px; width: auto; opacity: .9; }
.brand .word { display: flex; align-items: center; gap: .45rem; font-family: var(--serif); }
.brand .word b { font-weight: 400; font-size: 2rem; line-height: 1; }
.brand .word span { font-size: .86rem; line-height: .95; padding-top: 2px; }
.nav { list-style: none; margin: 0; padding: 0 .6rem; }
.nav li a { display: flex; align-items: center; gap: .65rem; padding: .5rem .6rem; border-radius: var(--radius); color: #3A3D41; font-weight: 500; position: relative; }
.nav li a:hover { background: var(--pearl-2); color: var(--ink); }
.nav li a.active { background: var(--sheet); color: var(--ink); box-shadow: 0 0 0 1px var(--pearl-3); }
.nav li a.active::before { content: ""; position: absolute; left: -.6rem; top: .35rem; bottom: .35rem; width: 2px; background: var(--ink); }
.nav li a svg { width: 18px; height: 18px; flex: none; opacity: .8; }
.nav .count { margin-left: auto; background: var(--pearl-3); color: var(--ink); border-radius: 999px; padding: 0 .45rem; font-size: .8rem; font-variant-numeric: tabular-nums; }
.nav .count.hot { background: var(--ink); color: #fff; }
.nav-title { padding: 1.1rem 1.2rem .35rem; color: var(--muted); font-size: .9rem; font-family: var(--serif); font-style: italic; }

.company-switch { margin: .2rem .6rem .6rem; position: relative; }
.company-switch summary { list-style: none; display: flex; align-items: center; gap: .6rem; padding: .55rem .6rem; border-radius: var(--radius); background: var(--sheet); cursor: pointer; color: var(--ink); box-shadow: 0 0 0 1px var(--pearl-3); }
.company-switch summary::-webkit-details-marker { display: none; }
.company-switch summary:hover { box-shadow: 0 0 0 1px var(--silver); }
.company-switch .chev { margin-left: auto; opacity: .6; width: 16px; height: 16px; display: inline-flex; }
.company-switch .menu { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: #fff; color: var(--text); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(20, 20, 20, .18); z-index: 30; max-height: 60vh; overflow-y: auto; padding: .3rem; border: 1px solid var(--rule); }
.company-switch .menu a { display: flex; align-items: center; gap: .55rem; padding: .45rem .5rem; border-radius: var(--radius-s); color: var(--text); }
.company-switch .menu a:hover { background: var(--paper); }
.company-switch .cname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.company-switch .csub { font-size: .8rem; color: var(--muted); }

/* Dos de classeur : la signature visuelle */
.spine { width: 26px; height: 32px; border-radius: 3px; flex: none; position: relative; display: inline-flex; align-items: flex-end; justify-content: center; padding-bottom: 4px; color: #fff; font-size: .62rem; font-weight: 700; box-shadow: inset -3px 0 0 rgba(0,0,0,.18); }
.spine::before { content: ""; position: absolute; top: 5px; left: 50%; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; background: rgba(255,255,255,.85); box-shadow: inset 0 1px 1px rgba(0,0,0,.35); }
.spine.sm { width: 18px; height: 24px; font-size: .5rem; padding-bottom: 2px; }
.spine.sm::before { width: 5px; height: 5px; margin-left: -2.5px; top: 4px; }

.sidebar-foot { margin-top: auto; padding: .8rem .6rem 1rem; border-top: 1px solid var(--pearl-3); }
.user-chip { display: flex; align-items: center; gap: .55rem; padding: .35rem .6rem; color: var(--ink); font-size: .9rem; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; flex: none; }
.linkish { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0; }
.sidebar-foot .linkish { color: var(--muted); }
.sidebar-foot .linkish:hover { color: var(--ink); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 1rem; padding: .7rem 2rem; background: var(--sheet); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 20; min-height: 56px; }
.topbar .crumbs { color: var(--muted); display: flex; gap: .45rem; align-items: center; min-width: 0; white-space: nowrap; overflow: hidden; }
.topbar .crumbs b { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: .75rem; }
.fy-select { display: flex; align-items: center; gap: .4rem; color: var(--muted); }
.fy-select select { min-width: 9rem; }
.topbar .menu-toggle { display: none; }

.content { padding: 1.6rem 2rem 3rem; max-width: 1360px; width: 100%; }
.page-head { display: flex; align-items: flex-end; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.page-head .lede { color: var(--muted); margin: .3rem 0 0; max-width: 70ch; }
.page-head .actions { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

/* ---------- Surfaces ---------- */
.panel { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-l); }
.panel + .panel, .panel + .grid, .grid + .panel { margin-top: 1.2rem; }
.grid > .panel + .panel, .grid > div > .panel:first-child { margin-top: 0; }
.panel-head { display: flex; align-items: center; gap: .75rem; padding: .9rem 1.1rem; border-bottom: 1px solid var(--rule-soft); }
.panel-head .actions { margin-left: auto; display: flex; gap: .5rem; }
.panel-body { padding: 1.1rem; }
.panel-foot { padding: .8rem 1.1rem; border-top: 1px solid var(--rule-soft); display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.grid { display: grid; gap: 1.2rem; }
.grid.two { grid-template-columns: 1fr 1fr; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.split { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; }

/* Chiffres clés : une ligne de registre plutôt que des cartes */
.ledger-strip { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-l); margin-bottom: 1.2rem; }
.ledger-strip > div { padding: 1rem 1.2rem; border-left: 1px solid var(--rule-soft); }
.ledger-strip > div:first-child { border-left: 0; }
.ledger-strip .label { color: var(--muted); font-size: .9rem; }
.ledger-strip .value { font-family: var(--serif); font-size: 1.7rem; font-weight: 400; font-variant-numeric: lining-nums tabular-nums; margin-top: .15rem; letter-spacing: -0.01em; }
.ledger-strip .hint { color: var(--faint); font-size: .82rem; margin-top: .1rem; }

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.data th { text-align: left; font-weight: 500; color: var(--muted); padding: .55rem .75rem; border-bottom: 1px solid var(--rule); background: #FAFBFB; position: sticky; top: 0; white-space: nowrap; }
table.data td { padding: .55rem .75rem; border-bottom: 1px solid var(--rule-soft); vertical-align: middle; }
table.data tbody tr:hover { background: #F8FAF9; }
table.data tr.group td { background: #F6F7F6; font-weight: 600; color: var(--ink); }
table.data tr.total td { font-weight: 700; border-top: 2px solid var(--ink); border-bottom: 0; }
table.data tr.sub td { font-weight: 600; border-top: 1px solid var(--rule); }
table.data td.check, table.data th.check { width: 34px; padding-right: 0; }
table.data .label-cell { max-width: 380px; }
table.data .label-cell .main-label { font-weight: 500; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.data .label-cell .sub-label { color: var(--muted); font-size: .86rem; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.data a.row-link { color: inherit; }
table.compact td, table.compact th { padding: .4rem .6rem; }
.empty { padding: 2.5rem 1rem; text-align: center; color: var(--muted); }
.empty h3 { margin-bottom: .4rem; }

/* ---------- Onglets et filtres ---------- */
.tabs { display: flex; gap: .2rem; border-bottom: 1px solid var(--rule); margin-bottom: 0; padding: 0 1.1rem; overflow-x: auto; }
.tabs a { padding: .7rem .8rem; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--ink); border-bottom-color: var(--ink); }
.tabs a, .toolbar a { text-decoration: none; }
.tabs .n { color: var(--faint); font-variant-numeric: tabular-nums; margin-left: .25rem; }
.toolbar { display: flex; gap: .5rem; align-items: center; padding: .75rem 1.1rem; border-bottom: 1px solid var(--rule-soft); flex-wrap: wrap; }
.toolbar .grow { flex: 1; }
.bulkbar { display: none; align-items: center; gap: .5rem; padding: .6rem 1.1rem; background: var(--pearl); border-bottom: 1px solid var(--pearl-3); flex-wrap: wrap; }
.bulkbar.show { display: flex; }

/* ---------- Formulaires ---------- */
label { display: block; font-weight: 500; margin-bottom: .3rem; color: var(--ink); }
.field { margin-bottom: .9rem; }
.field .help { color: var(--muted); font-size: .86rem; margin-top: .25rem; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .8rem; }
.row.three-up { grid-template-columns: repeat(3, minmax(0, 1fr)); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=search], input:not([type]), select, textarea {
  font: inherit; color: var(--text); background: #fff; border: 1px solid var(--pearl-3); border-radius: var(--radius); padding: .45rem .6rem; width: 100%; min-height: 36px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(20, 20, 20, .08); }
input.amount { text-align: right; font-variant-numeric: tabular-nums; }
select.inline-account, input.inline-account { min-height: 32px; padding: .25rem .45rem; font-size: .92rem; max-width: 260px; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--primary); vertical-align: middle; }
.checkline { display: flex; align-items: center; gap: .5rem; font-weight: 400; }
textarea { min-height: 80px; resize: vertical; }
input[type=file] { font: inherit; max-width: 100%; }

.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; font: inherit; font-weight: 500; padding: .45rem .9rem; min-height: 36px; border-radius: var(--radius); border: 1px solid var(--pearl-3); background: #fff; color: var(--ink); cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover { background: #F4F6F7; text-decoration: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-hover); }
.btn.brass { background: var(--brass); border-color: var(--brass); color: #fff; }
.btn.brass:hover { background: #966A23; }
.btn.danger { color: var(--neg); border-color: #E3B9B3; }
.btn.danger:hover { background: var(--neg-soft); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: #EEF1F3; }
.btn.sm { padding: .25rem .6rem; min-height: 30px; font-size: .9rem; }
.btn svg { width: 16px; height: 16px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
form.inline { display: inline; }

/* ---------- Pastilles ---------- */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .08rem .5rem; border-radius: 999px; font-size: .8rem; font-weight: 500; background: #EDF0F2; color: var(--muted); white-space: nowrap; }
.badge.ir { background: var(--info-soft); color: #2B547A; }
.badge.is { background: var(--brass-soft); color: #7A5418; }
.badge.todo { background: var(--warn-soft); color: var(--warn); }
.badge.ok { background: var(--pos-soft); color: var(--pos); }
.badge.draft { background: #EEF0F2; color: #56616C; border: 1px dashed #B6BEC6; }
.badge.err { background: var(--neg-soft); color: var(--neg); }
.badge.claude { background: #EFE9F7; color: #5B3F8C; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: currentColor; }

/* ---------- Messages ---------- */
.flashes { margin-bottom: 1rem; display: grid; gap: .5rem; }
.flash { padding: .7rem 1rem; border-radius: var(--radius); border: 1px solid; display: flex; gap: .6rem; align-items: flex-start; }
.flash.success { background: var(--pos-soft); border-color: #BFDCCB; color: #1F4F37; }
.flash.error { background: var(--neg-soft); border-color: #EBC2BC; color: #7E2C24; }
.flash.info { background: var(--info-soft); border-color: var(--rule); color: var(--ink-2); }
.notice { padding: .8rem 1rem; border-radius: var(--radius); background: var(--warn-soft); color: #5F4512; border: 1px solid #EBD9B1; }
.notice.calm { background: var(--info-soft); color: var(--ink-2); border-color: var(--rule); }

/* ---------- Accueil : l'étagère des SCI ---------- */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1rem; }
.binder { display: grid; grid-template-columns: 54px 1fr; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-l); overflow: hidden; color: inherit; transition: border-color .15s, transform .15s; }
.binder:hover { text-decoration: none; border-color: var(--silver); transform: translateY(-1px); }
.binder, .binder:hover { text-decoration: none; }
.binder .back { position: relative; display: flex; flex-direction: column; align-items: center; padding: 14px 0; box-shadow: inset -6px 0 0 rgba(0,0,0,.12); }
.binder .back .ring { width: 14px; height: 14px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 2px 3px rgba(0,0,0,.35); }
.binder .back .plate { margin-top: 14px; background: rgba(255,255,255,.92); color: var(--ink); border-radius: 3px; width: 34px; padding: .45rem 0; text-align: center; font-weight: 700; font-size: .78rem; letter-spacing: .02em; }
.binder .back .ribs { margin-top: auto; display: grid; gap: 4px; width: 30px; }
.binder .back .ribs i { display: block; height: 3px; background: rgba(255,255,255,.35); border-radius: 2px; }
.binder .face { padding: .9rem 1rem .85rem; min-width: 0; display: flex; flex-direction: column; gap: .55rem; }
.binder .face h3 { font-size: 1.15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.binder .face .meta { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: .85rem; }
.binder .figures { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem .8rem; }
.binder .figures .k { color: var(--muted); font-size: .82rem; }
.binder .figures .v { font-weight: 600; font-variant-numeric: tabular-nums; }
.binder .todo-line { display: flex; gap: .4rem; flex-wrap: wrap; }
.binder.new { grid-template-columns: 1fr; place-items: center; min-height: 150px; border-style: dashed; color: var(--muted); background: transparent; }
.binder.new:hover { color: var(--ink); border-color: var(--ink); }

.group-strip { display: flex; gap: 2rem; align-items: baseline; margin: .2rem 0 1.4rem; flex-wrap: wrap; }
.group-strip .big { font-family: var(--serif); font-size: 2.4rem; font-weight: 400; font-variant-numeric: lining-nums tabular-nums; letter-spacing: -0.02em; }
.group-strip .k { color: var(--muted); }

/* ---------- Graphique mensuel ---------- */
.bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: .5rem; align-items: end; height: 170px; padding: .6rem 0 0; }
.bars .m { display: flex; flex-direction: column; align-items: center; gap: .35rem; height: 100%; justify-content: flex-end; }
.bars .pair { display: flex; gap: 3px; align-items: flex-end; height: 140px; }
.bars .pair span { width: 10px; border-radius: 2px 2px 0 0; min-height: 1px; }
.bars .pair .in { background: var(--primary); }
.bars .pair .out { background: var(--silver); }
.bars .lbl { font-size: .78rem; color: var(--muted); }
.legend { display: flex; gap: 1rem; color: var(--muted); font-size: .86rem; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: .35rem; vertical-align: -1px; }

/* ---------- Pièce : aperçu + formulaire côte à côte ---------- */
.doc-view { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(360px, 1fr); gap: 1.2rem; align-items: start; }
.doc-preview { background: #E7EAEC; border: 1px solid var(--rule); border-radius: var(--radius-l); height: calc(100vh - 170px); min-height: 520px; overflow: hidden; position: sticky; top: 72px; }
.doc-preview iframe, .doc-preview object, .doc-preview img { width: 100%; height: 100%; border: 0; object-fit: contain; background: #E7EAEC; }
.dropzone { border: 2px dashed #B9C2CA; border-radius: var(--radius-l); padding: 1.6rem; text-align: center; color: var(--muted); background: #FAFBFB; transition: border-color .15s, background .15s; }
.dropzone.over { border-color: var(--ink); background: var(--pearl); color: var(--ink); }
.dropzone strong { color: var(--ink); }
.confidence { height: 6px; border-radius: 3px; background: var(--rule-soft); overflow: hidden; }
.confidence i { display: block; height: 100%; background: var(--pos); }
.confidence.mid i { background: var(--brass); }
.confidence.low i { background: var(--neg); }

/* ---------- Saisie d'écriture ---------- */
table.lines td { padding: .3rem .35rem; }
table.lines input { min-height: 34px; }
table.lines .acc { width: 150px; }
table.lines .amt { width: 140px; }
table.lines .rm { width: 36px; text-align: center; }
.totals { display: flex; gap: 1.5rem; justify-content: flex-end; padding: .7rem 1rem; font-variant-numeric: tabular-nums; }
.totals .gap { font-weight: 600; }
.totals .gap.ok { color: var(--pos); }
.totals .gap.ko { color: var(--neg); }

.kv { display: grid; grid-template-columns: 170px 1fr; gap: .45rem 1rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.hash { font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }

/* ---------- Écran de connexion (maquette Sfez Family Office) ---------- */
.auth { min-height: 100vh; display: flex; flex-wrap: wrap; background: #fff; font-family: var(--serif); color: var(--ink); }
.auth .side { flex: 1 1 640px; background: var(--pearl); padding: 48px 56px 0; display: flex; flex-direction: column; gap: 16px; min-height: 600px; overflow: hidden; position: relative; }
.auth .crest { position: absolute; top: -28px; left: -48px; height: 330px; width: auto; opacity: .15; pointer-events: none;
  -webkit-mask-image: linear-gradient(135deg, #000 0%, #000 28%, transparent 76%); mask-image: linear-gradient(135deg, #000 0%, #000 28%, transparent 76%); }
.auth .lockup { position: relative; align-self: flex-end; display: flex; align-items: center; gap: 16px; }
.auth .lockup b { font-weight: 400; font-size: 84px; line-height: 1; letter-spacing: .005em; }
.auth .lockup span { font-size: 34px; line-height: .9; padding-top: 5px; }
.auth .avenue { display: block; width: calc(100% + 112px); max-width: none; height: auto; margin: auto -56px 0; }
.auth .form-side { flex: 1 1 460px; display: flex; flex-direction: column; align-items: center; padding: 64px 40px 32px; }
.auth form { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 22px; margin: auto 0; }
.auth h1 { font-size: 50px; line-height: 1.05; margin: 0 0 6px; }
.auth .rule { height: 1px; background: var(--silver); margin-bottom: 6px; }
.auth label { font-family: var(--serif); font-size: 16px; font-weight: 500; margin: 0 0 8px; }
.auth input { font-family: var(--serif); font-size: 17px; padding: 12px 14px; border: 1px solid var(--silver); border-radius: 0; min-height: 50px; }
.auth .field { margin: 0; display: flex; flex-direction: column; }
.auth button { font-family: var(--serif); font-size: 17px; font-weight: 500; letter-spacing: .03em; background: var(--ink); color: #fff; border: 0; border-radius: 0; padding: 14px 24px; min-height: 54px; margin-top: 6px; cursor: pointer; }
.auth button:hover { background: var(--primary-hover); }
.auth .address { margin: 40px 0 0; font-size: 15px; color: var(--muted); letter-spacing: .02em; }
.auth .hint { font-size: 15px; color: var(--muted); margin: 0; }
.auth .field .hint { font-size: 14px; margin-top: 6px; }
.auth .flashes { margin: 0; }
.auth .btn { font-family: var(--serif); }

/* ---------- Écran étroit ---------- */
@media (max-width: 1080px) {
  .grid.split, .doc-view { grid-template-columns: 1fr; }
  .doc-preview { position: static; height: 70vh; }
  .ledger-strip { grid-template-columns: repeat(2, 1fr); }
  .ledger-strip > div:nth-child(3) { border-left: 0; }
  .ledger-strip > div:nth-child(n+3) { border-top: 1px solid var(--rule-soft); }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: transform .2s; z-index: 50; }
  body.nav-open .sidebar { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.35); }
  .topbar .menu-toggle { display: inline-flex; }
  .topbar { padding: .6rem 1rem; }
  .content { padding: 1.1rem 1rem 3rem; }
  .grid.two, .grid.three { grid-template-columns: 1fr; }
  .auth .side { min-height: 0; padding: 28px 24px 0; }
  .auth .crest { height: 200px; }
  .auth .lockup b { font-size: 56px; }
  .auth .lockup span { font-size: 23px; }
  .auth .avenue { width: calc(100% + 48px); margin: 24px -24px 0; }
  .kv { grid-template-columns: 1fr; }
  .fy-select span { display: none; }
  .topbar .crumbs { display: none; }
  .topbar .right { margin-left: 0; flex: 1; justify-content: flex-end; }
  .row.three-up { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
@media print {
  .sidebar, .topbar, .page-head .actions, .toolbar, .tabs, .bulkbar, .btn { display: none !important; }
  .shell { display: block; }
  .content { padding: 0; max-width: none; }
  .panel { border: 0; }
  body { background: #fff; }
}
