/* Hallmark · checked: 2026-10-24 · genre: modern-minimal (inferred: a B2B product for SMEs, a tool all day long)
 * floor: 0 FAIL in the material half · fixed: 9 (34, 40, 48, 49a, 38iii, 39b, 25, 40 dark, 41) · structural: 6 printed (44, 47a, 58, 59, 77, 78)
 * built: the project · redesign: polish · v2.0.0 */
/* Hallmark · answered F24 · the hero search is the page's one floating object: its shadow is the elevation, its edge the field contrast */
/* Hallmark · answered F19 · four weights stay, the variable Mona Sans carries them at one family; cutting one would restyle, not polish */
/* Hallmark · dismissed F7 · every input shares one recipe on purpose, a field is a field across sixty screens */
/* Hallmark · dismissed F15 · one stylesheet for two shells: the public container and the app content column are two surfaces, never on one page */

/* Tandao — feuille de style unique.

   Système : interface d'outil de travail, dense et calme, à la manière des logiciels de gestion que
   les équipes utilisent toute la journée. Neutres froids, un seul violet de marque (le groupement),
   l'encre pour les actions principales, la couleur réservée aux états : échéance (rouge, ambre),
   verdict (vert, violet, ambre, gris). Mona Sans à chasse variable : élargie pour les titres,
   normale pour le texte, chiffres tabulaires partout où l'on compare des montants et des dates.
   Aucun style en ligne : la politique de sécurité (CSP) les interdit. */

@font-face {
  font-family: "Mona Sans";
  src: url("../fonts/mona-sans-latin-wdth.woff2") format("woff2-variations");
  font-weight: 200 900; font-stretch: 75% 125%; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Mona Sans";
  src: url("../fonts/mona-sans-latin-ext-wdth.woff2") format("woff2-variations");
  font-weight: 200 900; font-stretch: 75% 125%; font-display: swap;
  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;
}

/* Jetons ---------------------------------------------------------------------------------------- */
:root {
  /* Clair uniquement, même si l'appareil est en mode sombre (« only » : pas d'assombrissement automatique). */
  color-scheme: only light;
  --canvas: #f6f7f9;
  --surface: #ffffff;
  --fill: #f1f2f5;
  --fill-strong: #e7e9ee;
  --line: #e3e5ea;
  --line-strong: #cfd3da;
  --text: #16181d;
  --text-2: #5a606c;
  --text-3: #656b77;
  --primary: #16181d;
  --primary-hover: #2c2f37;
  --primary-text: #ffffff;
  --accent: #5b47e0;
  --accent-text: #4a37c9;
  --accent-soft: #efecfd;
  --accent-line: #cfc8f7;
  --green: #0f7b4f;
  --green-soft: #e4f4ec;
  --on-accent: #ffffff;
  --on-green: #ffffff;
  --field-edge: #868c98;
  --share-1: #5b47e0; --share-2: #13a06a; --share-3: #e08a12; --share-4: #3d7fd9; --share-5: #d64a7c; --share-6: #8a909b;
  --amber: #a15800;
  --amber-soft: #fcf0dc;
  --red: #c7321c;
  --red-soft: #fde9e4;
  --overlay: rgba(22, 24, 29, 0.42);
  --av1-bg: #e8e4fd; --av1: #4a37c9; --av2-bg: #dff3ea; --av2: #0f6a45; --av3-bg: #fdeedb; --av3: #8f4e00;
  --av4-bg: #e2edfb; --av4: #22579b; --av5-bg: #fbe4ec; --av5: #a2234f;
  --shadow-1: 0 1px 2px rgba(22, 24, 29, 0.05);
  --shadow-pop: 0 12px 32px -8px rgba(22, 24, 29, 0.18), 0 0 0 1px rgba(22, 24, 29, 0.06);
  --shadow-window: 0 24px 60px -24px rgba(22, 24, 29, 0.28), 0 0 0 1px rgba(22, 24, 29, 0.07);

  --font: "Mona Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wide: 112%;
  --r-sm: 6px;
  --r: 8px;
  --r-lg: 12px;
  --sidebar: 15rem;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23868c98' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 15 5 5 5-5'/%3E%3Cpath d='m7 9 5-5 5 5'/%3E%3C/svg%3E");
}
/* Base ------------------------------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(4.5rem + env(safe-area-inset-top, 0px)); }
body {
  margin: 0; min-height: 100vh; background: var(--canvas); color: var(--text);
  font: 400 0.875rem/1.5 var(--font); font-feature-settings: "tnum" 0;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
body.public { font-size: 0.9375rem; background: var(--surface); }
img, svg, video { max-width: 100%; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
/* Liens dans un texte : soulignés, pas seulement colorés (WCAG 1.4.1, contraste avec le texte autour). */
p a:not(.btn):not(.tag), .results-bar span > a, .empty span a, li > span > a { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
.table-wrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { margin: 0; font-weight: 620; font-stretch: var(--wide); letter-spacing: -0.012em; line-height: 1.2; text-wrap: balance; }
h1 { font-size: 1.5rem; letter-spacing: -0.02em; }
h2 { font-size: 1.0625rem; }
h3 { font-size: 0.9375rem; }
p { margin: 0 0 0.75em; max-width: 68ch; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding-left: 1.2em; }
small, .small { font-size: 0.8125rem; }
code { font: 500 0.8125rem/1 var(--font); font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.25rem 0; }
.num, .tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.strong { font-weight: 600; color: var(--text); }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; border: 0 !important; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.i { width: 16px; height: 16px; flex: none; stroke-width: 1.75; vertical-align: -0.2em; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.i.sm { width: 14px; height: 14px; }
.i.lg { width: 20px; height: 20px; }
.i.spin { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 1.35rem; height: 1.25rem; padding: 0 0.3rem; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; background: var(--surface); color: var(--text-3); font: 500 0.6875rem/1 var(--font); }

/* Marque ---------------------------------------------------------------------------------------- */
.logo { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--text); font-weight: 680; font-stretch: var(--wide); font-size: 1.0625rem; letter-spacing: -0.02em; text-decoration: none; }
.logo:hover { text-decoration: none; }
.logo-mark { width: 24px; height: 24px; flex: none; }
.logo-mark .back { fill: var(--text); }
.logo-mark .front { fill: none; stroke: var(--accent); stroke-width: 2.4; }
.logo-mark .cut { fill: none; stroke: var(--surface); stroke-width: 2.4; }

/* Boutons --------------------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; height: 2.125rem; padding: 0 0.85rem;
  border: 1px solid transparent; border-radius: var(--r-sm); background: var(--primary); color: var(--primary-text);
  font: 550 0.8125rem/1 var(--font); white-space: nowrap; cursor: pointer; text-decoration: none; user-select: none;
  box-shadow: var(--shadow-1);
}
.btn:hover { background: var(--primary-hover); text-decoration: none; }
.btn:active { transform: translateY(0.5px); }
.btn.is-current { cursor: default; color: var(--green); }
.btn.is-current:active { transform: none; }
.btn .i { width: 15px; height: 15px; }
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn.secondary:hover { background: var(--fill); }
.btn.ghost { background: transparent; color: var(--text-2); box-shadow: none; }
.btn.ghost:hover { background: var(--fill); color: var(--text); }
.btn.accent { background: var(--accent); color: var(--on-accent); }
.btn.accent:hover { background: var(--accent-text); }
.btn.danger { background: var(--surface); color: var(--red); border-color: var(--line-strong); }
.btn.danger:hover { background: var(--red-soft); }
.btn.sm { height: 1.75rem; padding: 0 0.6rem; font-size: 0.78rem; }
.btn.lg { height: 2.75rem; padding: 0 1.15rem; font-size: 0.9rem; border-radius: var(--r); }
.btn.block { width: 100%; }
.btn.icon-only { width: 2.125rem; padding: 0; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.linklike { background: none; border: 0; padding: 0; color: var(--text-2); font: inherit; cursor: pointer; }
.linklike:hover { color: var(--text); text-decoration: underline; text-underline-offset: 0.2em; }
.linklike.danger:hover { color: var(--red); }
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.actions form { margin: 0; display: contents; }

/* Formulaires ----------------------------------------------------------------------------------- */
label, .label { display: block; font-weight: 550; font-size: 0.8125rem; color: var(--text); margin-bottom: 0.35rem; }
.hint { display: block; font-weight: 400; color: var(--text-3); font-size: 0.78rem; margin-top: 0.3rem; line-height: 1.45; }
.input, input[type="text"], input[type="email"], input[type="search"], input[type="number"], input[type="password"], input[type="url"], select, textarea {
  display: block; width: 100%; min-width: 0; height: 2.25rem; padding: 0 0.7rem; border: 1px solid var(--field-edge);
  border-radius: var(--r-sm); background: var(--surface); color: var(--text); font: 400 0.875rem/1.4 var(--font);
  box-shadow: var(--shadow-1); transition: border-color 120ms, box-shadow 120ms;
}
textarea { height: auto; min-height: 6.5rem; padding: 0.55rem 0.7rem; resize: vertical; line-height: 1.5; }
select { appearance: none; padding-right: 2rem; background-image: var(--select-chevron); background-repeat: no-repeat; background-position: right 0.55rem center; background-size: 14px; }
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[disabled] { background: var(--fill); color: var(--text-2); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; flex: none; }
.field { margin-bottom: 1rem; min-width: 0; }
.field:last-child { margin-bottom: 0; }
.grid-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 1rem; }
.check { display: flex; gap: 0.55rem; align-items: flex-start; font-weight: 400; font-size: 0.875rem; color: var(--text); margin: 0; cursor: pointer; }
.check input { margin-top: 0.18rem; }
.check.indent { margin-left: 1.5rem; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.15rem 1rem; border: 1px solid var(--line); border-radius: var(--r); padding: 0.4rem; background: var(--surface); max-height: 300px; overflow-y: auto; }
.check-grid .check { padding: 0.35rem 0.45rem; border-radius: var(--r-sm); font-size: 0.8125rem; }
.check-grid .check:hover { background: var(--fill); }
fieldset { border: 0; padding: 0; margin: 0 0 1.25rem; min-width: 0; }
legend { font-weight: 600; font-size: 0.8125rem; padding: 0; margin-bottom: 0.45rem; }
.choice-list { display: grid; gap: 0.5rem; }
.choice { display: flex; gap: 0.65rem; align-items: flex-start; padding: 0.75rem 0.85rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; font-weight: 400; margin: 0; }
.choice:hover { border-color: var(--line-strong); }
.choice:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.choice input { margin-top: 0.2rem; }
.choice strong { display: block; font-weight: 600; }
.choice span { color: var(--text-2); font-size: 0.8125rem; }
.search-field { position: relative; }
.search-field .i { position: absolute; left: 0.65rem; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.search-field input { padding-left: 2rem; }
.search-field kbd { position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%); }
/* Suggestions de recherche (autocomplétion) : sous le champ, au-dessus du reste de la page. */
.suggest-pop { position: absolute; z-index: 45; top: calc(100% + 6px); left: 0; right: 0; min-width: min(22rem, calc(100vw - 32px)); max-height: min(24rem, 60vh); overflow-y: auto; margin: 0; padding: 0.3rem; list-style: none; background: var(--surface); color: var(--text); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); text-align: left; }
.suggest-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.55rem; min-height: 2.25rem; padding: 0.35rem 0.55rem; border-radius: var(--r-sm); cursor: pointer; font-size: 0.875rem; line-height: 1.3; }
.search-field .suggest-item .i { position: static; transform: none; color: var(--text-3); }
.suggest-item[aria-selected="true"], .suggest-item:hover { background: var(--fill); }
.search-field .suggest-item[aria-selected="true"] .i { color: var(--accent); }
.suggest-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest-label strong { font-weight: 650; }
.suggest-detail { color: var(--text-3); font-size: 0.75rem; white-space: nowrap; }
.suggest-item.kind-correction .suggest-label { color: var(--accent-text); font-weight: 550; }
.hero-search { position: relative; z-index: 3; }
/* Accueil : la liste prend toute la largeur du formulaire (champ, domaine et bouton). */
.hero-search .suggest-pop { right: auto; width: calc(min(45rem, 100vw - 2rem) - 0.8rem); }
.appbar-search .suggest-pop { left: auto; width: max(100%, 24rem); }
.form-footer { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; justify-content: space-between; padding-top: 1rem; margin-top: 1.25rem; border-top: 1px solid var(--line); }

