/*
 * Espace connecté — direction TRAME (26 septembre 2026, docs/redesign-trame/suivi.md ; auparavant P29) : barre
 * marine (marque, sections du dossier, navigation de l'espace), barre de contexte blanche (fil d'Ariane, identité),
 * contenu centré jusqu'à 1280 px, en-tête de page et repères d'étapes du dossier, puis les écrans métier.
 * Les contrôles de droits restent côté serveur : un lien absent du menu n'est jamais une autorisation.
 */

/* ---- Enveloppe (direction LEDGER, 5 octobre 2026, docs/redesign-fintech/) ------------------------------------ */
/* UNE barre latérale blanche de 248 px, collante, qui porte l'espace ou le dossier ouvert ; une barre du haut fine
   (fil d'Ariane, recherche, crédits, profil) ; le contenu sur un fond gris très clair. Sous 860 px, la barre latérale
   devient un volet. L'ancien bandeau marine n'existe plus. */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; background: var(--ln-canvas); }
.app__main { min-width: 0; display: flex; flex-direction: column; }

.side {
  background: var(--ln-side); border-right: 1px solid var(--ln-side-line); color: var(--ln-side-text);
  padding: 14px 12px 16px; display: flex; flex-direction: column; gap: 12px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.side__logo { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 2px; }
.side__brand { display: inline-flex; align-items: center; }
.side__brand .brand__logo { width: 104px; height: auto; display: block; }
.side__close { display: none; }

/* Carte de l'espace (hors d'un dossier). */
.ws { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--ln-line); border-radius: 10px; background: var(--ln-page); }
.ws__mark { width: 28px; height: 28px; flex: none; border-radius: 7px; background: linear-gradient(135deg, var(--ln-accent), #3b82f6); color: #fff; font-weight: 700; font-size: 12px; display: grid; place-items: center; }
.ws__text { min-width: 0; display: grid; }
.ws__name { font-weight: 600; font-size: 13px; line-height: 1.25; color: var(--ln-ink); overflow-wrap: anywhere; }
.ws__sub { font-size: 12px; color: var(--ln-muted); }

/* Navigation générale et navigation du dossier : la même liste. */
.nav__label, .dossier-side__label { margin: 0; padding: 14px 10px 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ln-faint); }
.nav__list, .appnav__list, .dossier-side__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.nav__list > li, .appnav__list > li, .dossier-side__list > li { margin: 0; }
.appnav__link, .dossier-side__list a, .nav__list a {
  display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 7px 10px; border-radius: var(--ln-radius-sm);
  color: var(--ln-side-text); font-size: 14px; font-weight: 500; line-height: 1.3; text-decoration: none; background: transparent; border: 0; cursor: pointer;
}
.appnav__link:hover, .dossier-side__list a:hover, .nav__list a:hover { background: #f1f4f9; color: var(--ln-ink); }
.appnav__link[aria-current], .dossier-side__list a[aria-current="page"], .nav__list a[aria-current] { background: var(--ln-side-active-bg); color: var(--ln-side-active-text); }
.appnav__link .ln-icon, .dossier-side__list .ln-icon, .nav__list .ln-icon { width: 16px; height: 16px; color: var(--ln-muted); }
.appnav__link[aria-current] .ln-icon, .dossier-side__list a[aria-current="page"] .ln-icon { color: var(--ln-accent); }
.appnav__link--area { color: var(--ln-side-text); }
.appnav__exit { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 7px 10px; border: 0; border-radius: var(--ln-radius-sm); background: transparent; color: var(--ln-danger); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; text-align: left; }
.appnav__exit:hover { background: var(--ln-danger-bg); }
.appnav__exit .ln-icon { width: 16px; height: 16px; }
.appnav__item--exit { margin-top: 6px; }
.side__account { margin-top: -4px; }

/* Dossier ouvert : retour, carte du dossier, rubriques. */
.dossier-side__back { display: inline-flex; align-items: center; gap: 8px; padding: 2px 8px; color: var(--ln-muted); font-size: 13px; text-decoration: none; }
.dossier-side__back:hover { color: var(--ln-accent); text-decoration: underline; }
.dossier-side__back .ln-icon { width: 14px; height: 14px; }
.dossier-side__context { padding: 10px 10px 12px; border: 1px solid var(--ln-line); border-radius: 10px; background: #fbfcfe; }
.dossier-side__eyebrow { margin: 0; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ln-faint); }
.dossier-side__name { margin: 4px 0 8px; font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--ln-ink); overflow-wrap: anywhere; }
.dossier-side__context .ln-tag { margin-bottom: 8px; }
.seg { display: flex; gap: 3px; list-style: none; margin: 0; padding: 0; }
.seg__part { height: 4px; flex: 1; margin: 0; border-radius: 2px; background: #e2e8f0; }
.seg__part.stage-strip__step--done { background: var(--ln-accent); }
.seg__part--current { background: #93c5fd; }
.dossier-side__state { margin: 6px 0 0; font-size: 12px; color: var(--ln-muted); line-height: 1.4; }
.dossier-side__trigger { display: none; }
.dossier-side__sections { display: block; }

.side__bottom { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 12px; }
.side__suite { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--ln-ink); color: #fff; font-weight: 600; font-size: 13px; text-decoration: none; }
.side__suite:hover, .side__suite[aria-current="page"] { background: #1e293b; color: #fff; }
.side__suite .ln-icon { width: 16px; height: 16px; }
.side__suite .ln-icon:last-child { margin-left: auto; }
.side__suite span { flex: 1; min-width: 0; }
.side__help { display: flex; align-items: center; gap: 10px; padding: 6px 10px; color: var(--ln-muted); font-size: 13px; text-decoration: none; }
.side__help:hover { color: var(--ln-accent); }
.side__help .ln-icon { width: 16px; height: 16px; flex: none; }

/* Barre du haut. */
.appbar { height: 56px; display: flex; align-items: center; gap: 14px; padding: 0 28px; background: var(--ln-page); border-bottom: 1px solid var(--ln-line); position: sticky; top: 0; z-index: 30; }
.appbar__toggle { display: none; }
.appbar__crumb { flex: 1; min-width: 0; margin: 0; }
.local-context { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: var(--ln-muted); white-space: nowrap; overflow: hidden; }
.local-context a { color: var(--ln-muted); text-decoration: none; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 0; }
.local-context a:hover { color: var(--ln-accent); text-decoration: underline; }
.local-context [aria-current="page"] { color: var(--ln-ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 0; }
.local-context .ln-icon { width: 14px; height: 14px; flex: none; color: var(--ln-line-strong); }
.appbar__right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: none; }
.appbar__search { display: flex; align-items: center; gap: 8px; width: 260px; height: 34px; margin: 0; padding: 0 10px; border: 1px solid var(--ln-line); border-radius: var(--ln-radius-sm); background: var(--ln-page); color: var(--ln-faint); }
.appbar__search:focus-within { border-color: var(--ln-accent); box-shadow: 0 0 0 3px var(--ln-sky); }
.appbar__search .ln-icon { width: 15px; height: 15px; flex: none; }
.appbar__search input { flex: 1; min-width: 0; border: 0; padding: 0; background: transparent; font: inherit; font-size: 13px; color: var(--ln-ink); outline: none; }
.appbar__search input::placeholder { color: var(--ln-faint); }
.appbar__search kbd { font: 11px/1 var(--ln-font); border: 1px solid var(--ln-line); border-radius: 5px; padding: 3px 5px; color: var(--ln-muted); background: var(--ln-soft); }
.appbar__credits { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 1px solid var(--ln-line); border-radius: 999px; font-weight: 600; font-size: 13px; color: var(--ln-ink); text-decoration: none; background: var(--ln-page); }
.appbar__credits:hover { border-color: var(--ln-line-strong); background: var(--ln-soft); }
.appbar__credits .ln-icon { width: 15px; height: 15px; color: var(--ln-accent); }
.appbar__credits-label { font-weight: 500; color: var(--ln-muted); }

/* Menu profil : l'avatar ouvre l'identité, Mon compte, la sécurité et la déconnexion. */
.profile-menu { position: relative; flex: none; }
.profile-menu > summary { list-style: none; cursor: pointer; display: flex; align-items: center; min-height: 34px; }
.profile-menu > summary::-webkit-details-marker { display: none; }
.profile-menu__avatar { width: 32px; height: 32px; border-radius: 50%; border: 1px solid transparent; background: var(--ln-ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.profile-menu[open] .profile-menu__avatar, .profile-menu > summary:hover .profile-menu__avatar { box-shadow: 0 0 0 3px var(--ln-sky); }
.profile-menu__panel {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 16rem; list-style: none; margin: 0; padding: var(--sp-2);
  background: var(--ln-page); border: 1px solid var(--ln-line); border-radius: var(--ln-radius); box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  color: var(--ln-ink); z-index: 40;
}
.profile-menu__links a { display: block; padding: 9px 12px; border-radius: var(--ln-radius-sm); color: var(--ln-ink); text-decoration: none; font-size: var(--ln-text-sm); }
.profile-menu__links a:hover { background: var(--ln-soft); color: var(--ln-accent-strong); }
.profile-menu__links a[aria-current="page"] { background: var(--ln-sky); color: var(--ln-accent); font-weight: 500; }
.profile-menu__identity { margin: 0; padding: 8px 12px 12px; border-bottom: 1px solid var(--ln-line); display: grid; gap: 2px; font-size: var(--ln-text-sm); color: var(--ln-muted); overflow-wrap: anywhere; }
.profile-menu__identity strong { color: var(--ln-ink); font-weight: 600; }
.profile-menu__links { list-style: none; margin: 8px 0; padding: 0; }
.profile-menu__links li { margin: 0; }
.profile-menu__narrow { display: none; }
.profile-menu__form { margin: 0; padding-top: 8px; border-top: 1px solid var(--ln-line); }
.profile-menu__signout { width: 100%; text-align: left; padding: 9px 12px; border: 0; border-radius: var(--ln-radius-sm); background: transparent; color: var(--ln-accent); font: inherit; font-size: var(--ln-text-sm); font-weight: 600; cursor: pointer; }
.profile-menu__signout:hover { background: var(--ln-soft); }

/* Contenu. */
.workspace { width: 100%; max-width: 1240px; margin: 0; padding: 28px 32px 56px; flex: 1; }
.app--dossier .workspace { max-width: 1240px; }
.workspace--wide { max-width: none; }

@media (max-width: 1180px) {
  .workspace, .app--dossier .workspace { padding: 24px 24px 48px; }
  .appbar { padding: 0 20px; }
  .appbar__search { width: 200px; }
}

/* Tablette et téléphone : la barre latérale est un volet, le bouton de la barre du haut le déplie. */
@media (max-width: 860px) {
  .app { display: flex; flex-direction: column; }
  .side { display: none; position: fixed; inset: 0 auto 0 0; width: min(300px, 88vw); height: 100vh; z-index: 50; box-shadow: 0 0 0 100vw rgba(15, 23, 42, 0.35); }
  .side[data-open] { display: flex; }
  .side__close { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--ln-line); border-radius: var(--ln-radius-sm); background: var(--ln-page); color: var(--ln-muted); cursor: pointer; }
  .side__close .ln-icon { width: 16px; height: 16px; }
  .appbar { height: auto; min-height: 52px; flex-wrap: wrap; gap: 8px 12px; padding: 8px 14px; }
  .appbar__toggle, .dossier-side__trigger { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; max-width: 100%; padding: 6px 10px; border: 1px solid var(--ln-line); border-radius: var(--ln-radius-sm); background: var(--ln-page); color: var(--ln-ink); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
  .appbar__toggle span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .appbar__toggle .ln-icon { width: 16px; height: 16px; flex: none; }
  .appbar__crumb { display: none; }
  /* La rangée de droite prend sa propre ligne et la recherche remplit la place qui reste. Sa largeur ne dépend plus de
     la largeur NATURELLE du champ (20 caractères × chasse moyenne de la police, que Chrome mesure autrement sous Linux) :
     elle débordait de 9 px à 390 px sur la CI (docs/corrections-ci-mobile-20261007.md). */
  .appbar__right { margin-left: auto; gap: 8px; flex: 1 1 100%; min-width: 0; }
  .appbar__search { width: auto; flex: 1 1 0; min-width: 0; order: 10; }
  .appbar__credits-label { display: none; }
  .workspace, .app--dossier .workspace { padding: 20px 16px 48px; }
}
@media (max-width: 480px) {
  .profile-menu__narrow { display: list-item; }
}

/* ---- En-tête de page du dossier ---------------------------------------------------------------------------- */

.pagehead h1, .dossier-header h1 { font-size: 32px; font-weight: 500; letter-spacing: -1.1px; line-height: 1.15; margin: 0 0 8px; overflow-wrap: anywhere; }
.pagehead .eyebrow { margin-bottom: 0; }
.pagehead__sub { color: var(--ln-muted); font-size: var(--ln-text-sm); max-width: 650px; margin: 0 0 var(--sp-2); }
.page-header.pagehead { margin-bottom: 27px; align-items: center; }
.page-header.pagehead > .pagehead__sub { flex: 1 1 100%; order: 3; margin: 0; }
.pagehead h1 .badge { font-size: var(--ln-text-xs); vertical-align: middle; letter-spacing: 0; }

/* Écrans du propriétaire (Trame) : l'en-tête de page sur le fond de travail, le contenu dans un panneau. */
.owner-page > .panel + .panel, .owner-page > .panel + section, .owner-page > section + .panel { margin-top: 22px; }

.dossier-header { margin: 0 0 27px; }
.dossier-header__row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; }
.dossier-header__title { min-width: 0; flex: 1 1 20rem; }
.dossier-header--compact { padding-bottom: var(--sp-4); border-bottom: 1px solid var(--ln-line); }
.dossier-header--compact .local-context { margin-bottom: 8px; }
.dossier-header__meta { font-size: 12px; color: var(--ln-muted); display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3); align-items: center; margin: 12px 0 0; }
.dossier-header--compact .dossier-header__meta { margin-top: 0; }
.dossier-header__meta a { color: var(--ln-accent); }
.dossier-header__state { display: inline-flex; align-items: center; gap: 7px; }
.dossier-header__state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #8094aa; flex: none; }
.dossier-header__actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; align-items: center; }
.dossier-header__actions .button { white-space: nowrap; }

@media (max-width: 620px) {
  .pagehead h1, .dossier-header h1 { font-size: 28px; letter-spacing: -0.8px; }
  .dossier-header__row { flex-direction: column; align-items: stretch; }
  /* En colonne, la base de 20 rem du titre devenait une HAUTEUR minimale : 270 px de vide au-dessus du bouton. */
  .dossier-header__title { flex-basis: auto; }
  .dossier-header__actions { width: 100%; }
  .dossier-header__actions .button { flex: 1 1 auto; white-space: normal; }
  .dossier-header--home .local-context { display: none; }
}

/* ---- Vue d'ensemble -------------------------------------------------------------------------------------- */

.overview__grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 22px; align-items: stretch; }
.overview__grid > * { min-width: 0; }
.focus-panel { border-left: 3px solid var(--ln-accent); padding: 30px; }
.focus-panel h2 { font-size: 32px; line-height: 1.2; letter-spacing: -1.2px; margin: 14px 0; }
.focus-panel p:not(.eyebrow):not(.ln-kicker) { max-width: 500px; color: var(--ln-muted); font-size: var(--ln-text-sm); line-height: 1.7; }
.focus-panel__chip, .ai-panel .eyebrow { display: flex; align-items: center; gap: 7px; }
.focus-panel__chip .icon, .ai-panel .eyebrow .icon { width: 16px; height: 16px; }
.ai-panel { padding: 27px; }
.ai-panel h2 { font-size: 21px; line-height: 1.35; margin: 12px 0; }
.ai-panel__summary { color: var(--ln-muted); font-size: var(--ln-text-sm); line-height: 1.7; }
.ai-panel__provenance { margin-bottom: var(--sp-1); }
.block-title { font-size: 19px; font-weight: 500; margin: 32px 0 16px; }
.block-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 32px 0 16px; }
.block-title-row .block-title { margin: 0; }
.file-grid__link .ln-icon { grid-row: 1 / 3; color: var(--ln-accent); margin-top: 3px; width: 18px; height: 18px; }
.review-note .ln-icon { width: 14px; height: 14px; color: var(--ln-accent); margin-top: 3px; }
.file-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--ln-line); background: var(--ln-page); }
.file-grid__item { margin: 0; border-right: 1px solid var(--ln-line); min-width: 0; }
.file-grid__item:last-child { border-right: 0; }
.file-grid__link { display: grid; grid-template-columns: 30px 1fr; gap: 6px 12px; padding: 24px; color: var(--ln-ink); text-decoration: none; height: 100%; }
.file-grid__link:hover { background: var(--ln-soft); color: var(--ln-ink); }
.file-grid__link .icon { grid-row: 1 / 3; color: var(--ln-accent); margin-top: 2px; }
.file-grid__link strong { font-size: 15px; font-weight: 500; }
.file-grid__link span { font-size: var(--ln-text-xs); color: var(--ln-muted); }
.review-note { display: flex; gap: 10px; align-items: flex-start; color: var(--ln-muted); font-size: var(--ln-text-xs); margin-top: 21px; }
.review-note .icon { width: 14px; height: 14px; color: var(--ln-accent); margin-top: 1px; }

