/*
 * Talio (HAJ's tender back office) — styles from the admin design mockup (design/…/HAJ Admin.dc.html,
 * PRD_HAJ_V2 §3.7), rebuilt as classes: the CSP allows no inline style.
 * Archivo is self-hosted (same files as the showcase site); no third-party request.
 */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('fonts/archivo-variable-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('fonts/archivo-variable-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #07080b;
  --bar: #0a0c10;
  --panel: #0d1016;
  --panel-2: #0b0e13;
  --line: #1b2230;
  --line-2: #232c3c;
  --line-3: #151b25;
  --text: #e6eaf1;
  --text-2: #d5dce6;
  --text-3: #c3cbd8;
  --muted: #a7b0be;
  --muted-2: #8a93a3;
  --muted-3: #7c8695;
  --faint: #5e6878;
  --blue: #6fb4ee;
  --gold: #ffc961;
  --orange: #f08a3c;
  --magenta: #c94fd8;
  --green: #3fbf7f;
  --red: #e5484d;
  --grey: #9aa3b2;
  /* An accent as TEXT needs its own value: on a light surface #ffc961 is unreadable, so the
     drawer's gold title reads --gold-ink while the 2 px rule above it stays --gold. In the
     dark theme the two are the same colour, which is why the app looks unchanged. */
  --blue-ink: #6fb4ee;
  --gold-ink: #ffc961;
  --orange-ink: #f08a3c;
  --magenta-ink: #c94fd8;
  --green-ink: #3fbf7f;
  --red-ink: #e5484d;
  --grey-ink: #9aa3b2;
  --alert-ink: #f3b2b4;
  --notice-ink: #a7e3c4;
  --warn-ink: #f6c39a;
  /* Surfaces that are not the panel: a selected tile, a hovered row, the current tab. */
  --raised: #11161f;
  --raised-2: #1a212d;
  --hover: #101520;
  --on-accent: #0b0904;
  --scrim: rgba(4, 5, 7, 0.66);
  --scrim-2: rgba(4, 5, 7, 0.74);
  --shadow: rgba(0, 0, 0, 0.7);
  --shadow-2: rgba(0, 0, 0, 0.65);
  /* The washes and hairlines of each accent: a badge, a banner, a dashed underline. */
  --tint-blue: rgba(111, 180, 238, 0.13);
  --edge-blue: rgba(111, 180, 238, 0.3);
  --link-line: rgba(111, 180, 238, 0.45);
  --tint-gold: rgba(255, 201, 97, 0.13);
  --edge-gold: rgba(255, 201, 97, 0.3);
  --gold-line: rgba(255, 201, 97, 0.45);
  --tint-orange: rgba(240, 138, 60, 0.08);
  --edge-orange: rgba(240, 138, 60, 0.4);
  --tint-magenta: rgba(201, 79, 216, 0.13);
  --edge-magenta: rgba(201, 79, 216, 0.3);
  --tint-green: rgba(63, 191, 127, 0.12);
  --edge-green: rgba(63, 191, 127, 0.34);
  --tint-red: rgba(229, 72, 77, 0.1);
  --edge-red: rgba(229, 72, 77, 0.45);
  --glow-red: rgba(229, 72, 77, 0.6);
  --tint-grey: rgba(138, 147, 163, 0.12);
  --edge-grey: rgba(138, 147, 163, 0.28);
  color-scheme: dark;
}

/**
 * The light theme (owner request 2026-09-19, V18). Only the palette changes: not one rule of
 * layout, spacing or type is duplicated below, because every colour outside the sign-in
 * screens now comes from a token above. `<html data-theme>` is stamped by the server from a
 * cookie, so the page is painted right on its first byte — the CSP forbids inline script, so
 * nothing could repair it afterwards and nothing can flash.
 *
 * The brand accents stay recognisably themselves but come down a step: #ffc961 on white is a
 * pale smear, #e0a416 is the same gold. The -ink versions go further down, to where text is
 * comfortably readable on a white panel.
 */
:root[data-theme='light'] {
  --bg: #f1f4f8;
  --bar: #ffffff;
  --panel: #ffffff;
  --panel-2: #fafbfd;
  --line: #dce2ea;
  --line-2: #c3ccd8;
  --line-3: #e8ecf2;
  --text: #111821;
  --text-2: #26303d;
  --text-3: #3a4553;
  --muted: #586475;
  --muted-2: #6b7788;
  --muted-3: #7b8796;
  --faint: #99a4b2;
  --blue: #2f86d4;
  --gold: #e0a416;
  --orange: #d97316;
  --magenta: #a93bbd;
  --green: #2a9d6a;
  --red: #d33a3f;
  --grey: #8b96a5;
  --blue-ink: #1668b8;
  --gold-ink: #8a6100;
  --orange-ink: #a85a12;
  --magenta-ink: #8a2b9c;
  --green-ink: #15794a;
  --red-ink: #c0272d;
  --grey-ink: #626e7d;
  --alert-ink: #9d1f24;
  --notice-ink: #0f6b41;
  --warn-ink: #8a4a0c;
  --raised: #e9eef5;
  --raised-2: #e3eaf3;
  --hover: #f3f6fa;
  --on-accent: #1a1204;
  --scrim: rgba(20, 28, 40, 0.38);
  --scrim-2: rgba(20, 28, 40, 0.46);
  --shadow: rgba(23, 33, 48, 0.2);
  --shadow-2: rgba(23, 33, 48, 0.16);
  --tint-blue: rgba(22, 104, 184, 0.1);
  --edge-blue: rgba(22, 104, 184, 0.28);
  --link-line: rgba(22, 104, 184, 0.45);
  --tint-gold: rgba(160, 112, 0, 0.13);
  --edge-gold: rgba(160, 112, 0, 0.34);
  --gold-line: rgba(160, 112, 0, 0.5);
  --tint-orange: rgba(168, 90, 18, 0.1);
  --edge-orange: rgba(168, 90, 18, 0.32);
  --tint-magenta: rgba(138, 43, 156, 0.1);
  --edge-magenta: rgba(138, 43, 156, 0.3);
  --tint-green: rgba(21, 121, 74, 0.11);
  --edge-green: rgba(21, 121, 74, 0.3);
  --tint-red: rgba(192, 39, 45, 0.09);
  --edge-red: rgba(192, 39, 45, 0.32);
  --glow-red: rgba(192, 39, 45, 0.4);
  --tint-grey: rgba(98, 110, 125, 0.1);
  --edge-grey: rgba(98, 110, 125, 0.28);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); }
body {
  color: var(--text);
  font-family: Archivo, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: var(--blue-ink); text-decoration: none; }
a:hover { color: var(--gold-ink); }
::selection { background: var(--gold); color: var(--bg); }
input, textarea, select, button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.muted { color: var(--muted-2); }
.small { font-size: 12.5px; }
.spacer { flex: 1; }
.label {
  font-size: 11px;
  font-weight: 500;
  font-stretch: 112%;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}

