/* Mise en page et composants (increment 2). Aucune couleur, variable ni mouvement defini ici :
   tout vient de theme.css (CA-I2-09). Seuil du volet dossier : 1100 px (N4). */

* { box-sizing: border-box; }
/* Lot 2.1 (D166-A2) : `min-height` et non `height` sur body, sinon la barre « sticky » quitte l'ecran
   apres une hauteur de fenetre. Les ancres s'arretent sous la barre fixe (D166-A3). */
html { height: 100%; scroll-padding-top: calc(var(--hauteur-barre) + var(--espace-4)); }
html, body { margin: 0; }
body { min-height: 100%; }
body {
  font-family: var(--police); font-size: var(--taille-texte); line-height: var(--interligne);
  color: var(--texte); background: var(--verre-fond-app, var(--fond)); font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; line-height: 1.25; font-weight: var(--graisse-forte); }
h1 { font-size: var(--taille-titre); letter-spacing: var(--interlettrage-titre); }
h2 { font-size: var(--taille-section); }
h3 { font-size: var(--taille-texte); }
p { margin: 0 0 var(--espace-2); }
ul, ol { margin: 0; padding-left: var(--espace-5); }
a { color: var(--accent); text-underline-offset: 2px; }
svg { flex: none; }
[hidden] { display: none !important; }
::selection { background: var(--accent-doux); }

/* Focus clavier toujours visible (D96) */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--rayon-petit); }
button:focus-visible, .bouton:focus-visible, .rail-lien:focus-visible, .menu-element:focus-visible {
  border-radius: var(--verre-rayon-controle, var(--rayon-petit)); }
.saut {
  position: absolute; left: var(--espace-3); top: var(--espace-2); z-index: var(--z-voile);
  transform: translateY(-200%); background: var(--surface); padding: var(--espace-2) var(--espace-3);
  border-radius: var(--rayon-petit); border: 1px solid var(--bordure-forte);
}
.saut:focus { transform: none; }

.petit, .aide { font-size: var(--taille-petit); color: var(--texte-doux); }
.aide { margin-top: var(--espace-1); }
.discret { color: var(--texte-discret); }
.mono, .chemin { font-family: var(--police-mono); font-size: var(--taille-petit); word-break: break-all; }
.visuellement-cache {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* --- Barre du haut ----------------------------------------------------------------------------- */
.barre {
  position: sticky; top: var(--verre-marge, 0px); z-index: var(--z-menu); height: var(--verre-hauteur-barre, var(--hauteur-barre));
  margin: var(--verre-marge, 0px) var(--verre-marge, 0px) 0; border-radius: var(--verre-rayon-plaque, 0px);
  display: flex; align-items: center; gap: var(--espace-3); padding: 0 var(--espace-4);
  background: var(--verre-fond-barre, var(--fond)); border-bottom: 1px solid var(--verre-bordure-plaque, var(--bordure));
  box-shadow: var(--verre-ombre, none);
}
/* Theme verre (D182) : le flou de la barre est porte par une couche dessous et non par la barre elle-meme, sinon
   la barre deviendrait le bloc conteneur de la recherche plein ecran (position fixe) et la racine du flou de ses
   menus, qui ne flouteraient plus la page. Sans effet hors du theme verre (flou `none`). */
.barre::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
  -webkit-backdrop-filter: var(--verre-flou, none); backdrop-filter: var(--verre-flou, none); }
.marque { display: flex; align-items: center; gap: var(--espace-2); font-weight: var(--graisse-forte);
  color: var(--texte); text-decoration: none; letter-spacing: var(--interlettrage-titre); }
.marque-logo { width: 22px; height: 22px; border-radius: var(--rayon-petit); background: var(--texte);
  color: var(--fond); display: grid; place-items: center; font-size: var(--taille-petit); }
.barre-separateur { width: 1px; height: 20px; background: var(--bordure-forte); }
.barre-espace { flex: 1; }
.barre-droite { display: flex; align-items: center; gap: var(--espace-3); }

/* Selecteur de mission (choix 02) */
.selecteur { position: relative; min-width: 0; }
.selecteur-bouton { display: flex; align-items: center; gap: var(--espace-2); max-width: 420px; min-width: 0;
  padding: var(--espace-1) var(--espace-2); border: 1px solid transparent; }
.selecteur-bouton:hover { background: var(--survol); }
.selecteur-titre { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; text-align: left; line-height: 1.2; }
.selecteur-titre strong, .selecteur-titre span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 340px; }
.selecteur-titre strong { font-weight: var(--graisse-forte); }
.menu-deroulant {
  position: absolute; top: calc(100% + var(--espace-1)); left: 0; z-index: var(--z-menu);
  width: 360px; max-height: 60vh; overflow: auto; padding: var(--espace-1);
  background: var(--verre-fond, var(--surface)); border: 1px solid var(--verre-bordure, var(--bordure-forte));
  border-radius: var(--verre-rayon, var(--rayon)); box-shadow: var(--verre-ombre, var(--ombre-2));
  -webkit-backdrop-filter: var(--verre-flou, none); backdrop-filter: var(--verre-flou, none);
}
.menu-titre { padding: var(--espace-2) var(--espace-3) var(--espace-1); font-size: var(--taille-petit); color: var(--texte-doux); }
.menu-element { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: var(--espace-3);
  padding: var(--espace-2) var(--espace-3); border: 0; border-radius: var(--verre-rayon-controle, var(--rayon-petit)); background: transparent;
  color: var(--texte); text-align: left; text-decoration: none; cursor: pointer; font: inherit; }
.menu-element:hover, .menu-element:focus-visible { background: var(--survol); }
.menu-element[aria-current="true"] { background: var(--accent-doux); }
.menu-element .petit { display: block; }
.menu-ligne { display: flex; align-items: center; gap: var(--espace-1); }
.menu-ligne .menu-element { flex: 1; min-width: 0; }
.menu-archiver { flex: none; color: var(--texte-doux); }
.menu-archiver:hover, .menu-archiver:focus-visible { color: var(--texte); background: var(--survol); }
.menu-separateur { height: 1px; margin: var(--espace-1) 0; background: var(--bordure); }

/* Puce budget (choix 04) */
.puce { display: inline-flex; align-items: center; gap: var(--espace-2); padding: var(--espace-1) var(--espace-3);
  border: 1px solid var(--bordure-forte); border-radius: var(--rayon-pastille); color: var(--texte-doux);
  font-size: var(--taille-petit); text-decoration: none; white-space: nowrap; background: var(--surface); }
.puce:hover { color: var(--texte); background: var(--survol); }
.puce.attention { color: var(--attention); background: var(--attention-fond); border-color: transparent; }

/* Avatars et roles (K1, V4) : etiquettes neutres avec libelle, jamais la couleur seule */
.avatars { display: flex; align-items: center; }
.avatar { width: 28px; height: 28px; border-radius: var(--rayon-pastille); display: inline-grid; place-items: center;
  background: var(--avatar-fond); color: var(--avatar-texte); font-size: 11.5px; font-weight: var(--graisse-forte);
  border: 2px solid var(--fond); letter-spacing: 0.02em; }
.avatars .avatar + .avatar { margin-left: calc(-1 * var(--espace-2)); }
.avatar.grand { width: 36px; height: 36px; font-size: var(--taille-petit); }
.utilisateur { display: flex; align-items: center; gap: var(--espace-2); }
.utilisateur-nom { display: flex; flex-direction: column; line-height: 1.2; }
.role { display: inline-block; padding: 0 var(--espace-2); border: 1px solid var(--bordure-forte);
  border-radius: var(--rayon-pastille); font-size: 11.5px; color: var(--texte-doux); background: var(--surface); }

/* --- Coque : rail | contenu | volet ------------------------------------------------------------ */
.coque { display: grid; grid-template-columns: var(--largeur-rail) minmax(0, 1fr); min-height: calc(100vh - var(--hauteur-barre)); }
body.rail-replie .coque { grid-template-columns: var(--largeur-rail-replie) minmax(0, 1fr); }
/* Lot 2.7 (M1) : largeur choisie a la poignee (posee par app.js sur la racine, bornee par --largeur-volet-min et
   --largeur-volet-max), sinon la largeur par defaut. */
body.volet-ouvert .coque { grid-template-columns: var(--largeur-rail) minmax(0, 1fr) var(--largeur-volet-choisie, var(--largeur-volet)); }
body.rail-replie.volet-ouvert .coque { grid-template-columns: var(--largeur-rail-replie) minmax(0, 1fr) var(--largeur-volet-choisie, var(--largeur-volet)); }

/* Rail (N1, N2) */
.rail { position: sticky; top: var(--hauteur-barre); height: calc(100vh - var(--hauteur-barre) - var(--verre-marge, 0px));
  display: flex; flex-direction: column; margin: var(--verre-marge, 0px) 0 0 var(--verre-marge, 0px);
  padding: var(--espace-3) var(--espace-2); border-right: 1px solid var(--verre-bordure-plaque, var(--bordure));
  border-radius: var(--verre-rayon-plaque, 0px); background: var(--verre-fond-barre, var(--fond)); overflow-y: auto;
  box-shadow: var(--verre-ombre, none); -webkit-backdrop-filter: var(--verre-flou, none); backdrop-filter: var(--verre-flou, none); }
.rail-groupe { margin-bottom: var(--espace-4); }
.rail-titre { padding: 0 var(--espace-3) var(--espace-1); font-size: 11.5px; font-weight: var(--graisse-moyenne);
  color: var(--texte-discret); letter-spacing: 0.04em; text-transform: uppercase; }
.rail-lien { display: flex; align-items: center; gap: var(--espace-3); height: 32px; padding: 0 var(--espace-3);
  border-radius: var(--verre-rayon-controle, var(--rayon-petit)); color: var(--texte-doux); text-decoration: none; white-space: nowrap; overflow: hidden; }
.rail-lien:hover { background: var(--survol); color: var(--texte); }
.rail-lien[aria-current="page"] { background: var(--accent-doux); color: var(--accent-sur-doux); font-weight: var(--graisse-moyenne); }
.rail-pied { margin-top: auto; }
.rail-bascule { width: 100%; justify-content: flex-start; color: var(--texte-doux); }
body.rail-replie .rail-libelle, body.rail-replie .rail-titre { display: none; }
body.rail-replie .rail-lien, body.rail-replie .rail-bascule { justify-content: center; padding: 0; }
body.rail-replie .rail-groupe { margin-bottom: var(--espace-3); padding-top: var(--espace-2); border-top: 1px solid var(--bordure); }
body.rail-replie .rail-groupe:first-child { border-top: 0; padding-top: 0; }

/* Contenu */
.contenu { min-width: 0; padding: var(--espace-4) var(--espace-6) var(--espace-7); } /* Coeur d'abord A : marge haute 16 px */
.contenu:focus { outline: none; }
.page { max-width: var(--largeur-contenu); margin: 0 auto; }
/* Lot 2.7 (M2) : pages plus larges, mais texte courant a une longueur de ligne confortable ; planning et
   apercus de tableurs de bord a bord, sans plafond. */
.page p, .entete-page .meta { max-width: var(--largeur-lecture); }
.page:has(.frise-carte), .page:has(.apercu-tableau) { max-width: none; }
.entete-page { margin-bottom: var(--espace-5); }
.surtitre { font-size: var(--taille-petit); color: var(--texte-doux); margin-bottom: var(--espace-1); }
.entete-page .meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--espace-2) var(--espace-3);
  margin-top: var(--espace-2); color: var(--texte-doux); font-size: var(--taille-petit); }

/* Coeur d'abord A - socle (C01, CA-CD-03, T29, T36, T37) : ligne de titre compacte, barre de page, panneaux depliables,
   bouton « i », bandeaux d'une ligne. Classes PROPRES : `.entete-page` seul (Accueil, apercu) et `.av-entete` (page
   Avancement, AV14) gardent leur rendu. Une ligne ; sous 760 px, deux lignes au plus ; jamais de defilement horizontal. */
.entete-page.entete-compacte { display: flex; flex-wrap: nowrap; align-items: baseline; gap: 0 var(--espace-3); min-width: 0;
  margin-bottom: var(--espace-3); }
.entete-compacte h1 { flex: none; max-width: 100%; font-size: 20px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entete-compacte .surtitre { order: 1; flex: 0 1 auto; min-width: 0; max-width: 32ch; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entete-compacte .meta { order: 2; flex: 1 1 0; min-width: 0; max-width: none; margin: 0; display: block; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.entete-compacte .meta > * + *::before { content: "·"; margin: 0 var(--espace-2); color: var(--texte-discret); }
.entete-compacte .meta > .badge { vertical-align: baseline; }
.entete-compacte .meta > .badge + *::before, .entete-compacte .meta > * + .badge::before { content: none; }
.entete-compacte .meta > * + .badge { margin-left: var(--espace-2); }
.entete-compacte .meta > .badge + * { margin-left: var(--espace-2); }
.entete-compacte .entete-actions { order: 3; flex: none; display: flex; gap: var(--espace-2); align-self: center; }
.barre-page { display: flex; flex-wrap: wrap; align-items: center; gap: var(--espace-2); min-width: 0; margin-bottom: var(--espace-3); }
.panneau-hote { display: contents; }
.barre-page .panneau { order: 99; flex: 1 0 100%; min-width: 0; }
.panneau { min-width: 0; margin: var(--espace-2) 0 var(--espace-3); padding: var(--espace-3) var(--espace-4); border: 1px solid var(--bordure);
  border-radius: var(--rayon); background: var(--surface); }
.panneau[hidden] { display: none; }
.panneau-aide { background: var(--surface-douce); font-size: var(--taille-petit); color: var(--texte-doux); }
.panneau > :first-child { margin-top: 0; }
.panneau > :last-child { margin-bottom: 0; }
button.pastille-panneau { height: 28px; padding: 0 var(--espace-3); border-radius: var(--rayon-pastille); font-size: var(--taille-petit); }
button.pastille-panneau[aria-expanded="true"] { background: var(--accent-doux); color: var(--accent-sur-doux); border-color: var(--accent); }
.pastille-n { font-variant-numeric: tabular-nums; font-weight: var(--graisse-forte); }
button.bouton-aide { width: 28px; height: 28px; padding: 0; }
div.bandeau-une-ligne { display: flex; flex-wrap: nowrap; align-items: center; gap: var(--espace-1) var(--espace-3); min-width: 0; min-height: 40px;
  margin-bottom: var(--espace-3); padding: var(--espace-1) var(--espace-2) var(--espace-1) var(--espace-4); }
.bandeau-une-ligne-texte { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bandeau-une-ligne-actions { flex: none; display: flex; align-items: center; gap: var(--espace-2); }
.bandeau-une-ligne-actions form { display: flex; flex-wrap: nowrap; gap: var(--espace-2); margin: 0; }
.bandeau-une-ligne-actions input { width: 220px; min-width: 0; height: 30px; margin: 0; }
.bandeau-une-ligne-actions input[hidden] { display: none; }
.bandeau-une-ligne button { height: 30px; }
.bandeau-une-ligne.bandeau-archive form, .bandeau-une-ligne.bandeau-archive input { margin-left: 0; min-width: 0; }
@media (max-width: 760px) {
  .entete-page.entete-compacte { flex-wrap: wrap; }
  .entete-compacte h1 { flex: 0 1 auto; min-width: 0; }
  .entete-compacte .surtitre { flex: 1 1 0; max-width: none; }
  .entete-compacte .meta { flex: 1 0 100%; }
  /* Bandeau : texte sur deux lignes au plus, lisible au toucher sans dependre de `title`. La meta de l'en-tete reste
     sur UNE ligne (en-tete = deux lignes au plus sous 760 px, note section 3 : h1 puis meta) ; son texte complet est
     dans `title` et dans le « i » de la page. */
  .bandeau-une-ligne-texte { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
    line-clamp: 2; overflow: hidden; white-space: normal; text-overflow: clip; }
  div.bandeau-une-ligne { flex-wrap: wrap; }
  .bandeau-une-ligne-actions { flex: 1 0 100%; justify-content: flex-end; min-width: 0; }
  .bandeau-une-ligne-actions form { flex: 1; min-width: 0; }
  .bandeau-une-ligne-actions input { flex: 1; width: auto; }
}

/* Cartes et sections : bordure fine, pas d'ombre (V3) */
.section { margin-bottom: var(--espace-6); }
.section-titre { display: flex; align-items: baseline; justify-content: space-between; gap: var(--espace-3); margin-bottom: var(--espace-3); }
.section-titre h2 { font-size: var(--taille-section); }
.carte { background: var(--surface); border: 1px solid var(--verre-bordure-carte, var(--bordure)); border-radius: var(--rayon);
  padding: var(--espace-4) var(--espace-5); box-shadow: var(--verre-ombre-carte, none); }
.carte + .carte { margin-top: var(--espace-3); }
.grille-2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--espace-4); }
.colonnes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--espace-4); }

/* Carte « Prochaine action » (N3) */
.prochaine { display: flex; flex-direction: column; gap: var(--espace-3); padding: var(--espace-5); border-radius: var(--rayon);
  background: var(--accent-doux); border: 1px solid var(--verre-bordure-carte, var(--bordure)); box-shadow: var(--verre-ombre-carte, none); }
.prochaine-libelle { font-size: var(--taille-petit); font-weight: var(--graisse-moyenne); color: var(--accent-sur-doux); }
.prochaine-texte { font-size: 17px; font-weight: var(--graisse-moyenne); line-height: 1.4; color: var(--texte); }

/* Mise en route (choix 06, D169-A9) : faite = coche, en cours = point d'accent et texte gras,
   a venir = cercle numerote grise, facultative non faite = libelle « Facultatif » sans numero. */
.parcours { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--espace-2); list-style: none; padding: 0; margin: 0; }
.parcours a { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: var(--espace-3); border-radius: var(--rayon);
  border: 1px solid var(--verre-bordure-carte, var(--bordure)); background: var(--surface); color: var(--texte); text-decoration: none; }
.parcours a:hover { background: var(--survol); }
.parcours .numero { flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: var(--rayon-pastille);
  font-size: 11px; font-weight: var(--graisse-forte); border: 1px solid var(--bordure-forte); color: var(--texte-discret); }
.parcours .etape-titre { display: flex; align-items: center; gap: var(--espace-2); font-weight: var(--graisse-moyenne); }
.parcours .etape-detail { font-size: var(--taille-petit); color: var(--texte-doux); }
.parcours .fait .numero { background: var(--succes-fond); color: var(--succes); border-color: transparent; }
.parcours .courant a { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.parcours .courant .numero { border-color: var(--accent); }
.parcours .courant .point { width: 8px; height: 8px; border-radius: var(--rayon-pastille); background: var(--accent); }
.parcours .courant .etape-libelle { font-weight: var(--graisse-forte); }
.parcours .a_venir .etape-libelle, .parcours .facultatif .etape-libelle { color: var(--texte-doux); }
.etiquette-facultatif { flex: none; padding: 0 var(--espace-2); border: 1px dashed var(--bordure-champ); border-radius: var(--rayon-pastille);
  font-size: 11px; font-weight: var(--graisse-moyenne); color: var(--texte-doux); }
.etape-suivante { display: flex; justify-content: flex-end; padding-top: var(--espace-4); border-top: 1px solid var(--bordure); margin-bottom: var(--espace-6); }

/* Activite recente (N3) */
.activite { list-style: none; padding: 0; margin: 0; }
.activite li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--espace-3); padding: var(--espace-2) 0;
  border-bottom: 1px solid var(--bordure); }
.activite li:last-child { border-bottom: 0; }
.activite time { color: var(--texte-doux); font-size: var(--taille-petit); }
.activite li > span { min-width: 0; overflow-wrap: anywhere; } /* chemins de dossier sans espace */
button.suggestion { height: auto; min-height: 26px; padding: var(--espace-1) var(--espace-2); white-space: normal; text-align: left;
  border-radius: var(--rayon-petit); }

/* --- Listes bordees denses (N5) ------------------------------------------------------------------ */
.liste { border: 1px solid var(--verre-bordure-carte, var(--bordure)); border-radius: var(--rayon); background: var(--surface); overflow: hidden;
  box-shadow: var(--verre-ombre-carte, none); }