@media (max-width: 800px) {
  .overview__grid { grid-template-columns: 1fr; }
  .file-grid { grid-template-columns: 1fr; }
  .file-grid__item { border-right: 0; border-bottom: 1px solid var(--ln-line); }
  .file-grid__item:last-child { border-bottom: 0; }
}
@media (max-width: 620px) {
  .focus-panel, .ai-panel { padding: 22px; }
  .focus-panel h2 { font-size: 28px; }
  .file-grid__link { padding: 19px; }
}

/* ---- Grille contenu + colonne secondaire ---------------------------------------------------------------- */

.dossier-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: var(--sp-5, 20px); align-items: start; }
.dossier-grid > * { min-width: 0; }
.dossier-grid__aside { display: grid; gap: var(--sp-4); }
.panel--flush { padding: 0; }
.panel--flush > .panel__head { margin: 0; padding: 18px; }
.panel--flush > .panel__body { padding: 18px; }
.panel--flush > .table-wrap { margin: 0; }
.panel--flush > .table-wrap .table { border: 0; }

.review-column { padding: 18px; }
.review-column h2 { font-size: var(--ln-text-base); margin-bottom: var(--sp-4); }
.review-step { display: grid; grid-template-columns: 18px 1fr; gap: var(--sp-2); font-size: var(--ln-text-sm); padding-bottom: var(--sp-4); }
.review-step__mark { color: var(--ln-good); font-size: var(--ln-text-sm); line-height: 1.5; }
.review-step--pending .review-step__mark, .review-step--none .review-step__mark { color: var(--ln-muted); }
.review-step--failed .review-step__mark { color: var(--ln-danger); }
.review-step--warn .review-step__mark { color: var(--ln-warn); font-weight: 600; }
.decisions-note { padding: 12px 18px; border-top: 1px solid var(--ln-line); font-size: var(--ln-text-sm); color: var(--ln-muted); }
.review-step p { color: var(--ln-muted); font-size: var(--ln-text-sm); margin: 2px 0 0; }
.review-column .fine { margin: var(--sp-4) 0 0; }
.review-column .list-lines li { flex-wrap: nowrap; }
.review-column .list-lines { margin-top: 0; }

