/* 1·2·3 GED — web interface.
   Satoshi (Indian Type Foundry, ITF Free Font License: served from here, the
   official file unmodified, never published — the repository is private),
   variable, light weights: 400 for text, 500 for labels, 600 for titles. It
   is Latin only: a missing character (▸, a non-breaking space) comes from
   Helvetica. Light and dark themes; the agency's background and colour
   (--agency-bg-light, --agency-accent…, set by app.js) only apply to the
   light theme: the dark one keeps its own, readable palette. */

@font-face {
  font-family: "Satoshi";
  src: url("/fonts/Satoshi-Variable.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --font: "Satoshi", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --accent: var(--agency-accent, #2563eb);
  --accent-dark: var(--agency-accent-dark, #1d4ed8);
  --accent-light: var(--agency-accent-light, #eff6ff);
  --green: #15803d;
  --green-light: #f0fdf4;
  --amber: #b45309;
  --amber-light: #fffbeb;
  --doubt: #eab308;
  --doubt-light: #fefce8;
  --red: #dc2626;
  --red-light: #fef2f2;
  --ink: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --border: #e2e8f0;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --bg: #f1f5f9;
  --agency-bg: var(--agency-bg-light, var(--bg));
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .06);
  --radius: 12px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #60a5fa; --accent-dark: #3b82f6; --accent-light: #172554;
    --green: #4ade80; --green-light: #052e16; --amber: #fbbf24; --amber-light: #2a1d05;
    --doubt: #facc15; --doubt-light: #2a2405;
    --red: #f87171; --red-light: #2a0b0b;
    --ink: #f1f5f9; --text: #cbd5e1; --muted: #94a3b8; --border: #1e293b;
    --surface: #0f172a; --surface-2: #111c33; --bg: #020617; --agency-bg: var(--bg);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 16px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --accent: #60a5fa; --accent-dark: #3b82f6; --accent-light: #172554;
  --green: #4ade80; --green-light: #052e16; --amber: #fbbf24; --amber-light: #2a1d05;
  --doubt: #facc15; --doubt-light: #2a2405;
  --red: #f87171; --red-light: #2a0b0b;
  --ink: #f1f5f9; --text: #cbd5e1; --muted: #94a3b8; --border: #1e293b;
  --surface: #0f172a; --surface-2: #111c33; --bg: #020617; --agency-bg: var(--bg);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 16px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font); font-size: 15px; line-height: 1.5; font-weight: 400;
  color: var(--text); background: var(--agency-bg);
}
h1, h2, h3 { color: var(--ink); font-weight: 600; margin: 0; line-height: 1.25; }
h1 { font-size: 24px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--accent); }
.muted { color: var(--muted); font-size: 13px; }
.hidden { display: none !important; }

/* ---------- icons (js/icons.js): a line drawing the colour of the text */
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
.menu button .ic, .menu a .ic, .note .ic, .badge .ic, .reason .ic, .doc-row .meta .ic, .status .ic, .empty .ic,
.file-name .ic, .banner p .ic { margin-right: 6px; }
.badge .ic, .reason .ic, .doc-row .meta .ic { width: 1.1em; height: 1.1em; margin-right: 4px; }
.file-name .ic { color: var(--muted); }

/* ---------- buttons, fields */
.btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border);
  background: var(--surface); color: var(--ink); padding: 7px 14px; border-radius: 8px;
  font-weight: 500; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--accent); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-green { background: var(--green); border-color: var(--green); color: #fff; }
.btn-danger { color: var(--red); }
.btn-link { border: none; background: none; color: var(--accent); padding: 0; cursor: pointer; font-weight: 500; }
.icon-btn { border: none; background: none; cursor: pointer; font-size: 18px; padding: 6px; border-radius: 8px; color: var(--text); }
.icon-btn:hover { background: var(--surface-2); }
input[type="text"], input[type="search"], input[type="email"], input[type="password"], select {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--ink);
}
input:focus, select:focus, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---------- login */
.login { max-width: 380px; margin: 12vh auto 16px; background: var(--surface); padding: 32px;
  border-radius: var(--radius); box-shadow: var(--shadow); display: grid; gap: 14px; }