.liste-ligne { display: grid; grid-template-columns: minmax(120px, 0.9fr) minmax(0, 2fr) auto; gap: var(--espace-3);
  align-items: center; padding: var(--espace-2) var(--espace-3); border-bottom: 1px solid var(--bordure); }
.liste-ligne:last-child { border-bottom: 0; }
.liste-ligne:hover { background: var(--surface-douce); }
.liste-cle { color: var(--texte-doux); font-size: var(--taille-petit); overflow-wrap: anywhere; }
.liste-valeur { min-width: 0; overflow-wrap: anywhere; }
.liste-actions { display: flex; align-items: center; justify-content: flex-end; gap: var(--espace-2); }
/* Increment 4 (D181-4) : selecteur « Type » d'un document ; « Signaler un evenement » (Accueil). */
.type-document-champ { display: inline-flex; align-items: center; gap: var(--espace-1); }
.type-document-champ select { width: auto; min-width: 9rem; }
.signaler-evenement .evenement-formulaire { margin-top: var(--espace-2); }
.liste-vide { padding: var(--espace-4); color: var(--texte-doux); }
.liste:empty { display: none; }
.volet-groupe > summary { cursor: pointer; padding: var(--espace-2) var(--espace-3); font-weight: 600; }
.volet-groupe + .volet-groupe { border-top: 1px solid var(--bordure); }
.membres-liste { list-style: none; padding: 0; margin: var(--espace-3) 0; }
.membre { display: flex; align-items: center; gap: var(--espace-3); padding: var(--espace-1) 0; }
.membre-nom { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
/* Lot M, tranche E : panneau « Membres » en ligne (role modifiable, retrait, ajout d'un compte actif). */
.panneau-membres h2 { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--espace-2); }
.panneau-membres h2:focus-visible, .panneau-membres h2:focus { outline-offset: var(--espace-1); }
.membres-nombre { font-weight: var(--graisse-normale, 400); color: var(--texte-doux); }
.panneau-membres .membre { flex-wrap: wrap; padding: var(--espace-2) 0; border-top: 1px solid var(--bordure); }
.panneau-membres .membre:first-child { border-top: 0; }
.panneau-membres .membre-nom { flex: 1 1 140px; min-width: 0; overflow-wrap: anywhere; }
.membre-identite { display: inline-flex; align-items: center; flex-wrap: wrap; gap: var(--espace-1); font-weight: var(--graisse-forte); }
.membre-etat { color: var(--texte-doux); }
.membre-commandes { display: flex; align-items: center; flex-wrap: wrap; gap: var(--espace-2); margin-left: auto; }
.membre-commandes select.membre-role { width: auto; min-width: 132px; }
.membres-puces { list-style: none; display: flex; flex-wrap: wrap; gap: var(--espace-1) var(--espace-2); padding: 0; margin: var(--espace-2) 0 0; }
.membre-puce { position: relative; display: inline-flex; align-items: center; gap: var(--espace-1); padding: 2px var(--espace-2) 2px 2px; border: 1px solid var(--bordure);
  border-radius: var(--rayon-pastille); max-width: 100%; }
.membre-puce .avatar { width: 22px; height: 22px; font-size: var(--taille-petit); flex: none; }
.membre-puce .role { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } /* role : infobulle + lecteur d'ecran */
.membre-puce-nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panneau-membres .section-titre { margin-bottom: 0; flex-wrap: wrap; }
.panneau-membres .panneau { flex: 1 1 100%; min-width: 0; }
.panneau-membres .panneau-pastille { margin-top: var(--espace-2); }
.membre-ajout { margin-top: var(--espace-3); padding-top: var(--espace-3); border-top: 1px solid var(--bordure-forte); }
.membre-ajout h3 { margin: 0 0 var(--espace-2); font-size: var(--taille-petit); }
.membre-ajout .ligne-champs > label { flex: 1 1 160px; min-width: 0; }
.membre-ajout select { width: 100%; max-width: 100%; }
.membre-ajout .boutons { margin-top: var(--espace-2); }
@media (max-width: 520px) {
  .panneau-membres .membre-commandes { margin-left: 0; width: 100%; padding-left: calc(36px + var(--espace-3)); }
  .membre-commandes select.membre-role { flex: 1 1 auto; min-width: 0; }
}
.attribution { grid-column: 2 / -1; margin-top: calc(-1 * var(--espace-1)); font-size: var(--taille-petit); color: var(--texte-discret); }
.citation { display: block; font-size: var(--taille-petit); color: var(--texte-doux); font-style: italic; }

/* Edition en ligne au clic (N5) */
.editable { display: inline; height: auto; padding: 1px var(--espace-1); margin: -1px calc(-1 * var(--espace-1));
  border: 1px solid transparent; border-radius: var(--rayon-petit); background: transparent; color: inherit; font: inherit;
  font-weight: inherit; white-space: normal; text-align: left; cursor: text; overflow-wrap: anywhere; }
.editable:hover { border-color: var(--bordure-forte); background: var(--surface); }
.editable-champ { width: 100%; }

/* Badges d'etat : violet IA, bleu humain a confirmer, vert confirme (N5) ; toujours avec libelle */
.badge { display: inline-flex; align-items: center; gap: var(--espace-1); padding: 1px var(--espace-2); border-radius: var(--rayon-pastille);
  font-size: 11.5px; font-weight: var(--graisse-moyenne); white-space: nowrap; background: var(--surface-douce); color: var(--texte-doux); }
.badge.ia { background: var(--ia-fond); color: var(--ia); }
.badge.humain { background: var(--humain-fond); color: var(--humain); }
/* Point 4 (2026-11-19) : date ou duree modifiee a la main, repere discret avec infobulle. */
.badge.modifie { background: var(--humain-fond); color: var(--humain); cursor: help; }
.badge.succes { background: var(--succes-fond); color: var(--succes); }
.badge.attention { background: var(--attention-fond); color: var(--attention); }
.badge.erreur { background: var(--erreur-fond); color: var(--erreur); }
/* Lot S1 : fait dont la source n'est plus autorisee (sobre, bordure pointillee) ; avis avant la premiere lecture IA */
.badge.source-non-autorisee { border: 1px dashed var(--attention); cursor: help; }
.avis-premiere-lecture { display: flex; align-items: flex-start; gap: var(--espace-1); margin: var(--espace-2) 0; color: var(--texte-doux); }
.marque-nouveau { margin-left: var(--espace-1); }

/* --- Formulaires et boutons ---------------------------------------------------------------------- */
label { display: block; font-size: var(--taille-petit); color: var(--texte-doux); margin-bottom: var(--espace-3); }
label.case { display: flex; align-items: center; gap: var(--espace-2); color: var(--texte); font-size: var(--taille-texte); margin: 0; }
input, select, textarea {
  display: block; width: 100%; margin-top: var(--espace-1); padding: 7px var(--espace-3);
  font: inherit; color: var(--texte); background: var(--surface); border: 1px solid var(--bordure-champ); border-radius: var(--rayon-petit);
  transition: border-color var(--duree-micro);
}
input:hover, select:hover, textarea:hover { border-color: var(--texte-doux); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
textarea { resize: vertical; min-height: 72px; }
.ligne-champs { display: flex; flex-wrap: wrap; gap: var(--espace-3); align-items: flex-end; }
.ligne-champs > label { flex: 1 1 200px; }
.ligne-champs > .etroit { flex: 0 0 140px; }

button, .bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--espace-2); height: 32px; padding: 0 var(--espace-3);
  font: inherit; font-weight: var(--graisse-moyenne); color: var(--texte); text-decoration: none; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--bordure-forte); border-radius: var(--verre-rayon-controle, var(--rayon-petit)); cursor: pointer;
  transition: background-color var(--duree-micro), border-color var(--duree-micro), color var(--duree-micro),
    transform var(--duree-relache) var(--courbe-ressort), opacity var(--duree-relache) ease-out;
}
/* Appui (tous les themes) : le controle s'enfonce un peu a `:active` (echelle et opacite seulement), vite, puis
   revient avec un ressort doux (transition de repos ci-dessus). Jamais sur un controle desactive ni sur les
   boutons « texte » (edition en ligne, arbre, frise, pastille) ; lignes de menu et du rail : echelle plus discrete.
   Rien ne change au repos. prefers-reduced-motion : neutralise dans theme.css. */
a.menu-element, .rail-lien, a.puce { transition: transform var(--duree-relache) var(--courbe-ressort), opacity var(--duree-relache) ease-out; }
button:not(:disabled):not([aria-disabled="true"]):not(.menu-element):not(.editable):not(.arbre-nom):not(.frise-nom):not(.pastille-nom):active,
.bouton:not([aria-disabled="true"]):active, a.puce:active {
  transform: scale(var(--echelle-pression)); opacity: var(--opacite-pression);
  transition: background-color var(--duree-micro), border-color var(--duree-micro), color var(--duree-micro),
    transform var(--duree-pression) ease-out, opacity var(--duree-pression) ease-out; }
.menu-element:not(:disabled):not([aria-disabled="true"]):active, .rail-lien:active {
  transform: scale(var(--echelle-pression-large)); opacity: var(--opacite-pression);
  transition: background-color var(--duree-micro), border-color var(--duree-micro), color var(--duree-micro),
    transform var(--duree-pression) ease-out, opacity var(--duree-pression) ease-out; }
button:hover, .bouton:hover { background: var(--survol); }
button.principal { background: var(--verre-fond-principal, var(--accent)); color: var(--accent-texte); border-color: var(--accent); }
button.principal:hover { background: var(--verre-fond-principal-survol, var(--accent-survol)); border-color: var(--accent-survol); }
button.fantome { background: transparent; border-color: transparent; color: var(--texte-doux); }
button.fantome:hover { background: var(--survol); color: var(--texte); }
button.danger { color: var(--erreur); }
button.petit { height: 26px; padding: 0 var(--espace-2); font-size: var(--taille-petit); }
button.icone { width: 32px; padding: 0; }
button.icone.petit { width: 26px; }
button:disabled { cursor: not-allowed; opacity: 0.5; }
body.occupe button, body.occupe a { pointer-events: none; }
.boutons { display: flex; flex-wrap: wrap; gap: var(--espace-2); align-items: center; }

/* Messages en ligne */
.encadre { border-radius: var(--rayon); padding: var(--espace-3) var(--espace-4); margin-bottom: var(--espace-3); border: 1px solid var(--bordure); }
.encadre.info { background: var(--surface-douce); }
.encadre.attention { background: var(--attention-fond); color: var(--attention); border-color: transparent; }
.encadre.erreur { background: var(--erreur-fond); color: var(--erreur); border-color: transparent; }
.encadre.succes { background: var(--succes-fond); color: var(--succes); border-color: transparent; }
.encadre.ia { background: var(--ia-fond); color: var(--ia); border-color: transparent; }
.encadre h3 { margin-bottom: var(--espace-1); }

/* Tableaux (planning, budget) */
table { width: 100%; border-collapse: collapse; font-size: var(--taille-petit); }
th, td { text-align: left; padding: var(--espace-2) var(--espace-3); border-bottom: 1px solid var(--bordure); vertical-align: top; }
th { color: var(--texte-doux); font-weight: var(--graisse-moyenne); }
tr:last-child td { border-bottom: 0; }
td.nombre, th.nombre { text-align: right; font-variant-numeric: tabular-nums; }

/* Organisation : phases */
.phase { border-bottom: 1px solid var(--bordure); padding: var(--espace-3) var(--espace-4); }
.phase:last-child { border-bottom: 0; }
.phase.ecartee { background: var(--surface-douce); }
.phase-entete { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--espace-2); }
.phase-entete h3 { font-weight: var(--graisse-moyenne); }
.phase .dates { font-size: var(--taille-petit); color: var(--texte-doux); }
.phase ul { font-size: var(--taille-petit); margin: var(--espace-2) 0; color: var(--texte-doux); }
.phase .controles { display: flex; flex-wrap: wrap; gap: var(--espace-3); align-items: flex-end; padding-top: var(--espace-2); }
.phase .controles label { margin: 0; }
details { margin: var(--espace-3) 0; }
summary { cursor: pointer; font-weight: var(--graisse-moyenne); color: var(--texte-doux); }
summary:hover { color: var(--texte); }

/* Indicateurs (Budget IA) */
.tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--espace-3); margin-bottom: var(--espace-5); }
.tuile { padding: var(--espace-4); border: 1px solid var(--verre-bordure-carte, var(--bordure)); border-radius: var(--rayon); background: var(--surface);
  box-shadow: var(--verre-ombre-carte, none); }
.tuile-valeur { display: block; font-size: var(--taille-chiffre); font-weight: var(--graisse-forte); font-variant-numeric: tabular-nums; letter-spacing: var(--interlettrage-titre); }
.jauge { height: 6px; border-radius: var(--rayon-pastille); background: var(--surface-douce); overflow: hidden; margin: var(--espace-2) 0; }
.jauge-remplie { height: 100%; width: 100%; background: var(--accent); transform-origin: left center; }
.jauge.attention .jauge-remplie { background: var(--attention); }

/* --- Volet dossier (N4, choix 07) : pousse le contenu au-dela de 1100 px, tiroir en dessous ------ */
.volet { position: sticky; top: var(--hauteur-barre); height: calc(100vh - var(--hauteur-barre) - var(--verre-marge, 0px));
  display: flex; flex-direction: column; margin: var(--verre-marge, 0px) var(--verre-marge, 0px) 0 0; border-radius: var(--verre-rayon-plaque, 0px);
  border-left: 1px solid var(--verre-bordure-plaque, var(--bordure)); background: var(--verre-fond-barre, var(--fond)); min-width: 0;
  box-shadow: var(--verre-ombre, none); -webkit-backdrop-filter: var(--verre-flou, none); backdrop-filter: var(--verre-flou, none); }
.volet-entete { display: flex; align-items: center; justify-content: space-between; gap: var(--espace-2);
  padding: var(--espace-3) var(--espace-3) var(--espace-2) var(--espace-4); }
.volet-entete h2 { font-size: var(--taille-texte); }
.volet-chemin { padding: 0 var(--espace-4) var(--espace-2); }
.volet-actions { display: flex; gap: var(--espace-2); padding: 0 var(--espace-4) var(--espace-3); border-bottom: 1px solid var(--bordure); }
.volet-corps { flex: 1; overflow: auto; padding: var(--espace-2) var(--espace-2) var(--espace-4); }
.volet-pied { padding: var(--espace-2) var(--espace-4); border-top: 1px solid var(--bordure); font-size: var(--taille-petit); color: var(--texte-doux); }
/* Lot 2.7 (M1) : poignee sur le bord gauche du volet (souris, tactile, clavier) ; trait visible au survol et au focus. */
.volet-poignee { position: absolute; top: 0; bottom: 0; left: calc(-0.5 * var(--largeur-poignee)); width: var(--largeur-poignee);
  z-index: var(--z-poignee-volet); cursor: col-resize; touch-action: none; display: flex; justify-content: center; }
.volet-poignee::after { content: ""; width: 2px; height: 100%; background: var(--accent); opacity: 0; transition: opacity var(--duree-micro) ease-out; }
.volet-poignee:hover::after, .volet-poignee:focus-visible::after, .volet-poignee.glisse::after { opacity: 1; }
.volet-poignee:focus-visible { outline: none; }
body.redimension, body.redimension * { cursor: col-resize; user-select: none; }
.arbre { list-style: none; margin: 0; padding: 0; }
.arbre-ligne { display: flex; align-items: center; gap: var(--espace-2); min-height: 28px; padding-right: var(--espace-1);
  border-radius: var(--rayon-petit); }
.arbre-ligne:hover, .arbre-ligne:focus-within { background: var(--survol); }
.arbre-nom { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start;
  padding: 2px 0; border: 0; background: transparent; color: var(--texte); font: inherit; font-weight: inherit;
  text-align: left; white-space: normal; cursor: default; height: auto; }
button.arbre-nom:hover { background: transparent; }
.arbre-nom.dossier, .arbre-nom.apercu { cursor: pointer; }
.arbre-nom.apercu:hover span:first-child { text-decoration: underline; }
.arbre-nom.apercu[aria-current="page"] { color: var(--accent-sur-doux); font-weight: var(--graisse-moyenne); }
.arbre-nom span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arbre-statut { font-size: 11.5px; color: var(--texte-discret); font-weight: 400; }
/* Lot 2.6 (L3) : « Ouvrir » toujours visible (plus d'effet de survol : clavier, ecran tactile). */
.arbre-ouvrir { flex: none; align-self: flex-start; margin-top: 1px; }
.prof-0 { padding-left: var(--espace-2); }
.prof-1 { padding-left: calc(var(--espace-2) + 1 * var(--retrait-arbre)); }
.prof-2 { padding-left: calc(var(--espace-2) + 2 * var(--retrait-arbre)); }
.prof-3 { padding-left: calc(var(--espace-2) + 3 * var(--retrait-arbre)); }
.prof-4 { padding-left: calc(var(--espace-2) + 4 * var(--retrait-arbre)); }
.prof-5 { padding-left: calc(var(--espace-2) + 5 * var(--retrait-arbre)); }
.prof-6 { padding-left: calc(var(--espace-2) + 6 * var(--retrait-arbre)); }
.prof-7 { padding-left: calc(var(--espace-2) + 7 * var(--retrait-arbre)); }
.prof-8 { padding-left: calc(var(--espace-2) + 8 * var(--retrait-arbre)); }
.icone-chevron.replie { transform: rotate(-90deg); }

/* --- Apercu integre des livrables (lot 2.4, D171) : lecture seule ------------------------------------ */
.page:has(.apercu-cadre) { max-width: var(--largeur-contenu); }
.apercu-entete .apercu-actions { margin-top: var(--espace-3); }
.apercu-entete select { width: auto; max-width: 100%; }
.apercu-entete .aide { margin-top: var(--espace-2); }
.apercu-retour { display: inline-flex; align-items: center; gap: var(--espace-1); color: var(--texte-doux); }
.apercu-retour:hover { color: var(--texte); }
.apercu-cadre { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--espace-4); align-items: start; }
.apercu-fichiers { position: sticky; top: calc(var(--hauteur-barre) + var(--espace-4)); }
.apercu-fichiers-titre { color: var(--texte-doux); margin-bottom: var(--espace-2); }
.apercu-fichiers ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.apercu-fichier { display: flex; align-items: center; gap: var(--espace-2); padding: var(--espace-2); border-radius: var(--rayon-petit);
  color: var(--texte); text-decoration: none; }
.apercu-fichier:hover { background: var(--survol); }
.apercu-fichier[aria-current="page"] { background: var(--accent-doux); color: var(--accent-sur-doux); font-weight: var(--graisse-moyenne); }
.apercu-zone { min-width: 0; }
.apercu-onglets { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--bordure); margin-bottom: var(--espace-3); }
button.apercu-onglet { flex: 0 0 auto; border: 0; border-bottom: 2px solid transparent; border-radius: var(--rayon-petit) var(--rayon-petit) 0 0;
  background: transparent; color: var(--texte-doux); }
button.apercu-onglet:hover { background: var(--survol); color: var(--texte); }
button.apercu-onglet[aria-selected="true"] { color: var(--texte); border-bottom-color: var(--accent); font-weight: var(--graisse-moyenne); }
.apercu-tableau { max-height: 70vh; overflow: auto; }
table.apercu-table { width: auto; min-width: 100%; }
.apercu-table th, .apercu-table td { padding: var(--espace-1) var(--espace-2); border-right: 1px solid var(--bordure);
  white-space: pre-wrap; min-width: 7em; max-width: 360px; overflow-wrap: break-word; }
.apercu-table th { min-width: 0; }
.apercu-table thead th { position: sticky; top: 0; z-index: 1; background: var(--verre-opaque-douce, var(--surface-douce)); text-align: center; }
.apercu-table tbody th { position: sticky; left: 0; background: var(--verre-opaque-douce, var(--surface-douce)); text-align: right;
  font-variant-numeric: tabular-nums; }