/* Une décision tient en une ligne (audit de présentation, §3.6) : statut à gauche, action à droite. */
.decision { padding: 12px 18px; border-top: 1px solid var(--ln-line); font-size: var(--ln-text-sm);
  display: flex; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; align-items: baseline; }
.decision .fine { color: var(--ln-muted); }
.source-chip { font-size: var(--ln-text-xs); color: var(--ln-accent); display: inline-block; background: var(--ln-sky); padding: 2px 7px; border-radius: 3px; text-decoration: none; }
.source-chip--muted { color: var(--ln-muted); background: var(--ln-soft); }
.proofbar { display: flex; justify-content: space-between; gap: var(--sp-3); border-top: 1px solid var(--ln-line); padding: 12px 18px; font-size: var(--ln-text-sm); color: var(--ln-muted); flex-wrap: wrap; }

@media (max-width: 1050px) { .dossier-grid { grid-template-columns: minmax(0, 1fr) 240px; } }
@media (max-width: 860px) { .dossier-grid { grid-template-columns: 1fr; } }

/* ---- Schéma d'architecture (SVG déterministe, ArchitectureDiagramHelper) ------------------------------ */

/* Vues d'architecture (27 septembre 2026) : schémas à leur taille naturelle, défilement horizontal si besoin. */
.diagram-wrap--scroll svg { display: block; max-width: none; height: auto; }
/* Cadre d'un schéma (27 septembre 2026, `diagram_frame`) : le schéma s'ajuste à la largeur disponible, jamais au-delà
   de sa taille naturelle (--diagram-width) ni en deçà d'un seuil lisible (--diagram-min-width) ; au-delà, le CADRE
   défile, jamais la page. « Taille réelle » le montre à sa taille naturelle dans le même cadre. */