.login .brand { font-size: 22px; }
.login label { display: grid; gap: 4px; font-weight: 500; color: var(--ink); font-size: 14px; }
.error { color: var(--red); font-size: 14px; }
/* the second factor (issue #111): the code, the trust box, the step-up dialog, js/view-security.js */
.code-input { font-size: 22px; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; }
.login label.trust { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; cursor: pointer; }
.login label.trust input { margin-top: 3px; }
.login.code-step p { margin: 0; }
.login .login-links { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
/* under the card: the legal notice (issue #131) */
.login-footer { text-align: center; font-size: 13px; margin: 0 0 24px; }
.login-footer a { color: var(--muted); text-decoration: none; }
.login-footer a:hover, .login-footer a:focus-visible { color: var(--accent); text-decoration: underline; }
.modal.second-factor label { display: grid; gap: 4px; font-weight: 500; color: var(--ink); font-size: 14px; }
.modal.second-factor .resend { font-size: 14px; }
.panel.security { margin-bottom: 16px; display: grid; gap: 8px; }
.browsers { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.browsers li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.browsers .name { font-weight: 500; color: var(--ink); }
/* « Changer mon mot de passe »: the rules, met or not, under the field */
.password-form { display: grid; gap: 10px; max-width: 460px; }
.password-form label { display: grid; gap: 4px; font-weight: 500; color: var(--ink); font-size: 14px; }
.password-form label.show { display: flex; align-items: center; gap: 8px; font-weight: 400; cursor: pointer; }
.password-form .actions { display: flex; gap: 8px; justify-content: flex-end; }
/* the agency's settings (#/reglages, js/view-settings.js) */
.panel.settings { margin-bottom: 16px; display: grid; gap: 8px; max-width: 720px; }
.panel.settings h2 { margin: 0; }
.panel.settings p { margin: 0; }
.settings-rules { margin: 0; padding-left: 20px; display: grid; gap: 2px; }
.settings-rules code, .settings-form textarea { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; color: var(--ink); }
.settings-form { display: grid; gap: 8px; }
.settings-form label { font-weight: 500; color: var(--ink); font-size: 14px; }
.settings-form textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); resize: vertical; min-height: 7em; }
.settings-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.settings-form .actions { display: flex; justify-content: flex-end; }
.password-rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 13px; color: var(--muted); }
.password-rules li { display: flex; align-items: flex-start; gap: 6px; }
.password-rules li.ok { color: var(--green); }

/* ---------- header */
.header {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px;
  padding: 10px 20px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.brand { font-weight: 500; color: var(--ink); font-size: 18px; white-space: nowrap; }
.brand strong { color: var(--accent); font-weight: 600; }
.tabs { display: flex; gap: 4px; margin: 0 auto; }
.tab { border: none; background: none; padding: 7px 14px; border-radius: 8px; cursor: pointer;
  font-weight: 500; color: var(--text); display: inline-flex; gap: 6px; align-items: center; }
.tab:hover { background: var(--surface-2); }
.tab.active { background: var(--accent-light); color: var(--accent); }
.count-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red);
  color: #fff; font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.right { display: flex; align-items: center; gap: 8px; }
.bell { position: relative; }
.bell .count-badge { position: absolute; top: 0; right: 0; }
.menu-anchor { position: relative; }
.agency-logo { height: 32px; max-width: 140px; object-fit: contain; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 260px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px; z-index: 30; }
.menu button, .menu a { display: block; width: 100%; text-align: left; border: none; background: none;
  padding: 8px 10px; border-radius: 8px; cursor: pointer; color: var(--text); text-decoration: none; }
.menu button:hover, .menu a:hover { background: var(--surface-2); }
.menu .title { padding: 8px 10px 4px; font-weight: 600; color: var(--ink); }
.menu .note { padding: 8px 10px; color: var(--muted); }

/* ---------- layout: content on the left, preview on the right */
/* --header-height: measured by app.js (issue #112); 57px until then */
.layout { display: grid; grid-template-columns: 1fr; min-height: calc(100vh - var(--header-height, 57px)); }
.layout.with-preview { grid-template-columns: minmax(520px, 1fr) var(--preview-width, minmax(420px, 1fr)); }
.content { padding: 24px; max-width: 1100px; width: 100%; margin: 0 auto; }
.layout.with-preview .content { margin: 0; max-width: none; min-width: 0; }
/* beside an open preview the list scrolls on its own: its scroll bar stays
   against the preview, not at the window's edge next to the preview's
   (issue #112); preview.js keeps the list's place as the preview opens and
   closes. The 5 px margin: the preview's splitter reaches 5 px over the list
   and would catch the scroll bar's edge. Phones: the preview covers the list. */
@media (min-width: 901px) {
  .layout.with-preview { height: calc(100vh - var(--header-height, 57px)); grid-template-rows: minmax(0, 1fr); }
  .layout.with-preview .content { overflow-y: auto; width: auto; margin-right: 5px; }
}
.view-header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }

/* ---------- preview */
.preview { border-left: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column;
  position: sticky; top: var(--header-height, 57px); height: calc(100vh - var(--header-height, 57px)); }