.apercu-table thead th.apercu-coin { left: 0; z-index: 2; }
.apercu-table td.formule { font-family: var(--police-mono); color: var(--texte-doux); }
.apercu-notes { display: flex; flex-wrap: wrap; align-items: center; gap: var(--espace-2) var(--espace-3); margin-top: var(--espace-3); }
.apercu-erreur h2 { font-size: var(--taille-section); margin-bottom: var(--espace-1); }
.apercu-erreur .boutons { margin-top: var(--espace-3); }
.apercu-doc { max-width: 780px; }
.apercu-doc p, .apercu-doc .doc-liste { margin: 0 0 var(--espace-2); }
.apercu-doc .doc-titre { margin: var(--espace-5) 0 var(--espace-2); line-height: 1.3; }
.apercu-doc .doc-titre:first-child { margin-top: 0; }
.apercu-doc .doc-titre-0 { font-size: var(--taille-chiffre); letter-spacing: var(--interlettrage-titre); }
.apercu-doc .doc-titre-1 { font-size: var(--taille-section); }
.apercu-doc .doc-titre-2, .apercu-doc .doc-titre-3, .apercu-doc .doc-titre-4 { font-size: var(--taille-texte); }
.apercu-doc .doc-sous-titre { color: var(--texte-doux); }
.doc-liste { padding-left: var(--espace-5); }
.doc-liste .doc-niveau-2 { margin-left: var(--espace-5); }
.doc-liste .doc-niveau-3 { margin-left: calc(2 * var(--espace-5)); }
.doc-liste .doc-niveau-4 { margin-left: calc(3 * var(--espace-5)); }
.doc-image { display: flex; align-items: center; gap: var(--espace-2); padding: var(--espace-2) var(--espace-3); color: var(--texte-doux);
  font-size: var(--taille-petit); border: 1px dashed var(--bordure-champ); border-radius: var(--rayon-petit); }
.doc-tableau { margin: 0 0 var(--espace-3); }
.doc-tableau td { white-space: pre-wrap; border-right: 1px solid var(--bordure); }
.apercu-html { display: block; width: 100%; height: 70vh; border: 1px solid var(--bordure); border-radius: var(--rayon); background: var(--surface); }
.squelette { display: flex; flex-direction: column; gap: var(--espace-3); padding: var(--espace-5); border: 1px solid var(--bordure);
  border-radius: var(--rayon); background: var(--surface); }
.squelette-ligne { height: 14px; border-radius: var(--rayon-petit); background: var(--surface-douce); }
.squelette-ligne.l92 { width: 92%; } .squelette-ligne.l88 { width: 88%; } .squelette-ligne.l84 { width: 84%; }
.squelette-ligne.l78 { width: 78%; } .squelette-ligne.l70 { width: 70%; } .squelette-ligne.l66 { width: 66%; }
.squelette-ligne.l60 { width: 60%; } .squelette-ligne.l54 { width: 54%; }
/* Ecran etroit (ou volet ouvert sur ecran moyen) : la liste des fichiers devient une rangee d'onglets. */
@media (max-width: 900px) {
  .apercu-cadre { grid-template-columns: minmax(0, 1fr); }
  .apercu-fichiers { position: static; }
  .apercu-fichiers-titre { display: none; }
  .apercu-fichiers ul { flex-direction: row; overflow-x: auto; border-bottom: 1px solid var(--bordure); padding-bottom: var(--espace-1); }
  .apercu-fichier { white-space: nowrap; }
  .apercu-tableau { max-height: 60vh; }
  .apercu-html { height: 60vh; }
}

@media (max-width: 1099px) {
  body.volet-ouvert .coque, body.rail-replie.volet-ouvert .coque { grid-template-columns: var(--largeur-rail) minmax(0, 1fr); }
  body.rail-replie.volet-ouvert .coque { grid-template-columns: var(--largeur-rail-replie) minmax(0, 1fr); }
  .volet { position: fixed; right: var(--verre-marge, 0px); top: var(--hauteur-barre); margin: 0; z-index: var(--z-volet); width: min(var(--largeur-volet), 92vw);
    box-shadow: var(--verre-ombre, var(--ombre-2)); border-left: 1px solid var(--verre-bordure-plaque, var(--bordure-forte)); }
}
@media (max-width: 760px) {
  .coque, body.volet-ouvert .coque { grid-template-columns: var(--largeur-rail-replie) minmax(0, 1fr); }
  .rail-libelle, .rail-titre { display: none; }
  .rail-lien, .rail-bascule { justify-content: center; padding: 0; }
  .contenu { padding: var(--espace-4); }
  .grille-2 { grid-template-columns: 1fr; }
  .parcours { grid-template-columns: 1fr; }
  .utilisateur-nom, .puce-texte, .selecteur-titre span, .marque-texte, .barre-separateur, .libelle-bouton { display: none; }
  .barre { gap: var(--espace-2); padding: 0 var(--espace-2); }
  .selecteur { flex: 1; }
  .selecteur-titre strong { max-width: 120px; }
  .puce { padding: var(--espace-1) var(--espace-2); }
  .liste-ligne { grid-template-columns: minmax(0, 1fr) auto; }
  .liste-cle { grid-column: 1 / -1; }
  .attribution { grid-column: 1 / -1; }
}

/* --- Notifications : bas a droite, ~4 s ; erreurs persistantes jusqu'a fermeture (D96) ----------- */
.notices { position: fixed; right: var(--espace-5); bottom: var(--espace-5); z-index: var(--z-notice);
  display: flex; flex-direction: column; gap: var(--espace-2); width: min(420px, calc(100vw - 2 * var(--espace-5))); }
.notice { display: flex; align-items: flex-start; gap: var(--espace-3); padding: var(--espace-3) var(--espace-3) var(--espace-3) var(--espace-4);
  border-radius: var(--verre-rayon, var(--rayon)); background: var(--verre-fond, var(--surface));
  border: 1px solid var(--verre-bordure, var(--bordure-forte)); box-shadow: var(--verre-ombre, var(--ombre-1));
  -webkit-backdrop-filter: var(--verre-flou, none); backdrop-filter: var(--verre-flou, none); }
.notice-texte { flex: 1; padding-top: 5px; }
.notice.erreur { border-color: var(--erreur); }
.notice.erreur .notice-texte { color: var(--erreur); }
.notice.attention .notice-texte { color: var(--attention); }
.notice.succes .notice-texte { color: var(--texte); }

/* Bouton flottant « Reviser avec l'IA » (D166-A6) : en bas au centre, masquable ; ombre car il flotte (V3) */
.flottant { position: fixed; left: 50%; bottom: var(--espace-5); z-index: var(--z-volet); transform: translateX(-50%);
  display: flex; align-items: center; gap: var(--espace-1); padding: var(--espace-1); border-radius: var(--rayon-pastille);
  background: var(--verre-fond, var(--surface)); border: 1px solid var(--verre-bordure, var(--bordure-forte));
  box-shadow: var(--verre-ombre, var(--ombre-2)); -webkit-backdrop-filter: var(--verre-flou, none); backdrop-filter: var(--verre-flou, none); }
.flottant-bouton { height: 36px; padding: 0 var(--espace-4); border-radius: var(--rayon-pastille); border-color: transparent;
  background: var(--ia-fond); color: var(--ia); }
.flottant-bouton:hover { background: var(--ia-fond); border-color: var(--ia); }
.flottant button.icone { border-radius: var(--rayon-pastille); }
/* Languette (D169-A7) : toujours visible au bord bas quand le bouton est masque ; le reaffiche. */
.languette { position: fixed; left: 50%; bottom: 0; z-index: var(--z-volet); transform: translateX(-50%); }
.languette-bouton { width: 56px; height: 22px; padding: 0; border-radius: var(--rayon) var(--rayon) 0 0; border-bottom: 0;
  background: var(--ia-fond); color: var(--ia); box-shadow: var(--ombre-1); }
.languette-bouton:hover { background: var(--ia-fond); border-color: var(--ia); }
body.flottant-visible .contenu { padding-bottom: calc(var(--espace-7) + var(--espace-7)); }
body.flottant-visible .notices { bottom: calc(var(--espace-5) + var(--espace-7) + var(--espace-2)); }

/* Livrables (D166-A3) et bilan d'une revision (D166-A4) */
.jeu-courant { border-color: var(--accent); }
.bilan { list-style: none; padding: 0; margin: var(--espace-2) 0 0; }
.bilan li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--espace-2); align-items: baseline;
  padding: var(--espace-1) 0; }
.bilan .motif { display: block; font-size: var(--taille-petit); color: var(--texte-doux); }

/* --- Planning (increment 3) : frise au jour, HTML maison, zoom jour / semaine / mois ---------------- */
.outils-planning { display: flex; flex-wrap: wrap; align-items: center; gap: var(--espace-2); }
.outils-planning label.en-ligne { display: flex; align-items: center; gap: var(--espace-2); margin: 0; }
.outils-planning label.en-ligne select { margin: 0; width: auto; }
.segmente { display: inline-flex; border: 1px solid var(--bordure-forte); border-radius: var(--rayon-petit); overflow: hidden; }
.segmente button { border: 0; border-radius: 0; }
.segmente button + button { border-left: 1px solid var(--bordure-forte); }
.segmente button.actif { background: var(--accent-doux); color: var(--accent-sur-doux); }
.frise-carte { padding: 0; overflow: hidden; }
.frise-defilement { overflow-x: auto; overflow-y: visible; max-width: 100%; }
.frise-grille { position: relative; }
.frise-fond { position: absolute; top: 0; bottom: 0; pointer-events: none; z-index: var(--z-frise-fond); }
.frise-plage { position: absolute; top: 0; bottom: 0; left: 0; background: var(--frise-non-travaille); }
.frise-plage.conge { background: repeating-linear-gradient(135deg, var(--frise-conge) 0 5px, transparent 5px 9px); }
/* D188 (point 2) : bande hachuree d'un conge (ligne « Congé de X »), focusable, libelle en infobulle et au clavier. */
.frise-ligne.conges .frise-libelle { font-size: var(--taille-petit); }
.frise-conge-bande { position: absolute; left: 0; top: 6px; height: 18px; min-height: 0; padding: 0; border-radius: var(--rayon-petit);
  border: 1px solid var(--attention); background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--attention) 35%, transparent) 0 4px,
  transparent 4px 8px); cursor: pointer; }
.frise-conge-bande:hover { background-color: color-mix(in srgb, var(--attention) 12%, transparent); }
.frise-barre.alerte-conge, .frise-jalon.alerte-conge { outline: 2px dashed var(--attention); outline-offset: 2px; }
.non-travaille-legende { background: var(--frise-non-travaille); border: 1px solid var(--bordure-forte); }
.frise-aujourdhui { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; background: var(--frise-aujourdhui); }
.frise-ligne { position: relative; display: flex; min-height: 30px; border-bottom: 1px solid var(--bordure); }
.frise-ligne.choisie .frise-libelle { background: var(--accent-doux); }
.frise-ligne.annulee .frise-nom { text-decoration: line-through; color: var(--texte-doux); }
.frise-tete { min-height: 40px; background: var(--surface); }
/* Lot 2.7 (M4) : la separation d'une ligne est sa bordure basse, TRANSLUCIDE ; le libelle fixe ne la couvrait pas
   et les plages, la ligne du jour et les barres passees dessous au defilement s'y voyaient. Le libelle descend
   d'un pixel sur cette bordure et la redessine sur son propre fond opaque. */
.frise-libelle { position: sticky; left: 0; z-index: var(--z-frise-libelle); flex: none; width: 260px; display: flex; flex-wrap: wrap;
  align-items: center; gap: var(--espace-1); padding: var(--espace-1) var(--espace-2); margin-bottom: -1px;
  background: var(--verre-opaque, var(--surface)); border-right: 1px solid var(--bordure); border-bottom: 1px solid var(--bordure); }
.niveau-1 .frise-libelle { padding-left: var(--espace-5); }
/* D188 : contenu d'une sous-phase (niveau 2) ; sous-phase = barre de phase plus fine ; livrable avec duree = barre
   terminee par un losange (son echeance), sans information portee par la seule forme (libelle et aria-label). */
.niveau-2 .frise-libelle { padding-left: calc(var(--espace-5) + var(--espace-5)); }
.frise-barre.phase.sous-phase { top: 11px; height: 8px; opacity: 0.85; }
.frise-barre.livrable::after { content: ''; position: absolute; right: -6px; top: 50%; width: 9px; height: 9px; pointer-events: none;
  transform: translateY(-50%) rotate(45deg); background: var(--frise-jalon); border: 1.5px solid var(--surface); }
/* Lot 2.7 (M3) : bascule de phase et synthese d'une phase repliee. */
button.frise-bascule { width: 22px; height: 22px; min-height: 0; padding: 0; margin-left: calc(-1 * var(--espace-1)); }
.niveau-0 .frise-libelle:not(:has(.frise-bascule)) { padding-left: calc(var(--espace-2) + 22px); }
.frise-synthese { flex-basis: 100%; color: var(--texte-doux); }
.frise-bascule + .frise-nom { flex: 1 1 0; min-width: 0; } /* chevron et nom sur la meme ligne, meme nom long */
.frise-nom { height: auto; padding: 0; border: 0; background: transparent; font: inherit; font-weight: inherit; color: var(--texte);
  text-align: left; white-space: normal; overflow-wrap: anywhere; }
.frise-nom:hover { background: transparent; color: var(--accent); }
.frise-piste { position: relative; flex: none; }
.frise-graduation .frise-repere { position: absolute; left: 0; font-size: 11px; color: var(--texte-doux); white-space: nowrap; }
.frise-repere.mois { top: 2px; font-weight: var(--graisse-moyenne); color: var(--texte); }
.frise-repere.jour { top: 20px; }
.frise-barre { position: absolute; left: 0; top: 7px; height: 16px; border-radius: var(--rayon-petit); cursor: grab; touch-action: none;
  background: var(--frise-tache-fond); border: 1.5px solid var(--frise-tache); }
.frise-barre.phase { top: 10px; height: 10px; background: var(--frise-phase); border-color: var(--frise-phase); }
.frise-barre.a-confirmer { border-style: dashed; }
.frise-barre.ajustee { box-shadow: inset 0 -3px 0 var(--accent); }
/* Couleur par statut (theme.css : --statut-*). Phase : meme teinte, plus fine. */
.frise-barre.statut-a_faire { background: color-mix(in srgb, var(--statut-a_faire) 22%, var(--surface)); border-color: var(--statut-a_faire); }
.frise-barre.statut-en_cours { background: color-mix(in srgb, var(--statut-en_cours) 30%, var(--surface)); border-color: var(--statut-en_cours); }
.frise-barre.statut-bloquee { background: color-mix(in srgb, var(--statut-bloquee) 28%, var(--surface)); border-color: var(--statut-bloquee); }
.frise-barre.statut-terminee { background: color-mix(in srgb, var(--statut-terminee) 30%, var(--surface)); border-color: var(--statut-terminee); }
.frise-barre.statut-annulee { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--statut-annulee) 28%, var(--surface)) 0 4px,
  var(--surface) 4px 8px); border-color: var(--statut-annulee); opacity: 0.8; }
.frise-barre.phase.statut-a_faire { background: var(--frise-phase); border-color: var(--frise-phase); }
.frise-barre.phase.statut-en_cours { background: var(--statut-en_cours); border-color: var(--statut-en_cours); }
.frise-barre.phase.statut-bloquee { background: var(--statut-bloquee); border-color: var(--statut-bloquee); }
.frise-barre.phase.statut-terminee { background: var(--statut-terminee); border-color: var(--statut-terminee); }
.frise-barre.phase.statut-annulee { background: var(--statut-annulee); border-color: var(--statut-annulee); opacity: 0.6; }
/* Losanges (jalons, livrables) : posés sur la ligne de leur phase, toujours au-dessus de sa barre. */
.frise-jalon[data-sans-ligne] { z-index: 2; box-shadow: 0 0 0 2px var(--surface); }
.frise-jalon.statut-en_cours { border-color: var(--statut-en_cours); }
.frise-jalon.statut-terminee { background: var(--statut-terminee); border-color: var(--statut-terminee); }
.frise-jalon.statut-bloquee { background: var(--statut-bloquee); border-color: var(--statut-bloquee); }
.frise-jalon.statut-annulee { border-color: var(--statut-annulee); opacity: 0.6; }
/* Pastille, point et légende de statut. */
.statut-point { display: inline-block; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--statut-a_faire); }
.statut-point.statut-en_cours, .statut-en_cours > .statut-point { background: var(--statut-en_cours); }
.statut-point.statut-bloquee, .statut-bloquee > .statut-point { background: var(--statut-bloquee); }
.statut-point.statut-terminee, .statut-terminee > .statut-point { background: var(--statut-terminee); }
.statut-point.statut-annulee, .statut-annulee > .statut-point { background: var(--statut-annulee); }
.badge.statut { gap: 5px; background: color-mix(in srgb, var(--statut-a_faire) 16%, transparent); color: var(--texte); }
.badge.statut.statut-en_cours { background: color-mix(in srgb, var(--statut-en_cours) 18%, transparent); }
.badge.statut.statut-bloquee { background: color-mix(in srgb, var(--statut-bloquee) 18%, transparent); }
.badge.statut.statut-terminee { background: color-mix(in srgb, var(--statut-terminee) 18%, transparent); }
.badge.statut.statut-annulee { background: color-mix(in srgb, var(--statut-annulee) 20%, transparent); }
.legende.statut-legende { width: 12px; height: 8px; border-radius: 2px; background: var(--statut-a_faire); }
.legende.statut-legende.statut-en_cours { background: var(--statut-en_cours); }
.legende.statut-legende.statut-bloquee { background: var(--statut-bloquee); }
.legende.statut-legende.statut-terminee { background: var(--statut-terminee); }
.legende.statut-legende.statut-annulee { background: var(--statut-annulee); }

/* Tableau de bord « À traiter » (retour du porteur du 2026-11-18) : une tuile par catégorie, la liste de la tuile choisie dessous. */
.tableau-bord { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--espace-2); margin-bottom: var(--espace-3); }
.tuile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: var(--espace-3); text-align: left; height: auto;
  border: 1px solid var(--bordure); border-radius: var(--rayon); background: var(--surface); color: var(--texte); cursor: pointer; }