/* `contain: inline-size` : la largeur intrinsèque du cadre ignore son contenu — aucune grille ni aucun flex ancêtre ne
   peut s'élargir sur un schéma, quel que soit l'agencement de la page. Le cadre prend la largeur de sa colonne. */
.diagram-frame { position: relative; max-width: 100%; min-width: 0; overflow-x: auto; overflow-y: hidden; contain: inline-size; }
.diagram-frame__canvas { width: 100%; max-width: var(--diagram-width, 100%); min-width: var(--diagram-min-width, 0px); }
.diagram-frame__canvas > svg { display: block; width: 100%; height: auto; max-width: none; }
.diagram-frame--natural .diagram-frame__canvas { width: var(--diagram-width); max-width: none; }
.diagram-frame--natural .diagram-frame__canvas > svg { width: var(--diagram-width); }
.diagram-frame__zoom { position: sticky; left: 0; float: right; margin: 0 0 var(--sp-2) var(--sp-2); font-size: var(--ln-text-sm); padding: 2px 10px; border: 1px solid var(--ln-line); border-radius: var(--ln-radius); background: var(--ln-page); color: var(--ln-accent); cursor: pointer; }
.diagram-frame .diagram { min-width: 0; }
.architecture-views { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-6); }
.architecture-views > * { min-width: 0; }
.architecture-view h3 { margin: 0 0 var(--sp-2); }
.architecture-journey { margin-bottom: var(--sp-6); }
.architecture-journey h4 { margin: 0 0 var(--sp-1); }
.architecture-steps { margin: 0; padding-left: 1.4em; }
.diagram-wrap { overflow-x: auto; margin-bottom: var(--sp-4); background: var(--ln-diagram-bg) radial-gradient(var(--ln-diagram-dot, #e8edf5) 0.7px, transparent 0.7px); background-size: 16px 16px; padding: var(--sp-4); border: 1px solid var(--ln-diagram-line); border-radius: var(--ln-radius-lg, 12px); }
.diagram { max-width: 100%; min-width: 480px; height: auto; font-family: inherit; display: block; }
/* Grille d'avant le contrat 1.5 : elle ne dessine que des propositions et des versions ANCIENNES. Ses couleurs sont
   écrites en toutes lettres (celles de Trame) : la refonte Aurore change les jetons, et une version conservée ne se
   recolore pas par une règle globale (docs/refonte-aurore-v3/decisions.md). */
.diagram__component rect { fill: #ffffff; stroke: #1853cf; stroke-width: 1.2; }
.diagram__component--data rect { stroke: #22553b; }
.diagram__component--integration rect, .diagram__component--external rect { stroke: #85500b; stroke-dasharray: 4 3; }
.diagram__name { font-size: var(--ln-text-sm); font-weight: 500; fill: #182c42; }
.diagram__kind { font-size: var(--ln-text-xs); fill: #5b6d80; }
.diagram__flow { stroke: #1853cf; stroke-width: 1.2; }
.diagram marker path { fill: #1853cf; }
.diagram-legend { font-size: var(--ln-text-sm); color: var(--ln-muted); display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); margin: 0 0 var(--sp-4); }
.diagram-legend span::before { content: ""; display: inline-block; width: 14px; height: 9px; border: 1.2px solid var(--ln-accent); border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.diagram-legend span::before { border-color: #5278ce; background: #f4f7ff; }
.diagram-legend .diagram-legend--data::before { border-color: #3f8a62; background: #eef8f2; }
.diagram-legend .diagram-legend--integration::before { border-color: #b07a2a; background: #fff6ea; border-style: dashed; }
.diagram-text { font-size: var(--ln-text-sm); }
.diagram-text summary { color: var(--ln-accent); font-size: var(--ln-text-sm); }

/* ---- Cadrage (J1-B) ------------------------------------------------------------------------------------- */

.scoping { margin-top: var(--sp-6); }
.scoping__title { font-size: var(--ln-text-lg); }
.attention-list, .question-list, .reference-list { margin: 0; padding-left: 1.25rem; }
.attention-list li, .question-list li, .reference-list li { margin-bottom: var(--sp-2); }
.question-list__answer { margin-top: 2px; }
/* Replis du cadrage (audit de présentation, priorité 3) : questionnaire, sources et historique sous le besoin. */
.scoping details.section > summary { cursor: pointer; font-weight: 500; color: var(--ln-accent); padding: var(--sp-2) 0; }
.scoping details.section[open] > summary { margin-bottom: var(--sp-2); }
.inline-list { list-style: none; margin: 0 0 var(--sp-3); padding: 0; display: grid; gap: var(--sp-1); }
.attention-list .inline-forms { display: inline-flex; gap: var(--sp-2); margin-left: var(--sp-2); vertical-align: middle; }
.attention-list .inline-forms form { margin: 0; }
.answer-revision { border-top: 1px solid var(--ln-line); padding-top: var(--sp-2); margin-top: var(--sp-2); }

/* ---- Revue IA : une chronologie par évaluation (audit de présentation, priorité 4) ----------------------- */

.review-timeline { border-top: 1px solid var(--ln-line); padding-top: var(--sp-4); margin-top: var(--sp-4); }
.review-timeline:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.review-timeline h3 { font-size: var(--ln-text-base); margin: 0; }
.review-timeline__reserves { margin: var(--sp-3) 0 0; }
#review-details > summary, .review-cycle details.section > summary { cursor: pointer; font-weight: 500; color: var(--ln-accent); padding: var(--sp-2) 0; }
.finding__response { margin: var(--sp-2) 0 0; }
.rate-internal > summary, #estimation-policy details > summary, .proposal details.section > summary, .delivery details > summary { cursor: pointer; font-weight: 500; color: var(--ln-accent); padding: var(--sp-2) 0; }

/* ---- Proposition IA (J1-C), suggestions ----------------------------------------------------------------- */

.proposal-hints { margin-top: var(--sp-2); }
.suggestion-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-3); }
.suggestion { background: var(--ln-page); border: 1px solid var(--ln-line); border-radius: var(--ln-radius); padding: var(--sp-4); }
.suggestion__head, .suggestion__header { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-2); }
.suggestion__label { font-weight: 500; }
.suggestion--decided { opacity: 0.8; }
.suggestion__related { border-top: 1px solid var(--ln-line); margin-top: var(--sp-2); padding-top: var(--sp-2); }

/* ---- Estimation (J1-D) ---------------------------------------------------------------------------------- */

.result-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: var(--sp-3); margin: 0 0 var(--sp-4); }
.result-card { border: 1px solid var(--ln-line); border-radius: var(--ln-radius); padding: var(--sp-3) var(--sp-4); background: var(--ln-page); min-width: 0; }
.result-card h3, .result-card__label { font-size: var(--ln-text-sm); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ln-muted); margin: 0 0 var(--sp-1); font-weight: 500; }
.result-card__value { font-size: var(--ln-text-md); font-weight: 500; margin: var(--sp-1) 0; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.result-card__value--partial { color: var(--ln-warn); }
.missing summary { cursor: pointer; color: var(--ln-danger); font-size: var(--ln-text-sm); }
.missing ul { margin: var(--sp-1) 0 0; padding-left: 1.25rem; font-size: var(--ln-text-sm); }
.internal-view { border: 1px dashed var(--ln-line-strong); border-radius: var(--ln-radius); padding: var(--sp-3) var(--sp-4); background: var(--ln-soft); }
.internal-view > summary { font-weight: 500; cursor: pointer; }
.impact { background: var(--ln-warn-bg); border: 1px solid var(--ln-warn-line); border-radius: var(--ln-radius); padding: var(--sp-4); }
.allocations input[type="text"] { width: 100%; min-width: 4.5rem; }
.rate-field { display: grid; gap: var(--sp-1); }

/* ---- Revue par un second modèle (CA-03), livraison (CA-05) --------------------------------------------- */

.finding-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-3); }
.finding { border: 1px solid var(--ln-line); border-radius: var(--ln-radius); padding: var(--sp-4); background: var(--ln-page); }
.finding .form--inline { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }
.finding .form--inline input[type="text"] { min-width: 0; width: 100%; }
.check-list { list-style: none; padding: 0; }
.check-list li { padding: var(--sp-1) 0; border-bottom: 1px solid var(--ln-line); }
.check-list li:last-child { border-bottom: 0; }
.review__aspects { list-style: none; padding: 0; }
.review__aspect { display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: space-between; align-items: flex-start; border: 1px solid var(--ln-line); border-radius: var(--ln-radius); padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-2); background: var(--ln-page); }
.review__aspect > div { flex: 1 1 20rem; }
/* Jamais display:flex sur une cellule : elle sortait du rang et ses filets ne s'alignaient plus (lot 2 Ledger, 5 octobre 2026). */
.delivery-status { vertical-align: top; }

.decision-form { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; margin: var(--sp-1) 0; padding: var(--sp-2) var(--sp-3); border: 1px solid var(--ln-line); border-radius: var(--ln-radius-sm); background: var(--ln-page); }
.decision-form__subject { flex: 1 0 100%; font-weight: 500; }
.decision-form input[type="text"] { flex: 1 1 14rem; min-width: 0; width: auto; }

/* ---- Catalogue, corpus, veille -------------------------------------------------------------------------- */

.catalog-entry { border: 1px solid var(--ln-line); border-radius: var(--ln-radius); padding: var(--sp-4); margin-bottom: var(--sp-3); background: var(--ln-page); }
.catalog-entry-view { padding: var(--sp-2) 0; }
.diff { font-family: var(--ln-mono); font-size: var(--ln-text-sm); white-space: pre-wrap; background: var(--ln-soft); padding: var(--sp-3); border-radius: var(--ln-radius-sm); }
.cite { color: var(--ln-muted); font-style: normal; }

/* ---- Étapes numérotées (parcours privés : import, sélections) ------------------------------------------- */

.steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: var(--sp-3); }
.steps li { position: relative; padding-left: 2.6rem; }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 2rem; height: 2rem; border-radius: 50%; background: var(--ln-sky); color: var(--ln-accent); display: flex; align-items: center; justify-content: center; font-weight: 500; font-size: var(--ln-text-sm); }

/* ---- États asynchrones : file, progression connue, échec ------------------------------------------------ */

.run-steps { list-style: none; padding: 0; margin: 0 0 var(--sp-4); display: grid; gap: var(--sp-2); }
/* Progression d'une génération en parties (26 septembre 2026) : ce qui est prêt, ce qui est en cours. */
.run-progress { margin: 0 0 var(--sp-4); padding: var(--sp-3) var(--sp-4); border: 1px solid var(--ln-line); border-radius: 8px; background: var(--ln-soft); }
.run-progress__count { margin: 0 0 var(--sp-2); }
.run-progress progress { width: 100%; height: 8px; accent-color: var(--ln-accent); }
.run-progress .help { margin: var(--sp-2) 0 0; }
.run-steps li { display: grid; grid-template-columns: 18px 1fr; gap: var(--sp-2); font-size: var(--ln-text-sm); }
.run-steps__mark { color: var(--ln-muted); }
.run-steps li[data-state="done"] .run-steps__mark { color: var(--ln-good); }
.run-steps li[data-state="failed"] .run-steps__mark { color: var(--ln-danger); }
.run-steps li[data-state="active"] .run-steps__mark { color: var(--ln-warn); }
.run-steps small { display: block; color: var(--ln-muted); font-size: var(--ln-text-sm); }

/* ---- Tableaux d'espace (projets, clients) --------------------------------------------------------------- */

/* Liste des dossiers (Trame, maquette 02) : une carte par dossier — état, nom, étapes, un fait, UNE action. */
.project-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 15px; }
.project-list > li { margin: 0; border: 1px solid var(--ln-line); border-radius: var(--ln-radius); background: var(--ln-page); padding: 27px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp-3) var(--sp-8); align-items: center; }
.project-list__state { margin: 0 0 var(--sp-2); }
.project-list__title { font-size: 26px; margin: 0 0 var(--sp-2); font-weight: 500; letter-spacing: -0.5px; overflow-wrap: anywhere; }
.project-list__title a { color: var(--ln-ink); text-decoration: none; }
.project-list__title a:hover { color: var(--ln-accent); text-decoration: underline; }
.project-list__meta { font-size: var(--ln-text-sm); color: var(--ln-muted); margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3); }
.project-list__side { font-size: var(--ln-text-sm); color: var(--ln-muted); text-align: right; display: grid; gap: var(--sp-2); justify-items: end; }
.project-list__item--new { border-style: solid; }
.project-list__item--new .project-list__title { font-size: 23px; }
@media (max-width: 620px) {
  .project-list > li { grid-template-columns: 1fr; padding: 22px; }
  .project-list__title { font-size: 22px; }
  .project-list__side { text-align: left; justify-items: stretch; }
}

/* ---- Console de plateforme : même langage, portée distincte ------------------------------------------- */

.platform-banner { background: var(--ln-hero); color: var(--ln-hero-text); border-radius: var(--ln-radius); padding: var(--sp-3) var(--sp-4); font-size: var(--ln-text-sm); margin-bottom: var(--sp-6); display: flex; gap: var(--sp-3); align-items: center; flex-wrap: wrap; }
.platform-banner strong { color: var(--ln-cyan); font-weight: 500; }
.platform-banner a { color: var(--ln-hero-text); }
/* Sortie d'un espace ouvert : un vrai bouton, contrasté, poussé à droite du bandeau (27 septembre 2026). */
.platform-banner__exit { margin-left: auto; display: inline-flex; align-items: center; gap: var(--sp-2); }
.platform-banner .platform-banner__button { background: #ffffff; color: var(--ln-navy, #142b47); border: 0; font-weight: 600; }
.platform-banner .platform-banner__button:hover { background: var(--ln-sky); }
.appnav__exit { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid rgba(255, 255, 255, .55); border-radius: var(--ln-radius); background: transparent; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.appnav__exit:hover { background: rgba(255, 255, 255, .12); }

/* Questionnaire d'ouverture d'un dossier (24 septembre 2026) : un encadré posé AVANT le texte libre.
   Les questions à choix multiple s'étalent en colonnes qui se replient seules ; rien n'est masqué derrière
   un repli — une question qu'on ne voit pas est une question sans réponse. */
.intake { border: 1px solid var(--ln-line); border-radius: var(--ln-radius); padding: var(--sp-4); margin: 0 0 var(--sp-5); background: var(--ln-surface-muted, #f7f8fa); }
.intake__title { margin: 0 0 var(--sp-1); font-size: 1.05rem; }
.intake__group { background: var(--ln-surface, #fff); margin-top: var(--sp-4); }
.intake__group:last-of-type { margin-bottom: 0; }
.intake__field { margin-bottom: var(--sp-4); }
.intake__field:last-child { margin-bottom: 0; }
.intake__question { border: 0; padding: 0; margin: 0; min-width: 0; }
.intake__question > legend { padding: 0; font-weight: 500; }
.intake__options { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 0 var(--sp-4); margin-top: var(--sp-2); }
.intake__legend { margin: var(--sp-4) 0 0; }
.intake__more > summary { cursor: pointer; font-weight: 500; color: var(--ln-accent); padding: var(--sp-2) 0; }
.intake-summary dt { font-weight: 500; }
.intake-summary dd { margin: 0 0 var(--sp-2); }

/* Résumé d'une évaluation (24 septembre 2026, audit de présentation) : un chiffre qui domine, ses composantes en
   dessous, la fourchette en retrait. Six cartes côte à côte donnaient dix-huit nombres de même poids visuel — le
   lecteur ne savait pas lequel était le sien. */
.summary { border: 1px solid var(--ln-line); border-radius: var(--ln-radius); padding: var(--sp-4); margin-bottom: var(--sp-4); }
.summary__headline { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--sp-2); margin: 0 0 var(--sp-3); }
.summary__label { color: var(--ln-muted, #5b6472); }
.summary__value { font-size: 1.6rem; line-height: 1.2; }
.summary__lines { margin: 0; display: grid; gap: var(--sp-2); }
.summary__lines > div { display: grid; grid-template-columns: minmax(11rem, 14rem) 1fr; gap: var(--sp-3); align-items: baseline; }
.summary__lines dt { color: var(--ln-muted, #5b6472); font-weight: 400; }
.summary__lines dd { margin: 0; }
.summary__conventions { margin-top: var(--sp-3); }
.summary__conventions > summary, .summary .missing > summary { cursor: pointer; color: var(--ln-muted, #5b6472); }
@media (max-width: 40rem) { .summary__lines > div { grid-template-columns: 1fr; gap: 0; } }

/* ---- Audit « impression professionnelle » (25 septembre 2026) ------------------------------------------------ */

/* Premier dossier : trois étapes et le prix, avant tout formulaire. */
.empty-state--onboarding { text-align: left; padding: var(--sp-8); }
.empty-state--onboarding h2 { font-size: var(--ln-text-lg); }
.onboarding-steps { list-style: none; padding: 0; margin: var(--sp-6) 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); }
.onboarding-steps__item { display: grid; gap: var(--sp-2); align-content: start; margin: 0; }
.onboarding-steps__item span:last-child { color: var(--ln-muted); }
.onboarding-steps__number {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--ln-sky); color: var(--ln-accent-strong); font-weight: 600;
}
@media (max-width: 760px) { .onboarding-steps { grid-template-columns: 1fr; } }

/* « À préciser » : un résumé, deux actions. */
.attention-summary { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-4); }
.attention-summary__row { margin: 0; }
.attention-summary__row p { margin-bottom: var(--sp-2); }
.attention-summary__questions { margin: var(--sp-2) 0 0; }
.attention-summary__questions li { margin-bottom: var(--sp-2); }
.attention-summary__questions .button { margin-left: var(--sp-2); }

/* Replis : le sous-total se lit d'abord, le détail reste à un clic. */
.fold { border: 1px solid var(--ln-line); border-radius: var(--ln-radius); background: var(--ln-page); }
.fold > .fold__summary { padding: var(--sp-3) var(--sp-4); font-weight: 500; }
.fold[open] > .fold__summary { border-bottom: 1px solid var(--ln-line); }
.fold > .table-wrap { margin: 0; }
.fold .table { border: 0; }
.estimate__links { margin-top: calc(-1 * var(--sp-2)); }
.summary__aside { color: var(--ln-muted); margin: calc(-1 * var(--sp-2)) 0 var(--sp-4); }
.site-nav--side .side-nav a .icon { color: var(--ln-muted); margin-right: var(--sp-1); }
.site-nav--side .side-nav a[aria-current="page"] .icon { color: var(--ln-accent); }
.next-action { display: flex; gap: var(--sp-4); align-items: flex-start; border-left: 4px solid var(--ln-accent); }
.next-action h2 { font-size: var(--ln-text-lg); }
.manual-prep { margin-top: var(--sp-4); }
.manual-prep > .section { margin: var(--sp-4); }

/* ---- Audit de l'espace client (25 septembre 2026) ---------------------------------------------------------- */
/* Barre de confirmation collante sous le tableau du cadrage : le bouton n'est plus à un écran des cases. */
.confirm-bar { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: flex-end; gap: var(--sp-3); padding: var(--sp-2) var(--sp-3); margin-top: var(--sp-2); background: var(--ln-surface, #fff); border-top: 1px solid var(--ln-line); border-radius: 0 0 var(--ln-radius) var(--ln-radius); }
.check-inline span { font-size: var(--ln-text-sm); }
/* Une enveloppe à chiffrer se lit comme telle, pas comme un montant. */
.summary__value--pending { color: var(--ln-warn, #8a5a00); font-size: var(--ln-text-lg); }
/* Réglages avancés repliés sous l'évaluation. */
.estimate__links > summary { cursor: pointer; }
/* Tableau des postes en cartes sur mobile : chaque cellule porte son en-tête (data-label). */
@media (max-width: 720px) {
  .table--responsive thead { display: none; }
  .table--responsive tr { display: block; border-bottom: 1px solid var(--ln-line); padding: var(--sp-2) 0; }
  .table--responsive td { display: block; position: relative; padding: 4px 0 4px 9rem; border: 0; text-align: left; min-height: 1.4em; }
  .table--responsive td::before { content: attr(data-label); position: absolute; left: 0; top: 4px; width: 8.5rem; color: var(--ln-muted); font-size: var(--ln-text-sm); }
  .table--responsive td.num { text-align: left; }
}
/* Liste des dossiers : quatre étapes, un fait, une action. */
.stage-strip { list-style: none; display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3); margin: var(--sp-1) 0; padding: 0; font-size: var(--ln-text-sm); color: var(--ln-muted); }
.stage-strip__step { margin: 0; }
.stage-strip__step--done { color: var(--ln-ink); }
.stage-strip__mark { color: var(--ln-accent); }
.stage-strip__step:not(.stage-strip__step--done) .stage-strip__mark { color: var(--ln-line); }

/* Reprise du taux d'un rôle publié : le choix et le bouton sur une ligne. */
.rate-adopt { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; margin: 4px 0 0; }
.rate-adopt select { max-width: 22rem; }
/* Console de la plateforme : l'état en tête, en couleur quand il faut agir. */
.health { border: 1px solid var(--ln-line); border-radius: var(--ln-radius); padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-4); }
.health--alert { border-color: var(--ln-danger, #b42318); background: color-mix(in srgb, var(--ln-danger, #b42318) 6%, white); }
.health__lines { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-6); }
.health__lines li { margin: 0; padding-right: var(--sp-3); }
.health__lines li::before { content: "●"; margin-right: 6px; }
.health__ok::before { color: var(--ln-good); }
.health__bad::before { color: var(--ln-danger, #b42318); }
.health__bad { font-weight: 600; }
/* Références de taux : le rôle se lit en entier ; le brouillon est replié derrière un mot. */
#rates-draft input[name*="[role_name]"] { min-width: 16rem; }
#rates-draft > summary { cursor: pointer; padding: var(--sp-2) 0; }
.fold--inline > summary { cursor: pointer; color: var(--ln-muted); }

/* ---- Nouveau dossier (Trame, maquette 03) ---------------------------------------------------------------- */
.new-dossier__next { position: sticky; top: var(--sp-4); }

@media (max-width: 800px) { .new-dossier__next { position: static; } }

/* ---- Mon compte (Trame, maquette 11) --------------------------------------------------------------------- */
.account-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 22px; }
.account-card { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-2); }
.account-card h2 { font-size: 19px; margin: 0 0 var(--sp-1); }
.account-card p { margin: 0; overflow-wrap: anywhere; }
.account-card .button { margin-top: auto; }
.account-card--advice { border-top: 2px solid var(--ln-navy-active); }
.account-note { margin-top: var(--sp-6); }



/* ---- Crédits (Trame, maquette 10) ------------------------------------------------------------------------ */
.credit-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--ln-line); margin-bottom: var(--sp-4); }
.credit-summary__item { padding: 20px 22px; border-right: 1px solid var(--ln-line); min-width: 0; }
.credit-summary__item:last-child { border-right: 0; }
.credit-summary__item p { margin: 0 0 var(--sp-2); }
.credit-summary__value { font-size: 26px; font-weight: 500; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
@media (max-width: 800px) { .credit-summary { grid-template-columns: 1fr; } .credit-summary__item { border-right: 0; border-bottom: 1px solid var(--ln-line); } .credit-summary__item:last-child { border-bottom: 0; } }

/* ---- Console de la plateforme (Trame) -------------------------------------------------------------------- */
/* L'état en trois cases, écrit en toutes lettres ; la marque ✓ / ! double la couleur, jamais seule. */
.health-track { margin: 0 0 22px; }
.health-track .health__lines { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--ln-line); background: var(--ln-page); }
.health-track .health__lines li { margin: 0; padding: 14px 20px; border-right: 1px solid var(--ln-line); font-size: var(--ln-text-sm); }
.health-track .health__lines li:last-child { border-right: 0; }
.health-track .health__ok { color: var(--ln-good); }
.health-track .health__ok::before { content: "✓ "; }
.health-track .health__bad { color: var(--ln-danger); background: var(--ln-danger-bg); font-weight: 500; }
.health-track .health__bad::before { content: "! "; }
.health-track .fine { margin: 8px 0 0; }
.console-grid { margin-bottom: 8px; align-items: start; }
.console-grid .focus-panel h2, .console-grid .panel h2 { font-size: 23px; letter-spacing: -0.5px; margin: 10px 0 var(--sp-3); }
.kpi-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--ln-line); margin: 0 0 var(--sp-4); }
.kpi-grid > div { padding: 12px 14px; border-right: 1px solid var(--ln-line); min-width: 0; }
.kpi-grid > div:last-child { border-right: 0; }
.kpi-grid dt { font-size: var(--ln-text-xs); color: var(--ln-muted); text-transform: uppercase; letter-spacing: 1px; }
.kpi-grid dd { margin: 4px 0 0; font-size: 17px; font-weight: 500; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.list-lines--flush { margin: 0; }
.list-lines--flush li:first-child { border-top: 0; }
.list-lines--flush li:last-child { border-bottom: 0; }
@media (max-width: 800px) {
  .health-track .health__lines, .kpi-grid { grid-template-columns: 1fr; }
  .health-track .health__lines li, .kpi-grid > div { border-right: 0; border-bottom: 1px solid var(--ln-line); }
  .health-track .health__lines li:last-child, .kpi-grid > div:last-child { border-bottom: 0; }
}
.health-track.health--alert { background: none; border: 0; }

/* Courriels désactivés (pré-production) : lien d'acceptation d'une invitation, à copier depuis la liste des invitations. */
.acceptance-link { display: block; width: 100%; min-width: 14rem; margin-top: var(--sp-1); font-size: 0.8125rem; }

/* ---- Menu « Administration » du propriétaire (Aurore V3, 1er octobre 2026, maquette 03) -------------------- */
/* Bandeau du propriétaire HORS du menu latéral (dossier, espace ouvert) : les rubriques y restent du texte seul — les
   icônes du menu « Administration » le faisaient passer sur deux lignes. */
.appbar__panel--owner .appnav__link[id^="nav-"] > .ln-icon { display: none; }
/* Tableau posé directement dans un panneau (Aurore V3, maquette 03) : le panneau porte le cadre, le tableau ne garde
   que ses filets horizontaux — deux bordures imbriquées se lisaient comme deux boîtes. */
.panel > .table-wrap > .table, .panel > .table { border: 0; }
.panel > .table-wrap:last-child { margin-bottom: 0; }

/* Reprise après échec (simplification, 2 octobre 2026) : un bandeau, une phrase, LA suite. */
.recovery-banner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--sp-4); align-items: center; margin: 0 0 var(--sp-6); padding: 16px 18px; border: 1px solid var(--ln-warn-line); border-left: 3px solid var(--ln-question-mark, #d8b36c); border-radius: var(--ln-radius-sm); background: var(--ln-warn-bg); }
.recovery-banner__icon .ln-icon { width: 20px; height: 20px; color: var(--ln-warn); }
.recovery-banner h2 { font-size: 15px; font-weight: 600; margin: 0 0 2px; color: var(--ln-warn); }
.recovery-banner p { margin: 0; font-size: var(--ln-text-sm); color: var(--ln-warn); }
.recovery-banner__cause { display: block; margin-top: 2px; opacity: 0.85; }
@media (max-width: 720px) { .recovery-banner { grid-template-columns: minmax(0, 1fr); } .recovery-banner__icon { display: none; } }
.dossier-action { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-4); }
.dossier-action__form { margin: 0; display: inline; }
.button-link { background: none; border: 0; padding: 0; font: inherit; font-size: var(--ln-text-sm); color: var(--ln-accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.button-link:hover { color: var(--ln-title); }

/* Menu replié des actions rares (simplification) et panneau du besoin. */
.more-menu { position: relative; display: inline-block; }
.more-menu__toggle { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; border: 1px solid var(--ln-line); border-radius: var(--ln-radius-sm); background: var(--ln-page); font-size: var(--ln-text-sm); font-weight: 500; color: var(--ln-ink); }
.more-menu__toggle::-webkit-details-marker { display: none; }
.more-menu[open] .more-menu__toggle { background: var(--ln-soft); }
.more-menu__list { position: absolute; right: 0; z-index: 20; min-width: 15rem; margin: 6px 0 0; padding: 6px; list-style: none; background: var(--ln-page); border: 1px solid var(--ln-line); border-radius: var(--ln-radius-sm); box-shadow: 0 8px 24px rgb(25 45 80 / 0.12); }
.more-menu__list a, .more-menu__list button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 4px; color: var(--ln-ink); font-size: var(--ln-text-sm); text-decoration: none; background: none; border: 0; cursor: pointer; }
.more-menu__list a:hover, .more-menu__list button:hover { background: var(--ln-soft); }
.need-panel__head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--sp-4); flex-wrap: wrap; margin-bottom: var(--sp-3); }
.need-panel__head h2 { margin: 10px 0 0; }
.need-panel__actions { display: flex; align-items: center; gap: var(--sp-4); }
.need-panel__actions form { margin: 0; }
.need-panel .prose { margin-bottom: var(--sp-4); }
/* Replis de page (simplification) : un repli posé comme panneau garde la hauteur d'une ligne fermé ; son contenu
   reprend la marge intérieure du panneau une fois ouvert. */
details.panel.fold { padding: 0; margin-bottom: var(--sp-4); }
details.panel.fold > .fold__summary { cursor: pointer; padding: 14px 18px; font-size: 16px; font-weight: 600; color: var(--ln-title); background: none; border-radius: var(--ln-radius); }
details.panel.fold[open] > .fold__summary { border-bottom: 1px solid var(--ln-line); border-radius: var(--ln-radius) var(--ln-radius) 0 0; }
details.panel.fold > :not(summary) { margin: var(--sp-4) 18px; }
details.panel.fold > .table-wrap { margin: var(--sp-4) 18px; }
details.fold.budget-detail { margin-bottom: var(--sp-4); }
details.fold.budget-detail > .fold__summary { cursor: pointer; padding: 14px 18px; font-size: 16px; font-weight: 600; color: var(--ln-title); }
details.fold.budget-detail > .estimate { border: 0; margin: 0; }