.wordmark { display: inline-flex; color: var(--text); line-height: 0; }
.wordmark svg { height: 34px; width: auto; display: block; }
/* The Codéo mark (2026-10-28) carries its own colours on its own navy plate; nothing to tint. */
.wordmark-a { background: linear-gradient(135deg, var(--magenta), var(--orange)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---- Buttons ------------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 15px; font-size: 12.5px; font-weight: 500; cursor: pointer;
  border: 1px solid var(--line-2); background: none; color: var(--text-3); white-space: nowrap;
}
.btn:hover { border-color: var(--blue); color: var(--blue-ink); }
.btn-gold { background: var(--gold); color: var(--on-accent); border-color: var(--gold); font-weight: 600; }
.btn-gold:hover { background: linear-gradient(135deg, var(--orange), var(--gold)); color: var(--on-accent); border-color: var(--orange); }
.btn-ghost { color: var(--text-3); }
.btn-danger:hover { border-color: var(--red); color: var(--red-ink); }
.btn-small { padding: 6px 10px; font-size: 12px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---- Forms -------------------------------------------------------------------------- */
.stack { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field .label { font-size: 10.5px; }
.field input, .field select, .field textarea, .input {
  background: var(--panel); border: 1px solid var(--line); color: var(--text);
  padding: 11px 12px; font-size: 13.5px; outline: none; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--blue); }
.field input[type='datetime-local'] { padding: 10px 12px; }
.field-wide { grid-column: 1 / -1; }
.hint { font-size: 12px; color: var(--muted-3); }
.alert { margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--edge-red); background: var(--tint-red); color: var(--alert-ink); font-size: 13px; }
.notice { margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--edge-green); background: var(--tint-green); color: var(--notice-ink); font-size: 13px; }