/* Pastilles et états -------------------------------------------------------------------------------- */
.pill { display: inline-flex; align-items: center; gap: 0.38rem; height: 1.5rem; padding: 0 0.55rem; border-radius: 999px; background: var(--fill); color: var(--text-2); font-size: 0.75rem; font-weight: 550; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.pill.plain::before { display: none; }
.pill.good { background: var(--green-soft); color: var(--green); }
.pill.partner { background: var(--accent-soft); color: var(--accent-text); }
.pill.warn { background: var(--amber-soft); color: var(--amber); }
.pill.danger { background: var(--red-soft); color: var(--red); }
.pill.muted { background: var(--fill); color: var(--text-2); }
.pill .i { width: 13px; height: 13px; }
.tag { display: inline-flex; align-items: center; gap: 0.3rem; height: 1.375rem; padding: 0 0.45rem; border-radius: 5px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-size: 0.75rem; font-weight: 500; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
a.tag:hover { border-color: var(--line-strong); color: var(--text); text-decoration: none; }
.tag.accent { border-color: var(--accent-line); color: var(--accent-text); background: var(--accent-soft); }
.tag.nature { border-color: transparent; color: var(--amber); background: var(--amber-soft); }
.tags { display: flex; flex-wrap: wrap; gap: 0.3rem; min-width: 0; }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 1.25rem; height: 1.125rem; padding: 0 0.35rem; border-radius: 999px; background: var(--fill-strong); color: var(--text-2); font-size: 0.6875rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.count.accent { background: var(--accent); color: var(--on-accent); }

/* Échéance : la date limite en tuile, colorée selon l'urgence */
.due { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 3.5rem; height: 3.25rem; border-radius: var(--r); background: var(--fill); color: var(--text); flex: none; font-variant-numeric: tabular-nums; line-height: 1; gap: 0.25rem; }
.due b { font-size: 0.95rem; font-weight: 680; font-stretch: var(--wide); letter-spacing: -0.02em; }
.due span { font-size: 0.6875rem; color: var(--text-2); font-weight: 500; }
.due.urgent { background: var(--red-soft); color: var(--red); }
.due.urgent span { color: var(--red); }
.due.soon { background: var(--amber-soft); color: var(--amber); }
.due.soon span { color: var(--amber); }
.due.closed { background: transparent; border: 1px dashed var(--line-strong); color: var(--text-3); }
.due.closed span { color: var(--text-3); }
.due.lg { width: 4.5rem; height: 4.25rem; border-radius: var(--r-lg); }
.due.lg b { font-size: 1.3rem; }
.due-inline { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.due-inline.urgent { color: var(--red); }
.due-inline.soon { color: var(--amber); }

/* Messages ---------------------------------------------------------------------------------------- */
.notice { display: flex; gap: 0.65rem; align-items: flex-start; padding: 0.75rem 0.9rem; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); margin: 0 0 1rem; font-size: 0.875rem; }
.notice > .i { margin-top: 0.12rem; color: var(--text-2); }
.notice > div { min-width: 0; }
.notice p { margin: 0; }
.notice p + p { margin-top: 0.35rem; }
.notice.good { background: var(--green-soft); border-color: transparent; color: var(--text); }
.notice.good > .i { color: var(--green); }
.notice.warn { background: var(--amber-soft); border-color: transparent; }
.notice.warn > .i { color: var(--amber); }
.notice.error { background: var(--red-soft); border-color: transparent; }
.notice.error > .i { color: var(--red); }
.notice.info { background: var(--accent-soft); border-color: transparent; }
.notice.info > .i { color: var(--accent-text); }
.fineprint { font-size: 0.78rem; color: var(--text-3); line-height: 1.5; }
.fineprint + .fineprint { margin-top: 0.4rem; }

/* Cartes, sections, propriétés ------------------------------------------------------------------- */
.card { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-lg); min-width: 0; }
.card + .card { margin-top: 1rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.85rem 1.1rem; border-bottom: 1px solid var(--line); min-height: 3.1rem; }
.card-head h2, .card-head h3 { font-size: 0.875rem; font-weight: 620; display: flex; align-items: center; gap: 0.45rem; }
.card-head h2 .i { color: currentColor; }
.card-head .sub { color: var(--text-3); font-size: 0.8125rem; font-weight: 400; }
.card-body { padding: 1rem 1.1rem; }
.card-body.flush { padding: 0; }
.card-foot { padding: 0.75rem 1.1rem; border-top: 1px solid var(--line); background: var(--fill); color: var(--text); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.card.accent { border-color: var(--accent-line); }
.card.subtle { background: var(--fill); color: var(--text); border-color: transparent; }
.stack { display: grid; gap: 1rem; align-content: start; min-width: 0; }
.stack.tight { gap: 0.5rem; }
.props { display: grid; grid-template-columns: minmax(7.5rem, auto) minmax(0, 1fr); gap: 0.15rem 1rem; margin: 0; font-size: 0.8125rem; }
.props dt { color: var(--text-3); padding: 0.4rem 0; display: flex; gap: 0.45rem; align-items: center; }
.props dd { margin: 0; padding: 0.4rem 0; color: var(--text); font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.props dd .hint { margin-top: 0.15rem; }
.props.stacked { grid-template-columns: minmax(0, 1fr); gap: 0; }
.props.stacked dt { padding: 0.55rem 0 0.1rem; }
.props.stacked dd { padding: 0 0 0.45rem; border-bottom: 1px solid var(--line); }
.kv-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.5rem 0; border-bottom: 1px solid var(--line); font-size: 0.8125rem; }
.kv-row:last-child { border-bottom: 0; }
.kv-row span:first-child { color: var(--text-2); }
.empty { display: grid; justify-items: start; gap: 0.6rem; padding: 1.5rem 1.1rem; color: var(--text-2); }
.ideas { display: grid; gap: 0.4rem; }
.ideas ul { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0; padding: 0; list-style: none; }
.ideas .tag { height: 1.75rem; padding: 0 0.6rem; font-size: 0.8125rem; color: var(--text); }
.ideas .tag:hover { border-color: var(--line-strong); background: var(--fill); }
/* Recherche comprise : orthographe corrigée, lieu reconnu, résultats approchants. */
.search-notes { display: grid; gap: 0.3rem; padding: 0.6rem 1.1rem; border-bottom: 1px solid var(--line); background: var(--accent-soft); color: var(--text); font-size: 0.8125rem; }
.search-notes p { display: flex; gap: 0.45rem; align-items: flex-start; margin: 0; }
.search-notes .i { flex: none; margin-top: 0.15rem; color: var(--accent-text); }
.search-notes a { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
.empty .i { width: 22px; height: 22px; color: var(--text-3); }
.empty strong { color: var(--text); font-weight: 600; }
.upsell { display: grid; gap: 0.6rem; padding: 0.9rem 1rem; border-radius: var(--r); background: var(--accent-soft); color: var(--text); font-size: 0.8125rem; }
.upsell strong { font-weight: 600; }

/* Tableaux ------------------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
th { text-align: left; font-weight: 500; color: var(--text-3); font-size: 0.75rem; padding: 0.55rem 1.1rem; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); }
td { padding: 0.65rem 1.1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--fill); }
td.right, th.right { text-align: right; }
td .sub { display: block; color: var(--text-3); font-size: 0.75rem; margin-top: 0.1rem; }
table.compact td, table.compact th { padding-left: 0.75rem; padding-right: 0.75rem; }
table input, table textarea { min-width: 7rem; }
table textarea { min-height: 3.2rem; }

/* Avatars, pastilles d'entreprise ----------------------------------------------------------------- */
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; border-radius: 7px; background: var(--fill-strong); color: var(--text-2); font-size: 0.6875rem; font-weight: 650; flex: none; letter-spacing: 0.01em; }
.avatar.lg { width: 2.25rem; height: 2.25rem; border-radius: 9px; font-size: 0.8125rem; }
.avatar.c1 { background: var(--av1-bg); color: var(--av1); }
.avatar.c2 { background: var(--av2-bg); color: var(--av2); }
.avatar.c3 { background: var(--av3-bg); color: var(--av3); }
.avatar.c4 { background: var(--av4-bg); color: var(--av4); }
.avatar.c5 { background: var(--av5-bg); color: var(--av5); }
.who { display: flex; align-items: center; gap: 0.65rem; min-width: 0; }
.who > div { min-width: 0; }
.who strong { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who .sub { display: block; color: var(--text-3); font-size: 0.75rem; }

/* En-tête public ----------------------------------------------------------------------------------- */
.container { width: 100%; max-width: 75rem; margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.container.narrow { max-width: 47.5rem; }
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.6) blur(12px); -webkit-backdrop-filter: saturate(1.6) blur(12px); border-bottom: 1px solid var(--line); }
body.public::before, body.app::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); background: var(--surface); z-index: 40; }
.topbar-inner { display: flex; align-items: center; gap: 2rem; height: 3.75rem; }
.topnav { display: flex; gap: 0.25rem; align-items: center; }
.topnav a { color: var(--text-2); font-size: 0.875rem; font-weight: 500; padding: 0.4rem 0.65rem; border-radius: var(--r-sm); text-decoration: none; }
.topnav a:hover, .topnav a[aria-current="page"] { color: var(--text); background: var(--fill); text-decoration: none; }
.topbar-actions { display: flex; gap: 0.5rem; align-items: center; margin-left: auto; }
.menu-toggle { display: none; }
.mobile-nav { display: none; }

.demo-banner { background: var(--amber-soft); color: var(--amber); text-align: center; padding: 0.4rem var(--gutter-r) 0.4rem var(--gutter-l); font-size: 0.78rem; font-weight: 550; }
.demo-banner a { color: inherit; text-decoration: underline; }

/* Pied de page --------------------------------------------------------------------------------- */
.footer { border-top: 1px solid var(--line); padding-block: 3rem calc(2.5rem + env(safe-area-inset-bottom, 0px)); background: var(--surface); color: var(--text-2); font-size: 0.8125rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 2rem; }
.footer h2 { font-size: 0.8125rem; font-weight: 600; color: var(--text); margin-bottom: 0.75rem; font-stretch: 100%; letter-spacing: 0; }
.footer ul { list-style: none; padding: 0; display: grid; gap: 0.5rem; }
.footer a { color: var(--text-2); }
.footer a:hover { color: var(--text); }
.footer .legal-line { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; color: var(--text-3); font-size: 0.78rem; }
.footer p { max-width: 48ch; }

