/* ===== Zaouia360 Gestion — interface ===== */
@font-face { font-family: 'Manrope'; font-style: normal; font-display: swap; font-weight: 200 800; src: url(/fonts/manrope-latin-wght-normal.woff2) format('woff2'); 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: 'Manrope'; font-style: normal; font-display: swap; font-weight: 200 800; src: url(/fonts/manrope-latin-ext-wght-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,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: 'Bricolage'; font-style: normal; font-display: swap; font-weight: 200 800; src: url(/fonts/bricolage-grotesque-latin-wght-normal.woff2) format('woff2'); 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: 'Bricolage'; font-style: normal; font-display: swap; font-weight: 200 800; src: url(/fonts/bricolage-grotesque-latin-ext-wght-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

:root {
  --bg: #F3F2F8; --card: #FFFFFF; --ink: #15131D; --ink2: #4B475C; --mute: #8A86A0; --line: #E6E4EE; --line2: #F0EFF5;
  --accent: #7145FE; --accent-ink: #5229E8; --accent-soft: #EEE9FF; --deep: #22175A;
  --cyan: #22F5EF; --cyan-soft: #DAFDFB; --cyan-ink: #0A8A85;
  --good: #17845A; --good-soft: #E1F4EC; --warn: #B86E00; --warn-soft: #FDF1DC; --bad: #D43A47; --bad-soft: #FCE7E9;
  --blue: #5229E8; --blue-soft: #EEE9FF;
  --r: 12px; --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif; --display: 'Bricolage', 'Manrope', system-ui, sans-serif;
  --ring: 0 0 0 3px rgba(113, 69, 254, .22);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 var(--font); font-feature-settings: 'tnum' 0; -webkit-font-smoothing: antialiased; }
a { color: var(--accent-ink); text-decoration: none; } a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1 { font: 650 28px/1.15 var(--display); margin: 0; letter-spacing: -.015em; }
h2 { font: 650 16px/1.3 var(--display); margin: 0; letter-spacing: -.005em; }
h3 { font-size: 14px; margin: 0; }
code { background: var(--line2); padding: 1px 6px; border-radius: 5px; font-size: 12.5px; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }
.muted { color: var(--mute); } .sm { font-size: 12.5px; } .r { text-align: right; } .nowrap { white-space: nowrap; }
.pre { white-space: pre-line; } .neg { color: var(--bad); } .pos { color: var(--good); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.loading { padding: 60px; color: var(--mute); }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.side { background: var(--ink); color: #CFCBE0; padding: 22px 14px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; overflow-y: auto; }
.brand { padding: 0 10px 22px; }
.brand img { display: block; width: 138px; height: auto; }
.nav-group { margin-bottom: 14px; }
.nav-group > span { display: block; font-size: 11.5px; color: #77728D; padding: 0 10px 6px; font-weight: 600; }
.side nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 9px; color: #CFCBE0; font-size: 13.5px; font-weight: 550; position: relative; }
.side nav a:hover { background: #221F2D; color: #fff; text-decoration: none; }
.side nav a.on { background: #2B2148; color: #fff; }
.side nav a.on::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--cyan); }
.side nav .ic { opacity: .8; flex: none; } .side nav a.on .ic { opacity: 1; color: var(--cyan); }
.side nav .count { margin-left: auto; font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center; background: #2E2A3C; color: #E6E3F2; }
.side nav .count.alert { background: var(--bad); color: #fff; }
.side-foot { margin-top: auto; font-size: 11.5px; color: #6A6680; padding: 12px 10px 0; border-top: 1px solid #25222F; }
.main { padding: 0 36px 72px; max-width: 1360px; width: 100%; }

.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 14px 0; margin-bottom: 8px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); }
.search-btn { flex: 1; max-width: 460px; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--mute); font: inherit; cursor: text; text-align: left; }
.search-btn:hover { border-color: #D3D0E0; }
.search-btn kbd, .kbd { margin-left: auto; font: 600 11px var(--font); color: var(--mute); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; background: var(--line2); }
.topbar .spacer { flex: 1; }
.create-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); width: 270px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px -12px rgba(21, 19, 29, .25); padding: 6px; z-index: 40; animation: pop .14s ease-out; }
.menu button { display: flex; width: 100%; align-items: center; gap: 10px; border: 0; background: none; padding: 8px 10px; border-radius: 8px; font: inherit; color: var(--ink); cursor: pointer; text-align: left; }
.menu button:hover, .menu button.on { background: var(--accent-soft); }
.menu button small { color: var(--mute); margin-left: auto; font-size: 11.5px; }
.menu hr { border: 0; border-top: 1px solid var(--line2); margin: 5px 4px; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }

/* ---------- page ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 10px 0 22px; flex-wrap: wrap; }
.page-head .sub { color: var(--ink2); margin-top: 6px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; color: var(--mute); margin-bottom: 8px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.note { color: var(--mute); font-size: 12.5px; max-width: 760px; }
.unsaved { color: var(--warn); font-size: 13px; }
.banner { background: var(--accent-soft); color: var(--accent-ink); padding: 11px 14px; border-radius: 10px; margin-bottom: 14px; }

/* ---------- boutons & champs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 0 14px; border-radius: 9px; font: 600 13.5px var(--font); cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover { border-color: #CFCBDD; background: #FBFAFE; text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 6px 14px -8px rgba(113, 69, 254, .9); }
.btn.primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink2); } .btn.ghost:hover { background: rgba(21,19,29,.05); }
.btn.danger-ghost { background: transparent; border-color: transparent; color: var(--bad); } .btn.danger-ghost:hover { background: var(--bad-soft); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; } .btn.xs { height: 26px; width: 26px; padding: 0; border-radius: 7px; }
.btn:disabled { opacity: .5; cursor: default; }
input, select, textarea { font: inherit; color: var(--ink); border: 1px solid var(--line); border-radius: 9px; padding: 8px 11px; background: #fff; width: 100%; min-height: 38px; transition: border-color .12s, box-shadow .12s; }
input:hover, select:hover, textarea:hover { border-color: #D6D3E3; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
input:disabled { background: var(--line2); color: var(--mute); }
input[type=checkbox] { min-height: 0; }
textarea { resize: vertical; line-height: 1.45; }
.toolbar select, .toolbar input { width: auto; }
.search { min-width: 240px; }
.check { display: inline-flex; gap: 7px; align-items: center; color: var(--ink2); } .check input { width: auto; accent-color: var(--accent); }
.chips { display: inline-flex; gap: 2px; background: #E9E7F1; border-radius: 10px; padding: 3px; flex-wrap: wrap; }
.chip { border: 0; background: transparent; padding: 5px 12px; border-radius: 8px; font: 600 13px var(--font); color: var(--ink2); cursor: pointer; }
.chip:hover { color: var(--ink); }
.chip.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(21,19,29,.08), 0 0 0 1px rgba(21,19,29,.04); }

/* ---------- cartes ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 18px; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2 a { color: var(--ink); }
.card-head > a { font-size: 13px; font-weight: 600; }
.cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 20px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 15px; }
.tile.click { cursor: pointer; transition: border-color .12s; } .tile.click:hover { border-color: #CBC6DD; }
.tile-l { font-size: 12.5px; color: var(--mute); font-weight: 600; }
.tile-v { font: 650 23px/1.2 var(--display); margin-top: 6px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.tile-s { font-size: 12px; color: var(--ink2); margin-top: 4px; }
.tile.t-good .tile-v { color: var(--good); } .tile.t-warn .tile-v { color: var(--warn); }
.tile.t-ink { background: var(--deep); border-color: var(--deep); } .tile.t-ink .tile-v { color: #fff; } .tile.t-ink .tile-l, .tile.t-ink .tile-s { color: #B8ADEB; } .tile.t-ink a { color: var(--cyan); }
.tile.add { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--mute); border-style: dashed; background: transparent; }

/* ---------- tableaux ---------- */
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th { text-align: left; font-size: 12px; color: var(--mute); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #FAFAFD; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line2); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.click { cursor: pointer; } tbody tr.click:hover td { background: #F8F6FF; }
tfoot td { font-weight: 700; background: #FAFAFD; border-top: 1px solid var(--line); border-bottom: 0; font-variant-numeric: tabular-nums; }
.card:not(.flush) th { background: transparent; }
.card:not(.flush) table th:first-child, .card:not(.flush) table td:first-child { padding-left: 2px; }
.card:not(.flush) table th:last-child, .card:not(.flush) table td:last-child { padding-right: 2px; }
.empty { color: var(--mute); padding: 34px 20px; text-align: center; }
.empty .btn { margin-top: 12px; }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; padding: 2px 9px 2px 8px; border-radius: 99px; background: var(--line2); color: var(--ink2); white-space: nowrap; line-height: 1.6; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.b-en_cours, .b-envoye, .b-partielle { background: var(--accent-soft); color: var(--accent-ink); }
.b-payee, .b-accepte, .b-livre { background: var(--good-soft); color: var(--good); }
.b-retard, .b-refuse, .b-annulee, .b-annule { background: var(--bad-soft); color: var(--bad); }
.b-impayee, .b-prospect, .b-apayer { background: var(--warn-soft); color: var(--warn); }
.b-clos, .b-brouillon { background: #ECEBF2; color: var(--ink2); }

.prog { position: relative; width: 120px; height: 8px; background: var(--line2); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.prog div { height: 100%; background: var(--accent); border-radius: 99px; }
.prog span { position: absolute; right: -36px; top: -6px; font-size: 11.5px; color: var(--ink2); font-weight: 600; }
.progw { display: inline-flex; align-items: center; gap: 8px; } .progw .prog { margin: 0; } .progw small { font-size: 12px; color: var(--ink2); font-weight: 600; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { border: 0; background: none; font: 600 13.5px var(--font); padding: 10px 12px; color: var(--mute); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--ink); border-color: var(--accent); }

.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 28px; margin-bottom: 16px; }
.kv > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line2); }
.kv > div span { color: var(--ink2); } .kv .hl b { color: var(--accent-ink); font-size: 15px; }
.kv .wide { grid-column: 1/-1; display: block; } .kv .wide p { margin: 6px 0 0; }

/* ---------- missions ---------- */
.mlist { list-style: none; margin: 0; padding: 0; }
.mrow { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line2); border-radius: 8px; }
.mrow:hover { background: #FAF9FE; }
.mrow:last-child { border-bottom: 0; }
.mrow input[type=checkbox] { appearance: none; width: 20px; height: 20px; border: 1.5px solid #C9C5D8; border-radius: 6px; flex: none; cursor: pointer; display: grid; place-items: center; transition: background .12s, border-color .12s; padding: 0; }
.mrow input[type=checkbox]:checked { background: var(--good); border-color: var(--good); }
.mrow input[type=checkbox]:checked::after { content: ""; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.mbody { flex: 1; cursor: pointer; min-width: 0; } .mtitle { font-weight: 600; }
.mbody .muted { margin-top: 1px; }
.mrow.done .mtitle { text-decoration: line-through; color: var(--mute); font-weight: 500; }
.due { font-size: 12px; color: var(--ink2); white-space: nowrap; font-weight: 600; } .due.late { color: var(--bad); }
.quickadd { display: flex; gap: 8px; flex: 1; max-width: 620px; }

/* ---------- formulaires / panneau latéral ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid.g4 { grid-template-columns: repeat(4, 1fr); }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 12.5px; font-weight: 650; color: var(--ink2); }
.field small { color: var(--mute); font-size: 12px; }
.field.wide { grid-column: 1/-1; } .field.span2 { grid-column: span 2; }
.row-input { display: flex; gap: 6px; align-items: center; } .row-input select, .row-input input { flex: 1; }
.info-val { padding: 8px 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.logo-prev { max-height: 60px; max-width: 200px; margin-top: 6px; object-fit: contain; }

.overlay { position: fixed; inset: 0; background: rgba(21, 19, 29, .38); backdrop-filter: blur(2px); z-index: 50; display: flex; justify-content: flex-end; animation: fade .16s ease-out; }
.modal { background: #fff; width: min(680px, 100vw); height: 100vh; overflow-y: auto; padding: 0 26px; box-shadow: -24px 0 60px -20px rgba(21, 19, 29, .35); animation: slide .2s cubic-bezier(.2, .8, .2, 1); display: flex; flex-direction: column; }
.modal > * { display: flex; flex-direction: column; min-height: 100%; }
.modal:has(.conv), .modal:has(.billlist) { width: min(820px, 100vw); }
.modal-head { position: sticky; top: 0; z-index: 2; background: #fff; display: flex; justify-content: space-between; align-items: center; padding: 20px 0 14px; margin-bottom: 8px; border-bottom: 1px solid var(--line2); }
.modal-head h3 { font: 650 19px/1.25 var(--display); }
.modal-foot { position: sticky; bottom: 0; background: #fff; display: flex; gap: 8px; align-items: center; margin-top: auto; padding: 14px 0 20px; border-top: 1px solid var(--line2); }
.modal .form-grid { padding-bottom: 18px; }
.spacer { flex: 1; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(32px); opacity: .4; } }

.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 99; align-items: center; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; padding: 10px 16px 10px 12px; border-radius: 11px; box-shadow: 0 12px 30px -10px rgba(21,19,29,.5); max-width: 480px; font-weight: 550; animation: pop .16s ease-out; }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); flex: none; }
.toast.err { background: var(--bad); } .toast.err::before { background: #fff; }

/* ---------- éditeur de document ---------- */
table.lines td { vertical-align: top; padding: 10px 12px; }
table.lines textarea { min-height: 40px; }
.num-in { width: 80px; text-align: right; } .num-in.w { width: 116px; } .unit-in { width: 96px; }
table.lines td.num { padding-top: 18px; font-weight: 700; }
.line-act { white-space: nowrap; padding-top: 14px !important; }
.lines-foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 16px 20px 20px; flex-wrap: wrap; border-top: 1px solid var(--line2); }
.totals { min-width: 340px; }
.totals > div { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 5px 0; font-variant-numeric: tabular-nums; }
.totals .strong { border-top: 1px solid var(--line); font-weight: 700; }
.totals .grand { border-top: 2px solid var(--ink); font: 650 19px var(--display); padding-top: 9px; }
.totals .words { display: block; font-size: 12px; color: var(--mute); font-style: italic; text-align: right; }
.pct-in { width: 66px; padding: 4px 7px; min-height: 30px; text-align: right; display: inline-block; }

/* ---------- palette de recherche ---------- */
.palette-ov { position: fixed; inset: 0; background: rgba(21, 19, 29, .38); backdrop-filter: blur(2px); z-index: 60; display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; animation: fade .12s; }
.palette { width: min(620px, 92vw); background: #fff; border-radius: 16px; box-shadow: 0 30px 80px -20px rgba(21, 19, 29, .45); overflow: hidden; animation: pop .14s ease-out; }
.palette > input { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 16px; padding: 16px 18px; min-height: 56px; box-shadow: none !important; }
.palette ul { list-style: none; margin: 0; padding: 6px; max-height: 52vh; overflow-y: auto; }
.palette li { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 9px; cursor: pointer; }
.palette li.on { background: var(--accent-soft); }
.palette li .pk { font-size: 11.5px; font-weight: 650; color: var(--mute); width: 74px; flex: none; }
.palette li .pt { flex: 1; min-width: 0; } .palette li .pt small { display: block; color: var(--mute); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette li .num { font-size: 12.5px; color: var(--ink2); }
.palette .ph { padding: 18px; color: var(--mute); text-align: center; }
.palette-foot { display: flex; gap: 14px; padding: 9px 16px; border-top: 1px solid var(--line2); font-size: 12px; color: var(--mute); background: #FAFAFD; }

/* ---------- tableau de bord ---------- */
.hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 10px 0 18px; flex-wrap: wrap; }
.hello h1 { font-size: 30px; }
.hello p { margin: 6px 0 0; color: var(--ink2); }
.money { background: var(--deep); color: #fff; border-radius: 18px; padding: 22px 26px; display: grid; grid-template-columns: 1.25fr repeat(4, 1fr); gap: 8px 26px; margin-bottom: 18px; position: relative; overflow: hidden; }
.money > div { min-width: 0; }
.money .ml { font-size: 12.5px; color: #B8ADEB; font-weight: 600; }
.money .mv { font: 650 26px/1.15 var(--display); margin-top: 6px; font-variant-numeric: tabular-nums; letter-spacing: -.015em; white-space: nowrap; }
.money .ms { font-size: 12px; color: #A397DD; margin-top: 4px; }
.money .total .mv { font-size: 38px; }
.money .total { padding-right: 18px; }
.money .split { display: flex; height: 6px; border-radius: 99px; overflow: hidden; margin-top: 14px; background: rgba(255,255,255,.1); }
.money .split i { display: block; height: 100%; } .money .split i:first-child { background: var(--cyan); } .money .split i:last-child { background: #9C82FF; }
.money .legend { display: flex; gap: 14px; margin-top: 8px; font-size: 11.5px; color: #B8ADEB; }
.money .legend b { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.money a.mcell { color: inherit; text-decoration: none; border-radius: 10px; margin: -8px; padding: 8px; transition: background .12s; } .money a.mcell:hover { background: rgba(255,255,255,.06); }
.money .in { color: var(--cyan); } .money .out { color: #FFB4BB; }

.todo { list-style: none; margin: 0; padding: 0; }
.todo li { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--line2); }
.todo li:last-child { border-bottom: 0; }
.todo .dot { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--line2); color: var(--ink2); }
.todo .dot.bad { background: var(--bad-soft); color: var(--bad); } .todo .dot.warn { background: var(--warn-soft); color: var(--warn); } .todo .dot.acc { background: var(--accent-soft); color: var(--accent-ink); } .todo .dot.cy { background: var(--cyan-soft); color: var(--cyan-ink); }
.todo .tt { flex: 1; min-width: 0; } .todo .tt b { display: block; font-weight: 650; } .todo .tt small { color: var(--mute); font-size: 12.5px; }
.todo .amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.allclear { display: flex; align-items: center; gap: 12px; padding: 18px 4px; color: var(--ink2); }
.allclear i { width: 34px; height: 34px; border-radius: 10px; background: var(--good-soft); color: var(--good); display: grid; place-items: center; }

.year { display: flex; flex-direction: column; gap: 14px; }
.year .yrow { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.year .yrow span { color: var(--ink2); } .year .yrow b { font: 650 18px var(--display); font-variant-numeric: tabular-nums; }
.bar { height: 8px; background: var(--line2); border-radius: 99px; overflow: hidden; display: flex; }
.bar i { display: block; height: 100%; }

.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.pcard { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; cursor: pointer; display: flex; flex-direction: column; gap: 12px; transition: border-color .12s, box-shadow .12s; }
.pcard:hover { border-color: #CBC2F5; box-shadow: 0 8px 24px -14px rgba(82, 41, 232, .4); }
.pcard .ph { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.pcard h3 { font: 650 16px/1.3 var(--display); }
.pcard .pc { color: var(--mute); font-size: 12.5px; margin-top: 2px; }
.pcard .pm { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-top: 12px; border-top: 1px solid var(--line2); }
.pcard .pm span { display: block; font-size: 11.5px; color: var(--mute); font-weight: 600; } .pcard .pm b { font-variant-numeric: tabular-nums; font-size: 14px; }
.pcard .pp { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink2); }
.pcard .pp .prog { flex: 1; width: auto; margin: 0; }
.pcard .pf { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink2); }
.pcard.add { border-style: dashed; align-items: center; justify-content: center; color: var(--mute); min-height: 160px; background: transparent; }
.pcard.add:hover { color: var(--accent-ink); box-shadow: none; }
.update-bar { margin-top: 4px; }

@media (max-width: 1100px) { .money { grid-template-columns: 1fr 1fr; } .money .total { grid-column: 1/-1; border-right: 0; padding-right: 0; } }
@media (max-width: 1000px) {
  .shell { grid-template-columns: 1fr; } .side { position: static; height: auto; padding: 12px; }
  .side nav { display: flex; gap: 4px; overflow-x: auto; } .nav-group { display: contents; } .nav-group > span, .side-foot { display: none; }
  .side nav a { white-space: nowrap; } .side nav a.on::before { display: none; }
  .brand { padding: 0 6px 10px; } .brand img { width: 110px; }
  .cols { grid-template-columns: 1fr; } .form-grid.g4 { grid-template-columns: 1fr 1fr; } .main { padding: 0 16px 60px; }
}
@media (max-width: 640px) { .form-grid, .form-grid.g4 { grid-template-columns: 1fr; } .field.span2 { grid-column: auto; } .money { grid-template-columns: 1fr; } .hello h1 { font-size: 24px; } .search-btn kbd { display: none; } }

/* ============ impression ============ */
body.printing { background: #e7e7ee; }
.print-bar { position: sticky; top: 0; display: flex; gap: 14px; align-items: center; justify-content: center; padding: 12px; background: var(--ink); color: #c9c8d6; font-size: 13px; z-index: 5; }
.sheet { width: 210mm; min-height: 297mm; margin: 24px auto; background: #fff; padding: 16mm 15mm 12mm; display: flex; flex-direction: column; box-shadow: 0 4px 30px rgba(0, 0, 0, .12); font-size: 10pt; color: #0e0e14; line-height: 1.4; }
.sheet .lbl { font-size: 8pt; text-transform: uppercase; letter-spacing: .08em; color: #888897; font-weight: 600; margin-bottom: 3px; }
.sh-head { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 14px; border-bottom: 2px solid var(--accent); }
.sh-logo { height: 58px; max-width: 220px; object-fit: contain; display: block; margin-bottom: 8px; }
.sh-name { font-size: 20pt; font-weight: 800; color: var(--accent); letter-spacing: -.01em; margin-bottom: 6px; }
.sh-co { font-size: 8.5pt; color: #4a4a58; }
.sh-title { text-align: right; }
.sh-kind::after { content: ""; display: block; width: 34px; height: 4px; background: #22F5EF; margin: 8px 0 0 auto; border-radius: 2px; }
.sh-kind { font-size: 24pt; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); line-height: 1; margin-bottom: 8px; }
.sh-meta { width: auto; margin-left: auto; } .sh-meta td { padding: 1px 0 1px 12px; border: 0; font-size: 9.5pt; } .sh-meta td:first-child { color: #888897; }
.sh-parties { display: flex; justify-content: space-between; gap: 24px; margin: 18px 0 16px; }
.sh-subject { flex: 1; padding-top: 4px; } .sh-subj { font-size: 11pt; font-weight: 600; }
.sh-client { width: 46%; border: 1px solid #e4e4ec; border-radius: 6px; padding: 10px 12px; }
.sh-client b { font-size: 11pt; }
.sh-lines th { background: #f3f0ff; color: #4a4a58; font-size: 8pt; padding: 7px 8px; border-bottom: 1px solid #cfcedb; }
.sh-lines td { padding: 8px; border-bottom: 1px solid #ececf3; font-size: 9.5pt; }
.sh-lines td.pre { white-space: pre-line; }
.sh-bottom { display: flex; justify-content: space-between; gap: 24px; margin-top: 14px; align-items: flex-start; }
.sh-words { flex: 1; font-size: 9.5pt; padding-top: 4px; } .sh-words > div:last-child { font-weight: 600; font-style: italic; }
.sh-totals { width: 44%; } .sh-totals td { padding: 4px 8px; border: 0; font-variant-numeric: tabular-nums; } .sh-totals td:last-child { text-align: right; white-space: nowrap; }
.sh-totals .grand td { background: var(--accent); color: #fff; font-weight: 700; font-size: 11pt; padding: 7px 8px; }
.sh-terms { margin-top: 16px; font-size: 9pt; color: #33333f; }
.sh-sign { display: flex; justify-content: space-between; gap: 24px; margin-top: 22px; }
.sh-sign .box { width: 46%; min-height: 32mm; border: 1px dashed #c9c8d6; border-radius: 6px; padding: 8px 12px; }
.sh-sign small { color: #888897; }
.sh-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid #e4e4ec; font-size: 7.5pt; color: #888897; text-align: center; }
@page { size: A4; margin: 10mm 0; }
@media print {
  body, body.printing { background: #fff; }
  .noprint { display: none !important; }
  .sheet { margin: 0; box-shadow: none; width: 210mm; min-height: 275mm; padding: 6mm 15mm 0; }
  .sh-lines tr, .sh-bottom, .sh-sign { break-inside: avoid; }
  .sh-totals .grand td, .sh-lines th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

.sh-totals .grand td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
@media print { .sh-kind::after { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* missions facturables, bons, choix de type */
.mprice { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; margin-top: 1px; }
.mtobill, .mbilled { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 99px; white-space: nowrap; }
.mtobill { background: var(--warn-soft); color: var(--warn); }
.mbilled { background: var(--accent-soft); color: var(--accent-ink); }
.quickadd .qa-price { width: 110px; flex: none; }
.b-bon { background: #0e0e14; color: var(--cyan); }
.billlist { list-style: none; margin: 0 0 8px; padding: 0; border: 1px solid var(--line); border-radius: 10px; max-height: 50vh; overflow: auto; }
.billlist li { border-bottom: 1px solid var(--line2); } .billlist li:last-child { border-bottom: 0; }
.billlist li.on { background: #f7f5ff; }
.billlist label { display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; }
.billlist input { width: 17px; height: 17px; accent-color: var(--accent); flex: none; }
.bl-t { flex: 1; } .bl-t small { display: block; color: var(--mute); font-size: 11.5px; }
.pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pick-opt { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 16px; cursor: pointer; font: inherit; display: flex; flex-direction: column; gap: 6px; }
.pick-opt:hover { border-color: var(--accent); background: #f7f5ff; }
.pick-opt b { font-size: 15px; } .pick-opt span { color: var(--ink2); font-size: 13px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 3px; background: #fff; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 7px; font: inherit; cursor: pointer; color: var(--ink2); }
.seg button.on { background: var(--accent); color: #fff; }
.sh-kind.long { font-size: 19pt; }

.conv { border: 1px solid var(--line); border-radius: 10px; max-height: 46vh; overflow: auto; }
.conv td { vertical-align: middle; } .conv .was { font-size: 11px; color: var(--warn); margin-top: 2px; }
.conv-tot { margin: 12px 0 0 auto; width: 300px; } .conv-tot > div { display: flex; justify-content: space-between; padding: 4px 0; font-variant-numeric: tabular-nums; }
.conv-tot .grand { border-top: 2px solid var(--ink); font-size: 16px; margin-top: 4px; padding-top: 7px; }
textarea[readonly], input[readonly] { background: var(--line2); color: var(--ink2); }
.modal:has(.conv) { max-width: 860px; }

.conv-more { font-size: 11.5px; color: var(--mute); margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.conv-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 4px 0 12px; flex-wrap: wrap; }
.form-grid.g3 { grid-template-columns: repeat(3, 1fr); } .imp { margin-bottom: 12px; }
.warnbox { background: var(--warn-soft); color: var(--warn); padding: 8px 12px; border-radius: 8px; margin-bottom: 10px; font-size: 13px; }
.check.sm { font-size: 12.5px; margin-top: 6px; }

/* pièces jointes */
.att { display: flex; flex-direction: column; gap: 6px; border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; }
.att-row { display: flex; gap: 12px; align-items: center; }
.att-k { width: 80px; flex: none; font-size: 12.5px; color: var(--ink2); font-weight: 600; }
.att-files { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.att-file { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft); border-radius: 8px; padding: 3px 4px 3px 10px; font-size: 13px; }
.att-file small { color: var(--mute); }
.att-off { font-size: 12.5px; color: var(--warn); background: var(--warn-soft); padding: 8px 12px; border-radius: 8px; }
.att-badges { display: inline-flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.attb { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-ink); }
.attb.k-facture { background: var(--cyan-soft); color: #0b7f7a; }
.update-bar { background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-weight: 500; }

/* paiements d'une charge */
.pays { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.pays table td { padding: 5px 4px; border-bottom: 1px solid var(--line2); }
.pays-sum { display: flex; gap: 18px; font-size: 13.5px; flex-wrap: wrap; }
.pays-add { display: grid; grid-template-columns: 1.3fr 1fr 0.9fr auto; gap: 8px; align-items: center; }

/* compléments shell */
.side .nav-bottom { margin-top: auto; padding-top: 10px; }
.side-foot { margin-top: 10px; }
a.brand { display: block; }
.prog { display: block; }
.search-btn .sb-s { display: none; }
@media (max-width: 1000px) { .side .nav-bottom { display: none; } .side { flex-direction: column; } }
@media (max-width: 640px) { .search-btn .sb-l { display: none; } .search-btn .sb-s { display: inline; } .money .total .mv { font-size: 30px; } .money .mv { font-size: 22px; } .main { padding: 0 14px 60px; } }
.conv-tot .pdfref { font-size: 12.5px; color: var(--mute); border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 6px; }
.conv-tot .pdfref.diff { color: var(--warn); }

/* import PDF */
.dropzone { display: flex; align-items: center; gap: 14px; border: 1.5px dashed #C9C0F2; background: #FBFAFF; border-radius: 14px; padding: 16px 18px; margin-bottom: 16px; cursor: pointer; transition: background .12s, border-color .12s; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone b { font-size: 14.5px; }
.dz-ic { width: 42px; height: 42px; border-radius: 12px; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.dropall { position: fixed; inset: 0; z-index: 70; background: rgba(34, 23, 90, .55); backdrop-filter: blur(3px); display: grid; place-items: center; pointer-events: none; animation: fade .12s; }
.dropall > div { background: #fff; border: 2px dashed var(--accent); border-radius: 20px; padding: 36px 54px; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--accent-ink); }
.dropall b { font: 650 20px var(--display); color: var(--ink); } .dropall span { color: var(--mute); }
.mkproj { font-weight: 600; }
.detected { display: flex; align-items: center; gap: 10px; background: var(--line2); border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; color: var(--ink2); }
.step { margin-bottom: 16px; }
.step-h { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13.5px; margin-bottom: 8px; }
.pchoose { display: flex; flex-direction: column; gap: 10px; }
.pc-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .pc-row > input, .pc-row > select { flex: 1; min-width: 220px; } .pc-row .check { white-space: nowrap; }

/* avances commerciaux */
.adv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.adv-grid > div { background: var(--line2); border-radius: 10px; padding: 10px 12px; }
.adv-grid span { display: block; font-size: 12px; color: var(--mute); font-weight: 600; }
.adv-grid b { font: 650 18px var(--display); font-variant-numeric: tabular-nums; }
.adv-grid .hl { background: var(--warn-soft); } .adv-grid .hl b { color: var(--warn); }
.adv-grid .ok { background: var(--good-soft); } .adv-grid .ok b { color: var(--good); }
.adv-bar { height: 8px; border-radius: 99px; background: var(--line2); overflow: hidden; margin: 14px 0 8px; }
.adv-bar i { display: block; height: 100%; background: var(--good); border-radius: 99px; }
.adv-note { margin: 0; color: var(--ink2); }
@media (max-width: 800px) { .adv-grid { grid-template-columns: 1fr 1fr; } }
.adv-grid small { display: block; font-size: 11.5px; margin-top: 2px; }

/* ================= thème v3 : cartes douces, sidebar claire ================= */
:root {
  --bg: #EEEDF5; --line: #ECEBF3; --line2: #F3F2F8; --mute: #8C89A0; --ink2: #4D4960;
  --good: #129A63; --good-soft: #E2F6EC; --bad: #E0424F; --bad-soft: #FDECEE; --warn: #C97D00; --warn-soft: #FFF3DC;
  --shadow: 0 1px 2px rgba(23, 21, 31, .04), 0 8px 24px -16px rgba(23, 21, 31, .14);
}
.shell { grid-template-columns: 268px 1fr; gap: 0; }
.side { background: #fff; color: var(--ink2); margin: 14px 0 14px 14px; height: calc(100vh - 28px); top: 14px; border-radius: 24px; padding: 22px 14px 14px; box-shadow: var(--shadow); }
.brand img { width: 128px; }
.nav-group > span { color: #A5A2B8; }
.side nav a { color: var(--ink2); font-weight: 600; padding: 9px 12px; border-radius: 12px; }
.side nav a:hover { background: var(--line2); color: var(--ink); }
.side nav a.on { background: var(--accent); color: #fff; box-shadow: 0 10px 20px -10px rgba(113, 69, 254, .8); }
.side nav a.on::before { display: none; }
.side nav a.on .ic { color: #fff; }
.side nav .count { background: var(--line2); color: var(--ink2); }
.side nav a.on .count { background: rgba(255,255,255,.22); color: #fff; }
.side nav .count.alert { background: var(--bad); color: #fff; }
.side-cash { margin-top: auto; background: var(--deep); color: #fff; border-radius: 18px; padding: 14px 14px 12px; position: relative; overflow: hidden; display: block; text-decoration: none !important; }
.side-cash .illus { position: absolute; right: -14px; top: -10px; opacity: .95; }
.side-cash small { color: #B8ADEB; font-weight: 600; font-size: 12px; display: block; }
.side-cash b { font: 650 21px var(--display); display: block; margin: 4px 0 8px; position: relative; }
.side-cash span { display: inline-flex; align-items: center; gap: 6px; background: var(--cyan); color: var(--deep); font-weight: 700; font-size: 12px; padding: 6px 10px; border-radius: 99px; }
.side .nav-bottom { margin-top: 12px; padding-top: 0; }
.side-foot { display: none; }
.main { padding: 0 32px 64px; }
.topbar { padding: 16px 0 12px; }
.search-btn { border-radius: 14px; height: 44px; border-color: transparent; box-shadow: var(--shadow); }
.topbar .btn { height: 42px; border-radius: 12px; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; background: #fff; border: 0; display: grid; place-items: center; cursor: pointer; position: relative; box-shadow: var(--shadow); color: var(--ink2); }
.icon-btn .dot { position: absolute; top: 9px; right: 10px; min-width: 16px; height: 16px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; padding: 0 4px; border: 2px solid #fff; }
.me { display: flex; align-items: center; gap: 10px; padding-left: 6px; }
.me b { display: block; font-size: 13.5px; } .me small { color: var(--mute); font-size: 12px; }

.card { border: 0; border-radius: 22px; box-shadow: var(--shadow); padding: 20px 22px; }
.card.flush { border-radius: 22px; }
.card-head h2 { font-size: 17px; }
.card-sub { color: var(--mute); font-size: 12.5px; margin-top: 2px; }
th { background: transparent; border-bottom-color: var(--line); }
.card.flush th { background: #FAFAFD; }
tbody tr.click:hover td { background: #F8F6FF; }
.tile { border: 0; border-radius: 20px; box-shadow: var(--shadow); padding: 16px 18px; }
.tile-h { display: flex; align-items: center; gap: 9px; }
.tile-ic { width: 30px; height: 30px; border-radius: 10px; background: var(--line2); color: var(--ink2); display: grid; place-items: center; flex: none; }
.tile.t-ink .tile-ic { background: rgba(255,255,255,.12); color: var(--cyan); }
.tile.t-good .tile-ic { background: var(--good-soft); color: var(--good); } .tile.t-warn .tile-ic { background: var(--warn-soft); color: var(--warn); }
.tile-v { margin-top: 10px; }
.btn { border-radius: 11px; }
.chips { background: #E4E2EE; border-radius: 12px; }
.chip { border-radius: 9px; }
input, select, textarea { border-radius: 11px; }
.pcard { border: 0; border-radius: 20px; box-shadow: var(--shadow); }
.pcard.add { border: 1.5px dashed #D3CEE6; box-shadow: none; }
.dropzone { border-radius: 18px; }
.modal { border-radius: 24px 0 0 24px; }

/* pastilles vert / rouge */
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.p-good { background: var(--good-soft); color: var(--good); } .p-bad { background: var(--bad-soft); color: var(--bad); }
.p-warn { background: var(--warn-soft); color: var(--warn); } .p-acc { background: var(--accent-soft); color: var(--accent-ink); } .p-mute { background: var(--line2); color: var(--ink2); }
.amt-in, .amt-out { display: inline-block; font-weight: 700; padding: 3px 10px; border-radius: 99px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.amt-in { background: var(--good-soft); color: var(--good); } .amt-out { background: var(--bad-soft); color: var(--bad); }
.badge.b-payee, .badge.b-accepte, .badge.b-livre { background: var(--good-soft); color: var(--good); }
.badge.b-retard, .badge.b-refuse, .badge.b-annulee, .badge.b-annule { background: var(--bad-soft); color: var(--bad); }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.kpi { background: #fff; border-radius: 22px; padding: 18px 20px 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; min-width: 0; }
.kpi.click { cursor: pointer; transition: transform .14s, box-shadow .14s; } .kpi.click:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -18px rgba(23, 21, 31, .35); }
.kpi-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.kpi-ic { width: 44px; height: 44px; border-radius: 14px; background: var(--line2); color: var(--ink); display: grid; place-items: center; }
.kpi-l { font-weight: 650; color: var(--ink2); font-size: 13.5px; }
.kpi-v { font: 680 28px/1.15 var(--display); margin-top: 4px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-s { font-size: 12.5px; color: var(--mute); margin-top: 4px; }
.kpi.k-violet { background: var(--accent); color: #fff; box-shadow: 0 18px 34px -18px rgba(113, 69, 254, .9); position: relative; overflow: hidden; }
.kpi.k-violet::after { content: ""; position: absolute; right: -40px; bottom: -60px; width: 170px; height: 170px; border-radius: 50%; border: 22px solid rgba(255,255,255,.08); }
.kpi.k-violet .kpi-ic { background: #fff; color: var(--accent); } .kpi.k-violet .kpi-l, .kpi.k-violet .kpi-s { color: #E3DAFF; }
.kpi.k-violet .p-good { background: rgba(34, 245, 239, .2); color: #fff; } .kpi.k-violet .p-bad { background: rgba(255,255,255,.2); color: #fff; }
.kpi .split { display: flex; height: 6px; border-radius: 99px; overflow: hidden; margin-top: 12px; background: rgba(255,255,255,.18); }
.kpi .split i { display: block; height: 100%; } .kpi .split i:first-child { background: var(--cyan); } .kpi .split i:last-child { background: rgba(255,255,255,.55); }

.dgrid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; margin-bottom: 16px; }
.c8 { grid-column: span 8; } .c4 { grid-column: span 4; } .c7 { grid-column: span 7; } .c5 { grid-column: span 5; }
.dgrid > .card { margin-bottom: 0; }
.bars .legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--ink2); margin-bottom: 8px; }
.bars .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.bars rect { transition: opacity .12s; } .bars rect:hover { opacity: .8; }
.chart-sum { display: flex; gap: 22px; margin-bottom: 10px; flex-wrap: wrap; }
.chart-sum div span { display: block; font-size: 12px; color: var(--mute); font-weight: 600; } .chart-sum div b { font: 650 18px var(--display); font-variant-numeric: tabular-nums; }

.avatar { display: inline-block; border-radius: 50%; overflow: hidden; flex: none; vertical-align: middle; box-shadow: 0 0 0 2px #fff; }
.avatar svg { display: block; }
.person { display: inline-flex; align-items: center; gap: 10px; } .person b { display: block; } .person small { display: block; color: var(--mute); font-size: 12px; }
.cmark { display: inline-grid; place-items: center; border-radius: 12px; font: 700 12.5px var(--font); flex: none; }
.team { list-style: none; margin: 0; padding: 0; }
.team li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line2); cursor: pointer; }
.team li:last-child { border-bottom: 0; }
.team .tt { flex: 1; min-width: 0; } .team .tt b { display: block; } .team .tt small { color: var(--mute); font-size: 12px; }
.team .tbar { height: 5px; background: var(--line2); border-radius: 99px; margin-top: 6px; overflow: hidden; } .team .tbar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.empty-illus { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 10px; color: var(--mute); text-align: center; }
.empty-illus b { color: var(--ink); font-size: 14.5px; }
.todo .dot { border-radius: 12px; width: 38px; height: 38px; }
.todo li { padding: 12px 0; }
.pcard .pp .prog { height: 7px; }
.cell-person { display: flex; align-items: center; gap: 10px; } .cell-person b { display: block; }

@media (max-width: 1200px) { .kpis { grid-template-columns: repeat(2, 1fr); } .c8, .c4, .c7, .c5 { grid-column: span 12; } }
@media (max-width: 1000px) { .side { margin: 0; border-radius: 0; height: auto; } .side-cash { display: none; } .me div { display: none; } }
@media (max-width: 640px) { .kpis { grid-template-columns: 1fr; } .me { display: none; } }
.search-btn { min-width: 220px; white-space: nowrap; overflow: hidden; }
.search-btn .sb-l { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1350px) { .search-btn .sb-l { display: none; } .search-btn .sb-s { display: inline; } }
td { vertical-align: middle; }
table.lines td { vertical-align: top; }
.side-cash .illus { top: auto; bottom: -6px; right: -12px; width: 84px; height: auto; }
.side-cash small, .side-cash b, .side-cash span { position: relative; z-index: 1; }
.tiles { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }

.steps-help { background: var(--warn-soft); border-radius: 14px; padding: 14px 16px; } .steps-help ol { margin: 8px 0 0; padding-left: 20px; } .steps-help li { margin: 4px 0; }
details.adv-opt { margin-top: 14px; color: var(--ink2); } details.adv-opt summary { cursor: pointer; font-size: 13px; }

/* connexion */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.auth-card { width: min(420px, 100%); background: #fff; border-radius: 26px; box-shadow: var(--shadow); padding: 34px 32px 24px; display: flex; flex-direction: column; gap: 14px; }
.auth-card h1 { font-size: 26px; margin-top: 6px; } .auth-card p { margin: -6px 0 4px; }
.auth-logo { width: 130px; }
.auth-card .btn.primary { height: 46px; font-size: 15px; margin-top: 4px; }
.auth-card .illus { align-self: center; margin-top: 4px; opacity: .9; }
.me-wrap .menu { width: 240px; }