.tuile:hover:not(:disabled) { background: var(--survol); }
.tuile.choisie { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.tuile.vide { opacity: 0.55; cursor: default; }
.tuile-nombre { font-size: 26px; line-height: 1; font-weight: var(--graisse-forte); font-variant-numeric: tabular-nums; }
.tuile.attention .tuile-nombre { color: var(--attention); }
.tuile.erreur .tuile-nombre { color: var(--erreur); }
.tuile-libelle { font-size: var(--taille-petit); color: var(--texte-doux); }
/* Retours d'ergonomie RE-4 : rangee compacte de tuiles en tete de Documents (nombre et libelle sur une ligne). */
.tuiles-documents { grid-template-columns: repeat(auto-fit, minmax(150px, 220px)); margin-bottom: var(--espace-2); }
.tuiles-documents .tuile { flex-direction: row; align-items: baseline; gap: var(--espace-2); padding: var(--espace-1) var(--espace-3); }
.tuiles-documents .tuile-nombre { font-size: 18px; }
.a-traiter-liste { list-style: none; margin: var(--espace-2) 0 0; padding: 0; display: flex; flex-direction: column; }
.a-traiter-liste li + li { border-top: 1px solid var(--bordure); }
.a-traiter-ligne { display: flex; align-items: center; gap: var(--espace-3); width: 100%; height: auto; min-height: 34px; padding: var(--espace-1) var(--espace-2);
  border: 0; background: transparent; color: var(--texte); font: inherit; text-align: left; cursor: pointer; }
.a-traiter-ligne:hover, .a-traiter-ligne:focus-visible { background: var(--survol); }
.a-traiter-nom { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-traiter-dates, .a-traiter-statut { flex: none; }
.a-traiter-statut { min-width: 62px; text-align: right; }
/* D188 (points 6 et 7) : composant unique de tableau de bord (planning, Accueil, Documents, Livrables). Ligne d'une
   action : titre, motif dessous, page d'origine et genre a droite ; pastille de genre (jamais la couleur seule). */
.tableau-tuiles > h2 { margin-bottom: var(--espace-1); }
.tableau-sous-titre { margin: 0 0 var(--espace-3); max-width: 75ch; }
.a-traiter-nom:has(.a-traiter-detail) { display: flex; flex-direction: column; gap: 1px; }
.a-traiter-detail { font-size: var(--taille-petit); color: var(--texte-doux); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.statut-point.genre-decider { background: var(--erreur); }
.statut-point.genre-faire { background: var(--attention); }
.statut-point.genre-voir { background: var(--accent); }
.rien-a-traiter { margin: 0; }
.tableau-tuiles .tuile-libelle { white-space: normal; overflow-wrap: anywhere; }
.tableau-tuiles.vide h2 { font-size: var(--taille-section); }
@media (max-width: 760px) {
  .a-traiter-ligne { flex-wrap: wrap; }
  .a-traiter-nom { flex-basis: calc(100% - 30px); }
}
.frise-barre.glisse { cursor: grabbing; box-shadow: var(--ombre-1); }
.frise-poignee { position: absolute; right: -4px; top: -3px; bottom: -3px; width: 8px; cursor: ew-resize; }
.frise-jalon { position: absolute; left: 0; top: 8px; width: 14px; height: 14px; padding: 0; border-radius: 2px; cursor: grab; touch-action: none;
  background: var(--frise-jalon); border: 1px solid var(--frise-jalon); }
.frise-jalon:hover { background: var(--frise-jalon); }
.frise-jalon.contractuel { background: var(--frise-contractuel); border-color: var(--frise-contractuel); }
.frise-jalon.livrable { background: var(--surface); border-width: 2px; }
.frise-jalon.compact { width: 10px; height: 10px; top: 10px; }
.frise-reference { position: absolute; left: 0; top: 4px; height: 22px; border: 1.5px dashed var(--texte-doux); border-radius: var(--rayon-petit); pointer-events: none; }
.frise-legende { display: flex; flex-wrap: wrap; align-items: center; gap: var(--espace-1) var(--espace-3); padding: var(--espace-2) var(--espace-4);
  border-top: 1px solid var(--bordure); }
.legende { display: inline-block; width: 18px; height: 10px; border-radius: 2px; margin-right: -6px; }
.barre-legende { background: var(--frise-tache-fond); border: 1.5px solid var(--frise-tache); }
.phase-legende { background: var(--frise-phase); }
.jalon-legende { width: 10px; background: var(--frise-jalon); transform: rotate(45deg); }
.reference-legende { border: 1.5px dashed var(--texte-doux); }
.conge-legende { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--attention) 45%, transparent) 0 3px, transparent 3px 6px);
  border: 1px solid var(--attention); }
.detail-element .ligne-champs { margin-bottom: var(--espace-3); }
.tableau-defilant { overflow-x: auto; border: 1px solid var(--verre-bordure-carte, var(--bordure)); border-radius: var(--rayon); background: var(--surface);
  box-shadow: var(--verre-ombre-carte, none); }
table.charge th, table.charge td { white-space: nowrap; }
.liste-ligne.ressource { grid-template-columns: minmax(140px, 1fr) auto auto; align-items: start; }
/* Point 3 (2026-11-19) : champ de capacite = libelle, controle, aide courte dessous. */
.liste-ligne.ressource .ligne-champs, .ajout-consultant { align-items: flex-start; }
.champ-capacite { display: flex; flex-direction: column; gap: var(--espace-1); flex: 0 1 230px; min-width: 0; }
.champ-capacite input { max-width: 120px; }
.champ-capacite .aide { margin: 0; }
.ajout-consultant { align-items: flex-start; }
.ajout-consultant > button { align-self: flex-end; }
.ajout-consultant > .champ-capacite:first-child { flex: 1 1 260px; }
.ajout-consultant > .champ-capacite:first-child input { max-width: none; }
@media (max-width: 760px) {
  .liste-ligne.ressource { grid-template-columns: minmax(0, 1fr); }
  .frise-libelle { width: 150px; } /* repete dans app.js (largeurLibelles) : pas de variable en media query */
  .outils-planning .barre-espace { display: none; }
}

/* Voile d'attente (A2) */
.voile { position: fixed; inset: 0; z-index: var(--z-voile); display: flex; align-items: center; justify-content: center;
  padding: var(--espace-4); background: var(--voile); backdrop-filter: blur(2px); }
.voile[hidden] { display: none; }
.voile-carte { background: var(--verre-fond, var(--surface)); color: var(--texte); border: 1px solid var(--verre-bordure, var(--bordure));
  border-radius: var(--verre-rayon, var(--rayon)); padding: var(--espace-5) var(--espace-6); max-width: 420px; text-align: center;
  box-shadow: var(--verre-ombre, var(--ombre-2)); -webkit-backdrop-filter: var(--verre-flou, none); backdrop-filter: var(--verre-flou, none); }
.voile-carte strong { display: block; font-size: var(--taille-section); margin-bottom: var(--espace-2); }
.voile-carte p { margin: var(--espace-2) 0 0; }
.points { display: inline-flex; gap: var(--espace-1); margin-left: var(--espace-1); vertical-align: middle; }
.points span { width: 6px; height: 6px; border-radius: 50%; background: var(--ia); display: inline-block; }

/* Fenetre bloquante : seulement pour l'irreversible (D160-M4) */
dialog { max-width: 460px; padding: var(--espace-5); border: 1px solid var(--verre-bordure, var(--bordure-forte));
  border-radius: var(--verre-rayon, var(--rayon)); background: var(--verre-fond, var(--surface)); color: var(--texte);
  box-shadow: var(--verre-ombre, var(--ombre-2)); -webkit-backdrop-filter: var(--verre-flou, none); backdrop-filter: var(--verre-flou, none); }
dialog::backdrop { background: var(--voile); }
dialog h2 { margin-bottom: var(--espace-2); }
dialog .boutons { justify-content: flex-end; margin-top: var(--espace-4); }

/* --- Mise en route immersive (lots 2.3 et 2.3 bis, D170) : mise en page seulement ; couleurs (jetons) et
   mouvements dans theme.css. Le nuage est le LIEU de l'initialisation : un cadre permanent (documents en
   pastilles a gauche, zone centrale qui seule change) pose sur un fond de 15 halos en derive. --------------- */
body.mise-en-route .coque { grid-template-columns: minmax(0, 1fr); }
body.mise-en-route .rail, body.mise-en-route .volet { display: none; }
body.mise-en-route .contenu { position: relative; z-index: 1; padding-top: var(--espace-5); }

/* Nuage : 3 couches (sable, bleu, violet) de 5 halos ; les trois teintes sont toujours perceptibles, la scene en renforce une. */
.nuage { position: fixed; inset: var(--hauteur-barre) 0 0 0; z-index: 0; pointer-events: none; overflow: hidden; }
.nuage[hidden] { display: none; }
.nuage-couche { position: absolute; inset: 0; }
.nuage-couche.bleu { left: 9vmax; top: -5vmax; }
.nuage-couche.ia { left: -7vmax; top: 8vmax; }
.nuage-couche.neutre { opacity: 0.95; }
.nuage-couche.bleu { opacity: 0.6; }
.nuage-couche.ia { opacity: 0.5; }
.nuage[data-teinte="bleu"] .neutre { opacity: 0.45; }
.nuage[data-teinte="bleu"] .bleu { opacity: 1; }
.nuage[data-teinte="bleu"] .ia { opacity: 0.35; }
.nuage[data-teinte="ia"] .neutre { opacity: 0.3; }
.nuage[data-teinte="ia"] .bleu { opacity: 0.35; }
.nuage[data-teinte="ia"] .ia { opacity: 1; }
body.depot-survol .nuage .neutre { opacity: 0.3; }
body.depot-survol .nuage .bleu { opacity: 1; }
.nuage-couche span { position: absolute; border-radius: 50%; will-change: transform; }
.nuage-couche span:nth-child(1) { width: 46vmax; height: 46vmax; top: -14vmax; left: -10vmax; }
.nuage-couche span:nth-child(2) { width: 40vmax; height: 40vmax; top: 4vmax; left: 58vmax; }
.nuage-couche span:nth-child(3) { width: 52vmax; height: 52vmax; top: 30vmax; left: 16vmax; }
.nuage-couche span:nth-child(4) { width: 34vmax; height: 34vmax; top: 22vmax; left: 78vmax; }
.nuage-couche span:nth-child(5) { width: 38vmax; height: 38vmax; top: -6vmax; left: 30vmax; }
.nuage-couche.neutre span { background: radial-gradient(closest-side, var(--nuage-neutre) 0%, var(--nuage-neutre) 38%, transparent 100%); }
.nuage-couche.bleu span { background: radial-gradient(closest-side, var(--nuage-bleu) 0%, var(--nuage-bleu) 38%, transparent 100%); }
.nuage-couche.ia span { background: radial-gradient(closest-side, var(--nuage-ia) 0%, var(--nuage-ia) 38%, transparent 100%); }
/* Reaction au glisser-deposer : halo bleu qui se gonfle sous le pointeur, onde au lacher (positions posees par app.js). */
.depot-halo, .onde { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.depot-halo i { position: absolute; width: 44vmax; height: 44vmax; left: -22vmax; top: -22vmax; border-radius: 50%; opacity: 0;
  transform: scale(0.35); background: radial-gradient(closest-side, var(--nuage-depot) 0%, var(--nuage-depot) 30%, transparent 100%); }
body.depot-survol .depot-halo i { opacity: 1; transform: scale(1); }
.onde i { position: absolute; width: 180px; height: 180px; left: -90px; top: -90px; border-radius: 50%; opacity: 0;
  border: 2px solid var(--accent); box-shadow: 0 0 24px var(--nuage-depot); }
.depot-cible { position: fixed; inset: calc(var(--hauteur-barre) + var(--espace-3)) var(--espace-3) var(--espace-3); z-index: var(--z-notice);
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: var(--espace-6); pointer-events: none; opacity: 0;
  border: 2px dashed var(--accent); border-radius: 18px; box-shadow: inset 0 0 70px var(--nuage-depot); }
.depot-cible span { padding: var(--espace-2) var(--espace-4); border-radius: var(--rayon-pastille); background: var(--accent);
  color: var(--accent-texte); font-weight: var(--graisse-moyenne); box-shadow: var(--ombre-2); }
body.depot-survol .depot-cible { opacity: 1; }

/* Cadre permanent : seule la zone centrale change de scene ; les pastilles persistent (memes noeuds). */
.cadre-nuage { position: relative; display: grid; grid-template-columns: 250px minmax(0, 1fr) 250px; gap: var(--espace-5);
  max-width: 1480px; margin: 0 auto; align-items: start; }
.cadre-documents { position: sticky; top: calc(var(--hauteur-barre) + var(--espace-5)); z-index: 2; display: flex; flex-direction: column;
  gap: var(--espace-4); min-width: 0; }
.calque-pastilles { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--espace-4); }
.calque-pastilles[hidden] { display: none; }
.zone-centrale { position: relative; z-index: 1; grid-column: 2; min-width: 0; }
.scene-sortie { position: absolute; inset: 0 0 auto 0; pointer-events: none; }
.fils { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.fil { position: absolute; height: 2px; transform-origin: 0 50%; opacity: 0.4;
  background: linear-gradient(90deg, transparent, var(--ia) 30%, var(--ia) 70%, transparent); }
.fil i { position: absolute; left: 0; top: -2px; width: 34px; height: 6px; border-radius: 3px; background: var(--ia); box-shadow: 0 0 10px var(--ia); }

/* Pastille de document : objet du nuage (etat, interrupteur « Autoriser l'IA », lien avec les faits qu'elle a produits). */
.pastille-doc { position: relative; width: fit-content; max-width: calc(100% - var(--zig, 0px)); margin-left: var(--zig, 0px); }
.pastille-corps { position: relative; display: flex; flex-direction: column; gap: var(--espace-1); padding: var(--espace-2) var(--espace-3);
  border-radius: 18px; background: var(--surface); border: 1px solid var(--bordure-forte); box-shadow: var(--ombre-1); min-width: 0; }
.pastille-halo { position: absolute; inset: -6px; border-radius: 24px; opacity: 0; pointer-events: none;
  box-shadow: 0 0 0 2px var(--ia), 0 0 26px 6px var(--ia); }
.pastille-ligne { display: flex; align-items: center; gap: var(--espace-2); min-width: 0; }
button.pastille-nom { flex: 1; min-width: 0; height: auto; padding: 0; border: 0; background: transparent; justify-content: flex-start;
  font-weight: var(--graisse-moyenne); text-align: left; }
button.pastille-nom:hover { background: transparent; text-decoration: underline; }
.pastille-nom span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pastille-motif { color: var(--texte-doux); font-size: var(--taille-petit); }
.pastille-motif:empty { display: none; }
.interrupteur { display: inline-flex; align-items: center; gap: var(--espace-1); }
.pastille-doc.calme .pastille-corps { opacity: 0.55; }
.pastille-doc.allumee .pastille-corps { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-doux), var(--ombre-2); }
.calque-invite:empty { display: none; }
.calque-invite .carte { box-shadow: var(--ombre-1); padding: var(--espace-3) var(--espace-4); }
.calque-invite p { margin: 0 0 var(--espace-2); }

/* Scenes : objets du nuage. Aucun texte directement sur le nuage : titres et messages sont sur des cartes. */
.scene { display: flex; flex-direction: column; align-items: center; gap: var(--espace-4); width: 100%; }
.scene-creation, .scene-lecture { min-height: calc(100vh - var(--hauteur-barre) - var(--espace-7) - var(--espace-7)); justify-content: center; }
.scene-entete { text-align: center; max-width: 620px; padding: var(--espace-4) var(--espace-5); border-radius: var(--rayon);
  background: var(--surface); border: 1px solid var(--bordure); box-shadow: var(--ombre-1); }
.scene-entete h1 { margin: 0 0 var(--espace-1); }
.scene-texte { margin: 0; color: var(--texte-doux); }
.carte-centrale { width: 100%; max-width: 620px; box-shadow: var(--verre-ombre, var(--ombre-1));
  background: var(--verre-fond, var(--surface)); border-color: var(--verre-bordure, var(--bordure)); border-radius: var(--verre-rayon, var(--rayon));
  -webkit-backdrop-filter: var(--verre-flou, none); backdrop-filter: var(--verre-flou, none); }
.carte-centrale + .carte-centrale { margin-top: 0; }
.carte-centrale > label, .carte-centrale form > label { display: block; margin-bottom: var(--espace-3); }
.carte-centrale input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="date"]) { width: 100%; }
.carte-lecture { text-align: center; }
.carte-lecture h1 { font-size: var(--taille-section); margin: 0 0 var(--espace-2); }
.carte-lecture .boutons { justify-content: center; }
.scene-etat { margin: 0 0 var(--espace-2); }
.scene-suite { text-align: center; }
.scene-suite .boutons { justify-content: center; }
button.lien { background: transparent; border-color: transparent; color: var(--accent); text-decoration: underline; padding: 0 var(--espace-2); }
button.lien:hover { background: transparent; color: var(--accent-survol); }
button.ia { background: var(--ia-fond); color: var(--ia); border-color: var(--ia); }
button.ia:hover { background: var(--ia-fond); }

