html{touch-action:manipulation}
/* Registre des risques cyber — feuille de style unique (pas de framework, pas de CDN : l'interface doit
   fonctionner hors ligne). Refonte du 2026-10-04 : icônes SVG, composants d'en-tête/onglets/étapes,
   badges teintés, écran d'attente animé. Palette d'origine (dashboard BIA de référence) conservée :
   rouge de marque pour le menu, bleu d'action, échelle de criticité q1→q4. */

:root {
  --font: 'Aptos', 'Segoe UI Variable', 'Segoe UI', 'Inter', system-ui, -apple-system, 'Helvetica Neue',
          Arial, sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', 'SF Mono', Menlo, Consolas, monospace;
  --ink: #17202C; --ink2: #3E4A57; --muted: #5F6B79; --faint: #66717F;
  --bg: #ECEDEF; --panel: #F7F7F8; --surface: #FDFDFE; --surface2: #F7F9FC; --surface3: #EEF2F7;
  --line: #E3E8EF; --line2: #EEF1F6;
  --accent: #2F6FD0; --accent2: #2559AB; --accent-soft: rgba(47, 111, 208, .09);
  --marque: #C8102E; --marque2: #8E0B22;
  --q1: #D7192F; --q2: #C98A0B; --q3: #E8622A; --q4: #2E8B62;
  --q1-bg: rgba(215, 25, 47, .10); --q2-bg: rgba(201, 138, 11, .13); --q3-bg: rgba(232, 98, 42, .12);
  --q4-bg: rgba(46, 139, 98, .11);
  --ok: #2E8B62; --ko: #D7192F;
  --shadow: 0 1px 2px rgba(23, 26, 32, .04), 0 8px 24px -12px rgba(23, 26, 32, .12);
  --shadow2: 0 8px 28px rgba(23, 37, 56, .10);
  --shadow3: 0 18px 50px rgba(23, 37, 56, .18);
  --ring: 0 0 0 3px rgba(47, 111, 208, .18);
  --r: 20px; --r-s: 10px; --r-lg: 26px; --sidebar: 252px; --gap: 14px;
  --t: .18s cubic-bezier(.2, .7, .3, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    color-scheme: dark;
    --bg: #0D1217; --panel: #141A22; --surface: #171E27; --surface2: #141A22; --surface3: #1D2530;
    --ink: #E9EDF2; --ink2: #C3CBD4; --muted: #9AA6B2; --faint: #7C8794;
    --line: #26303C; --line2: #202833;
    --accent: #5B95E8; --accent2: #3F7AD0; --accent-soft: rgba(91, 149, 232, .12);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow2: 0 8px 28px rgba(0, 0, 0, .35);
  }
}
:root[data-theme=dark] {
  color-scheme: dark;
    --bg: #0D1217; --panel: #141A22; --surface: #171E27; --surface2: #141A22; --surface3: #1D2530;
    --ink: #E9EDF2; --ink2: #C3CBD4; --muted: #9AA6B2; --faint: #7C8794;
    --line: #26303C; --line2: #202833;
    --accent: #5B95E8; --accent2: #3F7AD0; --accent-soft: rgba(91, 149, 232, .12);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow2: 0 8px 28px rgba(0, 0, 0, .35);
  }
:root[data-theme=light] { color-scheme: light; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font); color: var(--ink); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; background: var(--bg);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: .9em; background: var(--surface3); padding: 1px 5px; border-radius: 5px; }
.ref { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: -.01em; }

/* ---- Icônes -------------------------------------------------------------------- */
.i {
  width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px;
}
.i.l { width: 20px; height: 20px; }
.i.xl { width: 28px; height: 28px; stroke-width: 1.6; }