/* ---- Auth screens: the owner's sign-in design (2026-09-15), Talio blues ---------------- */
body.auth {
  display: grid; place-items: center; padding: 32px 20px;
  background: radial-gradient(90% 55% at 50% -8%, #0c1d31 0%, #070f19 48%, #04080e 100%);
}
body.auth :focus-visible { outline-color: #7cc8ff; }
body.auth ::selection { background: #2f8dff; color: #fff; }
.auth-card {
  position: relative; overflow: hidden; width: 100%; max-width: 560px;
  border: 1px solid transparent; border-radius: 14px;
  background:
    radial-gradient(120% 55% at 0% 0%, rgba(38, 96, 190, 0.14), transparent 62%) padding-box,
    linear-gradient(180deg, #0c192b 0%, #0a121c 34%, #0a1119 100%) padding-box,
    linear-gradient(150deg, #3f82f5 0%, #2a57a0 40%, #22457f 70%, #3467bd 100%) border-box;
  box-shadow: 0 0 34px rgba(26, 102, 255, 0.12), 0 40px 90px rgba(0, 0, 0, 0.6);
}
.auth-fold { position: absolute; top: 0; right: 0; width: 26.5%; height: auto; pointer-events: none; }
.auth-inner { position: relative; padding: 46px 48px 28px; }
.auth-head { margin-bottom: 18px; text-align: center; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 5px; margin-bottom: 23px; }
.auth-brand .wordmark svg { height: 84px; }
.auth-tagline {
  margin: 0; padding-left: 0.26em; /* balances the tracking after the last letter */
  font-size: 11.5px; font-weight: 500; letter-spacing: 0.26em; text-transform: uppercase; color: #95a5c6;
}
.auth-card h1 { margin: 0; font-size: 26px; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; color: #f3f5f8; }
.auth-lead { margin: 2px 0 0; font-size: 15px; color: #a2b4d5; text-wrap: balance; }
.auth-card .alert { margin-bottom: 20px; border-radius: 7px; }
.auth-card .stack { gap: 18px; }
.auth-card .field { gap: 5px; }
.auth-card .field .label { font-size: 10px; font-stretch: 100%; letter-spacing: 0.16em; line-height: 1.2; color: #afc1e1; }
.auth-card .field input {
  height: 44px; padding: 0 14px; border: 1px solid #22324a; border-radius: 7px;
  background: #0b121d; color: var(--text); font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.auth-card .field input::placeholder { color: #7d8dab; opacity: 1; }
.auth-card .field input:hover { border-color: #33455f; }
.auth-card .field input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); }
/* Autofill keeps the dark field instead of the browser's pale one. */
.auth-card .field input:-webkit-autofill { -webkit-text-fill-color: var(--text); caret-color: var(--text); box-shadow: 0 0 0 40px #0b121d inset; }
.auth-card .field input:-webkit-autofill:focus { box-shadow: 0 0 0 40px #0b121d inset, 0 0 0 3px rgba(59, 130, 246, 0.2); }
.control { position: relative; display: flex; align-items: center; }
.control > .icon { position: absolute; left: 14px; width: 22px; height: 22px; color: #9fb2d4; pointer-events: none; }
.auth-card .control input { padding-left: 54px; }
.auth-card .control-reveal input { padding-right: 50px; }
.reveal {
  position: absolute; right: 4px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 7px; background: none; color: #7f93b5; cursor: pointer;
}
.reveal[hidden] { display: none; }
.reveal:hover { color: #c3d3ee; }
.reveal .icon { width: 23px; height: 23px; }
.reveal[aria-pressed='true'] .icon-off, .reveal:not([aria-pressed='true']) .icon-on { display: none; }
.btn-brand {
  position: relative; display: flex; align-items: center; justify-content: center; width: 100%; min-height: 46px; padding: 11px 52px;
  border: 1px solid rgba(96, 190, 255, 0.45); border-radius: 7px; cursor: pointer;
  background:
    radial-gradient(55% 140% at 72% 0%, rgba(255, 255, 255, 0.16), transparent 70%),
    linear-gradient(90deg, #0b4ff0 0%, #1a7ffd 55%, #0bb4ff 100%);
  box-shadow: 0 14px 32px -12px rgba(17, 122, 255, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  color: #fff; font-size: 15px; font-weight: 600; line-height: 1.2; text-align: center;
  transition: filter 0.15s, box-shadow 0.15s;
}
.btn-brand .icon { position: absolute; right: 15px; width: 20px; height: 20px; }
.btn-brand:hover { color: #fff; filter: brightness(1.08); box-shadow: 0 16px 36px -12px rgba(17, 140, 255, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.2); }
.btn-brand:active { filter: brightness(0.96); }
.btn-brand:focus-visible { outline: 2px solid #7cc8ff; outline-offset: 3px; }
.auth-card .stack .btn-brand { margin-top: 8px; }
.auth-secure { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 27px; margin: 28px 0 0; font-size: 12.5px; color: #8b9dbc; }
.auth-secure::before, .auth-secure::after { content: ''; height: 1px; background: #1c2a3e; }
.auth-secure span { display: inline-flex; align-items: center; gap: 9px; }
.auth-secure .icon { width: 19px; height: 19px; color: #2f8dff; }
.auth-card a:not(.btn-brand) { color: #4fb3ff; }
.auth-card a:not(.btn-brand):hover { color: #9ad6ff; }
.auth-card .muted.small { color: #8b9dbc; text-align: center; }
.auth-foot { margin: 18px 0 0; font-size: 13px; text-align: center; }
.qr { display: flex; justify-content: center; margin: 0 0 12px; }
.qr svg { display: block; max-width: 100%; height: auto; border-radius: 8px; }
.secret { display: inline-block; margin-top: 4px; color: var(--text-2); letter-spacing: 0.08em; font-size: 13px; }
.codes { columns: 2; margin: 0 0 24px; padding-left: 22px; color: var(--muted-2); }
.codes li { margin-bottom: 6px; }
.codes code { color: var(--text); font-size: 14px; letter-spacing: 0.06em; }
.closed { text-align: center; padding: 24px; }
.closed-brand { margin-bottom: 24px; }
.closed-brand .wordmark svg { height: 64px; }
.closed-title { margin: 0 0 6px; font-size: 18px; font-weight: 600; }
.closed .btn-brand { display: inline-flex; width: auto; margin-top: 10px; }
@media (max-width: 520px) {
  body.auth { padding: 16px; }
  .auth-inner { padding: 36px 22px 26px; }
  .auth-brand { margin-bottom: 24px; }
  .auth-brand .wordmark svg { height: 68px; }
  .auth-card h1 { font-size: 24px; }
  .auth-card .field input { font-size: 16px; } /* below 16px, iOS zooms into the field */
  .auth-secure { gap: 14px; }
}

/* ---- App bar ------------------------------------------------------------------------ */
.appbar {
  position: sticky; top: 0; z-index: 40; height: 54px; padding: 0 18px;
  display: flex; align-items: center; gap: 14px; background: var(--bar); border-bottom: 1px solid var(--line);
}
.appbar-brand { display: flex; align-items: center; gap: 11px; }
.appbar-brand .label { font-size: 12.5px; letter-spacing: 0.12em; }
.appbar-sep { width: 1px; height: 16px; background: var(--line); }
.appbar-nav { display: flex; gap: 4px; margin-left: 10px; }
.appbar-nav a { padding: 6px 10px; font-size: 12.5px; color: var(--muted-2); }
.appbar-nav a:hover, .appbar-nav a[aria-current='page'] { color: var(--text); }
.usermenu { position: relative; padding-left: 12px; border-left: 1px solid var(--line); }
.usermenu summary { list-style: none; display: inline-flex; align-items: center; gap: 9px; cursor: pointer; color: var(--muted); font-size: 12.5px; padding: 4px 2px; }
.usermenu summary::-webkit-details-marker { display: none; }
.avatar { width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--line-3); border: 1px solid var(--line-2); display: inline-flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 600; color: var(--text-3); }
/* The account's photo (V17). The server never resizes: the round slot and this crop are
   the whole of the sizing, which is why the upload is capped at 1 Mo. */
img.avatar { object-fit: cover; background: var(--line-3); }
/* The face on a note: three times the 22 px it shipped at (owner, 2026-09-20 evening) —
   big enough to know who is talking without reading the name. */
.avatar-note { width: 66px; height: 66px; font-size: 24px; }
.avatar-xs { width: 18px; height: 18px; font-size: 8.5px; }
.avatar-lg { width: 64px; height: 64px; font-size: 22px; }
.usermenu-panel { position: absolute; top: calc(100% + 8px); right: 0; z-index: 45; width: 240px; background: var(--panel); border: 1px solid var(--line-2); box-shadow: 0 22px 50px var(--shadow-2); }
.usermenu-id { padding: 13px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.usermenu-id .muted { font-size: 11.5px; margin-top: 3px; }
.usermenu-link { display: block; padding: 12px 14px; font-size: 13px; color: var(--text-3); border-bottom: 1px solid var(--line); }
.usermenu-link:hover { background: var(--line-3); color: var(--text); }
.usermenu-logout { width: 100%; text-align: left; background: none; border: none; cursor: pointer; padding: 12px 14px; font-size: 13px; color: var(--text-3); }
.usermenu-logout:hover { background: var(--line-3); color: var(--red-ink); }
/* A face that opens its own card (owner, 2026-09-20). The link is the hit area, nothing more. */
.avatar-link { display: inline-flex; flex: none; border-radius: 50%; }
.avatar-link:hover .avatar { border-color: var(--blue); }

/* The account card: the owner's own design — the photo large in a blue ring, the name, what they
   are, and whether they are here. Same overlay as every other modal in Talio. */
.profile-modal { max-width: 430px; text-align: center; padding: 32px 30px 26px; }
.profile-modal .close { position: absolute; top: 16px; right: 18px; }
/* The blue ring is painted OUTSIDE the picture, not as a border on it. A border makes the
   picture's own box smaller than its circle, and the owner's browser then laid the photo out
   from the BORDER box instead of the content box: measured on his screenshot of 2026-09-20, the
   picture sat 5,5 CSS px up and to the left of its circle — the border width exactly — and the
   grey behind it showed as a crescent running from 3 o'clock round to 9 o'clock, nothing at the
   top. Chrome and Firefox both drew it correctly, which is why it took a measurement rather than
   a second pair of eyes. With box-shadow there is no inset left to get wrong in any engine: the
   photo fills its own box edge to edge and the ring hangs off it. Same outer size as before —
   210 + 5 + 5 = 220 — and the 11 px top margin keeps the 6 px gap the design had, the ring
   taking 5 of it. */
.avatar-profile { width: 210px; height: 210px; font-size: 68px; display: flex; margin: 11px auto 0; border: none; box-shadow: 0 0 0 5px var(--blue); }
/* An <img> is a replaced element; making it a flex container gives the engine two boxes to
   reconcile for no gain. The flex centring exists for the initials, which are a <span>. */
img.avatar-profile { display: block; }
.profile-modal h2 { margin: 22px 0 3px; font-size: 27px; font-weight: 600; }
.profile-role { margin: 0; font-size: 16px; color: var(--muted-2); }
.profile-foot { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line-3); }
.profile-state { display: inline-flex; align-items: center; gap: 9px; margin: 0; padding: 9px 20px; border-radius: 999px; font-size: 14px; color: var(--muted-2); background: var(--tint-grey); border: 1px solid var(--line-2); }
.profile-state.is-online { color: var(--green-ink); background: var(--tint-green); border-color: var(--edge-green); }
.profile-dot { width: 9px; height: 9px; flex: none; border-radius: 50%; background: currentColor; }

/* V23: what the other founder wrote and I have not opened yet. The badge is a link to the
   list filtered on them; the dot on a row is the same fact, seen from the list. Gold, because
   it is an invitation to read, not an alarm. */
.appbar-badge { padding: 4px 9px; font-size: 11px; font-weight: 600; font-stretch: 112%; letter-spacing: 0.06em; white-space: nowrap; color: var(--gold-ink); background: var(--tint-gold); border: 1px solid var(--edge-gold); }
.appbar-badge:hover { color: var(--gold-ink); border-color: var(--gold); }
.unread-dot { display: inline-block; width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--gold); margin-right: 7px; vertical-align: middle; }

/* The light/dark switch: the app bar's own button, with the icon of what it will do. */
.theme-switch { margin: 0; }
.btn .icon-btn { width: 13px; height: 13px; flex: none; }

/* ---- Réglages: my account ----------------------------------------------------------- */
.account { display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
.account-actions { flex: 1 1 260px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.account-actions form { margin: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.account-actions .field { width: 100%; max-width: 420px; }
.account-actions input[type='file'] { padding: 9px 12px; font-size: 12.5px; color: var(--muted-2); }

/* ---- Réglages: Profil HAJ (V12, 2026-10-23) ------------------------------------------- */
/* One piece per block — the DUME first. The pill is the account card's, smaller: grey while
   the piece is to prepare, green once it is ready. Tokens only, so both themes follow. */
.piece { padding-top: 14px; border-top: 1px solid var(--line-3); }
.piece-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.piece-title { margin: 0; font-size: 13px; font-weight: 600; color: var(--text-3); }
.piece-state { display: inline-flex; align-items: center; padding: 3px 12px; border-radius: 999px; font-size: 12px; color: var(--muted-2); background: var(--tint-grey); border: 1px solid var(--line-2); }
.piece-state.is-ready { color: var(--green-ink); background: var(--tint-green); border-color: var(--edge-green); }
.piece .hint { display: block; margin: 0 0 10px; }
.piece-meta { margin: 0 0 8px; font-size: 12.5px; color: var(--muted-2); }
.piece-files { margin: 0 0 10px; padding: 0; list-style: none; display: grid; gap: 4px; }
.piece-note { margin: 0 0 14px; padding: 8px 12px; border-left: 2px solid var(--line-2); font-size: 13px; color: var(--text-2); white-space: pre-line; }
.piece input[type='file'] { padding: 9px 12px; font-size: 12.5px; color: var(--muted-2); }
/* The drawer's reminder under « Exclusion et DUME »: a sub-line of the box, nothing louder. */
.bdume { margin-top: 4px; }
/* Seen in Chrome at 1400 px: « Profil HAJ » broke over two lines, and « À préparer » in the form. */
.bdume a, .piece .check { white-space: nowrap; }

/* ---- Banners ------------------------------------------------------------------------ */
.banner { margin: 14px 18px 0; padding: 10px 14px; font-size: 13px; border: 1px solid; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.banner-warn { border-color: var(--edge-orange); background: var(--tint-orange); color: var(--warn-ink); }
.banner-ok { border-color: var(--line); background: var(--panel); color: var(--muted); }
.banner form { margin: 0; }

/* ---- Dashboard tiles ---------------------------------------------------------------- */
.tiles { padding: 20px 18px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.tile { display: block; text-align: left; padding: 15px 17px; background: var(--panel); border: 1px solid var(--line); color: var(--text); }
.tile:hover { color: var(--text); border-color: var(--line-2); }
.tile[aria-current='true'] { background: var(--raised); }
.tile-decide[aria-current='true'] { border-color: var(--gold); }
.tile-write[aria-current='true'] { border-color: var(--red); }
.tile-pending[aria-current='true'] { border-color: var(--magenta); }
.tile-expired[aria-current='true'] { border-color: var(--line-2); }
.tile-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tile-dot { width: 7px; height: 7px; border-radius: 50%; }
.tile-decide .tile-dot { background: var(--gold); }
.tile-write .tile-dot { background: var(--red); }
.tile-pending .tile-dot { background: var(--magenta); }
.tile-expired .tile-dot { background: var(--faint); }
.tile-body { margin-top: 12px; display: flex; align-items: baseline; gap: 9px; }
.tile-n { font-size: 28px; font-weight: 600; line-height: 1; }
.tile-hint { font-size: 12px; color: var(--muted-2); }

/* ---- Toolbar ------------------------------------------------------------------------ */
.sync-strip { margin: 14px 18px 0; padding: 9px 12px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border: 1px solid var(--line); background: var(--panel-2); font-size: 12.5px; }
/* The line under the tiles (2026-10-24): when the BDA was last searched, and the button to search it now. */
.sync-strip-text { flex: 1 1 320px; }
.sync-strip.is-live { display: block; padding: 0; border: 0; background: none; }
.sync-strip .sync-live { margin: 0; }
.toolbar { padding: 18px 18px 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.search { position: relative; display: flex; align-items: center; }
.search svg { position: absolute; left: 11px; color: var(--faint); }
.search input { width: 330px; max-width: 70vw; background: var(--panel); border: 1px solid var(--line); color: var(--text); padding: 9px 12px 9px 32px; font-size: 13px; outline: none; }
.search input:focus { border-color: var(--blue); }
.select { background: var(--panel); border: 1px solid var(--line); color: var(--muted); padding: 9px 10px; font-size: 13px; }
.count { font-size: 12.5px; color: var(--muted-3); }
.chip { background: none; border: 1px solid var(--line); color: var(--muted-2); padding: 7px 11px; font-size: 12px; cursor: pointer; }
.chip:hover { color: var(--text); }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted-2); }

/* ---- Table -------------------------------------------------------------------------- */
.table-wrap { padding: 0 18px 28px; min-width: 0; }
.table { border: 1px solid var(--line); background: var(--bar); overflow-x: auto; }
.table-inner { min-width: 1000px; }
.trow, .thead { display: grid; grid-template-columns: 108px minmax(240px, 1fr) 200px 128px 112px 78px; gap: 14px; padding: 10px 16px; align-items: center; }
.thead { border-bottom: 1px solid var(--line); background: var(--panel-2); font-size: 10.5px; font-weight: 500; font-stretch: 112%; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-3); }
.trow { border-bottom: 1px solid var(--line-3); color: inherit; }
.trow:last-child { border-bottom: none; }
.trow:hover { background: var(--hover); color: inherit; }
.trow.is-open { background: var(--hover); }
.right { text-align: right; }
.dl { display: flex; align-items: center; gap: 9px; min-width: 0; }
.dl-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: currentColor; }
.dl-text { font-size: 12.5px; white-space: nowrap; }
.tone-red { color: var(--red-ink); }
.tone-red .dl-text { font-weight: 600; }
.tone-red .dl-dot { box-shadow: 0 0 10px var(--glow-red); }
.tone-amber { color: var(--orange-ink); }
.tone-amber .dl-text { font-weight: 600; }
.tone-gold { color: var(--gold-ink); }
.tone-calm { color: var(--muted-3); }
.tone-done, .tone-dead { color: var(--grey-ink); }
.t-title { font-size: 13.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-meta { margin-top: 3px; font-size: 11px; font-stretch: 112%; letter-spacing: 0.06em; color: var(--muted-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-cell { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-num { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.t-upd { font-size: 12px; color: var(--muted-3); }
.src-bda { color: var(--blue-ink); }
.empty { padding: 56px 20px; text-align: center; }
.empty p { margin: 0 0 6px; }

.badge { display: inline-block; padding: 4px 9px; font-size: 11px; font-weight: 600; font-stretch: 112%; letter-spacing: 0.06em; border: 1px solid; white-space: nowrap; }
.badge-nouveau { color: var(--blue-ink); background: var(--tint-blue); border-color: var(--edge-blue); }
.badge-a_etudier { color: var(--gold-ink); background: var(--tint-gold); border-color: var(--edge-gold); }
.badge-postule { color: var(--magenta-ink); background: var(--tint-magenta); border-color: var(--edge-magenta); }
.badge-gagne { color: var(--green-ink); background: var(--tint-green); border-color: var(--edge-green); }
.badge-perdu { color: var(--muted-2); background: var(--tint-grey); border-color: var(--edge-grey); }
.badge-archived { color: var(--faint); border-color: var(--line-2); }

/* ---- Drawer ------------------------------------------------------------------------- */
.overlay { position: fixed; inset: 0; z-index: 60; }
.overlay-shade { position: absolute; inset: 0; background: var(--scrim); display: block; }
/* About 80 % of the page (owner, 2026-09-17: the four blocks of the briefing need the room),
   never narrower than the old 660 px panel, never wider than a reading width. */
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: clamp(min(660px, 96vw), 80vw, 1400px); background: var(--bar); border-left: 1px solid var(--line-2); display: flex; flex-direction: column; box-shadow: -40px 0 90px var(--shadow); container: drawer / inline-size; }
.spine { height: 3px; flex: none; }
.spine-nouveau { background: linear-gradient(90deg, var(--blue), transparent); }
.spine-a_etudier { background: linear-gradient(90deg, var(--gold), transparent); }
.spine-postule { background: linear-gradient(90deg, var(--magenta), transparent); }
.spine-gagne { background: linear-gradient(90deg, var(--green), transparent); }
.spine-perdu { background: linear-gradient(90deg, var(--muted-2), transparent); }
.d-head { padding: 20px 24px 18px; display: flex; align-items: flex-start; gap: 20px; }
.d-main { flex: 1; min-width: 0; }
.d-kicker { display: flex; align-items: center; gap: 9px; margin-bottom: 11px; font-size: 11px; font-weight: 500; font-stretch: 112%; letter-spacing: 0.13em; color: var(--muted-3); flex-wrap: wrap; }
.d-kicker .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--line-2); }
.d-title { margin: 0 0 9px; font-size: 21px; font-weight: 600; line-height: 1.24; letter-spacing: -0.015em; text-wrap: pretty; }
.d-buyer { margin: 0; font-size: 13.5px; color: var(--muted); }
.d-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.close { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); color: var(--muted-2); }
.close:hover { color: var(--text); border-color: var(--line-2); }
.dlbox { padding: 9px 13px; text-align: right; border: 1px solid var(--line); background: var(--panel); }
.dlbox.tone-red { border-color: var(--edge-red); background: var(--tint-red); }
.dlbox.tone-amber { border-color: var(--edge-orange); background: var(--tint-orange); }
.dlbig { font-size: 16px; font-weight: 600; line-height: 1.1; white-space: nowrap; }
.dldate { margin-top: 4px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.steps { margin: 0 24px 12px; display: flex; align-items: stretch; border: 1px solid var(--line); background: var(--panel); }
.steps form { flex: 1; display: flex; margin: 0; }
.step { flex: 1; cursor: pointer; padding: 10px 6px; font-size: 12px; background: none; border: none; border-bottom: 2px solid transparent; color: var(--muted-2); white-space: nowrap; }
.steps form + form .step { border-left: 1px solid var(--line); }
.step:hover { color: var(--text); }
.step.is-current { font-weight: 600; }
.step.is-current.s-nouveau { color: var(--blue-ink); background: var(--tint-blue); border-bottom-color: var(--blue); }
.step.is-current.s-a_etudier { color: var(--gold-ink); background: var(--tint-gold); border-bottom-color: var(--gold); }
.step.is-current.s-postule { color: var(--magenta-ink); background: var(--tint-magenta); border-bottom-color: var(--magenta); }
.step.is-current.s-gagne { color: var(--green-ink); background: var(--tint-green); border-bottom-color: var(--green); }
.step.is-current.s-perdu { color: var(--muted-2); background: var(--tint-grey); border-bottom-color: var(--muted-2); }

.status-form { margin: 0 24px 12px; display: flex; align-items: flex-end; gap: 10px; }
.status-field { display: flex; flex-direction: column; gap: 6px; flex: 1; max-width: 280px; }
.status-field .label { font-size: 10px; color: var(--muted-3); }
.status-select { background: var(--panel); border: 1px solid var(--line); border-left-width: 3px; color: var(--text); padding: 9px 10px; font-size: 13px; font-weight: 600; }
.status-select:focus { border-color: var(--blue); }
.status-select.s-nouveau { border-left-color: var(--blue); }
.status-select.s-a_etudier { border-left-color: var(--gold); }
.status-select.s-postule { border-left-color: var(--magenta); }
.status-select.s-gagne { border-left-color: var(--green); }
.status-select.s-perdu { border-left-color: var(--muted-2); }
.decide { margin: 0 24px 16px; padding: 12px 14px; border: 1px solid var(--line); background: var(--panel); }
.decide-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.decide-verdict { font-size: 12.5px; color: var(--muted); }
.decide-verdict strong { color: var(--text); font-weight: 600; }
.decide details { margin-top: 10px; }
.decide summary { cursor: pointer; font-size: 12.5px; color: var(--muted-2); }
.decide-form { margin-top: 10px; display: grid; gap: 10px; }
.reasons { display: flex; flex-wrap: wrap; gap: 6px; }
.reason { position: relative; }
.reason input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.reason span { display: inline-block; border: 1px solid var(--line-2); padding: 6px 10px; font-size: 12px; color: var(--muted); }
.reason input:checked + span { border-color: var(--red); color: var(--text); background: var(--tint-red); }
.reason input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

.d-body { flex: 1; overflow-y: auto; border-top: 1px solid var(--line-3); }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line-3); border: 1px solid var(--line-3); margin: 14px 24px 6px; }
.fcell { background: var(--bar); padding: 11px 13px; min-width: 0; }
.fcell-wide { grid-column: 1 / -1; }
.fcell .label { font-size: 10px; margin-bottom: 5px; display: block; color: var(--muted-3); }
.fval { font-size: 13px; color: var(--text-2); line-height: 1.4; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
/* ---- Briefing of the tender documents (owner request 2026-09-17) --------------------- */
.brief { margin: 14px 24px 6px; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--gold); }
.brief-quiet { border-left-color: var(--line-2); }
.brief-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 12px 18px; }
.figure .label { display: block; margin-bottom: 4px; font-size: 10px; color: var(--muted-3); }
.figure-n { font-size: 20px; font-weight: 600; line-height: 1.15; color: var(--text); font-variant-numeric: tabular-nums; }
.figure-note { font-size: 11px; font-weight: 400; letter-spacing: 0.06em; color: var(--muted-3); }
.figure-t { font-size: 14px; color: var(--text-2); }
.brief-quote { margin: 12px 0 0; padding-left: 10px; border-left: 2px solid var(--line-2); font-size: 12.5px; font-style: italic; color: var(--muted); }
.brief-summary { margin: 12px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--text-2); }
.brief-line { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.brief-more { margin-top: 12px; }
.brief-more summary { cursor: pointer; font-size: 12.5px; color: var(--muted-2); }
.brief-list { margin-top: 10px; }
.brief-list ul { margin: 6px 0 0; padding-left: 20px; font-size: 13px; line-height: 1.5; color: var(--text-2); }
.brief-list li { margin-bottom: 4px; }
.brief-foot { margin: 12px 0 0; display: flex; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; font-size: 11px; color: var(--muted-3); }
.brief-action { margin: 8px 0 0; }
.brief-foot .brief-action { margin: 0 0 0 auto; }
.linkbtn.linkbtn-gold { color: var(--gold-ink); font-size: 12px; border-bottom: 1px dashed var(--gold-line); }
.linkbtn.linkbtn-gold:hover { color: var(--orange-ink); }
/* Schema 3-4: the blocks, in the order a founder decides in. Prérequis and Comment on gagne
   take the full width — one holds sixteen subjects, the other the criteria and their weights. */
.bblocks { margin-top: 14px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@container drawer (min-width: 900px) {
  .bblocks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bblock-wide { grid-column: 1 / -1; }
  .bblock-wide > dl { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 26px; }
  .bblock-wide .bsilent { grid-column: 1 / -1; }
}
.bblock { background: var(--bar); border: 1px solid var(--line-3); border-top: 2px solid var(--line-2); padding: 11px 14px 13px; min-width: 0; }
.bblock-title { margin: 0 0 9px; font-size: 11px; font-weight: 600; font-stretch: 112%; letter-spacing: 0.14em; text-transform: uppercase; }
.bblock-prereq { border-top-color: var(--red); }
.bblock-prereq .bblock-title { color: var(--red-ink); }
.bblock-money { border-top-color: var(--gold); }
.bblock-money .bblock-title { color: var(--gold-ink); }
.bblock-effort { border-top-color: var(--blue); }
.bblock-effort .bblock-title { color: var(--blue-ink); }
.bblock-win { border-top-color: var(--green); }
.bblock-win .bblock-title { color: var(--green-ink); }
.bblock dl, .bblock-rest { margin: 0; display: grid; gap: 9px; }
.bblock-rest { margin-top: 10px; }
.bitem { display: grid; grid-template-columns: minmax(96px, 32%) minmax(0, 1fr); gap: 12px; align-items: baseline; }
.bitem dt { font-size: 10px; color: var(--muted-3); }
.bitem dd { margin: 0; font-size: 13px; line-height: 1.45; color: var(--text-2); overflow-wrap: anywhere; }
.bempty { font-size: 12px; color: var(--faint); }
/* What the documents say nothing about, named once instead of a line each. */
.bsilent { margin-top: 3px; padding-top: 9px; border-top: 1px dashed var(--line-3); }
.bsilent dd { font-size: 12px; line-height: 1.5; color: var(--faint); }
.bfig { font-size: 17px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.bsub { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.blist { margin: 0; padding-left: 16px; }
.blist li { margin-bottom: 4px; }
.bquote { margin-top: 3px; }
.bquote summary { display: inline; cursor: pointer; list-style: none; font-size: 11px; color: var(--muted-3); border-bottom: 1px dashed var(--line-2); }
.bquote summary::-webkit-details-marker { display: none; }
.bquote summary:hover { color: var(--text-3); }
.bquote blockquote { margin: 5px 0 2px; padding-left: 9px; border-left: 2px solid var(--line-2); font-size: 12px; font-style: italic; color: var(--muted); }
.brief-docs { margin-top: 14px; padding-top: 4px; border-top: 1px solid var(--line-3); }
.bdocs { margin: 6px 0 0; padding: 0; list-style: none; font-size: 12.5px; line-height: 1.6; color: var(--text-3); }
.bdoc-state { color: var(--muted-3); }
.bdoc-part .bdoc-state, .bdoc-budget .bdoc-state, .bdoc-unread .bdoc-state { color: var(--orange-ink); }
.doc-tag { margin-left: 6px; padding: 2px 6px; font-size: 10px; font-weight: 600; letter-spacing: 0.06em; color: var(--orange-ink); border: 1px solid var(--edge-orange); }
/* Documents on another platform (3P, …): the link, and the way through. */
.links { margin: 14px 24px 6px; display: flex; align-items: baseline; gap: 6px 12px; flex-wrap: wrap; font-size: 13px; }
.links .label { font-size: 10px; color: var(--muted-3); }
.links-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; min-width: 0; }
.links-list a { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.links-empty { display: block; padding: 13px 16px; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--orange); }
.links-title { margin: 0 0 8px; font-size: 13.5px; color: var(--text); }
.links-hint { margin: 9px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
/* A figure read in the documents rather than typed by a founder. */
.t-briefed { border-bottom: 1px dashed var(--line-2); }
.t-none { color: var(--faint); font-size: 12px; }
.desc { margin: 10px 24px 4px; font-size: 13px; color: var(--muted); line-height: 1.55; white-space: pre-line; }
.desc summary { cursor: pointer; color: var(--muted-2); font-size: 12.5px; }
/* The three tabs sit above the scrolling body (owner request 2026-09-19), so they never
   scroll away and each panel is the whole of what the drawer shows. */
.tabs-bar { flex: none; padding: 2px 24px 11px; background: var(--bar); }
.drawer-alert { flex: none; margin: 0 24px 12px; }
/* Vue d'ensemble: its sections carry the drawer's own 24 px margin, so the panel adds none. */
.tabpanel-overview { padding: 14px 0 22px; }
.tabs { display: inline-flex; gap: 2px; padding: 3px; background: var(--panel); border: 1px solid var(--line); }
.tab { padding: 8px 14px; font-size: 12.5px; color: var(--muted-2); white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab[aria-current='page'] { background: var(--raised-2); font-weight: 600; color: var(--text); }
.tabpanel { padding: 16px 24px 24px; }
.note-form textarea { width: 100%; background: var(--panel); border: 1px solid var(--line); color: var(--text); padding: 11px 12px; font-size: 13px; line-height: 1.5; outline: none; resize: vertical; }
.note-form textarea:focus { border-color: var(--blue); }
.note-form .btn { margin-top: 9px; }
.list { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
/* A thread: the message, its replies under it, and the way to add one (V25). One level deep. */
.thread { display: grid; gap: 8px; min-width: 0; }
.note { background: var(--panel); border: 1px solid var(--line-3); padding: 13px 15px; display: flex; align-items: flex-start; gap: 14px; }
.note-reply { margin-left: 26px; border-left: 2px solid var(--line-2); gap: 11px; padding: 11px 13px; }
.avatar-reply { width: 40px; height: 40px; font-size: 15px; }
.note-gone { margin: 0; font-size: 13px; font-style: italic; color: var(--muted-3); }
.reply-open { justify-self: start; margin-left: 26px; }
.reply-form { margin-left: 26px; }
.reply-form textarea { font-size: 13px; }
.note-main { flex: 1; min-width: 0; }
.note-head { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.note-who { font-size: 11.5px; font-weight: 600; color: var(--text-3); }
.note-at { font-size: 11px; color: var(--muted-3); }
.note-head form { margin: 0 0 0 auto; }
.linkbtn { background: none; border: none; padding: 0; color: var(--muted-3); font-size: 11.5px; cursor: pointer; }
.linkbtn:hover { color: var(--red-ink); }
.note-body { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.docs-two { display: grid; gap: 18px; align-items: start; }
@container drawer (min-width: 860px) { .docs-two { grid-template-columns: minmax(210px, 28%) minmax(0, 1fr); } }
.docs-hint { margin: 0; font-size: 11.5px; line-height: 1.5; color: var(--muted-3); }
.docs-two .drop { margin-bottom: 11px; }
.drop { display: block; border: 1px dashed var(--line-2); padding: 18px; text-align: center; margin-bottom: 14px; color: var(--muted-2); font-size: 13px; }
.drop.is-over { border-color: var(--blue); color: var(--blue-ink); }
.drop input[type='file'] { display: block; margin: 10px auto 0; color: var(--muted-2); font-size: 12.5px; }
.docs-list { margin-top: 0; }
.doc { background: var(--panel); border: 1px solid var(--line-3); padding: 11px 13px; display: flex; align-items: center; gap: 13px; }
.doc-ext { flex: none; font-size: 10px; font-weight: 600; font-stretch: 112%; letter-spacing: 0.1em; color: var(--blue-ink); border: 1px solid var(--edge-blue); padding: 4px 6px; }
.doc-main { flex: 1; min-width: 0; }
.doc-name { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-meta { margin-top: 3px; font-size: 11px; color: var(--muted-3); }
.doc form { margin: 0; }
/* The discussion (2026-09-19): the founders' notes and the history on one rail. A note is a
   card and carries a wider dot; what happened to the tender stays one quiet line. */
.disc { margin-top: 18px; }
.disc-row { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 13px; padding-bottom: 14px; }
.disc-row:last-child .disc-line { display: none; }
.disc-rail { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.disc-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); margin-top: 5px; }
.disc-dot.sys { background: var(--blue); }
.disc-dot.note { width: 9px; height: 9px; background: var(--magenta); margin-top: 12px; }
.disc-line { width: 1px; flex: 1; background: var(--line); }
.disc-label { font-size: 13px; color: var(--text-2); line-height: 1.4; }
.disc-who { margin-top: 3px; display: flex; align-items: center; gap: 6px; font-size: 11px; font-stretch: 112%; letter-spacing: 0.08em; color: var(--muted-3); }
.d-foot { padding: 13px 24px; border-top: 1px solid var(--line); background: var(--panel-2); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.d-foot form { margin: 0; }
.dashed { border-bottom: 1px dashed var(--link-line); font-size: 12.5px; }

/* ---- Modal (quick-add) -------------------------------------------------------------- */
.modal-wrap { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; overflow-y: auto; padding: 24px; background: var(--scrim-2); }
.modal-shade { position: absolute; inset: 0; }
.auth-rule { height: 2px; background: linear-gradient(90deg, var(--magenta), var(--orange)); }
.modal { position: relative; width: 100%; max-width: 660px; background: var(--panel-2); border: 1px solid var(--line); box-shadow: 0 40px 100px var(--shadow); }
.modal-head { padding: 22px 24px 18px; border-bottom: 1px solid var(--line-3); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.modal-head h2 { margin: 0 0 5px; font-size: 18px; font-weight: 600; }
.modal-head p { margin: 0; font-size: 12.5px; color: var(--muted-2); }
.modal-grid { padding: 22px 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.modal-foot { padding: 16px 24px; border-top: 1px solid var(--line-3); display: flex; align-items: center; gap: 12px; }

/* ---- Settings ----------------------------------------------------------------------- */
.settings { max-width: 860px; padding: 24px 18px 48px; display: grid; gap: 18px; }
.settings h1 { margin: 0; font-size: 20px; font-weight: 600; }
.card { background: var(--panel-2); border: 1px solid var(--line); padding: 18px 20px; }
.card h2 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.card > p { margin: 0 0 14px; font-size: 12.5px; color: var(--muted-2); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.runs { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.runs th, .runs td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line-3); }
.runs th { font-weight: 500; color: var(--muted-3); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
/* A synchronisation in progress: five phases, real counters, no overall percentage. */
.sync-live { margin: 14px 0 6px; padding: 12px 14px 13px; background: var(--panel); border: 1px solid var(--line); }
.sync-live-head { margin: 0 0 11px; font-size: 13px; color: var(--text-2); }
.phases { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.phase { display: grid; gap: 6px; min-width: 0; }
.phase-name { font-size: 10.5px; font-weight: 500; font-stretch: 112%; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.phase.is-current .phase-name { color: var(--gold-ink); }
.phase.is-done .phase-name { color: var(--green-ink); }
.phase progress { width: 100%; height: 4px; -webkit-appearance: none; appearance: none; border: none; background: var(--line-3); color: var(--gold-ink); }
.phase progress::-webkit-progress-bar { background: var(--line-3); }
.phase progress::-webkit-progress-value { background: var(--gold); }
.phase progress::-moz-progress-bar { background: var(--gold); }
.phase.is-done progress { color: var(--green-ink); }
.phase.is-done progress::-webkit-progress-value { background: var(--green); }
.phase.is-done progress::-moz-progress-bar { background: var(--green); }
/* Total not known yet (the first page of results has not answered): movement, not a number. */
.phase progress:not([value]) { background: linear-gradient(90deg, var(--line-3) 25%, var(--gold) 50%, var(--line-3) 75%); background-size: 300% 100%; animation: phase-wait 1.6s linear infinite; }
.phase progress:not([value])::-webkit-progress-bar { background: transparent; }
.phase progress:not([value])::-moz-progress-bar { background: transparent; }
@keyframes phase-wait { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .phase progress:not([value]) { animation: none; } }
.phase-count { min-height: 1.35em; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.runs-wrap { overflow-x: auto; }
.runs td:first-child { white-space: nowrap; }
.runs-total td { font-weight: 600; color: var(--text-2); }
.card-sub { margin: 20px 0 8px; font-size: 13px; font-weight: 600; color: var(--text-3); }
.st-ok { color: var(--green-ink); }
.st-failed { color: var(--red-ink); }
.st-running, .st-queued { color: var(--gold-ink); }

/* What Talio has spent at Claude (owner request 2026-09-20): the figure first, then the curve.
   The chart is inline SVG — no library reaches this server, and the CSP forbids inline style,
   so its colours live here and its shape is computed on the server. */
.spend { margin: 6px 0 12px; display: flex; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; }
.spend-fig { font-size: 30px; font-weight: 600; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.spend-sub { margin: 0; font-size: 12.5px; color: var(--muted-2); }
.chart { display: block; width: 100%; height: auto; margin: 0 0 18px; }
.chart-grid { stroke: var(--line-3); stroke-width: 1; }
.chart-area { fill: var(--tint-gold); stroke: none; }
.chart-line { fill: none; stroke: var(--gold); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-tick { fill: var(--muted-3); font-size: 10px; font-stretch: 112%; letter-spacing: 0.06em; }

/* ---- Versions (the journal of releases) --------------------------------------------- */
.versions { max-width: 860px; padding: 24px 18px 48px; display: grid; gap: 18px; }
.versions h1 { margin: 0; font-size: 20px; font-weight: 600; }
.versions-intro { margin: -8px 0 0; font-size: 13px; color: var(--muted-2); }
.release.is-live { border-color: var(--line-2); border-left: 3px solid var(--green); }
.release-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.release-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
/* One date above a whole day's releases (owner, 2026-09-20): five in one afternoon repeated
   "20 septembre" five times. Set like every other label in Talio. */
.versions-day { display: grid; gap: 12px; }
.versions-day-head { margin: 6px 0 0; font-size: 11px; font-weight: 600; font-stretch: 112%; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-3); }
.badge-live { color: var(--green-ink); background: var(--tint-green); border-color: var(--edge-green); }
.release-meta { margin: 6px 0 0; font-size: 12px; color: var(--muted-3); overflow-wrap: anywhere; }
.release-meta code { font-size: 11.5px; color: var(--muted-2); }
.release-note { margin: 6px 0 0; font-size: 12px; font-style: italic; color: var(--muted-3); }
.release-notes { margin: 12px 0 0; padding-left: 18px; display: grid; gap: 7px; font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.release-who { font-size: 12px; color: var(--muted-3); }
.is-untranslated { color: var(--muted); }
.release-flag { font-size: 10.5px; color: var(--orange-ink); border: 1px solid var(--edge-orange); padding: 0 5px; }
.release-commits { margin-top: 12px; }
.release-commits > summary { cursor: pointer; font-size: 12.5px; color: var(--muted-2); }
.release-commits ol { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 8px; font-size: 12.5px; color: var(--text-3); }
.release-commits code { font-size: 11.5px; color: var(--blue-ink); }
.release-body summary { cursor: pointer; font-size: 11.5px; color: var(--muted-3); }
.release-body pre { margin: 6px 0 0; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line-3); font-size: 12px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); }

@media (max-width: 760px) {
  .appbar { gap: 8px; padding: 0 10px; overflow-x: auto; }
  .appbar .btn span, .appbar-brand .label, .appbar-sep, .usermenu summary span:last-child { display: none; }
  /* The bar scrolls sideways on a phone, and a scroll container clips what hangs out of it:
     the menu opened under the avatar was drawn outside the bar and cut off, so there was no
     way to sign out. Fixed to the viewport instead — no ancestor of it establishes a
     containing block, and the bar is sticky at the top, so 54 px lands right under it. */
  .usermenu-panel { position: fixed; top: 54px; right: 8px; left: auto; }
  .avatar-note { width: 44px; height: 44px; font-size: 16px; }
  .avatar-profile { width: 158px; height: 158px; font-size: 52px; }
  .fields { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { padding: 12px 13px; }
  .tile-body { flex-wrap: wrap; }
  .d-head { flex-direction: column; }
  .d-side { align-items: stretch; flex-direction: row-reverse; justify-content: space-between; }
  .bitem { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .phases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Row cells are spans inside the row link. */
.t-main { display: block; min-width: 0; }
.t-title, .t-meta { display: block; }
.upload { display: grid; gap: 8px; }

/* ---- Jev triage (JEV_TRIAGE.md §7.5, owner decision 2026-09-20) --------------------------- */

/* The pin in the list. Gold, like everything in Talio that asks for attention without demanding
   it; the row keeps its own colours so a pinned market still reads as a market. */
.pin {
  display: inline-block;
  margin-bottom: 3px;
  font-size: 10.5px;
  font-weight: 600;
  font-stretch: 112%;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  /* Text, so --gold-ink: it is the same gold in the dark theme and a readable one on white.
     The spine below is a rule, not text, and stays --gold. */
  color: var(--gold-ink);
}
.trow.is-pinned { box-shadow: inset 2px 0 0 var(--gold); }
/* A flag said on the row (Régie, 3P — owner 2026-10-23). BEFORE the title, not after: .t-title
   cuts a long title with an ellipsis, and a badge after it went with the cut — the owner's
   screenshot of n° 36 showed no badge at all. Light blue at his request; tokens, so both themes. */
.flag-badge {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 6px;
  vertical-align: 1px;
  font-size: 10px;
  font-weight: 600;
  font-stretch: 112%;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-ink);
  background: var(--tint-blue);
  border: 1px solid var(--edge-blue);
  white-space: nowrap;
}
/* « Délai court » (owner, 2026-10-23): the one flag that asks to be acted on this week, so it
   wears the orange of a near deadline rather than the informative blue. */
.flag-badge.flag-late { color: var(--orange-ink); background: var(--tint-orange); border-color: var(--edge-orange); }
/* Where the reading stands (owner, 2026-10-23), first on the meta line so the title keeps its
   width: green once a fiche covers today's documents, gold while /lire-documents has it queued. */
.read-badge {
  display: inline-block;
  margin-right: 8px;
  padding: 0 5px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid;
  white-space: nowrap;
}
.read-badge.is-read { color: var(--green-ink); background: var(--tint-green); border-color: var(--edge-green); }
.read-badge.is-todo { color: var(--gold-ink); background: var(--tint-gold); border-color: var(--edge-gold); }

/* The out-of-scope group. A closed <details>, at the foot of the same table, counting itself. */
.fold { border-top: 1px solid var(--line); background: var(--panel-2); }
.fold-head {
  cursor: pointer;
  padding: 10px 16px;
  font-size: 11.5px;
  font-stretch: 112%;
  letter-spacing: 0.06em;
  color: var(--muted-3);
}
.fold-head:hover { color: var(--muted); }
.fold[open] .fold-head { border-bottom: 1px solid var(--line-3); }

/* The drawer panel, built on .brief's shape so the fiche and the tri read as one family. The
   left border is the tell: gold when the tri lifts a market, grey the rest of the time. */
.triage { margin: 0 24px 16px; padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--line-2); background: var(--panel); }
.triage-empty { padding: 10px 14px; }
.triage-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.triage-lane { font-size: 12px; font-weight: 600; color: var(--muted); }
.triage-lane.tone-muted { color: var(--muted-3); }
.triage-fit { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text); }
.triage-note { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }
.triage-bars { margin: 12px 0 0; display: grid; gap: 7px; }
.triage-bar { display: grid; grid-template-columns: minmax(0, 1fr) 150px; align-items: center; gap: 12px; }
.triage-bar dt { font-size: 12.5px; color: var(--text-3); }
.triage-bar dd { margin: 0; display: flex; align-items: center; gap: 8px; }
.tbar { flex: 1; height: 4px; -webkit-appearance: none; appearance: none; border: none; background: var(--line-3); color: var(--gold); }
.tbar::-webkit-progress-bar { background: var(--line-3); }
.tbar::-webkit-progress-value { background: var(--gold); }
.tbar::-moz-progress-bar { background: var(--gold); }
.bar-n { font-size: 11.5px; font-variant-numeric: tabular-nums; color: var(--muted-2); }
.triage-blockers, .triage-flags, .triage-class { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }
.triage-blockers .label, .triage-flags .label { margin-right: 6px; color: var(--muted-3); }
.triage-class { display: flex; align-items: baseline; gap: 6px 12px; flex-wrap: wrap; color: var(--text-3); }
.triage-foot { margin: 12px 0 0; font-size: 11px; line-height: 1.5; }

@media (max-width: 720px) {
  .triage-bar { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

/* The deadline lane is ours, not the model's, so it does not borrow the gold the tri uses. */
.triage-late { margin: 0 0 10px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.triage-late strong { color: var(--text-3); font-weight: 600; }
.triage-empty .triage-late { margin-bottom: 6px; }

/* The kind of work the model read, beside the dimension it scores. */
.triage-of { color: var(--muted-3); font-size: 11.5px; }

/* While admin.js fetches a drawer in place (2026-10-23): the pointer says it is coming. */
.is-busy, .is-busy * { cursor: progress; }

/* The document preview (2026-10-27): the pages of a PDF drawn by the server, or the text Talio
   read, on a page of its own so the drawer stays open in the tab it came from. */
.preview { max-width: 960px; margin: 0 auto; padding: 22px 18px 60px; }
.preview-back { margin: 0 0 14px; font-size: 13px; }
.preview-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.preview-title { flex: 1; min-width: 0; }
.preview-title h1 { margin: 0; font-size: 18px; font-weight: 500; overflow-wrap: anywhere; }
.preview-title .doc-meta { margin: 3px 0 0; }
.preview-tabs { margin-bottom: 16px; }
.preview-pages { display: flex; flex-direction: column; gap: 14px; }
/* A4 until the picture arrives, so lazy loading sees pages below the fold as below it. */
.preview-page { display: block; width: 100%; height: auto; aspect-ratio: auto 210 / 297; background: #fff; border: 1px solid var(--line); }
.preview-note { margin: 0 0 12px; font-size: 12.5px; color: var(--muted-2); }
.preview-text { margin: 0; padding: 18px 20px; white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text); background: var(--panel); border: 1px solid var(--line); }
.preview-empty { padding: 18px 20px; background: var(--panel); border: 1px solid var(--line); }