/* Faits : cartes qui sortent du nuage ; cadrage en choix, faits confirmes en cartes compactes. */
.faits-nuage, .faits-confirmes, .cartes-org, .phases-org { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; gap: var(--espace-3); }
.faits-nuage { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.faits-confirmes { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.carte-fait, .fait-confirme { display: flex; flex-direction: column; gap: var(--espace-2); background: var(--surface);
  border: 1px solid var(--verre-bordure-carte, var(--bordure)); border-radius: var(--rayon); padding: var(--espace-3) var(--espace-4);
  box-shadow: var(--verre-ombre-carte, var(--ombre-1)); min-width: 0; }
.fait-confirme { gap: var(--espace-1); padding: var(--espace-2) var(--espace-3); border-color: var(--succes); }
.carte-fait.inconnu { border-style: dashed; border-color: var(--bordure-champ); }
.carte-fait.allumee, .fait-confirme.allumee { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-doux), var(--ombre-2);
  background: var(--verre-fond, var(--surface)); -webkit-backdrop-filter: var(--verre-flou, none); backdrop-filter: var(--verre-flou, none); }
.carte-fait-tete { display: flex; flex-wrap: wrap; align-items: center; gap: var(--espace-2); }
.carte-fait-valeur { overflow-wrap: anywhere; }
.carte-fait .citation { margin: 0; }
.carte-fait .boutons { margin-top: auto; }
.etiquette-nuage { margin: var(--espace-2) 0 0; padding: var(--espace-1) var(--espace-3); border-radius: var(--rayon-pastille); background: var(--surface);
  border: 1px solid var(--bordure); font-size: var(--taille-petit); color: var(--texte-doux); }
.carte-cadrage { display: flex; flex-direction: column; gap: var(--espace-4); }
.choix { display: flex; flex-direction: column; gap: var(--espace-2); }
.choix-libelle { display: flex; align-items: center; gap: var(--espace-2); font-weight: var(--graisse-moyenne); }
.choix-options { display: flex; flex-wrap: wrap; gap: var(--espace-2); }
button.choix-option { height: auto; min-height: 34px; padding: var(--espace-1) var(--espace-3); border-radius: var(--rayon-pastille);
  white-space: normal; text-align: left; gap: var(--espace-2); }
button.choix-option[aria-pressed="true"] { background: var(--accent-doux); border-color: var(--accent); color: var(--accent-sur-doux);
  font-weight: var(--graisse-moyenne); }
.cadrage-date { display: flex; flex-wrap: wrap; align-items: center; gap: var(--espace-2); }
.cadrage-date input { width: auto; }
.fait-ajout { display: flex; flex-direction: column; gap: var(--espace-2); padding: var(--espace-2) var(--espace-3); border-radius: var(--rayon);
  border: 1px dashed var(--bordure-champ); background: var(--surface); min-width: 0; }
.fait-ajout input { width: 100%; }

/* Organisation : la proposition se compose en cartes. */
.cartes-org { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.phases-org { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.cartes-org .carte, .phases-org .carte { margin: 0; display: flex; flex-direction: column; gap: var(--espace-1); box-shadow: var(--ombre-1); min-width: 0; }
.phases-org .carte { padding: var(--espace-3); }
.phase-numero { font-size: var(--taille-petit); color: var(--texte-doux); }
.phase-carte.ecartee { opacity: 0.6; }
.equipe-noms { display: flex; flex-wrap: wrap; gap: var(--espace-1); }
/* Correctif 3 : saisie de l'equipe en pastilles (carte Equipe et section Equipe et conges). */
.saisie-equipe { display: flex; flex-direction: column; gap: var(--espace-2); min-width: 0; }
.pastilles-equipe { display: flex; flex-wrap: wrap; gap: var(--espace-1); margin: 0; padding: 0; list-style: none; }
.pastille-equipe { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; padding: 1px 2px 1px var(--espace-2);
  border: 1px solid var(--bordure); border-radius: var(--rayon-pastille); background: var(--surface-douce); color: var(--texte); }
.pastille-equipe.selectionnee { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-doux); }
.pastille-equipe-nom { min-width: 0; overflow-wrap: anywhere; }
button.pastille-retirer { flex: none; width: 24px; height: 24px; padding: 0; border-color: transparent; border-radius: var(--rayon-pastille);
  background: transparent; color: var(--texte-doux); }
button.pastille-retirer:hover { background: var(--survol); color: var(--texte); }
.saisie-equipe-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: var(--espace-2); }
.saisie-equipe-ligne input { flex: 1 1 12em; min-width: 0; }
.saisie-equipe-message { margin: 0; color: var(--erreur); font-size: var(--taille-petit); }
.saisie-equipe-message:empty { display: none; }
details.carte-centrale { max-width: 100%; }
details.carte-centrale > summary { cursor: pointer; font-weight: var(--graisse-moyenne); }

@media (max-width: 1099px) {
  .cadre-nuage { grid-template-columns: minmax(0, 1fr); gap: var(--espace-4); }
  .cadre-documents { position: static; }
  .calque-pastilles { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: var(--espace-3); }
  .pastille-doc { margin-left: 0; max-width: 100%; }
  .zone-centrale { grid-column: 1; }
}
@media (max-width: 760px) {
  body.mise-en-route .contenu { padding: var(--espace-4); }
  .faits-nuage, .faits-confirmes, .cartes-org { grid-template-columns: minmax(0, 1fr); }
  .phases-org { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Titre de scene : focus pose par programme (lecteurs d'ecran), jamais atteint au clavier : pas d'anneau. */
.scene h1:focus { outline: none; }
.calque-invite button { height: auto; min-height: 26px; padding: var(--espace-1) var(--espace-2); white-space: normal; text-align: left; max-width: 100%;
  border-radius: var(--rayon-petit); }
.calque-invite .aide { margin: var(--espace-2) 0 0; }

/* Lot 2.6 - L2 : valeur modifiable visible au repos (cadre de champ + crayon), aide et chemins de correction */
.editable { display: inline-flex; align-items: center; gap: var(--espace-2); max-width: 100%; min-height: 26px; padding: 2px var(--espace-2);
  margin: 0; border-color: var(--bordure-champ); background: var(--surface); vertical-align: middle; }
.editable:hover { border-color: var(--accent); background: var(--accent-doux); }
.editable-texte { min-width: 0; overflow-wrap: anywhere; }
.editable-crayon { flex: none; color: var(--texte-doux); }
.editable:hover .editable-crayon { color: var(--accent-sur-doux); }
.modifier-valeur { gap: var(--espace-1); }
.aide-a-confirmer { margin: calc(-1 * var(--espace-2)) 0 var(--espace-2); }
.etiquette-a-confirmer { border-radius: var(--rayon); }
.etiquette-a-confirmer strong { color: var(--texte); }
.non-modifiable { margin-bottom: var(--espace-2); }
.debut-a-confirmer { display: flex; flex-direction: column; align-items: flex-start; gap: var(--espace-1); margin-top: var(--espace-1); }
.debut-a-confirmer .editable-champ { width: auto; }
@media (max-width: 760px) {
  .ligne-propose .liste-valeur, .ligne-propose .liste-actions { grid-column: 1 / -1; }
  .ligne-propose .liste-actions { justify-content: flex-start; flex-wrap: wrap; }
}
/* Fin lot 2.6 - L2 */

/* Lot 2.6 - L3/L4 : marqueur « Créé par l’IA » (etoile + texte, jeton --ia), repere « nouveau », message « Fichier créé » */
.marque-ia { display: inline-flex; align-items: center; gap: var(--espace-1); color: var(--ia); font-weight: var(--graisse-moyenne); white-space: nowrap; }
.marque-ia svg { flex: none; }
.arbre-statut.marque-ia { color: var(--ia); font-weight: var(--graisse-moyenne); }
.origine-fichiers .marque-ia { margin-right: var(--espace-1); }
.repere-nouveau { margin-left: var(--espace-2); }
.arbre-nom .repere-nouveau { margin-left: 0; }
.arbre-ouvrir.avec-texte { gap: var(--espace-1); padding: 0 var(--espace-1); color: var(--texte); }
.notice-fichiers .notice-texte { min-width: 0; padding-top: 3px; }
.notice-fichiers strong { display: block; overflow-wrap: anywhere; }
.notice-liste { list-style: none; margin: var(--espace-2) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--espace-1); }
.notice-liste li { display: flex; align-items: center; justify-content: space-between; gap: var(--espace-2); }
.notice-fichier { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--taille-petit); }
.notice-actions { display: flex; flex-wrap: wrap; gap: var(--espace-2); margin-top: var(--espace-2); }
.notice-liste .notice-actions { flex: none; flex-wrap: nowrap; margin-top: 0; }
/* Fin lot 2.6 - L3/L4 */

/* Lot 2.6 - L1 : carte « Question de l'IA » (reponses proposees, impact). Jetons de theme.css seulement. */
.carte-question { background: var(--ia-fond); border: 1px solid var(--ia); border-radius: var(--rayon);
  padding: var(--espace-3) var(--espace-4); margin-bottom: var(--espace-3); color: var(--texte); text-align: left; }
.question-tete { display: flex; flex-wrap: wrap; align-items: center; gap: var(--espace-2); color: var(--ia); }
.question-tete h3 { margin: 0; color: var(--ia); }
.question-texte { margin: var(--espace-2) 0; font-weight: 600; }
.question-formulaire fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: var(--espace-2); }
.question-formulaire legend { padding: 0; margin-bottom: var(--espace-1); font-size: var(--taille-petit); color: var(--texte-doux); }
.question-option { display: flex; align-items: flex-start; gap: var(--espace-2); margin: 0; padding: var(--espace-2) var(--espace-3);
  background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon-petit);
  color: var(--texte); font-size: var(--taille-texte); cursor: pointer; }
.question-option:hover, .question-option:has(input:checked) { border-color: var(--ia); }
.question-option:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }
.question-option input[type="radio"] { flex: none; display: inline-block; width: 16px; height: 16px; margin: 3px 0 0; padding: 0; accent-color: var(--ia); }
.question-option-corps { display: flex; flex-wrap: wrap; align-items: center; gap: var(--espace-1) var(--espace-2); min-width: 0; }
.question-justification { flex-basis: 100%; font-size: var(--taille-petit); color: var(--texte-doux); }
.question-libre { margin-top: var(--espace-2); }
.question-libre[hidden] { display: none; }
.question-formulaire .boutons, .carte-question > .boutons { margin-top: var(--espace-3); }
.question-reponse, .question-impact { margin: var(--espace-2) 0 0; }
.question-impact { padding: var(--espace-2) var(--espace-3); background: var(--surface); border-radius: var(--rayon-petit); }
.question-interpretation { margin-top: var(--espace-3); padding: var(--espace-2) var(--espace-3); background: var(--surface);
  border: 1px dashed var(--ia); border-radius: var(--rayon-petit); }
/* Fin lot 2.6 - L1 */

/* Depot dans le nuage : envoi visible (retour du porteur 2026-11-15) */
/* Bulle grisee d'un fichier en cours d'envoi : meme place et meme gabarit que la pastille qu'elle deviendra
   (l'anneau qui tourne est dans theme.css ; le texte « envoi en cours » porte l'etat sans mouvement). */
.bulle-envoi { position: relative; width: fit-content; max-width: calc(100% - var(--zig, 0px)); margin-left: var(--zig, 0px); }
.bulle-envoi .pastille-corps { min-width: 190px; min-height: 87px; border-style: dashed; background: var(--surface-douce);
  color: var(--texte-doux); opacity: 0.72; }
.bulle-envoi .pastille-nom { display: flex; align-items: center; gap: var(--espace-2); min-width: 0; font-weight: var(--graisse-moyenne); }
.bulle-etat { font-size: var(--taille-petit); }
.anneau-envoi { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--bordure-forte);
  border-top-color: var(--accent); }
.annonce-depot { width: fit-content; }
.annonce-depot:empty { display: none; }
/* Pendant l'envoi, les cartes centrales sont floutees et attenuees (un etat, pas un mouvement ; `inert` est pose
   par app.js) : le regard va aux bulles, aucun clic n'est perdu. */
body.depot-en-cours .zone-centrale { filter: blur(3px); opacity: 0.55; pointer-events: none; }
/* Repartition egale : les documents alternent a gauche et a droite des cartes centrales, une rangee par paire ;
   le cadre des documents couvre toute la largeur sans capter les clics destines au centre. */
@media (min-width: 1100px) {
  .cadre-documents { grid-column: 1 / -1; grid-row: 1; pointer-events: none; }
  .zone-centrale { grid-row: 1; }
  .calque-pastilles { display: grid; grid-template-columns: 250px 250px; justify-content: space-between; align-items: start; }
  .calque-pastilles > li { pointer-events: auto; }
  .calque-pastilles > li:nth-child(odd) { grid-column: 1; }
  .calque-pastilles > li:nth-child(even) { grid-column: 2; justify-self: end; margin-left: 0; margin-right: var(--zig, 0px); }
  .calque-invite, .annonce-depot { pointer-events: auto; }
  .calque-invite { width: 250px; }
}
@media (max-width: 1099px) {
  .bulle-envoi { margin-left: 0; max-width: 100%; }
  .annonce-depot { margin-left: auto; margin-right: auto; }
}

/* D177-56 : pendant une action, les commandes sont visiblement desactivees (aucun appui ignore en silence). */
body.occupe [aria-disabled="true"] { cursor: progress; opacity: 0.55; }
/* L5 (D178) : face arriere d'une carte de fait confirmee (valeur retenue et coche). */
.dos-fait { display: flex; align-items: center; gap: var(--espace-2); min-height: 44px; color: var(--succes); }
.dos-fait-valeur { color: var(--texte); overflow-wrap: anywhere; }
.retournee { background: var(--succes-fond); }

/* --- Assistant (lot 2.5, D172) : bulle en bas a droite, panneau de conversation ---------------------------------- */
/* Correctif du porteur : bulle en violet plein (meme jeton que « Ajouter un document »), plus visible que le fond pale. */
.assistant-bulle { gap: var(--espace-2); background: var(--ia); color: var(--accent-texte); font-weight: var(--graisse-moyenne); }
.assistant-bulle:hover { background: var(--ia); color: var(--accent-texte); border-color: transparent; opacity: 0.9; }
.flottant:has(.assistant-bulle) { border-color: var(--ia); }
.flottant:has(.assistant-bulle) { left: auto; right: var(--espace-5); transform: none; }
.languette:has(.languette-bouton) { left: auto; right: var(--espace-5); transform: none; }
body.flottant-visible .notices { bottom: calc(var(--espace-5) + 56px); } /* jamais sous la bulle (CA-L25-01) */
.assistant { position: fixed; right: var(--espace-5); bottom: calc(var(--espace-5) + 52px); z-index: var(--z-volet);
  width: min(420px, calc(100vw - 2 * var(--espace-4))); max-height: min(640px, calc(100vh - var(--hauteur-barre) - 96px));
  display: flex; flex-direction: column; gap: var(--espace-2); padding: var(--espace-3); border: 1px solid var(--verre-bordure, var(--bordure-forte));
  border-radius: var(--verre-rayon, var(--rayon)); background: var(--verre-fond, var(--surface)); box-shadow: var(--verre-ombre, var(--ombre-2));
  -webkit-backdrop-filter: var(--verre-flou, none); backdrop-filter: var(--verre-flou, none); }
body.assistant-ouvert .notices { right: calc(var(--espace-5) + min(420px, calc(100vw - 2 * var(--espace-4))) + var(--espace-3)); }
.assistant-tete { display: flex; align-items: center; justify-content: space-between; gap: var(--espace-2); }
.assistant-tete h2 { display: flex; align-items: center; gap: var(--espace-2); font-size: var(--taille-section); color: var(--ia); }
.assistant-tete .boutons { display: flex; flex-wrap: wrap; gap: var(--espace-1); justify-content: flex-end; }
.assistant-fil { list-style: none; margin: 0; padding: 0; flex: 1; min-height: 80px; overflow-y: auto; display: flex; flex-direction: column;
  gap: var(--espace-2); }
.assistant-message { max-width: 92%; padding: var(--espace-2) var(--espace-3); border-radius: var(--rayon); overflow-wrap: anywhere; }
.assistant-message p { margin: 0 0 var(--espace-1); }
.assistant-message.utilisateur { align-self: flex-end; background: var(--accent-doux); color: var(--accent-sur-doux); }
.assistant-message.ia { align-self: flex-start; background: var(--ia-fond); color: var(--texte); }
.assistant-attente { align-self: flex-start; color: var(--ia); display: flex; align-items: center; gap: var(--espace-2); }
.assistant-vide { color: var(--texte-doux); }
.carte-plan { margin-top: var(--espace-2); padding: var(--espace-2) var(--espace-3); border: 1px solid var(--bordure-forte); border-radius: var(--rayon-petit);
  background: var(--surface); }
.carte-plan.a-confirmer { border-color: var(--attention); }
.carte-plan h3 { font-size: var(--taille-texte); margin-bottom: var(--espace-1); }
.carte-plan ol { margin: 0 0 var(--espace-2); padding-left: var(--espace-5); }
.carte-demande div { margin-top: var(--espace-1); }
.assistant-formulaire { display: flex; flex-direction: column; gap: var(--espace-1); }
.assistant-formulaire textarea { width: 100%; resize: vertical; }
.assistant-commandes { display: flex; align-items: center; gap: var(--espace-2); justify-content: flex-end; flex-wrap: wrap; }
.assistant-commandes .case { margin-right: auto; }
.indicateur-capture { display: flex; align-items: center; gap: var(--espace-1); color: var(--attention); }
#assistant-micro.actif { background: var(--ia-fond); color: var(--ia); }
.assistant-archive { display: flex; flex-direction: column; gap: var(--espace-2); flex: 1; min-height: 0; }
.assistant-archive-tete { display: flex; flex-direction: column; align-items: flex-start; gap: var(--espace-1); flex: none; }
.bouton-decision { margin-top: var(--espace-1); }
.assistant-annexes details { margin-top: var(--espace-1); }
.zone-masquee { padding: var(--espace-2); border: 1px dashed var(--bordure-champ); color: var(--texte-doux); background: var(--surface-douce); }
.capture-racine { background: var(--fond); color: var(--texte); font-family: var(--police); padding: var(--espace-4); }
@media (max-width: 760px) {
  .assistant { right: var(--espace-2); left: var(--espace-2); width: auto; bottom: calc(var(--espace-2) + 52px); }
  .flottant:has(.assistant-bulle) { right: var(--espace-2); bottom: var(--espace-2); }
  body.assistant-ouvert .notices { right: var(--espace-2); top: calc(var(--hauteur-barre) + var(--espace-2)); bottom: auto; }
}
/* D177-49 : activites et livrables modifiables dans l'organisation proposee. */
.liste-elements { margin: var(--espace-2) 0; padding-left: var(--espace-5); }
.liste-elements li { margin-bottom: var(--espace-1); }
.liste-elements .en-ligne select { width: auto; margin: 0 0 0 var(--espace-1); }

/* --- Lot 2.8 (D175) : bandeau d'archive, bouton violet « Ajouter un document », popup de rangement ---------------- */
.bandeau-archive { display: flex; flex-wrap: wrap; align-items: center; gap: var(--espace-2) var(--espace-3); margin-bottom: var(--espace-4);
  padding: var(--espace-3) var(--espace-4); border: 1px solid var(--attention); border-radius: var(--rayon); background: var(--attention-fond);
  color: var(--attention); }
.bandeau-archive .petit { color: var(--texte); }
.bandeau-archive form { display: flex; gap: var(--espace-2); margin-left: auto; flex-wrap: wrap; }
.bandeau-archive input { width: auto; min-width: 220px; margin: 0; }
button.bouton-ia { display: inline-flex; align-items: center; gap: var(--espace-2); border-color: var(--ia); background: var(--ia); color: var(--accent-texte); }
button.bouton-ia:hover { background: var(--ia); color: var(--accent-texte); opacity: 0.9; }
.documents-rangement { display: flex; flex-wrap: wrap; align-items: center; gap: var(--espace-2) var(--espace-3); margin-top: var(--espace-3); }
.popup-rangement { width: min(560px, calc(100vw - 2 * var(--espace-4))); max-width: none; }
.popup-rangement h2 { display: flex; align-items: center; gap: var(--espace-2); color: var(--ia); margin-bottom: var(--espace-3); }
.popup-rangement .boutons { display: flex; gap: var(--espace-2); justify-content: flex-end; margin-top: var(--espace-3); }
.arbre-rangement { list-style: none; margin: var(--espace-3) 0; padding: var(--espace-2); max-height: 40vh; overflow: auto;
  border: 1px solid var(--bordure); border-radius: var(--rayon-petit); }
.arbre-rangement li { text-align: left; }
.arbre-rangement label.case { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: var(--espace-2);
  width: 100%; margin: 0; padding: 2px 0; text-align: left; }
.arbre-rangement input[type="radio"] { flex: none; width: auto; height: auto; margin: 0; }
@media (max-width: 760px) {
  .bandeau-archive form { margin-left: 0; width: 100%; }
  .bandeau-archive input { min-width: 0; flex: 1; }
}
@media (max-width: 480px) { /* lot 2.8 : barre avec le bouton violet ; les membres restent visibles sur l'Accueil */
  .barre .utilisateur, .barre .barre-espace { display: none; }
  .selecteur { min-width: 0; overflow: hidden; }
  .selecteur-bouton, .selecteur-titre { min-width: 0; max-width: 100%; overflow: hidden; }
  .selecteur-titre strong { max-width: 100%; }
  .barre-droite { gap: var(--espace-1); flex: none; }
}
/* Correctif barre etroite : sous 760 px (et sous 480), ecart reduit dans la barre et puce du budget plus compacte. */
@media (max-width: 760px) {
  .barre { gap: var(--espace-1); }
  .barre-droite .puce { gap: var(--espace-1); padding: var(--espace-1); font-size: 11px; /* pas de jeton : --taille-petit (12.5px) fait de nouveau deborder a 390 px */ }
  /* Cible tactile : chaque puce garde au moins 20 px de large (l'indicateur d'analyse, point seul, tomberait a 18 px). */
  .barre-droite .puce { min-width: 20px; justify-content: center; }
}
/* Correctif barre etroite : de 761 a 1099 px, les libelles de la puce d'analyse, du budget et de la marque passent aux
   icones seules (infobulles et noms accessibles inchanges) pour que la barre tienne dans la fenetre. */
@media (min-width: 761px) and (max-width: 1099px) {
  .barre .puce-texte, .barre .marque-texte { display: none; }
}

/* --- Increment C, tranche A : centre d'actions (pastilles, element mis en evidence) ---------------- */
/* Pastille rouge avec le nombre (A03) : jeton d'alerte, texte toujours present, libelle porte par l'entree. */
.pastille-actions { flex: none; display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 var(--espace-1);
  border-radius: var(--rayon-pastille); background: var(--erreur); color: var(--accent-texte); font-size: 11px;
  font-weight: var(--graisse-forte); line-height: 1; box-shadow: 0 0 0 2px var(--fond); }
.rail-lien { position: relative; }
.rail-lien .pastille-actions { margin-left: auto; }
/* Rail replie (ou ecran etroit) : la pastille se pose sur le coin de l'icone. */
body.rail-replie .rail-lien .pastille-actions { position: absolute; top: 0; right: var(--espace-1); margin: 0; min-width: 16px; height: 16px; }
.assistant-bulle .pastille-actions { box-shadow: 0 0 0 2px var(--ia); }
.menu-etat { flex: none; display: inline-flex; align-items: center; gap: var(--espace-2); }
.menu-actions { display: inline-flex; }
.menu-actions .pastille-actions { box-shadow: none; }

/* Element vise par « M'y emmener » (A05) : contour quelques secondes, en plus du focus (effet dans theme.css). */
.mise-en-evidence { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: var(--rayon-petit); }
@media (max-width: 760px) {
  .rail-lien .pastille-actions { position: absolute; top: 0; right: var(--espace-1); margin: 0; min-width: 16px; height: 16px; }
}
/* --- Increment C, tranche B : recherche globale (champ de la barre, panneau de resultats, plein ecran etroit) ----- */
.recherche { position: relative; flex: 0 1 300px; min-width: 160px; }
.recherche-loupe { display: none; }
.recherche-entete { display: flex; align-items: center; gap: var(--espace-2); }
.recherche-champ { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: var(--espace-2); height: 32px;
  padding: 0 var(--espace-2); color: var(--texte-doux); background: var(--surface); border: 1px solid var(--bordure-champ);
  border-radius: var(--verre-rayon-controle, var(--rayon-petit)); }