/* Coque de l'application ------------------------------------------------------------------------- */
body.app { background: var(--canvas); }
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 0.25rem; background: var(--canvas); border-right: 1px solid var(--line); padding: 0.75rem 0.65rem calc(0.75rem + env(safe-area-inset-bottom, 0px)) max(0.65rem, env(safe-area-inset-left, 0px)); overflow-y: auto; }
.sidebar .logo { padding: 0.35rem 0.5rem 0.85rem; }
.workspace { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); margin-bottom: 0.75rem; text-decoration: none; color: var(--text); box-shadow: var(--shadow-1); }
.workspace:hover { border-color: var(--line-strong); text-decoration: none; }
.workspace div { min-width: 0; flex: 1; }
.workspace strong { display: block; font-size: 0.8125rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace div span { display: block; font-size: 0.72rem; color: var(--text-3); }
.workspace > .i { color: var(--text-3); }
.nav-section { display: grid; gap: 1px; }
.nav-section + .nav-section { margin-top: 1rem; }
.nav-title { font-size: 0.72rem; font-weight: 550; color: var(--text-3); padding: 0 0.6rem 0.3rem; }
.nav-item { display: flex; align-items: center; gap: 0.6rem; height: 2rem; padding: 0 0.6rem; border-radius: var(--r-sm); color: var(--text-2); font-size: 0.8125rem; font-weight: 500; text-decoration: none; }
.nav-item .i { color: var(--text-3); }
.nav-item:hover { background: var(--fill); color: var(--text); text-decoration: none; }
.nav-item[aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.nav-item[aria-current="page"] .i { color: var(--accent); }
.nav-item .count { margin-left: auto; }
.sidebar-foot { margin-top: auto; padding-top: 0.75rem; display: grid; gap: 1px; }
.sidebar-foot form { margin: 0; }
.sidebar-foot button.nav-item { width: 100%; background: none; border: 0; cursor: pointer; font: inherit; font-size: 0.8125rem; font-weight: 500; }
.sidebar-user { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.6rem 0.25rem; font-size: 0.75rem; color: var(--text-3); min-width: 0; }
.sidebar-user span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { min-width: 0; display: flex; flex-direction: column; }
.appbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; display: flex; align-items: center; gap: 0.75rem; height: 3.25rem; padding: 0 var(--gutter-r) 0 var(--gutter-l); background: color-mix(in srgb, var(--canvas) 86%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.crumbs { display: flex; align-items: center; gap: 0.35rem; min-width: 0; font-size: 0.8125rem; color: var(--text-3); }
.crumbs a { color: var(--text-2); white-space: nowrap; }
.crumbs a:hover { color: var(--text); text-decoration: none; }
.crumbs .i { width: 14px; height: 14px; color: var(--line-strong); }
.crumbs span[aria-current] { color: var(--text); font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appbar-search { margin-left: auto; width: min(320px, 40vw); }
.appbar-search input { height: 2rem; background: var(--surface); font-size: 0.8125rem; }
.content { padding: 1.5rem var(--gutter-r) calc(3rem + env(safe-area-inset-bottom, 0px)) var(--gutter-l); width: 100%; max-width: 82.5rem; }
.content.narrow { max-width: 55rem; }
.nav-toggle-input { position: absolute; opacity: 0; pointer-events: none; }
.nav-toggle { display: none; }
.scrim { display: none; }

/* En-tête de page -------------------------------------------------------------------------------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem 1.5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head > div { min-width: 0; }
.page-head h1 { font-size: 1.375rem; }
.page-head .lede { color: var(--text-2); margin-top: 0.35rem; font-size: 0.875rem; }
.page-head.bordered { padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.meta { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; color: var(--text-2); font-size: 0.8125rem; min-width: 0; }
.meta > span, .meta > a { display: inline-flex; align-items: center; gap: 0.35rem; min-width: 0; }
.meta .i { color: var(--text-3); width: 14px; height: 14px; }
.meta a { color: var(--text-2); }
.meta a:hover { color: var(--text); }
.section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin: 1.75rem 0 0.75rem; }
.section-title:first-child { margin-top: 0; }
.section-title h2 { font-size: 0.9375rem; }
.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) 21.25rem; gap: 1.25rem; align-items: start; }
.layout-2 > aside { position: sticky; top: 4.25rem; display: grid; gap: 1rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }

/* Barre de filtres ---------------------------------------------------------------------------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 0.75rem; }
.toolbar .search-field { flex: 1 1 260px; min-width: 0; }
.toolbar .grow { flex: 1; }
.popover { position: relative; }
.popover > summary { list-style: none; }
.popover > summary::-webkit-details-marker { display: none; }
.popover > summary.btn .chev { width: 13px; height: 13px; color: var(--text-3); }
.popover[open] > summary.btn { background: var(--fill); }
.popover-panel { position: absolute; z-index: 25; top: calc(100% + 6px); left: 0; width: 340px; max-width: calc(100vw - 32px); background: var(--surface); color: var(--text); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); padding: 0.5rem; }
.popover-panel.right { left: auto; right: 0; }
.popover-panel .check-grid { border: 0; padding: 0; max-height: 280px; grid-template-columns: 1fr; }
.popover-panel .panel-foot { display: flex; justify-content: flex-end; gap: 0.5rem; padding: 0.5rem 0.25rem 0.15rem; border-top: 1px solid var(--line); margin-top: 0.4rem; }
.popover-panel .panel-pad { padding: 0.35rem 0.4rem 0.5rem; }
.applied { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; margin-bottom: 0.75rem; }
.applied .tag { padding-right: 0.25rem; }
.applied .tag a { display: inline-flex; color: var(--text-3); border-radius: 4px; }
.applied .tag a:hover { color: var(--text); background: var(--fill); }
.results-bar { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap; padding: 0.6rem 1.1rem; border-bottom: 1px solid var(--line); font-size: 0.8125rem; color: var(--text-2); }
.results-bar strong { color: var(--text); font-weight: 600; }
.segmented { display: inline-flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; padding: 2px; border-radius: var(--r); background: var(--fill); gap: 2px; }
.segmented::-webkit-scrollbar { display: none; }
.segmented a { flex: none; white-space: nowrap; padding: 0.3rem 0.7rem; border-radius: 6px; font-size: 0.78rem; font-weight: 550; color: var(--text-2); text-decoration: none; }
.segmented a[aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.segmented a:hover { color: var(--text); text-decoration: none; }

/* Liste d'annonces --------------------------------------------------------------------------------- */
.rows { list-style: none; margin: 0; padding: 0; }
.row { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: 0.85rem 1.1rem; border-bottom: 1px solid var(--line); }
.rows > .row:last-child { border-bottom: 0; }
.row:hover { background: var(--fill); }
.row-title { font-size: 0.875rem; font-weight: 600; color: var(--text); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-title a { color: inherit; }
.row-title a::after { content: ""; position: absolute; inset: 0; }
.row-title a:hover { text-decoration: none; }
.row:hover .row-title { color: var(--accent-text); }
.row .meta { margin-top: 0.3rem; gap: 0.25rem 0.9rem; }
.row .tags { margin-top: 0.45rem; }
.row .tags a { position: relative; z-index: 1; }
.row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 0.4rem; text-align: right; }
.row-side .amount { font-weight: 600; font-variant-numeric: tabular-nums; font-size: 0.8125rem; color: var(--text); white-space: nowrap; }
.row-side .amount.none { color: var(--text-3); font-weight: 400; }
.row form, .row select, .row button { position: relative; z-index: 1; }

/* Contrôle d'éligibilité ----------------------------------------------------------------------- */
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { display: grid; grid-template-columns: 1.25rem minmax(0, 1fr); gap: 0.6rem; padding: 0.6rem 0; border-top: 1px solid var(--line); font-size: 0.8125rem; }
.checks li:first-child { border-top: 0; padding-top: 0.2rem; }
.checks .mark { width: 1.25rem; height: 1.25rem; display: inline-flex; align-items: center; justify-content: center; margin-top: -0.05rem; }
.checks .mark .i { width: 17px; height: 17px; stroke-width: 2; }
.checks .ok .mark { color: var(--green); }
.checks .warn .mark { color: var(--amber); }
.checks .fail .mark { color: var(--red); }
.checks .unknown .mark { color: var(--text-3); }
.checks strong { display: block; font-weight: 600; color: var(--text); margin-bottom: 0.1rem; }
.checks .detail { color: var(--text-2); }
.verdict-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.75rem; }
.score { display: inline-flex; align-items: baseline; gap: 0.15rem; font-variant-numeric: tabular-nums; color: var(--text-3); font-size: 0.75rem; }
.score b { color: var(--text); font-size: 1rem; font-weight: 650; }
.meter { height: 4px; border-radius: 999px; background: var(--fill-strong); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: inherit; background: var(--text-2); }
.meter.good > span { background: var(--green); }
.meter.partner > span { background: var(--accent); }
.meter.warn > span { background: var(--amber); }

/* Groupement -------------------------------------------------------------------------------------- */
.sharebar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--fill-strong); gap: 2px; }
.sharebar span { display: block; height: 100%; }
.sharebar .s1 { background: var(--share-1); } .sharebar .s2 { background: var(--share-2); } .sharebar .s3 { background: var(--share-3); }
.sharebar .s4 { background: var(--share-4); } .sharebar .s5 { background: var(--share-5); } .sharebar .s6 { background: var(--share-6); }
.legend { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; margin-top: 0.6rem; font-size: 0.78rem; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.legend .s1 { background: var(--share-1); } .legend .s2 { background: var(--share-2); } .legend .s3 { background: var(--share-3); }
.legend .s4 { background: var(--share-4); } .legend .s5 { background: var(--share-5); } .legend .s6 { background: var(--share-6); }
.total-share { font-variant-numeric: tabular-nums; font-weight: 650; }
.total-share.ok { color: var(--green); }
.total-share.off { color: var(--red); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; }
.steps li { display: grid; grid-template-columns: 1.25rem minmax(0, 1fr); gap: 0.6rem; padding: 0.45rem 0; font-size: 0.8125rem; position: relative; }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: calc(0.625rem - 0.5px); top: 1.75rem; bottom: -0.3rem; width: 1px; background: var(--line); }
.steps .dot { width: 1.25rem; height: 1.25rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 1.5px dashed var(--line-strong); color: transparent; background: var(--surface); }
.steps .ok .dot { border: 0; background: var(--green); color: var(--on-green); }
.steps .ok .dot .i { width: 12px; height: 12px; stroke-width: 3; }
.steps .ok span:last-child { color: var(--text-2); }
.doc-link { display: flex; align-items: center; gap: 0.7rem; padding: 0.65rem 0.75rem; border: 1px solid var(--line); border-radius: var(--r); color: var(--text); text-decoration: none; background: var(--surface); }
.doc-link:hover { border-color: var(--line-strong); background: var(--fill); text-decoration: none; }
.ai-badge { display: inline-flex; align-items: center; margin-left: 0.45rem; padding: 0 0.4rem; height: 1.15rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-size: 0.6875rem; font-weight: 650; letter-spacing: 0.02em; vertical-align: middle; }
.doc-link.off, .doc-link.off:hover { background: var(--surface); border-style: dashed; }
.doc-link.off .file { background: var(--fill); color: var(--text-3); }
.doc-link .file { width: 2rem; height: 2.4rem; border-radius: 5px; background: var(--accent-soft); color: var(--accent-text); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.doc-link div { min-width: 0; flex: 1; }
.doc-link strong { display: block; font-weight: 600; font-size: 0.8125rem; }
.doc-link span { display: block; font-size: 0.75rem; color: var(--text-3); }
.doc-link > .i:last-child { color: var(--text-3); }
.suggestion { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.5rem 1rem; align-items: start; padding: 0.9rem 1.1rem; border-top: 1px solid var(--line); }
.suggestion:first-child { border-top: 0; }
.suggestion > .pill, .suggestion > .btn, .suggestion > form { justify-self: end; }
.suggestion ul { grid-column: 1 / -1; margin: 0.1rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.2rem; color: var(--text-2); font-size: 0.8125rem; }
.suggestion li { display: flex; gap: 0.4rem; }
.suggestion li .i { color: var(--green); margin-top: 0.15rem; width: 14px; height: 14px; }
.suggestion form { margin: 0; }
.suggestion details summary { list-style: none; cursor: pointer; }
.suggestion details summary::-webkit-details-marker { display: none; }

/* Tableau de bord --------------------------------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); margin-bottom: 1.25rem; }
.stat { padding: 0.95rem 1.1rem; border-left: 1px solid var(--line); min-width: 0; }
.stat:first-child { border-left: 0; }
.stat .label { color: var(--text-2); font-weight: 500; font-size: 0.78rem; margin: 0 0 0.35rem; display: flex; align-items: center; gap: 0.35rem; }
.stat .label .i { width: 14px; height: 14px; color: var(--text-3); }
.stat .value { font-size: 1.5rem; font-weight: 650; font-stretch: var(--wide); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat .value small { font-size: 0.78rem; color: var(--text-3); font-weight: 500; font-stretch: 100%; letter-spacing: 0; }
.stat.alert .value { color: var(--red); }

/* Domaines ------------------------------------------------------------------------------------------ */
.domain-table td:first-child a { color: var(--text); font-weight: 500; }
.domain-table td:first-child a:hover { color: var(--accent-text); text-decoration: none; }
.domain-bar { display: flex; align-items: center; gap: 0.6rem; justify-content: flex-end; }
.domain-bar .track { width: 120px; height: 6px; border-radius: 999px; background: var(--fill-strong); overflow: hidden; }
.domain-bar .track span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.w-0 { width: 0; } .w-5 { width: 5%; } .w-10 { width: 10%; } .w-15 { width: 15%; } .w-20 { width: 20%; } .w-25 { width: 25%; }
.w-30 { width: 30%; } .w-35 { width: 35%; } .w-40 { width: 40%; } .w-45 { width: 45%; } .w-50 { width: 50%; } .w-55 { width: 55%; }
.w-60 { width: 60%; } .w-65 { width: 65%; } .w-70 { width: 70%; } .w-75 { width: 75%; } .w-80 { width: 80%; } .w-85 { width: 85%; }
.w-90 { width: 90%; } .w-95 { width: 95%; } .w-100 { width: 100%; }
.cpv { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 0.75rem; padding: 0.5rem 0; border-top: 1px solid var(--line); font-size: 0.8125rem; }
.cpv:first-child { border-top: 0; padding-top: 0; }
.cpv code { color: var(--text-3); padding-top: 0.1rem; }

/* Accueil ------------------------------------------------------------------------------------------ */
.hero { padding-block: 4.5rem 0; position: relative; overflow: hidden; }
.hero-grid { display: grid; gap: 2.5rem; }
.hero-copy { max-width: 45rem; }
.status-line { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.8125rem; color: var(--text-2); margin-bottom: 1.5rem; padding: 0.3rem 0.75rem 0.3rem 0.55rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.status-line .live { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.status-line strong { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.display { font-size: clamp(2.35rem, 5.6vw, 4.25rem); line-height: 1.02; letter-spacing: -0.04em; font-weight: 640; font-stretch: 108%; max-width: 15ch; }
.lead { font-size: clamp(1rem, 1.6vw, 1.1875rem); color: var(--text-2); line-height: 1.55; margin-top: 1.25rem; max-width: 56ch; }
.hero-search { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 15rem) auto; gap: 0; margin-top: 2rem; max-width: 45rem; border: 1px solid var(--field-edge); border-radius: var(--r-lg); background: var(--surface); color: var(--text); box-shadow: var(--shadow-pop); padding: 0.35rem; }
.hero-search .search-field input, .hero-search select { border: 0; box-shadow: none; height: 2.75rem; font-size: 0.9375rem; background-color: transparent; }
.hero-search select { border-left: 1px solid var(--line); border-radius: 0; }
.hero-search input:focus, .hero-search select:focus { box-shadow: none; }
.hero-search .btn { height: 2.75rem; border-radius: var(--r); padding: 0 1.1rem; font-size: 0.875rem; }
.hero-search:focus-within { border-color: var(--accent); }
.sources { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.5rem; margin-top: 1.5rem; font-size: 0.8125rem; color: var(--text-3); }
.sources span { display: inline-flex; align-items: center; gap: 0.4rem; }
.sources b { color: var(--text-2); font-weight: 600; }

.window { position: relative; margin-top: 3.5rem; border-radius: 14px 14px 0 0; background: var(--canvas); box-shadow: var(--shadow-window); overflow: hidden; max-height: 640px; }
.window::after { content: ""; position: absolute; inset: auto 0 0 0; height: 120px; background: linear-gradient(to bottom, transparent, var(--surface)); pointer-events: none; }
.window-bar { display: flex; align-items: center; gap: 0.75rem; height: 2.75rem; padding: 0 1rem; border-bottom: 1px solid var(--line); background: var(--surface); font-size: 0.8125rem; color: var(--text-2); }
.window-bar .crumbs { font-size: 0.8125rem; }
.window-bar .grow { flex: 1; }
.window-body { display: grid; grid-template-columns: 200px minmax(0, 1fr); min-height: 380px; }
.window-side { border-right: 1px solid var(--line); padding: 0.75rem 0.5rem; display: grid; align-content: start; gap: 1px; }
.window-side .nav-item { pointer-events: none; }
.window-main { padding: 1rem; min-width: 0; }
.window-main .card { border-radius: var(--r); }

.section { padding-block: 5.5rem 0; }
.section-head { max-width: 42.5rem; margin-bottom: 2.5rem; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); letter-spacing: -0.03em; line-height: 1.1; font-weight: 640; }
.section-head p { color: var(--text-2); font-size: 1.0625rem; margin-top: 0.9rem; }
.feature { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 3.5rem; align-items: center; padding-block: 3rem; border-top: 1px solid var(--line); }
.feature:first-of-type { border-top: 0; }
.feature-copy h3 { font-size: 1.375rem; letter-spacing: -0.025em; margin-bottom: 0.75rem; font-weight: 640; }
.feature-copy p { color: var(--text-2); font-size: 0.9375rem; }
.feature-copy ul { list-style: none; padding: 0; margin-top: 1.1rem; display: grid; gap: 0.55rem; font-size: 0.875rem; }
.feature-copy li { display: flex; gap: 0.55rem; align-items: flex-start; }
.feature-copy li .i { color: var(--accent); margin-top: 0.2rem; }
.feature .step-no { display: inline-flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; border-radius: 7px; background: var(--fill); color: var(--text-2); font-weight: 650; font-size: 0.8125rem; margin-bottom: 1rem; font-variant-numeric: tabular-nums; }
.stage { background: var(--canvas); border: 1px solid var(--line); border-radius: 16px; padding: 1.5rem; min-width: 0; position: relative; }
.stage .card { box-shadow: var(--shadow-pop); border: 0; }
.stage-note { position: absolute; top: 0.55rem; right: 1rem; font-size: 0.72rem; color: var(--text-3); }
.stage { padding-top: 2rem; }
.stage .card + .card { margin-top: 0.75rem; }
.facts-band { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 1rem; }
.facts-band > div { padding: 1.5rem 1.5rem 1.5rem 0; }
.facts-band > div + div { padding-left: 1.5rem; border-left: 1px solid var(--line); }
.facts-band b { display: block; font-size: 1.75rem; font-weight: 650; letter-spacing: -0.03em; font-stretch: var(--wide); font-variant-numeric: tabular-nums; }
.facts-band span { color: var(--text-2); font-size: 0.875rem; }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.1rem 0; font-weight: 600; font-size: 0.9875rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .i { color: var(--text-3); transition: transform 160ms; }
.faq details[open] summary .i { transform: rotate(180deg); }
.faq details p { color: var(--text-2); padding-bottom: 1.1rem; }
.cta-band { margin-top: 5.5rem; padding-block: 4rem; border-top: 1px solid var(--line); background: var(--canvas); color: var(--text); }
.cta-band .container { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.5rem; }
.cta-band h2 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.03em; font-weight: 640; max-width: 22ch; }

/* Tarifs ---------------------------------------------------------------------------------------- */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; }
.plan { display: flex; flex-direction: column; gap: 1rem; padding: 1.75rem 1.5rem; min-width: 0; border-left: 1px solid var(--line); }
.plan:first-child { border-left: 0; }
.plan.highlight { background: var(--canvas); box-shadow: inset 0 2px 0 var(--accent); }
.plan h3 { font-size: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.plan .price { font-size: 2.25rem; font-weight: 650; letter-spacing: -0.04em; font-stretch: var(--wide); font-variant-numeric: tabular-nums; line-height: 1; }
.plan .price small { font-size: 0.8125rem; font-weight: 500; color: var(--text-3); letter-spacing: 0; font-stretch: 100%; margin-left: 0.3rem; }
.plan .pitch { color: var(--text-2); font-size: 0.875rem; min-height: 2.6em; }
.plan ul { list-style: none; padding: 0; display: grid; gap: 0.55rem; font-size: 0.8125rem; flex: 1; align-content: start; }
.plan li { display: flex; gap: 0.5rem; align-items: flex-start; }
.plan li .i { color: var(--text-3); margin-top: 0.12rem; width: 15px; height: 15px; }
.plan.highlight li .i { color: var(--accent); }
.plan .btn { width: 100%; height: 2.75rem; }
.compare th, .compare td { padding: 0.7rem 1rem; }
.compare td:not(:first-child), .compare th:not(:first-child) { text-align: center; }
.compare .i { color: var(--green); }
.compare .no { color: var(--text-3); }

/* Authentification ---------------------------------------------------------------------------- */
.auth { min-height: calc(100vh - 3.75rem); display: grid; place-items: start center; padding: 4.5rem var(--gutter-r) 3rem var(--gutter-l); background: var(--canvas); }
.auth-card { width: 100%; max-width: 25rem; }
.auth-card h1 { font-size: 1.375rem; text-align: left; }
.auth-card .lede { color: var(--text-2); margin: 0.5rem 0 1.5rem; }
.auth-card .card-body { padding: 1.4rem; }
.auth-card .fineprint { margin-top: 1rem; }

/* Pages légales ------------------------------------------------------------------------------------- */
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85em; background: var(--fill); padding: 0.1em 0.35em; border-radius: 4px; overflow-wrap: anywhere; }
.prose pre { background: var(--fill); border: 1px solid var(--line); border-radius: var(--r); padding: 0.75rem 0.9rem; overflow-x: auto; }
.prose pre code { background: none; padding: 0; font-size: 0.8125rem; }
.prose { font-size: 0.9375rem; line-height: 1.65; }
.prose h2 { font-size: 1.0625rem; margin: 2rem 0 0.6rem; }
.prose p, .prose li { color: var(--text); }
.prose ul { margin-bottom: 1rem; display: grid; gap: 0.3rem; }
.legal-head { padding-block: 3.5rem 1.5rem; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; }
.legal-head h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); letter-spacing: -0.03em; }
.legal-head p { color: var(--text-3); margin-top: 0.5rem; }