/* ---- Coquille : menu + barre haute + contenu ---------------------------------------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar); color: var(--ink); position: fixed; inset: var(--gap) auto var(--gap) var(--gap); z-index: 50;
  display: flex; flex-direction: column; background: var(--panel); border-radius: var(--r-lg);
  overflow: hidden; transition: transform .24s ease, box-shadow .24s;
}
[data-sidebar="ouverte"] .sidebar { box-shadow: var(--shadow2); }
[data-sidebar="fermee"] .sidebar { transform: translateX(calc(-100% - var(--gap) - 4px)); }
[data-sidebar="fermee"] .main { margin-left: 0; }
[data-sidebar="fermee"] .topbar { margin-left: var(--gap); }
[data-sidebar="fermee"] main.content { padding-left: 32px; }
.sidebar-fond { display: none; }

.brand { display: flex; align-items: center; gap: 12px; padding: 26px 18px 8px 20px; color: var(--ink); }
.brand-logo {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: var(--marque); color: #fff; box-shadow: 0 8px 18px -8px var(--marque);
}
.brand-logo .i { width: 21px; height: 21px; }
.brand .logo { display: block; white-space: nowrap; font-size: 14px; font-weight: 750; letter-spacing: -.02em; line-height: 1.2; }
.brand .sub {
  display: block; font-size: 11px; color: var(--faint); font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; margin-top: 3px;
}
.nav { flex: 1; overflow-y: auto; padding: 10px 0; }
.nav-group {
  font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600;
  color: var(--faint); padding: 20px 28px 8px;
}
.nav a, .nav-bouton {
  display: flex; align-items: center; gap: 14px; width: 100%; position: relative;
  padding: 11px 28px; margin: 0; border-radius: 0; border: 0;
  color: var(--muted); font-size: 14.5px; font-weight: 500;
  background: transparent; box-shadow: none; cursor: pointer; font-family: var(--font);
  transition: color var(--t), background var(--t);
}
.nav a .i, .nav-bouton .i { width: 20px; height: 20px; }
.nav a:hover, .nav-bouton:hover { color: var(--ink); text-decoration: none; transform: none; background: transparent; }
.nav a.actif { color: var(--ink); font-weight: 650; }
.nav a.actif .i { color: var(--marque); }
.nav a.actif::before {
  content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 5px;
  border-radius: 0 6px 6px 0; background: var(--marque);
}
.nav a .pastille {
  margin-left: auto; background: var(--marque); color: #fff; min-width: 20px; width: auto; height: auto; min-height: 20px; line-height: 16px; box-sizing: border-box;
  text-align: center; border-radius: 10px; font-size: 11px; padding: 2px 7px; font-weight: 700; vertical-align: baseline;
}
.sidebar .foot { padding: 14px 18px 18px; font-size: 12px; }
.foot-modele {
  display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 600; padding: 12px 14px 4px;
  border-radius: var(--r) var(--r) 0 0; background: var(--marque2);
}
.foot-mention { color: rgba(255, 255, 255, .7); font-size: 11px; padding: 0 14px 12px 36px;
  border-radius: 0 0 var(--r) var(--r); background: var(--marque2); margin: 0 0 8px; }
.foot .nav-bouton { font-size: 13px; padding: 9px 10px; border-radius: var(--r-s); }
.brand:hover { text-decoration: none; }

.main { flex: 1; min-width: 0; margin-left: calc(var(--sidebar) + 2 * var(--gap)); display: flex; flex-direction: column;
        min-height: 100vh; transition: margin-left .24s ease; }
.topbar {
  position: sticky; top: var(--gap); z-index: 40; display: flex; align-items: center; gap: 14px;
  margin: var(--gap) var(--gap) 0 0; padding: 12px 22px; min-height: 64px;
  background: var(--panel); border-radius: var(--r-lg);
}
.crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 600; min-width: 0; }
.crumb a { color: var(--muted); }
.crumb .i { width: 14px; height: 14px; color: var(--faint); }
.crumb strong { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-action { margin-left: auto; }
.theme-toggle { margin-left: auto; }
.topbar-action ~ .theme-toggle { margin-left: 0; }
.theme-toggle .ico-soleil { display: none; }
:root[data-theme=dark] .theme-toggle .ico-soleil { display: inline; }
:root[data-theme=dark] .theme-toggle .ico-lune { display: none; }

main.content, .content { padding: 28px 18px 80px 14px; max-width: 1240px; width: 100%; animation: entree .28s ease both; }

/* ---- Typographie ------------------------------------------------------------------- */
h1 { font-size: 24px; font-weight: 800; letter-spacing: -.025em; line-height: 1.2; }
h2 {
  font-size: 15px; font-weight: 750; letter-spacing: -.01em; color: var(--ink); margin: 0 0 14px;
  display: flex; align-items: center; gap: 9px;
}
h2 .i { color: var(--accent); width: 18px; height: 18px; }
h2 .meta { font-weight: 500; }
h3 { font-size: 14px; font-weight: 700; margin: 0 0 8px; }
.sous-titre { color: var(--muted); margin: 6px 0 22px; font-size: 13.5px; }
.meta { color: var(--muted); font-size: 12.5px; }
.aide { color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.vide { color: var(--faint); }

/* En-tête de page : titre + sous-titre à gauche, actions à droite. */
.entete { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.entete > div:first-child { flex: 1; min-width: 240px; }
.entete .sous-titre { margin-bottom: 0; }
.entete .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.entete-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; color: var(--muted); font-size: 13px; }
.entete-meta span { display: inline-flex; align-items: center; gap: 6px; }
.entete-meta .i { color: var(--faint); width: 15px; height: 15px; }

/* ---- Carte -------------------------------------------------------------------------- */
.carte {
  background: var(--surface); border: 0; border-radius: var(--r);
  padding: 22px 24px; margin-bottom: 18px; box-shadow: var(--shadow);
  overflow-x: auto; /* un tableau trop large défile ici, jamais la page entière */
}
.carte-titre { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.carte-titre h2 { margin: 0; flex: 1; }
.carte.plate { padding: 0; }
.carte.plate > table th:first-child, .carte.plate > table td:first-child { padding-left: 24px; }
.carte.plate > table th:last-child, .carte.plate > table td:last-child { padding-right: 24px; }
.carte.plate > table th { border-radius: 0; }
.carte.plate > table th:first-child { border-top-left-radius: var(--r); }
.carte.plate > table th:last-child { border-top-right-radius: var(--r); }
.grille-cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.grille-cartes > .carte { margin-bottom: 0; }

/* ---- KPI ----------------------------------------------------------------------------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--gap); margin-bottom: 22px; }
.kpi {
  background: var(--surface); border: 0; border-radius: var(--r); padding: 20px 22px; min-height: 148px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 0; position: relative;
}
.kpi-ico {
  position: absolute; top: 18px; right: 18px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent);
}
.kpi-ico .i { width: 19px; height: 19px; }
.kpi > div:last-child { display: flex; flex-direction: column-reverse; margin-top: auto; }
.kpi .n { font-size: clamp(38px, 3.6vw, 52px); font-weight: 650; line-height: 1; letter-spacing: -.04em;
          font-variant-numeric: tabular-nums; margin-top: 10px; }
.kpi .l { font-size: 15px; font-weight: 500; color: var(--muted); max-width: calc(100% - 52px); }
.kpis .kpi:first-child {
  color: #fff; background: linear-gradient(135deg, var(--marque) 0%, var(--marque2) 100%);
  box-shadow: 0 16px 30px -16px var(--marque);
}
.kpis .kpi:first-child .l { color: rgba(255, 255, 255, .82); }
.kpis .kpi:first-child .kpi-ico { background: #fff; color: var(--marque); }
.kpi.CRITIQUE .kpi-ico { background: var(--q1-bg); color: var(--q1); }
.kpi.CRITIQUE .n { color: var(--q1); }
.kpi.ELEVE .kpi-ico { background: var(--q3-bg); color: var(--q3); }
.kpi.MODERE .kpi-ico { background: var(--q2-bg); color: var(--q2); }
.kpi.FAIBLE .kpi-ico { background: var(--q4-bg); color: var(--q4); }

/* ---- Badges de criticité (teintés, avec pastille) --------------------------------------- */
/* Sélecteurs sur .name (ASCII : MODERE, NON_DEFINI) et jamais sur .value ("Non défini" contient une
   espace, invalide comme classe CSS). */
.badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700;
  padding: 3px 10px 3px 8px; border-radius: 20px; white-space: nowrap; line-height: 1.35;
  background: var(--surface3); color: var(--ink2);
}
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.badge.CRITIQUE { background: var(--q1-bg); color: var(--q1); }
.badge.ELEVE    { background: var(--q3-bg); color: #C24E1A; }
.badge.MODERE   { background: var(--q2-bg); color: #9A6A06; }
.badge.FAIBLE   { background: var(--q4-bg); color: var(--q4); }
.badge.NON_DEFINI { background: var(--surface3); color: var(--muted); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) .badge.ELEVE { color: #F08A5D; } :root:not([data-theme=light]) .badge.MODERE { color: #E5B33D; }
}
:root[data-theme=dark] .badge.ELEVE { color: #F08A5D; } :root[data-theme=dark] .badge.MODERE { color: #E5B33D; }
.badge.anime { animation: pop .32s ease; }

/* ---- Étiquettes (statuts, filtres) ---------------------------------------------------- */
.etiquette {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 14px; background: var(--surface3); color: var(--ink2);
  border: 1px solid transparent; white-space: nowrap;
}
.etiquette.ouvert, .etiquette.actif { border-color: rgba(47, 111, 208, .35); color: var(--accent); background: var(--accent-soft); }
.etiquette.clos { color: var(--faint); }
.etiquette.discret { opacity: .6; }
.etiquette.ok { background: var(--q4-bg); color: var(--q4); }
.etiquette.ko { background: var(--q1-bg); color: var(--q1); }
.etiquette.ia { background: rgba(124, 77, 222, .10); color: #6B3FCF; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .etiquette.ia { color: #B49AF0; } }
:root[data-theme=dark] .etiquette.ia { color: #B49AF0; }
a.etiquette { text-decoration: none; transition: border-color var(--t), background var(--t); }
a.etiquette:hover { border-color: var(--accent); color: var(--accent); }
.puces { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* ---- Boutons ------------------------------------------------------------------------- */
button, .bouton {
  font-family: var(--font); font-size: 13px; font-weight: 650; line-height: 1;
  height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-s);
  background: var(--surface); color: var(--ink2); cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  transition: background var(--t), border-color var(--t), color var(--t), box-shadow var(--t), transform var(--t);
  box-shadow: var(--shadow); text-decoration: none; position: relative;
}
button:hover, .bouton:hover { border-color: #C9D3E0; background: var(--surface2); color: var(--ink); text-decoration: none; }
button:active, .bouton:active { transform: translateY(1px); }
button.primaire, .bouton.primaire {
  background: var(--marque); color: #fff; border-color: var(--marque);
  box-shadow: 0 1px 2px rgba(23, 37, 56, .12), 0 4px 12px rgba(200, 16, 46, .25);
}
button.primaire:hover, .bouton.primaire:hover { background: var(--marque2); border-color: var(--marque2); color: #fff; }
button.danger, .bouton.danger { color: var(--q1); }
button.danger:hover, .bouton.danger:hover { border-color: var(--q1); background: var(--q1-bg); color: var(--q1); }
button.discret, .bouton.discret { height: 32px; padding: 0 11px; font-size: 12.5px; box-shadow: none; }
button.lien, .bouton.lien { border-color: transparent; background: none; box-shadow: none; color: var(--accent); padding: 0 6px; }
button.lien:hover, .bouton.lien:hover { background: var(--accent-soft); }
.icone-seule { width: 36px; padding: 0; }
button.grand, .bouton.grand { height: 44px; padding: 0 22px; font-size: 14px; border-radius: 10px; }
button:disabled { opacity: .6; cursor: progress; transform: none; }
/* Bouton occupé : libellé masqué, roue à la place (le bouton garde sa largeur). */
button.occupe { color: transparent !important; }
button.occupe .i { opacity: 0; }
button.occupe::after {
  content: ''; position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(127, 127, 127, .35); border-top-color: var(--accent); animation: tourne .7s linear infinite;
}
button.primaire.occupe::after { border-color: rgba(255, 255, 255, .4); border-top-color: #fff; }

/* ---- Formulaires ---------------------------------------------------------------------- */
input[type=text], input[type=search], input[type=date], input[type=password], input[type=email],
input[type=number], input[type=file], textarea, select {
  font-family: var(--font); font-size: 14px; color: var(--ink); width: 100%;
  padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r-s);
  background: var(--surface); transition: border-color var(--t), box-shadow var(--t);
}
select { height: 40px; padding-right: 32px; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235F6B79' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
input[type=text], input[type=search], input[type=date], input[type=password] { height: 40px; }
input[type=file] { padding: 7px 8px; }
input[type=file]::file-selector-button {
  font-family: var(--font); font-weight: 650; font-size: 12.5px; border: 1px solid var(--line);
  background: var(--surface2); color: var(--ink2); border-radius: 6px; padding: 5px 10px; margin-right: 10px; cursor: pointer;
}
input:hover, textarea:hover, select:hover { border-color: #C9D3E0; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
input:disabled { color: var(--faint); background: var(--surface2); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; vertical-align: -3px; cursor: pointer; }
textarea { resize: vertical; min-height: 120px; line-height: 1.55; }
label { display: block; font-size: 13px; font-weight: 650; color: var(--ink2); margin: 16px 0 6px; }
label.inline { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; margin: 0; cursor: pointer; }
.grille-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grille-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.champ-icone { position: relative; }
.champ-icone > .i { position: absolute; left: 12px; top: 12px; color: var(--faint); pointer-events: none; }
.champ-icone > input { padding-left: 36px; }
.options { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
details.avance { margin-top: 16px; border-top: 1px dashed var(--line); padding-top: 12px; }
details.avance > summary { cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 600; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
details.avance > summary::-webkit-details-marker { display: none; }
details.avance > summary .i { transition: transform var(--t); }
details.avance[open] > summary .i { transform: rotate(90deg); }
details.avance > .options { margin-top: 12px; }

/* Choix sous forme de puces cochables (référentiels…). */
.choix { display: flex; flex-wrap: wrap; gap: 8px; }
.choix label {
  margin: 0; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none;
  padding: 7px 13px 7px 11px; border: 1px solid var(--line); border-radius: 20px; font-weight: 600; font-size: 13px;
  background: var(--surface); transition: all var(--t);
}
.choix input { position: absolute; opacity: 0; pointer-events: none; }
.choix .coche {
  width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #B8C3D1; display: grid; place-items: center;
  transition: all var(--t); color: transparent;
}
.choix .coche .i { width: 11px; height: 11px; stroke-width: 3; }
.choix label:hover { border-color: #C3CEDC; }
.choix input:checked + .coche { background: var(--accent); border-color: var(--accent); color: #fff; }
.choix label:has(input:checked) { border-color: rgba(47, 111, 208, .45); background: var(--accent-soft); color: var(--accent); }
.choix input:focus-visible + .coche { box-shadow: var(--ring); }

/* Interrupteur (case « retenir ce risque »). */
.interrupteur { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; margin: 0; font-weight: 650; }
.interrupteur input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.interrupteur .piste {
  width: 38px; height: 22px; border-radius: 12px; background: #C9D1DC; position: relative; flex: none;
  transition: background var(--t);
}
.interrupteur .piste::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform var(--t);
}
.interrupteur input:checked + .piste { background: var(--accent); }
.interrupteur input:checked + .piste::after { transform: translateX(16px); }
.interrupteur input:focus-visible + .piste { box-shadow: var(--ring); }

/* ---- Bandeaux --------------------------------------------------------------------------- */
.message, .erreur {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; margin-bottom: 18px;
  border-radius: 10px; font-size: 13.5px; border: 1px solid; animation: glisse .3s ease both;
}
.message { background: var(--q4-bg); border-color: rgba(46, 139, 98, .25); color: var(--ink); }
.message > .i { color: var(--ok); margin-top: 1px; }
.erreur { background: var(--q1-bg); border-color: rgba(215, 25, 47, .25); color: var(--ink); }
.erreur > .i { color: var(--ko); margin-top: 1px; }
.message > span, .erreur > span { flex: 1; }
.message .fermer, .erreur .fermer { height: 24px; width: 24px; padding: 0; border: 0; background: none; box-shadow: none; color: var(--muted); }
.message.ferme, .erreur.ferme { animation: disparait .2s ease forwards; }
.encart {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--accent-soft); border: 1px solid rgba(47, 111, 208, .18); border-radius: 10px;
  padding: 12px 14px; font-size: 13.5px; margin-bottom: 16px; color: var(--ink2);
}
.encart > .i { color: var(--accent); margin-top: 2px; }
.encart.attention { background: var(--q2-bg); border-color: rgba(201, 138, 11, .25); }
.encart.attention > .i { color: var(--q2); }

/* ---- Tableaux ----------------------------------------------------------------------------- */
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
th {
  background: var(--surface2); color: var(--muted); text-align: left; padding: 10px 14px;
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  white-space: nowrap; border-bottom: 1px solid var(--line);
}
th:first-child { border-top-left-radius: 8px; }
th:last-child { border-top-right-radius: 8px; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
tbody tr { transition: background var(--t); }
tbody tr:hover td { background: var(--surface2); }
tbody tr.modifie td { background: #fff6d6; }
tbody tr.modifie:hover td { background: #ffeeb0; }
tbody tr:last-child td { border-bottom: none; }
td.compact { white-space: nowrap; }
td.droite, th.droite { text-align: right; }
tr.cliquable { cursor: pointer; }
.titre-ligne { font-weight: 650; color: var(--ink); }
.titre-ligne:hover { color: var(--accent); }

/* ---- Filtres -------------------------------------------------------------------------- */
.filtres { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; margin-bottom: 16px; }
.filtres > div { min-width: 170px; }
.filtres label { margin-top: 0; }
.barre-recherche { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; max-width: 520px; }
.barre-recherche .champ-icone { flex: 1; }

/* ---- Onglets (fiche projet) ------------------------------------------------------------- */
.onglets { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; padding-bottom: 1px; }
.onglets a {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; color: var(--muted);
  font-weight: 650; font-size: 13.5px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
  transition: color var(--t), border-color var(--t);
}
.onglets a:hover { color: var(--ink); text-decoration: none; }
.onglets a.actif { color: var(--accent); border-bottom-color: var(--accent); }
.onglets .compteur { background: var(--surface3); color: var(--muted); border-radius: 10px; font-size: 11.5px; padding: 0 7px; }
.onglets a.actif .compteur { background: var(--accent-soft); color: var(--accent); }
.panneau { display: none; }
.panneau.actif { display: block; animation: entree .22s ease both; }

/* ---- Étapes (parcours de déclaration) ----------------------------------------------------- */
.etapes { display: flex; align-items: center; gap: 0; margin: 0 0 24px; list-style: none; flex-wrap: wrap; row-gap: 8px; }
.etapes li { display: flex; align-items: center; gap: 9px; color: var(--faint); font-weight: 650; font-size: 13px; }
.etapes li + li::before { content: ''; width: 36px; height: 2px; background: var(--line); margin: 0 12px; border-radius: 2px; }
.etapes .num {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px;
  border: 2px solid var(--line); background: var(--surface); color: var(--faint);
}
.etapes .num .i { width: 13px; height: 13px; stroke-width: 3; }
.etapes li.faite { color: var(--ink2); }
.etapes li.faite .num { background: var(--ok); border-color: var(--ok); color: #fff; }
.etapes li.faite + li::before, .etapes li.faite + li.courante::before { background: var(--ok); }
.etapes li.courante { color: var(--ink); }
.etapes li.courante .num { border-color: var(--accent); background: var(--accent); color: #fff; box-shadow: 0 0 0 4px var(--accent-soft); }

/* ---- Déclaration : formulaire + guide ---------------------------------------------------- */
.declaration { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.guide { position: sticky; top: 84px; }
.guide h3 { display: flex; align-items: center; gap: 8px; }
.guide h3 .i { color: var(--accent); }
.guide ul { list-style: none; display: flex; flex-direction: column; gap: 10px; margin: 12px 0 16px; }
.guide li { display: flex; gap: 10px; font-size: 13px; color: var(--muted); transition: color var(--t); }
.guide li .puce {
  width: 20px; height: 20px; border-radius: 50%; flex: none; display: grid; place-items: center;
  border: 1.5px solid var(--line); color: transparent; transition: all var(--t);
}
.guide li .puce .i { width: 11px; height: 11px; stroke-width: 3; }
.guide li.ok { color: var(--ink); }
.guide li.ok .puce { background: var(--ok); border-color: var(--ok); color: #fff; animation: pop .3s ease; }
.guide li strong { display: block; color: var(--ink2); font-weight: 650; }
.compteur-car { font-size: 12px; color: var(--faint); text-align: right; margin-top: 4px; font-variant-numeric: tabular-nums; }
.compteur-car.court { color: var(--q2); }
.exemples { display: flex; flex-direction: column; gap: 6px; }
.exemples button { justify-content: flex-start; white-space: normal; text-align: left; height: auto; padding: 8px 11px; line-height: 1.4; font-weight: 500; font-size: 12.5px; color: var(--ink2); }
.pied-formulaire { display: flex; align-items: center; gap: 14px; margin-top: 20px; flex-wrap: wrap; }
.pied-formulaire .aide { margin: 0; display: inline-flex; align-items: center; gap: 6px; }

/* ---- Propositions de risque --------------------------------------------------------------- */
.proposition { transition: opacity var(--t), border-color var(--t), box-shadow var(--t); animation: entree .3s ease both; }
.proposition:nth-of-type(2) { animation-delay: .05s; } .proposition:nth-of-type(3) { animation-delay: .1s; }
.proposition:nth-of-type(4) { animation-delay: .15s; } .proposition:nth-of-type(5) { animation-delay: .2s; }
.proposition.ecartee { opacity: .55; }
.proposition.ecartee .corps { display: none; }
.proposition-tete { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.proposition-tete .titre { flex: 1; min-width: 200px; font-weight: 700; font-size: 15px; }
.proposition .corps { margin-top: 14px; border-top: 1px solid var(--line2); padding-top: 4px; }
.section-titre {
  display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em; margin: 20px 0 10px;
}
.section-titre .i { color: var(--faint); }
.factuel {
  border-left: 3px solid var(--faint); background: var(--surface2); padding: 10px 14px; margin: 10px 0;
  border-radius: 0 8px 8px 0; font-size: 13px;
}
.factuel ul { margin: 6px 0 0 18px; }
.factuel li { margin: 3px 0; }
.resultat-cotation {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding: 10px 14px;
  border-radius: 10px; background: var(--surface2); border: 1px solid var(--line2); font-size: 13px; color: var(--muted);
}
.resultat-cotation strong { color: var(--ink); font-weight: 650; }
.barre-actions {
  position: sticky; bottom: 16px; z-index: 30; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow3); margin-top: 8px;
}
.barre-actions .resume { flex: 1; font-weight: 600; color: var(--ink2); }
.barre-actions .resume strong { color: var(--accent); font-variant-numeric: tabular-nums; }

/* ---- DICT ----------------------------------------------------------------------------------- */
.grille-dict { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 4px 0 6px; }
.grille-dict > div { padding: 12px 10px; border-radius: 10px; background: var(--surface2); border: 1px solid var(--line2); }
.grille-dict small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 650; margin-bottom: 8px; }

/* ---- État vide ------------------------------------------------------------------------------- */
.etat-vide { text-align: center; padding: 34px 20px; color: var(--muted); }
.etat-vide .cercle { width: 56px; height: 56px; border-radius: 50%; background: var(--surface3); color: var(--faint);
                     display: grid; place-items: center; margin: 0 auto 12px; }
.etat-vide .cercle .i { width: 24px; height: 24px; }
.etat-vide strong { display: block; color: var(--ink2); font-size: 14.5px; margin-bottom: 4px; }
.etat-vide .bouton { margin-top: 14px; }

/* ---- Chat ------------------------------------------------------------------------------------ */
.chat-fil {
  max-height: 420px; min-height: 160px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; background: var(--surface2); margin-bottom: 12px; display: flex; flex-direction: column; gap: 12px;
}
.chat-fil[hidden] { display: none; }
.chat-tour { max-width: 85%; animation: entree .25s ease both; }
.chat-tour.user { align-self: flex-end; }
.chat-tour .qui { font-weight: 700; font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }
.chat-tour.user .qui { text-align: right; }
.chat-tour .bulle { white-space: pre-wrap; padding: 10px 13px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.chat-tour.user .bulle { background: var(--accent); color: #fff; border-color: var(--accent); border-bottom-right-radius: 4px; }
.chat-tour.assistant .bulle { background: none; border: 0; padding: 2px 0; border-radius: 0; }
.bulle.saisie::after { content: '•••'; letter-spacing: 3px; color: var(--faint); animation: pulse 1s ease-in-out infinite; }
.chat-sources { color: var(--faint); font-size: 11.5px; margin-top: 4px; }
.chat-saisie { display: flex; gap: 10px; }
.chat-saisie input { flex: 1; }
.mail { background: var(--surface2); white-space: pre-wrap; font-size: 13px; border-radius: 10px; border: 1px solid var(--line); padding: 14px; margin-top: 8px; }

/* ---- Écran d'attente (appels au modèle) ------------------------------------------------------ */
.attente {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px;
  background: rgba(15, 20, 27, .42); backdrop-filter: blur(3px); opacity: 0; transition: opacity .25s;
}
.attente.visible { opacity: 1; }
.attente[hidden] { display: none; }
.attente-boite {
  width: min(420px, 100%); background: var(--surface); border-radius: 18px; padding: 30px 28px 24px;
  box-shadow: var(--shadow3); text-align: center; transform: translateY(8px) scale(.98); transition: transform .3s;
}
.attente.visible .attente-boite { transform: none; }
.attente-anneau {
  width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; position: relative;
  color: var(--accent); background: var(--accent-soft);
}
.attente-anneau::before {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  border: 3px solid transparent; border-top-color: var(--accent); border-right-color: var(--accent);
  animation: tourne 1.1s linear infinite;
}
.attente-anneau .i { width: 26px; height: 26px; animation: pulse 1.6s ease-in-out infinite; }
.attente-titre { font-size: 17px; font-weight: 750; margin-bottom: 14px; }
.attente-etapes { list-style: none; text-align: left; display: flex; flex-direction: column; gap: 8px; margin: 0 auto 16px; max-width: 300px; }
.attente-etapes li { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 13.5px; transition: color .3s; }
.attente-etapes li::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--line); flex: none; transition: all .3s; }
.attente-etapes li.passee { color: var(--muted); }
.attente-etapes li.passee::before { background: var(--ok); }
.attente-etapes li.en-cours { color: var(--ink); font-weight: 650; }
.attente-etapes li.en-cours::before { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); animation: pulse 1.2s ease-in-out infinite; }
.attente-note { font-size: 12.5px; color: var(--muted); }

/* ---- Animations ------------------------------------------------------------------------------ */
@keyframes entree { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes glisse { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes disparait { to { opacity: 0; transform: translateY(-6px); height: 0; padding: 0; margin: 0; border-width: 0; } }
@keyframes tourne { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .55; transform: scale(.92); } }
@keyframes pop { 0% { transform: scale(.85); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: rgba(23, 37, 56, .18); border-radius: 8px; border: 3px solid transparent; background-clip: content-box; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ==============================================================================   Mobile (≤900px) : le menu devient un panneau plein écran par-dessus le contenu.
   ============================================================================================ */
@media (max-width: 1080px) {
  .declaration { grid-template-columns: 1fr; }
  .guide { position: static; }
}
@media (max-width: 900px) {
  .main { margin-left: 0 !important; }
  [data-sidebar="ouverte"] .sidebar { transform: translateX(0); }
  [data-sidebar="ouverte"] .sidebar-fond { display: block; position: fixed; inset: 0; z-index: 49; background: rgba(15, 20, 27, .45); }
  .topbar { padding: 10px 14px; gap: 10px; margin-left: var(--gap); min-height: 56px; }
  .kpi { min-height: 112px; }
  .sidebar { inset: 0 auto 0 0; border-radius: 0 var(--r-lg) var(--r-lg) 0; }
  .topbar-action span { display: none; }
  .topbar-action { width: 36px; padding: 0; }
  .content, main.content { padding: 18px 14px 56px; }
  h1 { font-size: 21px; }
  .kpis { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi { padding: 12px; gap: 10px; }
  .kpi-ico { width: 34px; height: 34px; }
  .kpi .n { font-size: 21px; }
  .grille-2, .grille-3 { grid-template-columns: 1fr; }
  .grille-dict { grid-template-columns: repeat(2, 1fr); }
  .filtres > div { min-width: 0; width: 100%; }
  .chat-saisie:not(.assistant-saisie) { flex-direction: column; }
  .chat-tour { max-width: 100%; }
  .carte { padding: 16px; }
  .etapes li + li::before { width: 14px; margin: 0 6px; }
  .etapes .libelle { display: none; }
  .etapes li.courante .libelle { display: inline; }
  .masquer-mobile { display: none; }
  input, select, textarea { font-size: 16px; } /* évite le zoom automatique d'iOS */
}
@media (max-width: 480px) { .kpis { grid-template-columns: 1fr 1fr; } }
.proposition-tete .etiquette { white-space: normal; }

[hidden] { display: none !important; }
select.a-renseigner { border-color: var(--q2); box-shadow: 0 0 0 3px rgba(201, 138, 11, .2); }
#bouton-valider:disabled { cursor: not-allowed; }

/* ---- Pastilles de cotation et matrice 4x4 ---------------------------------------------- */
.pastille { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; background: var(--surface3); vertical-align: middle; }
.pastille.CRITIQUE { background: var(--q1); } .pastille.ELEVE { background: var(--q3); }
.pastille.MODERE { background: var(--q2); } .pastille.FAIBLE { background: var(--q4); }
.matrice { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; max-width: 260px; }
.matrice.compacte { max-width: 170px; }
.matrice .case { aspect-ratio: 1; border-radius: 6px; display: flex; flex-wrap: wrap; gap: 3px; align-items: center; justify-content: center; opacity: .85; }
.matrice .case.CRITIQUE { background: var(--q1-bg); box-shadow: inset 0 0 0 1px var(--q1); }
.matrice .case.ELEVE { background: var(--q3-bg); box-shadow: inset 0 0 0 1px var(--q3); }
.matrice .case.MODERE { background: var(--q2-bg); box-shadow: inset 0 0 0 1px var(--q2); }
.matrice .case.FAIBLE { background: var(--q4-bg); box-shadow: inset 0 0 0 1px var(--q4); }
.matrice .point { width: 12px; height: 12px; border-radius: 50%; background: var(--ink); animation: scintille 1.4s ease-in-out infinite; }
a.point { cursor: pointer; }
@keyframes scintille { 0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(47, 111, 208, .55); }
  50% { transform: scale(1.25); box-shadow: 0 0 0 6px rgba(47, 111, 208, 0); } }
.matrice-cadre { display: flex; gap: 6px; align-items: stretch; }
.matrice-corps { min-width: 0; flex: 1; }
.axe-y { writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; font-size: 11px; color: var(--muted); }
.axe-x { font-size: 11px; color: var(--muted); margin-top: 4px; text-align: center; }
.cotation-visuelle { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }

.section-sous { font-weight: 600; font-size: 13px; margin: 6px 0; }
.actions .action { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; padding: 8px 10px; background: var(--surface2); border-radius: 12px; }
.actions .action input[type=text] { flex: 1; min-width: 0; }
.actions .action input[type=date] { flex: none; width: auto; }
.actions .retirer, .ajouter-action { background: none; border: 1px solid var(--line, #ccc); border-radius: 10px; padding: 4px 10px; cursor: pointer; }

.matrices-risques { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 16px; }
.matrices-risques > div { min-width: 200px; }

/* Page Options : coûts */
.cout-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin: 1rem 0; }
.cout-kpi { background: var(--surface, var(--carte, #fff)); border: 1px solid var(--bordure, #ddd); border-radius: 10px; padding: .8rem 1rem;
  display: flex; flex-direction: column; }
.cout-kpi-v { font-size: 1.5rem; font-weight: 700; }
.cout-kpi-l { font-size: .8rem; opacity: .7; }
.barre-ligne { display: grid; grid-template-columns: minmax(90px, 14rem) 1fr auto; gap: .6rem; align-items: center; margin: .35rem 0; }
.barre-nom { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barre { height: 12px; background: var(--hach-fond); border-radius: 999px; overflow: hidden; }
.barre > span { display: block; height: 100%; background: var(--marque); border-radius: 999px; min-width: 6px; }
.barre.b1 > span { background: var(--marque2); } .barre.b2 > span { background: var(--marque); }
.barre.b3 > span { background: var(--rouge-clair); } .barre.b4 > span { background: var(--rouge-pale); }
.barre.alerte-barre > span { background: #e67e22; }
.barre-val { font-variant-numeric: tabular-nums; font-size: .9rem; }
.histo { display: flex; align-items: flex-end; gap: 8px; height: 210px; padding-top: 8px; }
.histo-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; }
.histo-col > span { display: block; width: 100%; max-width: 40px; background: linear-gradient(180deg, var(--marque), var(--marque2)); border-radius: 999px; min-height: 8px; }
.histo-col small { font-size: 11px; color: var(--ink2); margin-top: 8px; }
.histo-col b { font-size: 10.5px; font-weight: 600; color: var(--ink2); margin-bottom: 4px; white-space: nowrap; }
.projection { display: flex; gap: .6rem; align-items: end; flex-wrap: wrap; margin-bottom: .6rem; }
.projection input { width: 6rem; }
.discret { opacity: .65; font-size: .85rem; }

.foot-utilisateur { display: flex; align-items: center; gap: 8px; padding: 6px 10px; color: inherit; text-decoration: none; font-size: 13px; }
.foot-utilisateur small { display: block; opacity: .65; font-size: 11px; }

/* Tableau de bord /projets : capsules de criticité + demi-anneau du parcours sécurité (tons rouges de la marque) */
:root { --st-fait: #2E9E5B; --st-encours: #E8A317; --hach-fond: #ECEEF1; --hach-trait: rgba(110, 120, 135, .38); --rouge-clair: #E2788A; --rouge-pale: #F3BCC5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) { --hach-fond: #1A222C; --hach-trait: rgba(160, 172, 188, .30); } }
:root[data-theme=dark] { --hach-fond: #1A222C; --hach-trait: rgba(160, 172, 188, .30); }
.kpi .delta { margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--q4); }
.kpis .kpi:first-child .delta { color: rgba(255, 255, 255, .92); }
.graphiques { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: var(--gap); margin-bottom: 22px; }
.graphiques .carte { margin: 0; }
.capsules { display: flex; align-items: flex-end; gap: 14px; height: 210px; padding-top: 8px; }
.capsule-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; }
.capsule { width: 100%; max-width: 76px; border-radius: 999px; display: flex; align-items: flex-start; justify-content: center;
  padding-top: 12px; color: #fff; font-weight: 700; font-size: 15px; transition: height .3s; }
.capsule.CRITIQUE { background: var(--marque2); } .capsule.ELEVE { background: var(--marque); }
.capsule.MODERE { background: var(--rouge-clair); } .capsule.FAIBLE { background: var(--rouge-pale); color: var(--marque2); }
.capsule.NON_DEFINI { background: #8D97A4; color: #fff; }
.capsule.vide { background: repeating-linear-gradient(135deg, var(--hach-trait) 0 2px, var(--hach-fond) 2px 7px); color: var(--ink2); }
.capsule-lib { margin-top: 10px; font-size: 12.5px; color: var(--ink2); text-align: center; white-space: nowrap; }
.demi-donut { position: relative; max-width: 300px; margin: 8px auto 0; }
.demi-donut svg { width: 100%; display: block; }
.arc { fill: none; stroke-width: 40; stroke-linecap: round; }
.arc.piste { stroke: url(#hachures); } .arc.encours { stroke: var(--st-encours); } .arc.fait { stroke: var(--st-fait); }
.demi-donut .centre { position: absolute; left: 0; right: 0; bottom: 4px; text-align: center; }
.demi-donut .pct { font-size: 40px; font-weight: 750; letter-spacing: -.03em; line-height: 1; }
.demi-donut .sous { font-size: 12px; color: var(--ink2); margin-top: 4px; }
.legende { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 16px; margin: 14px 0 6px; font-size: 12.5px; color: var(--ink2); }
.legende .pt { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.pt.fait { background: var(--st-fait); } .pt.encours { background: var(--st-encours); }
.pt.afaire { background: repeating-linear-gradient(135deg, var(--hach-trait) 0 2px, var(--hach-fond) 2px 5px); }
.etapes-parcours { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 9px; }
.etapes-parcours li { display: grid; grid-template-columns: 1fr 90px 34px; align-items: center; gap: 10px; font-size: 13px; }
.etapes-parcours .barre { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--hach-fond); }
.etapes-parcours .barre .f { background: var(--marque2); } .etapes-parcours .barre .c { background: var(--marque); }
.etapes-parcours .val { text-align: right; color: var(--ink2); font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .graphiques { grid-template-columns: 1fr; } .capsules { height: 170px; gap: 8px; } }

.projection-valeur { font-size: clamp(34px, 3.4vw, 46px); font-weight: 700; letter-spacing: -.04em; line-height: 1.1; color: var(--marque); margin: 6px 0 4px; }
.projection-valeur small { display: block; font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--ink2); }
details.avance.lecture { margin: 0 0 18px; border-top: 0; padding-top: 0; }
details.avance.sans-trait { margin-top: 0; border-top: 0; padding-top: 0; }
@media (max-width: 900px) { .histo { height: 170px; gap: 5px; } }
.histo + .discret { margin-top: 14px; }
@media (max-width: 700px) {
  .barre-ligne { grid-template-columns: 1fr auto; row-gap: 4px; margin: .7rem 0; }
  .barre-ligne .barre { grid-column: 1 / -1; grid-row: 2; }
}

/* Dictée vocale */
.vocal { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0 0; }
.vocal[hidden] { display: none; }
.vocal button.micro { display: inline-flex; align-items: center; gap: 6px; }
.vocal button.micro.enregistre { background: var(--marque); color: #fff; border-color: var(--marque); animation: pulse-micro 1.2s infinite; }
.vocal select { width: auto; height: 34px; padding: 4px 32px 4px 10px; font-size: .85rem; }
.vocal-statut { font-size: .85rem; color: #666; }
.vocal[data-etat="err"] .vocal-statut { color: var(--marque); }
.vocal[data-etat="ok"] .vocal-statut { color: #1b7f3b; }
@keyframes pulse-micro { 0%,100% { box-shadow: 0 0 0 0 rgba(200,16,46,.45); } 50% { box-shadow: 0 0 0 8px rgba(200,16,46,0); } }
.vocal-apercu { flex-basis: 100%; font-size: .9rem; color: #777; font-style: italic; border-left: 3px solid var(--rouge-clair, #f3c0c8); padding-left: 10px; max-height: 6.5em; overflow: auto; }
.vocal-apercu[hidden] { display: none; }

/* Parcours : une couleur par STATUT (vert terminé, orange en cours, hachuré à faire), identique pour toutes les étapes */
.etapes-parcours li { --t1: var(--st-fait); --t2: var(--st-encours); --t3: var(--hach-fond); }
.etapes-parcours .barre { background: var(--t3); }
.etapes-parcours .barre .f { background: var(--t1); } .etapes-parcours .barre .c { background: var(--t2); }
.etapes-parcours .pastille { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; background: var(--faint, #9aa3ae); }
.etapes-parcours .val { color: var(--ink2); font-weight: 650; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .etapes-parcours .barre { background: var(--hach-fond); } }
:root[data-theme=dark] .etapes-parcours .barre { background: var(--hach-fond); }

.role-repliable { border: 1px solid var(--bordure, #ddd); border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; }
.role-repliable > summary { cursor: pointer; }
.role-repliable[open] > summary { margin-bottom: 6px; }

/* Saisie de mot de passe : critères visuels */
.mdp-ligne { display: flex; gap: 8px; }
.mdp-ligne input { flex: 1; min-width: 0; }
.mdp-oeil { height: 40px; white-space: nowrap; }
.mdp-barre { height: 6px; border-radius: 3px; background: var(--border, #e3e5ea); margin: 10px 0 8px; overflow: hidden; }
.mdp-barre > span { display: block; height: 100%; width: 0; transition: width .2s, background .2s; background: #c62828; }
.mdp-barre > span[data-niveau="moyen"] { background: #e08a00; }
.mdp-barre > span[data-niveau="fort"] { background: #2e7d32; }
.mdp-regles { list-style: none; margin: 0 0 12px; padding: 0; font-size: .9em; }
.mdp-regles li { color: #c62828; padding: 2px 0; }
.mdp-regles li.ok { color: #2e7d32; }
.mdp-etat { display: inline-block; width: 1.2em; font-weight: 700; }
.mdp-egal { margin: 6px 0 0; font-size: .9em; color: #c62828; }
.mdp-egal.ok { color: #2e7d32; }
button:disabled { opacity: .55; cursor: not-allowed; }

/* Sous-menu Administration (barre latérale) */
.nav-sous-menu > summary {
  display: flex; align-items: center; gap: 14px; padding: 11px 28px; cursor: pointer; list-style: none;
  color: var(--muted); font-size: 14.5px; font-weight: 500;
}
.nav-sous-menu > summary::-webkit-details-marker { display: none; }
.nav-sous-menu > summary::after { content: '\25B8'; margin-left: auto; transition: transform var(--t); }
.nav-sous-menu[open] > summary::after { transform: rotate(90deg); }
.nav-sous-menu > summary:hover { color: var(--ink); }
.nav-sous-menu > summary .i { width: 20px; height: 20px; }
.nav .nav-sous-menu a { padding: 8px 28px 8px 62px; font-size: 13.5px; }
.nav .nav-sous-menu a.actif::before { top: 3px; bottom: 3px; }

/* ---- EBIOS RM : ateliers (2026-10-06) -------------------------------------------------- */
.eb-badge { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--marque, #C8102E); color: #fff; font-weight: 800; font-size: 15px; margin-right: 8px; vertical-align: middle; }
.eb-etapes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 0 0 16px; }
.eb-etape { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface); color: var(--ink); text-decoration: none; position: relative; }
.eb-etape:hover { text-decoration: none; border-color: var(--accent); }
.eb-etape .eb-num { width: 22px; height: 22px; border-radius: 50%; background: var(--surface3); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; }
.eb-etape .eb-lib { font-size: 12.5px; font-weight: 650; line-height: 1.25; }
.eb-etape small { font-size: 11px; color: var(--muted); }
.eb-etape.valide .eb-num { background: var(--q4, #2E9E5B); color: #fff; }
.eb-etape.brouillon .eb-num { background: var(--accent); color: #fff; }
.eb-etape.a_revoir .eb-num { background: #F59E0B; color: #1a1a1a; }
.eb-etape.a_revoir small { color: #B45309; font-weight: 700; }
.eb-etape.courant { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
@media (max-width: 900px) { .eb-etapes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.eb-contexte summary, details.carte summary { cursor: pointer; }
.eb-contexte textarea { width: 100%; }
.eb-visuel > *, .eb-editeurs > * { margin-bottom: 14px; }
.eb-section h2 { margin-bottom: 8px; display: inline; }
details.eb-section > summary { cursor: pointer; margin-bottom: 8px; list-style-position: inside; }
.eb-items { display: grid; gap: 10px; }
.eb-item { position: relative; border: 1px solid var(--line); border-radius: var(--r-s); padding: 12px 40px 12px 12px; background: var(--surface2); }
.eb-item.eb-flash { box-shadow: 0 0 0 3px var(--accent); }
.eb-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 10px; }
.eb-champ { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); font-weight: 600; }
.eb-champ.large { grid-column: 1 / -1; }
.eb-champ.petit { max-width: 110px; }
.eb-champ textarea, .eb-champ input, .eb-champ select { width: 100%; font-weight: 400; color: var(--ink); }
.eb-champ textarea { min-height: 54px; resize: vertical; }
.eb-suppr { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; padding: 0; border-radius: 50%; background: none; border: 1px solid var(--line); color: var(--muted); cursor: pointer; }
.eb-suppr:hover { color: var(--q1, #C8102E); border-color: var(--q1, #C8102E); }
.eb-ajout { margin-top: 10px; }
.eb-calc { margin-top: 8px; font-size: 12.5px; color: var(--ink2); }
.eb-imbrique { margin: 10px 0 0; background: var(--surface); border-style: dashed; }
.eb-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.eb-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.eb-kpi { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--r-s); padding: 12px 14px; }
.eb-kpi .n { font-size: 28px; font-weight: 800; color: var(--accent); line-height: 1; }
.eb-kpi .l { font-size: 12px; font-weight: 650; margin-top: 4px; color: var(--ink2); }
.eb-prog { height: 7px; background: var(--surface3); border-radius: 4px; overflow: hidden; min-width: 50px; flex: 1; }
.eb-prog > span { display: block; height: 100%; border-radius: 4px; }
.eb-socle { margin-bottom: 10px; }
.flex-entre { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.eb-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.eb-cartes.large { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.eb-carte-vm, .eb-carte-so, .eb-carte-ss { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: var(--r-s); padding: 12px 14px; }
.eb-carte-ss { border-left-color: var(--accent); }
.eb-nom { font-weight: 750; margin: 6px 0; }
.eb-carte-so ul { margin: 8px 0 0 18px; font-size: 12.5px; }
.eb-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 11px; margin: 2px 4px 2px 0; background: var(--surface3); color: var(--ink2); }
.eb-tag[style*="background"] { color: #fff; }
.eb-tag.t-D { background: #C44A4A; color: #fff; } .eb-tag.t-I { background: #D98A0B; color: #fff; } .eb-tag.t-C { background: #4A6FC4; color: #fff; } .eb-tag.t-T { background: #7A3FB0; color: #fff; }
.eb-pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 5px; color: #fff; background: #6B7785; }
.eb-pill.niv-Inacceptable { background: #0A0A0A; border: 1px solid #666; } .eb-pill.niv-Elevé { background: #D32F2F; } .eb-pill.niv-Modéré { background: #F59E0B; color: #1a1a1a; }
.eb-pill.niv-Faible { background: #FCD34D; color: #1a1a1a; } .eb-pill.niv-Trèsfaible { background: #4CAF50; }
.eb-pill.grav-4 { background: #D32F2F; } .eb-pill.grav-3 { background: #F59E0B; color: #1a1a1a; } .eb-pill.grav-2 { background: #FCD34D; color: #1a1a1a; } .eb-pill.grav-1 { background: #4CAF50; }
.eb-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.eb-tbl th { text-align: left; padding: 7px 9px; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); border-bottom: 2px solid var(--line); }
.eb-tbl td { padding: 7px 9px; border-bottom: 1px solid var(--line2); vertical-align: top; }
.eb-deux { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 1000px) { .eb-deux { grid-template-columns: 1fr; } }
.eb-radar-boite { display: flex; justify-content: center; }
.eb-radar { width: 100%; max-width: 440px; height: auto; }
.eb-radar .r-fond { fill: var(--surface2); stroke: var(--line); }
.eb-radar .r-lib { fill: var(--ink2); }
.eb-pp { display: flex; align-items: center; gap: 10px; padding: 6px 2px; border-bottom: 1px solid var(--line2); }
.eb-pp-nom { min-width: 130px; font-size: 12.5px; font-weight: 650; }
.eb-ctre { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin-top: 8px; }
.eb-step { border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.eb-step .h { padding: 4px; font-size: 10.5px; font-weight: 800; color: #fff; text-align: center; }
.eb-step .b { padding: 6px; font-size: 11px; color: var(--ink2); min-height: 44px; }
.eb-farmers { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 24px; }
.eb-sous-titre { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; }
.eb-farmer { display: grid; grid-template-columns: 72px repeat(5, minmax(0, 1fr)); gap: 3px; }
.eb-farmer .xh, .eb-farmer .yh { font-size: 10px; font-weight: 700; color: var(--muted); display: flex; align-items: center; justify-content: center; text-align: center; padding: 2px; }
.eb-farmer .yh { justify-content: flex-end; padding-right: 6px; }
.eb-farmer .fcell { min-height: 54px; border-radius: 5px; padding: 4px; display: flex; flex-wrap: wrap; gap: 3px; align-content: flex-start; }
.eb-farmer .fdot { min-width: 28px; height: 22px; padding: 0 4px; background: #fff; border: 1px solid rgba(0,0,0,.5); border-radius: 3px; font-size: 10px; font-weight: 800; color: #000; cursor: pointer; }
.eb-farmer .fdot:hover { transform: scale(1.15); }
.eb-legende { margin-top: 10px; }
.eb-versions { list-style: none; display: grid; gap: 6px; margin-top: 8px; }
.eb-historique { width: 100%; font-size: 12.5px; margin-top: 8px; border-collapse: collapse; }
.eb-historique th { text-align: left; font-size: 11px; color: var(--muted); padding: 4px 8px; }
.eb-historique td { padding: 4px 8px; border-top: 1px solid var(--line2); }
button.lien { background: none; border: 0; box-shadow: none; padding: 0 4px; color: var(--accent); text-decoration: underline; height: auto; cursor: pointer; }
.eb-deux-choix { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin-top: 8px; }
.eb-choix-carte { border: 1px solid var(--line); border-radius: var(--r-s); padding: 14px; background: var(--surface2); }
.eb-choix-carte.actif { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.eb-choix { margin-bottom: 14px; }

/* Bascule clair/sombre : une seule vitesse pour la page et tous les composants (classe posée le temps du changement). */
html.theme-transition, html.theme-transition *, html.theme-transition *::before, html.theme-transition *::after {
  transition: background-color .3s ease, color .3s ease, border-color .3s ease, box-shadow .3s ease, fill .3s ease, stroke .3s ease !important;
}

/* ---- EBIOS RM : schéma interactif de la page de synthèse ------------------------------------- */
:root { --sc-rose: #F4D5DB; --sc-rose-trait: #E08AA0; --sc-rose-txt: #B14465; --sc-cycle: #0F2A4A; --sc-flux: #9FD3F5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) { --sc-rose: #3A2830; --sc-rose-trait: #7A3A4C; --sc-rose-txt: #E08AA0; --sc-cycle: #8FB4E8; --sc-flux: #0F2A4A; } }
:root[data-theme=dark] { --sc-rose: #3A2830; --sc-rose-trait: #7A3A4C; --sc-rose-txt: #E08AA0; --sc-cycle: #8FB4E8; --sc-flux: #0F2A4A; }
.eb-schema { width: 100%; max-width: 940px; height: auto; display: block; margin: 0 auto; }
.eb-schema text { font-family: var(--font); }
.sc-appreciation { fill: var(--sc-rose); stroke: var(--sc-rose-trait); stroke-width: 2; }
.sc-lib-appr { font-size: 13px; font-weight: 700; fill: var(--sc-rose-txt); cursor: default; }
.sc-cycle { cursor: pointer; outline: none; }
.sc-cycle-fond { fill: none; stroke: var(--sc-cycle); stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; transition: stroke .2s; }
.sc-cycle-flux { fill: none; stroke: var(--sc-flux); stroke-width: 3; stroke-dasharray: 2 18; stroke-linecap: round; animation: sc-flux 1.4s linear infinite; }
.sc-cycle:hover .sc-cycle-fond, .sc-cycle:focus .sc-cycle-fond { stroke: var(--accent); }
@keyframes sc-flux { to { stroke-dashoffset: -20; } }
.sc-fleche { fill: var(--sc-cycle); }
.sc-liaison { stroke: var(--sc-cycle); stroke-width: 2.2; stroke-dasharray: 3 5; }
.sc-lib-cycle { font-size: 14px; font-weight: 800; fill: var(--sc-cycle); paint-order: stroke; stroke: var(--bg); stroke-width: 8px; stroke-linejoin: round; cursor: pointer; }
.sc-atelier { cursor: pointer; outline: none; text-decoration: none; }
.sc-atelier:hover, .sc-atelier:hover text { text-decoration: none; }
.sc-forme { transition: filter .2s ease, transform .2s ease; transform-box: fill-box; transform-origin: center; }
.sc-atelier:hover .sc-forme, .sc-atelier:focus .sc-forme { filter: brightness(1.12) drop-shadow(0 5px 8px rgba(0, 0, 0, .28)); transform: scale(1.05); }
.sc-titre { fill: #fff; font-size: 13px; font-weight: 800; pointer-events: none; }
.sc-sous { fill: #fff; font-size: 8.5px; font-weight: 600; pointer-events: none; }
.sc-etat-fond { fill: #fff; stroke: rgba(0, 0, 0, .25); stroke-width: 1; }
.sc-etat-sym { font-size: 13px; font-weight: 800; fill: #444; }
.st-valide .sc-etat-fond { fill: #2E9E5B; } .st-valide .sc-etat-sym { fill: #fff; }
.st-brouillon .sc-etat-fond { fill: #2F6FD0; } .st-brouillon .sc-etat-sym { fill: #fff; }
.st-a_revoir .sc-etat-fond { fill: #F59E0B; } .st-a_revoir .sc-etat-sym { fill: #1a1a1a; }
.sc-obsolete { fill: #F59E0B; stroke: #fff; stroke-width: 1.5; }
.sc-orbite { stroke: rgba(15, 42, 74, .9); stroke-width: 2.4; stroke-dasharray: 7 5; animation: sc-flux 2.2s linear infinite; pointer-events: none; }
.sc-orbite-tete { fill: rgba(15, 42, 74, .9); pointer-events: none; }
.sc-pastille { cursor: default; outline: none; }
.sc-pastille-fond { fill: #fff; stroke: var(--sc-rose-trait); stroke-width: 2; transition: transform .2s; transform-box: fill-box; transform-origin: center; }
.sc-pastille:hover .sc-pastille-fond { transform: scale(1.08); }
.sc-pastille-lib { font-size: 8px; font-weight: 800; font-style: italic; fill: #0F2A4A; pointer-events: none; }
.sc-icone { stroke: #0F2A4A; stroke-width: 1.6; stroke-linecap: round; }
.eb-info { margin: 12px auto 0; max-width: 940px; padding: 12px 16px; min-height: 92px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface); }
.eb-info p { margin: 4px 0 0; }
.eb-cartes-ateliers { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin-top: 14px; }
.eb-carte-atelier { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface); color: var(--ink); text-decoration: none; }
.eb-carte-atelier:hover { text-decoration: none; border-color: var(--accent); }
.eb-carte-atelier .eb-num { width: 24px; height: 24px; }
@media (prefers-reduced-motion: reduce) { .sc-cycle-flux, .sc-orbite { animation: none; } .sc-forme { transition: none; } }

/* ---- EBIOS RM : champs du guide (listes à cocher, chaînes, phases) ------------------------------ */
.eb-champ-bool { flex-direction: row; align-items: center; gap: 8px; font-size: 13px; color: var(--ink2); }
.eb-champ-bool input { width: auto; }
.eb-multi { display: flex; flex-wrap: wrap; gap: 6px; }
.eb-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); font-size: 12px; font-weight: 600; color: var(--ink2); cursor: pointer; }
.eb-chip input { width: auto; margin: 0; }
.eb-chip:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.eb-chaine { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; align-items: center; }
.eb-bs { display: inline-block; font-size: 11.5px; padding: 2px 8px; border-radius: 6px; background: var(--surface3); color: var(--ink2); border: 1px solid var(--line); }
.eb-etape-ch { display: inline-block; font-size: 11.5px; padding: 2px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--ink2); }
.eb-chemin { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 12.5px; }
.eb-ops { display: grid; gap: 12px; }
.eb-op { border: 1px solid var(--line); border-radius: var(--r-s); padding: 12px 14px; background: var(--surface); }
.eb-phases { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 10px 0 4px; }
@media (max-width: 900px) { .eb-phases { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.eb-phases .eb-step .b ul { margin: 0 0 0 14px; padding: 0; }
.eb-bascule { display: inline-flex; gap: 6px; margin-bottom: 8px; }
.eb-bascule button.actif { background: var(--accent); color: #fff; border-color: var(--accent); }
.eb-tbl-boite { overflow-x: auto; }
.eb-tbl td .eb-tag, .eb-tbl td .eb-pill { margin: 1px 2px; }
.eb-mode { border: 1px solid var(--line); border-radius: var(--r-s); padding: 8px 10px; margin-top: 8px; background: var(--surface2); }
.eb-mode-max { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.eb-phases .eb-step .b li { margin-bottom: 3px; }

/* Filtres de /projets : icône + menu déroulant ; graphiques/indicateurs servant de raccourcis (jamais de lien bleu souligné) */
.barre-filtres { display: flex; flex-wrap: nowrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.barre-filtres .champ-icone { flex: 0 1 240px; min-width: 150px; }
.barre-filtres input[type=search] { height: 38px; }
.barre-filtres button[type=submit], .barre-filtres .bouton { height: 38px; white-space: nowrap; }
.menu-filtre { position: relative; flex: none; }
.bouton-filtre { width: 38px; height: 38px; padding: 0; display: inline-flex; align-items: center; justify-content: center; position: relative; }
.bouton-filtre .i { width: 17px; height: 17px; }
.bouton-filtre.actif { border-color: var(--marque); color: var(--marque); }
.bouton-filtre .compte { position: absolute; top: -6px; right: -6px; min-width: 17px; height: 17px; border-radius: 9px; padding: 0 4px;
  background: var(--marque); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center; }
/* Bulle légère sous l'icône, avec une pointe */
.menu-filtre-panneau { position: absolute; z-index: 30; top: 48px; left: -8px; width: 232px; padding: 10px 12px; display: grid; gap: 7px;
  background: var(--card, #fff); border: 1px solid var(--border, #e3e5ea); border-radius: 12px; box-shadow: 0 6px 18px rgba(0, 0, 0, .10); }
.menu-filtre-panneau::before { content: ""; position: absolute; top: -6px; left: 19px; width: 10px; height: 10px; transform: rotate(45deg);
  background: var(--card, #fff); border-left: 1px solid var(--border, #e3e5ea); border-top: 1px solid var(--border, #e3e5ea); }
.menu-filtre-panneau[hidden] { display: none; }
.menu-filtre-panneau label { display: grid; grid-template-columns: 82px 1fr; gap: 8px; align-items: center; font-size: 12px; font-weight: 600; color: var(--muted); }
.menu-filtre-panneau select { width: 100%; height: 30px; padding: 0 22px 0 8px; font-size: 12.5px; border-radius: 8px; }
.menu-filtre-panneau .reinit { font-size: 12px; text-align: right; color: var(--muted); }
@media (max-width: 560px) { .barre-filtres { flex-wrap: wrap; } .barre-filtres .champ-icone { flex-basis: 100%; } }
.puces-filtres { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 16px; }
.puce-filtre { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--rouge-pale); color: var(--marque2); text-decoration: none; }
.puce-filtre .i { width: 13px; height: 13px; }
.puce-filtre:hover { text-decoration: none; filter: brightness(.95); }
a.kpi, a.lien-filtre, a.lien-filtre:visited, a.lien-filtre:hover, a.kpi:hover, .etapes-parcours a, .etapes-parcours a:hover, .demi-donut a, .legende a
  { text-decoration: none !important; color: inherit; cursor: pointer; }
.etapes-parcours a.val { color: var(--ink2); }
a.kpi:hover { box-shadow: 0 0 0 2px var(--marque); }
.legende a { display: inline-flex; align-items: center; gap: 6px; }
.legende a:hover { opacity: .75; }
.demi-donut a { cursor: pointer; } .demi-donut a:hover .arc { filter: brightness(1.12); }
.capsule-col.lien-filtre:hover .capsule, .capsule-col.actif .capsule { outline: 2px solid var(--ink2); outline-offset: 2px; }
.etapes-parcours a.lib:hover, .etapes-parcours a.val:hover { opacity: .7; }
.etapes-parcours li.actif .lib { font-weight: 700; }
.etapes-parcours .barre a { display: block; height: 100%; }
.etapes-parcours .barre a:hover { filter: brightness(1.15); }

/* Page Analyse de risques : choix de la portée */
.portees { display: grid; gap: 8px; margin-top: 6px; }
.portee { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 400; background: var(--surface); color: var(--ink); }
.portee:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.portee:has(input:checked) span { color: var(--ink2); }
.portee input { margin-top: 3px; width: auto; }
.portee strong { display: block; font-size: 14px; }
.portee span { font-size: 13px; color: var(--muted); }

/* Actions de remédiation : titre, responsable, échéance, preuve attendue */
.proposition .actions .action { display: grid; gap: 6px; padding: 10px; margin-bottom: 8px; border: 1px solid var(--border, #e3e5ea); border-radius: 10px; }
.proposition .action-ligne { display: flex; gap: 8px; align-items: center; }
.proposition .action-ligne input[type=text] { flex: 1; }
.proposition .action-ligne select { flex: 1; min-width: 0; }
.proposition .action-ligne input[type=date] { flex: 0 0 160px; }
.proposition .action-piece summary { cursor: pointer; font-size: 12.5px; color: var(--muted); }
.proposition .action-piece input, .proposition .action-piece textarea { margin-top: 6px; }

.responsable-risque summary { cursor: pointer; font-size: 13.5px; padding: 8px 0; }
.responsable-risque select { margin-top: 4px; }

/* Voir la preuve : informations attendues à gauche, pièce avec passages surlignés à droite */
.preuve-grille { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: 16px; align-items: start; }
.preuve-infos { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; font-size: 13.5px; }
.preuve-infos li { display: grid; grid-template-columns: 78px 1fr; gap: 8px; align-items: start; }
.avis-ia .avis-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.avis-ia .avis-titre { font-weight: 750; font-size: 16px; display: inline-flex; align-items: center; gap: 6px; }
.avis-ia .avis-texte { margin: 10px 0 0; max-width: 78ch; line-height: 1.5; }
.avis-ia .avis-decision { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.avis-ia .avis-decision input[type=text] { flex: 1 1 220px; min-width: 0; }
.etiquette.grand { font-size: 14px; padding: 4px 12px; }
.kpi.cliquable { text-decoration: none; color: inherit; }
.kpi.cliquable:hover, .kpi.actif { box-shadow: 0 0 0 2px var(--accent); }
.attente-ligne { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.attente-ligne:first-of-type { border-top: 0; }
.attente-ligne .avis { display: grid; gap: 4px; }
.attente-ligne .avis-extrait { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 800px) { .attente-ligne { grid-template-columns: 1fr; } }
.preuve-texte { white-space: pre-wrap; font-size: 14px; line-height: 1.6; max-height: 70vh; overflow: auto; }
.preuve-texte mark { background: #FFE58A; color: inherit; padding: 1px 2px; border-radius: 3px; scroll-margin-top: 80px; }
.preuve-texte mark:target { outline: 2px solid var(--marque); }
:root[data-theme=dark] .preuve-texte mark { background: #6B5A12; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .preuve-texte mark { background: #6B5A12; } }
@media (max-width: 800px) { .preuve-grille { grid-template-columns: 1fr; } }
.carte.a-decider { border-left: 4px solid var(--st-encours); }

.menu-filtre-panneau .case-retard { display: flex; grid-template-columns: none; gap: 8px; align-items: center; font-weight: 500; }

/* Changements en lot sur les actions */
.barre-lot { position: sticky; bottom: 12px; z-index: 20; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; padding: 10px 14px;
  background: var(--card, #fff); border: 1px solid var(--marque); border-radius: 12px; box-shadow: 0 6px 18px rgba(0, 0, 0, .12); }
.barre-lot[hidden] { display: none; }
.barre-lot input[type=text], .barre-lot input[type=date], .barre-lot select { width: auto; height: 36px; }

.plan-projets { margin: 0 0 18px; }
.plan-projets .barre { display: inline-block; width: 120px; height: 8px; border-radius: 999px; background: var(--hach-fond); vertical-align: middle; overflow: hidden; }
.plan-projets .barre .f { display: block; height: 100%; background: var(--st-fait); }

.cloche { position: relative; }
.cloche .compte { position: absolute; top: -4px; right: -4px; min-width: 17px; height: 17px; border-radius: 9px; padding: 0 4px;
  background: var(--marque); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center; }
.cloche, .cloche:hover { text-decoration: none; }

.kpis.six { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.preuve-infos blockquote { margin: 4px 0 0; padding: 4px 10px; border-left: 3px solid #FFE58A; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.preuve-texte { font-size: 13px; line-height: 1.55; max-height: 60vh; background: var(--bg, transparent); }

/* Parcours d'un périmètre (fiche) : étapes + prochaine action */
.parcours-perimetre { padding: 16px 20px; margin-bottom: 18px; }
.parcours-perimetre .etapes { margin: 0 0 12px; }
.parcours-perimetre .etapes li.na { opacity: .5; }
.parcours-perimetre .prochaine { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 0; }
.parcours-perimetre .prochaine .bouton { margin-left: auto; }
.cartes-choix { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 18px 0; }
.carte-choix { display: block; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface, #fff); color: inherit; text-decoration: none; }
.carte-choix:hover, .carte-choix:focus-visible { border-color: var(--accent); box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.carte-choix strong { display: block; font-size: 16px; margin-bottom: 4px; }
.carte-choix .exemple { display: block; margin-top: 8px; font-size: 12px; color: var(--faint); }
.arbre-perimetres .entite { margin-bottom: 16px; }
.arbre-perimetres .rattaches { margin: 8px 0 0 18px; padding-left: 12px; border-left: 2px solid var(--line); }

/* Choix compacts côte à côte (sans texte descriptif) */
.choix-duo, .choix-trio { display: grid; gap: 10px; margin-top: 10px; }
.choix-duo { grid-template-columns: repeat(2, 1fr); }
.choix-trio { grid-template-columns: repeat(3, 1fr); }
.choix-duo .portee, .choix-trio .portee { align-items: center; justify-content: center; text-align: center; }
.choix-duo .portee input, .choix-trio .portee input { margin-top: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Choix compacts : icône + libellé, une seule ligne */
.choix-duo .portee, .choix-trio .portee { gap: 8px; padding: 10px 12px; }
.choix-duo .portee .i, .choix-trio .portee .i { width: 16px; height: 16px; flex: none; color: var(--muted); }
.choix-duo .portee:has(input:checked) .i, .choix-trio .portee:has(input:checked) .i { color: var(--accent); }
.choix-duo .portee input, .choix-trio .portee input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choix-duo .portee, .choix-trio .portee { position: relative; }
.choix-duo .portee:focus-within, .choix-trio .portee:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Liste déroulante de recherche (remplace la datalist native) */
.combo { position: relative; }
.combo-liste { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 6px; list-style: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(20, 30, 50, .14); max-height: 280px; overflow: auto; }
.combo-liste li { padding: 9px 12px; border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--ink); }
.combo-liste li:hover, .combo-liste li.actif { background: var(--accent-soft); color: var(--ink); }

/* Administration : matrice des droits (rôles en colonnes) */
.matrice-droits { width: 100%; border-collapse: collapse; }
.matrice-droits th, .matrice-droits td { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.matrice-droits thead th { vertical-align: bottom; }
.matrice-droits thead th strong { display: block; font-size: 15px; color: var(--ink); text-transform: none; letter-spacing: 0; }
.matrice-droits thead th .meta { display: block; font-weight: 500; text-transform: none; letter-spacing: 0; }
.matrice-droits .centre { text-align: center; width: 150px; }
.matrice-droits tbody tr:hover { background: var(--surface2); }
.matrice-droits input[type=checkbox] { width: 18px; height: 18px; margin: 0; cursor: pointer; }
.matrice-droits input:disabled { cursor: default; opacity: .55; }
.matrice-droits tfoot td { border-bottom: 0; padding-top: 16px; }
.role-suppr { margin-top: 6px; }
.ligne-formulaire { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.ligne-formulaire > div { min-width: 240px; }
h2 .compteur { background: var(--surface3); color: var(--muted); border-radius: 10px; font-size: 12px; padding: 1px 8px; margin-left: 6px; font-weight: 600; }
.carte-matrice { max-width: 420px; }
.matrice-droits tfoot button.primaire { background: var(--marque); border-color: var(--marque); color: #fff; opacity: 1; }
.matrice-droits .role-suppr button.lien { color: var(--q1); text-decoration: none; font-size: 12.5px; }
.matrice-droits .role-suppr button.lien:hover { text-decoration: underline; }

/* === À traiter condensé === */
.tc-pastille { background: var(--surface3); color: var(--muted); border-radius: 10px; font-size: 12px; padding: 1px 8px; font-weight: 600; }

/* === Tableau de bord refondu === */
.kpis.kpis-compacts { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; }
.kpis-compacts .kpi { min-height: 0; padding: 14px 18px; flex-direction: row; align-items: center; gap: 14px; }
.kpis-compacts .kpi-ico { position: static; flex: none; width: 38px; height: 38px; }
.kpis-compacts .kpi > div:last-child { margin-top: 0; }
.kpis-compacts .kpi .n { font-size: 30px; margin-top: 0; }
.kpis-compacts .kpi .l { font-size: 13px; max-width: none; }
.tdb-ligne { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; align-items: start; }
.tdb-haut { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: stretch; }
.tdb-carte { margin: 0; padding: 18px 20px; min-width: 0; overflow: hidden; }
.tdb-titre { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.tdb-titre h2 { margin: 0; font-size: 16px; flex: 0 1 auto; }
.tdb-titre .compteur { margin-left: 0; }
.tdb-intro { margin: -4px 0 12px; }
.tdb-pied { margin: 12px 0 0; }
.tdb-matrices { display: flex; gap: 20px; flex-wrap: wrap; }
.tdb-matrices > div { flex: 1 1 180px; min-width: 0; }
.tdb-matrices .matrice.compacte { max-width: 210px; }
.tdb-legende { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 14px 0 0; padding: 0; font-size: 12px; color: var(--muted); }
.tdb-legende li { display: inline-flex; align-items: center; gap: 6px; }
.pastille { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.pastille.CRITIQUE { background: var(--q1-bg); box-shadow: inset 0 0 0 1px var(--q1); }
.pastille.ELEVE { background: var(--q3-bg); box-shadow: inset 0 0 0 1px var(--q3); }
.pastille.MODERE { background: var(--q2-bg); box-shadow: inset 0 0 0 1px var(--q2); }
.pastille.FAIBLE { background: var(--q4-bg); box-shadow: inset 0 0 0 1px var(--q4); }
.pastille.point-l { border-radius: 50%; background: var(--ink); width: 9px; height: 9px; }
.tdb-vide { text-align: center; padding: 18px 8px; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.tdb-vide .cercle { width: 48px; height: 48px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.tdb-vide .cercle .i { width: 22px; height: 22px; }
.tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tuile { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 14px; background: var(--surface2); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; transition: transform var(--t), box-shadow var(--t); min-width: 0; }
a.tuile:hover { transform: translateY(-1px); box-shadow: var(--shadow2); text-decoration: none; }
.tuile .n { font-size: 28px; font-weight: 650; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.tuile .l { font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.tuile .l strong { color: var(--ink2); font-weight: 600; }
.tuile.CRITIQUE { background: var(--q1-bg); border-color: transparent; } .tuile.CRITIQUE .n { color: var(--q1); }
.tuile.ELEVE { background: var(--q3-bg); border-color: transparent; } .tuile.ELEVE .n { color: var(--q3); }
.tuile.MODERE { background: var(--q2-bg); border-color: transparent; } .tuile.MODERE .n { color: var(--q2); }
.tdb-liste { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow-y: auto; }
.tdb-liste li { border-top: 1px solid var(--line2); }
.tdb-liste li:first-child { border-top: 0; }
.tdb-liste li a { display: flex; align-items: center; gap: 12px; padding: 9px 4px; color: inherit; text-decoration: none; border-radius: 10px; }
.tdb-liste li a:hover { background: var(--surface2); }
.tdb-liste .badge { flex: none; min-width: 64px; text-align: center; }
.tdb-liste .corps { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tdb-liste .corps > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tdb-liste .tdb-rien { color: var(--muted); padding: 14px 4px; }
@media (max-width: 1100px) { .kpis.kpis-compacts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .tdb-ligne, .tdb-haut { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .kpis-compacts .kpi { padding: 10px 12px; gap: 10px; } .kpis-compacts .kpi .n { font-size: 24px; } .tuiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Assistant de pilotage : bulle flottante et panneau de chat */
.assistant-bulle { position: fixed; right: 22px; bottom: 22px; z-index: 60; width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--accent); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow3); transition: transform var(--t), background var(--t); }
.assistant-bulle:hover { transform: scale(1.06); background: var(--accent2); }
.assistant-bulle:focus-visible { outline: 0; box-shadow: var(--shadow3), var(--ring); }
.assistant-bulle .i { width: 26px; height: 26px; }
.assistant-bulle .fermer { display: none; } .assistant-bulle.ouvert .fermer { display: inline-flex; } .assistant-bulle.ouvert .ouvrir { display: none; }
.assistant-panneau { position: fixed; right: 22px; bottom: 90px; z-index: 60; width: 390px; max-width: calc(100vw - 32px); height: min(580px, calc(100vh - 120px));
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow3); overflow: hidden; }
.assistant-panneau[hidden] { display: none; }
.assistant-entete { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--accent); color: #fff; }
.assistant-entete form { margin: 0; }
.assistant-avatar { width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .2); display: grid; place-items: center; flex: none; }
.assistant-titre { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.assistant-titre strong { font-size: 14.5px; } .assistant-titre span { font-size: 11.5px; opacity: .85; }
.assistant-icone { background: rgba(255, 255, 255, .14); border: 0; color: #fff; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; padding: 0; }
.assistant-icone:hover { background: rgba(255, 255, 255, .28); }
.assistant-icone .i { width: 16px; height: 16px; }
.assistant-fil { flex: 1; max-height: none; min-height: 0; border: 0; border-radius: 0; margin: 0; padding: 14px; font-size: 14px; }
.assistant-fil .chat-tour { max-width: 88%; }
.assistant-fil .chat-tour.assistant .bulle { background: var(--surface); border: 1px solid var(--line); padding: 9px 12px; border-radius: 14px; border-bottom-left-radius: 4px; }
.assistant-fil .chat-tour.user .bulle { border-radius: 14px; border-bottom-right-radius: 4px; }
.suggestions { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; align-items: flex-start; }
.suggestion { background: var(--surface); border: 1px solid var(--accent); color: var(--accent); border-radius: 14px; padding: 6px 12px; font-size: 13px; cursor: pointer; text-align: left; }
.suggestion:hover { background: var(--accent-soft); }
.assistant-saisie { padding: 10px 12px; border-top: 1px solid var(--line); background: var(--surface); gap: 8px; align-items: center; }
.assistant-saisie input { border-radius: 20px; min-width: 0; }
.assistant-envoi { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.assistant-envoi:disabled { opacity: .55; cursor: default; }
.assistant-envoi .i { width: 17px; height: 17px; }
@media (max-width: 600px) {
  .assistant-panneau { right: 8px; left: 8px; bottom: 8px; top: 8px; width: auto; max-width: none; height: auto; border-radius: 16px; }
  .assistant-bulle { right: 14px; bottom: 14px; }
  .assistant-bulle.ouvert { display: none; }
}

/* === Fiche projet : 3 matrices === */
.matrices-3 { display: grid; grid-template-columns: repeat(3, minmax(250px, 1fr)); gap: 20px; align-items: start; margin-bottom: 16px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.mat3-col { min-width: 250px; scroll-snap-align: start; }
.mat3-titre { font-size: 14px; font-weight: 600; margin: 4px 0 2px; }
.mat3-expl { font-size: 12px; color: var(--muted); margin: 0 0 8px; min-height: 2.6em; line-height: 1.3; }
.mat3-resume { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.mat3-vide { margin-top: 8px; }
@media (max-width: 899px) { .matrices-3 { grid-template-columns: repeat(3, 260px); } }

/* === Assistant global === */
/* Bulle et panneau présents sur toutes les pages (partiel _assistant.html, hors de <main>). Au-dessus du contenu et du menu
   latéral desktop, sous le fond du menu mobile (49 → on reste à 45 < 49) et sous les modales (100). */
.assistant-bulle, .assistant-panneau { z-index: 45; }
.assistant-contexte { padding: 6px 14px; font-size: 12px; color: var(--muted); background: var(--surface); border-bottom: 1px solid var(--line);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.assistant-mention { align-self: center; font-size: 11.5px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 4px; margin: 6px 0 2px; text-align: center; max-width: 100%; }
.assistant-icone.arme { background: var(--danger, #c0392b); }
.assistant-fil { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; overflow-x: hidden; }
.assistant-fil .bulle { overflow-wrap: anywhere; }
.assistant-fil .bulle.saisie:empty::after { content: "…"; letter-spacing: 2px; color: var(--muted); }
.assistant-saisie { display: flex; }
.assistant-saisie .assistant-envoi { background: var(--accent); color: #fff; border: 0; box-shadow: none; }
.assistant-saisie .assistant-envoi:hover:not(:disabled) { background: var(--accent2); }
.assistant-saisie input { flex: 1; }
@media (max-width: 600px) {
  .assistant-panneau { top: 8px; bottom: 8px; }
  .assistant-bulle { bottom: 14px; right: 14px; }
}
@media (max-width: 400px) { .assistant-panneau { left: 6px; right: 6px; } }
.assistant-fil .suggestions { align-items: stretch; }
.assistant-fil .suggestion { white-space: normal; max-width: 100%; text-align: left; overflow-wrap: anywhere; }
.assistant-fil .suggestion { text-align: left; line-height: 1.3; justify-content: flex-start; }

/* ---- Contrastes (audit UX du 2026-11-13) : texte des pastilles et étiquettes >= 4,5:1 ----------- */
.badge.CRITIQUE, .etiquette.ko { color: #B50F25; }
.badge.ELEVE { color: #A8420F; }
.badge.MODERE { color: #805500; }
.badge.FAIBLE, .etiquette.ok { color: #1D7550; }
.etiquette.ouvert, .etiquette.actif { color: var(--accent2); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) .badge.CRITIQUE, :root:not([data-theme=light]) .etiquette.ko { color: #FF7A8A; }
  :root:not([data-theme=light]) .badge.FAIBLE, :root:not([data-theme=light]) .etiquette.ok { color: #52C48F; }
  :root:not([data-theme=light]) .etiquette.ouvert, :root:not([data-theme=light]) .etiquette.actif { color: var(--accent); }
}
:root[data-theme=dark] .badge.CRITIQUE, :root[data-theme=dark] .etiquette.ko { color: #FF7A8A; }
:root[data-theme=dark] .badge.FAIBLE, :root[data-theme=dark] .etiquette.ok { color: #52C48F; }
:root[data-theme=dark] .etiquette.ouvert, :root[data-theme=dark] .etiquette.actif { color: var(--accent); }
/* Lien d'évitement (A3) : visible seulement au focus clavier. */
.evitement { position: absolute; left: 8px; top: -48px; z-index: 100; background: var(--surface); color: var(--ink); padding: 10px 16px; border-radius: 8px; box-shadow: var(--shadow2); font-weight: 600; }
.evitement:focus { top: 8px; }
.mat3-note { margin: 4px 0 12px; }

/* === Fiche projet compacte et mobile === */
/* U5 : en-tête compact (titre + actions, parcours sur une ligne, bandeau de chiffres, onglets). */
.entete { margin-bottom: 12px; row-gap: 8px; }
.entete .actions { flex-wrap: nowrap; }
.entete-meta { margin-top: 4px; gap: 4px 14px; }
.menu-plus { position: relative; }
.menu-plus > summary { list-style: none; cursor: pointer; }
.menu-plus > summary::-webkit-details-marker { display: none; }
.menu-plus[open] > summary { background: var(--surface2); border-color: var(--accent); }
.menu-plus-liste { position: absolute; right: 0; top: calc(100% + 6px); z-index: 55; min-width: 220px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); box-shadow: var(--shadow2); display: flex; flex-direction: column; }
.menu-plus-liste a { display: flex; align-items: center; gap: 9px; min-height: 40px; padding: 0 10px; border-radius: 8px; color: var(--ink2); font-weight: 600; font-size: 13.5px; }
.menu-plus-liste a:hover { background: var(--accent-soft); color: var(--ink); text-decoration: none; }
.menu-plus-liste .i { width: 16px; height: 16px; color: var(--faint); }
.parcours-compact { display: flex; align-items: center; gap: 14px; padding: 8px 14px; margin-bottom: 10px; }
.parcours-compact .etapes { margin: 0; flex: 1; min-width: 0; flex-wrap: nowrap; }
.parcours-compact .etapes .libelle { display: none; }
.parcours-compact .etapes li.courante .libelle { display: inline; white-space: nowrap; }
.parcours-compact .etapes li + li::before { width: 18px; margin: 0 6px; }
.parcours-compact .etapes .num { width: 22px; height: 22px; font-size: 11.5px; }
.parcours-compact .etapes li.courante .num { box-shadow: 0 0 0 3px var(--accent-soft); }
.parcours-compact .prochaine { flex: none; margin: 0; gap: 10px; flex-wrap: nowrap; }
.parcours-compact .prochaine .bouton { margin-left: 0; height: 32px; }
.parcours-compact .constat { font-weight: 650; font-size: 13.5px; }
.fiche-kpis { gap: 10px; margin-bottom: 8px; }
.fiche-kpis .kpi { padding: 7px 14px; gap: 10px; }
.fiche-kpis .kpi-ico { width: 28px; height: 28px; }
.fiche-kpis .kpi-ico .i { width: 15px; height: 15px; }
.fiche-kpis .kpi .n { font-size: 22px; }
.fiche-kpis .kpi > div:last-child { flex-direction: row; align-items: baseline; gap: 8px; }
.fiche-kpis .kpi .l { font-size: 12.5px; }
.entete + .parcours-compact + .fiche-kpis + .onglets { margin-bottom: 14px; }
.crumb-retour { display: none; }
.crumb-retour::before { content: "\2039\00a0"; }

/* V1 : la bulle d'assistant ne recouvre plus le contenu (marge basse réservée). */
main.content, .content { padding-bottom: 88px; }

@media (max-width: 899px) {
  .matrices-3 { background:
      linear-gradient(to right, var(--surface) 30%, transparent) left center / 40px 100% no-repeat local,
      linear-gradient(to left, var(--surface) 30%, transparent) right center / 40px 100% no-repeat local,
      radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, .28), transparent) left center / 14px 100% no-repeat scroll,
      radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, .28), transparent) right center / 14px 100% no-repeat scroll; }
}
@media (max-width: 700px) {
  .parcours-compact { flex-wrap: wrap; }
  .parcours-compact .prochaine { flex: 1 1 100%; justify-content: space-between; }
  .fiche-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  /* U18 : fil d'Ariane réduit à « ‹ Projet » (retour), sans chevaucher la cloche. */
  .crumb { flex: 1; overflow: hidden; }
  .crumb:has(a) > .crumb-racine, .crumb:has(a) > .i, .crumb:has(a) > strong { display: none; }
  .crumb:has(a) > a:last-of-type { display: inline-flex; align-items: center; min-height: 44px; max-width: 100%;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--accent); font-size: 14px; }
  .crumb:has(a) > a:last-of-type:not(.crumb-retour)::before { content: "\2039\00a0"; }
  .crumb:has(.crumb-retour) > .crumb-retour { display: inline-flex; }
  .topbar { flex-wrap: nowrap; }
  .topbar .icone-seule { flex: none; }

  /* A4 : cibles tactiles >= 44 px. */
  button, .bouton, summary.bouton, .icone-seule, input:not([type=checkbox]):not([type=radio]), select { min-height: 44px; }
  .icone-seule { min-width: 44px; }
  .nav a, .nav-bouton, .nav-sous-menu summary { min-height: 44px; }
  .menu-plus-liste a { min-height: 44px; }
  .menu-plus-liste { min-width: 240px; max-width: calc(100vw - 28px); }
  .titre-ligne a, td a:not(.bouton), .liste a { display: inline-flex; align-items: center; min-height: 44px; }
  .parcours-compact .prochaine .bouton { height: 44px; }
  .entete { flex-direction: column; align-items: stretch; }
  .entete > div:first-child { min-width: 0; }
  .entete .actions { justify-content: space-between; }
  .entete .actions > .bouton.primaire { flex: 1; }

  /* Onglets de la fiche : défilement horizontal propre. */
  .onglets { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; margin-right: -14px; padding-right: 14px; }
  .onglets::-webkit-scrollbar { display: none; }
  .onglets a { flex: none; min-height: 44px; scroll-snap-align: start; }
  .assistant-saisie input, .chat-saisie input { min-height: 44px; }
}

/* === Décision sur preuve et actions === */
.choix-decision { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 12px; }
.choix-decision label { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--r-s, 8px); cursor: pointer; font-weight: 600; }
.choix-decision input { width: auto; margin: 0; }
.choix-decision label:has(input:checked) { border-color: var(--marque); background: var(--surface3); }
.champs-decision[hidden] { display: none; }
.decision-preuve label { display: block; margin-top: 10px; }
.decision-preuve .choix-decision label { margin-top: 0; }
.consequence { min-height: 1.4em; margin: 10px 0; color: var(--muted); font-size: 13.5px; }
.cloture-action form { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.preuve-acceptee { margin: 0 0 12px; }
.menu-plus { position: relative; display: inline-block; }
.menu-plus > summary { list-style: none; cursor: pointer; }
.menu-plus > summary::-webkit-details-marker { display: none; }
.menu-plus-liste { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s, 8px); padding: 6px; box-shadow: var(--shadow2); min-width: 170px; }
.menu-plus-liste button.danger { color: #c0392b; width: 100%; }
/* À traiter : une ligne = un lien */
/* Plan d'actions : groupes repliables, colonne Action large */
.groupe-actions { margin-bottom: 12px; }
.groupe-actions > summary { cursor: pointer; padding: 6px 2px; list-style-position: inside; }
.table-actions { table-layout: fixed; width: 100%; }
.titre-2l { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
.table-actions .ref { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compteur-attente { margin: 0 0 12px; }
.dossier-ligne { margin: 0 0 10px; }
@media (max-width: 800px) { .table-actions { table-layout: auto; } }

/* === Matrices et états du risque === */
.mat3-compte { margin: 8px 0 0; font-size: 12.5px; color: var(--muted, #5b6472); }
.mat3-titre .compteur { margin-left: 6px; }
.matrice .point.deduit { background: transparent; border: 2px dashed var(--ink); box-sizing: border-box; }
.badge.etat-risque { white-space: nowrap; }

/* === Pages diverses allégées === */
.info { display: inline-flex; vertical-align: middle; color: var(--faint); cursor: help; margin-left: 4px; border-radius: 50%; }
.info:hover, .info:focus-visible { color: var(--accent); }
.info .i { width: 15px; height: 15px; }
.nom-projet { font-family: var(--font); font-weight: 600; color: var(--ink2); }
.vocal-qualite { display: inline-flex; align-items: center; gap: 6px; }
.vocal-qualite select { width: auto; }
abbr[title] { text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }
.bulle.saisie { color: var(--muted); }
.assistant-verifier { margin: 3px 4px 0; font-size: 11px; color: var(--faint); }
.assistant-sources { margin: 5px 4px 0; font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: baseline; }
.assistant-source { display: inline-block; max-width: 100%; padding: 1px 8px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-detail { display: inline-block; margin-left: 6px; }
/* Connexion : fond neutre de l'application (plus de rouge plein écran). */
.page-connexion { display: flex; align-items: center; justify-content: center; min-height: 100vh;
  background: linear-gradient(168deg, var(--bg) 0%, var(--panel) 60%, rgba(200, 16, 46, .06) 100%); }
.carte-connexion { max-width: 380px; width: 100%; margin: 16px; }
.qr-mfa { background: #fff; padding: 8px; border-radius: 8px; width: max-content; max-width: 100%; margin: 0 auto 12px; }
.qr-mfa svg { display: block; width: 200px; height: 200px; max-width: 100%; }
.cle-mfa { font-size: 1.1em; word-break: break-all; }
.lien-app { display: inline-block; color: var(--accent); font-weight: 600; text-decoration: underline; padding: 8px 0; }
.annuler-mfa { margin-top: 16px; text-align: center; }
.annuler-mfa a { display: inline-block; padding: 8px 14px; color: var(--muted); }

/* === Correctif mobile : frise du parcours sans débordement === */
.parcours-compact { max-width: 100%; box-sizing: border-box; }
.parcours-compact .etapes { min-width: 0; max-width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
.parcours-compact .etapes::-webkit-scrollbar { display: none; }
@media (max-width: 600px) {
  .parcours-compact .etapes li:not(.courante) .libelle { display: none; }
}

/* === Correctif mobile : en-tête de page et tableaux sans débordement === */
@media (max-width: 700px) {
  .entete { flex-wrap: wrap; gap: 10px; }
  .entete h1 { min-width: 0; overflow-wrap: anywhere; }
  .entete .actions { flex-wrap: wrap; width: 100%; }
  main.content table { display: block; max-width: 100%; overflow-x: auto; }
}

/* === Finitions : radios de décision, bouton Plus, fil d'Ariane === */
.avis-decision label:has(input[type="radio"]), form label:has(> input[type="radio"][name="decision"]) { display: inline-flex; align-items: center; gap: 8px; }
input[type="radio"][name="decision"] { margin: 0; width: auto; }
.menu-plus > summary { color: var(--ink); background: var(--surface); border: 1px solid var(--line, var(--border, rgba(0,0,0,.12))); }
@media (min-width: 601px) {
  .crumb { flex-wrap: nowrap; min-width: 0; overflow: hidden; }
  .crumb > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
}

/* Bouton et feuille « Un retour ? » */
.retour-bouton { position: fixed; right: 88px; bottom: 32px; z-index: 59; width: 38px; height: 38px; border-radius: 50%; cursor: pointer; display: grid; place-items: center;
  background: var(--surface); color: var(--muted, #555); border: 1px solid var(--line); box-shadow: var(--shadow2, 0 1px 4px rgba(0,0,0,.15)); }
.retour-bouton:hover { color: var(--accent); }
.retour-bouton:focus-visible { outline: 0; box-shadow: var(--ring); }
.retour-bouton .i { width: 19px; height: 19px; }
.retour-fond { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.4); display: grid; place-items: center; padding: 16px; }
.retour-fond[hidden] { display: none; }
.retour-feuille { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; width: min(440px, 100%); box-shadow: var(--shadow3); }
.retour-feuille h2 { margin: 0 0 4px; }
.retour-types { display: flex; gap: 14px; flex-wrap: wrap; margin: 10px 0; }
.retour-feuille textarea { width: 100%; box-sizing: border-box; }
.retour-pied { display: flex; justify-content: space-between; margin: 4px 0 10px; font-size: .85rem; }
.retour-actions { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 600px) { .retour-bouton { right: 76px; bottom: 22px; } }

/* U10 : ateliers EBIOS, sommaire collant des sections et barre de validation collee en bas. */
.eb-sommaire { position: sticky; top: calc(var(--gap) + 72px); z-index: 30; margin-bottom: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); padding: 8px 12px; }
.eb-sommaire summary { cursor: pointer; font-weight: 700; font-size: 13px; min-height: 28px; }
.eb-sommaire-liste { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; padding: 0; }
.eb-sommaire-liste a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 16px; font-size: 12.5px; color: var(--ink); text-decoration: none; background: var(--surface2); }
.eb-sommaire-liste a:hover { border-color: var(--accent); }
.eb-som-etat { font-size: 11px; font-weight: 700; color: var(--muted); }
.eb-som-etat.vide { color: #B45309; }
.eb-som-etat.ok { color: #2E7D32; }
.eb-sommaire-outils { display: flex; gap: 12px; font-size: 12.5px; }
.eb-actions-collee { position: sticky; bottom: 0; z-index: 35; box-shadow: 0 -4px 14px rgba(0, 0, 0, .12); }
@media (max-width: 600px) {
  .eb-sommaire { top: 64px; }
  .eb-sommaire-repli:not([open]) .eb-sommaire-liste { display: none; }
  .eb-sommaire-liste a { min-height: 44px; }
  .eb-sommaire button.lien, .eb-suppr, .eb-ajout { min-height: 44px; min-width: 44px; }
  details.eb-section > summary { min-height: 44px; display: flex; align-items: center; }
}

/* A5 : points numerotes, compteur au-dela de trois, liste textuelle sous la matrice. */
.matrice .point.numero { width: auto; min-width: 20px; height: 18px; padding: 0 3px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; line-height: 1; color: var(--surface); text-decoration: none; position: relative; animation: none; }
.matrice .point.numero.deduit { color: var(--ink); }
.matrice .point-plus { font-size: 10px; font-weight: 800; color: var(--ink); background: var(--surface); border: 1px solid var(--ink); border-radius: 9px; padding: 0 4px; height: 18px; display: inline-flex; align-items: center; }
.matrice-liste { margin-top: 8px; font-size: 12.5px; }
.matrice-liste summary { cursor: pointer; font-weight: 600; color: var(--ink2); }
.matrice-liste ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.matrice-liste li strong { display: inline-block; min-width: 26px; }
@media (max-width: 600px) {
  /* A4 : zone de toucher elargie autour des points (pseudo-element, sans agrandir le dessin). */
  .matrice .point.numero::after, .matrice a.point::after { content: ""; position: absolute; inset: -13px -8px; }
  .matrice .point { position: relative; }
  .matrice-liste summary { min-height: 44px; display: flex; align-items: center; }
  .matrice-liste li a { display: inline-flex; align-items: center; min-height: 44px; }
  /* U18 : les trois matrices s'empilent au lieu de defiler lateralement. */
  .matrices-3 { grid-template-columns: minmax(0, 1fr); overflow-x: visible; background: none; scroll-snap-type: none; }
  .mat3-col { min-width: 0; }
  .matrice.compacte, .tdb-matrices .matrice.compacte { max-width: 240px; }
}

.chemin-partage { font-family: var(--mono); font-size: 12.5px; word-break: break-all; }
.documents-attendus li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.legende-colonnes { margin: 0 0 8px; }

/* ---- Référentiel BIA : liste lisible, détail à la demande (2026-11-25) --------------------------------- */
.bia-aide { margin-top: 8px; }
.bia-aide > summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 13px; min-height: 28px; display: inline-flex; align-items: center; }
.bia-aide > div { margin-top: 8px; max-width: 70ch; }
.bia-aide p { margin: 0 0 8px; }
.bia-chiffres { display: flex; flex-wrap: wrap; gap: 12px 40px; margin: 0 0 22px; }
.bia-chiffres > div { display: flex; align-items: baseline; gap: 10px; }
.bia-chiffres strong { font-size: 34px; font-weight: 650; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.bia-chiffres span { color: var(--muted); font-size: 14px; }
.bia-liste, .bia-projets { max-width: 980px; }
details.avance.bia-filtres { margin: 0 0 12px; border-top: 0; padding-top: 0; }
.bia-filtres > summary { min-height: 36px; }
.bia-filtres-champs { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; }
.bia-filtres-champs > div { min-width: 200px; }
.bia-entete, .bia-app > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto 84px 20px; gap: 6px 18px; align-items: center; }
.bia-entete { padding: 8px 14px; color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; border-bottom: 1px solid var(--line); }
.bia-entete span:nth-child(2) { grid-column: 2; }
.bia-entete span:nth-child(3) { grid-column: 3; text-align: center; }
.bia-app { border-bottom: 1px solid var(--line2); }
.bia-app > summary { list-style: none; cursor: pointer; padding: 12px 14px; min-height: 60px; border-radius: var(--r-s); }
.bia-app > summary::-webkit-details-marker { display: none; }
.bia-app > summary:hover { background: var(--surface2); }
.bia-nom { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bia-nom strong { font-size: 15px; overflow-wrap: anywhere; }
.bia-chevron { color: var(--faint); font-size: 22px; line-height: 1; transition: transform var(--t); text-align: center; }
.bia-app[open] > summary .bia-chevron { transform: rotate(90deg); }
.bia-crit-col { text-align: center; }
.badge.bia-crit { font-size: 16px; padding: 5px 14px 5px 11px; }
.bia-bande { display: inline-flex; gap: 4px; }
.bia-niv { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 8px; font-weight: 700; font-size: 15px;
           color: var(--ink); background: var(--surface3); font-variant-numeric: tabular-nums; }
.bia-niv.n2 { background: var(--q4-bg); box-shadow: inset 0 0 0 1px var(--q4); }
.bia-niv.n3 { background: var(--q2-bg); box-shadow: inset 0 0 0 1px var(--q2); }
.bia-niv.n4 { background: var(--q3-bg); box-shadow: inset 0 0 0 2px var(--q3); }
.bia-detail { padding: 4px 14px 20px; }
.bia-detail h3 { margin: 18px 0 8px; color: var(--ink2); }
.bia-desc { margin: 4px 0 0; color: var(--ink2); max-width: 70ch; }
.bia-mesures { display: grid; gap: 6px; max-width: 520px; }
.bia-mesure { display: grid; grid-template-columns: minmax(0, 1fr) 96px 52px; gap: 12px; align-items: center; }
.bia-mesure-v { text-align: right; font-variant-numeric: tabular-nums; }
.bia-seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; }
.bia-seg i { height: 8px; border-radius: 3px; background: var(--surface3); }
.bia-seg.n1 i:nth-child(-n+1) { background: var(--muted); }
.bia-seg.n2 i:nth-child(-n+2) { background: var(--q4); }
.bia-seg.n3 i:nth-child(-n+3) { background: var(--q2); }
.bia-seg.n4 i:nth-child(-n+4) { background: var(--q3); }
.bia-faits { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 24px; margin: 0; }
.bia-faits > div { min-width: 0; }
.bia-faits dt { color: var(--muted); font-size: 12.5px; }
.bia-faits dd { margin: 2px 0 0; font-weight: 650; overflow-wrap: anywhere; }
.bia-faits dd .meta { font-weight: 400; }
.bia-reste > summary { cursor: pointer; padding: 14px; min-height: 48px; color: var(--accent); font-weight: 650; display: flex; align-items: center; }
.bia-vide, .bia-vide-page p { margin: 8px 0; }
.bia-entrees { list-style: none; margin: 0; padding: 0; }
.bia-entrees li { display: flex; gap: 12px 20px; justify-content: space-between; align-items: center; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--line2); }
.bia-entree-nom { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 260px; }
.bia-entree-etat { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bia-ajout { margin-top: 16px; }
.bia-ajout > summary { min-height: 40px; }
.bia-description { min-height: 80px; }
.bia-ajout-pied { margin-top: 14px; }
@media (max-width: 900px) {
  .bia-chiffres { gap: 10px 26px; }
  .bia-chiffres strong { font-size: 28px; }
  .bia-entete { display: none; }
  .bia-app > summary { grid-template-columns: minmax(0, 1fr) auto 18px; grid-template-areas: "nom crit chev" "bande bande bande"; padding: 12px 8px; min-height: 64px; }
  .bia-nom { grid-area: nom; } .bia-crit-col { grid-area: crit; } .bia-chevron { grid-area: chev; }
  .bia-bande { grid-area: bande; }
  .bia-niv { flex: 1 1 0; width: auto; }
  .bia-detail { padding: 4px 8px 20px; }
  .bia-mesure { grid-template-columns: minmax(0, 1fr) 72px 48px; gap: 8px; }
  .bia-filtres-champs > div { min-width: 0; width: 100%; }
  .bia-entree-etat button, .bia-reste > summary, .bia-aide > summary { min-height: 44px; }
  .bia-filtres > summary, .bia-ajout > summary { min-height: 44px; }
}
/* ===== Pages « actions » : liste sobre par état, détail à la demande (refonte 2026-11-25) ===== */
.al-chiffres { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 20px; }
.al-chiffre { display: inline-flex; align-items: baseline; gap: 8px; min-height: 44px; padding: 8px 16px; border: 1px solid var(--line); border-radius: var(--r-s);
  background: var(--surface); color: var(--ink2); text-decoration: none; }
.al-chiffre .n { font-size: 22px; font-weight: 700; color: var(--ink); line-height: 1; }
.al-chiffre .l { font-size: 13px; }
.al-chiffre:hover { border-color: var(--accent); }
.al-chiffre.actif { border-color: var(--accent); background: var(--accent-soft); }
.al-chiffre.critique .n { color: var(--ko); }
.al-outils, .al-nouvelle { padding: 0; }
.al-outils > summary, .al-nouvelle > summary { padding: 14px 20px; min-height: 48px; display: flex; align-items: center; cursor: pointer; }
.al-outils > :not(summary), .al-nouvelle > :not(summary) { margin-left: 20px; margin-right: 20px; }
.al-outils[open] > :last-child, .al-nouvelle[open] > :last-child { margin-bottom: 18px; }
.al-chemin { margin: 0 20px 10px; }
.al-chemin > summary { cursor: pointer; min-height: 32px; }
.al-chemin p { overflow-wrap: anywhere; }
.menu-filtre-panneau { background: var(--surface); border-color: var(--line); color: var(--ink); }
.menu-filtre-panneau::before { background: var(--surface); border-color: var(--line); }
.barre-lot { background: var(--surface); }
.bouton-filtre { width: auto; padding: 0 12px; gap: 6px; }
.bouton-filtre .compte { top: -7px; right: -7px; background: var(--accent2); }
.barre-filtres .champ-icone { flex: 0 1 300px; }

.al-groupe { margin: 0 0 14px; }
.al-groupe > summary { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; padding: 4px 2px; }
.al-groupe > summary h2 { margin: 0; font-size: 16px; }
.al-groupe > summary:focus-visible, .al-detail > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.al-tout { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 2px 4px; font-size: 12.5px; color: var(--muted); }
.al-liste { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.al-ligne { display: flex; align-items: flex-start; border-top: 1px solid var(--line); }
.al-ligne:first-child { border-top: 0; }
.al-coche { flex: none; align-self: stretch; display: flex; align-items: center; justify-content: center; width: 44px; min-height: 56px; cursor: pointer; }
.al-detail { flex: 1; min-width: 0; }
.al-detail > summary { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) 140px 100px 190px; gap: 6px 16px; align-items: center;
  min-height: 56px; padding: 10px 40px 10px 16px; cursor: pointer; position: relative; }
.al-detail > summary::-webkit-details-marker { display: none; }
.al-detail > summary::after { content: ""; position: absolute; right: 18px; top: 50%; width: 7px; height: 7px; margin-top: -5px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform var(--t); }
.al-detail[open] > summary::after { transform: rotate(225deg); margin-top: -2px; }
.al-detail > summary:hover { background: var(--surface2); }
.al-titre { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.al-t { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.al-sous { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.al-resp { font-size: 13px; color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.al-ech { font-size: 13px; color: var(--ink2); white-space: nowrap; }
.al-ech.retard { color: var(--ko); font-weight: 700; }
.al-etat { justify-self: start; min-width: 0; } .al-etat .etiquette { white-space: normal; }
.al-corps { padding: 4px 16px 16px; }
.al-corps dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 24px; margin: 0 0 12px; }
.al-corps dl .large { grid-column: 1 / -1; }
.al-corps dt { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 2px; }
.al-corps dd { margin: 0; font-size: 13.5px; overflow-wrap: anywhere; }
.al-boutons { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.al-vide { text-align: left; }
@media (max-width: 760px) {
  .al-detail > summary { grid-template-columns: 1fr auto; padding-right: 40px; }
  .al-titre { grid-column: 1 / -1; }
  .al-resp { grid-column: 1 / -1; grid-row: 2; }
  .al-ech { grid-row: 3; }
  .al-etat { grid-row: 3; justify-self: end; }
  .al-boutons .bouton { min-height: 44px; }
}

/* Actions : 6 lignes par groupe, le reste replié ; cases à cocher seulement en mode sélection */
.al-plus { margin-top: 4px; }
.al-plus > summary { cursor: pointer; padding: 10px 4px; color: var(--accent); font-weight: 600; font-size: 13.5px; min-height: 44px; display: flex; align-items: center; }
.al-mode { margin: 4px 0 10px; font-size: 13px; color: var(--muted); }
#formLot:not(.selection) .al-coche, #formLot:not(.selection) .al-tout { display: none; }

/* « À traiter » : file de travail. Une ligne = un geste ; le détail et la suite sont repliés. */
.tc-sections { display: grid; gap: 16px; max-width: 880px; }
.tc-section, .tc-replie { position: relative; margin: 0; padding: 8px 8px 8px; min-width: 0; }
.tc-section h2 { display: flex; align-items: center; gap: 10px; margin: 0; padding: 6px 12px; min-height: 44px; font-size: 16px; }
.tc-pastille { background: var(--surface3); color: var(--ink2); border-radius: 10px; font-size: 12px; padding: 1px 8px; font-weight: 600; }
.tc-liste { list-style: none; margin: 0; padding: 0; }
.tc-ligne { border-top: 1px solid var(--line); }
.tc-ligne:first-child { border-top: 0; }
.tc-resume { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 12px; border-radius: var(--r-s); color: inherit; text-decoration: none; cursor: pointer; list-style: none; min-width: 0; }
.tc-resume::-webkit-details-marker { display: none; }
.tc-resume:hover { background: var(--surface3); text-decoration: none; }
.tc-resume:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tc-texte { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tc-texte .titre-ligne { font-weight: 600; color: var(--ink); line-height: 1.3; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tc-sous { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-retard { color: var(--ko); font-weight: 700; }
.tc-resume .etiquette { flex: none; }
.tc-chev { flex: none; width: 7px; height: 7px; margin: 0 4px; border-right: 2px solid var(--muted); border-top: 2px solid var(--muted); transform: rotate(45deg); transition: transform var(--t); }
.tc-detail[open] > .tc-resume .tc-chev { transform: rotate(135deg); }
.tc-corps { padding: 2px 12px 16px; }
.tc-corps p { margin: 0 0 12px; max-width: 62ch; }
.tc-cloture { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.tc-reexamen { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); margin: 0; }
.tc-reexamen input { min-height: 44px; }
.tc-cloture button { min-height: 44px; }
.tc-suite > summary, .tc-replie > summary { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 12px; cursor: pointer; font-weight: 600; color: var(--ink2); }
.tc-replie > summary { font-size: 15px; }
.tc-replie > .meta, .tc-replie > .tc-liste { margin-left: 4px; margin-right: 4px; }
.tc-replie > .meta { padding: 0 12px 10px; }
.tc-suite > summary:focus-visible, .tc-replie > summary:focus-visible, .tc-info > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-s); }
.tc-info > summary { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; list-style: none; color: var(--muted); font-weight: 700; }
.tc-info > summary::-webkit-details-marker { display: none; }
.tc-info > summary span { width: 22px; height: 22px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; font-size: 12px; }
.tc-info > summary:hover span { border-color: var(--accent); color: var(--accent); }
.tc-info > p { padding: 0 56px 8px 12px; margin: 0; }
@media (max-width: 760px) {
  .tc-resume { flex-wrap: wrap; gap: 6px 10px; }
  .tc-texte { flex: 1 1 100%; }
  .tc-sous { white-space: normal; }
  .tc-resume .etiquette { order: 2; margin-right: auto; }
  .tc-chev { order: 3; margin-left: auto; }
}

/* === bia3 === Référentiel BIA allégé : une ligne par application, détail au clic, seule la pastille de criticité est colorée. */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Trois compteurs sobres */
.bia-synthese { display: flex; gap: 28px; margin: 0 0 18px; padding: 0 2px; }
.bs { display: flex; align-items: baseline; gap: 8px; padding: 4px 0; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; font-size: 14px; }
a.bs:hover { color: var(--ink); }
.bs.actif { border-bottom-color: var(--ink); color: var(--ink); }
.bs-n { font-size: 26px; font-weight: 650; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.bs-t strong { color: var(--ink); font-weight: 600; }
/* Filtres : une ligne, « Affichage » replié dessous */
.bia-barre { margin: 0 0 22px; }
.bb-ligne { display: flex; gap: 10px; align-items: center; }
.bb-ligne > div { flex: 0 0 auto; min-width: 0; }
.bb-ligne .bb-q { flex: 1 1 260px; }
.bia-barre select, .bia-barre input[type=search] { width: 100%; }
.bb-ligne select { width: auto; min-width: 190px; }
.bb-sous { display: flex; align-items: flex-start; gap: 16px; margin-top: 8px; flex-wrap: wrap; }
.bia-affichage > summary { cursor: pointer; color: var(--muted); font-size: 13px; padding: 4px 0; list-style: none; }
.bia-affichage > summary::-webkit-details-marker { display: none; }
.bia-affichage > summary::before { content: "›"; display: inline-block; width: 14px; transition: transform var(--t); }
.bia-affichage[open] > summary::before { transform: rotate(90deg); }
.bia-affichage > summary:hover { color: var(--ink); }
.bb-opts { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 6px; }
.bb-opts label { display: block; margin-bottom: 4px; font-size: 12.5px; color: var(--muted); }
.bb-reset { font-size: 13px; padding: 4px 0; }
/* Liste : un seul fond blanc, séparateurs fins */
.bg { margin: 0 0 28px; }
.bg-titre { display: flex; align-items: baseline; gap: 12px; margin: 0 0 8px; padding: 0 2px; font-size: 14px; font-weight: 650; color: var(--ink2); }
.bg-n { margin-left: auto; color: var(--muted); font-size: 13px; font-weight: 400; }
.bg-liste { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-m, 12px); overflow: hidden; }
.br { border-top: 1px solid var(--line2, var(--line)); }
.br:first-child { border-top: 0; }
.br > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) 250px 44px 18px; align-items: center; gap: 16px;
  min-height: 52px; padding: 8px 18px; }
.br > summary::-webkit-details-marker { display: none; }
.br > summary:hover { background: var(--surface2); }
.br-nom { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.br-nom strong { font-size: 15px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.br-fam { color: var(--faint, var(--muted)); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.br-reprise { color: var(--muted); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.br-crit { display: flex; justify-content: center; }
.bia-projets { max-width: none; }
.br-chevron { color: var(--faint, var(--muted)); font-size: 20px; line-height: 1; transition: transform var(--t); text-align: center; }
.br[open] .br-chevron { transform: rotate(90deg); }
.br[open] > summary { background: var(--surface2); }
.br .bia-detail { padding: 6px 18px 22px; border-top: 1px solid var(--line2, var(--line)); }
.br .bia-mesures { max-width: 560px; }
.br .bia-seg.n1 i:nth-child(-n+1) { background: var(--q4); }
.br .bia-seg.n2 i:nth-child(-n+2) { background: var(--q2); }
.br .bia-seg.n3 i:nth-child(-n+3) { background: var(--q3); }
.br .bia-seg.n4 i:nth-child(-n+4) { background: var(--q1); }
.br-jauge { display: flex; align-items: center; gap: 12px; max-width: 560px; margin: 4px 0 10px; }
.br-piste { position: relative; flex: 1; height: 8px; border-radius: 6px; background: var(--surface3); }
.br-piste i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; min-width: 6px; background: var(--ink2); opacity: .6; }
.br-piste b { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--ink2); opacity: .55; border-radius: 1px; }
.br-moy { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 52px; text-align: right; }
.br-moy small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 2px; }
@media (min-width: 1600px) {
  .bg-liste { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bg-liste .br:nth-child(2) { border-top: 0; }
  .bg-liste .br:nth-child(even) { border-left: 1px solid var(--line2, var(--line)); }
  .bg-liste .br[open] { grid-column: 1 / -1; border-left: 0; }
}
/* Applications rattachées et formulaire */
.bia-form { margin-top: 18px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-m, 12px); background: var(--surface2); }
.bia-form > summary { font-weight: 650; }
.bia-form form { margin-top: 14px; max-width: 760px; }
.bia-form label { font-size: 13px; color: var(--ink2); font-weight: 600; }
.bia-form .grille-2 { gap: 12px 16px; }
@media (max-width: 760px) {
  .bia-synthese { gap: 0; justify-content: space-between; padding: 0; }
  .bs { gap: 6px; font-size: 13px; }
  .bs-d { display: none; }
  .br-nom strong { white-space: normal; overflow: visible; }
  .br-fam { white-space: normal; }
  .bs-n { font-size: 24px; }
  .bb-ligne { flex-wrap: wrap; }
  .bb-ligne .bb-q { flex-basis: 100%; }
  .bb-ligne > div:not(.bb-q) { flex: 1 1 calc(50% - 5px); }
  .bb-ligne select { width: 100%; min-width: 0; }
  .bia-barre select, .bia-barre input { height: 40px; }
  .bb-opts > div { flex: 1 1 calc(50% - 7px); }
  .bia-affichage > summary { display: flex; align-items: center; min-height: 44px; }
  .br > summary { grid-template-columns: minmax(0, 1fr) auto 18px; grid-template-areas: "nom crit chev" "rep crit chev"; gap: 2px 12px; padding: 10px 14px; }
  .br-nom { grid-area: nom; flex-direction: column; gap: 1px; }
  .br-reprise { grid-area: rep; font-size: 12.5px; white-space: normal; }
  .br-crit { grid-area: crit; }
  .br-chevron { grid-area: chev; }
  .br .bia-detail { padding: 4px 14px 18px; }
  .bia-form .grille-2 { grid-template-columns: 1fr; }
}

/* === tdb === */
.kpis-sobres { gap: 16px; margin-bottom: 16px; }
.kpis-sobres .kpi { padding: 14px 18px; }
.kpis-sobres .kpis .kpi:first-child, .kpis-sobres .kpi:first-child { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.kpis-sobres .kpi:first-child .l { color: var(--muted); }
.kpis-sobres .kpi .n { font-size: 30px; }
.tdb-pleine { margin-bottom: 16px; }
.tdb-ligne { gap: 16px; margin-bottom: 16px; }
.tdb-carte { padding: 16px 20px; }
.tdb-voir { margin-left: auto; font-size: 13px; font-weight: 600; }
.mc-deux { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 40px; align-items: start; justify-items: center; }
.mc { min-width: 0; width: 100%; max-width: 340px; }
.mc-titre { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.mc-aide { margin: 2px 0 10px; }
.mc-grille { display: grid; grid-template-columns: 52px repeat(4, minmax(0, 1fr)); gap: 4px; align-items: stretch; }
.mc-rang { font-size: 11px; color: var(--muted); display: flex; align-items: center; justify-content: flex-end; padding-right: 4px; }
.mc-rang-x { justify-content: center; padding: 2px 0 0; }
.mc-axes { display: flex; justify-content: space-between; margin-top: 4px; font-size: 11.5px; font-weight: 600; }
.mc-case { height: 46px; border-radius: 8px; display: grid; place-items: center; font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--ink); text-decoration: none; }
.mc-case.CRITIQUE { background: var(--q1-bg); box-shadow: inset 0 0 0 1px var(--q1); }
.mc-case.ELEVE { background: var(--q3-bg); box-shadow: inset 0 0 0 1px var(--q3); }
.mc-case.MODERE { background: var(--q2-bg); box-shadow: inset 0 0 0 1px var(--q2); }
.mc-case.FAIBLE { background: var(--q4-bg); box-shadow: inset 0 0 0 1px var(--q4); }
.mc-case.mc-vide { background: var(--surface3); box-shadow: none; opacity: .6; }
a.mc-case:hover { text-decoration: none; transform: scale(1.06); }
a.mc-case:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mc-rien { margin: 0; padding: 36px 8px; text-align: center; color: var(--muted); background: var(--surface3); border-radius: 8px; font-size: 14px; }
.tdb-legende { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 16px 0 0; padding: 0; list-style: none; font-size: 12px; }
.tdb-legende > span { display: inline-flex; align-items: center; gap: 6px; }
.tuiles-pilotage { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tuiles-pilotage .tuile { min-height: 96px; }
.tuiles-pilotage .tuile .n { font-size: 30px; }
.tuiles-pilotage .tuile .voir { margin-top: auto; font-size: 12px; font-weight: 600; color: var(--accent); }
.tuiles-pilotage .tuile.CRITIQUE .n { color: var(--q1); }
.tuiles-pilotage .tuile.ELEVE .n { color: var(--q3); }
.tuiles-pilotage .tuile.MODERE .n { color: var(--q2); }
.tuiles-pilotage .tuile.zero { background: transparent; border-style: dashed; opacity: .6; }
.tuiles-pilotage .tuile.zero .n { color: var(--muted); font-weight: 500; }
.tdb-autres { margin: 12px 0 0; }
.tdb-replie > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; min-height: 44px; margin: -8px 0; }
.tdb-replie > summary::-webkit-details-marker { display: none; }
.tdb-replie > summary h2 { margin: 0; font-size: 16px; }
.tdb-replie > summary::after { content: ""; margin-left: auto; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform var(--t); }
.tdb-replie[open] > summary::after { transform: rotate(-135deg); }
.tdb-replie[open] > summary { margin-bottom: 8px; }
.tdb-replie .entite { margin-bottom: 12px; }
@media (max-width: 760px) {
  .mc-deux { grid-template-columns: minmax(0, 1fr); }
  .mc-grille { grid-template-columns: 44px repeat(4, minmax(0, 1fr)); }
  .mc-case { height: 44px; }
  .tuiles-pilotage { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis.kpis-compacts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tdb-ligne { grid-template-columns: minmax(0, 1fr); }
}

/* === atr2 : lignes d'actions (colonnes à largeur définie, rien qui déborde ni ne se superpose) === */
.al-detail > summary { grid-template-columns: minmax(0, 1fr) 140px 104px 256px; padding-right: 44px; }
.al-resp, .al-ech { min-width: 0; }
.al-resp.vide { color: var(--faint); font-style: italic; }
.al-ech { overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.al-etat { justify-self: stretch; overflow: hidden; }
.al-etat .etiquette { display: inline-block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
@media (max-width: 1100px) { .al-detail > summary { grid-template-columns: minmax(0, 1fr) 110px 100px 232px; gap: 6px 12px; } }
@media (max-width: 760px) {
  .al-detail > summary { grid-template-columns: minmax(0, 1fr) auto; padding-right: 44px; }
  .al-titre { grid-column: 1 / -1; }
  .al-resp { grid-row: 2; grid-column: 1; }
  .al-ech { grid-row: 2; grid-column: 2; overflow: visible; min-width: max-content; }
  .al-etat { grid-row: 3; grid-column: 1 / -1; justify-self: start; max-width: 100%; }
}

/* === atr2 : page À traiter (compteurs, sections, lignes en colonnes stables, formulaire de clôture) === */
.tc-compteurs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; max-width: 1040px; margin: 4px 0 24px; }
.tc-compteur { display: flex; flex-direction: column; gap: 6px; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
  color: var(--ink2); text-decoration: none; min-width: 0; transition: border-color var(--t), background var(--t); }
.tc-compteur:hover { border-color: var(--accent); text-decoration: none; }
.tc-compteur .n { font-size: 28px; font-weight: 700; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.tc-compteur .l { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-compteur.critique .n { color: var(--ko); }
.tc-compteur.vide { background: transparent; }
.tc-compteur.vide .n { color: var(--faint); }
.tc-compteur.vide:hover { border-color: var(--line); }
.tc-sections { max-width: 1040px; gap: 20px; }
.tc-section, .tc-replie { padding: 0; overflow: hidden; }
.tc-tete { padding: 20px 24px 14px; border-bottom: 1px solid var(--line); }
.tc-section h2 { padding: 0; min-height: 0; margin: 0 0 4px; font-size: 17px; }
.tc-tete .meta { margin: 0; }
.tc-section > .tc-liste, .tc-replie > .tc-liste { padding: 6px 12px; }
.tc-suite { border-top: 1px solid var(--line); }
.tc-suite > summary { padding: 4px 24px; color: var(--accent); }
.tc-suite > .tc-liste { padding: 0 12px 6px; }
.tc-replie > summary { padding: 8px 24px; min-height: 52px; }
.tc-replie > .meta { padding: 0 24px 8px; margin: 0; }
.tc-resume { display: grid; grid-template-columns: minmax(0, 1fr) 200px 104px 168px 14px; align-items: center; gap: 4px 18px; padding: 12px 12px; min-height: 60px; }
.tc-titre { font-weight: 600; color: var(--ink); line-height: 1.35; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-width: 0; }
.tc-projet, .tc-ech { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tc-ech { font-variant-numeric: tabular-nums; }
.tc-ech.tc-retard { color: var(--ko); font-weight: 700; }
.tc-pastille-etat { justify-self: start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; text-align: center; }
span.tc-pastille-etat:empty { display: block; }
.tc-resume .tc-chev { margin: 0; }
.tc-corps { padding: 4px 24px 22px; }
.tc-corps p { margin: 0 0 16px; }
.tc-cloture { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; align-items: end; max-width: 760px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface2); }
.tc-large { grid-column: 1 / -1; }
.tc-champ { display: flex; flex-direction: column; gap: 6px; margin: 0; font-size: 13px; font-weight: 600; color: var(--ink2); min-width: 0; }
.tc-champ small { font-weight: 400; color: var(--muted); font-size: 12px; }
.tc-champ input, .tc-champ textarea { width: 100%; min-height: 44px; font-weight: 400; }
.tc-champ textarea { resize: vertical; }
.tc-exception { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-left: 3px solid var(--ko); border-radius: var(--r-s); background: var(--q1-bg); font-size: 13px; color: var(--ink2); }
.tc-exception strong { color: var(--ink); }
.tc-validation { display: flex; justify-content: flex-end; }
.tc-vide { padding: 48px 24px; max-width: 1040px; }
@media (max-width: 1000px) { .tc-resume { grid-template-columns: minmax(0, 1fr) 150px 100px 160px 14px; gap: 4px 14px; } }
@media (max-width: 760px) {
  .tc-compteurs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
  .tc-compteur { padding: 12px 14px; }
  .tc-tete { padding: 16px 16px 12px; }
  .tc-section > .tc-liste, .tc-replie > .tc-liste { padding: 4px 4px; }
  .tc-resume { grid-template-columns: minmax(0, 1fr) auto 14px; grid-template-areas: "titre titre chev" "projet projet chev" "ech pastille chev"; gap: 4px 10px; padding: 12px 10px; }
  .tc-resume .tc-titre { grid-area: titre; }
  .tc-resume .tc-projet { grid-area: projet; }
  .tc-resume .tc-ech { grid-area: ech; }
  .tc-resume .tc-pastille-etat { grid-area: pastille; justify-self: end; max-width: 55vw; }
  .tc-resume .tc-chev { grid-area: chev; align-self: center; }
  span.tc-pastille-etat:empty { display: none; }
  .tc-corps { padding: 4px 14px 18px; }
  .tc-cloture { grid-template-columns: 1fr; padding: 14px; }
  .tc-validation .primaire { width: 100%; }
  .tc-suite > summary, .tc-replie > summary { padding-left: 16px; padding-right: 16px; }
  .tc-replie > .meta { padding: 0 16px 8px; }
}

/* === ia-profils === */
.ia-admin h3 { margin: 22px 0 8px; font-size: 14px; }
.ia-profils { border: 0; padding: 0; margin: 0 0 4px; display: grid; gap: 8px; }
.ia-profils legend { font-weight: 600; padding: 0; margin-bottom: 8px; }
.ia-profil { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-s); cursor: pointer; }
.ia-profil:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.ia-profil input { margin-top: 3px; }
.ia-profil .discret { font-weight: 400; }
.ia-profil > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ia-taches, .ia-tests { width: 100%; margin: 0 0 14px; }
.ia-taches td, .ia-tests td { overflow-wrap: anywhere; }
.ia-tests { margin-top: 14px; }
.ia-ok, .ia-ko { font-weight: 600; }
.ia-ok { color: var(--ok); }
.ia-ko { color: var(--ko); }
.ia-cause, .ia-repli-m { display: block; font-weight: 400; font-size: 12.5px; }
.ia-repli-m { display: none; }
@media (max-width: 760px) {
  .ia-taches th:nth-child(3), .ia-taches .ia-repli { display: none; }
  .ia-repli-m { display: block; }
}
