/* Tutela — feuille de style.
   Inspiration : le dossier papier du cabinet. Encre sur papier blanc, bleu des tampons du greffe
   pour les actions, bronze du monogramme réservé à l'identité du cabinet et à la couverture du dossier. */

@font-face { font-family: "Plex"; src: url("../fonts/ibm-plex-sans-latin-400-normal.77bc02670657.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex"; src: url("../fonts/ibm-plex-sans-latin-400-italic.ac3e6cdbce96.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Plex"; src: url("../fonts/ibm-plex-sans-latin-500-normal.f7016cd446d2.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex"; src: url("../fonts/ibm-plex-sans-latin-600-normal.196e3cbc5fee.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Serif4"; src: url("../fonts/source-serif-4-latin-400-normal.95bbd98f2b3c.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Serif4"; src: url("../fonts/source-serif-4-latin-600-normal.beb0c8d8bee8.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --ink: #1e2329;
  --ink-2: #4a5260;
  --ink-3: #737b8a;
  --paper: #ffffff;
  --ground: #f3f6fb;
  --line: #dcdfe4;
  --line-2: #eceef1;
  --stamp: #1f63c6;
  --stamp-dark: #174e9e;
  --stamp-tint: #eaf2fd;
  --bronze: #9a7442;
  --bronze-tint: #f5efe6;
  --danger: #b3261e;
  --danger-tint: #fbebe9;
  --warning: #8a5a00;
  --warning-tint: #fdf3dc;
  --ok: #2e7d4f;
  --ok-tint: #e6f3eb;
  --radius: 6px;
  --radius-lg: 10px;
  --sans: "Plex", "Segoe UI", system-ui, -apple-system, sans-serif;
  --serif: "Serif4", Georgia, "Times New Roman", serif;
  --sidebar: 268px;
  --navy: #1d2742;
  --navy-2: #28355a;
  --navy-ink: #c9d2e8;
  --zebra: #f6f9fe;
  --row-hover: #e9f1fc;
  --rule-blue: #3d8ce0;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 400 15px/1.5 var(--sans); font-variant-numeric: tabular-nums;
}
a { color: var(--stamp); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--stamp); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { margin: 0; font-weight: 600; }
h1 { font: 600 28px/1.2 var(--serif); letter-spacing: -0.005em; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
p { margin: 0 0 .75em; }
small, .muted { color: var(--ink-3); }
.num { text-align: right; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* --- Structure ------------------------------------------------------------------------------------------- */
.app { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  background: var(--paper); border-right: 1px solid var(--line); padding: 18px 12px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: var(--ink); }
.brand img { width: 46px; height: auto; }
.brand strong { display: block; font: 600 17px/1.1 var(--serif); }
.brand span { font-size: 12px; color: var(--ink-3); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px; border-radius: var(--radius); color: var(--ink-2); font-weight: 500;
}
.nav a:hover { background: var(--ground); text-decoration: none; color: var(--ink); }
.nav a.is-active { background: var(--bronze-tint); color: var(--ink); box-shadow: inset 3px 0 0 var(--bronze); }
.nav .count { font-size: 12px; background: var(--ground); color: var(--ink-2); border-radius: 10px; padding: 0 7px; }
.nav .count.alert { background: var(--danger-tint); color: var(--danger); }
.nav-sep { height: 1px; background: var(--line-2); margin: 10px 8px; }
.sidebar-foot { margin-top: auto; padding: 12px 8px 0; font-size: 12px; color: var(--ink-3); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 12px 28px; background: var(--paper);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5;
}
.search { flex: 1; max-width: 560px; position: relative; }
.search input[type=search] { width: 100%; padding-left: 34px; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.topbar .spacer { flex: 1; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff;
  display: grid; place-items: center; font-weight: 600; font-size: 13px; border: 0; cursor: pointer;
}
.content { padding: 26px 28px 60px; max-width: 1280px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { margin: 6px 0 0; color: var(--ink-2); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions > input[type=date], .actions > select, .actions > input[type=search] { width: auto; }

/* --- Panneaux ------------------------------------------------------------------------------------------------ */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.panel + .panel, .panel + .grid, .grid + .panel { margin-top: 18px; }
.grid > .panel + .panel { margin-top: 0; }
.grid + .grid { margin-top: 18px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.panel-head h2 { font-size: 15px; }
.panel-body { padding: 16px 18px; }
.panel-body > :last-child { margin-bottom: 0; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }

/* Couverture du dossier : l'étiquette de la farde */
.cover {
  background: var(--paper); border: 1px solid var(--line); border-left: 6px solid var(--bronze);
  border-radius: var(--radius-lg); padding: 20px 24px 18px; margin-bottom: 18px;
}
.cover-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.cover h1 { font-size: 32px; }
.cover .subtitle { color: var(--ink-2); margin-top: 4px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 16px 0 0; padding: 0; }
.facts div { min-width: 120px; }
.facts dt { font-size: 12px; color: var(--ink-3); }
.facts dd { margin: 0; font-weight: 500; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 0 0 18px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--ink-2); font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.is-active { color: var(--ink); border-bottom-color: var(--stamp); }

/* --- Tableaux ----------------------------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: top; }
th { font-size: 13px; font-weight: 500; color: var(--ink-3); background: var(--paper); }
tbody tr:hover td { background: #fafbfc; }
td .sub { display: block; font-size: 13px; color: var(--ink-3); }
tfoot td { font-weight: 600; border-top: 1px solid var(--line); }
.empty { padding: 28px 18px; text-align: center; color: var(--ink-2); }
.empty strong { display: block; color: var(--ink); margin-bottom: 4px; }

/* --- Étiquettes de statut (toujours un mot, jamais la couleur seule) ------------------------------------------- */
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; padding: 1px 8px; border-radius: 10px; background: var(--ground); color: var(--ink-2); white-space: nowrap; }
.tag-danger { background: var(--danger-tint); color: var(--danger); }
.tag-warning { background: var(--warning-tint); color: var(--warning); }
.tag-ok { background: var(--ok-tint); color: var(--ok); }
.tag-info { background: var(--stamp-tint); color: var(--stamp-dark); }

/* --- Formulaires --------------------------------------------------------------------------------------------- */
label { display: block; font-weight: 500; margin-bottom: 4px; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search],
input[type=tel], input[type=url], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; min-height: 38px;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--stamp); outline: 2px solid var(--stamp-tint); outline-offset: 0; }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; accent-color: var(--stamp); vertical-align: -3px; }
.field { margin-bottom: 14px; }
.field .help { font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.field .error { font-size: 13px; color: var(--danger); margin-top: 4px; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.field.check label { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.form-grid .wide { grid-column: 1 / -1; }
fieldset { border: 0; padding: 0; margin: 0 0 18px; }
legend { font-weight: 600; font-size: 15px; margin-bottom: 10px; }
.confidence { font-size: 12px; margin-left: 6px; }
.evidence { font-size: 12px; color: var(--ink-3); margin-top: 3px; font-style: italic; }

/* --- Boutons ----------------------------------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 500 14px/1 var(--sans);
  padding: 10px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--paper);
  color: var(--ink); cursor: pointer; min-height: 38px; white-space: nowrap;
}
.btn:hover { text-decoration: none; border-color: #c5c9d0; background: #fafbfc; }
.btn-primary { background: var(--stamp); border-color: var(--stamp); color: #fff; }
.btn-primary:hover { background: var(--stamp-dark); border-color: var(--stamp-dark); }
.btn-danger { color: var(--danger); }
.btn-quiet { border-color: transparent; background: transparent; color: var(--stamp); padding-left: 6px; padding-right: 6px; }
.btn-sm { padding: 6px 10px; min-height: 30px; font-size: 13px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.inline-form { display: inline; }

/* --- Messages ------------------------------------------------------------------------------------------------------- */
.messages { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; }
.messages li { padding: 10px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--paper); }
.messages .success { border-color: #bfe0cb; background: var(--ok-tint); }
.messages .error { border-color: #f0c4bf; background: var(--danger-tint); }
.messages .warning { border-color: #f1dca8; background: var(--warning-tint); }
.notice { padding: 12px 14px; border-radius: var(--radius); background: var(--stamp-tint); color: var(--stamp-dark); margin-bottom: 14px; }
.notice.warn { background: var(--warning-tint); color: var(--warning); }
.notice.danger { background: var(--danger-tint); color: var(--danger); }

/* --- Tableau de bord ---------------------------------------------------------------------------------------------------- */
.today { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; }
.agenda { list-style: none; margin: 0; padding: 0; }
.agenda li { display: grid; grid-template-columns: 74px 1fr auto; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line-2); align-items: start; }
.agenda li:last-child { border-bottom: 0; }
.agenda .when { font-weight: 600; }
.agenda .when small { display: block; font-weight: 400; }
.agenda .what strong { display: block; font-weight: 500; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; }
.stats div { padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.stats div:nth-child(odd) { border-right: 1px solid var(--line-2); }
.stats dt { font-size: 13px; color: var(--ink-3); }
.stats dd { margin: 2px 0 0; font: 600 22px/1.2 var(--sans); }

/* --- Dépôt de fichiers ----------------------------------------------------------------------------------------------------- */
.drop {
  border: 1.5px dashed #b9bfc9; border-radius: var(--radius-lg); background: #fbfbfc; padding: 26px; text-align: center;
  color: var(--ink-2); cursor: pointer;
}
.drop.is-over { border-color: var(--stamp); background: var(--stamp-tint); }
.drop strong { color: var(--ink); display: block; margin-bottom: 4px; }
.drop input[type=file] { display: none; }
.file-list { list-style: none; padding: 0; margin: 10px 0 0; text-align: left; font-size: 14px; }

/* --- Dictée -------------------------------------------------------------------------------------------------------------- */
.dictate { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px; }
.mic {
  width: 92px; height: 92px; border-radius: 50%; border: 0; background: var(--stamp); color: #fff; cursor: pointer;
  display: grid; place-items: center; box-shadow: 0 0 0 6px var(--stamp-tint);
}
.mic.is-recording { background: var(--danger); box-shadow: 0 0 0 6px var(--danger-tint); }
.mic svg { width: 36px; height: 36px; }
.entry-card { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px; margin-bottom: 12px; background: var(--paper); }

/* --- RCPP : copier-coller champ par champ ------------------------------------------------------------------------------------ */
.rcpp-tab { margin-bottom: 18px; }
.copy-row { display: grid; grid-template-columns: 220px 1fr auto; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-2); align-items: start; }
.copy-row .value { white-space: pre-wrap; }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }

/* --- Connexion ------------------------------------------------------------------------------------------------------------------ */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: 100%; max-width: 400px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; }
.auth-card .brand { justify-content: center; flex-direction: column; text-align: center; padding-bottom: 20px; }
.auth-card .brand img { width: 84px; }
.qr { display: flex; justify-content: center; margin: 12px 0; }
.codes { columns: 2; font: 500 15px/2 var(--sans); letter-spacing: .03em; }

/* --- Page publique de signature --------------------------------------------------------------------------------------------- */
.sign-page { max-width: 820px; margin: 0 auto; padding: 24px 16px 60px; }
.pdf-frame { width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.pad { width: 100%; height: 200px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; touch-action: none; cursor: crosshair; }

/* --- Mobile ------------------------------------------------------------------------------------------------------------------------- */
.bottom-nav { display: none; }
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { padding: 10px 14px; }
  .content { padding: 18px 14px 96px; }
  .grid-2, .grid-3, .grid-main, .today, .form-grid { grid-template-columns: 1fr; }
  .cover h1 { font-size: 26px; }
  .copy-row { grid-template-columns: 1fr; gap: 4px; }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 10;
    background: var(--paper); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--ink-2); padding: 4px 0; }
  .bottom-nav a.is-active { color: var(--stamp); }
  .bottom-nav a.main-action span.ico { background: var(--stamp); color: #fff; border-radius: 50%; width: 40px; height: 40px; display: grid; place-items: center; margin-top: -14px; box-shadow: 0 0 0 4px var(--paper); }
  .bottom-nav svg { width: 22px; height: 22px; }
  .hide-mobile { display: none !important; }
}
@media (prefers-reduced-motion: no-preference) {
  .mic.is-recording { animation: pulse 1.4s ease-in-out infinite; }
  @keyframes pulse { 50% { box-shadow: 0 0 0 12px var(--danger-tint); } }
}
@media print {
  .sidebar, .topbar, .bottom-nav, .actions, .tabs { display: none !important; }
  .app { display: block; }
  body { background: #fff; }
  .panel { border: 0; }
}

/* Signature manuscrite : aperçu sur un fond « papier » pour juger le rendu réel */
.signature-preview { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 18px; margin-bottom: 10px; }
.signature-preview img { display: block; max-width: 100%; max-height: 140px; margin: 0 auto; }

/* Facturation : chiffres clés sur 4 colonnes, histogramme du chiffre d'affaires */
.stats.stats-4 { grid-template-columns: repeat(4, 1fr); }
.stats.stats-4 div { border-right: 1px solid var(--line-2); }
.stats.stats-4 div:last-child { border-right: 0; }
.bars { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2px; align-items: end; height: 190px; margin: 0 0 12px; padding-top: 18px; border-bottom: 1px solid var(--line); }
.bar-col { display: grid; grid-template-rows: 18px 1fr 22px; height: 100%; text-align: center; }
.bar-track { position: relative; display: block; }
.bar { position: absolute; left: 22%; right: 22%; bottom: 0; background: var(--stamp); border-radius: 4px 4px 0 0; min-height: 0; }
.bar-col:hover .bar { background: var(--stamp-dark); }
.bar-value { font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; }
.bar-label { font-size: 12px; color: var(--ink-2); padding-top: 4px; }
.table-toggle summary { cursor: pointer; color: var(--stamp-dark); font-weight: 500; margin: 6px 0 10px; }
.row-credit td { color: var(--ink-2); }
.check-ok { display: flex; align-items: center; gap: 8px; margin: 0; }
tfoot th { border-top: 1px solid var(--line); text-align: left; }
tfoot th.num { text-align: right; }
.line-actions { display: flex; gap: 6px; justify-content: flex-end; }
.invoice-sheet { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 18px 20px; }
.totals { margin-left: auto; max-width: 360px; }
.totals div { display: flex; justify-content: space-between; padding: 4px 0; }
.totals .grand { border-top: 1px solid var(--ink); font-weight: 600; margin-top: 4px; padding-top: 8px; }
@media (max-width: 760px) {
  .stats.stats-4 { grid-template-columns: repeat(2, 1fr); }
  .bars { height: 150px; }
  .bar-value { display: none; }
  .bar-label { font-size: 10px; }
}
.section-title { font-size: 14px; margin: 18px 0 8px; }
.inline-check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }

/* Distinguer d'un coup d'œil : administrations de biens (bronze) et dossiers de procédure (prune) */
:root { --plum: #6e4a7e; --plum-tint: #f3eef6; }
.kind { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; letter-spacing: .02em; padding: 1px 7px; border-radius: 4px; margin-right: 6px; vertical-align: 1px; white-space: nowrap; border: 1px solid transparent; }
.kind-adb { background: var(--bronze-tint); color: #6f5230; border-color: #e3d4bd; }
.kind-proc { background: var(--plum-tint); color: var(--plum); border-color: #ddd0e5; }
.cover.cover-proc { border-left-color: var(--plum); }
.nav a .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.nav a .dot-adb { background: var(--bronze); }
.nav a .dot-proc { background: var(--plum); }
.nav a.nav-proc.is-active { background: var(--plum-tint); box-shadow: inset 3px 0 0 var(--plum); }
.nav a.has-dot .dot { order: 2; flex: none; margin: 0 2px 0 0; }
.check-list .sub { display: block; font-size: 13px; color: var(--ink-3); }

/* Modifier un document et ses versions */
.edit-panel .actions { margin-top: 4px; }
.edit-panel p { max-width: 78ch; }
.version-upload { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 10px 14px; align-items: end; margin-top: 10px; }
.version-upload label { margin: 0; font-weight: 500; }
.version-upload label input { display: block; width: 100%; margin-top: 4px; font-weight: 400; }
.versions-title { margin: 18px 0 6px; }
table.versions tr.current, table.versions tr.current td { background: var(--ok-tint); }
table.versions .btn-sm + .inline-form .btn-sm { margin-left: 4px; }
@media (max-width: 760px) {
  .version-upload { grid-template-columns: 1fr; }
  table.versions thead { display: none; }
  table.versions, table.versions tbody, table.versions tr, table.versions td { display: block; width: 100%; }
  table.versions tr { padding: 10px 12px; border-bottom: 1px solid var(--line); }
  table.versions td { border: 0; padding: 2px 0; text-align: left; }
  table.versions td.num { color: var(--ink-3); font-size: 13px; }
  table.versions td:last-child { padding-top: 8px; }
}

/* Fiche d'un dossier de procédure, parties, correspondances */
.dossier-actions { margin: 0 0 14px; }
.kv { display: grid; grid-template-columns: minmax(130px, auto) 1fr; gap: 6px 16px; margin: 0; }
.kv div { display: contents; }
.kv dt { color: var(--ink-3); font-size: 13px; padding-top: 1px; }
.kv dd { margin: 0; }
.panel .notes { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); white-space: normal; }
.panel-note { margin: 0; padding: 8px 16px 0; font-size: 13px; color: var(--ink-3); }
.party-list { list-style: none; margin: 0; padding: 0; }
.party-list li { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 6px 18px; padding: 14px 16px; border-top: 1px solid var(--line-2); align-items: start; }
.party-list li:first-child { border-top: 0; }
.party-list .role { font-size: 12px; color: var(--ink-3); display: block; margin-bottom: 2px; }
.party-list .name { font-weight: 600; }
.party-list .sub { display: block; font-size: 13px; color: var(--ink-3); }
.party-list .actions { justify-content: flex-end; }
.party-add { padding: 12px 16px; border-top: 1px solid var(--line-2); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 4px 16px; padding: 12px 16px; border-top: 1px solid var(--line-2); align-items: start; }
.timeline li:first-child { border-top: 0; }
.timeline .when { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.timeline .what a { font-weight: 600; }
.timeline .what .sub { display: block; font-size: 13px; color: var(--ink-3); }
.timeline .files { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; font-size: 13px; }
.dir { display: inline-flex; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 4px; margin-right: 6px; vertical-align: 1px; }
.dir-recu { background: var(--stamp-tint); color: var(--stamp-dark); }
.dir-envoye { background: var(--ok-tint); color: var(--ok); }
.dir-courrier { background: var(--ground); color: var(--ink-2); }
.suggest-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
@media (max-width: 760px) {
  .party-list li { grid-template-columns: 1fr; }
  .party-list .actions { justify-content: flex-start; }
  .timeline li { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; }
  .kv dt { padding-top: 6px; }
}
.party-list li.empty-row { display: block; padding: 0; }
.timeline li.empty-row { display: block; padding: 0; }
.timeline label.pick { display: inline; font-weight: 600; margin: 0; }
.proc-group .panel-head h2 { font-size: 16px; }
.proc-empty { padding-bottom: 14px; }
.proc-next { padding: 0 0 12px; }
.proc-table { table-layout: fixed; width: 100%; }
.proc-table th:nth-child(1) { width: 110px; }
.proc-table th:nth-child(3) { width: 210px; }
.proc-table th:nth-child(4) { width: 110px; }
@media (max-width: 760px) { .proc-table { table-layout: auto; } }
.pieces-table .piece-no { font-weight: 600; width: 48px; }
.pieces-table tr.piece-section td { background: var(--ground); font-weight: 600; font-size: 13px; padding-top: 6px; padding-bottom: 6px; }
.pieces-actions { padding: 14px 16px; border-top: 1px solid var(--line-2); }
.pieces-actions .field { margin-bottom: 10px; max-width: 520px; }


/* =================================================================================================================
   Thème « cabinet » : rail de navigation bleu nuit avec icônes, actions bleues, lignes de tableau bleu très pâle,
   actions en pastilles rondes avec leur nom dessous — inspiré du logiciel que vous utilisez aujourd'hui.
   ================================================================================================================= */
h1 { font: 600 26px/1.2 var(--sans); letter-spacing: -0.01em; }
.cover h1 { font-family: var(--sans); }
.sidebar { background: var(--navy); border-right: 0; color: var(--navy-ink); padding: 16px 10px; }
.brand { color: #fff; padding: 2px 6px 16px; }
.brand img { background: #fff; border-radius: 9px; padding: 4px; width: 44px; }
.brand strong { font-family: var(--sans); font-size: 17px; color: #fff; }
.brand span { color: #9ba8c7; }
.nav { gap: 1px; }
.nav a { justify-content: flex-start; gap: 11px; color: var(--navy-ink); padding: 8px 10px; border-radius: 8px; font-weight: 500; }
.nav a .nav-ico { display: grid; place-items: center; width: 22px; flex: none; opacity: .9; }
.nav a .nav-label { flex: 1; min-width: 0; }
.nav a:hover { background: var(--navy-2); color: #fff; }
.nav a.is-active, .nav a.nav-proc.is-active { background: var(--stamp); color: #fff; box-shadow: none; }
.nav .count { background: rgba(255, 255, 255, .14); color: #fff; }
.nav .count.alert { background: #e5484d; color: #fff; }
.nav a .dot { margin: 0; box-shadow: 0 0 0 2px var(--navy); }
.nav a.is-active .dot { box-shadow: 0 0 0 2px var(--stamp); }
.nav-sep { background: rgba(255, 255, 255, .12); }
.sidebar-foot { color: #8f9bbb; }
.topbar { border-bottom-color: #e3e8f1; }

th { font-size: 12px; font-weight: 600; color: #5d6a85; text-transform: uppercase; letter-spacing: .04em; border-bottom: 2px solid var(--rule-blue); }
tbody tr:nth-child(even) td { background: var(--zebra); }
tbody tr:hover td { background: var(--row-hover); }
.tabs a.is-active { color: var(--stamp-dark); }

/* --- Registre des documents --------------------------------------------------------------------------------------- */
.h-count { font-weight: 400; color: var(--ink-3); }
.doc-tabs a { display: inline-flex; align-items: center; gap: 7px; }
.tab-count { font-size: 12px; font-weight: 600; background: var(--ground); color: var(--ink-2); border-radius: 10px; padding: 0 8px; }
.tabs a.is-active .tab-count { background: var(--stamp-tint); color: var(--stamp-dark); }
.tab-count.is-due { background: var(--warning-tint); color: var(--warning); }
.register { overflow: visible; }
.toolbar { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 2px 4px; padding: 12px 12px 10px; border-bottom: 1px solid var(--line-2); }
.tool {
  display: inline-flex; flex-direction: column; align-items: center; gap: 4px; min-width: 70px; padding: 2px 4px;
  background: none; border: 0; color: #33405f; font: 500 12px/1.2 var(--sans); cursor: pointer; text-decoration: none; list-style: none;
}
.tool::-webkit-details-marker { display: none; }
.tool .tool-ico {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  border: 1.6px solid #2e3d63; color: #2e3d63; background: #fff; transition: background .12s, color .12s, border-color .12s;
}
.tool:hover { text-decoration: none; color: var(--stamp-dark); }
.tool:hover .tool-ico { background: var(--stamp-tint); border-color: var(--stamp); color: var(--stamp); }
.tool:disabled, .tool[aria-disabled="true"] { opacity: .38; cursor: not-allowed; }
.tool:disabled:hover .tool-ico, .tool[aria-disabled="true"]:hover .tool-ico { background: #fff; border-color: #2e3d63; color: #2e3d63; }
.tool-danger .tool-ico { border-color: #b3261e; color: #b3261e; }
.tool-sep { width: 1px; align-self: stretch; background: var(--line); margin: 4px 10px; }
.selection { align-self: center; font-size: 13px; color: var(--ink-2); background: var(--ground); border-radius: 14px; padding: 3px 10px; margin-right: 6px; }
.tool-pop { position: relative; }
.tool-pop .pop {
  position: absolute; top: 64px; left: 0; z-index: 20; width: min(360px, 86vw); background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: 0 12px 30px rgba(20, 30, 60, .16); padding: 12px; display: grid; gap: 8px;
}
.tool-pop .pop label { font-size: 13px; color: var(--ink-2); }
.filters {
  display: grid; grid-template-columns: minmax(200px, 2fr) repeat(5, minmax(120px, 1fr)) auto; gap: 10px 12px; align-items: end;
  padding: 12px 14px 14px; background: #f7f9fd; border-bottom: 1px solid var(--line-2);
}
.filters .field { margin: 0; }
.filters label { font-size: 12px; color: var(--ink-3); }
.filter-actions { display: flex; gap: 6px; }
.filter-note { margin: 0; padding: 8px 14px; font-size: 13px; color: var(--ink-2); border-bottom: 1px solid var(--line-2); }
.doc-table th, .doc-table td { vertical-align: middle; }
.doc-table th a.sort { color: inherit; }
.doc-table th a.sort:hover { color: var(--stamp-dark); text-decoration: none; }
.doc-table th a.is-sorted { color: var(--stamp-dark); }
.doc-table small { display: block; font-size: 12.5px; color: var(--ink-3); }
.col-check { width: 34px; padding-right: 0; }
.col-ico { width: 46px; padding-right: 0; }
.col-date { width: 108px; white-space: nowrap; }
.col-author { width: 140px; white-space: nowrap; }
.col-act { width: 44px; text-align: right; }
.col-dossier { min-width: 220px; }
.col-dossier a, .col-title a { color: var(--ink); font-weight: 500; }
.col-dossier a:hover, .col-title a:hover { color: var(--stamp); }
.icon-link { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: #2e3d63; }
.icon-link:hover { background: var(--stamp-tint); color: var(--stamp); }
.ficon { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font: 700 14px/1 var(--sans); }
.ficon-word { background: #e5eefb; color: #2b579a; }
.ficon-pdf { background: #fde8e7; color: #c5221f; font-size: 9.5px; letter-spacing: .02em; }
.ficon-excel { background: #e3f3e8; color: #1e7145; }
.ficon-mail { background: #e0f2f3; color: #0e7c86; }
.ficon-image { background: #efe9fa; color: #6b4fbb; }
.ficon-other { background: #edf0f4; color: #5b6475; }
@media (max-width: 1100px) {
  .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .filters { grid-template-columns: 1fr 1fr; }
  .col-author, .doc-table th.col-author, .doc-table td.col-author { display: none; }
  .tool { min-width: 58px; }
  .tool .tool-ico { width: 36px; height: 36px; }
  .tool-sep { display: none; }
}
.filters[hidden] { display: none; }
.filters input, .filters select { height: 40px; }
tbody tr:has(input[data-select]:checked) td { background: #e2ecfa; }
tbody tr:has(input[data-select]:checked) .ficon { background: #fff; }

/* --- Tâches ------------------------------------------------------------------------------------------------------- */
.task-list { list-style: none; margin: 0; padding: 0; }
.task-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.task-row:first-child { border-top: 0; }
.task-row form { margin: 0; }
.task-check { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--stamp); background: var(--paper); color: transparent; display: grid; place-items: center; padding: 0; cursor: pointer; flex: none; }
.task-check:hover { background: var(--stamp-tint); color: var(--stamp); }
.task-check svg { width: 16px; height: 16px; }
.task-row.is-done .task-check { background: var(--stamp); color: #fff; }
.task-row.is-done .task-title { text-decoration: line-through; color: var(--ink-3); }
.task-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.task-title { font-weight: 600; overflow-wrap: anywhere; }
.task-meta { font-size: 13px; color: var(--ink-3); }
.task-meta .kind { margin-right: 4px; }
.late { color: var(--danger); }
.task-row.is-late .task-meta { color: var(--danger); }
.task-edit { color: var(--ink-3); padding: 4px; flex: none; }
.task-add > summary { cursor: pointer; list-style: none; }
.task-add > summary::-webkit-details-marker { display: none; }
.task-add > summary h2::after { content: " +"; color: var(--stamp); }
.task-add[open] > summary h2::after { content: ""; }
.actions-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.push-status { font-weight: 600; margin: 0 0 6px; }
.push-invite { margin: 0 0 14px; }
.push-invite a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.today-list { list-style: none; margin: 0; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.agenda-time { font-size: 12px; font-weight: 600; color: var(--ink-2); }

/* --- Menu « Plus » ------------------------------------------------------------------------------------------------ */
.menu-list { display: flex; flex-direction: column; }
.menu-list a { display: flex; align-items: center; gap: 12px; padding: 13px 16px; color: var(--ink); text-decoration: none; font-weight: 500; border-top: 1px solid var(--line); }
.menu-list a:first-child { border-top: 0; }
.menu-list a svg { width: 20px; height: 20px; color: var(--stamp); flex: none; }
.menu-list a span:not(.count) { flex: 1; }
.menu-list .count { background: var(--stamp-tint); color: var(--stamp-dark); border-radius: 999px; padding: 1px 8px; font-size: 12px; font-weight: 600; }
.menu-list .count.alert { background: var(--danger-tint); color: var(--danger); }

/* --- Accueil et tableaux sur téléphone ---------------------------------------------------------------------------- */
.mobile-home { display: none; }
.nav-badge-wrap { position: relative; display: inline-flex; }
.nav-badge { position: absolute; top: -6px; right: -10px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--stamp); color: #fff; font-size: 10px; font-weight: 700; line-height: 17px; text-align: center; }
@media (max-width: 760px) {
  .mobile-home { display: block; }
  .desktop-home { display: none; }
  .topbar .search { max-width: none; }
  .quick-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 14px; }
  .quick-tile { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: var(--radius-lg); background: var(--paper); border: 1px solid var(--line); color: var(--ink); font-weight: 600; text-decoration: none; min-height: 96px; line-height: 1.25; }
  .quick-tile svg { width: 26px; height: 26px; color: var(--stamp); }
  .quick-tile small { font-weight: 400; color: var(--ink-3); font-size: 12px; }
  .quick-tile.primary { background: var(--stamp); border-color: var(--stamp); color: #fff; }
  .quick-tile.primary svg { color: #fff; }
  .quick-tile.primary small { color: #dbe7fb; }
  .task-row { padding: 12px 14px; }
  table.stack-mobile thead { display: none; }
  table.stack-mobile, table.stack-mobile tbody, table.stack-mobile tr, table.stack-mobile td { display: block; width: 100%; }
  table.stack-mobile tr { padding: 10px 14px; border-top: 1px solid var(--line); }
  table.stack-mobile tr:first-child { border-top: 0; }
  table.stack-mobile td { border: 0; padding: 2px 0; text-align: left; }
  table.stack-mobile td:empty { display: none; }
  table.stack-mobile .hide-in-card { display: none; }
}

/* Un élément masqué l'est toujours, même quand sa classe lui donne un affichage (boutons, avis…). */
[hidden] { display: none !important; }
.search-big { max-width: 680px; margin: 0 0 16px; }
.search-big input[type=search] { font-size: 17px; padding-top: 12px; padding-bottom: 12px; padding-left: 38px; }
@media (max-width: 760px) {
  .topbar .spacer { display: none; }
  .topbar .search { flex: 1; }
}

/* --- À traiter ------------------------------------------------------------------------------------------------------ */
.pending-row { align-items: center; }
.pending-row .ficon { flex: none; }
.pending-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; flex: none; }
.btn-done { border-color: var(--ok); color: var(--ok); }
.btn-done:hover { background: var(--ok-tint); }
.btn-link { background: none; border: 0; padding: 0; color: var(--stamp); cursor: pointer; font: inherit; text-decoration: underline; }
.pending-banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 0 0 14px; border-radius: var(--radius-lg); background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--ok); color: var(--ink); text-decoration: none; }
.pending-banner svg { width: 24px; height: 24px; color: var(--ok); flex: none; }
.pending-banner span { display: flex; flex-direction: column; }
.pending-banner small { color: var(--ink-3); }
@media (max-width: 760px) {
  .pending-row { flex-wrap: wrap; }
  .pending-actions { width: 100%; justify-content: flex-start; padding-left: 40px; }
}
.pending-notice { border-left: 4px solid var(--ok); }
.pending-notice .actions { justify-content: space-between; align-items: center; width: 100%; }
.reply-text { white-space: pre-wrap; font: 14px/1.55 var(--sans); margin: 0 0 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); max-height: 50vh; overflow: auto; }
.sync-body { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.sync-body > div:first-child { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 380px; }
.journal-table td { word-break: break-word; font-size: 13px; }
.journal-table tr.is-undone td { color: var(--ink-3); }

/* --- Menus déroulants de la barre de gauche (ADB, Financier) ------------------------------------------------------------- */
.nav-group > summary { list-style: none; display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 8px;
  color: var(--navy-ink); font-weight: 500; cursor: pointer; user-select: none; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary:hover { background: var(--navy-2); color: #fff; }
.nav-group > summary:focus-visible { outline: 2px solid #9cc2ff; outline-offset: -2px; }
.nav-group > summary .nav-ico { display: grid; place-items: center; width: 22px; flex: none; opacity: .9; }
.nav-group > summary .nav-label { flex: 1; min-width: 0; }
.nav-group > summary .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px var(--navy); }
.nav-group > summary .dot-adb { background: var(--bronze); }
.nav-group > summary .caret { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform .15s ease; opacity: .75; margin: 0 4px 0 2px; flex: none; }
.nav-group[open] > summary .caret { transform: rotate(45deg); margin-top: -3px; }
.nav-group:has(.nav-sub a.is-active) > summary { color: #fff; }
.nav-sub { display: flex; flex-direction: column; gap: 1px; margin: 1px 0 4px; }
.nav .nav-sub a { padding: 7px 10px 7px 43px; font-size: 14px; }
@media (prefers-reduced-motion: reduce) { .nav-group > summary .caret { transition: none; } }

/* ---------------------------------------------------------------- Onglet Financier (dossiers de procédure et ADB) */
.fin-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 14px; }
.fin-cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fin-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 12px 14px; }
.fin-card small { display: block; color: var(--ink-3); font-size: 12.5px; }
.fin-card strong { font-size: 19px; font-variant-numeric: tabular-nums; }
.fin-card em { display: block; font-style: normal; color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }
.fin-card.warn { border-color: #e6b4ae; background: #fffafa; }
.fin-card.warn em { color: var(--danger); }
.fin-card.warn-soft { border-color: #e9c46a; background: var(--warning-tint); }
.subtabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }
.subtabs a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink-2); font-weight: 500; font-size: 14px; text-decoration: none; }
.subtabs a:hover { border-color: var(--stamp); color: var(--stamp-dark); }
.subtabs a.on { background: var(--stamp); border-color: var(--stamp); color: #fff; }
.subtabs .n { font-size: 12px; opacity: .75; margin-left: 6px; }
.fin-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 12px; flex-wrap: wrap; }
table.fin td, table.fin th { vertical-align: middle; }
table.fin tfoot td { font-weight: 700; background: var(--zebra); border-top: 2px solid var(--line); }
table.fin tr.muted td { color: var(--ink-3); }
.ring { --p: 0; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: conic-gradient(var(--ring-color, #c27c0e) calc(var(--p) * 1%), #e6e9ee 0); font-size: 9px; font-weight: 700; color: var(--ink); }
.ring > span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--paper); }
.ring[style*="--p:100"] { --ring-color: var(--ok); }
.ring[style*="--p:0"] { --ring-color: #b8bec9; }
.k { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 8px; background: var(--ground); color: var(--ink-2); }
.k.prov { background: #efe7f7; color: #5d3b87; }
.k.fac { background: var(--stamp-tint); color: var(--stamp-dark); }
.k.late-k { background: var(--danger-tint); color: var(--danger); }
.split-fin { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.num.plus, .fin-tl .plus { color: var(--ok); font-weight: 600; }
.num.minus, .fin-tl .minus { color: var(--danger); font-weight: 600; }
.fin-tl .warn { color: var(--warning); }
.fin-tl { list-style: none; margin: 0; padding: 0; }
.fin-tl li { display: grid; grid-template-columns: 100px 1fr auto; gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--line-2); }
.fin-tl li:last-child { border-bottom: 0; }
.fin-tl .d { color: var(--ink-3); }
.proc-add-event { margin-top: 10px; }
.proc-add-event summary { cursor: pointer; color: var(--stamp-dark); font-weight: 500; }
@media (max-width: 900px) {
  .fin-cards, .fin-cards.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split-fin { grid-template-columns: minmax(0, 1fr); }
}

/* --- Chronomètre de rédaction (1.5.0) --- */
.work-timers { position: fixed; right: 18px; bottom: 18px; z-index: 20; display: flex; flex-direction: column; gap: 8px; max-width: min(520px, calc(100vw - 36px)); }
.work-timer {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border-radius: var(--radius-lg);
  background: var(--navy); color: #fff; box-shadow: 0 6px 18px rgba(29, 39, 66, .28);
}
.work-timer .wt-state { width: 9px; height: 9px; border-radius: 50%; background: #45c482; flex: none; }
.work-timer.is-paused .wt-state { background: #f0b43c; }
.work-timer .wt-time { font: 600 17px/1 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.work-timer .wt-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--navy-ink); font-size: 13px; }
.work-timer .wt-actions { display: flex; gap: 6px; flex: none; }
.work-timer .wt-actions form { display: inline; }
.work-timer .btn:not(.btn-primary) { background: var(--navy-2); border-color: rgba(255, 255, 255, .22); color: #fff; }
body:has(.work-timers) .content { padding-bottom: 96px; }
@media (max-width: 960px) {
  .work-timers { left: 10px; right: 10px; bottom: calc(76px + env(safe-area-inset-bottom)); max-width: none; }
  body:has(.work-timers) .content { padding-bottom: 170px; }
}
@media (max-width: 480px) { .work-timer .wt-label { display: none; } .work-timer .wt-time { flex: 1; } }

.timer-validate { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.timer-validate > .panel { margin: 0; }
.timer-validate .tv-actions { grid-column: 1 / -1; margin: 0; }
.tv-clock { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; padding: 10px 12px; border-radius: var(--radius); background: var(--ground); }
.tv-clock-time { font: 600 24px/1 var(--sans); font-variant-numeric: tabular-nums; color: var(--ink); }
.tv-nature { border: 0; padding: 0; margin: 0 0 12px; }
.tv-nature legend { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.tv-sub { font-size: 15px; margin: 18px 0 8px; }
.tv-ignore { margin-top: 10px; }
table.fee-pick { width: 100%; }
table.fee-pick td, table.fee-pick th { padding: 7px 6px; vertical-align: top; }
table.fee-pick td:first-child, table.fee-pick th:first-child { width: 28px; }
table.fee-pick input[type="checkbox"] { margin-top: 3px; }
input.qty { width: 5.5em; text-align: right; }
table.fee-pick td .sub { font-size: 12px; }
@media (max-width: 960px) { .timer-validate { grid-template-columns: 1fr; } }

.pending-list { list-style: none; margin: 0; padding: 0; }
.pending-list li { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-top: 1px solid var(--line-2); }
.pending-list li:first-child { border-top: 0; }
.pending-list li > div { flex: 1; min-width: 0; }
.pending-list .sub { display: block; font-size: 13px; color: var(--ink-3); }
.pending-time { font-weight: 600; font-variant-numeric: tabular-nums; }
.time-banner { border-left-color: var(--stamp); }
.time-banner svg { color: var(--stamp); }
@media (max-width: 760px) { .pending-list li { flex-wrap: wrap; } }
.work-timer .btn:not(.btn-primary):hover { background: #34436d; border-color: rgba(255, 255, 255, .35); color: #fff; }

/* --- Sécurité et sauvegardes (1.5.0) --- */
.steps-list { margin: 8px 0 10px; padding-left: 22px; }
.steps-list li { margin: 4px 0; }
.sec-status { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.sec-status p { margin: 6px 0; }
.sec-plan { list-style: none; margin: 0; padding: 0; }
.sec-plan li { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line-2); }
.sec-plan li:first-child { border-top: 0; }
.sec-plan li > div { flex: 1; min-width: 0; }
.sec-plan .sub { display: block; font-size: 13px; color: var(--ink-3); }
.sec-mark { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; color: #fff; }
.sec-plan li.is-done .sec-mark { background: var(--ok, #2f7d4f); border-color: var(--ok, #2f7d4f); }
/* Liste de liens dans un panneau blanc (Paramètres › Réglages) : lisible, pas aux couleurs de la barre latérale */
.panel-body > .nav a { color: var(--ink-2); }
.panel-body > .nav a:hover { color: var(--ink); background: var(--ground); }

/* --- Droits sociaux (1.6.0) --- */
.kv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 18px; margin: 0 0 12px; }
.kv-grid dt { font-size: 12px; color: var(--ink-3); }
.kv-grid dd { margin: 2px 0 0; font-weight: 500; }
.review-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--line-2); }
.review-line p { margin: 0; }
.rights-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 0; }
.right-card { padding: 14px 16px 16px; border-top: 1px solid var(--line-2); }
.right-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.right-head h3 { margin: 0; font-size: 15px; flex: 1 1 auto; }
.right-resume { margin: 4px 0 8px; color: var(--ink-2); font-size: 14px; }
.why { list-style: none; margin: 0 0 8px; padding: 0; font-size: 14px; }
.why li { display: flex; gap: 8px; padding: 2px 0; }
.why-mark { flex: none; width: 1.1em; font-weight: 700; text-align: center; }
.why-ok .why-mark { color: var(--ok); }
.why-ko .why-mark { color: var(--danger); }
.why-unknown .why-mark { color: var(--warning); }
.right-meta { margin: 0 0 10px; font-size: 14px; }
.right-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.right-actions .inline-form { display: inline-flex; gap: 6px; align-items: center; }
.right-asked input[type=date] { width: auto; padding: 4px 6px; font-size: 13px; }
.droit-texte h3 { font-size: 14px; margin: 16px 0 4px; }
.droit-texte ul { margin: 4px 0; padding-left: 20px; }
.kv-list { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 6px 14px; margin: 0 0 12px; }
.kv-list div { display: contents; }
.kv-list dt { color: var(--ink-3); font-size: 13px; }
.kv-list dd { margin: 0; }
.action-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; margin-top: 10px; }
.action-box summary { cursor: pointer; font-weight: 600; }
.action-box[open] summary { margin-bottom: 8px; }
.note-form { display: flex; gap: 8px; margin-bottom: 8px; }
.note-form input { flex: 1; min-width: 0; }
.droit-events li { grid-template-columns: 96px minmax(0, 1fr) auto; padding: 8px 0; }
.edit-bareme summary { cursor: pointer; color: var(--stamp); }
.edit-bareme[open] { min-width: 320px; }
.droits-foot { font-size: 13px; }
@media (max-width: 760px) { .right-actions .inline-form { flex-wrap: wrap; } }
@media (min-width: 900px) { .tabs { flex-wrap: wrap; overflow-x: visible; } }