.recherche-champ:hover { border-color: var(--texte-doux); }
/* Focus visible : le contour est porte par le cadre du champ (loupe et raccourci compris). */
.recherche-champ:focus-within { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.recherche-saisie, .recherche-saisie:focus-visible { flex: 1 1 auto; min-width: 0; width: auto; margin: 0; padding: 0; border: 0;
  outline: none; background: transparent; text-overflow: ellipsis; }
.recherche-raccourci { flex: none; padding: 0 var(--espace-1); font: inherit; font-size: 11px; line-height: 1.5; white-space: nowrap;
  color: var(--texte-doux); border: 1px solid var(--bordure-forte); border-radius: var(--rayon-petit); }
.recherche-fermer { display: none; flex: none; }
.recherche-panneau { position: absolute; top: calc(100% + var(--espace-2)); right: 0; z-index: var(--z-menu);
  width: min(560px, calc(100vw - 2 * var(--espace-4))); max-height: min(70vh, 640px); overflow: auto; padding: var(--espace-1);
  background: var(--verre-fond, var(--surface)); border: 1px solid var(--verre-bordure, var(--bordure-forte));
  border-radius: var(--verre-rayon, var(--rayon)); box-shadow: var(--verre-ombre, var(--ombre-2));
  -webkit-backdrop-filter: var(--verre-flou, none); backdrop-filter: var(--verre-flou, none); }
.recherche-statut { margin: 0; padding: var(--espace-2) var(--espace-3); font-size: var(--taille-petit); color: var(--texte-doux); }
.recherche-detail { margin: 0; padding: 0 var(--espace-3) var(--espace-2); }
.recherche-panneau.charge .recherche-resultats { opacity: 0.6; }
.recherche-groupe + .recherche-groupe { margin-top: var(--espace-1); padding-top: var(--espace-1); border-top: 1px solid var(--bordure); }
.recherche-groupe-titre { display: flex; align-items: center; gap: var(--espace-2); padding: var(--espace-2) var(--espace-3) var(--espace-1);
  font-size: var(--taille-petit); font-weight: var(--graisse-forte); color: var(--texte-doux); }
.recherche-compteur { min-width: 18px; padding: 0 var(--espace-1); text-align: center; font-size: 11px; line-height: 1.6;
  border-radius: var(--rayon-pastille); background: var(--surface-douce); color: var(--texte-doux); }
.recherche-option { display: block; padding: var(--espace-2) var(--espace-3); border-radius: var(--rayon-petit); color: var(--texte);
  text-decoration: none; cursor: pointer; }
.recherche-option:hover { background: var(--survol); }
/* Option active au clavier : fond ET contour (jamais la couleur seule). */
.recherche-option.actif { background: var(--accent-doux); outline: 2px solid var(--accent); outline-offset: -2px; }
.recherche-ligne { display: flex; align-items: baseline; gap: var(--espace-2); }
.recherche-titre { flex: 0 1 auto; min-width: 0; font-weight: var(--graisse-moyenne); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recherche-ligne .badge { flex: none; }
.recherche-meta { flex: none; margin-left: auto; font-size: var(--taille-petit); color: var(--texte-doux); white-space: nowrap; }
.recherche-extrait { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin-top: 2px;
  font-size: var(--taille-petit); color: var(--texte-doux); overflow-wrap: anywhere; }
.recherche-extrait mark { padding: 0 1px; border-radius: 2px; background: var(--attention-fond); color: var(--texte); font-weight: var(--graisse-forte); }
.recherche-plus .recherche-titre { color: var(--accent); font-size: var(--taille-petit); }
.recherche-note { margin: 0; padding: var(--espace-1) var(--espace-3) var(--espace-2); }
.recherche-ia { margin-top: var(--espace-1); padding: var(--espace-2) var(--espace-3); border-top: 1px solid var(--bordure); }
.recherche-ia:empty { display: none; }
/* Moins de 1100 px : le champ se replie en bouton loupe ; la recherche se deploie sous la barre. */
@media (max-width: 1099px) {
  .recherche { position: static; flex: none; min-width: 0; }
  .recherche-loupe { display: inline-flex; }
  .recherche-raccourci { display: none; }
  .recherche-boite { display: none; }
  .recherche.deployee .recherche-boite { display: flex; flex-direction: column; gap: var(--espace-1); position: absolute;
    top: calc(100% + var(--espace-1)); right: var(--espace-3); z-index: var(--z-menu); width: min(560px, calc(100% - 2 * var(--espace-3)));
    max-height: 80vh; padding: var(--espace-2); background: var(--verre-fond, var(--surface));
    border: 1px solid var(--verre-bordure, var(--bordure-forte)); border-radius: var(--verre-rayon, var(--rayon));
    box-shadow: var(--verre-ombre, var(--ombre-2)); -webkit-backdrop-filter: var(--verre-flou, none); backdrop-filter: var(--verre-flou, none); }
  .recherche.deployee .recherche-panneau { position: static; flex: 1 1 auto; min-height: 0; width: auto; max-height: none; padding: 0;
    border: 0; border-radius: 0; box-shadow: none; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
/* Entre 761 et 900 px la barre etait deja au bord du debordement : le nom et le role de l'utilisateur s'effacent
   (les avatars et leur infobulle restent), comme sous 760 px, pour laisser la place a la loupe. */
@media (max-width: 900px) {
  .barre .utilisateur-nom, .barre .libelle-bouton { display: none; }
}
/* Le nom de la mission se tronque dans la place qui reste au lieu de passer sous ses voisins. */
@media (max-width: 1099px) {
  .selecteur-bouton, .selecteur-titre { max-width: 100%; }
  .selecteur-titre { overflow: hidden; }
  .selecteur-titre strong, .selecteur-titre span { max-width: 100%; }
}
/* Moins de 640 px : PLEIN ECRAN, champ en haut, bouton « Fermer », resultats qui defilent dessous. */
@media (max-width: 640px) {
  .recherche.deployee .recherche-boite { position: fixed; inset: 0; width: auto; max-height: none; border: 0; border-radius: 0;
    box-shadow: none; background: var(--fond); }
  .recherche-champ { height: 40px; }
  .recherche-fermer { display: inline-flex; height: 40px; }
  body.recherche-deployee { overflow: hidden; }
  body.recherche-deployee .barre { z-index: var(--z-notice); }
}

/* --- Increment C, tranche C : recherche par IA (bouton violet, filtres compris), liens et demandes de l'assistant -- */
/* Filtres compris par l'IA : au-dessus des resultats, dans le panneau qui defile (plein ecran sous 640 px). */
.recherche-filtres { margin: 0 var(--espace-2) var(--espace-2); padding: var(--espace-2) var(--espace-3); border: 1px solid var(--ia);
  border-radius: var(--rayon-petit); background: var(--ia-fond); }
.filtres-tete { display: flex; flex-wrap: wrap; align-items: center; gap: var(--espace-1) var(--espace-2); }
.filtres-tete h3 { display: flex; align-items: center; gap: var(--espace-1); margin: 0; font-size: var(--taille-petit); color: var(--ia); }
.filtres-cout { color: var(--texte-doux); }
.filtres-tete button { flex: none; margin-left: auto; }
.filtres-ecartes { margin: var(--espace-1) 0 0; color: var(--attention); overflow-wrap: anywhere; }
.filtres-groupe { min-width: 0; margin: var(--espace-2) 0 0; padding: 0; border: 0; }
.filtres-groupe legend, .filtres-champ label { margin: 0; padding: 0; font-size: var(--taille-petit); font-weight: var(--graisse-moyenne);
  color: var(--texte-doux); }
.filtres-choix { display: flex; flex-wrap: wrap; gap: var(--espace-1) var(--espace-3); margin-top: var(--espace-1); }
.filtres-choix label.case { font-size: var(--taille-petit); }
.filtres-choix input[type="checkbox"] { flex: none; accent-color: var(--ia); }
.filtres-choix input[type="radio"] { flex: none; display: inline-block; width: 16px; height: 16px; margin: 0; padding: 0; accent-color: var(--ia); }
.filtres-champ { min-width: 0; margin-top: var(--espace-2); }
.filtres-champ input { margin-top: 2px; padding: var(--espace-1) var(--espace-2); font-size: var(--taille-petit); }
.filtres-champ input[aria-invalid="true"] { border-color: var(--erreur); }
.filtres-periode { display: flex; flex-wrap: wrap; gap: 0 var(--espace-3); }
.filtres-periode .filtres-champ { flex: 1 1 140px; }
.filtre-erreur { margin: 2px 0 0; color: var(--erreur); overflow-wrap: anywhere; }
.filtres-note { margin: var(--espace-2) 0 0; color: var(--texte-doux); }
/* Bouton « Demander à l'IA » : cout annonce a cote, etat de l'appel dessous. */
.recherche-ia-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: var(--espace-1) var(--espace-3); }
.recherche-ia-ligne button { flex: none; }
.recherche-ia-cout { flex: 1 1 200px; min-width: 0; color: var(--texte-doux); }
.recherche-ia-etat { margin: var(--espace-2) 0 0; color: var(--ia); overflow-wrap: anywhere; }
.recherche-ia-etat.refus { padding: var(--espace-2) var(--espace-3); border-radius: var(--rayon-petit); background: var(--attention-fond);
  color: var(--attention); }
button.bouton-ia[aria-disabled="true"] { cursor: progress; opacity: 0.6; }
/* Liens d'un message de l'assistant (A11, B08) : titre et detail, toute la ligne est le lien. */
.assistant-liens { list-style: none; display: flex; flex-direction: column; gap: var(--espace-1); margin: var(--espace-1) 0; padding: 0; }
.assistant-lien { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 0; width: 100%; height: auto;
  padding: var(--espace-1) var(--espace-2); border: 1px solid var(--bordure-forte); border-radius: var(--rayon-petit); background: var(--surface);
  color: var(--texte); font-weight: inherit; text-align: left; text-decoration: none; white-space: normal; }
.assistant-lien:hover { border-color: var(--ia); background: var(--surface); }
.assistant-lien:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.assistant-lien-titre { font-weight: var(--graisse-moyenne); color: var(--accent); overflow-wrap: anywhere; }
.assistant-lien-detail { color: var(--texte-doux); overflow-wrap: anywhere; }
/* Demandes de changement (C5) : a traiter d'abord, traitees repliees ; les annexes defilent sans pousser le fil. */
.assistant-annexes { flex: none; max-height: min(260px, 40vh); overflow-y: auto; }
.assistant-demandes details { margin: var(--espace-2) 0 0; }
.demandes-liste { list-style: none; margin: var(--espace-1) 0 0; padding: 0; }
.demandes-liste .demande { padding: var(--espace-2) 0; border-top: 1px solid var(--bordure); overflow-wrap: anywhere; }
.demande-suite { margin-top: 2px; color: var(--texte-doux); }
.demande-commandes { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--espace-2); margin-top: var(--espace-1); }
.demande-commandes button { flex: none; }
.demande-commandes .demande-motif { flex: 1 1 160px; min-width: 0; margin: 0; }
.demande-motif input { margin-top: var(--espace-1); padding: var(--espace-1) var(--espace-2); font-size: var(--taille-petit); }

/* --- Retour du porteur (2026-11-15) : consigne d'arrivee de « M'y emmener » --- */
.consigne-arrivee { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--espace-2) var(--espace-3); }
.consigne-arrivee p { margin: 0; flex: 1 1 240px; min-width: 0; }
.consigne-arrivee button { flex: none; }
.notice.info .notice-texte { color: var(--texte); }

/* --- Selecteur de theme (D182) --- */
/* Menu ancre a droite du bouton : il s'ouvre vers la gauche et ne deborde jamais de l'ecran (mobile ~390 px). */
.selecteur-theme { position: relative; display: flex; }
.menu-deroulant.menu-theme { left: auto; right: 0; width: max-content; min-width: 200px;
  max-width: calc(100vw - 2 * var(--espace-3)); }
.menu-theme .menu-element[aria-checked="true"] { background: var(--accent-doux); }
.menu-theme .menu-element[aria-checked="true"]:hover, .menu-theme .menu-element[aria-checked="true"]:focus-visible { background: var(--survol); }
.menu-theme-libelle { display: flex; align-items: center; gap: var(--espace-2); white-space: nowrap; }

/* --- Increment 4 (D181) : proactivite. Indicateur discret de l'analyse (jamais la couleur seule : texte « Analyse :
   etat »), cartes de proposition, page Proactivite. Jetons seulement, aucun mouvement. --- */
.indicateur-analyse { gap: var(--espace-1); }
.indicateur-point { width: 8px; height: 8px; border-radius: var(--rayon-pastille); background: var(--texte-discret); flex: none; }
.indicateur-analyse.a-jour .indicateur-point { background: var(--succes); }
.indicateur-analyse.attente .indicateur-point { background: var(--attention); }
.indicateur-analyse.cours .indicateur-point { background: var(--ia); }
.indicateur-analyse.echec { color: var(--erreur); background: var(--erreur-fond); border-color: transparent; }
.indicateur-analyse.echec .indicateur-point { background: var(--erreur); }
.carte-proposition { margin-bottom: var(--espace-3); }
.carte-proposition .boutons { flex-wrap: wrap; }
.proposition-champs { display: grid; gap: var(--espace-2); margin: var(--espace-2) 0; }
.proposition-champs textarea.code { font-family: var(--police-mono); font-size: var(--taille-petit); }
.proposition-apercu summary { cursor: pointer; font-size: var(--taille-petit); }
.tableau-mesures { width: 100%; border-collapse: collapse; font-size: var(--taille-petit); }
.tableau-mesures th, .tableau-mesures td { text-align: left; padding: var(--espace-1) var(--espace-2); border-bottom: 1px solid var(--bordure); }
@media (max-width: 640px) {
  .indicateur-analyse .puce-texte { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tableau-mesures { display: block; overflow-x: auto; }
}


/* Refonte du parcours IA (phase 3) : assistant de creation de mission en 5 pages. Couleurs : jetons de theme.css. */
.creation-assistant { display: flex; flex-direction: column; align-items: center; gap: var(--espace-3); width: 100%; min-width: 0; }
.assistant-progression { width: 100%; max-width: 620px; }
.assistant-progression ol { display: flex; gap: var(--espace-2); list-style: none; margin: 0; padding: 0; }
.assistant-progression .etape { flex: 1 1 0; min-width: 0; }
.etape-bouton { width: 100%; height: auto; display: flex; flex-direction: column; align-items: center; gap: var(--espace-1);
  padding: var(--espace-2) var(--espace-1); border-radius: var(--rayon); border: 1px solid var(--bordure);
  background: var(--surface); color: var(--texte-doux); }
.etape-bouton:disabled { opacity: 0.55; cursor: not-allowed; }
.etape.complete .etape-bouton { border-color: var(--succes); color: var(--succes); }
.etape.courante .etape-bouton { border-color: var(--accent); background: var(--accent-doux); color: var(--accent-sur-doux);
  font-weight: var(--graisse-moyenne); }
.etape-numero { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px;
  border-radius: 50%; border: 1px solid currentColor; }
.etape-titre { font-size: 0.85em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assistant-position, .legende-obligatoire { margin: 0; }
.obligatoire { color: var(--erreur); font-weight: var(--graisse-moyenne); }
.champ-requis { margin-bottom: var(--espace-3); }
.champ-requis-tete { display: flex; align-items: baseline; gap: 2px; }
.champ-requis-tete label { margin-bottom: 0; }
.champ-requis-tete .obligatoire { font-size: var(--taille-petit); }
.champ-requis > input { display: block; width: 100%; margin-top: var(--espace-1); }
.bandeau-erreurs { width: 100%; max-width: 620px; }
.bandeau-erreurs ul { margin: var(--espace-1) 0 0; padding-left: var(--espace-4); }
.bandeau-erreurs button.lien, .recap-manquants button.lien { height: auto; min-height: 26px; white-space: normal; text-align: left;
  justify-content: flex-start; color: inherit; }
.en-erreur { border-color: var(--erreur) !important; box-shadow: 0 0 0 2px var(--erreur-fond); border-radius: var(--rayon); }
.choix.en-erreur, .carte-structurante.en-erreur { padding: var(--espace-2); border: 1px solid var(--erreur); }
input[aria-invalid="true"] { border-color: var(--erreur); }
.message-erreur { color: var(--erreur); margin: var(--espace-1) 0 0; font-size: 0.9em; }
.groupe-cartes { width: 100%; display: flex; flex-direction: column; align-items: center; gap: var(--espace-2); }
.carte-structurante.confirmee { border-color: var(--succes); }
.pied-assistant .boutons { justify-content: space-between; }
.recap-bloc { width: 100%; }
.recap-tete { display: flex; align-items: center; justify-content: space-between; gap: var(--espace-2); }
.recap-tete h2 { margin: 0; }
.recap-liste { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; gap: var(--espace-1) var(--espace-3); margin: var(--espace-2) 0 0; }
.recap-liste dt { color: var(--texte-doux); }
.recap-liste dd { margin: 0; overflow-wrap: anywhere; }
.recap-manquants ul { margin: var(--espace-1) 0 0; padding-left: var(--espace-4); }
@media (max-width: 560px) {
  .etape-titre { display: none; }
  .recap-liste { grid-template-columns: 1fr; }
}
/* Correctif du 2026-11-17 : regle des cartes (justification, carte laissee « Pas encore connu »). */
.justification-carte { margin: 0; color: var(--texte-doux); }
.carte-structurante.inconnue-volontaire { border-style: dashed; border-color: var(--attention); }
.carte-inconnue { margin: 0; }

/* --- Lot M (D186) : mode serveur (classe `mode-serveur` sur <html>, jamais en mode poste) ----------------------- */
/* M12 : bandeau discret et permanent, au-dessus de la barre ; il ne recouvre rien (la mise en page est decalee par
   --hauteur-barre, theme.css). */
.bandeau-donnees { position: sticky; top: 0; z-index: var(--z-menu); height: var(--hauteur-bandeau); display: flex;
  align-items: center; justify-content: center; padding: 0 var(--espace-3); text-align: center; text-wrap: balance;
  font-size: var(--taille-petit); line-height: 1.25; color: var(--bandeau-texte); background: var(--bandeau-fond);
  border-bottom: 1px solid var(--bordure); }
:root.mode-serveur .barre { top: calc(var(--hauteur-bandeau) + var(--verre-marge, 0px));
  height: var(--hauteur-barre-nue); }
/* Audit du 2026-11-20 : compte reinitialise par un administrateur (a acquitter une fois) ; ancien membre homonyme. */
.bandeau-reinitialisation { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--espace-2); margin-bottom: var(--espace-3); }
.bandeau-reinitialisation p, .compte-homonyme p { margin: 0; }
.compte-homonyme { display: grid; gap: var(--espace-2); }
@media (max-width: 640px) {
  :root.mode-serveur .recherche.deployee .recherche-boite { top: var(--hauteur-bandeau); }
}
/* M08 : telechargements et depot d'un dossier entier. */
.bouton-telecharger[aria-busy="true"] { cursor: progress; opacity: 0.6; }
:root.mode-serveur .volet-actions { flex-wrap: wrap; }
.documents-dossier { display: flex; flex-wrap: wrap; align-items: center; gap: var(--espace-2) var(--espace-3); margin-top: var(--espace-3); }
/* Coeur d'abord M3 (C02-C04, T29, T35) : pages Documents et Livrables. Au-dessus de la liste, la barre de page (et,
   sur Livrables, l'en-tete de version) ; depot, dossier, fichiers trouves, « a traiter » et « a regenerer » se deplient
   sous la barre. Jetons de theme.css seulement. */
body.depot-documents #section-documents > .liste { outline: 2px dashed var(--accent); outline-offset: 2px; }
#section-documents .barre-page button.pastille-a-traiter,
#section-fichiers .barre-page button.pastille-a-traiter { border-color: var(--attention); }
#section-documents .barre-page .panneau > .carte { margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
#section-documents .barre-page .panneau > .section { margin-bottom: 0; }
#section-documents .barre-page .panneau > .encadre,
#section-fichiers .barre-page .panneau > .encadre { margin: 0; }
#section-fichiers .barre-page > .version-entete { flex: 1 1 12rem; min-width: 0; margin: 0 var(--espace-3) 0 0; }
#section-fichiers .barre-page > .version-entete h3 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#section-fichiers .barre-page > .version-entete .editable { display: inline-flex; vertical-align: middle; }
#section-fichiers .barre-page > .version-entete .editable-texte { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Sous 760 px : l'en-tete de version prend sa propre ligne en haut de la barre et passe a la ligne (le bouton
   « Nommer cette version » reste entier et cliquable) ; les outils suivent dessous. Listes de fichiers : une colonne
   (nom, chemin, actions), actions alignees a gauche et a la ligne, rien ne sort de l'ecran. */
@media (max-width: 760px) {
  #section-fichiers .barre-page > .version-entete { flex: 1 0 100%; flex-wrap: wrap; margin: 0; }
  #section-fichiers .barre-page > .version-entete h3,
  #section-fichiers .barre-page > .version-entete .editable-texte { overflow: visible; text-overflow: clip; white-space: normal; }
  .liste-fichiers .liste-ligne { grid-template-columns: minmax(0, 1fr); gap: var(--espace-1); }
  .liste-fichiers .liste-actions { justify-content: flex-start; flex-wrap: wrap; }
}
/* RE-1 : la liste des fichiers crees s'adapte a la largeur de SON conteneur (colonne etroite a 1366 px), pas de l'ecran :
   les boutons passent a la ligne, le chemin garde une largeur lisible, sinon la ligne s'empile. */
.liste-fichiers { container-type: inline-size; }
.liste-fichiers .liste-ligne { grid-template-columns: minmax(110px, 0.8fr) minmax(200px, 2fr) minmax(0, 1.6fr); }
.liste-fichiers .liste-actions { flex-wrap: wrap; }
@container (max-width: 820px) {
  .liste-fichiers .liste-ligne { grid-template-columns: minmax(0, 1fr); gap: var(--espace-1); }
  .liste-fichiers .liste-actions { justify-content: flex-start; }
}
.depot-dossier .notice-texte { min-width: min(240px, 60vw); }
.depot-dossier-ligne { display: flex; align-items: center; gap: var(--espace-2); margin-top: var(--espace-2); }
.depot-dossier progress { flex: 1; min-width: 0; height: 6px; accent-color: var(--accent); }
.depot-dossier-compte { font-size: var(--taille-petit); color: var(--texte-doux); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Page « Éléments de la mission » : « Tout confirmer » en haut, cartes facultatives empilées, équipe nommée.
   Le mouvement de la pile est dans theme.css. */
.boutons-haut { margin-bottom: var(--espace-2); }
.pile-cartes { position: relative; width: 100%; max-width: 420px; margin: 0 auto var(--espace-3); padding-bottom: var(--espace-4); }
.pile-cartes .pile-dessus { grid-template-columns: minmax(0, 1fr); position: relative; z-index: 2; }
.pile-cartes .carte-fait.pile-cachee { display: none; }
.pile-cartes::before, .pile-cartes::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; top: var(--espace-3);
  border: 1px solid var(--bordure); border-radius: var(--rayon); background: var(--surface); opacity: 0; }
.pile-cartes.pile-2::before, .pile-cartes.pile-3::before, .pile-cartes.pile-3::after { opacity: 1; }
.pile-cartes::before { transform: translateY(var(--espace-2)) scale(0.97); z-index: 1; }
.pile-cartes::after { transform: translateY(var(--espace-4)) scale(0.94); z-index: 0; }
.pile-nav { display: flex; align-items: center; justify-content: space-between; gap: var(--espace-2); margin-top: var(--espace-3); }
.equipe-carte { margin-top: var(--espace-2); }

/* --- Lot M, tranche D (M03, M04) : menu du compte, « Mes sessions », page Comptes. Mode serveur seulement : ces
   elements n'existent jamais en mode poste. Couleurs : jetons de theme.css. --- */
.menu-compte { position: relative; display: flex; }
.bouton-compte { gap: var(--espace-1); height: 36px; padding: 0 var(--espace-2) 0 var(--espace-1); border-radius: var(--rayon-pastille); color: var(--texte); }
.bouton-compte .avatar { border-color: transparent; }
.bouton-compte .libelle-bouton { max-width: 180px; overflow: hidden; text-overflow: ellipsis; margin-left: var(--espace-1); }
.menu-deroulant.menu-compte-liste { left: auto; right: 0; width: max-content; min-width: 240px;
  max-width: calc(100vw - 2 * var(--espace-3)); }
.menu-compte-identite { display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: var(--espace-2) var(--espace-3); overflow-wrap: anywhere; }
.menu-compte-identite .badge { margin-top: var(--espace-1); }
.dialogue-sessions { width: min(480px, calc(100vw - 2 * var(--espace-4))); max-width: none; }
.sessions-liste { list-style: none; margin: var(--espace-3) 0; padding: 0; max-height: 40vh; overflow: auto;
  border: 1px solid var(--bordure); border-radius: var(--rayon-petit); }
.sessions-liste li { padding: var(--espace-2) var(--espace-3); border-bottom: 1px solid var(--bordure); }
.sessions-liste li:last-child { border-bottom: 0; }
.session-titre { display: flex; align-items: center; gap: var(--espace-2); }
.sessions-message { min-height: 1.5em; margin: 0; }
.notifications-etat { font-weight: 600; margin: var(--espace-3) 0 var(--espace-2); } /* N2-1 : ligne d'etat de CET appareil */
#dialogue-notifications .session-titre .bouton-aide { margin-left: auto; } /* N2-1 : « i » a droite du titre */
.notifications-appareils .session-titre button { margin-left: auto; } /* N2-2 : « Retirer » a droite de chaque appareil */
.notifications-appareils h3 { margin: var(--espace-4) 0 0; }
.tableau-comptes { padding: 0; overflow-x: auto; }
.tableau-comptes th { white-space: nowrap; }
.tableau-comptes th, .tableau-comptes td { vertical-align: middle; }
.tableau-comptes th:first-child, .tableau-comptes td:first-child { padding-left: var(--espace-4); min-width: 250px; }
.tableau-comptes td > .petit { max-width: 28ch; }
.tableau-comptes select { width: auto; min-width: 132px; margin-top: 0; padding: var(--espace-1) var(--espace-2); font-size: var(--taille-petit); }
.tableau-comptes td > button { margin-top: var(--espace-1); }
/* Lot Avancement, part B2 (AV19) : identifiant GitHub dans sa propre colonne, lisible jusqu'a ~20 caracteres. */
.tableau-comptes .compte-github { width: 24ch; min-width: 24ch; max-width: 100%; margin-top: 0; padding: var(--espace-1) var(--espace-2);
  font-family: var(--police-mono); font-size: var(--taille-petit); }
.tableau-comptes .boutons { flex-wrap: nowrap; }
.compte-identite { display: flex; align-items: center; gap: var(--espace-2); min-width: 0; }
.compte-nom { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.compte-nom strong { font-size: var(--taille-texte); font-weight: var(--graisse-moyenne); }
.compte-desactive .compte-nom, .compte-desactive td { color: var(--texte-doux); }
.lien-compte h3 { margin-bottom: var(--espace-2); }
.lien-compte input { margin: 0 0 var(--espace-2); font-family: var(--police-mono); font-size: var(--taille-petit); }
.lien-compte p { max-width: none; }
.formulaire-compte .ligne-champs { align-items: flex-start; }
.formulaire-compte .case { margin-bottom: var(--espace-2); }
.formulaire-compte .boutons { margin-top: var(--espace-3); }
@media (max-width: 900px) {
  /* Tableau en fiches : une fiche par compte, chaque valeur precedee de son libelle (`data-libelle`). Les roles
     ARIA du tableau sont poses par app.js : la structure reste annoncee malgre `display: block`. */
  .tableau-comptes thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tableau-comptes table, .tableau-comptes tbody, .tableau-comptes tr { display: block; }
  .tableau-comptes tr { padding: var(--espace-3) var(--espace-4); border-bottom: 1px solid var(--bordure); }
  .tableau-comptes tr:last-child { border-bottom: 0; }
  .tableau-comptes td, .tableau-comptes td:first-child { min-width: 0; display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: var(--espace-1) var(--espace-2);
    align-items: center; padding: var(--espace-1) 0; border: 0; }
  .tableau-comptes td::before { content: attr(data-libelle); grid-row: 1 / span 3; align-self: start; color: var(--texte-doux); }
  .tableau-comptes td > * { grid-column: 2; justify-self: start; }
  .tableau-comptes .boutons { flex-wrap: wrap; }
  .tableau-comptes .compte-github { width: 100%; min-width: 0; }  /* part B2 : occupe la colonne de valeur de la fiche */
}
@media (max-width: 760px) {
  /* Barre etroite : le bouton du compte se reduit a la pastille des initiales (nom accessible inchange). */
  .bouton-compte { width: 28px; height: 28px; padding: 0; border-width: 0; }
  .bouton-compte-chevron { display: none; }
}
@media (min-width: 901px) {
  .tableau-comptes td:nth-child(2) .petit { white-space: nowrap; }
}

/* --- Lot M, tranche E bis : page Droits (matrice droits x roles, exceptions par personne). Mode serveur seulement.
   Couleurs : jetons de theme.css (cinq themes). --- */
.tableau-droits { padding: 0; overflow-x: auto; }
.tableau-droits th:first-child { padding-left: var(--espace-4); min-width: 220px; }
.tableau-droits tbody th { color: var(--texte); font-weight: var(--graisse-normale, 400); }
.tableau-droits th, .tableau-droits td { vertical-align: middle; }
.tableau-droits td { white-space: nowrap; }
.tableau-droits td.cellule-modifiee { background: color-mix(in srgb, var(--humain-fond) 55%, transparent); }
.case-droit { display: inline-flex; gap: var(--espace-2); cursor: pointer; }
.case-droit-texte { min-width: 3ch; color: var(--texte-doux); font-size: var(--taille-petit); }
.liste-droits-utilisateurs { list-style: none; margin: 0; padding: 0; }
.liste-droits-utilisateurs li { border-bottom: 1px solid var(--bordure); }
.liste-droits-utilisateurs li:last-child { border-bottom: 0; }
.utilisateur-droits { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--espace-2) var(--espace-4);
  padding: var(--espace-3) var(--espace-4); color: var(--texte); text-decoration: none; border-left: 3px solid transparent; }
.utilisateur-droits:hover { background: var(--surface-douce); }
.utilisateur-droits:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.utilisateur-droits[aria-current="page"] { background: var(--accent-doux); border-left-color: var(--accent); }
.utilisateur-droits-etat { display: flex; flex-wrap: wrap; align-items: center; gap: var(--espace-1) var(--espace-3); }
.fiche-droits-carte .ligne-champs { max-width: 360px; margin-top: var(--espace-3); }
.fiche-droits-identite { display: flex; flex-wrap: wrap; align-items: center; gap: var(--espace-2); }
.liste-droits-fiche { list-style: none; margin: var(--espace-3) 0 0; padding: 0; border-top: 1px solid var(--bordure); }
.droit-utilisateur { display: grid; grid-template-columns: minmax(160px, 1fr) auto 128px; align-items: center; gap: var(--espace-2) var(--espace-4);
  padding: var(--espace-2) 0; border-bottom: 1px solid var(--bordure); }
.droit-utilisateur:last-child { border-bottom: 0; }
.droit-libelle { overflow-wrap: anywhere; }
.choix-droit { display: inline-flex; flex-wrap: wrap; margin: 0; padding: 0; min-width: 0; border: 1px solid var(--bordure-forte);
  border-radius: var(--rayon-petit); overflow: hidden; }
.choix-etat { position: relative; display: flex; align-items: center; margin: 0; padding: var(--espace-1) var(--espace-3);
  color: var(--texte); font-size: var(--taille-petit); cursor: pointer; white-space: nowrap; }
.choix-etat + .choix-etat { border-left: 1px solid var(--bordure-forte); }
.choix-etat input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
.choix-etat:hover { background: var(--surface-douce); }
.choix-etat:has(input:checked) { background: var(--accent-doux); color: var(--accent-sur-doux); font-weight: var(--graisse-moyenne); }
.choix-etat:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (max-width: 900px) {
  /* Matrice en fiches : une fiche par droit, chaque role precede de son libelle (`data-libelle`). */
  .tableau-droits thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tableau-droits table, .tableau-droits tbody, .tableau-droits tr { display: block; }
  .tableau-droits tr { padding: var(--espace-3) var(--espace-4); border-bottom: 1px solid var(--bordure); }
  .tableau-droits tr:last-child { border-bottom: 0; }
  .tableau-droits tbody th, .tableau-droits th:first-child { display: block; min-width: 0; padding: 0 0 var(--espace-1); border: 0;
    font-weight: var(--graisse-moyenne); overflow-wrap: anywhere; }
  .tableau-droits td { display: grid; grid-template-columns: 116px minmax(0, 1fr); align-items: center; gap: var(--espace-2);
    padding: var(--espace-1) var(--espace-2); border: 0; border-radius: var(--rayon-petit); }
  .tableau-droits td::before { content: attr(data-libelle); color: var(--texte-doux); }
  .droit-utilisateur { grid-template-columns: minmax(0, 1fr); }
  /* Trois etats sur une ligne, de largeur egale a la fiche (un libelle long passe a la ligne dans son segment). */
  .choix-droit { display: flex; flex-wrap: nowrap; }
  .choix-etat { flex: 1 1 0; justify-content: center; padding: var(--espace-1) var(--espace-2); white-space: normal; text-align: center; }
  .choix-etat:first-of-type { flex-grow: 1.6; }
}

/* Coeur d'abord M4 (C05, C06, T17, T33) : pages Registres et Organisation. Au-dessus du coeur, la ligne de titre et la
   barre de page seulement : filtres des registres sur UNE ligne (listes compactes qui se resserrent avant de passer a la
   ligne), « Extraire d'un compte rendu », pastille « En attente (n) » qui filtre ; Organisation : « Reviser », pastille
   des manquants, « i ». Jetons de theme.css seulement. */
.registres-filtres-ligne { display: flex; flex: 1 1 380px; flex-wrap: wrap; align-items: center; gap: var(--espace-2); min-width: 0; }
.registres-filtres-ligne .registres-filtre { flex: 1 1 0; width: auto; min-width: 72px; max-width: 190px; height: 28px; margin: 0;
  padding: 0 var(--espace-2); font-size: var(--taille-petit); text-overflow: ellipsis; }
.registres-filtres-ligne input.registres-filtre { min-width: 120px; }
.registres-filtres-ligne button { flex: none; height: 28px; }
.barre-page .pastille-panneau.registres-extraire, .barre-page .pastille-panneau.organisation-reviser,
.barre-page .pastille-panneau.pastille-kit-perime { flex: none; }
/* Organisation : revision a decider (marque « a traiter ») et kit perime (alerte non bloquante, en pastille, D223). */
.barre-page button.pastille-panneau.organisation-reviser.pastille-a-traiter:not([aria-expanded="true"]) { border-color: var(--attention); }
.barre-page button.pastille-panneau.pastille-kit-perime:not([aria-expanded="true"]) { border-color: var(--erreur); color: var(--erreur); }
/* Badge « validée » de la ligne de titre : sans marge verticale, il ne grandit pas la ligne (C24). */
.entete-compacte .meta > .badge.organisation-statut { padding-top: 0; padding-bottom: 0; line-height: 1.2; }
button.pastille-panneau.registres-pastille-attente[aria-pressed="true"] { background: var(--accent-doux); color: var(--accent-sur-doux);
  border-color: var(--accent); }
.registres-barre-encours { display: inline-flex; align-items: center; gap: var(--espace-2); color: var(--texte-doux); }
.registres-barre-encours button { height: 28px; }
.barre-page .panneau > .section:last-child { margin-bottom: 0; }
/* Dans le panneau (bordure et marge interne en plus), le bouton IA de l'extraction passe a la ligne a 420 px. */
#panneau-registres-extraction button.bouton-ia { max-width: 100%; white-space: normal; text-align: left; height: auto; }
@media (max-width: 520px) {
  #panneau-registres-extraction { padding-left: var(--espace-2); padding-right: var(--espace-2); }
  .registres-filtres-ligne { flex-wrap: wrap; flex-basis: 100%; }
  .registres-filtres-ligne .registres-filtre { flex: 1 1 40%; max-width: none; }
}

/* Lot Avancement D2 : panneau « Envoyer un correctif » (coeur : le champ ; classes propres, jetons de theme). */
.av-entete .av-envoyer-correctif { margin-left: auto; }
.dialogue-correctif { width: min(560px, calc(100vw - 2 * var(--espace-4))); }
.dialogue-correctif .session-titre .bouton-aide { margin-left: auto; }
.correctif-champ { position: relative; display: flex; gap: var(--espace-2); align-items: flex-start; }
.correctif-champ textarea { flex: 1; min-width: 0; width: 100%; }
.correctif-page, .correctif-urgent { display: block; margin-top: var(--espace-3); }
.correctif-page input { width: 100%; box-sizing: border-box; }
.correctif-raison { min-height: 1.2em; margin: var(--espace-2) 0; }
#correctif-envoyer[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
#correctif-dictee[aria-pressed="true"] { background: var(--attention-fond, var(--fond-survol)); outline: 2px solid var(--accent, currentColor); }

/* Lot Avancement, tranche D, part D4 : zone « Correctifs » (AV31). Sous 600 px : une carte par ligne, sans defilement horizontal. */
.av-correctifs-zone { min-width: 0; }
.av-correctifs { width: 100%; border-collapse: collapse; table-layout: auto; }
.av-correctifs th, .av-correctifs td { text-align: left; vertical-align: top; padding: var(--espace-2) var(--espace-3); border-bottom: 1px solid var(--bordure); overflow-wrap: anywhere; }
.av-correctifs td[data-col="phrase"] strong, .av-correctifs td[data-col="etat"] .badge, .av-correctif-compris, .av-correctif-detail, .av-correctif-delai { display: block; }
.av-correctif-compris, .av-correctif-detail, .av-correctif-delai { color: var(--texte-doux); }
/* Part D5 : gestes « Ajouter une précision » et « Retirer » sous le titre du correctif (lignes ouvertes non fusionnées). */
.av-correctif-gestes { display: flex; flex-wrap: wrap; gap: var(--espace-1); margin-top: var(--espace-1); }
.av-correctif-geste textarea { display: block; width: 100%; box-sizing: border-box; margin-top: var(--espace-1); }
.av-correctif-geste .boutons { margin-top: var(--espace-1); }
.av-correctif-urgent { margin-left: var(--espace-2); background: var(--attention-fond); color: var(--attention); }
.av-correctif-attend { color: var(--attention); }
@media (min-width: 601px) { .av-correctifs td[data-col="date"], .av-correctifs td[data-col="qui"], .av-correctifs td[data-col="numero"] { white-space: nowrap; overflow-wrap: normal; } }
@media (max-width: 600px) {
  .av-correctifs thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .av-correctifs, .av-correctifs tbody, .av-correctifs tr, .av-correctifs td { display: block; width: 100%; box-sizing: border-box; }
  .av-correctifs tr { padding: var(--espace-2) 0; border-bottom: 1px solid var(--bordure); }
  .av-correctifs td { border-bottom: 0; padding: var(--espace-1) var(--espace-2); }
  .av-correctifs td::before { content: attr(data-label) " : "; color: var(--texte-doux); }
  .av-correctifs td[data-col="phrase"] strong, .av-correctifs td[data-col="etat"] .badge { display: inline; }
}

/* Increment R (R08) : page « Registres » ; jetons de theme.css seulement. Les droits complementaires s'affichent sous
   le libelle du droit dans Administration > Droits. */
.droit-complements { margin: var(--espace-1) 0 0; padding-left: var(--espace-4); font-weight: var(--graisse-normale, 400); }
.registres-filtres { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--espace-3); }
.registres-filtres > label { margin: 0; }
.registres-filtres select, .registres-filtres input { width: 100%; }
.registre-liste { list-style: none; margin: 0; padding: 0; }
.registre-ligne { display: flex; flex-direction: column; gap: var(--espace-2); padding: var(--espace-3) var(--espace-4);
  border-bottom: 1px solid var(--bordure); min-width: 0; }
