/*
 * Impact — le thème Eudonet par-dessus Tabler 1.6 (charte : BrandBook du 19/09/2025, page 15).
 *
 * Règles de la charte appliquées à un outil : des neutres pour travailler, des dégradés pour signer.
 * - encre #242424, fond #F2F0F0, surfaces blanches ;
 * - bleu d'action #386AEB (liens, sélection, focus, compteurs), violet IA #7659F1 (ce que propose une IA) ;
 * - un dégradé par module (tuiles et bandeau de marque), jamais derrière des données ;
 * - bouton principal noir en pilule ; texte noir sur les dégradés ;
 * - Helvetica Now Pro Display si elle est installée, sinon Segoe UI.
 *
 * Clair et sombre (D9) : chaque couleur est un light-dark(), comme Tabler 1.6. Le gabarit pose
 * data-bs-theme (light ou dark) d'après le choix de la personne, ou d'après le système.
 *
 * Plan : 1. jetons  2. Tabler aux couleurs de la charte  3. cadre (menu, barre, fenêtres, palette)
 *        4. composants (puces, étiquettes, tuiles, état vide)  5. contenus des pages actuelles  6. petits écrans
 *        7. À traiter et la cloche  8. couleur et vie : accent du module, chiffres clés, pastilles (D49)
 *        9. l'aide : bouton « ? », panneau, pages, schémas (D51)
 *        L'apparence du cadre (menu sombre, bandeau illustré) : styles/theme.css, chargée après les feuilles des pages.
 */