.preview.fullscreen { position: fixed; inset: 0; z-index: 40; height: 100vh; border: none; }
.preview-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.preview-bar .name { flex: 1; font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview iframe { flex: 1; width: 100%; border: none; background: var(--surface-2); min-height: 200px; }
.preview-view { flex: 1; position: relative; display: flex; min-height: 200px; }
.viewer-loading { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 10px; background: var(--surface-2); color: var(--muted); font-size: 14px; }
.viewer-loading[hidden] { display: none; }
.viewer-progress { font-variant-numeric: tabular-nums; min-height: 1.2em; }
.viewer-bar { width: min(240px, 60%); height: 4px; border-radius: 2px; background: var(--border); overflow: hidden; }
.viewer-bar-fill { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--accent);
  animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
.preview-info { border-top: 1px solid var(--border); height: var(--info-height, 38%); flex: none; min-height: 0;
  display: flex; flex-direction: column; font-size: 14px; }
.preview-info-head { padding: 6px 16px 2px; }
.info-toggle { border: none; background: none; padding: 2px 0; cursor: pointer; color: var(--muted); font-weight: 500; font-size: 13px; }
.info-toggle:hover { color: var(--ink); }
.preview-info-body { flex: 1; min-height: 0; overflow: auto; padding: 4px 16px 12px; }
.preview.info-folded .preview-info { height: auto; }
.preview.info-folded .preview-info-body, .preview.info-folded .splitter.horizontal { display: none; }
.splitter { position: relative; z-index: 6; }
.splitter::after { content: ""; position: absolute; background: transparent; transition: background .15s; }
.splitter:hover::after, .splitter:focus-visible::after { background: var(--accent); }
.splitter:focus-visible { outline: none; }
.splitter.vertical { position: absolute; left: -5px; top: 0; bottom: 0; width: 10px; cursor: col-resize; }
.splitter.vertical::after { left: 4px; top: 0; bottom: 0; width: 2px; }
.splitter.horizontal { flex: none; height: 9px; margin: -4px 0 -5px; cursor: row-resize; }
.splitter.horizontal::after { left: 0; right: 0; top: 4px; height: 2px; }
.preview.fullscreen .splitter.vertical { display: none; }
body.resizing { user-select: none; }
body.resizing iframe { pointer-events: none; }
.info-list { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; }
.info-list dt { color: var(--muted); }
.info-list dd { margin: 0; color: var(--ink); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.badge { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--border); color: var(--text); white-space: nowrap; }
.badge.amber { background: var(--amber-light); color: var(--amber); border-color: transparent; }
.badge.green { background: var(--green-light); color: var(--green); border-color: transparent; }
.badge.red { background: var(--red-light); color: var(--red); border-color: transparent; }
/* « Corriger le classement », « Renommer » */
.doc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.history-title { margin-top: 12px; }
.history { list-style: none; padding: 0; margin: 6px 0 0; font-size: 13px; }
.history li { padding: 3px 0; border-bottom: 1px dashed var(--border); }

/* ---------- document lists */
/* one column the width of the page: a long name ends in « … », never a wider page */
.list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.doc-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; cursor: pointer; user-select: none; }
.doc-row:hover { border-color: var(--accent); }
.doc-row.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.doc-row .icon { width: 24px; display: inline-flex; justify-content: center; color: var(--muted); }
.doc-row .icon .ic { width: 20px; height: 20px; }
.doc-row .main { flex: 1; min-width: 0; }
.doc-row .name { color: var(--ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-row .meta { font-size: 13px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.doc-row .date { font-size: 13px; color: var(--muted); white-space: nowrap; }
/* the document's date, the day it was received under it, smaller (issue #102) */
.doc-row .date, .source-head .date { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.3; }
.date .document-date + .received { font-size: 11.5px; }
.doc-row .meta .analysing { color: var(--accent); }
.list .list-heading { list-style: none; margin: 18px 0 4px; font-size: 13px; font-weight: 600; color: var(--ink); }

/* ---------- search */
.search-bar { position: relative; max-width: 680px; margin: 0 auto 20px; }
.search-bar input { padding: 12px 14px 12px 40px; font-size: 16px; border-radius: 12px; }
/* the search icon of js/icons.js, as a mask: it takes the muted colour */
.search-bar::before { content: ""; position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px;
  background: var(--muted); pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='m20 20-4.4-4.4'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='m20 20-4.4-4.4'/%3E%3C/svg%3E") center / contain no-repeat; }

/* the merged search (review of 14 October): « Demander à GED-AI » in the
   field, the welcome, the client shortcut, GED-AI's card above the list */
.find { max-width: 860px; margin: 0 auto; }
.find .view-header { min-height: 36px; }
.find .search-bar { max-width: none; }
.search-bar.ask input { padding-right: 210px; }
.search-bar .ask-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: inline-flex; gap: 6px;
  align-items: center; border: none; border-radius: 8px; padding: 7px 12px; background: var(--accent-light); color: var(--accent);
  font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.search-bar .ask-btn:hover { background: var(--accent); color: #fff; }
.search-bar .ask-btn kbd { font: inherit; font-size: 12px; opacity: .8; border: 1px solid currentColor; border-radius: 4px; padding: 0 4px; }
.search-bar .ask-btn .ic { width: 16px; height: 16px; }
.find .welcome { text-align: center; color: var(--muted); max-width: 600px; margin: 6vh auto 0; }
.find .welcome strong { color: var(--ink); font-weight: 500; }
.find .examples { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }
.find .examples button { border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit;
  font-size: 14px; border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.find .examples button:hover { border-color: var(--accent); color: var(--ink); }
.client-hit { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin-bottom: 10px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; }
.client-hit .main { flex: 1; min-width: 0; }
.client-hit .name { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-hit .meta { font-size: 13px; color: var(--muted); }
.client-hits:not(:empty) { margin-bottom: 14px; }
.find .answers { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.find .answers:not(:empty) { margin-bottom: 18px; }
.find .ask-a { border-radius: 14px; }
.find .ask-a .who { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--accent); margin-bottom: 6px; }
.find .ask-a .who .ic { width: 16px; height: 16px; }
.find .ask-a .who .after { margin-left: auto; font-weight: 400; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.find .ask-a .hint { font-size: 12px; color: var(--muted); margin: 10px 0 0; }
.find .earlier { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.find .earlier .q { color: var(--text); background: var(--accent-light); border-radius: 10px; padding: 2px 10px; overflow-wrap: anywhere; }
.find .earlier-turns { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.find .understood { font-size: 13px; color: var(--muted); margin: -4px 0 0; }
.find .list-title { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--ink); }
.find .list-title:empty { display: none; }
.find .list-title .muted { font-weight: 400; }
@media (max-width: 600px) {
  .search-bar.ask input { padding-right: 56px; }
  .search-bar .ask-btn span, .search-bar .ask-btn kbd, .client-hit .btn span { display: none; }
}

/* ---------- client folders */
.clients { display: grid; grid-template-columns: 280px 1fr; gap: 16px; align-items: start; }
.layout.with-preview .clients { grid-template-columns: 220px 1fr; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; }
.segments { display: flex; gap: 2px; padding: 2px; margin-bottom: 8px; border: 1px solid var(--border); border-radius: 8px; }
.segments button { flex: 1 1 auto; border: none; background: none; border-radius: 6px; padding: 4px 6px; font-size: 13px;
  color: var(--text); cursor: pointer; white-space: nowrap; }
.segments button:hover { color: var(--ink); background: var(--surface-2); }
.segments button.active { background: var(--accent-light); color: var(--accent); font-weight: 500; }
.client-list { list-style: none; margin: 8px 0 0; padding: 0; max-height: calc(100vh - 220px); overflow: auto; }
.client-list button { width: 100%; display: flex; gap: 10px; align-items: center; border: none; background: none;
  padding: 7px 8px; border-radius: 8px; cursor: pointer; text-align: left; }
.client-list button:hover, .client-list button.active { background: var(--accent-light); }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 600; flex: none; }
.family { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); margin-bottom: 8px; }
/* the family's title in the accent colour, set apart from its documents when open (review of 12 October) */
.family > summary { cursor: pointer; padding: 9px 12px; font-weight: 600; color: var(--accent); display: flex; gap: 8px; align-items: center; list-style: none; }
.family > summary::-webkit-details-marker { display: none; }
.family > summary .ic { color: var(--accent); width: 18px; height: 18px; }
.family[open] > summary { border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.family > summary .count { margin-left: auto; font-weight: 500; color: var(--muted); font-size: 13px; }
.family .list { padding: 0 8px 8px; }

/* ---------- client import: the guide in three steps (wording of Bertrand, 15 October) */
.import-guide { max-width: 780px; display: grid; gap: 14px; }
.import-guide > .panel { padding: 16px 18px; }
.import-guide h2 { font-size: 16px; }
.import-guide .panel h2 + p, .import-guide .panel h2 + ul { margin-top: 4px; }
.import-guide .panel p { margin-bottom: 14px; }
.import-guide p { margin: 6px 0; }
.import-guide ul { margin: 6px 0; padding-left: 20px; list-style: disc; }
.import-guide ul ul { list-style: circle; }
.import-guide .checks, .import-guide .legend { list-style: none; padding-left: 0; display: grid; gap: 4px; }
.checks li { padding-left: 26px; text-indent: -26px; }
.checks .ic { color: var(--green); margin-right: 8px; }
.import-steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 12px; }
.import-steps > li { counter-increment: step; position: relative; padding: 14px 18px 14px 58px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); min-width: 0; }
.import-steps > li::before { content: counter(step); position: absolute; left: 18px; top: 13px; width: 26px; height: 26px;
  border-radius: 50%; background: var(--accent); color: #fff; font-weight: 600; font-size: 14px;
  display: flex; align-items: center; justify-content: center; }
.import-steps h3 { line-height: 26px; margin-bottom: 2px; }
.table-scroll { overflow-x: auto; margin: 8px 0 12px; }
.columns-table { border-collapse: collapse; width: 100%; font-size: 14px; }
.columns-table th, .columns-table td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.columns-table th { color: var(--muted); font-weight: 500; font-size: 13px; }
.columns-table td:first-child { white-space: nowrap; }
.columns-table code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; color: var(--ink); }
.tips { background: var(--accent-light); border-radius: 10px; padding: 10px 14px; margin: 8px 0 12px; }
.tips ul { margin-bottom: 0; }
.file-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px !important; }
.import-result { margin: 12px 0; }
.import-result .family:last-child { margin-bottom: 0; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; flex: none; }
.family > summary .dot { margin-right: 0; }
.dot.green { background: var(--green); }
.dot.grey { background: var(--muted); }
.dot.amber { background: #f59e0b; } /* orange, in both themes: --amber is a text colour */
.dot.red { background: var(--red); }
.family.empty > summary { cursor: default; color: var(--muted); }
@media (max-width: 600px) {
  .import-steps > li { padding: 14px; }
  .import-steps > li::before { position: static; float: left; margin-right: 10px; }
  .columns-table th, .columns-table td { padding: 6px; }
}

/* ---------- upload */
.drop-zone { border: 2px dashed var(--border); border-radius: 16px; background: var(--surface); padding: 36px;
  text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.drop-zone.drag-over { border-color: var(--accent); background: var(--accent-light); }
.drop-zone .big { color: var(--accent); }
.drop-zone .big .ic { width: 40px; height: 40px; stroke-width: 1.5; }
.card .icon { display: inline-flex; color: var(--muted); }
.card .icon .ic { width: 22px; height: 22px; }
.cards { display: grid; gap: 8px; margin: 16px 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px;
  display: flex; gap: 12px; align-items: center; }
.card.attention { border-color: var(--amber); background: var(--amber-light); }
.card.ok { border-color: var(--green); }
.card .status { font-size: 13px; color: var(--muted); }
.drop-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 8px 0 12px; }
/* a dropped folder or many files: the card that counts them (js/view-upload.js) */
.card.batch { align-items: flex-start; }
.card.batch .main { flex: 1; min-width: 0; display: grid; gap: 6px; }
.card.batch .name { font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.batch-bar { height: 4px; border-radius: 2px; background: var(--border); overflow: hidden; max-width: 420px; }
.batch-bar-fill { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.batch-counts { font-size: 13px; color: var(--muted); }
.batch-counts:empty { display: none; }
.batch-files > summary { cursor: pointer; width: fit-content; color: var(--muted); font-size: 13px; font-weight: 500; }
.batch-files .cards { margin: 8px 0 0; }
.recent { margin-top: 28px; }
/* the upload agents of the agency (« Déposer », #169) */
.workstations .workstation { padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.workstations .workstation .name { font-weight: 600; color: var(--ink); }
.workstations .workstation.silent .muted { color: var(--amber); }
.workstations .badges { margin: 6px 0 0; }
.recent h3 { font-weight: 500; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.recent .doc-row { padding: 5px 10px; border-color: transparent; background: transparent; }
.recent .doc-row:hover { background: var(--surface); }

/* ---------- review */
.table { width: 100%; border-collapse: separate; border-spacing: 0 6px; }
.table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 13px; padding: 0 8px; }
.table td { background: var(--surface); padding: 8px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); vertical-align: middle; }
.table td:first-child { border-left: 1px solid var(--border); border-radius: 10px 0 0 10px; }
.table td:last-child { border-right: 1px solid var(--border); border-radius: 0 10px 10px 0; }
.table tr.selected td { border-color: var(--accent); }
.table .file-name { font-weight: 500; color: var(--ink); cursor: pointer; overflow-wrap: anywhere; }
/* a card per document: the name on one line, the type, the client and the buttons below */
.review-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.review-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
  display: grid; gap: 8px; cursor: pointer; }
.review-card:hover { border-color: var(--accent); }
.review-card.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.review-head { min-width: 0; }
.review-card .file-name { font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* front and back merged: the received files, wrapped */
.merged-from { font-size: 12px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.review-fields { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.review-fields .combo { flex: 1 1 170px; }
.review-fields .actions { display: flex; gap: 8px; margin-left: auto; }
.review-list .empty { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; color: var(--muted); }
.review-more { display: block; margin: 12px auto 0; }
.reason { font-size: 12px; color: var(--amber); }
/* the folder names one client, the document another (client_conflict) */
.review-card .conflict { font-size: 12px; color: var(--text); margin-top: 2px; overflow-wrap: anywhere; }
.review-card .conflict strong { font-weight: 500; color: var(--ink); }
/* the two views of the queue, « Quotidien » and « Reprise », and its order
   (decisions f and c of 9 November 2026) */
.review-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 12px; }
.review-tools .segments { margin: 0; }
.review-tools .segments button { padding: 4px 12px; }
.review-sort { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.review-sort select { width: auto; padding: 4px 8px; font-size: 13px; }
/* a phone: « Tout valider (67) » goes under the title rather than past the screen's edge */
.review-header { flex-wrap: wrap; }
.review-header .right { flex-wrap: wrap; justify-content: flex-end; }
.combo { position: relative; min-width: 0; }
/* a type or a client the chain is not sure of: yellow until the person chooses */
.combo.uncertain input { border-color: var(--doubt); box-shadow: 0 0 0 1px var(--doubt); background: var(--doubt-light); }
.combo-list { position: absolute; z-index: 25; top: calc(100% + 2px); left: 0; min-width: 100%; width: max-content;
  max-width: 360px; max-height: 280px; overflow: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); padding: 4px; }
.combo-list.up { top: auto; bottom: calc(100% + 2px); }
.combo-list.to-left { left: auto; right: 0; }
.combo-list .group { padding: 6px 8px 2px; font-size: 12px; font-weight: 600; color: var(--muted); }
.combo-list .option { padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.combo-list .option.active, .combo-list .option:hover { background: var(--accent-light); }
.combo-list .new { color: var(--accent); }
.combo-list .option .hint { margin-left: 8px; font-size: 12px; color: var(--muted); }
.parts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
/* instructions aimed at an AI found in the document (issue #113): the excerpts to judge by */
.injection { margin-top: 6px; padding: 6px 10px; border-left: 3px solid var(--red); border-radius: 4px 8px 8px 4px;
  background: var(--surface-2); font-size: 12px; color: var(--ink); }
.injection ul { margin: 4px 0 0; padding-left: 18px; }
.injection li { color: var(--muted); overflow-wrap: anywhere; }

/* ---------- GED-AI's answers (js/answer.js) */
.ask-q { justify-self: end; max-width: 80%; background: var(--accent-light); color: var(--ink); padding: 8px 14px;
  border-radius: 14px 14px 4px 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ask-a { justify-self: stretch; background: var(--surface); border: 1px solid var(--border); border-radius: 4px 14px 14px 14px;
  padding: 12px 16px; }
.ask-a .text { white-space: pre-wrap; color: var(--ink); overflow-wrap: anywhere; }
.ask-a .text:empty { display: none; }
.ask-a .notice { margin: 0; color: var(--muted); }
.ask-a .text:not(:empty) + .notice { margin-top: 8px; }
.ask-a.error .notice { color: var(--red); }
.cite { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 4px;
  margin: 0 1px; border: none; border-radius: 6px; background: var(--accent-light); color: var(--accent); font: inherit;
  font-size: 11px; font-weight: 600; line-height: 1; vertical-align: 2px; }
button.cite { cursor: pointer; }
button.cite:hover, button.cite:focus-visible { background: var(--accent); color: #fff; outline: none; }
.typing { display: inline-flex; gap: 4px; padding: 6px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: typing 1.2s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .typing i { animation: none; opacity: .6; } }
.sources { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.sources h4 { margin: 0 0 6px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.sources ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.sources ul + .more { margin-top: 8px; }
.sources .more + ul { margin-top: 6px; }
.source { border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.source:hover { border-color: var(--accent); }
.source-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border: none; background: none;
  font: inherit; color: inherit; text-align: left; cursor: pointer; border-radius: 10px; }
.source-head:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.source-head .nums { flex: none; display: inline-flex; gap: 3px; }
.source-head .num { flex: none; min-width: 20px; height: 20px; border-radius: 6px; background: var(--accent-light); color: var(--accent);
  font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.source-head .icon { width: 22px; flex: none; display: inline-flex; justify-content: center; color: var(--muted); }
.source-head .icon .ic { width: 20px; height: 20px; }
.source-head .main { flex: 1; min-width: 0; display: flex; flex-direction: column; contain: inline-size; } /* long names: ellipsis, never a wider page */
.source-head .name { color: var(--ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-head .meta { font-size: 13px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.source-head .meta .ic { width: 14px; height: 14px; vertical-align: -2px; margin-right: 3px; }
.source-head .date { font-size: 13px; color: var(--muted); white-space: nowrap; }
.source.fact:hover { border-color: var(--border); } .source.fact .source-head { cursor: default; } /* a count: nothing to open */
.extract { padding: 0 12px 8px 44px; font-size: 13px; }
.extract summary { cursor: pointer; color: var(--muted); width: fit-content; }
.extract summary:hover { color: var(--ink); }
.extract .extract-title { margin: 8px 0 0; font-size: 12px; font-weight: 600; color: var(--muted); }
.extract .extract-title + .passage { margin-top: 2px; }
.extract .passage { white-space: pre-wrap; margin: 6px 0 0; max-height: 220px; overflow: auto; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; }

/* ---------- toasts, modal */
#toasts { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 8px; z-index: 60; }
.toast { background: var(--ink); color: var(--surface); padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow);
  max-width: 420px; font-size: 14px; }
.overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 50; display: flex; align-items: center; justify-content: center; }
.modal { width: min(900px, 75vw); max-height: 75vh; overflow: auto; background: var(--surface); border-radius: 16px;
  box-shadow: var(--shadow); padding: 24px; display: grid; gap: 14px; }
.modal .actions { display: flex; gap: 8px; justify-content: flex-end; }
.banner { position: fixed; left: 20px; right: 20px; bottom: 20px; z-index: 55; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 14px 18px;
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.banner p { margin: 0; flex: 1; min-width: 260px; }

/* ---------- heat map */
.heatmap { position: relative; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.heatmap canvas { display: block; width: 100%; }

@media (max-width: 900px) {
  .layout.with-preview { grid-template-columns: 1fr; }
  .preview { position: fixed; inset: var(--header-height, 57px) 0 0 0; z-index: 35; height: auto; }
  .splitter.vertical { display: none; }
  .clients { grid-template-columns: 1fr; }
  .tab .label { display: none; }
  .ask-q { max-width: 92%; }
  .source-head .date { display: none; }
  .extract { padding-left: 12px; }
}

/* the agency's contact details, at the foot of the menu */
.menu .contact { padding: 8px 12px 4px; border-top: 1px solid var(--border); margin-top: 4px;
  display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--muted); }
.menu .contact a { color: var(--muted); text-decoration: none; overflow-wrap: anywhere; }
.menu .contact a:hover { color: var(--accent); }

/* text pages (audience measurement; legal notice, issue #131) */
.text-page { max-width: 760px; margin: 0 auto; padding: 40px 24px 64px; background: var(--surface); min-height: 100%; }
.text-page h1 { margin-bottom: 16px; }
.text-page h2 { margin: 28px 0 8px; }
.text-page p, .text-page li { color: var(--text); }
.text-page > .brand { display: inline-block; margin-bottom: 20px; text-decoration: none; }
.text-page h3 { margin: 22px 0 6px; }
/* the privacy policy: a chapter of the legal notice between two rules, its numbered sections in h3 */
.text-page .chapter { margin: 36px 0; padding: 4px 0 20px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.text-page .chapter > h2 { font-size: 20px; }
.text-page .table-scroll { margin: 12px 0 16px; }
.text-page .columns-table td { color: var(--text); }
.text-page .columns-table td:first-child { white-space: normal; }
.text-page .columns-table th:first-child, .text-page .columns-table td:first-child { padding-left: 0; }
.text-page .updated { margin-top: 32px; color: var(--muted); font-size: 13px; }
/* phones: one block per row, each cell under its column's name (data-label) */
@media (max-width: 600px) {
  .columns-table.stacked thead { display: none; }
  .columns-table.stacked, .columns-table.stacked tbody, .columns-table.stacked tr, .columns-table.stacked td { display: block; }
  .columns-table.stacked tr { padding: 8px 0; border-bottom: 1px solid var(--border); }
  .columns-table.stacked td { border: none; padding: 2px 0; }
  .columns-table.stacked td:first-child { color: var(--ink); font-weight: 500; }
  .columns-table.stacked td::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
}

/* short dialog window (new client, rejection) */
.modal.small { width: min(480px, 92vw); }
.modal.small p { color: var(--text); margin: 8px 0 16px; }
.client-form input[type="text"] { width: 100%; }
/* a dialog holding drop-down lists: they may overflow it */
.modal.with-combos { overflow: visible; }
.correct-form { display: grid; gap: 12px; margin: 4px 0 20px; }
.correct-form label { display: grid; gap: 4px; font-weight: 500; color: var(--ink); font-size: 14px; }
.correct-form input[type="date"] { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--ink); font: inherit; }
.correct-form .date-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.correct-form .signature-field { display: grid; gap: 4px; font-weight: 500; color: var(--ink); font-size: 14px; }
.correct-form .segment-choice { margin: 0; }
.correct-form .segment-choice label { display: flex; font-weight: 400; }
label.improve, .correct-form label.improve { display: flex; align-items: center; gap: 6px; font-weight: 400; font-size: 13px; color: var(--muted); cursor: pointer; }
.review-options { margin: -8px 0 12px; }
.review-ratio { margin: -8px 0 12px; }
/* the lighter version of a big file (js/compression.js) */
.compression-card { margin: 6px 16px 4px; padding: 10px 12px; border-radius: 10px; background: var(--amber-light);
  display: grid; gap: 6px; }
.compression-card p { margin: 0; color: var(--ink); }
.compression-card .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.compression-card .compression-shown { font-size: 13px; }
.preview-bar .badge { flex: none; }
.compression-section { margin: -4px 0 12px; }
.compression-section > summary { cursor: pointer; width: fit-content; color: var(--amber); font-size: 13px; font-weight: 500; }
.compression-section .list { margin-top: 8px; }
.folder-actions { display: flex; gap: 8px; align-items: center; }
/* the search inside a client's folder (js/view-clients.js) */
.folder-search { margin: -6px 0 12px; max-width: 480px; }
.folder-found .list-title { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--ink); }
.segment-choice { display: flex; gap: 20px; margin: 12px 0 20px; }
.segment-choice label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
/* hidden documents (issue #151) and archived clients (issue #164) */
.tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 999px; font-size: 11px; line-height: 1.6;
  font-weight: 500; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
.tag.amber { background: var(--amber-light); color: var(--amber); border-color: transparent; }
/* a document's state (decision h of 9 November 2026, js/statuses.js):
   « Vérifié » green, « Classé automatiquement » the muted tag, « À
   confirmer » the yellow of a doubt, « À vérifier » amber */
.tag.green { background: var(--green-light); color: var(--green); border-color: transparent; }
.tag.doubt { background: var(--doubt-light); color: var(--amber); border-color: var(--doubt); }
.doc-row .meta > .tag { margin-left: 0; }
.preview-bar .tag { flex: none; margin-left: 0; }
/* a phone: the name keeps the room, the automatic filing goes unsaid there */
@media (max-width: 600px) { .preview-bar .tag.status-auto { display: none; } }
/* filed with its type « à confirmer »: the banner under the preview's name */
.type-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 12px;
  background: var(--doubt-light); border-bottom: 1px solid var(--doubt); }
.type-confirm p { margin: 0; flex: 1 1 220px; min-width: 0; color: var(--ink); font-size: 14px; }
.type-confirm strong { font-weight: 600; }
.type-confirm .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.type-confirm .btn { padding: 4px 10px; font-size: 13px; }
.doc-row .pick { flex: none; width: 16px; height: 16px; margin: 0; cursor: pointer; }
.doc-row.is-hidden { border-style: dashed; background: var(--surface-2); }
.doc-row.is-hidden .name { color: var(--muted); }
.doc-row.client-archived, .client-hit.archived, .client-list button.archived { opacity: .62; }
.doc-row.client-archived:hover, .client-hit.archived:hover, .client-list button.archived:hover { opacity: .85; }
.view-header h2 .badge { margin-left: 8px; vertical-align: middle; font-weight: 500; }
label.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; }
.folder-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: -6px 0 12px; }
.folder-tools .pick-actions { display: inline-flex; gap: 8px; }
.folder-tools .btn, .pick-bar .btn { padding: 3px 10px; font-size: 13px; }
.folder-note { margin: -8px 0 12px; font-size: 13px; }
.folder-note.amber { color: var(--amber); }
.find .include-hidden { margin: -4px 0 10px; }
.client-tools { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.client-tools select { flex: 1; min-width: 0; padding: 5px 8px; font-size: 13px; }
.client-tools .btn-link { font-size: 13px; white-space: nowrap; }
.empty-clients { margin: 0 0 8px; }
.pick-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; }
.client-list .pick-box { flex: none; width: 14px; height: 14px; border: 1.5px solid var(--muted); border-radius: 3px; }
.client-list button.picked .pick-box { background: var(--accent); border-color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--surface); }

/* the client's details (issue #167, js/client-details.js): only the fields
   that hold a value; a value read in a document, not yet checked, in grey
   italic; nothing known: the head alone, one line */
.client-details { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); margin: 0 0 14px; }
.details-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 7px 12px; min-height: 44px; }
.details-head h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.details-head h3 .ic { color: var(--accent); }
.details-head .count { font-weight: 500; color: var(--muted); font-size: 13px; }
.details-head .count.to-check { color: var(--amber); }
.details-tools { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.details-tools .btn { padding: 3px 10px; font-size: 13px; }
.details-tools .ic-check { color: var(--green); }
.details-body { padding: 6px 12px 10px; border-top: 1px solid var(--border); }
.details-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 0 24px; margin: 0; }
.detail-row { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 3px 0; min-width: 0; }
.detail-row.wide { grid-column: 1 / -1; }
.detail-row dt { color: var(--muted); font-size: 13px; }
.detail-row dd { margin: 0; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0 6px; min-width: 0; color: var(--ink); }
.detail-value { white-space: pre-line; overflow-wrap: anywhere; }
.detail-value.provisional { color: var(--muted); font-style: italic; }
.detail-actions { display: inline-flex; margin-top: -1px; }
.detail-actions .icon-btn { padding: 2px 4px; font-size: 15px; line-height: 1; }
.detail-actions .ic-check { color: var(--green); }
.detail-source { flex-basis: 100%; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.detail-source a { text-decoration: none; font-weight: 500; }
.detail-source a:hover, .detail-source a:focus-visible { text-decoration: underline; }
/* « Modifier les coordonnées »: every field of the segment, saved at once */
.details-form { display: grid; gap: 10px; padding-top: 4px; }
.details-form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 10px 20px; }
.detail-field { display: grid; gap: 3px; align-content: start; min-width: 0; }
.detail-field.wide { grid-column: 1 / -1; }
.detail-field label { font-size: 13px; font-weight: 500; color: var(--ink); }
.detail-field input, .detail-field textarea { width: 100%; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--ink); font: inherit; }
.detail-field textarea { resize: vertical; }
.detail-field input:focus, .detail-field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.detail-field .provisional { color: var(--muted); font-style: italic; }
/* a hint, lighter than a value read (grey italic) */
.detail-field input::placeholder, .detail-field textarea::placeholder { color: var(--muted); opacity: .55; }
.detail-field [aria-invalid="true"] { border-color: var(--red); }
.detail-field .error { margin: 0; font-size: 13px; }
.details-form .actions { display: flex; gap: 8px; }
.details-form > .error { margin: 0; }
.details-note { margin: 0; }
@media (max-width: 700px) { .detail-row { grid-template-columns: minmax(0, 1fr); gap: 0; } }
@media (max-width: 600px) { .details-tools .long { display: none; } }

/* « À confirmer » at the top of a client's folder (#165 k, js/to-confirm.js) */
.to-confirm > summary { color: var(--amber); }
.to-confirm > summary .ic { color: var(--amber); }
.to-confirm .confirm-note { margin: -2px 12px 8px; }
.to-confirm .confirm-list { padding: 0 8px 8px; }
.to-confirm .confirm-rest { margin: -2px 12px 10px; }
.confirm-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto auto; align-items: center; gap: 6px 10px;
  padding: 8px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.confirm-row.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.confirm-row .icon { display: inline-flex; justify-content: center; color: var(--muted); }
.confirm-row .icon .ic { width: 20px; height: 20px; }
.confirm-row .main { min-width: 0; }
.confirm-name { display: block; max-width: 100%; border: none; background: none; padding: 0; font-weight: 500; color: var(--ink);
  text-align: left; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.confirm-name:hover, .confirm-name:focus-visible { color: var(--accent); }
.confirm-type { font-size: 13px; color: var(--muted); }
.confirm-type strong { font-weight: 500; color: var(--ink); }
.confirm-row .date { display: flex; flex-direction: column; align-items: flex-end; font-size: 13px; color: var(--muted);
  white-space: nowrap; line-height: 1.3; }
.confirm-row > .actions { display: flex; gap: 6px; }
.confirm-row > .actions .btn { padding: 3px 10px; font-size: 13px; }
.confirm-editor { grid-column: 1 / -1; display: grid; gap: 6px; }
.confirm-editor:focus { outline: none; }
.confirm-editor .review-fields .actions .btn { padding: 6px 12px; }
@media (max-width: 600px) {
  .confirm-row { grid-template-columns: 24px minmax(0, 1fr); }
  .confirm-row .date { display: none; }
  .confirm-row > .actions { grid-column: 2; }
}
/* « 92 % vérifié » beside the count of a client's documents (#165 h) */
.folder-quality { cursor: help; white-space: nowrap; }