.registre-ligne:last-child { border-bottom: 0; }
.registre-ligne.termine .registre-libelle { color: var(--texte-doux); }
.registre-tete { display: flex; flex-wrap: wrap; align-items: center; gap: var(--espace-2); min-width: 0; }
.registre-libelle { font-weight: var(--graisse-moyenne); overflow-wrap: anywhere; min-width: 0; }
.registre-details { display: flex; flex-wrap: wrap; gap: var(--espace-1) var(--espace-4); overflow-wrap: anywhere; }
.registre-a-preciser { font-style: italic; }
.registre-source { display: flex; flex-wrap: wrap; align-items: center; gap: var(--espace-1) var(--espace-2); min-width: 0; }
.registre-source a, .registre-source button { overflow-wrap: anywhere; display: inline-flex; align-items: center; gap: var(--espace-1); }
.registre-source .citation { flex-basis: 100%; overflow-wrap: anywhere; }
.registre-commandes { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--espace-2); }
.registre-etat { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--espace-2); }
.registre-etat > label { margin: 0; }
.registre-formulaire { display: flex; flex-direction: column; gap: var(--espace-2); min-width: 0; }
.registre-ligne .registre-formulaire, .registre-proposition .registre-formulaire { border-top: 1px solid var(--bordure); padding-top: var(--espace-3); }
.registre-champs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 var(--espace-3); }
.registre-champs input, .registre-champs select, .registre-champs textarea { width: 100%; }
.registre-historique { border-top: 1px solid var(--bordure); padding-top: var(--espace-2); min-width: 0; }
.registre-historique h4 { margin: 0 0 var(--espace-1); font-size: var(--taille-texte); }
.registre-versions { margin: 0; padding-left: var(--espace-5); }
.registre-versions li { margin-bottom: var(--espace-2); overflow-wrap: anywhere; }
.registre-propositions { list-style: none; margin: 0; padding: 0; }
.registre-proposition { display: flex; flex-direction: column; gap: var(--espace-2); }
.registre-reserve { margin: 0; }
.registre-rida-fichier { display: flex; flex-wrap: wrap; align-items: center; gap: var(--espace-2); margin-bottom: var(--espace-3);
  overflow-wrap: anywhere; }