/* ============ 1. Jetons ============ */
:root,
[data-bs-theme],
[data-theme] {
    --bg: light-dark(#F2F0F0, #18181A);
    --surface: light-dark(#FFFFFF, #212123);
    --sunken: light-dark(#F7F6F6, #1C1C1E);
    --ink: light-dark(#242424, #F2F0F0);
    --ink-2: light-dark(#4F4E52, #CFCDD0);
    --muted: light-dark(#6E6D72, #A09EA4);
    --line: light-dark(#E3E0E0, #333236);
    --line-2: light-dark(#CFCBCB, #47464C);
    --accent: light-dark(#386AEB, #7FA2FF);
    --accent-soft: light-dark(#E8EEFD, #1F2947);
    --accent-ink: light-dark(#FFFFFF, #0D1530);
    --ai: light-dark(#7659F1, #A894FF);
    --ai-soft: light-dark(#EFEBFE, #2A2448);
    --sel: light-dark(#ECF1FE, #232C46);
    --ok: light-dark(#1E7F4F, #5FD18C);
    --ok-soft: light-dark(#E2F3EA, #173524);
    --warn: light-dark(#9A6200, #F0B955);
    --warn-soft: light-dark(#FBF0D9, #3A2C12);
    --warn-dot: light-dark(#E3A008, #F0B955);
    --bad: light-dark(#C2341D, #FF8B7F);
    --bad-soft: light-dark(#FBE6E2, #3D1D1A);
    --shadow-pop: 0 18px 44px light-dark(rgba(36, 36, 36, .18), rgba(0, 0, 0, .55)), 0 2px 6px light-dark(rgba(36, 36, 36, .08), rgba(0, 0, 0, .4));

    /* Les dégradés de la charte, un par module. */
    --g01: linear-gradient(180deg, #C8EFF6 0%, #A6A3EE 56%, #386AEB 100%);
    --g03: linear-gradient(180deg, #52DBF5 0%, #649BF3 52%, #7659F1 100%);
    --g04: linear-gradient(180deg, #FFF5B3 0%, #FBB775 52%, #FB9576 100%);
    --g02: linear-gradient(180deg, #FFFFFF 0%, #FFF18B 50%, #FFCEA8 100%);
    --gadm: linear-gradient(180deg, #56565B 0%, #242424 100%);
    --brandline: linear-gradient(90deg, #386AEB 0%, #A6A3EE 55%, #C8EFF6 100%);

    --f-ui: "Helvetica Now Pro Display", "Segoe UI", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
    --f-mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;

    /* ============ 2. Tabler aux couleurs de la charte ============ */
    --tblr-font-sans-serif: var(--f-ui);
    --tblr-body-font-family: var(--f-ui);
    --tblr-font-monospace: var(--f-mono);
    --tblr-body-font-size: .875rem;
    --tblr-body-bg: var(--bg);
    --tblr-body-color: var(--ink);
    --tblr-emphasis-color: var(--ink);
    --tblr-heading-color: var(--ink);
    --tblr-secondary-color: var(--muted);
    --tblr-tertiary-color: var(--muted);
    --tblr-bg-surface: var(--surface);
    --tblr-bg-surface-primary: var(--surface);
    --tblr-bg-surface-secondary: var(--sunken);
    --tblr-bg-surface-tertiary: var(--sunken);
    --tblr-bg-forms: var(--surface);
    --tblr-secondary-bg: var(--sunken);
    --tblr-tertiary-bg: var(--sunken);
    --tblr-border-color: var(--line);
    --tblr-border-color-translucent: var(--line);
    --tblr-border-dark-color: var(--line-2);
    --tblr-primary: var(--accent);
    --tblr-primary-fg: var(--accent-ink);
    --tblr-primary-darken: color-mix(in oklab, var(--accent) 85%, black);
    --tblr-primary-lt: var(--accent-soft);
    --tblr-link-color: var(--accent);
    --tblr-link-hover-color: color-mix(in oklab, var(--accent) 80%, var(--ink));
    --tblr-focus-ring-color: color-mix(in oklab, var(--accent) 35%, transparent);
    --tblr-active-bg: var(--sel);
    --tblr-hover-bg: var(--sunken);
    --tblr-success: var(--ok);
    --tblr-warning: var(--warn);
    --tblr-danger: var(--bad);
    --tblr-purple: var(--ai);
    --tblr-border-radius: 8px;
    --tblr-border-radius-lg: 12px;
    --tblr-shadow-card: none;
}

/* Pont Bootstrap -> thème (D49) : Tabler 1.6 ne définit que des --tblr-* ; les styles repris de l'ancienne interface lisent
 * encore des var(--bs-*), qui seraient invalides (fonds transparents, SVG noirs, bordures en currentColor). Ces alias les
 * rattachent aux jetons ci-dessus, donc au clair et au sombre (ex-support.css du groupe A, généralisé à tout le cadre). */
.impact {
    --bs-body-bg: var(--surface);
    --bs-body-color: var(--ink);
    --bs-emphasis-color: var(--ink);
    --bs-secondary-color: var(--muted);
    --bs-tertiary-color: var(--muted);
    --bs-secondary-bg: var(--sunken);
    --bs-tertiary-bg: var(--sunken);
    --bs-border-color: var(--line);
    --bs-border-color-translucent: var(--line);
    --bs-card-bg: var(--surface);
    --bs-link-color: var(--accent);
    --bs-primary: var(--accent);
    --bs-success: var(--ok);
    --bs-warning: var(--warn);
    --bs-danger: var(--bad);
    --bs-info: var(--accent);
    --bs-purple: var(--ai);
}

html { -webkit-text-size-adjust: 100%; }
body.impact {
    margin: 0;
    font-family: var(--f-ui);
    font-size: .875rem;
    line-height: 1.5;
    background: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}
.impact :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.impact h1, .impact h2, .impact h3, .impact h4, .impact h5, .impact h6 { color: var(--ink); }
.impact .text-muted, .impact .text-secondary { color: var(--muted) !important; }
.impact .num, .impact td.num, .impact .table td { font-variant-numeric: tabular-nums; }
.impact kbd {
    font-family: var(--f-mono); font-size: 11px; padding: 1px 6px; border-radius: 5px;
    border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); box-shadow: none; white-space: nowrap;
}

/* Boutons (review A-V1, B-V2, 08/10) : l'action principale d'une page est pleine, au bleu d'Impact, une seule par écran ;
   les autres actions sont en contour (btn-outline-secondary). Le noir (btn-dark) marque la sélection d'une bascule. */
.impact .btn { border-radius: 999px; font-weight: 600; }
.impact .btn-primary {
    --tblr-btn-variant: var(--accent);
    --tblr-btn-variant-fg: var(--accent-ink);
    --tblr-btn-variant-darken: color-mix(in oklab, var(--accent) 85%, var(--ink));
    --tblr-btn-bg: var(--accent);
    --tblr-btn-color: var(--accent-ink);
    --tblr-btn-border-color: var(--accent);
    --tblr-btn-hover-bg: color-mix(in oklab, var(--accent) 85%, var(--ink));
    --tblr-btn-hover-color: var(--accent-ink);
    --tblr-btn-hover-border-color: color-mix(in oklab, var(--accent) 85%, var(--ink));
    --tblr-btn-active-bg: var(--accent);
    --tblr-btn-active-color: var(--accent-ink);
    --tblr-btn-disabled-bg: var(--accent);
    --tblr-btn-disabled-color: var(--accent-ink);
    --tblr-btn-disabled-border-color: var(--accent);
}
/* Bascule (groupe de boutons, comme .segments et .seg) : l'option choisie est remplie en noir, les autres en contour. */
.impact .btn-dark,
.impact .btn-group > .btn:is(.active, .btn-primary, [aria-current="page"], [aria-current="true"], [aria-pressed="true"]),
.impact .btn-group > .btn-check:checked + .btn {
    --tblr-btn-variant: var(--ink);
    --tblr-btn-variant-fg: var(--bg);
    --tblr-btn-variant-darken: color-mix(in oklab, var(--ink) 85%, var(--bg));
    --tblr-btn-bg: var(--ink);
    --tblr-btn-color: var(--bg);
    --tblr-btn-border-color: var(--ink);
    --tblr-btn-hover-bg: color-mix(in oklab, var(--ink) 85%, var(--bg));
    --tblr-btn-hover-color: var(--bg);
    --tblr-btn-hover-border-color: color-mix(in oklab, var(--ink) 85%, var(--bg));
    --tblr-btn-active-bg: var(--ink);
    --tblr-btn-active-color: var(--bg);
    --tblr-btn-active-border-color: var(--ink);
}
.impact .btn-outline-secondary,
.impact .btn-secondary,
.impact .btn-light,
.impact .btn-outline-primary {
    --tblr-btn-bg: var(--surface);
    --tblr-btn-color: var(--ink);
    --tblr-btn-border-color: var(--line-2);
    --tblr-btn-hover-bg: var(--surface);
    --tblr-btn-hover-color: var(--ink);
    --tblr-btn-hover-border-color: var(--ink);
    --tblr-btn-active-bg: var(--sunken);
    --tblr-btn-active-color: var(--ink);
}
.impact .btn-ghost {
    --tblr-btn-bg: transparent; --tblr-btn-border-color: transparent; --tblr-btn-color: var(--ink-2);
    --tblr-btn-hover-bg: var(--sunken); --tblr-btn-hover-border-color: transparent; --tblr-btn-hover-color: var(--ink);
}
.impact .btn .ux-ic, .impact .btn svg { width: 15px; height: 15px; }

/* Cartes, tableaux : surfaces blanches, filets fins, aucun dégradé derrière des données. */
/* Un tableau qui défile de côté garde ses enfants en position absolue (.visually-hidden d'un en-tête) : sans cela, ils
   échappaient au défilement et élargissaient toute la page (Signaux à 2 005 px pour 1 440, review B-B5). */
.impact .table-responsive { position: relative; }
/* « Aller au contenu » (review D-V1) : premier arrêt de la tabulation, visible seulement quand il a le focus. */
.impact .lien-contenu:focus { position: fixed; top: 8px; left: 8px; z-index: 2000; padding: 6px 12px; border-radius: 8px; background: var(--surface); color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .2); }
.impact .card { border-radius: 12px; border-color: var(--line); box-shadow: none; background: var(--surface); }
.impact .card-header { background: transparent; border-bottom-color: var(--line); }
.impact .table {
    --tblr-table-bg: transparent;
    --tblr-table-border-color: var(--line);
    --tblr-table-hover-bg: var(--sunken);
    --tblr-table-striped-bg: var(--sunken);
    color: var(--ink);
}
.impact .table thead th, .impact .table-light, .impact .table > thead.table-light > tr > th {
    --tblr-table-bg: var(--sunken);
    --tblr-table-color: var(--muted);
    background: var(--sunken);
    color: var(--muted);
    font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 600;
    border-color: var(--line);
}
/* Tableau à largeurs fixes (table-layout: fixed, ex. Renouvellements, Mes suivis) : un en-tête plus large que sa colonne
   passe à la ligne au lieu de déborder sur la voisine (review C-B3). */
.impact .table-fixe thead th { white-space: normal; overflow-wrap: anywhere; hyphens: auto; vertical-align: bottom; }
.impact .dropdown-menu { border-color: var(--line); box-shadow: var(--shadow-pop); border-radius: 12px; }
.impact .dropdown-item.active, .impact .dropdown-item:active { background: var(--sel); color: var(--ink); }
.impact .alert { border-radius: 12px; }
.impact .badge.bg-secondary { background: var(--line) !important; color: var(--ink-2) !important; }
.impact .form-control, .impact .form-select { border-color: var(--line-2); }
/* Tabler donne à .form-control-sm une ligne de 1rem (28 px de haut) et laisse .form-select-sm à 1.43 (32 px) : côte à
   côte, une liste et un champ n'avaient pas la même hauteur et, alignés en bas, leurs libellés étaient décalés (29/10). */
.impact .form-select-sm { line-height: 1rem; }
/* Un <fieldset> (pour tout désactiver d'un coup) entre une .row et ses colonnes : .fieldset-row le retire de la mise en
   page et rend à ses enfants la gouttière que Bootstrap ne donne qu'aux enfants directs (.row > *) ; sans elle, champs
   et boutons se touchaient (29/10). La largeur sans spécificité laisse les .col-* la régler. */
.row > .fieldset-row { display: contents; }
.row > .fieldset-row > * { padding-right: calc(var(--tblr-gutter-x) * .5); padding-left: calc(var(--tblr-gutter-x) * .5); margin-top: var(--tblr-gutter-y); }
:where(.row > .fieldset-row > *) { flex-shrink: 0; width: 100%; max-width: 100%; }
/* Choix d'une personne (people/_choix_personne) dans un bloc .champ-personne : la largeur d'un nom ou d'une adresse,
   pas celle de la colonne ; l'aide sous le champ garde la largeur du bloc. */
.champ-personne [data-controller="autocompletion"] { min-width: 14rem; max-width: 20rem; }

/* ============ 3. Le cadre ============ */
/* Hauteurs de la ligne de marque et de la barre du haut, toutes deux collantes. C'est le document qui défile : son
   scroll-padding-top fait arriver un lien vers une ancre (#droit-…, #section, scrollIntoView) juste sous la barre au lieu
   de derrière, pour toutes les pages ; pas de scroll-margin-top par page, les deux s'additionneraient (12/10,
   docs/impact/pages-compatibles.md § En bref). Mode télé : ni ligne ni barre, il ne reste que la marge. */
:root { --cadre-ligne: 2px; --cadre-barre: 54px; --cadre-ancre-marge: 12px; }
html { scroll-padding-top: calc(var(--cadre-ligne) + var(--cadre-barre) + var(--cadre-ancre-marge)); }
html:has(> body.impact--tele) { scroll-padding-top: var(--cadre-ancre-marge); }

.brandline { height: var(--cadre-ligne); background: var(--brandline); position: sticky; top: 0; z-index: 40; }

.impact-app {
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    min-height: calc(100vh - var(--cadre-ligne));
    min-height: calc(100dvh - var(--cadre-ligne));
}

/* Menu latéral */
.side {
    position: sticky; top: var(--cadre-ligne); height: calc(100vh - var(--cadre-ligne)); height: calc(100dvh - var(--cadre-ligne));
    background: var(--bg); border-right: 1px solid var(--line);
    display: flex; flex-direction: column; min-width: 0; z-index: 30;
}
.side-top { display: flex; align-items: center; gap: 10px; padding: 16px 16px 6px; text-decoration: none; color: var(--ink); }
.side-top:hover { color: var(--ink); text-decoration: none; }
.side-top img { height: 22px; width: auto; }
[data-bs-theme="dark"] .side-top img:not(.logo-impact) { filter: invert(1) brightness(1.1); }
.side-top .prod { font-size: 15px; font-weight: 700; border-left: 1px solid var(--line-2); padding-left: 10px; line-height: 1.1; letter-spacing: -.01em; }

.modsw {
    margin: 8px 10px 6px; display: flex; align-items: center; gap: 10px; padding: 7px 8px; width: calc(100% - 20px);
    border-radius: 11px; border: 1px solid var(--line); background: var(--surface); cursor: pointer;
    color: inherit; text-align: left; font-size: 13.5px;
}
.modsw:hover, .modsw[aria-expanded="true"] { border-color: var(--line-2); box-shadow: 0 1px 2px rgba(36, 36, 36, .06); }
.modsw .tile { width: 30px; height: 30px; border-radius: 9px; }
.modsw .tile svg { width: 17px; height: 17px; }
.modsw .tx { min-width: 0; flex: 1; }
.modsw b { display: block; font-size: 13.5px; }
.modsw small { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modsw .chev { color: var(--muted); width: 16px; height: 16px; flex: none; }

.snav { flex: 1; overflow-y: auto; padding: 4px 10px 10px; display: flex; flex-direction: column; gap: 1px; min-height: 0; }
/* « À traiter », commun à tous les modules, au-dessus du sélecteur (review A-L4) : ne prend que sa hauteur. */
.snav.snav-commun { flex: none; overflow: visible; padding-bottom: 4px; }
.side-plus { display: none; } /* Nouveautés et Idées dans le menu : téléphone seulement (section 7) */
.nsep { border: 0; border-top: 1px solid var(--line); margin: 10px 10px 6px; opacity: 1; } /* au-dessus de « Documentation du module » */
.nsec { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 14px 10px 4px; }
a.nsec-lien { display: block; text-decoration: none; }
a.nsec-lien:hover, a.nsec-lien[aria-current] { text-decoration: underline; }
.ni {
    display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 8px; color: var(--ink-2);
    text-decoration: none; font-size: 13.5px; min-height: 32px; line-height: 1.3;
}
.ni svg { width: 18px; height: 18px; flex: none; color: var(--ink-2); }
.ni .lb { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.ni:hover { background: var(--surface); color: var(--ink); text-decoration: none; }
.ni[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(36, 36, 36, .07), 0 0 0 1px var(--line); }
.ni[aria-current="page"] svg { color: var(--ink); }
.ni.off { color: var(--muted); cursor: default; }
.ni.off svg { color: var(--muted); }
.ni .ext { width: 13px; height: 13px; color: var(--muted); }
/* « Mes pages » (docs/impact/mes-pages.md) : section repliable en haut du menu (chevron à droite), étoile du titre. */
/* Hauteur de son contenu (pas flex: 1 de .snav, qui la faisait occuper la moitié du menu) ; longue liste : défilement. */
.snav.mes-pages { flex: none; max-height: 40vh; padding-bottom: 4px; }
.mes-pages > summary { list-style: none; cursor: pointer; display: flex; align-items: center; border-radius: 4px; }
.mes-pages > summary::-webkit-details-marker { display: none; }
.mes-pages > summary::after { content: ''; width: 6px; height: 6px; margin: 0 4px 0 auto; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.mes-pages[open] > summary::after { transform: rotate(45deg); }
.mes-pages > summary:hover { color: var(--v-menu-encre, var(--ink)); }
.mes-pages > summary:focus-visible { outline: 2px solid var(--tblr-primary); outline-offset: -2px; }
.ni .mp-pin { color: var(--tblr-yellow); opacity: .8; }
.mp-etoile { display: inline; margin: 0; }
.mp-etoile-btn.on { color: var(--tblr-yellow); }
.soon { font-size: 10px; font-weight: 600; padding: 0 6px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }

.side-foot { border-top: 1px solid var(--line); padding: 10px 12px; display: flex; align-items: center; gap: 10px; }
.side-foot .who { min-width: 0; flex: 1; }
.side-foot .who b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .who span { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; color: #242424; flex: none; letter-spacing: .02em; background: #B3F1FE; }

/* Barre du haut */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
    position: sticky; top: var(--cadre-ligne); z-index: 20; height: var(--cadre-barre); flex: none; display: flex; align-items: center; gap: 10px;
    padding-inline: 16px 12px; border-bottom: 1px solid var(--line); background: var(--surface);
}
.burger { display: none !important; }
/* Fil d'Ariane long (docs/impact/fil-ariane.md) : chaque niveau est coupé par « … », sans retour à la ligne (libellé
   complet en title au survol, fil_ariane_controller.js). Un niveau intermédiaire plafonne à 180px ; « Impact » ne se
   coupe pas ; le dernier niveau prend toute la place qui reste. Si elle manque, le dernier cède d'abord jusqu'à 6em,
   puis les intermédiaires longs jusqu'à 6em (planchers « contenu ou 6em » par calc-size ; sans calc-size, seul le
   dernier cède). Sous 760px, seul le dernier niveau reste. La recherche garde sa largeur minimale. */
.crumbs { flex: 0 1 auto; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; white-space: nowrap; min-width: 0; overflow: clip; overflow-clip-margin: 4px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs svg { width: 14px; height: 14px; flex: none; }
.crumbs > :is(a, b, span:not([aria-hidden])) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs > :is(a, span:not([aria-hidden])) { flex: 0 0 auto; max-width: 180px; }
.crumbs > b { flex: 0 1 auto; min-width: 0; color: var(--ink); font-weight: 600; }
@supports (min-width: calc-size(max-content, size)) {
    .crumbs > :is(a, span:not([aria-hidden])):not(:first-child) { flex-shrink: 1; min-width: calc-size(max-content, min(size, 6em)); }
    .crumbs > b { flex-shrink: 1000; min-width: calc-size(max-content, min(size, 6em)); }
}
@media (max-width: 760px) { .crumbs > :not(:last-child) { display: none; } }
.srch {
    flex: 1; max-width: 430px; margin-inline: auto; display: flex; align-items: center; gap: 8px; height: 34px;
    padding: 0 7px 0 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--sunken);
    color: var(--muted); font-size: 13px; cursor: text; text-align: left; min-width: clamp(140px, 15vw, 240px);
}
.srch:hover { border-color: var(--line-2); }
.srch svg { width: 16px; height: 16px; flex: none; }
.srch .ph { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tact { display: flex; align-items: center; gap: 2px; flex: none; }
.ib {
    position: relative; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
    border: 0; background: none; color: var(--ink-2); cursor: pointer; flex: none; padding: 0;
}
.ib:hover, .ib[aria-expanded="true"] { background: var(--sunken); color: var(--ink); }
.ib svg { width: 19px; height: 19px; }
.ib::after { display: none !important; }
.avbtn { border: 0; padding: 2px; margin-left: 4px; background: none; cursor: pointer; border-radius: 50%; }
.avbtn::after { display: none !important; }
.avbtn[aria-expanded="true"] { box-shadow: 0 0 0 2px var(--accent); }

/* Contenu */
.view { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.phead { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px 14px; padding: 20px 24px 12px; flex-wrap: wrap; }
.phead h1 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; margin: 0; line-height: 1.25; }
.phead p { color: var(--muted); font-size: 13px; margin: 2px 0 0; max-width: 90ch; }
.pact { display: flex; gap: 6px; flex-wrap: wrap; }
.pbody { padding: 4px 24px 24px; flex: 1; min-width: 0; }
.pfoot { padding: 14px 24px 18px; font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; }
.bandeau-agent { margin: 14px 24px 0; }

/* Fenêtres flottantes (menus Bootstrap de Tabler) */
.pop { padding: 0; overflow: hidden; }
.pop-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.pop-h b { font-size: 14px; }
.pop-f { padding: 9px 14px; font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.pop-mod { width: min(430px, calc(100vw - 20px)); }
.mlist { display: flex; flex-direction: column; padding: 6px; }
.mopt { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; color: inherit; text-decoration: none; }
a.mopt:hover, .mopt[aria-current="true"] { background: var(--sunken); color: inherit; text-decoration: none; }
.mopt.off { opacity: .55; cursor: default; }
.mopt .tx { flex: 1; min-width: 0; }
.mopt b { display: block; font-size: 13.5px; }
.mopt .d { display: block; font-size: 12px; color: var(--muted); }
.mopt .ck { color: var(--accent); width: 18px; height: 18px; }
.pop-bell { width: min(390px, calc(100vw - 24px)); }
.pop-vide { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 28px 22px; color: var(--ink-2); }
.pop-vide b { color: var(--ink); }
/* Assez large pour « Animations » et ses trois choix (« Aucune » sortait du menu, recette du 09/10), jamais plus que l’écran. */
.pop-av { width: min(340px, calc(100vw - 16px)); }
.pop-av .me { display: flex; gap: 10px; align-items: center; padding: 14px; border-bottom: 1px solid var(--line); min-width: 0; }
.pop-av .me > span:last-child { min-width: 0; }
.pop-av .me b { display: block; font-size: 13.5px; }
.pop-av .me small { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.opt-l { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 14px; font-size: 13px; border-bottom: 1px solid var(--line); margin: 0; }
.opt-l .aide { display: block; font-size: 11.5px; color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; flex: none; }
.seg button { font-size: 12px; padding: 4px 9px; border: 0; background: var(--surface); color: var(--ink-2); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line-2); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.switch { width: 34px; height: 20px; border-radius: 999px; border: 0; background: var(--line-2); position: relative; cursor: pointer; flex: none; padding: 0; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch[aria-checked="true"] { background: var(--ok); }
.switch[aria-checked="true"]::after { transform: translateX(14px); }
.menu-i { display: flex; align-items: center; gap: 10px; padding: 9px 14px; font-size: 13px; border: 0; background: none; width: 100%; text-align: left; color: var(--ink); cursor: pointer; }
.menu-i:hover { background: var(--sunken); }
.menu-i svg { width: 16px; height: 16px; color: var(--ink-2); }

/* Palette de recherche (Ctrl K) */
.pal-back { position: fixed; inset: 0; z-index: 1080; background: rgba(24, 24, 26, .34); display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; }
.pal-back[hidden] { display: none; }
.pal { width: min(620px, calc(100% - 24px)); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-pop); overflow: hidden; display: flex; flex-direction: column; max-height: 70vh; }
.pal-in { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.pal-in svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.pal-in input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 16px; color: var(--ink); }
.pal-in input::placeholder { color: var(--muted); }
.pal-in input:focus, .pal-in input:focus-visible { outline: none; box-shadow: none; }
.pal-res { overflow-y: auto; padding: 6px; }
.pg { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 8px 10px 4px; }
.pi { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 9px; cursor: pointer; color: var(--ink); text-decoration: none; }
.pi:hover { color: var(--ink); text-decoration: none; }
.pi[aria-selected="true"] { background: var(--sel); }
.pi svg { width: 18px; height: 18px; color: var(--ink-2); }
.pi .pl { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pi .pl b { font-weight: 600; font-size: 13.5px; }
.pi .pl span { color: var(--muted); font-size: 12.5px; margin-left: 8px; }
.pi .hint { font-size: 11px; color: var(--muted); visibility: hidden; }
.pi[aria-selected="true"] .hint { visibility: visible; }
.pal-none { padding: 22px 14px; color: var(--muted); font-size: 13px; text-align: center; }
/* Curiosité c1 « 42 » (I9.10, docs/impact/curiosites.md) : une main d'auto-stoppeur (pouce vers la route) qui se balance à l'apparition. */
.pal-42 { grid-template-columns: 40px minmax(0, 1fr) auto; margin-bottom: 4px; padding: 10px 12px; border: 1px dashed var(--line); }
.pal-42[hidden] { display: none; }
.pal-42-main { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--sel); }
.pi .pal-42-main svg { width: 24px; height: 24px; color: var(--ink); transform: rotate(250deg); transform-origin: 50% 70%; animation: pal-42-stop 1.6s ease-in-out 2; }
.pal-42-txt { min-width: 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pal-42-txt b { font-size: 22px; font-weight: 700; line-height: 1; }
.pal-42-txt > span { color: var(--muted); font-size: 12.5px; }
.pal-42-txt strong { color: var(--ink); font-weight: 600; }
@keyframes pal-42-stop { 0%, 100% { transform: rotate(250deg); } 30% { transform: rotate(230deg); } 60% { transform: rotate(260deg); } }
@media (prefers-reduced-motion: reduce) { .pi .pal-42-main svg { animation: none; } }

/* Curiosités (docs/impact/curiosites.md) : toast et toiles posés par curiosites_controller.js. */
.cu-toast {
    position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 2000; background: #242424; color: #F2F0F0;
    padding: 10px 16px; border-radius: 11px; font-size: 13px; box-shadow: var(--shadow-pop); max-width: calc(100vw - 32px); border: 1px solid #47464C;
}
.cu-toile { position: fixed; inset: 0; z-index: 1990; pointer-events: none; }
.cu-pluie { pointer-events: auto; cursor: pointer; }

.pal-etat { display: flex; align-items: center; gap: 8px; margin: 4px 10px 6px; color: var(--muted); font-size: 12.5px; }
.pal-etat[hidden] { display: none; }
.pal-etat svg { width: 15px; height: 15px; flex: none; }
.pal-f { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }

.scrim { display: none; }

/* ============ 4. Composants ============ */
.tile { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; color: #242424; }
.tile svg { width: 20px; height: 20px; }
.t-sup { background: var(--g01); }
.t-ana { background: var(--g03); }
.t-cli { background: var(--g04); }
.t-com { background: var(--g02); box-shadow: inset 0 0 0 1px rgba(36, 36, 36, .1); }
.t-wik { background: linear-gradient(180deg, #E6F8EC 0%, #9FE2B8 55%, #3BB57C 100%); }
.t-doc { background: linear-gradient(180deg, #C9F2EE 0%, #7FC8E8 52%, #3F86D9 100%); }
.t-cnf { background: linear-gradient(180deg, #FFE9F0 0%, #F4A9C0 52%, #C2457A 100%); }
.t-srv { background: linear-gradient(180deg, #FFF3D6 0%, #F6C86B 52%, #D98A1C 100%); }
.t-fin { background: linear-gradient(180deg, #E4F1FB 0%, #8FC1E8 52%, #2C6FA8 100%); }
.t-pro { background: linear-gradient(180deg, #EEE8FF 0%, #BBA6F5 52%, #6E4BD8 100%); }
.t-exc { background: linear-gradient(180deg, #E3E8F4 0%, #8FA3CF 52%, #2F4A8A 100%); }
.t-aca { background: linear-gradient(180deg, #E2F6EC 0%, #84D2AE 52%, #1F8A5B 100%); }
/* Tuile neutre : pages transverses (À traiter, recherche avancée), sans couleur de module. */
.t-neu { background: light-dark(#ECEBEB, #2C2B30); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
/* Administration : dégradé gris clair à trois teintes, comme les autres modules (A-V4) ; un contour léger le détache du fond. */
.t-adm { background: linear-gradient(180deg, #F2F0F0 0%, #C9C7D2 52%, #8B8899 100%); box-shadow: inset 0 0 0 1px rgba(36, 36, 36, .1); }

/* Puces de solution : toujours le nom en toutes lettres (composant Solution). */
.sol { display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 999px; color: #242424; white-space: nowrap; line-height: 1.5; }
.sol-crm { background: #B3F1FE; }
.sol-net { background: #CF8AFD; }
.sol-gx { background: #FBB28A; }

/* Gravité */
.sevc { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; line-height: 1.4; }
.sevc::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.sevc.haute { background: var(--bad-soft); color: var(--bad); }
.sevc.moyenne { background: var(--warn-soft); color: var(--warn); }
.sevc.info { background: var(--accent-soft); color: var(--accent); }

/* Ce que produit une IA : violet et mention « IA » (AI Act, art. 50). */
/* vertical-align: middle (10/10) : la ligne de base d'un inline-flex est le bas de son icône, la mention montait de 3 px
   au-dessus du texte ; centrée sur le texte comme une pastille. Sans effet dans un parent flex. */
.aitag { font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--ai-soft); color: var(--ai); display: inline-flex; align-items: center; gap: 3px; vertical-align: middle; white-space: nowrap; line-height: 1.5; }
.aitag svg { width: 11px; height: 11px; }
/* L'encadré « Résumé IA » (I9.6, templates/components/ResumeIa.html.twig) : trois lignes, liseré violet de l'IA. */
.ria { max-width: 34rem; margin: 0 0 1rem; padding: .55rem .8rem .6rem; border: 1px solid var(--tblr-border-color); border-left: 3px solid var(--ai); border-radius: 6px; background: var(--ai-soft); font-size: .875rem; line-height: 1.45; }
.ria-repli { border-left-color: var(--tblr-border-color); background: transparent; }
.ria-tete { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-bottom: .25rem; color: var(--tblr-secondary); font-size: .8rem; }
.ria-titre { font-weight: 600; color: var(--tblr-body-color); }
.ria-marque { display: inline-flex; align-items: center; gap: 3px; padding: 0 6px; border-radius: 999px; background: var(--tblr-warning-lt); color: var(--tblr-warning-text, var(--tblr-body-color)); cursor: help; }
.ria-marque svg { width: 12px; height: 12px; }
.ria-perime .ria-lignes { opacity: .8; }
.ria-lignes { margin: 0; padding-left: 1.1rem; }
.ria-lignes li + li { margin-top: .1rem; }
/* Bulle d'un agent (templates/components/BulleAgent.html.twig, agent-triage 10/10) : photo, nom, bulle qui pointe vers la photo. */
.bulle-agent { display: flex; align-items: flex-start; gap: .7rem; width: 100%; margin: 0 0 1rem; }
.bulle-agent .ba-photo { flex: none; width: 48px; height: 48px; border-radius: 50%; box-shadow: 0 0 0 2px var(--tblr-bg-surface), 0 0 0 3px var(--tblr-border-color); }
.bulle-agent .ba-corps { flex: 1 1 auto; min-width: 0; }
/* La photo d'un agent actif (bulle d'un agent, « proposé par ») : sa fiche d'identité au survol ou au focus clavier,
   un clic mène à /ai-agents/<code> (templates/ai_agents/_carte.html.twig). */
.ba-identite { position: relative; flex: none; display: inline-block; vertical-align: middle; border-radius: 50%; color: inherit; text-decoration: none; }
.ba-identite:focus-visible { outline: 2px solid var(--tblr-primary); outline-offset: 2px; }
.ba-carte { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; display: none; gap: .75rem; align-items: flex-start;
    width: 18rem; padding: .75rem; border: 1px solid var(--tblr-border-color); border-radius: 12px; background: var(--tblr-bg-surface);
    box-shadow: var(--tblr-box-shadow-dropdown); font-size: .8125rem; font-weight: 400; line-height: 1.4; text-align: left; white-space: normal; color: var(--tblr-body-color); }
.ba-identite:hover .ba-carte, .ba-identite:focus-visible .ba-carte { display: flex; }
.ba-carte img { flex: none; width: 64px; height: 64px; border-radius: 50%; }
.ba-carte-corps { display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; min-width: 0; }
.ba-carte-corps strong { font-size: .9375rem; }
.ba-carte-role, .ba-carte-precision { color: var(--tblr-secondary); }
.ba-carte-lien { margin-top: .15rem; color: var(--tblr-primary); font-weight: 500; }
/* « Proposé par » (<twig:AgentIa>) : photo 16 px + mention IA d'un seul tenant (pas de retour à la ligne entre les deux,
   survol sur l'ensemble). vertical-align: middle : centré sur le texte de la ligne comme une pastille ; la ligne de base
   d'un inline-flex est le bas de la photo, le groupe montait au-dessus du texte (10/10). */
.agent-ia { display: inline-flex; align-items: center; gap: 3px; margin: 0 2px; vertical-align: middle; white-space: nowrap; border-radius: 999px; }
.agent-ia .ba-photo-mini { display: block; flex: none; width: 16px; height: 16px; border-radius: 50%; }
.bulle-agent .ba-nom { display: block; margin: 0 0 .15rem .55rem; font-size: .75rem; font-weight: 600; line-height: 1.2; color: var(--tblr-secondary); }
.bulle-agent .ba-bulle { position: relative; padding: .4rem .8rem; border: 1px solid var(--tblr-border-color); border-radius: 10px; background: var(--tblr-bg-surface); color: var(--tblr-body-color); font-size: .875rem; line-height: 1.45; }
.bulle-agent .ba-bulle::before, .bulle-agent .ba-bulle::after { content: ""; position: absolute; border-style: solid; border-color: transparent; }
.bulle-agent .ba-bulle::before { top: 7px; left: -9px; border-width: 7px 8px 7px 0; border-right-color: var(--tblr-border-color); }
.bulle-agent .ba-bulle::after { top: 8px; left: -7px; border-width: 6px 7px 6px 0; border-right-color: var(--tblr-bg-surface); }
.why-ai { background: var(--ai-soft); border-radius: 12px; padding: 11px 14px; display: flex; flex-direction: column; gap: 5px; }
.why-ai .lbl { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ai); font-weight: 600; }

/* État (point de couleur) */
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; }
.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st.ok { color: var(--ok); } .st.warn { color: var(--warn); } .st.bad { color: var(--bad); }

/* Compteur */
.cnt { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--line); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.cnt.hot { background: var(--accent); color: var(--accent-ink); }
.cnt.bad { background: var(--bad-soft); color: var(--bad); }

/* État vide */
/* height: auto : Tabler pose `.empty { height: 100% }` ; dans .pbody (hauteur définie par le flex de .view), un état vide
   suivi d'autres blocs prenait toute la hauteur de la page et repoussait la suite sous le pied (Vue 360 sans action, 08/10). */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 40px 24px; color: var(--ink-2); height: auto; }
.empty .tile { width: 52px; height: 52px; border-radius: 16px; }
.empty .tile svg { width: 26px; height: 26px; }
.empty b { color: var(--ink); font-size: 15px; }

/* Encadré neutre */
.note-box { display: flex; gap: 12px; align-items: flex-start; background: var(--sunken); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 13px; color: var(--ink-2); }

/* Cartes d'entrée (accueil) */
.entrees { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.entree { position: relative; display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; min-width: 0; transition: border-color .15s, box-shadow .15s; }
.entree:hover, .entree:focus-within { border-color: var(--line-2); box-shadow: 0 1px 2px rgba(36, 36, 36, .06); }
.entree > svg { width: 22px; height: 22px; color: var(--ink-2); flex: none; margin-top: 1px; }
.entree .tx { min-width: 0; }
.entree b { display: block; font-size: 14px; font-weight: 600; color: var(--ink); }
.entree p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.entree a.couvre { position: absolute; inset: 0; border-radius: 12px; }
.entree.off { background: var(--sunken); }
.entree.off b { color: var(--muted); }
.module-tete { display: flex; align-items: center; gap: 12px; margin: 28px 0 12px; }
.module-tete:first-child { margin-top: 8px; }
.module-tete h2 { font-size: 16px; font-weight: 700; margin: 0; }
.module-tete p { margin: 0; font-size: 12.5px; color: var(--muted); }
.aussi { margin-top: 10px; font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.aussi a { color: var(--ink-2); }

/* ============ 5. Contenus des pages actuelles dans le cadre ============ */
.pbody .card-body { color: var(--ink); }
.pbody .tuile-kpi { border-color: var(--line); }

/* ============ 6. Petits écrans ============ */
@media (max-width: 940px) {
    .impact-app { grid-template-columns: minmax(0, 1fr); }
    .side { position: fixed; inset: 2px auto 0 0; width: 268px; height: auto; transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow-pop); z-index: 1050; }
    .impact-app.nav-open .side { transform: none; }
    .impact-app.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 1040; background: rgba(24, 24, 26, .3); }
    .burger { display: grid !important; }
}
@media (max-width: 620px) {
    .srch { flex: 0 0 34px; width: 34px; min-width: 0; padding: 0; justify-content: center; margin-inline: auto 0; }
    .srch .ph, .srch kbd { display: none; }
    .phead { padding: 14px 16px 8px; }
    .phead h1 { font-size: 18px; }
    .pbody { padding: 4px 16px 20px; }
    .pfoot { padding-inline: 16px; }
}
/* ============ 7. À traiter et la cloche (maquette validée du 05/10) ============ */
.ib .bell-n {
    position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
    background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
    box-shadow: 0 0 0 2px var(--surface); font-variant-numeric: tabular-nums;
}
.ib .bell-n[hidden] { display: none; }
.ni .cnt[hidden] { display: none; }
/* « À traiter » : « pour moi · équipe » dans une seule pastille (06/10) ; le zéro « pour moi » s'efface. */
.cnt-duo { white-space: nowrap; }
/* Le nombre de l'équipe derrière une petite icône « équipe » (review A-L5) : sans la visite, on sait lequel est le sien. */
.cnt-duo .sep { margin: 0 2px 0 4px; opacity: .75; }
.cnt-duo .cnt-equipe { width: 11px; height: 11px; vertical-align: -1.5px; }
.cnt-duo [hidden] { display: none; }
.cnt-duo:not(.hot) [data-n="moi"] { opacity: .6; }
/* Nouveautés et Idées dans la barre (06/10) : un point discret, pas un nombre (le badge reste à la cloche). */
.ib-groupe { display: flex; align-items: center; gap: 2px; }
.ib[aria-current="page"] { background: var(--sunken); color: var(--mod-fort, var(--accent)); }
.ib .ib-point {
    position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border-radius: 50%;
    background: var(--accent); box-shadow: 0 0 0 2px var(--surface);
}
/* « Tous les modules » en tête du sélecteur, séparé des modules par un trait. */
.mopt-tous .tile { background: var(--sunken); color: var(--ink-2); }
.msep { border: 0; border-top: 1px solid var(--line); margin: 4px 8px; opacity: 1; }
/* Sélecteur en grille (ModulesCatalog::GRILLE_DES modules ou plus) : trois colonnes, dans l'ordre du sélecteur
   (transverses, équipes, puis Wiki, Documents et Administration après un trait) ; sur téléphone, une colonne. */
.mgrp { display: flex; flex-direction: column; }
.pop-mod[data-grille] { width: min(720px, calc(100vw - 20px)); }
.pop-mod[data-grille] .mgrp { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 6px; }
@media (max-width: 620px) {
    .pop-mod[data-grille] .mgrp { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
    .ib-groupe { display: none; }
    .side-plus { display: flex; flex-direction: column; gap: 1px; padding: 6px 10px; border-top: 1px solid var(--line); }
}
.linkbtn { border: 0; background: none; padding: 0; color: var(--accent); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }
.pop-bell .nl { max-height: min(420px, 60vh); overflow-y: auto; }
.nitem { display: grid; grid-template-columns: 28px minmax(0, 1fr) 8px; gap: 10px; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--line); align-items: start; cursor: pointer; background: none; text-align: left; width: 100%; color: inherit; font: inherit; }
.nitem:hover, .nitem:focus-visible { background: var(--sunken); }
.nitem .tile { width: 28px; height: 28px; border-radius: 8px; }
.nitem .tile svg { width: 16px; height: 16px; }
.nitem .nt { display: block; font-size: 13px; line-height: 1.4; }
.nitem time { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.nitem .u { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 6px; }
.nitem.read .u { visibility: hidden; }
.nitem.read .nt { color: var(--ink-2); }
.pop-bell .pop-f a { font-weight: 600; text-decoration: none; }

/* La page : onglets, puces, liste et détail côte à côte. */
.inbox {
    display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
    height: calc(100vh - 186px); height: calc(100dvh - 186px); min-height: 480px; overflow: hidden; position: relative;
}
.inbox .tabs { display: flex; gap: 2px; padding-inline: 14px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; flex: none; }
.inbox .tab { font-size: 13px; padding: 10px 8px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; display: flex; gap: 6px; align-items: center; margin-bottom: -1px; text-decoration: none; }
.inbox .tab:hover { color: var(--ink); text-decoration: none; }
.inbox .tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.inbox .tab .c { font-size: 10.5px; padding: 0 6px; border-radius: 999px; background: var(--sunken); border: 1px solid var(--line); color: var(--ink-2); font-weight: 700; font-variant-numeric: tabular-nums; }
.inbox .fchips { display: flex; gap: 6px; padding: 9px 16px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); flex: none; }
.inbox .fc { font-size: 12px; padding: 3px 10px 3px 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; text-decoration: none; }
.inbox .fc.all { padding-left: 10px; }
.inbox .fc .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.inbox .fc:hover { border-color: var(--line-2); color: var(--ink); text-decoration: none; }
.inbox .fc[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.inbox .fc[aria-pressed="true"] .n { color: inherit; opacity: .75; }
.mt { width: 14px; height: 14px; border-radius: 4px; flex: none; display: inline-block; }
.inbox .fc .mt { width: 16px; height: 16px; border-radius: 5px; }
.inbox .split { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
.inbox .list { overflow-y: auto; border-right: 1px solid var(--line); min-height: 0; outline: none; }
.inbox .list:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.inbox .grp { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 12px 16px 6px; position: sticky; top: 0; background: var(--surface); z-index: 1; display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); }
.inbox .row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 3px 10px; padding: 10px 14px 10px 16px; border-bottom: 1px solid var(--line); align-items: start; color: var(--ink); text-decoration: none; }
.inbox .row:hover { background: var(--sunken); color: var(--ink); text-decoration: none; }
.inbox .row[aria-selected="true"] { background: var(--sel); }
.inbox .row .sev { grid-column: 1; grid-row: 1; width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; }
.sev.haute { background: var(--bad); }
.sev.moyenne { background: var(--warn-dot); }
.sev.info { background: var(--accent); }
.inbox .row .t { grid-column: 2; grid-row: 1; font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox .row .t .encore { font-size: 10.5px; font-weight: 700; color: var(--warn); background: var(--warn-soft); border-radius: 999px; padding: 1px 6px; }
.inbox .row .m { grid-column: 2; grid-row: 2; font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; min-width: 0; white-space: nowrap; }
.inbox .row .m .o { overflow: hidden; text-overflow: ellipsis; }
.inbox .row .r { grid-column: 3; grid-row: 1 / span 2; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.inbox .due { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.inbox .due.late { color: var(--bad); font-weight: 600; }
.av.sm { width: 22px; height: 22px; font-size: 9px; }
.av.moi { background: #B3F1FE; }
.av.sm:not(.moi):not(.none) { background: #CF8AFD; }
.av.none { background: transparent; border: 1.5px dashed var(--line-2); color: var(--muted); }

.inbox .detail { overflow-y: auto; min-height: 0; padding: 18px 22px 26px; background: var(--surface); }
.inbox .detail[aria-busy="true"] { opacity: .6; }
.inbox .detail-in { display: flex; flex-direction: column; gap: 15px; }
.inbox .detail .back { display: none; align-self: flex-start; }
.inbox .dh { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.inbox .dh .src { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-2); font-weight: 600; margin-right: 4px; }
.inbox .dh .src .mt { width: 17px; height: 17px; border-radius: 5px; }
.inbox .dt { font-size: 18px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; margin: 0; }
.inbox .dsub { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.inbox .why { background: var(--sunken); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; display: flex; flex-direction: column; gap: 5px; }
.inbox .why p { margin: 0; }
.inbox .why .lbl, .inbox .hist .lbl { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.inbox .kv { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 5px 12px; font-size: 13px; margin: 0; }
.inbox .kv dt { color: var(--muted); font-weight: 400; }
.inbox .kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; white-space: pre-line; }
.inbox .links { display: flex; flex-wrap: wrap; gap: 6px; }
.inbox .lk { font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--accent); text-decoration: none; }
.inbox .lk:hover { border-color: var(--accent); text-decoration: none; }
.inbox .lk svg { width: 14px; height: 14px; }
.inbox .acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border-top: 1px solid var(--line); padding-top: 14px; }
.inbox .acts .btn { display: inline-flex; align-items: center; gap: 6px; }
.inbox .acts .hint { font-size: 11.5px; color: var(--muted); margin-left: auto; }
.inbox .mini { min-width: 220px; padding: 4px; }
.inbox .mini-long { max-height: 300px; overflow-y: auto; }
.inbox .mini .mh { display: block; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 6px 10px 4px; }
.inbox .mini .dropdown-item { border-radius: 7px; font-size: 12.5px; padding: 7px 10px; }
.inbox .mini small { color: var(--muted); }
.inbox .hist { display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; color: var(--ink-2); }
.inbox .hist .h { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 8px; }
.inbox .hist .h i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); margin-top: 6px; }
.inbox .hist .h:first-of-type i { background: var(--ink-2); }
.inbox .hist time { color: var(--muted); }
.inbox .empty { height: 100%; }

.inbox-toast {
    position: fixed; left: 264px; bottom: 18px; z-index: 1060; display: flex; align-items: center; gap: 14px; background: #242424; color: #F2F0F0;
    padding: 10px 12px 10px 14px; border-radius: 11px; font-size: 13px; box-shadow: var(--shadow-pop); max-width: calc(100vw - 32px); border: 1px solid #47464C;
}
.inbox-toast[hidden] { display: none; }
.inbox-toast svg { width: 16px; height: 16px; color: #7FD6A4; flex: none; }
.inbox-toast.erreur svg { color: #FF8B7F; }
.inbox-toast button { font-size: 13px; font-weight: 600; color: #A9C1FF; background: none; border: 0; cursor: pointer; padding: 2px 4px; white-space: nowrap; }

@media (max-width: 1040px) {
    .inbox .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .inbox .acts .hint { display: none; }
}
@media (max-width: 940px) {
    .inbox { height: calc(100vh - 160px); height: calc(100dvh - 160px); }
    .inbox .split { grid-template-columns: minmax(0, 1fr); }
    .inbox .list { border-right: 0; }
    .inbox .detail { display: none; position: absolute; inset: 0; z-index: 14; }
    .inbox.detail-ouvert .detail { display: block; }
    .inbox .detail .back { display: inline-flex; align-items: center; gap: 4px; }
    .inbox-toast { left: 16px; }
}
@media (max-width: 620px) {
    .inbox { border-radius: 10px; height: calc(100vh - 140px); height: calc(100dvh - 140px); }
    .inbox .fchips { padding-inline: 12px; }
    .inbox .row { padding-inline: 12px; }
    .inbox .detail { padding: 14px 16px 22px; }
    .inbox .kv { grid-template-columns: minmax(0, 1fr); }
    .inbox .kv dt { margin-top: 4px; }
}

/* ============ 8. Couleur et vie (D49) ============ */
/* L'accent du module : <body data-module="…"> (le cadre le pose d'après le menu ou le bloc `module` de la page).
 * --mod-g      dégradé de la charte (tuiles) ;            --mod-ligne  le même, à l'horizontale (bandeau du haut) ;
 * --mod-fort   la couleur pleine : onglet actif, entrée du menu, puces, liens d'aide (AA 4,5:1 sur --surface,
 *              --bg et --sunken, en clair et en sombre : CouleursModulesTest) ;
 * --mod-doux   un fond léger pour une puce ou l'encadré d'astuce (le --mod-fort y reste AA).
 * Jamais derrière des données : ni tableau, ni nombre, ni graphique. */
body.impact,
.impact [data-module="support"] {
    --mod-g: var(--g01);
    --mod-ligne: var(--brandline);
    --mod-fort: light-dark(#2F5FD9, #8AABFF);
    --mod-doux: light-dark(#E8EEFD, #1F2947);
}
body.impact[data-module="analyse"], .impact [data-module="analyse"] {
    --mod-g: var(--g03);
    --mod-ligne: linear-gradient(90deg, #7659F1 0%, #649BF3 50%, #52DBF5 100%);
    --mod-fort: light-dark(#0B6F86, #52DBF5);
    --mod-doux: light-dark(#E0F4F8, #123A44);
}
body.impact[data-module="clients"], .impact [data-module="clients"] {
    --mod-g: var(--g04);
    --mod-ligne: linear-gradient(90deg, #FB9576 0%, #FBB775 52%, #FFF5B3 100%);
    --mod-fort: light-dark(#B0441C, #FB9576);
    --mod-doux: light-dark(#FCE9E1, #3D231A);
}
body.impact[data-module="commerce"], .impact [data-module="commerce"] {
    --mod-g: var(--g02);
    --mod-ligne: linear-gradient(90deg, #FFCEA8 0%, #FFF18B 100%);
    --mod-fort: light-dark(#7A5A00, #FFE36B);
    --mod-doux: light-dark(#FBF3D0, #3A3214);
}
body.impact[data-module="wiki"], .impact [data-module="wiki"] {
    --mod-g: linear-gradient(180deg, #E6F8EC 0%, #9FE2B8 55%, #3BB57C 100%);
    --mod-ligne: linear-gradient(90deg, #3BB57C 0%, #9FE2B8 50%, #E6F8EC 100%);
    --mod-fort: light-dark(#1B6E45, #6FDBA2);
    --mod-doux: light-dark(#E3F5EA, #16332A);
}
body.impact[data-module="documents"], .impact [data-module="documents"] {
    --mod-g: linear-gradient(180deg, #EAF0FF 0%, #B9C9FB 55%, #6F8CEB 100%);
    --mod-ligne: linear-gradient(90deg, #6F8CEB 0%, #B9C9FB 50%, #EAF0FF 100%);
    --mod-fort: light-dark(#2F4BA8, #A9BCF8);
    --mod-doux: light-dark(#E6ECFC, #1B2440);
}
body.impact[data-module="conformite"], .impact [data-module="conformite"] {
    --mod-g: linear-gradient(180deg, #FFE9F0 0%, #F4A9C0 52%, #C2457A 100%);
    --mod-ligne: linear-gradient(90deg, #C2457A 0%, #F4A9C0 50%, #FFE9F0 100%);
    --mod-fort: light-dark(#A3245A, #F4A9C0);
    --mod-doux: light-dark(#FCE8EF, #3A1A27);
}
body.impact[data-module="services"], .impact [data-module="services"] {
    --mod-g: linear-gradient(180deg, #FFF3D6 0%, #F6C86B 52%, #D98A1C 100%);
    --mod-ligne: linear-gradient(90deg, #D98A1C 0%, #F6C86B 50%, #FFF3D6 100%);
    --mod-fort: light-dark(#9A5B08, #F6C86B);
    --mod-doux: light-dark(#FDF1DC, #3A2A12);
}
body.impact[data-module="produit"], .impact [data-module="produit"] {
    --mod-g: linear-gradient(180deg, #EEE8FF 0%, #BBA6F5 52%, #6E4BD8 100%);
    --mod-ligne: linear-gradient(90deg, #6E4BD8 0%, #BBA6F5 50%, #EEE8FF 100%);
    --mod-fort: light-dark(#5232B0, #BBA6F5);
    --mod-doux: light-dark(#F0EBFF, #261D3D);
}
body.impact[data-module="exco"], .impact [data-module="exco"] {
    --mod-g: linear-gradient(180deg, #E3E8F4 0%, #8FA3CF 52%, #2F4A8A 100%);
    --mod-ligne: linear-gradient(90deg, #2F4A8A 0%, #8FA3CF 50%, #E3E8F4 100%);
    --mod-fort: light-dark(#2F4A8A, #A9BAE0);
    --mod-doux: light-dark(#E8EDF7, #1C2740);
}
/* Finance (19/11/2026) : vert olive, distinct du vert du Wiki. */
body.impact[data-module="finance"], .impact [data-module="finance"] {
    --mod-g: linear-gradient(180deg, #F2F5DC 0%, #C9D68A 52%, #6E7F1E 100%);
    --mod-ligne: linear-gradient(90deg, #6E7F1E 0%, #C9D68A 50%, #F2F5DC 100%);
    --mod-fort: light-dark(#55621A, #C9D68A);
    --mod-doux: light-dark(#F1F4DE, #262B12);
}
body.impact[data-module="admin"], .impact [data-module="admin"] {
    --mod-g: var(--gadm);
    --mod-ligne: linear-gradient(90deg, #242424 0%, #56565B 50%, #A09EA4 100%);
    --mod-fort: light-dark(#4F4E52, #CFCDD0);
    --mod-doux: light-dark(#EDECEE, #2A2A2E);
}
body.impact .brandline { background: var(--mod-ligne); }
.t-neutre { background: var(--sunken); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }

/* Le menu : l'entrée active porte le filet et l'icône du module. */
.ni[aria-current="page"] { box-shadow: inset 3px 0 0 var(--mod-fort), 0 1px 2px rgba(36, 36, 36, .07), 0 0 0 1px var(--line); }
.ni[aria-current="page"] svg { color: var(--mod-fort); }
a.ni, .mopt, .entree { transition: background-color .15s, border-color .15s, box-shadow .15s, color .15s; }
a.ib { text-decoration: none; }

/* Onglets actifs et puces de liste à l'accent du module. */
.impact .nav-tabs .nav-link.active,
.impact .nav-tabs .nav-link[aria-selected="true"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--mod-fort); }
.impact .nav-pills .nav-link.active { background: var(--mod-doux); color: var(--ink); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--mod-fort) 35%, transparent); }
.inbox .tab[aria-selected="true"] { border-bottom-color: var(--mod-fort); }
.impact ul.puces > li::marker { color: var(--mod-fort); }

/* Titre de page (composant TitrePage) : la tuile du module, le titre, le « ? ». */
.tp-tete { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tp-tile { width: 38px; height: 38px; border-radius: 11px; }
.tp-tile svg { width: 21px; height: 21px; }
.tp-tx { min-width: 0; }
.tp-ligne { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tp-sur { margin: 0; font-size: 13px; font-weight: 600; color: var(--tblr-secondary); }
.tp-sur a { color: inherit; }
.tp-section { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin: 1.6rem 0 .6rem; }
.tp-section:first-child { margin-top: .2rem; }
.tp-section h2 { font-size: 15px; font-weight: 700; margin: 0; display: flex; align-items: center; gap: 8px; }
.tp-section p { flex-basis: 100%; margin: 0; font-size: 12.5px; color: var(--muted); }
.tp-section .pact { margin-left: auto; }
.tp-section h2 .cnt { font-size: 11px; }
/* (.mod-puce, pas .puce : un nom aussi courant fuyait dans les pastilles des pages, ex. fiche d'une équipe, 07/10.) */
.mod-puce { display: inline-block; width: 8px; height: 8px; border-radius: 3px; background: var(--mod-fort); flex: none; }

/* Tuile de chiffre clé (composant ChiffreCle). */
.chiffre-cle { color: var(--ink); text-decoration: none; height: 100%; transition: border-color .15s, box-shadow .15s, transform .15s; }
a.chiffre-cle:hover, a.chiffre-cle:focus-visible { color: var(--ink); text-decoration: none; border-color: var(--line-2); box-shadow: 0 2px 8px light-dark(rgba(36, 36, 36, .07), rgba(0, 0, 0, .35)); transform: translateY(-1px); }
.chiffre-cle .card-body, .chiffre-cle .cc-corps { display: flex; flex-direction: column; gap: 4px; }
.cc-tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cc-lib { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.cc-def { display: inline-flex; color: var(--muted); cursor: help; margin: 0 auto 0 5px; }
.cc-def svg { width: 14px; height: 14px; }
.cc-ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--mod-doux); color: var(--mod-fort); flex: none; }
.cc-ic svg { width: 16px; height: 16px; }
.cc-valeur { font-size: 1.75rem; font-weight: 700; line-height: 1.15; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.cc-unite { font-size: 1rem; font-weight: 600; margin-left: 2px; color: var(--ink-2); }
.cc-bad .cc-valeur { color: var(--bad); }
.cc-warn .cc-valeur { color: var(--warn); }
.cc-ok .cc-valeur { color: var(--ok); }
.cc-pied { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-size: 12px; color: var(--muted); }
.cc-plus { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.chiffre-cle.inactif { background: var(--sunken); }
.chiffre-cle.inactif .cc-valeur { color: var(--muted); }
.cc-tendance { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.cc-tendance svg { width: 15px; height: 15px; }
.cc-tendance.bon { color: var(--ok); }
.cc-tendance.mauvais { color: var(--bad); }
.chiffres-cles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 12px; margin-bottom: 1.25rem; }
/* Les chiffres d'une même rangée sur une même ligne (review B-V2) : chaque tuile occupe deux rangées de la grille (le
   libellé, puis le chiffre et son pied) ; la rangée des libellés prend la hauteur du plus long, un libellé sur deux
   lignes ne décale plus son chiffre. */
@supports (grid-template-rows: subgrid) {
    .chiffres-cles > .chiffre-cle { display: grid; grid-row: span 2; grid-template-rows: subgrid; row-gap: 0; }
    .chiffres-cles > .chiffre-cle > .card-body { grid-row: 1 / -1; display: grid; grid-template-rows: subgrid; row-gap: 4px; }
    .chiffres-cles > .chiffre-cle .cc-tete { align-items: flex-start; }
}

/* Une ligne de liste à place fixe (review C-V1) : le titre à gauche (une ligne, coupé, entier en infobulle), l'état
   toujours à droite, les précisions dessous sur toute la largeur.
     <li class="list-group-item ligne-fixe"><a class="lf-titre" title="…">…</a><span class="lf-etat">…</span>
         <div class="lf-sous">…</div></li> */
.impact .ligne-fixe { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 2px; align-items: baseline; }
.ligne-fixe .lf-titre { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ligne-fixe .lf-etat { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; justify-self: end; }
.ligne-fixe .lf-sous { grid-column: 1 / -1; min-width: 0; }

/* Pastille d'état (composant Pastille) ; .st reste pour les pages qui l'emploient. */
.pastille { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); padding: 2px 9px 2px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); white-space: nowrap; line-height: 1.5; }
.pastille::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--pastille, var(--muted)); flex: none; }
.pastille.seule { padding: 0; border: 0; background: none; }
.p-ok { --pastille: var(--ok); }
.p-warn { --pastille: var(--warn-dot); }
.p-bad { --pastille: var(--bad); }
.p-info { --pastille: var(--accent); }
.p-ia { --pastille: var(--ai); }
.p-neutre { --pastille: var(--muted); }
.pastille.vivante::before { animation: impact-pouls 1.8s ease-out infinite; }
@keyframes impact-pouls {
    0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--pastille, var(--muted)) 55%, transparent); }
    70%, 100% { box-shadow: 0 0 0 6px transparent; }
}

/* L'arrivée d'une page : le titre monte légèrement, le contenu apparaît (0,2 s) ; rien si moins d'animations.
 * Le contenu n'est pas déplacé (un transform ferait des éléments fixes de la page, comme le message « Annuler »,
 * des enfants de .pbody le temps de l'animation). */
@keyframes impact-arrivee { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes impact-fondu { from { opacity: 0; } to { opacity: 1; } }
/* `backwards` et non `both` : une animation d'opacité ou de transform qui reste « en effet » après sa fin garde un contexte
 * d'empilement sur .pbody (et .phead) ; une fenêtre (modale) ou un menu dedans passait alors sous le voile de <body>. */
.view > .phead { animation: impact-arrivee .2s ease-out backwards; }
.view > .pbody { animation: impact-fondu .24s ease-out .03s backwards; }
.impact a.card { transition: border-color .15s, box-shadow .15s; }
.impact a.card:hover { border-color: var(--line-2); }

/* ============ 9. L'aide : bouton « ? », panneau, pages (D51) ============ */
.aide-btn {
    display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; flex: none;
    border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2);
    font-size: 12px; font-weight: 700; line-height: 1; text-decoration: none; transition: border-color .15s, color .15s, background-color .15s;
}
.aide-btn:hover, .aide-btn:focus-visible { border-color: var(--mod-fort); color: var(--mod-fort); background: var(--mod-doux); text-decoration: none; }
/* L'icône « Utiliser depuis Claude » (logo MCP) : le rond du « ? », juste après lui (jetons/_mcp_icone.html.twig). */
button.aide-btn { padding: 0; cursor: pointer; }
.mcp-btn svg { width: 14px; height: 14px; }
.aide-lien { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); text-decoration: none; font-size: 12.5px; }
.aide-lien svg { width: 15px; height: 15px; }
.aide-lien:hover { color: var(--mod-fort); }
/* Lien d'aide mis en avant (fenêtre « Utiliser depuis Claude », jetons/_mcp) : gras, plus grand, couleur du module. */
.aide-lien.aide-lien--fort { font-size: 14.5px; font-weight: 600; color: var(--mod-fort); }
.aide-lien.aide-lien--fort svg { width: 18px; height: 18px; }
.aide-lien.aide-lien--fort:hover { text-decoration: underline; }
.mcp-debut { padding: 12px 14px; border: 1px solid var(--tblr-border-color); border-radius: 8px; background: var(--tblr-bg-surface-secondary); }
.mcp-etapes > li + li { margin-top: 6px; }
.mcp-commande { display: flex; align-items: center; gap: 6px; margin: 4px 0; }
.mcp-commande code { flex: 1; min-width: 0; padding: 6px 8px; overflow-x: auto; white-space: nowrap; font-size: 12px; }

.aide-panneau { width: min(520px, 96vw) !important; border-left: 1px solid var(--line); background: var(--surface); }
.aide-panneau .offcanvas-header { border-bottom: 1px solid var(--line); gap: 10px; box-shadow: inset 0 3px 0 0 var(--mod-fort); }
.aide-panneau .offcanvas-title { font-size: 16px; font-weight: 700; margin: 0; }
.aide-panneau .offcanvas-title:focus { outline: none; }
.aide-panneau .offcanvas-body { padding: 18px 20px 24px; }
.aide-panneau .offcanvas-body[aria-busy="true"] { opacity: .65; }
/* La section visée par un « ? » en cours de page (aide_controller.js), ou par l'ancre en pleine page : surlignée un instant. */
@keyframes aide-cible { from { background-color: var(--mod-doux); } to { background-color: transparent; } }
.aide-cible, .aide-texte :is(h2, h3):target { animation: aide-cible 2s ease-out; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { .aide-cible, .aide-texte :is(h2, h3):target { animation: none; background-color: var(--mod-doux); } }
.aide-doc-module {
    display: flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 10px 12px; border: 1px solid var(--line);
    border-radius: 10px; background: var(--mod-doux); color: var(--ink); text-decoration: none; font-size: 13px;
}
.aide-doc-module svg { width: 18px; height: 18px; flex: none; color: var(--mod-fort); }
.aide-doc-module .tx { display: flex; flex-direction: column; min-width: 0; }
.aide-doc-module .tx span { color: var(--ink-2); font-size: 12px; }
.aide-doc-module:hover, .aide-doc-module:focus-visible { border-color: var(--mod-fort); color: var(--ink); text-decoration: none; }
.aide-pied { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12.5px; }
.aide-pied a { display: inline-flex; align-items: center; gap: 6px; color: var(--mod-fort); text-decoration: none; font-weight: 600; }
.aide-pied a:hover { text-decoration: underline; }
.aide-pied svg { width: 15px; height: 15px; }

.aide-texte { font-size: 13.5px; line-height: 1.6; color: var(--ink); max-width: 72ch; }
.aide-texte > :first-child { margin-top: 0; }
.aide-texte .aide-resume { font-size: 14.5px; color: var(--ink-2); margin-bottom: 14px; }
.aide-texte h2 { font-size: 15px; font-weight: 700; margin: 22px 0 6px; display: flex; align-items: center; gap: 8px; }
.aide-texte h2::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: var(--mod-fort); flex: none; }
.aide-texte h3 { font-size: 13.5px; font-weight: 700; margin: 16px 0 4px; }
.aide-texte p { margin: 0 0 10px; }
.aide-texte ul, .aide-texte ol { margin: 0 0 12px; padding-left: 1.3rem; }
.aide-texte li { margin-bottom: 4px; }
.aide-texte li::marker { color: var(--mod-fort); font-weight: 700; }
.aide-texte a { color: var(--mod-fort); }
.aide-texte code { font-size: .82em; padding: 1px 5px; border-radius: 5px; background: var(--sunken); color: var(--ink); }
.aide-astuce { margin: 4px 0 14px; padding: 10px 14px; border-radius: 10px; background: var(--mod-doux); color: var(--ink); box-shadow: inset 3px 0 0 var(--mod-fort); }
.aide-figure { margin: 6px 0 16px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--sunken); }
.aide-figure svg, .aide-figure img { display: block; width: 100%; height: auto; max-height: 340px; }
.aide-figure figcaption { margin-top: 8px; font-size: 12px; color: var(--muted); text-align: center; }
/* La page d'aide prend toute la largeur (retour du 07/10) ; la place du sommaire flottant est réservée par le cadre
   (body.avec-sommaire, review A-B6), plus de marge droite propre. */
.aide-page { max-width: 1800px; }
.aide-page .aide-texte { max-width: none; }
.aide-principal { min-width: 0; }
.aide-page-sujet { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 32px; align-items: start; }
.aide-autres { position: sticky; top: 72px; border-left: 1px solid var(--line); padding-left: 18px; }
.aide-autres h2 { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 4px 0 8px; }
.aide-autres ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.aide-autres a { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: 13px; }
.aide-autres a:hover { background: var(--surface); color: var(--ink); }
.aide-autres svg { width: 16px; height: 16px; flex: none; }
.aide-autres-filtre { max-width: 230px; }
.aide-autres-champ { position: relative; margin-bottom: 6px; }
.aide-autres-champ svg { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--muted); pointer-events: none; }
.aide-autres-champ input { padding-left: 28px; font-size: 12.5px; }
.aide-autres-compte { margin: 0 0 4px; font-size: 11.5px; color: var(--muted); }
.aide-autres-compte:empty { display: none; }
.aide-autres-liste { max-height: calc(100vh - 240px); max-height: calc(100dvh - 240px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.aide-autres-liste:focus-visible { outline: 2px solid var(--mod-fort); outline-offset: 2px; border-radius: 8px; }
.aide-autres-liste li[hidden] { display: none; }
.aide-autres-liste a { padding: 4px 8px; font-size: 12.5px; }
.aide-autres-liste a span { min-width: 0; line-height: 1.3; }
.aide-autres-vide { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.aide-liste { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 10px; }
.aide-panneau .aide-liste { grid-template-columns: minmax(0, 1fr); }
.aide-liste a { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.aide-liste a:hover, .aide-liste a:focus-visible { border-color: var(--line-2); box-shadow: 0 1px 2px rgba(36, 36, 36, .06); color: var(--ink); text-decoration: none; }
.aide-liste .tile { width: 32px; height: 32px; border-radius: 9px; }
.aide-liste .tile svg { width: 18px; height: 18px; }
.aide-liste .tx { min-width: 0; }
.aide-liste b { display: block; font-size: 13.5px; }
.aide-liste .tx span { display: block; font-size: 12.5px; color: var(--muted); }

/* Schémas SVG des pages d'aide : ils suivent le thème par ces classes (docs/aide/images, pas de couleur en dur). */
.aide-figure .sv-fond { fill: var(--bg); }
.aide-figure .sv-carte { fill: var(--surface); stroke: var(--line-2); stroke-width: 1; }
.aide-figure .sv-creux { fill: var(--sunken); stroke: var(--line); stroke-width: 1; }
.aide-figure .sv-ligne { fill: var(--line-2); }
.aide-figure .sv-ligne-forte { fill: var(--ink-2); }
.aide-figure .sv-trait { fill: none; stroke: var(--line-2); stroke-width: 1.5; }
.aide-figure .sv-fleche { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.aide-figure .sv-mod { fill: var(--mod-fort); }
.aide-figure .sv-mod-doux { fill: var(--mod-doux); }
.aide-figure .sv-mod-trait { fill: none; stroke: var(--mod-fort); stroke-width: 2; }
.aide-figure .sv-sel { fill: var(--sel); }
.aide-figure .sv-ok { fill: var(--ok); }
.aide-figure .sv-warn { fill: var(--warn-dot); }
.aide-figure .sv-bad { fill: var(--bad); }
.aide-figure .sv-ai { fill: var(--ai); }
.aide-figure .sv-encre { fill: var(--ink); }
.aide-figure .sv-num { fill: var(--ink); }
.aide-figure .sv-num-t { fill: var(--bg); font: 700 11px var(--f-ui); }
/* Libellés des schémas de la documentation des modules (I8.3 : un SVG par langue, `<nom>.en.svg`). */
.aide-figure .sv-t { fill: var(--ink); font: 600 12px var(--f-ui); }
.aide-figure .sv-t-doux { fill: var(--muted); font: 500 10.5px var(--f-ui); }
.aide-figure .sv-t-mod { fill: var(--mod-fort); font: 700 10.5px var(--f-ui); letter-spacing: .04em; }
.aide-figure .sv-zone { fill: none; stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 4 4; }
.aide-figure svg { max-width: 100%; height: auto; }

/* Documentation d'un module (/help/modules/{module}, I8.3) et sa place dans la liste de l'aide. */
.aide-liste-titre { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 18px 0 8px; }
.aide-liste-titre:first-child { margin-top: 0; }
/* Le champ de l'index de l'aide (review A, A-L7) et ses groupes par module : un groupe sans résultat est masqué. */
.aide-chercher { max-width: 420px; margin-bottom: 14px; }
.aide-groupe { margin-top: 18px; }
.aide-chercher .aide-autres-champ input { font-size: 13px; }
.aide-groupe[hidden], .aide-liste li[hidden], .aide-visites[hidden], .aide-visites li[hidden] { display: none; }
.aide-module-pages { list-style: none; padding-left: 0 !important; display: flex; flex-direction: column; gap: 2px; }
.aide-module-pages li { display: flex; align-items: flex-start; gap: 10px; padding: 6px 8px; margin: 0; border-radius: 8px; }
.aide-module-pages li:hover { background: var(--sunken); }
.aide-module-pages li > svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--mod-fort); }
.aide-module-pages .tx { flex: 1; min-width: 0; }
.aide-module-pages .tx a { font-weight: 600; text-decoration: none; }
.aide-module-pages .tx span { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.45; }

/* Schémas Mermaid, blocs de code et tableaux de l'aide (I8.4, docs/impact/schema-plateforme.md). Classes des nœuds
   posées par le source (`class X after`) : `after` = après bascule (tirets, accent du module), `ext` = outil voisin (gris),
   `stop` = s'arrête à la bascule (tirets fins rouges). */
.aide-mermaid { margin: 14px 0 18px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow-x: auto; }
/* En attente du dessin (JavaScript actif) : le source est masqué ; repli au bout de 8 s si le contrôleur ne vient pas. */
@media (scripting: enabled) {
  .aide-mermaid-attente { min-height: 96px; }
  .aide-mermaid-attente .aide-mermaid-source { visibility: hidden; animation: aide-mermaid-repli 0s linear 8s forwards; }
}
@keyframes aide-mermaid-repli { to { visibility: visible; } }
.aide-mermaid-rendu svg { display: block; margin: 0 auto; max-width: 100%; height: auto; }
.aide-mermaid-source, .aide-code { margin: 0; font: 12px/1.5 var(--f-mono); color: var(--ink-2); white-space: pre; overflow-x: auto; }
.aide-code { padding: 10px 12px; border-radius: 8px; background: var(--sunken); }
.aide-mermaid .node.after :is(rect, polygon, circle, path) { stroke: var(--mod-fort) !important; stroke-width: 2px !important; stroke-dasharray: 6 4; fill: var(--mod-doux) !important; }
.aide-mermaid .node.ext :is(rect, polygon, circle, path) { fill: var(--sunken) !important; stroke: var(--line-2) !important; }
.aide-mermaid .node.ext text { fill: var(--muted) !important; }
.aide-mermaid .node.stop :is(rect, polygon, circle, path) { stroke: var(--bad) !important; stroke-dasharray: 2 3; }
.aide-tableau { margin: 10px 0 16px; }
.aide-tableau table { font-size: 13px; margin: 0; }
.aide-tableau th { font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.aide-tableau td code { white-space: normal; word-break: break-word; }

@media (max-width: 940px) {
    .aide-page-sujet { grid-template-columns: minmax(0, 1fr); padding-right: 0; }
    .aide-autres { position: static; border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 14px; }
    .aide-autres-filtre { max-width: 360px; }
}
@media (max-width: 620px) {
    .tp-tile { width: 32px; height: 32px; border-radius: 9px; }
    .tp-tile svg { width: 18px; height: 18px; }
}

@media (prefers-reduced-motion: reduce) { .impact * { transition: none !important; animation: none !important; } }

/* ============ 10. Menu replié et mode télé (07/10, docs/impact/menu-replie-et-tele.md) ============ */
/* Le bouton qui replie le menu : une icône en haut, à droite du logo (replié : sous la petite icône) ; raccourci [. */
.side-head { display: flex; align-items: center; min-width: 0; }
.side-head .side-top { flex: 1; min-width: 0; }
.side-pli { margin: 0; padding: 10px 10px 0 0; flex: none; }
.side-pli .pli {
    display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0;
    border: 0; border-radius: 8px; background: none; color: var(--v-menu-gris, var(--muted)); cursor: pointer;
}
.side-pli .pli svg { width: 18px; height: 18px; }
.side-pli .pli:hover { background: var(--v-menu-fond-carte, var(--surface)); color: var(--v-menu-encre, var(--ink)); }
.side-pli .pli:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.side-pli .pli-deplier, .ni-replie-seul { display: none; }
.side-top .logo-impact { flex: none; height: 26px; width: 26px; }

@media (min-width: 941px) {
    body.impact--menu-replie .impact-app { grid-template-columns: 64px minmax(0, 1fr); }
    body.impact--menu-replie .side-head { flex-direction: column; }
    body.impact--menu-replie .side-head .side-top { flex: none; }
    body.impact--menu-replie .side-top { justify-content: center; padding: 14px 0 4px; }
    body.impact--menu-replie .side-top img:not(.logo-impact), body.impact--menu-replie .side-top .prod { display: none; }
    body.impact--menu-replie .modsw { width: auto; margin: 8px 10px 6px; padding: 5px; justify-content: center; }
    body.impact--menu-replie .modsw .tx, body.impact--menu-replie .modsw .chev { display: none; }
    body.impact--menu-replie .snav { padding: 4px 8px 10px; overflow-x: hidden; }
    /* Les titres de section deviennent un simple trait. */
    body.impact--menu-replie .nsec { font-size: 0; padding: 0; height: 1px; margin: 9px 6px; background: var(--v-menu-ligne, var(--line)); }
    body.impact--menu-replie .ni { position: relative; justify-content: center; padding: 7px 0; gap: 0; }
    body.impact--menu-replie .ni .lb, body.impact--menu-replie .ni .soon, body.impact--menu-replie .ni .ext { display: none; }
    /* Un compteur devient une pastille sur l'icône (le nombre reste lu par les lecteurs d'écran et en infobulle). */
    body.impact--menu-replie .ni .cnt { position: absolute; top: 3px; right: 7px; width: 9px; height: 9px; padding: 0; font-size: 0; box-shadow: 0 0 0 2px var(--v-menu-fond, var(--bg)); }
    body.impact--menu-replie .ni .cnt svg { display: none; }
    body.impact--menu-replie .ni .cnt-duo:not(.hot) { background: var(--v-menu-gris, var(--muted)); box-shadow: 0 0 0 2px var(--v-menu-fond, var(--bg)); }
    /* L'entrée active reste visible ; le sous-menu (arbre du Wiki) et l'entrée propre à la page s'effacent. */
    body.impact--menu-replie .sous-menu, body.impact--menu-replie .entree-propre { display: none; }
    body.impact--menu-replie .ni-replie-seul { display: flex; }
    body.impact--menu-replie .side-plus { display: none; }
    body.impact--menu-replie .side-pli { padding: 0; }
    body.impact--menu-replie .side-pli .pli-replier { display: none; }
    body.impact--menu-replie .side-pli .pli-deplier { display: block; }
    body.impact--menu-replie .side-foot { justify-content: center; padding: 10px 0; }
    body.impact--menu-replie .side-foot .who { display: none; }
    /* « Mes pages » toujours ouverte quand le menu est replié (cadre_controller.js) : un trait, pas de chevron, pas de clic. */
    body.impact--menu-replie .mes-pages > summary { pointer-events: none; }
    body.impact--menu-replie .mes-pages > summary::after { display: none; }
}
/* Sur écran étroit, le menu est un tiroir : le bouton de repli n'y sert à rien. */
@media (max-width: 940px) { .side-pli { display: none; } }

/* Mode télé : classe impact--tele de <body> (?tv=1, Maj+T) ; seul le contenu de la page reste. */
body.impact--tele .brandline, body.impact--tele .side, body.impact--tele .scrim, body.impact--tele .topbar,
body.impact--tele .bandeau-voir-comme, body.impact--tele .bandeau-agent, body.impact--tele .view > .phead,
body.impact--tele .pfoot, body.impact--tele .sommaire { display: none !important; }
body.impact--tele .impact-app { grid-template-columns: minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
body.impact--tele .pbody { padding: 20px 24px; }
body.impact--tele:not(.impact--tele-souris) { cursor: none; }
.tele-ctl { display: none; }
body.impact--tele .tele-ctl {
    display: flex; gap: 4px; position: fixed; top: 10px; right: 10px; z-index: 1060; padding: 4px; border-radius: 10px;
    background: var(--surface); box-shadow: var(--shadow-pop); opacity: 0; pointer-events: none; transition: opacity .2s;
}
body.impact--tele.impact--tele-souris .tele-ctl, body.impact--tele .tele-ctl:focus-within { opacity: 1; pointer-events: auto; }
@media (max-width: 620px) { .ib-tele { display: none !important; } }
@media print { .side-pli, .tele-ctl { display: none !important; } }

/* Raccourcis clavier (07/10) : le lien de l'aide et la fenêtre (templates/cadre/_raccourcis.html.twig). */
.aide-raccourcis { margin: 0 0 18px; }
.aide-raccourcis button {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 8px; font: inherit; text-align: left;
    color: var(--ink); border: 1px solid var(--line); background: var(--surface); cursor: pointer; transition: background-color .15s;
}
.aide-raccourcis button:hover { background: var(--sunken); }
.aide-raccourcis svg { width: 18px; height: 18px; flex: none; color: var(--mod-fort, var(--accent)); }
.aide-raccourcis .tx { flex: 1; min-width: 0; }
.raccourcis-fenetre .modal-title { display: flex; align-items: center; gap: 8px; }
.raccourcis-groupes { columns: 2 300px; column-gap: 32px; }
.raccourcis-groupe { break-inside: avoid; margin: 0 0 20px; }
.raccourcis-groupe h3 { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 0 0 6px; }
.raccourcis-groupe dl { margin: 0; }
.raccourci { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.raccourci:last-child { border-bottom: 0; }
.raccourci dt { font-weight: 400; font-size: 13.5px; }
.raccourci dd { margin: 0; flex: none; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 4px; max-width: 55%; }
.raccourci .combinaison { display: inline-flex; gap: 3px; }
.raccourci .ou { font-size: 12px; color: var(--muted); }
.raccourci kbd { min-width: 22px; text-align: center; font-size: 12px; }

/* Une proposition d'auto-complétion : le nom puis le détail l'un sous l'autre (Tabler met .dropdown-item en flex, côte à côte :
   le nom tenait dans 63 px, recette roadmap du 19/11). */
.dropdown-menu.autocompletion .dropdown-item { flex-direction: column; align-items: stretch; gap: 0; }

/* Choisir des personnes en pastilles (autocompletion_controller.js, mode plusieurs ; docs/impact/choix-de-personnes.md). */
.choix-personnes { min-width: 0; }
.choix-puces { display: flex; flex-wrap: wrap; gap: 4px; }
.choix-puces:not(:empty) { margin-bottom: 4px; }
.choix-puce { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; white-space: normal; text-align: left; max-width: 100%; height: auto; line-height: 1.4; }
.choix-retirer { border: 0; background: none; color: inherit; padding: 0 2px; line-height: 1; }
.choix-retirer:hover, .choix-retirer:focus-visible { color: var(--bad, #d63939); }

/* Le sommaire flottant affiché (body.avec-sommaire, sommaire_controller.js) : le contenu lui laisse sa place à droite
   (traits : 38 px à 10 px du bord), pour ne rien recouvrir (review A-B6). Pas sur téléphone ni en mode télé (masqué). */
@media (min-width: 768px) { body.impact.avec-sommaire:not(.impact--tele) .pbody { padding-right: 56px; } }

/* Carte repliable (<details class="card carte-repliable"> + <summary class="card-header">… <span class="ms-auto replier">chevron</span>) :
   en-tête cliquable sans le triangle du navigateur, chevron vers le bas qui pivote une fois ouverte (comme « Sans équipe »
   d'Administration › Équipes). */
.carte-repliable > summary { cursor: pointer; list-style: none; }
.carte-repliable > summary::-webkit-details-marker { display: none; }
.carte-repliable > summary .replier { display: inline-flex; color: var(--tblr-secondary); transition: transform .15s; }
.carte-repliable[open] > summary .replier { transform: rotate(180deg); }

/* Table des matières flottante (I9.8, sommaire_controller.js, docs/impact/sommaire-flottant.md) : des traits à droite,
   ouverts en panneau au survol ou au focus clavier ; section en cours à l'accent ; masquée sur téléphone et à l'impression. */
.impact .sommaire { position: fixed; top: 150px; right: 10px; z-index: 30; display: flex; max-height: calc(100vh - 190px); max-height: calc(100dvh - 190px); }
.impact .sommaire[hidden] { display: none; }
.impact .sommaire ol { list-style: none; margin: 0; padding: 8px 6px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid transparent; border-radius: 12px; transition: background-color .12s, box-shadow .12s; }
.impact .sommaire button { display: flex; align-items: center; justify-content: flex-end; gap: 12px; width: 100%; padding: 3px 4px; border: 0; border-radius: 6px; background: none; color: var(--muted); font: inherit; font-size: 13px; line-height: 1.35; text-align: left; cursor: pointer; }
.impact .sommaire-trait { flex: none; width: 16px; height: 2px; border-radius: 1px; background: color-mix(in srgb, var(--muted) 55%, transparent); }
.impact .sommaire-n2 .sommaire-trait { width: 11px; }
.impact .sommaire-n3 .sommaire-trait { width: 7px; }
.impact .sommaire-texte { display: none; flex: 1; min-width: 0; overflow: hidden; overflow-wrap: anywhere; }
/* Le compteur d'un titre (« Mauvais destinataire - 12 ») : sa colonne à droite, jamais coupé ; le texte va à la ligne. */
.impact .sommaire-compteur { display: none; flex: none; font-variant-numeric: tabular-nums; font-weight: 600; }
.impact .sommaire button[aria-current] { color: var(--ink); font-weight: 600; }
.impact .sommaire button[aria-current] .sommaire-trait { background: var(--accent); }
.impact .sommaire:hover ol,
.impact .sommaire:focus-within ol { width: 320px; background: var(--surface); border-color: var(--line); box-shadow: var(--shadow-pop); }
.impact .sommaire:hover .sommaire-texte,
.impact .sommaire:focus-within .sommaire-texte { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.impact .sommaire:hover .sommaire-compteur,
.impact .sommaire:focus-within .sommaire-compteur { display: inline; }
.impact .sommaire:hover button,
.impact .sommaire:focus-within button { padding: 4px 6px; }
.impact .sommaire-n2 .sommaire-texte { padding-left: 12px; }
.impact .sommaire-n3 .sommaire-texte { padding-left: 24px; }
.impact .sommaire button:hover { color: var(--ink); background: var(--sunken); }
.impact .sommaire button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (max-width: 767.98px) { .impact .sommaire { display: none; } }
@media print { .impact .sommaire { display: none; } }