/* Pagination ---------------------------------------------------------------------------------------- */
.pagination { display: flex; gap: 0.25rem; align-items: center; justify-content: center; padding: 0.85rem 1rem; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; gap: 0.3rem; min-width: 2rem; height: 2rem; padding: 0 0.55rem; border-radius: var(--r-sm); color: var(--text-2); font-size: 0.8125rem; font-weight: 550; font-variant-numeric: tabular-nums; text-decoration: none; }
.pagination a:hover { background: var(--fill); color: var(--text); text-decoration: none; }
.pagination [aria-current="page"] { background: var(--primary); color: var(--primary-text); }

/* Erreurs ---------------------------------------------------------------------------------------- */
.error-page { padding-block: 6rem; text-align: left; }
.error-page .code { font-size: 0.8125rem; font-weight: 600; color: var(--accent-text); margin-bottom: 0.75rem; }
.error-page h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); letter-spacing: -0.03em; margin-bottom: 0.75rem; }
.error-page p { color: var(--text-2); margin-bottom: 1.5rem; }

/* Petits écrans --------------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .layout-2 { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: 50; transform: translateX(-102%); transition: transform 200ms ease; background: var(--surface); padding-top: calc(0.75rem + env(safe-area-inset-top, 0px)); box-shadow: var(--shadow-pop); }
  .nav-toggle-input:checked ~ .sidebar { transform: none; }
  .nav-toggle-input:checked ~ .scrim { display: block; position: fixed; inset: 0; background: var(--overlay); z-index: 45; }
  .nav-toggle { display: inline-flex; }
  .layout-2 { grid-template-columns: minmax(0, 1fr); }
  .layout-2 > aside { position: static; }
  /* Fiche d'une annonce sur téléphone : « Pouvez-vous répondre ? » et la décision avant le détail. */
  .tender-layout > aside { display: contents; }
  .tender-layout > .stack { order: 2; }
  .tender-layout > aside > #eligibilite, .tender-layout > aside > #suivi { order: 1; }
  .tender-layout > aside > section { order: 3; }
  .feature { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .plans { grid-template-columns: minmax(0, 1fr); }
  .plan { border-left: 0; border-top: 1px solid var(--line); }
  .plan:first-child { border-top: 0; }
  .window-body { grid-template-columns: minmax(0, 1fr); }
  .window-side { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
}
/* La navigation demande environ 960 px : en dessous, les liens passent dans le menu au lieu de se couper
   sur deux lignes ou de déborder (tablette en portrait). */
@media (max-width: 980px) {
  .topnav { display: none; }
  .menu-toggle { display: inline-flex; }
  .mobile-nav { position: relative; }
  .mobile-nav > summary { list-style: none; }
  .mobile-nav > summary::-webkit-details-marker { display: none; }
  details.mobile-nav { display: block; }
  .mobile-nav:not([open]) .popover-panel { display: none; }
  .mobile-nav .popover-panel { right: 0; left: auto; width: 280px; max-width: calc(100vw - 32px); display: grid; gap: 1px; }
  .mobile-nav .popover-panel a { padding: 0.6rem 0.65rem; border-radius: var(--r-sm); color: var(--text); font-weight: 500; white-space: nowrap; }
  .mobile-nav .popover-panel a:hover { background: var(--fill); text-decoration: none; }
}
@media (max-width: 760px) {
  .topbar-actions .hide-sm { display: none; }
  .topbar-inner { gap: 0.75rem; height: 3.5rem; }
  .hero { padding-top: 2.75rem; }
  .hero-search { grid-template-columns: minmax(0, 1fr); padding: 0.4rem; gap: 0.35rem; }
  .hero-search select { border-left: 0; border-top: 1px solid var(--line); border-radius: 0; }
  .hero-search .btn { width: 100%; }
  .window { margin-top: 2.5rem; border-radius: 12px 12px 0 0; }
  .window-main { padding: 0.6rem; }
  .section { padding-top: 4rem; }
  .facts-band { grid-template-columns: minmax(0, 1fr); }
  .facts-band > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .row { grid-template-columns: auto minmax(0, 1fr); gap: 0.75rem; padding: 0.8rem 0.9rem; align-items: start; }
  .row-side { grid-column: 2; flex-direction: row; align-items: center; justify-content: flex-start; flex-wrap: wrap; text-align: left; }
  .due { width: 3rem; height: 3rem; }
  .due b { font-size: 0.875rem; }
  .card-head, .card-body, .results-bar { padding-left: 0.9rem; padding-right: 0.9rem; }
  th, td { padding-left: 0.9rem; padding-right: 0.9rem; }
  .appbar-search { display: none; }
  .content { padding-top: 1.1rem; }
  .page-head h1 { font-size: 1.2rem; }
  .props { grid-template-columns: minmax(6.5rem, auto) minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .auth { padding-top: 2.5rem; }
  .cta-band .container { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .sidebar, .appbar, .topbar, .footer, .btn, .toolbar, .demo-banner { display: none !important; }
  .shell { display: block; }
  body { background: var(--surface); }
}

/* Utilitaires (la politique de sécurité interdit les attributs style) -------------------------------- */
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 0.25rem; } .mt-2 { margin-top: 0.5rem; } .mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; } .mt-6 { margin-top: 1.5rem; } .mb-2 { margin-bottom: 0.5rem; } .mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; } .mb-6 { margin-bottom: 1.5rem; }
.flex { display: flex; } .items-center { align-items: center; } .gap-2 { gap: 0.5rem; } .gap-3 { gap: 0.75rem; }
.between { justify-content: space-between; } .flex-wrap { flex-wrap: wrap; } .grow { flex: 1; min-width: 0; }
.nowrap { white-space: nowrap; } .right { text-align: right; } .block { display: block; }
.w-full { width: 100%; }