.registre-rida-fichier a { display: inline-flex; align-items: center; gap: var(--espace-1); }
@media (max-width: 520px) {
  .registre-ligne { padding: var(--espace-3); }
  .registres-filtres, .registre-champs { grid-template-columns: minmax(0, 1fr); }
}
/* Increment R, tranche B : extraction d'un compte rendu et revue des propositions de l'IA (jetons de theme seulement). */
.registres-extraction-choix { display: flex; flex-direction: column; gap: var(--espace-2); min-width: 0; }
.registres-extraction-choix select { width: 100%; max-width: 100%; }
.registre-cout { margin: 0; overflow-wrap: anywhere; }
.registres-attente { display: flex; flex-direction: column; gap: var(--espace-2); }
.registres-attente p { margin: 0; overflow-wrap: anywhere; }
.registre-extractions-titre { margin: var(--espace-4) 0 var(--espace-2); font-size: var(--taille-texte); }
.registre-extraction { display: flex; flex-direction: column; gap: var(--espace-2); min-width: 0; margin-bottom: var(--espace-3); }
.registre-extraction p { margin: 0; overflow-wrap: anywhere; }
.registre-alertes ul, .registre-changements { margin: var(--espace-1) 0 0; padding-left: var(--espace-5); overflow-wrap: anywhere; }
.registre-deja-presents { min-width: 0; }
.registre-deja-presents summary { cursor: pointer; font-weight: var(--graisse-moyenne); }
.registre-deja-presents .registre-ligne { padding-left: 0; padding-right: 0; }
.registre-rapprochement { display: flex; flex-direction: column; gap: var(--espace-1); min-width: 0; overflow-wrap: anywhere; }
.registre-rapprochement p { margin: 0; }
.registre-echeance { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--espace-1); }
.registre-retraits { margin: 0; }
.registre-proposition.plus-tard { border-style: dashed; }
.registre-ligne:focus, .registre-proposition:focus { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Increment R, tranche C (R15) : tableau large de la mesure des registres, defilant dans sa carte (420 px). */
.table-defilante { overflow-x: auto; max-width: 100%; }

/* --- Lot Avancement, tranche A : page Avancement */
/* Page Avancement (adresse avancement), administrateurs, mode serveur. « Le coeur d'abord » :
   titre, coup d'oeil, derniers developpements et frise visibles sans defiler ; liste complete dessous ; fiche en panneau
   lateral. Couleurs : jetons de theme.css seulement (cinq themes). Largeurs de la frise : classes `av-pos-N` (debut) et
   `av-lar-N` (duree), par pas de 5 %, posees par app.js (aucun style en ligne). --- */
.av-entete { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--espace-1) var(--espace-4); margin-bottom: var(--espace-3); }
.av-a-jour { color: var(--texte-doux); font-size: var(--taille-petit); overflow-wrap: anywhere; }
.av-message { margin: 0 0 var(--espace-3); padding: var(--espace-1) var(--espace-3); border-radius: var(--rayon-petit);
  background: var(--attention-fond); color: var(--attention); font-size: var(--taille-petit); overflow-wrap: anywhere; }
.av-page .section { margin-bottom: var(--espace-5); }
.av-page .section-titre { margin-bottom: var(--espace-2); }
.av-coup { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--espace-1) var(--espace-4); padding: var(--espace-2) var(--espace-4);
  margin-bottom: var(--espace-4); }
.av-coup-titre { font-size: var(--taille-texte); }
.av-coup-liste { display: flex; flex-wrap: wrap; gap: var(--espace-1) var(--espace-4); margin: 0; padding: 0; list-style: none; min-width: 0; }
.av-coup-liste li { overflow-wrap: anywhere; min-width: 0; }
.av-coup-cle { color: var(--texte-doux); }
.av-coeur { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 var(--espace-5); }
@media (min-width: 1200px) { .av-coeur { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.av-derniers, .av-frise, .av-liste { list-style: none; margin: 0; padding: var(--espace-1) var(--espace-3); }
.av-dernier { display: grid; grid-template-columns: 6.5em minmax(0, 1fr) auto; align-items: center; gap: var(--espace-3);
  padding: 3px 0; border-bottom: 1px solid var(--bordure); }
.av-dernier:last-child, .av-frise-ligne:last-child { border-bottom: 0; }
.av-date { color: var(--texte-doux); font-size: var(--taille-petit); font-variant-numeric: tabular-nums; }
.av-texte { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.av-texte strong { font-weight: var(--graisse-moyenne); }
.av-phrase { color: var(--texte-doux); }
.av-badges { display: inline-flex; flex-wrap: wrap; gap: var(--espace-1); }
.badge.av-etat { background: var(--surface-douce); color: var(--texte-doux); }
.badge.av-etat-cadre { background: var(--accent-doux); color: var(--accent-sur-doux); }
.badge.av-etat-en_cours { background: var(--humain-fond); color: var(--humain); }
.badge.av-etat-fusionne { background: var(--ia-fond); color: var(--ia); }
.badge.av-etat-en_service { background: var(--succes-fond); color: var(--succes); }
.badge.av-etat-clos { background: var(--surface-douce); color: var(--texte-doux); border: 1px solid var(--bordure-forte); }
.badge.av-marque { background: var(--attention-fond); color: var(--attention); }
.badge.av-marque-cadrage { background: var(--surface-douce); color: var(--texte-doux); border: 1px dashed var(--bordure-forte); }
.badge.av-estimation { margin-left: var(--espace-2); background: transparent; color: var(--texte-doux); border: 1px dashed var(--bordure-forte); }
.av-info { padding: 2px var(--espace-1); }
.av-note { margin: 0 0 var(--espace-2); }
.av-frise-ligne { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 2px var(--espace-3);
  padding: var(--espace-1) 0; border-bottom: 1px solid var(--bordure); }
.av-frise-nom { font-weight: var(--graisse-moyenne); overflow-wrap: anywhere; min-width: 0; }
button.av-frise-lien { height: auto; min-height: 26px; padding: 0; font-size: inherit; font-weight: var(--graisse-moyenne); color: var(--texte);
  white-space: normal; text-align: left; justify-content: flex-start; overflow-wrap: anywhere; min-width: 0; }
.av-fiche-description { margin: 0 0 var(--espace-3); }
.av-fiche-tranche-description { display: block; color: var(--texte-doux); }
.av-frise-periode { color: var(--texte-doux); font-size: var(--taille-petit); text-align: right; overflow-wrap: anywhere; }
.av-piste { grid-column: 1 / -1; position: relative; display: block; height: 8px; border-radius: var(--rayon-pastille);
  background: var(--surface-douce); }
.av-barre { position: absolute; top: 0; bottom: 0; border-radius: var(--rayon-pastille); background: var(--bordure-forte); }
.av-passe .av-barre { background: var(--succes); }
.av-en_cours .av-barre { background: var(--accent); }
.av-barre.av-ouverte { border-top-right-radius: 0; border-bottom-right-radius: 0; border-right: 2px dashed var(--accent); background-clip: padding-box; }
.av-a_venir .av-barre { background: var(--accent-doux); border: 1px dashed var(--accent); }
.av-auj { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--frise-aujourdhui, var(--erreur)); }
.av-hors { margin: var(--espace-2) 0 0; font-size: var(--taille-petit); overflow-wrap: anywhere; }
.av-filtres { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--espace-3); max-width: 760px; margin-bottom: var(--espace-2); }
.av-filtres > label { margin: 0; min-width: 0; }
.av-filtres input, .av-filtres select { width: 100%; }
.av-compte { margin: 0 0 var(--espace-2); }
.av-liste { padding: 0; }
.av-liste li { border-bottom: 1px solid var(--bordure); }
.av-liste li:last-child { border-bottom: 0; }
.av-element { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 2px; width: 100%;
  height: auto; padding: var(--espace-2) var(--espace-4); border: 0; border-radius: 0; background: transparent; color: var(--texte);
  text-align: left; font: inherit; white-space: normal; cursor: pointer; }
.av-element:hover { background: var(--surface-douce); }
.av-element:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.av-element-tete { display: flex; flex-wrap: wrap; align-items: center; gap: var(--espace-1) var(--espace-3); min-width: 0; }
.av-element-titre { font-weight: var(--graisse-moyenne); overflow-wrap: anywhere; min-width: 0; }
.av-element-ident { color: var(--texte-doux); }
.av-element-phrase { color: var(--texte-doux); font-size: var(--taille-petit); overflow-wrap: anywhere; }
.av-fiche { position: fixed; top: var(--hauteur-barre); right: 0; bottom: 0; z-index: var(--z-volet); width: min(440px, 100%);
  overflow-y: auto; padding: var(--espace-4) var(--espace-5); background: var(--verre-opaque, var(--surface));
  border-left: 1px solid var(--bordure-forte); box-shadow: var(--ombre-2); overflow-wrap: anywhere; }
.av-fiche-tete { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--espace-3); margin-bottom: var(--espace-3); }
.av-fiche-tete h2 { min-width: 0; }
.av-fiche-tete button { display: inline-flex; align-items: center; gap: var(--espace-1); flex: none; }
.av-fiche-details { display: grid; grid-template-columns: 9em minmax(0, 1fr); gap: var(--espace-2) var(--espace-3); margin: 0; }
.av-fiche-details dt { color: var(--texte-doux); font-size: var(--taille-petit); }
.av-fiche-details dd { margin: 0; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.av-fiche-tranches { margin: 0; padding-left: var(--espace-4); }
.av-fiche-ids { overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .av-dernier { grid-template-columns: minmax(0, 1fr) auto; }
  .av-dernier .av-date { grid-column: 1 / -1; }
  .av-texte { white-space: normal; }
  .av-frise-ligne { grid-template-columns: minmax(0, 1fr); }
  .av-frise-periode { text-align: left; }
  .av-filtres { grid-template-columns: minmax(0, 1fr); }
  .av-fiche { padding: var(--espace-3) var(--espace-4); }
  .av-fiche-details { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .av-fiche-details dd { margin-bottom: var(--espace-2); }
}
.av-pos-0 { left: 0%; } .av-pos-5 { left: 5%; } .av-pos-10 { left: 10%; } .av-pos-15 { left: 15%; }
.av-pos-20 { left: 20%; } .av-pos-25 { left: 25%; } .av-pos-30 { left: 30%; } .av-pos-35 { left: 35%; }
.av-pos-40 { left: 40%; } .av-pos-45 { left: 45%; } .av-pos-50 { left: 50%; } .av-pos-55 { left: 55%; }
.av-pos-60 { left: 60%; } .av-pos-65 { left: 65%; } .av-pos-70 { left: 70%; } .av-pos-75 { left: 75%; }
.av-pos-80 { left: 80%; } .av-pos-85 { left: 85%; } .av-pos-90 { left: 90%; } .av-pos-95 { left: 95%; }
.av-pos-100 { left: 100%; }
.av-lar-5 { width: 5%; } .av-lar-10 { width: 10%; } .av-lar-15 { width: 15%; } .av-lar-20 { width: 20%; }
.av-lar-25 { width: 25%; } .av-lar-30 { width: 30%; } .av-lar-35 { width: 35%; } .av-lar-40 { width: 40%; }
.av-lar-45 { width: 45%; } .av-lar-50 { width: 50%; } .av-lar-55 { width: 55%; } .av-lar-60 { width: 60%; }
.av-lar-65 { width: 65%; } .av-lar-70 { width: 70%; } .av-lar-75 { width: 75%; } .av-lar-80 { width: 80%; }
.av-lar-85 { width: 85%; } .av-lar-90 { width: 90%; } .av-lar-95 { width: 95%; } .av-lar-100 { width: 100%; }

/* Lot Avancement, part B3 : zone 1 « A faire par vous » (en tete de la page). */
.av-actions-outils { display: inline-flex; align-items: center; gap: var(--espace-3); margin-left: var(--espace-3); }
.av-toutes { display: inline-flex; align-items: center; gap: var(--espace-1); }
.av-actions { list-style: none; margin: 0; padding: 0; }
.av-action { display: flex; align-items: center; gap: var(--espace-3); padding: var(--espace-2) var(--espace-4); }
.av-action + .av-action { border-top: 1px solid var(--bordure); }
.av-action-texte { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.av-action-meta, .av-action-bloque, .av-github-lu { color: var(--texte-doux); }
.av-action-raison, .av-github-etat { color: var(--attention); }
.av-action-mise_en_avant { border-left: 3px solid var(--attention); }
.av-action-alerte { border-left: 3px solid var(--attention); background: var(--attention-fond); }
.av-niveau-alerte { background: var(--attention-fond); color: var(--attention); }
.av-action-lien { flex: 0 0 auto; }
/* Ecran etroit : le texte garde toute la largeur ; badges puis lien passent a la ligne, le lien a pleine largeur. */
@media (max-width: 480px) {
  .av-action { flex-wrap: wrap; }
  .av-action-texte { flex: 1 1 100%; order: 1; }
  .av-action-lien, .av-action-sans-lien { flex: 1 1 100%; order: 2; text-align: center; }
}

/* Lot Avancement, part B4 : reponses proposees d'une demande d'action (texte seul, aucun bouton). */
.av-action-reponses { display: block; color: var(--texte-doux, inherit); font-size: .9em; }
.pastille-projet { display: inline-flex; align-items: center; gap: .35em; text-decoration: none; color: inherit; }
/* Revue B4 (pastille Projet) : la barre du haut ne doit jamais s'elargir a cause d'elle (aucun defilement horizontal
   cree). Sous 1300 px : chiffre seul (mot masque ; sans chiffre, pastille masquee, la page Avancement reste au rail).
   Sous 480 px : largeur nulle, le chiffre se pose sur le coin du bouton du compte (patron de la pastille du rail
   replie). L'infobulle et le libelle accessible gardent le texte complet. */
@media (max-width: 1299px) {
  .pastille-projet .pastille-projet-mot, .pastille-projet.pastille-projet-vide { display: none; }
}
@media (max-width: 480px) {
  .barre-droite > .pastille-projet, .barre-droite > .menu-compte { order: 1; }
  .barre-droite > .menu-compte ~ * { order: 2; }
  .pastille-projet { position: relative; align-self: stretch; width: 0; min-width: 0; margin: 0 calc(-1 * var(--espace-1)) 0 0;
    padding: 0; border: 0; overflow: visible; z-index: 1; }
  .pastille-projet .pastille-actions { position: absolute; top: 0; left: 0; margin: 0; min-width: 16px; height: 16px; }
}

/* Lot Avancement, part C3 : boutons de reponse (type, champ libre, « Pas reussi » avec son mot, etat d'envoi). */
.av-rep-zone { display: flex; flex-direction: column; gap: var(--espace-1, 4px); margin-top: var(--espace-1, 4px); }
.av-rep-boutons { display: flex; flex-wrap: wrap; gap: var(--espace-2, 8px); align-items: center; min-width: 0; }
.av-rep-champ { display: flex; flex-wrap: wrap; gap: var(--espace-2, 8px); align-items: center; flex: 1 1 14rem; min-width: 0; }
.av-rep-saisie { flex: 1 1 10rem; min-width: 0; max-width: 100%; }
.av-rep[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.av-rep-raison, .av-rep-erreur { color: var(--attention); }
.av-rep-etat { color: var(--texte-doux); }
.av-reessayer { margin-top: var(--espace-2, 8px); }

/* Cockpit A2a : menu « Mission » de l'Accueil (barre d'outils sous la ligne de titre) */
.menu-mission-hote { position: relative; display: inline-block; }
.menu-mission-hote > button { display: inline-flex; align-items: center; gap: var(--espace-2); }
.menu-deroulant.menu-mission { width: max-content; min-width: 240px; max-width: min(360px, 90vw); }
.menu-mission .menu-element { justify-content: flex-start; }
.menu-mission[hidden] { display: none; }
.menu-mission .menu-element-ia svg { color: var(--ia); }

/* DOC-1 : liste compacte des faits (une ligne par fait, detail au clic) */
.barre-faits { display: flex; flex-wrap: wrap; align-items: center; gap: var(--espace-2); margin-bottom: var(--espace-2); }
.barre-faits .recherche-faits { flex: 1 1 180px; min-width: 0; max-width: 320px; }
.faits-compacte .fait-ligne.liste-ligne { display: block; padding: var(--espace-1) var(--espace-3); }
.fait-rangee { display: flex; align-items: center; gap: var(--espace-2); min-width: 0; }
.fait-bascule { flex: 1 1 auto; min-width: 0; display: grid; grid-template-columns: minmax(90px, 0.9fr) minmax(0, 2fr) minmax(0, 1fr);
  gap: var(--espace-3); align-items: center; text-align: left; background: none; border: 0; padding: var(--espace-1) 0; font: inherit; color: inherit; cursor: pointer; }
.fait-libelle, .fait-valeur, .fait-source { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fait-libelle { color: var(--texte-doux); font-size: var(--taille-petit); }
.fait-rangee .liste-actions { flex: none; display: flex; align-items: center; gap: var(--espace-1); }
.fait-detail { padding: var(--espace-2) 0 var(--espace-2) var(--espace-3); display: flex; flex-direction: column; gap: var(--espace-1); }
.fait-detail-valeur { display: flex; flex-wrap: wrap; align-items: center; gap: var(--espace-2); min-width: 0; overflow-wrap: anywhere; }
.faits-compacte form.fait-ajout { display: flex; flex-wrap: wrap; gap: var(--espace-2); }
@media (max-width: 760px) {
  .fait-rangee { flex-wrap: wrap; }
  .fait-bascule { grid-template-columns: minmax(0, 1fr); gap: 0; flex-basis: 100%; }
  .fait-source { display: none; }
  .fait-rangee .liste-actions { flex-wrap: wrap; }
}