/* Fiche annonce : tableau de bord --------------------------------------------------------------- */
.tender-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem 2rem; align-items: start; margin-bottom: 1.25rem; }
.tender-head h1 { font-size: clamp(1.25rem, 2.2vw, 1.625rem); line-height: 1.22; max-width: 52ch; }
.tender-actions { justify-content: flex-end; }
.kpi-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi-strip .value { font-size: 1.3rem; overflow-wrap: anywhere; }
.kpi-strip .value.text { font-size: 0.95rem; font-weight: 600; font-stretch: 100%; letter-spacing: 0; line-height: 1.35; padding-top: 0.2rem; }
.stat-sub { margin: 0.3rem 0 0; color: var(--text-3); font-size: 0.75rem; line-height: 1.4; display: flex; flex-wrap: wrap; gap: 0.25rem 0.4rem; align-items: center; }
.stat.soon .value { color: var(--amber); }
.lead-sm { font-size: 0.9375rem; line-height: 1.6; color: var(--text); max-width: 75ch; }
.long-text { line-height: 1.6; color: var(--text); max-width: 75ch; white-space: pre-line; overflow-wrap: anywhere; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 2rem; }
.minor { font-size: 0.75rem; font-weight: 550; color: var(--text-3); font-stretch: 100%; letter-spacing: 0; margin-bottom: 0.5rem; }
.bullets { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.45rem; font-size: 0.8125rem; }
.bullets li { display: block; padding-left: 0.9rem; position: relative; line-height: 1.55; }
.bullets li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 5px; height: 5px; border-radius: 1.5px; background: var(--line-strong); }
.bullets li > .cite, .props dd > .cite, .numbered .cite, .timeline .cite, .todo .cite { margin-left: 0.3rem; }
.numbered { margin: 0; padding-left: 1.25rem; display: grid; gap: 0.75rem; font-size: 0.8125rem; }
.numbered li::marker { color: var(--text-3); font-variant-numeric: tabular-nums; }
.numbered p { margin: 0; }
.numbered .fineprint { margin-top: 0.25rem; }

.cite { display: inline-block; position: relative; vertical-align: baseline; }
.cite > summary { list-style: none; display: inline-flex; align-items: center; gap: 0.25rem; height: 1.25rem; padding: 0 0.4rem; border-radius: 5px; background: var(--fill); color: var(--text-3); font-size: 0.6875rem; font-weight: 550; cursor: pointer; white-space: nowrap; user-select: none; }
.cite > summary::-webkit-details-marker { display: none; }
.cite > summary:hover, .cite[open] > summary { background: var(--accent-soft); color: var(--accent-text); }
.cite > summary .i { width: 11px; height: 11px; }
.cite .q { display: inline-flex; align-items: center; justify-content: center; width: 0.85rem; height: 0.85rem; border-radius: 50%; background: var(--amber-soft); color: var(--amber); font-size: 0.6rem; font-weight: 700; }
.cite-pop { position: absolute; z-index: 15; top: calc(100% + 6px); right: 0; width: min(320px, 80vw); display: grid; gap: 0.45rem; padding: 0.75rem 0.85rem; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-pop); text-align: left; white-space: normal; font-size: 0.8125rem; font-weight: 400; color: var(--text); }
.cite-pop .quote { font-style: normal; line-height: 1.5; }
.cite-pop a { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.78rem; font-weight: 550; }
.bullets .cite-pop, .props .cite-pop { left: 0; right: auto; }
@media (min-width: 761px) { .cite-pop.floating { position: fixed; right: auto; bottom: auto; z-index: 70; } }
.req-table td:first-child { min-width: 9rem; }
.req-table td { vertical-align: top; }
.state { display: inline-flex; align-items: flex-start; gap: 0.35rem; font-size: 0.78rem; line-height: 1.35; }
.state .i { margin-top: 0.08rem; flex: none; }
.state.ok { color: var(--green); }
.state.fail { color: var(--red); }
.state.warn { color: var(--amber); }
.state.unknown { color: var(--text-2); }
.criteria { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.criterion { display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: 0.4rem; font-size: 0.875rem; }
.criterion .name { font-weight: 600; flex: 1; min-width: 0; }
.criterion .weight { font-weight: 650; }
.subcriteria { list-style: none; padding: 0.55rem 0 0 0.75rem; margin: 0; display: grid; gap: 0.3rem; font-size: 0.8125rem; color: var(--text-2); border-left: 2px solid var(--line); margin-top: 0.5rem; }
.subcriteria li { display: flex; justify-content: space-between; gap: 1rem; }
.disclosure > summary { list-style: none; cursor: pointer; border-bottom: 0; }
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure[open] > summary { border-bottom: 1px solid var(--line); }
.disclosure > summary .chev { color: var(--text-3); transition: transform 150ms; }
.disclosure[open] > summary .chev { transform: rotate(180deg); }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li { display: grid; grid-template-columns: 0.75rem minmax(0, 1fr); column-gap: 0.75rem; position: relative; padding-bottom: 0.85rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; grid-row: 1 / span 2; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); margin-top: 0.3rem; }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 4px; top: 1.05rem; bottom: 0.1rem; width: 1px; background: var(--line); }
.timeline li.next::before { border-color: var(--accent); }
.timeline li.past::before { background: var(--line-strong); }
.timeline .when { font-size: 0.8125rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.timeline li.past .when { color: var(--text-3); font-weight: 500; }
.timeline .what { grid-column: 2; font-size: 0.78rem; color: var(--text-2); display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; }
.list-link { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: 0.65rem 1.1rem; border-top: 1px solid var(--line); color: var(--text); font-size: 0.8125rem; text-decoration: none; }
.list-link:first-child { border-top: 0; }
.list-link:hover { background: var(--fill); text-decoration: none; }
.list-link.plain { padding: 0.4rem 0; border: 0; }
.list-link.plain:hover { background: none; color: var(--accent-text); }
.doc-link.compact { padding: 0.5rem 0.6rem; }
.doc-link.compact .file { width: 1.75rem; height: 2rem; }
.upload { display: grid; gap: 0.5rem; }
.drop { display: flex; align-items: center; gap: 0.65rem; padding: 0.75rem; border: 1px dashed var(--line-strong); border-radius: var(--r); cursor: pointer; margin: 0; font-weight: 400; color: var(--text-2); }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.drop strong { display: block; color: var(--text); font-weight: 600; font-size: 0.8125rem; }
.drop .hint { margin-top: 0.1rem; }
.drop .i { color: var(--text-3); }
.upload.js .btn { display: none; }
.bleed { margin: 0 -1.1rem; border-top: 1px solid var(--line); }
.suggestions { border-top: 1px solid var(--line); }
@media (max-width: 960px) {
  .kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .tender-head { grid-template-columns: minmax(0, 1fr); }
  .tender-actions { justify-content: flex-start; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .bleed { margin: 0 -0.9rem; }
  .req-table td:first-child { min-width: 7rem; }
}
@media (max-width: 760px) {
  /* Menus et citations en feuilles du bas de l'écran : jamais coupés ni hors de l'écran. */
  .popover-panel, .popover-panel.right, .mobile-nav .popover-panel, .cite-pop, .bullets .cite-pop, .props .cite-pop {
    position: fixed; top: auto; left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px));
    bottom: calc(12px + env(safe-area-inset-bottom, 0px)); width: auto; max-height: 72vh; overflow-y: auto; z-index: 61;
  }
  .popover[open]::before, .cite[open]::before { content: ""; position: fixed; inset: 0; background: var(--overlay); z-index: 60; }
  .popover-panel .check-grid { max-height: 48vh; }
}
@media (max-width: 640px) {
  /* Domaines sur téléphone : le nom sur toute la largeur, le compte et la barre dessous. */
  .domain-table thead { display: none; }
  .domain-table, .domain-table tbody, .domain-table tr, .domain-table td { display: block; }
  .domain-table tr { padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--line); }
  .domain-table tbody tr:last-child { border-bottom: 0; }
  .domain-table td { padding: 0; border: 0; }
  .domain-table .domain-bar { justify-content: flex-start; margin-top: 0.4rem; }
  .props.stack-sm { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .props.stack-sm dt { padding-bottom: 0; }
  .props.stack-sm dd { padding-top: 0.15rem; padding-bottom: 0.65rem; }
  /* Onglets plus larges que l'écran : le bord droit s'estompe pour montrer qu'ils défilent. */
  .tabs { -webkit-mask-image: linear-gradient(90deg, var(--text) calc(100% - 2.5rem), transparent);
          mask-image: linear-gradient(90deg, var(--text) calc(100% - 2.5rem), transparent); padding-right: 2rem; }
}
@media (max-width: 640px) {
  /* Exigences en fiches sur téléphone : intitulé et source, puis l'attendu, puis votre situation. */
  .req-table thead { display: none; }
  .req-table, .req-table tbody { display: block; }
  .req-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.25rem 0.75rem; padding: 0.8rem 1.1rem; border-bottom: 1px solid var(--line); }
  .req-table td { display: block; padding: 0; border: 0; min-width: 0; }
  .req-table td:first-child { grid-column: 1; grid-row: 1; min-width: 0; }
  .req-table td.right { grid-column: 2; grid-row: 1; }
  .req-table td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; color: var(--text-2); }
  .req-table td:nth-child(3):not(.right) { grid-column: 1 / -1; grid-row: 3; padding-top: 0.15rem; }
  .req-table td.blank { display: none; }
}

/* Réponses, mémoire, questions ------------------------------------------------------------------- */
.tabs { display: flex; gap: 0.25rem; overflow-x: auto; margin: 0 0 1rem; padding-bottom: 1px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.55rem 0.7rem; color: var(--text-2); font-size: 0.8125rem; font-weight: 550; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; }
.tabs a:hover { color: var(--text); border-bottom-color: var(--line-strong); text-decoration: none; }
.tabs .i { color: var(--text-3); width: 15px; height: 15px; }
.mini-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; }
.mini-kpis > div { display: grid; align-content: start; gap: 0.1rem; padding: 0.65rem 0.75rem; border-radius: var(--r); background: var(--fill); min-width: 0; }
.mini-kpis .label { font-size: 0.72rem; color: var(--text-3); }
.mini-kpis strong { font-size: 0.95rem; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.mini-kpis .faint { font-size: 0.72rem; }
.criteria.compact { gap: 0.6rem; }
.criteria.compact .criterion { margin-bottom: 0.25rem; font-size: 0.8125rem; }
.todo { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.15rem; }
.todo li { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; padding: 0.45rem 0.5rem; border-radius: var(--r-sm); }
.todo li:hover { background: var(--fill); }
.todo .check { font-size: 0.8125rem; }
.todo .check:has(input:checked) > span { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.working { display: flex; gap: 0.85rem; align-items: flex-start; padding: 1rem; border-radius: var(--r); background: var(--accent-soft); }
.working .i { color: var(--accent); margin-top: 0.1rem; }
.working div { display: grid; gap: 0.2rem; }
.memoire-meta { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; font-size: 0.78rem; color: var(--text-3); }
.section-edit { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--text); }
.section-edit > summary { list-style: none; display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 0.85rem; cursor: pointer; font-size: 0.8125rem; }
.section-edit > summary::-webkit-details-marker { display: none; }
.section-edit > summary .num { width: 1.5rem; height: 1.5rem; border-radius: 6px; background: var(--fill); color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; font-weight: 650; font-size: 0.75rem; flex: none; }
.section-edit > summary strong { font-weight: 600; }
.section-edit > summary .chev { color: var(--text-3); transition: transform 150ms; }
.section-edit[open] > summary { border-bottom: 1px solid var(--line); }
.section-edit[open] > summary .chev { transform: rotate(180deg); }
.prose-input { border: 0; border-radius: 0 0 var(--r) var(--r); box-shadow: none; min-height: 16rem; font-size: 0.875rem; line-height: 1.65; padding: 0.85rem 1rem; }
.prose-input:focus { box-shadow: inset 0 0 0 2px var(--accent-soft); }
.thread { display: grid; gap: 0.85rem; margin-bottom: 1rem; }
.msg { display: flex; gap: 0.6rem; align-items: flex-start; min-width: 0; }
.msg.user { justify-content: flex-end; }
.msg.user > p, .msg.user > div { max-width: 80%; padding: 0.6rem 0.85rem; border-radius: 12px 12px 4px 12px; background: var(--primary); color: var(--primary-text); font-size: 0.875rem; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.user > div p { margin: 0; }
.msg.agent .avatar { margin-top: 0.1rem; }
.msg .bubble { min-width: 0; max-width: 100%; font-size: 0.875rem; line-height: 1.6; color: var(--text); overflow-wrap: anywhere; }
.msg .bubble p { margin: 0 0 0.6rem; }
.msg .bubble p:last-child { margin-bottom: 0; }
.msg .bubble ul { margin: 0.25rem 0 0.6rem; padding-left: 1.1rem; display: grid; gap: 0.25rem; }
.msg .bubble a { font-weight: 550; }
.msg.typing .bubble p { color: var(--text-3); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.45; } }
.cite-link { display: inline-flex; align-items: center; height: 1.2rem; padding: 0 0.35rem; border-radius: 4px; background: var(--fill); color: var(--text-2); font-size: 0.6875rem; font-weight: 600; vertical-align: 0.05em; text-decoration: none; }
a.cite-link:hover { background: var(--accent-soft); color: var(--accent-text); text-decoration: none; }
.composer { display: flex; gap: 0.5rem; align-items: flex-end; padding: 0.4rem; border: 1px solid var(--field-edge); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1); }
.composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.composer textarea { border: 0; box-shadow: none; min-height: 2.5rem; max-height: 12rem; resize: none; padding: 0.45rem 0.5rem; background: transparent; }
.composer textarea:focus { box-shadow: none; }
.composer .btn { flex: none; }
.composer.busy { opacity: 0.7; }
.suggestion-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip-btn { border: 1px solid var(--line); background: var(--surface); color: var(--text-2); border-radius: 999px; padding: 0.35rem 0.75rem; font: 500 0.78rem/1.3 var(--font); cursor: pointer; text-align: left; }
.chip-btn:hover { border-color: var(--accent-line); color: var(--accent-text); background: var(--accent-soft); }
.chat-intro { display: grid; justify-items: start; gap: 0.6rem; padding: 1rem 0; max-width: 60ch; }
.chat-intro h3 { font-size: 1.1rem; }
.chat-intro.compact { padding: 0.25rem 0; }
.intro-icon, .auth-icon { width: 2.5rem; height: 2.5rem; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 0.25rem; }
.assistant-page { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 1rem; align-items: start; }
.assistant-page > .card + .card, .layout-2 > aside > .card + .card, .grid-2 > .card + .card, .grid-3 > .card + .card { margin-top: 0; }
.threads { position: sticky; top: 4.25rem; max-height: calc(100vh - 6rem); overflow-y: auto; }
.thread-list { display: grid; padding: 0.35rem; }
.thread-list a { display: grid; gap: 0.1rem; padding: 0.5rem 0.6rem; border-radius: var(--r-sm); color: var(--text); font-size: 0.8125rem; text-decoration: none; }
.thread-list a span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-list a:hover { background: var(--fill); text-decoration: none; }
.thread-list a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); }
.chat { display: flex; flex-direction: column; min-height: calc(100vh - 7rem); }
.chat-body { flex: 1; padding: 1.1rem; }
.chat-foot { padding: 0.85rem 1.1rem 1rem; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--surface); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.assistant-launch span { display: inline; }
.nav-kbd { margin-left: auto; }
.drawer { position: fixed; z-index: 60; top: 0; right: 0; bottom: 0; width: 440px; max-width: 100%; display: flex; flex-direction: column; background: var(--surface); color: var(--text); box-shadow: var(--shadow-pop); border-left: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); padding-right: env(safe-area-inset-right, 0px); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.7rem 0.85rem 0.7rem 1.1rem; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 0.9375rem; display: flex; align-items: center; gap: 0.45rem; }
.drawer-head h2 .i { color: currentColor; }
.drawer-body { flex: 1; overflow-y: auto; padding: 1rem 1.1rem; display: grid; align-content: start; gap: 0.85rem; }
.drawer-foot { margin: 0.75rem; }
.quota-chip { display: inline-grid; grid-template-columns: auto auto; gap: 0.15rem 0.6rem; padding: 0.5rem 0.75rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); font-size: 0.75rem; color: var(--text-3); }
.quota-chip strong { color: var(--text); text-align: right; }
.suggest-list { list-style: none; padding: 0; margin: 0.4rem 0 0; display: grid; gap: 1px; border-radius: var(--r); overflow: hidden; }
.suggest-list:empty { display: none; }
.suggest-list button { width: 100%; text-align: left; padding: 0.45rem 0.6rem; border: 0; background: var(--fill); color: var(--text); font: 400 0.8125rem/1.4 var(--font); cursor: pointer; }
.suggest-list button:hover { background: var(--accent-soft); }
.suggest-list code { color: var(--text-3); margin-right: 0.35rem; }
.inline-status { display: flex; gap: 0.4rem; align-items: center; }
.inline-status select { width: auto; height: 1.75rem; font-size: 0.78rem; padding-left: 0.5rem; }
.inline-status.js .btn { display: none; }
.stats.inner { margin-bottom: 0; }
.stats-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.plans-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 51.25rem; }
.bordered-top { border-top: 1px solid var(--line); }
.justify-end { justify-content: flex-end; }
.auth-card.wide { max-width: 35rem; }
.disclosure-inline > summary { list-style: none; display: inline-flex; }
.disclosure-inline > summary::-webkit-details-marker { display: none; }
.share-input { max-width: 5.5rem; margin-left: auto; text-align: right; font-variant-numeric: tabular-nums; }
.mb-0 { margin-bottom: 0; }
.fresh-banner { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.55rem 0.9rem; margin-bottom: 0.75rem; border-radius: var(--r); background: var(--accent-soft); color: var(--accent-text); font-size: 0.8125rem; font-weight: 550; }
.fresh-banner a { font-weight: 650; }
.updated { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--text-3); }
.updated .live { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.admin .stats { margin-bottom: 1rem; }
:root:has(body.drawer-open) { overflow: hidden; }
@media (min-width: 1200px) { :root:has(body.drawer-open) { overflow-x: clip; overflow-y: auto; } }
@media (max-width: 960px) {
  .assistant-page { grid-template-columns: minmax(0, 1fr); }
  .threads { position: static; max-height: none; }
  .stats-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats-6 .stat:nth-child(4) { border-left: 0; }
  .stats-6 .stat:nth-child(n+4) { border-top: 1px solid var(--line); }
  .stats-6 .stat:nth-child(3) { border-left: 1px solid var(--line); }
  .stats-6 .stat:nth-child(n+3):nth-child(-n+3) { border-top: 0; }
  .plans-2 { grid-template-columns: minmax(0, 1fr); }
  .mini-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .assistant-launch span { display: none; }
  .btn.assistant-launch { width: 2rem; padding: 0; }
  .drawer { width: 100%; border-left: 0; }
  .chat { min-height: 0; }
  .msg.user > p { max-width: 90%; }
  .nav-kbd { display: none; }
}
.mail-text { white-space: pre-wrap; overflow-wrap: anywhere; font: 400 0.8125rem/1.55 var(--font); margin: 0; }

.mobile-only { display: none; }
.card-head { flex-wrap: wrap; }
@media (max-width: 760px) {
  .assistant-launch { margin-left: auto; }
  .hide-sm { display: none; }
  .mobile-only { display: block; }
  .chat-foot { position: static; }
  .card-head .sub { font-size: 0.75rem; }
}

/* Pages métier × département, acheteurs et guides (référencement) ------------------------------- */
.seo-crumbs { padding-block: 1.25rem 0.75rem; flex-wrap: wrap; row-gap: 0.15rem; }
.seo-crumbs span[aria-current] { white-space: normal; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.6rem 1.1rem; border-top: 1px solid var(--line); font-size: 0.8125rem; min-width: 0; }
.link-list li:first-child { border-top: 0; }
.link-list li > a, .link-list li > span:first-child { min-width: 0; overflow-wrap: anywhere; color: var(--text); }
.link-list li > a:hover { color: var(--accent-text); }
.link-list .count { flex: none; color: var(--text-2); font-variant-numeric: tabular-nums; }
.link-list.compact li { padding: 0.3rem 0; border-top: 0; }
.region-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); gap: 1.25rem 2rem; }
.region-grid h3 { font-size: 0.8125rem; font-weight: 620; color: var(--text-2); margin-bottom: 0.35rem; }
.seo-links { margin-block: 1rem; align-items: start; }
.h3 { font-size: 1rem; font-weight: 620; }
.row.single { grid-template-columns: minmax(0, 1fr); }
.row.single .muted { margin-top: 0.25rem; font-size: 0.8125rem; }
.guide { display: grid; gap: 1rem; }
.guide .page-head { margin-bottom: 0.25rem; }
.guide .prose h2:first-child { margin-top: 0; }
.guide .prose ol { margin-bottom: 1rem; display: grid; gap: 0.4rem; padding-left: 1.25rem; }
.guide .prose table { font-size: 0.8125rem; }
.guide .prose .table-wrap { margin-bottom: 1rem; border: 1px solid var(--line); border-radius: var(--r); }
.card-head a.sub { color: var(--accent-text); font-weight: 500; }
@media (max-width: 760px) {
  .seo-crumbs { padding-block: 0.9rem 0.5rem; font-size: 0.75rem; }
  .link-list li { padding-left: 0.9rem; padding-right: 0.9rem; }
  .link-list.compact li { padding-left: 0; padding-right: 0; }
  .region-grid { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
}
/* Fil d'Ariane de la barre du haut : les maillons rétrécissent (points de suspension) ; sur téléphone, seul le
   dernier lien avant la page reste affiché. */
.appbar .crumbs a { min-width: 0; overflow: hidden; text-overflow: ellipsis; flex-shrink: 1; }
.appbar .crumbs .i { flex: none; }
@media (max-width: 760px) {
  .appbar .crumbs > a:not(:last-of-type), .appbar .crumbs > a:not(:last-of-type) + svg { display: none; }
  .appbar .crumbs > a:last-of-type { flex-shrink: 0; max-width: 45%; }
}
.seo-links > .card + .card { margin-top: 0; }

/* Demandes de devis ------------------------------------------------------------------------------ */
input[type="date"], input[type="tel"] {
  display: block; width: 100%; min-width: 0; height: 2.25rem; padding: 0 0.7rem; border: 1px solid var(--field-edge);
  border-radius: var(--r-sm); background: var(--surface); color: var(--text); font: 400 0.875rem/1.4 var(--font);
  box-shadow: var(--shadow-1);
}
input[type="file"]:not(.visually-hidden) { display: block; width: 100%; max-width: 100%; font-size: 0.8125rem; color: var(--text-2); }
input[type="file"]::file-selector-button { margin-right: 0.75rem; height: 2rem; padding: 0 0.75rem; border: 1px solid var(--field-edge); border-radius: var(--r-sm); background: var(--surface); color: var(--text); font: 550 0.8125rem/1 var(--font); cursor: pointer; }
.field-error { display: block; color: var(--red); font-size: 0.78rem; font-weight: 550; margin-top: 0.3rem; }
[aria-invalid="true"] { border-color: var(--red); }
fieldset[aria-invalid="true"] .choice { border-color: var(--red); }
.choice-list.horizontal { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.prewrap { white-space: pre-line; overflow-wrap: anywhere; }
.quote-intro { margin-bottom: 1rem; align-items: start; }
.quote-intro > .card + .card { margin-top: 0; }
.quote-list { list-style: none; margin: 0; padding: 0; }
.quote-item { display: grid; gap: 0.75rem; padding: 1rem 1.1rem; border-top: 1px solid var(--line); }
.quote-item:first-child { border-top: 0; }
.quote-item.chosen { background: var(--accent-soft); }
.quote-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; min-width: 0; }
.quote-top > div { min-width: 0; }
.quote-top h3 { font-size: 0.9375rem; font-weight: 620; display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.quote-top p { font-size: 0.78rem; margin-top: 0.15rem; }
.quote-amount { font-size: 1.25rem; font-weight: 650; letter-spacing: -0.02em; white-space: nowrap; margin: 0; }
.quote-amount small { font-size: 0.75rem; font-weight: 500; color: var(--text-3); letter-spacing: 0; }
.quote-message { white-space: pre-line; overflow-wrap: anywhere; font-size: 0.8125rem; color: var(--text); background: var(--fill); border-radius: var(--r); padding: 0.65rem 0.8rem; margin: 0; }
.quote-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem; }
.quote-foot form { margin: 0; }
.quote-sent { display: grid; gap: 0.6rem; justify-items: start; }
.quote-sent .props { width: 100%; }
.choose-form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; flex: 1 1 22rem; justify-content: flex-end; }
.choose-form input[type="text"] { flex: 1 1 14rem; min-width: 0; max-width: 26rem; }
.reason-form { justify-items: start; }
.reason-form textarea { width: 100%; min-height: 4rem; }
.reason-form label { margin-bottom: 0; }
.quote-hint { padding: 0.75rem 1.1rem 1rem; border-top: 1px solid var(--line); margin: 0; max-width: none; }
/* Certificat de mise en concurrence : encart de la page de suivi, page publique de vérification */
.cert-card { margin-bottom: 1.25rem; border-color: var(--accent-line); background: var(--accent-soft); }
.cert-body { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem 1.25rem; flex-wrap: wrap; }
.cert-body > div { flex: 1 1 22rem; min-width: 0; }
.cert-body h2 { font-size: 0.9375rem; font-weight: 620; display: flex; align-items: center; gap: 0.45rem; }
.cert-body h2 .i { color: var(--accent-text); }
.cert-body p { color: var(--text-2); font-size: 0.8125rem; margin-top: 0.3rem; line-height: 1.5; }
.cert-body .btn { flex: 0 1 auto; max-width: 100%; height: auto; min-height: 2.125rem; padding-top: 0.45rem; padding-bottom: 0.45rem; white-space: normal; text-align: center; line-height: 1.3; }
@media (max-width: 760px) {
  .cert-body .btn { flex: 1 1 100%; }
  .choose-form { justify-content: stretch; }
  .choose-form input[type="text"] { max-width: none; }
}
.fingerprint { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.95rem; font-weight: 600; letter-spacing: 0.02em; word-spacing: 0.1em; overflow-wrap: anywhere; margin: 0; max-width: none; }
.compare-form { justify-items: start; }
.compare-form input { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.danger-zone summary { cursor: pointer; font-size: 0.8125rem; color: var(--text-2); display: inline-flex; align-items: center; gap: 0.35rem; }
.danger-zone summary:hover { color: var(--text); }
.danger-zone[open] summary { margin-bottom: 0.5rem; }
.danger-zone .fineprint { margin-bottom: 0.5rem; }
.tender-due { justify-self: end; }
.quote-form .grid-fields .field:last-child, #devis form .grid-fields .field:last-child { margin-bottom: 1rem; }
@media (max-width: 760px) {
  .choice-list.horizontal { grid-template-columns: minmax(0, 1fr); }
  .quote-item { padding-left: 0.9rem; padding-right: 0.9rem; }
  .quote-top { flex-direction: column; gap: 0.35rem; }
  .tender-due { justify-self: start; }
}

/* Suite d'une liste réservée aux offres payantes ------------------------------------------------- */
.paywall { border-top: 1px solid var(--line); }
.paywall-ghost { filter: blur(3px); opacity: 0.55; pointer-events: none; user-select: none; }
.paywall-ghost .row { display: grid; gap: 0.5rem; padding: 1rem var(--gutter-r) 1rem var(--gutter-l); }
.ghost-line { display: block; width: 78%; height: 0.8rem; border-radius: 4px; background: var(--fill-strong); }
.paywall-ghost .row:nth-child(2) .ghost-line:first-child { width: 64%; }
.paywall-ghost .row:nth-child(3) .ghost-line:first-child { width: 71%; }
.ghost-line.short { width: 38%; height: 0.65rem; background: var(--fill); }
/* Dans le flux, sous les lignes floutées qu'il recouvre en partie : jamais de débordement, quelle que soit la largeur. */
.paywall-card {
  position: relative; margin-top: -5.5rem; display: grid; justify-items: center; gap: 0.5rem;
  padding: 4rem var(--gutter-r) 1.5rem var(--gutter-l); text-align: center;
  background: linear-gradient(to bottom, transparent, var(--surface) 3.5rem);
}
.paywall-card strong { font-size: 1rem; font-weight: 620; }
.paywall-card p { margin: 0; max-width: 46ch; color: var(--text-2); }
.paywall-icon { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-text); }
.paywall-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 0.25rem; }
@media (max-width: 560px) {
  .paywall-ghost .row { padding-block: 1.4rem; }
  .paywall-actions .btn { width: 100%; justify-content: center; }
}

/* Inscription en étapes ------------------------------------------------------------------------- */
.auth-card { min-width: 0; }
.signup-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.35rem; list-style: none; padding: 0; margin: 0 0 1.5rem; }
.signup-steps li { display: grid; gap: 0.4rem; min-width: 0; font-size: 0.75rem; font-weight: 560; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.signup-steps li::before { content: ""; display: block; height: 3px; border-radius: 3px; background: var(--fill-strong); }
.signup-steps li.done::before, .signup-steps li.current::before { background: var(--accent); }
.signup-steps li.current { color: var(--text); }
.signup-steps li.done { color: var(--text-2); }

.pick-list { list-style: none; margin: 0; padding: 0; }
.pick-list li + li { border-top: 1px solid var(--line); }
.pick { display: flex; align-items: center; gap: 0.75rem; width: 100%; padding: 0.85rem 1.1rem; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.pick:hover { background: var(--fill); }
.pick:focus-visible { outline-offset: -2px; }
.pick-text { display: grid; gap: 0.15rem; min-width: 0; flex: 1; }
.pick-name { font-weight: 600; overflow-wrap: anywhere; }
.pick-meta { font-size: 0.8125rem; color: var(--text-2); }
.pick > .i { color: var(--text-3); }

.firm-card { display: flex; align-items: center; gap: 0.75rem; padding: 0.85rem 1rem; margin-bottom: 1rem; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.firm-icon { display: grid; place-items: center; flex: none; width: 2.25rem; height: 2.25rem; border-radius: 8px; background: var(--accent-soft); color: var(--accent-text); }
.firm-text { display: grid; gap: 0.1rem; min-width: 0; flex: 1; }
.firm-text strong { overflow-wrap: anywhere; }
.firm-text span { font-size: 0.8125rem; color: var(--text-2); }
.firm-change { font-size: 0.8125rem; font-weight: 560; flex: none; }

input.code-input { width: 100%; min-width: 0; font-size: 1.75rem; font-weight: 620; letter-spacing: 0.35em; text-align: center; font-variant-numeric: tabular-nums; padding-block: 0.6rem; }
input.code-input::placeholder { color: var(--text-3); letter-spacing: 0.35em; font-weight: 400; }

.plan-pick { display: grid; gap: 0.75rem; }
.plan-option { display: grid; gap: 0.6rem; padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.plan-option.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.plan-option-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.plan-option h2 { font-size: 1rem; }
.plan-option .price { margin: 0; font-size: 1.375rem; font-weight: 650; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.plan-option .price small { font-size: 0.75rem; font-weight: 500; color: var(--text-3); letter-spacing: 0; }
.plan-option .pitch { margin: 0; color: var(--text-2); font-size: 0.875rem; }

/* Quatre offres (Découverte, Pro, Équipe, Entreprise) : 4 colonnes, 2 sur tablette, 1 sur téléphone. */
.plans-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.plans-4 .plan { padding-inline: 1.25rem; }
@media (max-width: 1100px) {
  .plans-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plans-4 .plan:nth-child(3) { border-left: 0; }
  .plans-4 .plan:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 960px) {
  .plans-4 { grid-template-columns: minmax(0, 1fr); }
  .plans-4 .plan { border-left: 0; border-top: 1px solid var(--line); }
  .plans-4 .plan:first-child { border-top: 0; }
}

/* Cinq offres (Découverte, Veille, Pro, Équipe, Entreprise) : 5 colonnes sur ordinateur ; sur tablette, 3 puis 2
   (grille de 6 pistes : l'échelle des prix se lit de gauche à droite puis ligne suivante) ; une sur téléphone. */
.plans-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.plans-5 .plan { padding-inline: 1.1rem; }
@media (min-width: 1181px) { .plans-5 .plan .pitch { min-height: 9em; } }
@media (min-width: 961px) and (max-width: 1180px) { .plans-5 .plan .pitch { min-height: 6.1em; } }
@media (max-width: 1180px) {
  .plans-5 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .plans-5 .plan { grid-column: span 2; }
  .plans-5 .plan:nth-child(n+4) { grid-column: span 3; border-top: 1px solid var(--line); }
  .plans-5 .plan:nth-child(4) { border-left: 0; }
}
@media (max-width: 960px) {
  .plans-5 { grid-template-columns: minmax(0, 1fr); }
  .plans-5 .plan, .plans-5 .plan:nth-child(n+4) { grid-column: auto; border-left: 0; border-top: 1px solid var(--line); }
  .plans-5 .plan:first-child { border-top: 0; }
}
.plan-for { margin: 0 0 -0.6rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent-text); }
.plan-option .plan-for { margin: 0; }
.plan-note { margin: -0.25rem 0 0; font-size: 0.78rem; color: var(--text-2); background: var(--accent-soft); border-radius: var(--r-sm); padding: 0.5rem 0.65rem; }
.plan li.off { color: var(--text-3); }
.plan li.off .i { color: var(--text-3); }

/* Comparaison des offres : défile sur téléphone, la colonne des fonctions reste visible. */
.compare-wrap .compare { min-width: 50rem; }
.compare tbody th { font-weight: 500; text-align: left; white-space: normal; color: var(--text); font-size: 0.8125rem; }
.compare tbody tr:last-child th { border-bottom: 0; }
.compare td { white-space: normal; }
.compare thead th:first-child, .compare tbody th { position: sticky; left: 0; z-index: 1; background: var(--surface); }
.compare tbody th { min-width: 12rem; max-width: 17rem; }
@media (max-width: 760px) {
  .compare tbody th { min-width: 9.5rem; max-width: 11rem; font-size: 0.78rem; box-shadow: 1px 0 0 var(--line); }
  .compare th, .compare td { padding: 0.6rem 0.7rem; }
}

/* Départements de l'offre Veille ---------------------------------------------------------------- */
.dep-picker { display: grid; gap: 0.5rem; min-width: 0; border: 0; padding: 0; margin: 0; }
.dep-picker legend { font-weight: 600; font-size: 0.875rem; padding: 0; margin-bottom: 0.1rem; }
.dep-picker .check-grid { max-height: 15rem; }
.dep-count { margin: 0; font-size: 0.8125rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.dep-details > summary { list-style: none; }
.dep-details > summary::-webkit-details-marker { display: none; }
.dep-details[open] > summary .chev { transform: rotate(180deg); }
.dep-details-body { margin-top: 0.75rem; }
.scope-note a { font-weight: 600; white-space: nowrap; }

/* Pièces du dossier de consultation, téléchargeables une à une ---------------------------------- */
.pieces { list-style: none; margin: 0; padding: 0; }
.piece { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.7rem; padding: 0.7rem var(--gutter-r) 0.7rem var(--gutter-l); border-top: 1px solid var(--line); }
.pieces .piece:first-child { border-top: 0; }
.piece .file { width: 2rem; height: 2.4rem; border-radius: 5px; background: var(--accent-soft); color: var(--accent-text); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.piece-text { display: grid; gap: 0.1rem; min-width: 0; flex: 1 1 9rem; }
.piece-text strong { font-weight: 600; font-size: 0.8125rem; overflow-wrap: anywhere; }
.piece-text span { font-size: 0.75rem; color: var(--text-3); }
.piece-actions { display: flex; align-items: center; gap: 0.35rem; flex: none; margin-left: auto; }
.pieces-cta { display: grid; gap: 0.6rem; border-top: 1px solid var(--line); }
.pieces-cta p { margin: 0; }
@media (min-width: 961px) { .piece { padding-inline: 1.1rem; } }
@media (min-width: 1101px) { .plans-4 .plan .pitch { min-height: 6.2em; } }

/* Mot de passe : champ avec « Afficher », séparateur « ou », règles vérifiées à la saisie, bandeau de l'espace -- */
.password-field { display: flex; gap: 0.4rem; align-items: center; min-width: 0; }
.password-field input { flex: 1; min-width: 0; }
.password-field .btn { flex: none; height: 2.25rem; }
.or { display: flex; align-items: center; gap: 0.75rem; margin: 0.9rem 0; color: var(--text-3); font-size: 0.78rem; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.auth-card .card-body > .fineprint.center { text-align: center; margin: 0.9rem 0 0; }
.auth-card .card-body .linklike { color: var(--accent-text); font-size: inherit; text-align: left; }
.rules { list-style: none; margin: 0.45rem 0 0; padding: 0; display: grid; gap: 0.2rem; font-size: 0.78rem; color: var(--text-3); }
.rules li { display: flex; align-items: center; gap: 0.4rem; }
.rules li::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; border: 1.5px solid var(--line-strong); flex: none; }
.rules li.ok { color: var(--text-2); }
.rules li.ok::before { background: var(--green); border-color: var(--green); }
.password-offer { align-items: center; }
.password-offer > div { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; flex: 1; }
.password-offer p { flex: 1 1 18rem; }
.password-offer .actions { flex: none; }
.state-line { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.method { display: table; margin-top: 0.2rem; font-size: 0.72rem; color: var(--text-2); background: var(--fill); border-radius: 999px; padding: 0.05rem 0.5rem; white-space: nowrap; }

/* Pages de liste : régions en colonnes, questions fréquentes, liens des glossaires ----------------------------- */
.link-list.columns { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.link-list.columns li { border-top: 1px solid var(--line); }
.region-grid h3 a { color: inherit; }
.region-grid h3 a:hover { color: var(--accent-text); }
.faq details { border-top: 1px solid var(--line); padding: 0.75rem 0; }
.faq details:first-child { border-top: 0; padding-top: 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 0.9rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-3); font-weight: 500; flex: none; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0.5rem 0 0; color: var(--text-2); font-size: 0.875rem; line-height: 1.6; max-width: 72ch; }
.letters { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0 0 1rem; }
.letters a { display: inline-flex; align-items: center; justify-content: center; min-width: 2.25rem; height: 2.25rem; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 600; font-size: 0.85rem; }
.letters a:hover { border-color: var(--accent); color: var(--accent-text); text-decoration: none; }
.lede.definition { color: var(--text); font-size: 1rem; }

/* Grands écrans ---------------------------------------------------------------------------------------
   Tout est en rem : le texte, les marges et les largeurs grandissent ensemble avec la taille de base, et les
   colonnes s'élargissent. L'espace de l'application est centré à droite de la barre latérale au lieu de
   laisser un grand vide sur le côté. */
@media (min-width: 1600px) {
  html { font-size: 106.25%; }
  .container { max-width: 80rem; }
  .content { max-width: 96rem; margin-inline: auto; }
  .content.narrow { max-width: 58rem; }
  .layout-2 { grid-template-columns: minmax(0, 1fr) 23rem; gap: 1.5rem; }
}
@media (min-width: 2000px) {
  html { font-size: 112.5%; }
  .container { max-width: 84rem; }
  .layout-2 { grid-template-columns: minmax(0, 1fr) 25rem; }
}
@media (min-width: 2600px) {
  html { font-size: 125%; }
}

/* Avis publié rendu lisible (app/services/notice.py) ---------------------------------------------------
   « Travail à réaliser » : la description publiée en entier et la fiche « L'essentiel de l'avis » (faits courts sur
   deux colonnes en grand écran, faits détaillés sur toute la largeur). « L'avis publié » : modifications en tête,
   rubriques séparées d'un filet, champs en deux colonnes (empilés sur téléphone), lots en sous-blocs repliables,
   mentions de recours repliées. Lignes de 75 caractères au plus ; les adresses longues se coupent : rien ne
   déborde à 390 px. Contrastes : texte secondaire (--text-2, --text-3) au moins 4,5:1 sur blanc et sur --fill. */
.avis.stack { gap: 1.25rem; grid-template-columns: minmax(0, 1fr); }
/* « Lire l'avis officiel (AWS-Achat (marches-publics.info)) » : le libellé passe à la ligne au lieu d'élargir la carte. */
.avis .actions .btn { height: auto; min-height: 1.75rem; padding-block: 0.3rem; white-space: normal; text-align: left; line-height: 1.3; }
.avis a:not(.btn), .avis-text a, .facts a { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; overflow-wrap: anywhere; }
/* Grilles du bloc : une colonne bornée à la carte, jamais élargie par un mot ou une adresse insécable. */
.avis-text, .avis-section, .avis-detail, .avis-lot-body, .avis-fold-body, .avis-change, .corrections li, .essentiel { grid-template-columns: minmax(0, 1fr); }
.avis-text { display: grid; gap: 0.75rem; min-width: 0; }
.avis-p { margin: 0; max-width: 75ch; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.avis-text .avis-p { font-size: 0.9375rem; }
.avis-list { max-width: 75ch; }
.avis-list li { overflow-wrap: anywhere; }
.avis-text .avis-list { font-size: 0.875rem; }
.avis-more > summary { display: inline-flex; list-style: none; cursor: pointer; color: var(--accent-text); font-size: 0.8125rem; font-weight: 550; text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
.avis-more > summary::-webkit-details-marker { display: none; }
.avis-more[open] > summary { margin-bottom: 0.75rem; }
.avis-section, .avis-detail { display: grid; gap: 0.6rem; min-width: 0; }
.avis > .avis-section + .avis-section, .avis > .avis-section + .avis-fold, .avis > .avis-fold + .avis-section { padding-top: 1.25rem; border-top: 1px solid var(--line); }
.avis-section > h3 { font-size: 0.9375rem; }
.avis-label { font-size: 0.8125rem; font-weight: 600; font-stretch: 100%; letter-spacing: 0; color: var(--text); }
.avis-detail .avis-detail { padding-left: 0.85rem; border-left: 2px solid var(--line); }
.avis-pointer { margin: 0; font-size: 0.8125rem; color: var(--text-2); }

/* Champs « libellé : valeur » */
.avis-fields { display: grid; grid-template-columns: minmax(8rem, 13rem) minmax(0, 1fr); column-gap: 1.25rem; max-width: 56rem; margin: 0; font-size: 0.8125rem; }
.avis-fields > div { display: contents; }
.avis-fields dt { padding: 0.45rem 0; border-top: 1px solid var(--line); color: var(--text-2); overflow-wrap: anywhere; }
.avis-fields dd { margin: 0; padding: 0.45rem 0; border-top: 1px solid var(--line); color: var(--text); line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.avis-fields > div:first-child > dt, .avis-fields > div:first-child > dd { border-top: 0; padding-top: 0; }
.avis-values { margin: 0; padding-left: 1rem; display: grid; gap: 0.2rem; white-space: normal; }

/* Lots, mentions repliées */
.avis-lot { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); min-width: 0; }
.avis > .avis-lot + .avis-lot { margin-top: -0.6rem; }
.avis-lot > summary, .avis-fold > summary { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; list-style: none; cursor: pointer; }
.avis-lot > summary::-webkit-details-marker, .avis-fold > summary::-webkit-details-marker { display: none; }
.avis-lot > summary { padding: 0.7rem 0.9rem; }
.avis-lot > summary h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 0.6rem; min-width: 0; font-size: 0.875rem; }
.lot-number { color: var(--accent-text); font-weight: 650; white-space: nowrap; }
.lot-title { font-weight: 600; overflow-wrap: anywhere; }
.avis-lot[open] > summary { border-bottom: 1px solid var(--line); }
.avis-lot-body { display: grid; gap: 0.75rem; padding: 0.8rem 0.9rem 0.9rem; }
.avis-lot > summary .chev, .avis-fold > summary .chev { flex: none; color: var(--text-3); transition: transform 150ms; }
.avis-lot[open] > summary .chev, .avis-fold[open] > summary .chev { transform: rotate(180deg); }
.avis-fold > summary { padding: 0.15rem 0; color: var(--text-2); font-size: 0.8125rem; font-weight: 550; }
.avis-fold > summary h3 { font-size: 0.9375rem; color: var(--text); }
.avis-fold-body { display: grid; gap: 0.6rem; padding-top: 0.6rem; }

/* Modifications publiées : « Au lieu de » barré, « Lire » en gras */
.avis-change { display: grid; gap: 0.65rem; padding: 0.85rem 1rem; border-radius: var(--r); background: var(--amber-soft); min-width: 0; }
.avis-change > h3 { display: flex; align-items: center; gap: 0.45rem; font-size: 0.875rem; color: var(--amber); }
.corrections { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; font-size: 0.8125rem; }
.corrections li { display: grid; gap: 0.25rem; padding: 0.6rem 0.75rem; border-radius: var(--r-sm); background: var(--surface); min-width: 0; }
.correction-label { margin: 0; font-weight: 600; }
.corrections .was, .corrections .now { display: grid; grid-template-columns: 5.25rem minmax(0, 1fr); gap: 0.5rem; margin: 0; }
.corrections .label { color: var(--text-3); font-size: 0.75rem; padding-top: 0.05rem; }
.corrections .value { white-space: pre-line; overflow-wrap: anywhere; }
.corrections .was .value { color: var(--text-2); text-decoration: line-through; text-decoration-color: var(--text-3); }
.corrections .now .value { font-weight: 600; }

/* Fiche « L'essentiel de l'avis » */
.essentiel { display: grid; gap: 0.5rem; min-width: 0; }
.essentiel > h3 { margin-bottom: 0; }
.facts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background: var(--line); }
.fact { min-width: 0; padding: 0.6rem 0.85rem; background: var(--surface); }
.fact dt { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; color: var(--text-3); font-size: 0.75rem; font-weight: 500; }
.fact dd { margin: 0.15rem 0 0; color: var(--text); font-size: 0.875rem; font-weight: 550; line-height: 1.45; overflow-wrap: anywhere; }
.fact dd ul { display: grid; gap: 0.15rem; margin: 0.25rem 0 0; padding-left: 1rem; font-size: 0.8125rem; font-weight: 400; }
.fact dd ul li::marker { color: var(--text-3); }
.fact-changed { display: inline-flex; align-items: center; height: 1.125rem; padding: 0 0.4rem; border-radius: 999px; background: var(--amber-soft); color: var(--amber); font-size: 0.6875rem; font-weight: 600; }
@media (min-width: 1024px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact.wide, .fact.span { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .avis-fields { grid-template-columns: minmax(0, 1fr); }
  .avis-fields dt { padding-bottom: 0; color: var(--text-3); font-size: 0.75rem; }
  .avis-fields dd { padding-top: 0.1rem; border-top: 0; }
  .avis-fields > div:first-child > dd { padding-top: 0.1rem; }
  .corrections .was, .corrections .now { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .avis-change { padding: 0.75rem 0.8rem; }
}

/* Extension « Envoyer à Tandao » : bouton de la fiche, jetons ------------------------------------- */
.extension-cta { display: grid; gap: 0.4rem; }
.extension-cta .btn { justify-self: start; }
.extension-cta p { margin: 0; }
.token-field { display: flex; gap: 0.4rem; align-items: center; min-width: 0; }
.token-field input { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8125rem; }
.token-field .btn { flex: none; height: 2.25rem; }
.token-form { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: flex-end; }
.token-form .field { flex: 1 1 14rem; margin: 0; }
.extension-handoff.ok [data-extension-handoff-status] { color: var(--green); font-weight: 600; }
