[hidden] { display: none !important; }
:root {
  --fond: #f4f5f7; --carte: #ffffff; --trait: #dde1e7; --cadre: #a3abb8; --texte: #1d2433; --doux: #667085; --accent: #1e4f91;
  --accent-clair: #e8eff8; --alerte: #b42318; --attention: #b54708; --info: #175cd3; --ok: #067647;
  --police: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif; --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { display: grid; grid-template-rows: 52px 1fr 26px; grid-template-columns: minmax(0, 1fr); font: 13px/1.45 var(--police); color: var(--texte); background: var(--fond); overflow: hidden; }
button, .bouton { font: inherit; border: 1px solid var(--trait); background: var(--carte); color: var(--texte); padding: 5px 10px; border-radius: 6px; cursor: pointer; }
button:hover, .bouton:hover { border-color: var(--accent); }
button.principal { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
button.discret, .bouton.discret { background: transparent; }

#entete { display: flex; align-items: center; gap: 8px; padding: 0 10px; background: var(--carte); border-bottom: 1px solid var(--trait); }
.marque { display: flex; align-items: center; }
.marque img { display: block; width: 30px; height: 30px; }
.titre { display: flex; align-items: center; gap: 14px; flex: none; }
.espace { flex: 1; }
.jeton { display: flex; align-items: center; gap: 4px; min-width: 0; }
.code-session { display: flex; align-items: center; gap: 6px; border: 2px solid var(--accent); border-radius: 8px; padding: 3px 4px 3px 9px; cursor: help; }
.jeton code { font: 12px var(--mono); background: var(--accent-clair); padding: 3px 7px; border-radius: 5px; }
.etiquette { color: var(--doux); font-size: 12px; white-space: nowrap; }
.actions { display: flex; gap: 4px; align-items: center; flex: none; }
.langues { display: flex; align-items: center; flex: none; gap: 2px; padding: 2px; border: 1.5px solid var(--accent); border-radius: 7px; background: var(--carte); margin: 0 4px; }
.langues a { display: flex; padding: 3px 5px; border-radius: 5px; opacity: .45; }
.langues a img { display: block; width: 24px; height: 16px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .18); border-radius: 2px; }
.langues a.actif { background: var(--accent-clair); opacity: 1; }
.langues a:hover { opacity: 1; }
#entete button, #entete .bouton, .jeton code { white-space: nowrap; }
#entete button, #entete .bouton { padding: 5px 8px; font-size: 13px; }

/* page de travail en volets : un volet à la fois sur toute la largeur, onglets dans l'ordre de la saisie */
#travail { display: flex; flex-direction: column; gap: 8px; padding: 10px; min-height: 0; }
.volets { display: flex; gap: 6px; flex: none; }
.volets button { display: flex; align-items: baseline; gap: 8px; padding: 7px 16px; border: 1px solid var(--cadre); border-radius: 8px; background: var(--carte); font-weight: 600; font-size: 13.5px; color: var(--texte); }
.volets button .etat { font-weight: 500; font-size: 12px; color: var(--doux); }
.volets button .etat.ko { color: var(--alerte); } .volets button .etat.ok { color: var(--ok); }
.volets button.actif { background: var(--accent); border-color: var(--accent); color: #fff; } .volets button.actif .etat { color: #fff; }
.volets button.grise { background: #eef0f3; border-color: var(--trait); color: #98a2b3; cursor: not-allowed; } .volets button.grise .etat { color: #98a2b3; }
.volets button:not(.grise):not(.actif):hover { border-color: var(--accent); color: var(--accent); }
.volet { flex: 1; min-height: 0; display: grid; gap: 10px; }
.volet.saisie { grid-template-columns: 260px minmax(0, 1fr); }
#volet-controle { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
#volet-export { grid-template-columns: minmax(0, 900px); grid-template-rows: minmax(0, 1fr); align-items: start; }
#bloc-export { max-height: 100%; min-height: 0; display: flex; flex-direction: column; } #bloc-export .defile { overflow-y: auto; min-height: 0; }
.sommaire { padding: 8px; gap: 6px; }
.sommaire nav { overflow: auto; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; }
.sommaire a { display: flex; justify-content: space-between; gap: 6px; padding: 6px 9px; border-radius: 6px; cursor: pointer; color: var(--texte); font-size: 12.5px; text-decoration: none; border: 1px solid var(--cadre); background: var(--carte); }
.sommaire a:hover { background: var(--accent-clair); }
.sommaire a.actif { background: var(--accent-clair); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.sommaire a .n { flex: none; font-size: 11.5px; font-weight: 600; }
.sommaire a .n.ko { color: var(--alerte); } .sommaire a .n.ok { color: var(--ok); }
.sommaire a.ko { border-color: var(--alerte); }
.sommaire .titre-sommaire { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--doux); padding: 8px 8px 2px; }
h3.titre-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nav-chap { display: flex; gap: 8px; flex: none; font-size: 13px; font-weight: 400; }
.nav-chap button { padding: 3px 10px; }
.nav-chap button[disabled] { opacity: .35; cursor: default; }
.nav-chap button[disabled]:hover { border-color: var(--trait); }
.nav-chap button.principal[disabled]:hover { border-color: var(--accent); }
#parametrage .groupe-p > h3 { position: sticky; top: 0; z-index: 5; background: var(--carte); padding: 6px 0; }
/* champs individuels : cadres par groupe, deux colonnes de cadres sur grand écran */
.cadres { display: grid; grid-template-columns: repeat(auto-fill, minmax(560px, 1fr)); gap: 12px; align-items: start; }
.cadre { border: 1px solid var(--trait); border-radius: 8px; padding: 8px 12px 10px; }
.cadre h3, .groupe-p h3 { margin: 0 0 6px; font-size: 12.5px; color: var(--accent); }
.groupe-p { margin-bottom: 0; }
.question.dependante { padding-left: 16px; }
.bloc { background: var(--carte); border: 1px solid var(--cadre); border-radius: 8px; display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.bloc h2 { margin: 0; padding: 8px 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--doux); border-bottom: 1px solid var(--trait); }
.defile { overflow: auto; padding: 10px 12px; flex: 1; min-height: 0; }
.vide { color: var(--doux); }

/* paramétrage */
.question { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 8px; align-items: center; padding: 2px 0; border-bottom: 1px dashed #eef0f3; }
.question label { font-size: 12.5px; }
.question select, .question input { width: 100%; font: inherit; padding: 2px 6px; border: 1px solid var(--trait); border-radius: 5px; background: #fff; }
.question.multi { grid-template-columns: 1fr; }
.coches { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; }
details.repli { margin-top: 10px; } details.repli summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 12px; }
.manque { outline: 2px solid var(--alerte); outline-offset: 1px; border-radius: 4px; }

/* données */
.groupe { margin-bottom: 14px; }
.groupe h3 { font-size: 12px; margin: 0 0 6px; color: var(--accent); }
#donnees { padding-top: 0; }
table.grille { border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 12px; }
table.grille th { position: sticky; top: calc(var(--h-ancres, 0px) + var(--h-titre, 22px)); z-index: 2; background: var(--carte); text-align: left; font-weight: 600; color: var(--doux); padding: 4px 12px 4px 4px; border-bottom: 1px solid var(--trait); vertical-align: top; white-space: normal; line-height: 1.25; }
table.grille th .titre { display: block; font-weight: 500; color: var(--texte); font-size: 11.5px; }
table.grille th .sym { display: block; font: 10.5px var(--mono); color: var(--doux); margin-top: 2px; }
table.grille th, table.grille td.lib { overflow: hidden; }
table.grille td.lib { position: sticky; left: 0; background: var(--carte); z-index: 1; }
table.grille th.lib { left: 0; z-index: 3; }
.poignee { position: absolute; top: 4px; right: 0; width: 9px; bottom: 4px; cursor: col-resize; border-right: 2px solid var(--trait); }
.poignee:hover, .poignee:active { border-right-color: var(--accent); }
table.grille td { padding: 2px 3px; border-bottom: 1px solid #f0f2f5; }
table.grille td.lib { color: var(--texte); white-space: nowrap; text-overflow: ellipsis; padding-right: 8px; }
input.nombre { width: 100%; min-width: 0; font: 12px var(--mono); text-align: right; padding: 3px 5px; border: 1px solid var(--trait); border-radius: 4px; }
input.nombre:focus { border-color: var(--accent); outline: none; background: var(--accent-clair); }
.scalaire { display: grid; grid-template-columns: 1fr 130px; gap: 6px; align-items: center; padding: 2px 0; font-size: 12px; }

/* résultats */
/* volet Résultats : bandeau de synthèse fixe, explication en tableau (colonne Total puis une colonne par groupe), en-tête et libellés fixes au défilement */
#synthese { padding: 8px 12px; display: flex; flex-direction: column; gap: 6px; }
.tete-synthese { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.synthese { display: flex; flex-wrap: wrap; gap: 4px; align-items: stretch; }
.synthese .separation { width: 1px; background: var(--trait); margin: 2px 6px; }
.chiffre { all: unset; box-sizing: border-box; flex: 1 1 110px; display: flex; flex-direction: column; gap: 1px; padding: 4px 8px; border-radius: 6px; cursor: pointer; }
.chiffre:hover, .chiffre:focus-visible { background: var(--accent-clair); }
.chiffre .nom { display: block; color: var(--doux); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chiffre .nom::first-letter { text-transform: uppercase; }
.chiffre .val { font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; }
.chiffre .val .unite { font-size: 12px; font-weight: 500; color: var(--doux); margin-left: 4px; }
.badge-signal { border: 1px solid var(--trait); border-radius: 999px; padding: 2px 10px; font-size: 12px; background: var(--carte); cursor: pointer; white-space: nowrap; }
.badge-signal.aucun { color: var(--ok); cursor: default; } .badge-signal.info { color: var(--accent); border-color: var(--accent); }
.badge-signal.attention { color: #b54708; border-color: #fdb022; background: #fffaeb; } .badge-signal.alerte { color: var(--alerte); border-color: var(--alerte); background: #fef3f2; }
.liste-signaux { display: flex; flex-direction: column; gap: 4px; max-height: 22vh; overflow: auto; }
table.explication { border-collapse: separate; border-spacing: 0; font-size: 12.5px; min-width: 100%; }
table.explication th { position: sticky; top: 0; z-index: 2; background: var(--carte); font-weight: 600; text-align: right; padding: 6px 8px; border-bottom: 1px solid var(--trait); white-space: nowrap; vertical-align: bottom; }
table.explication th .sous { font-weight: 400; color: var(--doux); font-size: 11px; }
table.explication th.lib, table.explication td.lib { position: sticky; left: 0; z-index: 1; background: var(--carte); text-align: left; }
table.explication th.lib { z-index: 3; }
table.explication td { padding: 3px 8px; border-bottom: 1px solid #f0f2f5; }
table.explication td.lib { white-space: nowrap; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }
table.explication td.lib .bascule { display: inline-block; width: 16px; color: var(--doux); font-size: 10px; }
table.explication td.lib .sym { font-weight: 600; margin-right: 8px; } table.explication td.lib .int { color: var(--doux); }
table.explication td.mt { text-align: right; font: 12px var(--mono); white-space: nowrap; min-width: 84px; }
table.explication td.tot { font-weight: 600; }
table.explication tr.noeud { cursor: pointer; } table.explication tr.noeud:hover td { background: #f3f6fb; }
table.explication tr.racine td { border-top: 1px solid var(--trait); } table.explication tr.racine td.lib .sym { font-size: 13px; }
table.explication tr.zero td { color: #98a2b3; }
table.explication tr.choisi td { background: var(--accent-clair); }
table.explication tr.sous-ligne td { background: var(--accent-clair); padding: 4px 8px 8px 30px; }
.ligne-formule { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; position: sticky; left: 30px; max-width: 80vw; }
.ligne-formule code.formule { font: 12px var(--mono); white-space: normal; }
table.explication tr.sous-ligne table.comp { position: sticky; left: 30px; margin-top: 6px; max-width: 600px; }
ul.arbre, ul.arbre ul { list-style: none; margin: 0; padding-left: 16px; }
ul.arbre { padding-left: 0; }
.ligne { display: flex; align-items: center; gap: 6px; padding: 3px 6px; border-radius: 5px; cursor: pointer; }
.ligne:hover { background: var(--accent-clair); } .ligne.choisi { background: var(--accent-clair); box-shadow: inset 2px 0 0 var(--accent); }
.ligne .bascule { width: 14px; color: var(--doux); font-size: 10px; }
.ligne .sym { font-weight: 600; min-width: 120px; } .ligne .lib { color: var(--doux); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ligne .mt { font: 12px var(--mono); }
.zero .mt, .zero .sym { color: #a0a8b6; }

/* signalements */
.signal { padding: 6px 8px; border-left: 3px solid; margin-bottom: 6px; background: #fafbfc; border-radius: 0 5px 5px 0; }
.signal.alerte { border-color: var(--alerte); } .signal.attention { border-color: var(--attention); } .signal.info { border-color: var(--info); }

/* détail */
.formule { font: 12.5px/1.6 var(--mono); background: #f7f8fa; border: 1px solid var(--trait); border-radius: 6px; padding: 8px; white-space: pre-wrap; word-break: break-word; }
.meta { color: var(--doux); font-size: 12px; margin: 4px 0 10px; }
.export { margin: 4px 0 14px; padding: 12px 14px; border: 2px solid var(--accent); border-radius: 10px; background: var(--accent-clair); display: flex; flex-direction: column; gap: 8px; }
.export .titre { color: var(--accent); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.export .desc { font-size: 12.5px; color: var(--texte); }
.export button { align-self: flex-start; font-size: 14px; padding: 8px 16px; }
.export button:disabled { background: #d0d5dd; border-color: #d0d5dd; color: #475467; cursor: not-allowed; }
.export .meta { margin: 0; } .export .meta:empty { display: none; }
.export a.lien { align-self: flex-start; font-size: 12.5px; }
.export .remise { display: flex; flex-direction: column; gap: 4px; } .export .remise button { text-align: left; }
.export.inactif { border-style: dashed; border-color: var(--doux); background: #f7f8fa; } .export.inactif .titre { color: var(--doux); }
table.comp { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 8px; }
table.comp td { padding: 4px; border-bottom: 1px solid #f0f2f5; vertical-align: top; }
table.comp td.v { text-align: right; font-family: var(--mono); white-space: nowrap; }
.type { font-size: 10.5px; padding: 1px 5px; border-radius: 4px; background: #eef0f3; color: var(--doux); }
.type.calcul { background: var(--accent-clair); color: var(--accent); } .type.bareme { background: #fef0c7; color: #93370d; } .type.donnee { background: #dcfae6; color: #085d3a; }
a.lien { color: var(--accent); cursor: pointer; text-decoration: none; } a.lien:hover { text-decoration: underline; }

#pied { display: flex; gap: 28px; align-items: center; justify-content: center; font-size: 12px; background: var(--carte); border-top: 1px solid var(--trait); }
#pied a { color: var(--texte); text-decoration: none; } #pied a:hover { color: var(--accent); }

#voile { position: fixed; inset: 0; background: rgba(16, 24, 40, .45); display: grid; place-items: center; z-index: 10; }
.fenetre { background: #fff; border-radius: 10px; padding: 20px 22px; width: min(520px, 92vw); box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.fenetre h3 { margin: 0 0 10px; font-size: 16px; }
.fenetre .code-grand { font: 20px var(--mono); letter-spacing: .04em; background: var(--accent-clair); padding: 10px; border-radius: 8px; text-align: center; margin: 10px 0; }
.fenetre .boutons { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.fenetre input[type=text] { width: 100%; font: 15px var(--mono); padding: 8px; border: 1px solid var(--trait); border-radius: 6px; }
.erreur { color: var(--alerte); font-size: 12px; margin-top: 6px; }
.ancres { font-size: 12px; }
.ancres:empty { display: none; }
#donnees .groupe h3 { position: sticky; top: var(--h-ancres, 0px); left: 0; z-index: 5; background: var(--carte); margin: 0; padding: 12px 0 6px; box-shadow: -12px 0 0 var(--carte), 12px 0 0 var(--carte); width: var(--l-zone, auto); box-sizing: border-box; }
small.aide { display: block; color: var(--doux); font-size: 11px; line-height: 1.35; margin-top: 2px; }
.scalaire { align-items: start; padding: 4px 0; }
details.aide-grille { font-size: 11.5px; color: var(--doux); margin: 0 0 6px; } details.aide-grille summary { cursor: pointer; color: var(--accent); }
details.aide-grille ul { margin: 4px 0 0; padding-left: 16px; } details.aide-grille li { margin-bottom: 3px; }
p.consigne { font-size: 13px; line-height: 1.45; margin: 0 0 8px; max-width: 980px; }
.exemple-grille { margin: 0 0 10px; padding: 8px 10px; border: 1px dashed var(--accent); border-radius: 6px; background: var(--accent-clair); display: inline-block; max-width: 100%; overflow-x: auto; }
/* consigne, exemple et aide restent à gauche quand la grille défile en largeur */
.groupe > h3, .groupe > p.consigne, .groupe > .exemple-grille, .groupe > details.aide-grille, .groupe > ul.regles { position: sticky; left: 0; }
ul.regles { margin: 0 0 8px; padding: 6px 10px 6px 26px; max-width: 980px; color: #b42318; background: #fef3f2; border: 1px solid #fecdca; border-radius: 6px; font-size: 12.5px; }
.exemple-grille .titre-exemple { font-size: 11.5px; font-weight: 600; color: var(--accent); margin-bottom: 4px; }
.exemple-grille table { border-collapse: collapse; font-size: 12px; }
.exemple-grille th { text-align: left; font-weight: 600; padding: 2px 10px 2px 0; border-bottom: 1px solid var(--accent); white-space: nowrap; }
.exemple-grille td { padding: 2px 10px 2px 0; white-space: nowrap; }
.exemple-grille td.nb { text-align: right; font-variant-numeric: tabular-nums; }

/* lignes nommées par l'entreprise */
.ligne-entreprise { display: flex; align-items: center; gap: 4px; }
.nom-ligne { flex: 1; min-width: 0; font: inherit; padding: 3px 6px; border: 1px solid var(--trait); border-radius: 4px; background: transparent; color: inherit; }
.retirer { border: none; background: none; color: var(--doux); cursor: pointer; font-size: 15px; line-height: 1; padding: 2px 4px; }
.retirer:hover { color: var(--attention); }
.ajouter { border: 1px solid var(--accent); background: #fff; color: var(--accent); border-radius: 4px; cursor: pointer; font-size: 14px; line-height: 1; padding: 2px 6px; }
.ajouter:hover { background: var(--accent-clair); }
tr.ajout td { border-bottom: none; }
table.grille select.choix, table.grille input.texte { width: 100%; font: inherit; font-size: 12px; padding: 3px 4px; border: 1px solid var(--trait); border-radius: 4px; background: #fff; color: inherit; min-width: 0; }
.coches label { display: inline-flex; flex-direction: row; align-items: center; gap: 4px; white-space: nowrap; }
.question .coches input { width: auto; margin: 0; padding: 0; }
.variantes { margin: 6px 0; padding: 6px 0; border-top: 1px solid var(--trait); border-bottom: 1px solid var(--trait); }
.titre-variantes { font-size: 11.5px; color: var(--doux); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.variantes label.variante { display: flex; gap: 6px; align-items: flex-start; font-size: 12.5px; padding: 2px 0; }
.variantes label.variante.grise { color: var(--doux); }
.tab-variantes { border-collapse: collapse; margin: 0 0 10px; font-size: 12.5px; }
.tab-variantes th, .tab-variantes td { padding: 3px 10px; border-bottom: 1px solid #eef0f3; text-align: right; font-variant-numeric: tabular-nums; }
.tab-variantes th:first-child, .tab-variantes td:first-child { text-align: left; color: var(--doux); }
.tab-variantes td.ok { color: var(--ok); font-weight: 600; } .tab-variantes td.ko { color: var(--alerte); font-weight: 600; }
.ligne .mt { min-width: 110px; text-align: right; }
.ligne .mt.diff { font-weight: 650; }
.ligne.entete-col { cursor: default; color: var(--doux); font-size: 11.5px; } .ligne.entete-col:hover { background: none; }


/* pages compagnons : même dessin que la page de travail, fenêtres qui défilent */
body.compagnon { background: var(--fond); }
.compagnon a.marque { text-decoration: none; }
.compagnon h1.contexte { margin: 0; font-size: 14px; font-weight: 600; color: var(--texte); }
.compagnon a.bouton { text-decoration: none; display: inline-block; }
a.bouton.principal, .compagnon a.bouton.principal { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
#fenetres { display: grid; gap: 10px; padding: 10px; min-height: 0; }
.colonne { display: flex; flex-direction: column; gap: 10px; min-height: 0; min-width: 0; }
.colonne > .bloc { flex: 1 1 0; }
.compagnon .defile { font-size: 13px; line-height: 1.55; }
.compagnon .defile p { margin: 0 0 9px; } .compagnon .defile ul { margin: 0 0 9px; padding-left: 18px; } .compagnon .defile li { margin-bottom: 4px; }
.compagnon .defile section + section { margin-top: 14px; }
.compagnon .defile h3 { font-size: 12.5px; color: var(--accent); margin: 0 0 6px; }
.compagnon .defile a { color: var(--accent); }
table.liste { width: 100%; border-collapse: collapse; font-size: 12px; margin-bottom: 6px; }
table.liste th { position: sticky; top: -10px; background: var(--carte); text-align: left; font-weight: 600; color: var(--doux); padding: 5px 6px; border-bottom: 1px solid var(--trait); }
table.liste td { padding: 5px 6px; border-bottom: 1px solid #f0f2f5; vertical-align: top; overflow-wrap: break-word; }
table.liste td b { display: block; font-weight: 600; }
table.liste td code { display: block; font: 11px var(--mono); color: var(--doux); white-space: pre-wrap; }
table.liste td small { display: block; color: var(--doux); font-size: 11px; margin-top: 2px; }
table.liste td:first-child { min-width: 150px; }
.niv1 { padding-left: 12px; } .niv2 { padding-left: 24px; } .niv3 { padding-left: 36px; }
.niv2 b, .niv3 b { font-weight: 500; }
table.liste a { white-space: nowrap; }
.compagnon .groupe h3 { position: sticky; top: -10px; z-index: 2; background: var(--carte); padding: 4px 0; margin: 0; }
.compagnon .groupe table.liste th { top: 16px; }
.filtres { padding: 8px 12px; border-bottom: 1px solid var(--trait); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; flex: none; }
.filtres input[type=search] { flex: 1; min-width: 160px; font: inherit; padding: 5px 8px; border: 1px solid var(--trait); border-radius: 6px; }
.filtres .compte { color: var(--doux); font-size: 11.5px; }
.badges { display: flex; flex-wrap: wrap; gap: 4px; width: 100%; }
.badge { font-size: 11.5px; padding: 2px 8px; border-radius: 10px; border: 1px solid var(--trait); background: var(--carte); color: var(--texte); cursor: pointer; }
.badge.actif { background: var(--accent); border-color: var(--accent); color: #fff; }
.faq details { border-bottom: 1px dashed #e4e7ec; padding: 5px 0; }
.faq summary { cursor: pointer; color: var(--accent); font-weight: 500; }
.faq details p { margin: 5px 0 2px; }
@media (max-width: 900px) {
  body.compagnon { display: block; overflow: auto; height: auto; }
  body.compagnon #entete { min-height: 52px; flex-wrap: wrap; padding: 6px 12px; }
  #fenetres { display: block; } .colonne { display: block; } .colonne > .bloc { margin-bottom: 10px; max-height: 80vh; }
  body.compagnon #pied { flex-wrap: wrap; padding: 6px; gap: 8px 16px; }
}

ul.sessions { margin: 8px 0 12px; padding-left: 18px; line-height: 1.8; }
.nommer { display: flex; gap: 8px; margin-bottom: 8px; }
.nommer input, .fenetre .nommer input[type=text] { flex: 1; font: 14px var(--police); }
/* bouton de la session : seul élément de l'en-tête qui rétrécit (nom long coupé, complet dans l'infobulle) ; l'en-tête ne déborde jamais */
#jeton { min-width: 0; flex: 0 1 auto; }
#btn-sessions { flex: 0 1 auto; min-width: 70px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1499px) {                     /* écrans de 1 366 px : le bandeau tient sur une ligne */
  #entete { gap: 5px; padding: 0 8px; }
  #entete button, #entete .bouton { padding: 4px 6px; font-size: 12px; }
  .actions { gap: 3px; }
  .etiquette { font-size: 11px; }
  .code-session { gap: 4px; padding: 3px 3px 3px 7px; }
  .jeton code { padding: 3px 5px; font-size: 11.5px; }
  .langues a { padding: 3px 4px; }
}
/* calculs complémentaires (P) : lien en tête de colonne, Données fournies, panneau */
a.lien-p { display: inline-block; margin-top: 3px; font-size: 10.5px; font-weight: 600; color: var(--accent); cursor: pointer; border: 1px solid var(--accent); border-radius: 9px; padding: 0 6px; background: #fff; white-space: nowrap; }
a.lien-p:hover { background: var(--accent-clair); }
a.lien-p.lie { color: #fff; background: var(--accent); }
.scalaire a.lien-p { margin-left: 6px; }
td.fournie, span.fournie { color: var(--doux); font: 11px var(--mono); text-align: center; background: var(--accent-clair); border-radius: 4px; }
span.fournie { display: inline-block; padding: 4px 8px; }
td.sans-objet input, td.sans-objet select { background: #f0f2f5; color: var(--doux); }
.fenetre.large { width: min(1180px, 96vw); max-height: 92vh; overflow: auto; }
.fenetre.large h4 { margin: 14px 0 4px; font-size: 13px; }
.fenetre.large .groupe h3 { position: static; font-size: 12.5px; margin: 10px 0 4px; }
.fenetre.large .defile { overflow-x: auto; }
.fenetre.large table.comp.apercu { width: auto; min-width: 50%; }
.fenetre.large table.comp.apercu th { font-size: 11px; font-weight: 500; color: var(--doux); text-align: left; padding: 4px; max-width: 150px; vertical-align: top; }
.fenetre.large table.comp.apercu th:first-child, .fenetre.large table.comp.apercu td:first-child { text-align: left; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fenetre.large table.grille th { position: static; }
.fenetre.large { overflow-x: hidden; }
.fenetre.large table.grille input[type=text] { width: 100%; font: inherit; font-size: 12px; padding: 3px 4px; }
table.grille th .unite { display: block; font-size: 10.5px; color: var(--accent); margin-top: 1px; }
input.nombre::placeholder { color: #b4bcc8; font-style: italic; font-family: inherit; }
td.fournie, span.fournie { cursor: pointer; } td.fournie:hover, span.fournie:hover { color: var(--accent); text-decoration: underline; }
.bloc h2.avec-recherche { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 5px; padding-bottom: 5px; }
#filtre-donnees { width: 100%; font: 12px var(--sans, inherit); text-transform: none; letter-spacing: 0; padding: 3px 8px; border: 1px solid var(--trait); border-radius: 12px; color: var(--texte); background: #fff; }
#filtre-donnees.vide { border-color: var(--attention); }
.ancres a[hidden] { display: none; }
/* saisie unique d'un P (méthode…) : le champ à la largeur de ses choix, sous l'intitulé */
.scalaire.p { grid-template-columns: minmax(0, 1fr) auto; max-width: 900px; }
.scalaire.p select { width: auto; }
/* aperçu d'un P : un libellé long (nature d'exposition…) tient sur une ligne, entier au survol */
table.comp.apercu td.v { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.comp td.v.t { text-align: left; font-family: inherit; }
/* colonne « liste » : cases à cocher dans une liste ouverte par-dessus le tableau */
details.multi { position: relative; }
details.multi > summary { list-style: none; cursor: pointer; border: 1px solid var(--trait); border-radius: 6px; padding: 5px 8px; background: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; min-width: 120px; box-sizing: border-box; }
details.multi > summary::-webkit-details-marker { display: none; }
details.multi > summary::after { content: " ▾"; color: var(--doux); }
details.multi > summary.vide { color: var(--doux); }
details.multi .multi-choix { position: fixed; z-index: 60; background: #fff; border: 1px solid var(--trait); border-radius: 6px;
  box-shadow: 0 6px 18px #0002; padding: 6px 10px; max-height: 270px; overflow: auto; max-width: 620px; }
details.multi .multi-choix label { display: block; white-space: nowrap; padding: 3px 0; cursor: pointer; font-size: 13px; }
/* panneau d'un P : croix de fermeture dans le coin supérieur gauche, qui reste visible pendant le défilement */
.fenetre .fermer-haut { position: sticky; top: 0; height: 0; z-index: 30; }
.fenetre .fermer-fenetre { position: absolute; left: -12px; top: -6px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--trait);
  background: #fff; color: var(--texte); font-size: 20px; line-height: 26px; padding: 0; cursor: pointer; box-shadow: 0 2px 6px #0002; }
.fenetre .fermer-fenetre:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.fenetre h3.avec-croix { margin-left: 26px; }
/* page des add-ins : une fiche par add-in, mise en évidence quand on y arrive par un add-in lié */
article.addin { border: 1px solid var(--trait); border-radius: 8px; padding: 12px 16px; margin: 0 0 12px; background: var(--carte); scroll-margin-top: 12px; }
/* page Exemples : une fiche par exemple, chiffres clés en grille à deux colonnes */
article.exemple { border: 1px solid var(--trait); border-radius: 8px; padding: 12px 16px; margin: 0 0 12px; background: var(--carte); scroll-margin-top: 12px; }
article.exemple h3 { margin: 0 0 6px; }
article.exemple ul.groupes { margin: 6px 0; padding-left: 18px; columns: 2; }
article.exemple h4 { margin: 10px 0 4px; font-size: 13.5px; } article.exemple ul.lecons { margin: 4px 0 8px; padding-left: 18px; font-size: 13.5px; } article.exemple ul.lecons li { margin: 2px 0; }
#controle .lecons { margin: 2px 0 8px; } #controle .lecons details { font-size: 12.5px; background: var(--accent-clair); border-radius: 8px; padding: 6px 12px; margin-top: 4px; } #controle .lecons summary { cursor: pointer; font-weight: 600; } #controle .lecons ul { margin: 4px 0 2px; padding-left: 18px; } #controle .lecons li { margin: 2px 0; }
table.chiffres-exemple { border-collapse: collapse; font-size: 13px; margin: 4px 0 10px; }
table.chiffres-exemple th { text-align: left; font-weight: 400; color: var(--doux); padding: 2px 16px 2px 0; }
table.chiffres-exemple td { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; padding: 2px 0; }
article.addin h3 { margin: 0 0 8px; font-size: 15px; color: var(--accent); }
article.addin h4 { margin: 12px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--doux); }
article.addin ul.textes, article.addin ul.lies { margin: 0; padding-left: 18px; }
article.addin.eclaire { animation: eclaire 2.4s ease-out; }
@keyframes eclaire { 0% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 0 0 3px transparent; } }
/* collage d'un bloc copié d'un tableur : valeurs refusées, case par case */
.collage-refus { border: 1px solid #e3a008; background: #fff8e6; border-radius: 6px; padding: 6px 10px; margin: 6px 0; font-size: 12.5px; }
.collage-refus ul { margin: 4px 0 0; padding-left: 18px; }

/* bouton « Lancer le calcul » pendant le calcul : libellé et barre de progression */
#btn-lancer.en-cours { position: relative; cursor: progress; opacity: 1; padding-bottom: 10px; }
#btn-lancer .progression { position: absolute; left: 8px; right: 8px; bottom: 4px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.3); overflow: hidden; }
#btn-lancer .progression > span { display: block; height: 100%; width: 0; background: #fff; border-radius: 2px; }
#btn-lancer .progression.continue > span { width: 30%; animation: progression-continue 1.2s ease-in-out infinite; }
@keyframes progression-continue { from { transform: translateX(-100%); } to { transform: translateX(340%); } }

/* grille longue : ligne de dépliage sous les premières lignes */
tr.depli td { padding: 4px 6px; border-bottom: 1px solid #f0f2f5; }
tr.depli button.depli { background: none; border: none; padding: 2px 0; font: inherit; font-size: 12px; color: var(--accent); cursor: pointer; }
tr.depli button.depli:hover { text-decoration: underline; }
/* kit de bienvenue : exemples d'entreprises fictives */
.fenetre ul.exemples { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 8px; max-height: 60vh; overflow: auto; }
.fenetre ul.exemples li { border: 1px solid var(--trait); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.fenetre ul.exemples .nom { font-weight: 600; }
.fenetre ul.exemples li.voulu { border: 2px solid var(--accent); background: var(--accent-clair); }
.fenetre ul.exemples .description { font-size: 13px; color: var(--texte); }
.fenetre ul.exemples .meta { margin: 0; }
.fenetre ul.exemples button { align-self: flex-start; margin-top: 6px; }
/* aide des paramètres : « ? » à côté du libellé, texte court et lien vers la fiche */
.aide-p { display: inline-block; margin-left: 6px; width: 16px; height: 16px; line-height: 15px; text-align: center; border: 1px solid var(--accent); border-radius: 50%;
  color: var(--accent); font-size: 11px; font-weight: 700; cursor: pointer; background: #fff; padding: 0; vertical-align: middle; }
.aide-p:hover, .aide-p.ouvert { background: var(--accent); color: #fff; }
.aide-texte { font-size: 12px; color: var(--texte); background: var(--accent-clair); border-radius: 6px; padding: 6px 8px; margin: 2px 0 6px; }
.aide-texte a { color: var(--accent); }
.question .aide-texte { grid-column: 1 / -1; }
.ligne-variante { display: flex; align-items: flex-start; gap: 2px; } .ligne-variante .aide-p { margin-top: 3px; flex: none; }
article.addin details { margin-top: 8px; } article.addin details summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 12px; }
article.addin ul.lignes-qrt { margin: 6px 0 0; padding-left: 0; list-style: none; columns: 2 320px; column-gap: 18px; font-size: 12px; }
article.addin ul.lignes-qrt li { break-inside: avoid; margin-bottom: 2px; } article.addin ul.lignes-qrt b { font: 11px var(--mono); color: var(--doux); margin-right: 4px; }
.cal-mois { margin: 0 0 12px; } .cal-mois label { font-size: 13px; font-weight: 600; color: var(--texte); }
.cal-mois select { margin-left: 8px; font: inherit; font-weight: 400; padding: 4px 8px; border: 1px solid #d0d5dd; border-radius: 6px; background: #fff; }
article.echeance p.dates { margin: 4px 0; font-weight: 600; color: var(--accent); }
/* colonnes de champs (paramètres, données uniques) : lecture de haut en bas puis colonne suivante */
.colonnes-p { columns: 2 520px; column-gap: 28px; }
.colonnes-p > * { break-inside: avoid; }
.champ-p.dependante { padding-left: 16px; border-left: 2px solid var(--trait); }
.champ-p .aide-texte { margin: 2px 0 6px; }
#donnees .groupe { margin-bottom: 0; width: fit-content; min-width: 100%; }   /* aussi large que son tableau : titre et navigation collés à gauche au défilement en largeur */
#bloc-parametrage .defile { padding: 12px 16px; } #bloc-donnees .defile { padding: 0 16px 12px; }
@media (max-width: 900px) {
  .volet.saisie, #volet-controle { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
  .sommaire { max-height: 30vh; }
  .volets button { padding: 6px 10px; }
}

/* contours des tableaux de saisie : tableau encadré, titres de colonne cernés sur fond gris clair */
table.grille { border: 1px solid var(--cadre); border-radius: 6px; }
table.grille th { background: #f2f4f7; border-bottom: 2px solid var(--cadre); border-right: 1px solid var(--trait); padding: 6px 10px 6px 6px; }
table.grille th:last-child, table.grille td:last-child { border-right: none; }
table.grille td { border-right: 1px solid #eef0f3; }
table.grille td.lib { border-right: 1px solid var(--trait); }
table.grille tbody tr:last-child td { border-bottom: none; }

.nature-calcul { margin: 0 0 6px; font-weight: 600; color: #163b6d; }
/* bloc fermé tant que le bloc à compléter qui le précède ne l'est pas */
.sommaire a.ferme, #ancres-donnees a.ferme, #sommaire-parametres a.ferme { opacity: .45; cursor: not-allowed; }
/* clignotement d'une zone fautive (franchissement refusé, champ visé) ; « Suivant » retenu tant que le chapitre a un manque, cliquable */
@keyframes clignote { 0%, 100% { box-shadow: 0 0 0 0 rgba(180, 35, 24, 0); } 50% { box-shadow: 0 0 0 5px rgba(180, 35, 24, .45); background-color: #fde8e6; } }
.clignote { animation: clignote .32s ease-in-out 0s 4; }
.nav-chap button.retenu { opacity: .45; }
body.franchit, body.franchit * { cursor: progress !important; }

/* fenêtre des sessions : fichiers et autres jetons, sous les actions de session */
.fenetre .boutons.fichiers { justify-content: flex-start; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--trait); }
.fenetre .boutons.fichiers button { font-size: 12.5px; }
/* volet Export : états du classeur avant le téléchargement */
.etats-export { margin: 8px 0 4px; font-size: 12.5px; }
.etats-export summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.etats-export ul { margin: 6px 0 0; padding-left: 18px; columns: 2 380px; column-gap: 24px; }
.etats-export li { break-inside: avoid; margin: 1px 0; }
.etats-export li.hors { color: var(--texte); } .etats-export li.hors .motif { color: var(--doux); font-size: 12px; margin: 1px 0 4px; }
/* pied de page : une ligne, libellés jamais coupés, défilement horizontal si besoin ; sur téléphone, replié derrière « Pages » */
#pied { white-space: nowrap; overflow-x: auto; justify-content: safe center; gap: 16px; padding: 0 10px; }
#pied a { flex: none; }
#pied .pages { display: none; }
@media (max-width: 900px) {
  #entete { flex-wrap: wrap; row-gap: 4px; padding: 4px 8px; height: auto; }
  body:not(.compagnon) { grid-template-rows: auto minmax(0, 1fr) auto; }
  #travail { overflow-x: hidden; }
  .volets { overflow-x: auto; flex-wrap: nowrap; }
  .volets button { padding: 6px 8px; flex: none; }
  #entete .espace { display: none; }
  #pied .pages { display: inline-block; flex: none; font-size: 12px; padding: 3px 10px; }
  #pied.replie a { display: none; }
  #pied:not(.replie) { flex-wrap: wrap; white-space: normal; justify-content: center; gap: 6px 14px; padding: 6px; }
}

/* fenêtre des sessions : « Mes sessions » et « Bibliothèque d'exemples », deux blocs séparés */
.fenetre.large { width: min(1040px, 94vw); max-height: 90vh; overflow-y: auto; }
.deux-blocs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.deux-blocs > section { border: 1px solid var(--trait); border-radius: 10px; padding: 12px 14px; }
.deux-blocs h4 { margin: 0 0 6px; font-size: 14px; color: var(--accent); }
.deux-blocs .boutons { justify-content: flex-start; flex-wrap: wrap; }
.bibliotheque { background: var(--accent-clair); }
.bibliotheque ul.exemples { max-height: 56vh; overflow-y: auto; margin: 8px 0 0; padding: 0; }
.bibliotheque li .tete { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.bibliotheque li .tete button { flex: none; font-size: 12.5px; padding: 4px 10px; margin: 0; }
.bibliotheque ul.exemples li { background: #fff; }
.bibliotheque li .description { font-size: 12px; color: var(--doux); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 900px) { .deux-blocs { grid-template-columns: minmax(0, 1fr); } }

/* site frère : bouton du bandeau, lien du jumeau dans la bibliothèque */
#site-lie-tete { border: 1px solid var(--accent); color: var(--accent); background: #fff; font-weight: 600; text-decoration: none; padding: 5px 10px; border-radius: 6px; white-space: nowrap; font-size: 13px; }
#site-lie-tete:hover { background: var(--accent-clair); }
ul.exemples .jumeau { display: inline-block; margin-top: 4px; font-size: 12.5px; color: var(--accent); }

/* volet Export : remises non proposées, repliées sous leur titre */
.export .non-proposees { font-size: 12.5px; color: var(--doux); }
.export .non-proposees summary { cursor: pointer; font-weight: 600; }
.export .non-proposees ul { margin: 6px 0 0; padding-left: 18px; } .export .non-proposees li { margin: 3px 0; }
.export .non-proposees li b { color: var(--texte); font-weight: 600; }

/* recherche d'un champ dans les volets ouverts (bandeau) */
.recherche-globale { position: relative; margin-right: 6px; }
.recherche-globale input { width: 290px; padding: 5px 10px; border: 1px solid var(--trait); border-radius: 6px; font: inherit; font-size: 13px; background: #fff; }
.recherche-globale input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-clair); }
#recherche-liste { position: absolute; right: 0; top: calc(100% + 4px); z-index: 60; width: min(560px, 92vw); max-height: 70vh; overflow-y: auto; margin: 0; padding: 4px 0;
  list-style: none; background: #fff; border: 1px solid var(--trait); border-radius: 8px; box-shadow: 0 8px 24px rgba(16, 24, 40, .16); }
#recherche-liste li { padding: 6px 12px; cursor: pointer; border-bottom: 1px solid #f0f2f5; }
#recherche-liste li:last-child { border-bottom: 0; }
#recherche-liste li.choisi, #recherche-liste li:hover { background: var(--accent-clair); }
#recherche-liste li.aucun { cursor: default; color: var(--doux); background: none; font-size: 12.5px; }
#recherche-liste .chemin { font-size: 11.5px; color: var(--doux); }
#recherche-liste .nom { font-size: 13.5px; color: var(--texte); }
#recherche-liste .code { font-size: 12px; color: var(--accent); font-family: var(--mono); }
#recherche-liste .valeur { font-size: 12.5px; color: var(--texte); opacity: .8; }
@media (max-width: 1499px) { .recherche-globale input { width: 210px; } }
@media (max-width: 900px) {
  #entete .actions { flex-wrap: wrap; flex: 1 1 100%; justify-content: flex-end; }
  .recherche-globale { order: 10; flex: 1 1 100%; margin: 2px 0 0; } .recherche-globale input { width: 100%; }
  #recherche-liste { left: 0; right: 0; width: auto; }
}

@media (max-width: 700px) { article.exemple ul.groupes { columns: 1; } }
/* page d'un exemple : notions du lexique illustrées */
ul.notions { margin: 6px 0 10px; padding-left: 18px; } ul.notions li { margin: 3px 0; } ul.notions code { font-size: 12px; color: var(--doux); }
small.exemple { display: block; margin-top: 3px; }

/* schémas d'une ligne de l'explication */
table.explication td.lib { position: relative; }
table.explication td.lib .outils-ligne { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: inline-flex; gap: 4px; background: var(--carte); box-shadow: -10px 0 8px var(--carte); }
table.explication td.lib .outils-ligne:empty { display: none; }
table.explication td.lib .btn-schema, table.explication td.lib .btn-graphe { display: inline-flex; align-items: center; padding: 2px 4px; line-height: 0; color: var(--accent); background: var(--carte); border: 1px solid var(--trait); border-radius: 5px; opacity: .75; }
table.explication td.lib .btn-graphe svg { fill: currentColor; }
table.explication tr.noeud:hover .btn-graphe, table.explication tr.choisi .btn-graphe, table.explication .btn-graphe:focus { opacity: 1; border-color: var(--accent); }
.btn-graphe-tete { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 0 10px; padding: 3px 9px; font-size: 12.5px; font-weight: 600; color: var(--accent); background: var(--carte); border: 1px solid var(--accent); border-radius: 6px; vertical-align: middle; text-transform: none; letter-spacing: 0; }
.btn-graphe-tete svg { fill: currentColor; }
#fenetre.fenetre-graphe { width: min(1500px, calc(100vw - 32px)); height: calc(100vh - 32px); }
.fenetre-graphe .graphe-aide { flex: none; margin: 0 0 8px; }
.graphe-cherche { position: relative; flex: 1; min-width: 200px; }
.graphe-cherche input { width: 100%; box-sizing: border-box; font: inherit; font-size: 13px; padding: 4px 6px; }
.graphe-resultats { position: absolute; z-index: 5; left: 0; right: 0; top: 100%; background: var(--carte); border: 1px solid var(--trait); border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.12); max-height: 320px; overflow: auto; }
.graphe-resultats button { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--trait); border-radius: 0; white-space: normal; }
.graphe-resultats p { margin: 8px 10px; }
.graphe-corps { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 400px); grid-template-rows: minmax(0, 1fr); gap: 10px; }
.graphe-dessin { overflow: auto; overscroll-behavior: contain; border: 1px solid var(--trait); border-radius: 8px; background: #fbfcfd; min-height: 0; }
.graphe-dessin svg { display: block; }
.graphe-noeud { cursor: pointer; outline: none; }
.graphe-noeud:hover rect:first-child, .graphe-noeud:focus rect:first-child { filter: drop-shadow(0 2px 4px rgba(0,0,0,.18)); }
.graphe-fiche { overflow: auto; overscroll-behavior: contain; border: 1px solid var(--trait); border-radius: 8px; padding: 10px 12px; min-height: 0; overflow-wrap: anywhere; }
.graphe-fiche h4 { margin: 0 0 4px; font-size: 15px; }
.graphe-montant { font-size: 18px; font-weight: 700; margin: 6px 0; }
.graphe-montants { border-collapse: collapse; width: 100%; margin: 6px 0; font-size: 12.5px; }
.graphe-montants td { padding: 3px 4px; border-bottom: 1px solid var(--trait); }
.graphe-montants td.mt { text-align: right; white-space: nowrap; }
.graphe-montants tr.retenue td { font-weight: 700; }
.graphe-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.graphe-detail { border-top: 1px solid var(--trait); padding-top: 8px; }
@media (max-width: 900px) { .graphe-corps { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 40%); } }
table.explication td.lib .btn-schema svg { fill: currentColor; }
table.explication tr.noeud:hover .btn-schema, table.explication tr.choisi .btn-schema, table.explication .btn-schema:focus { opacity: 1; border-color: var(--accent); }
#fenetre.fenetre-schema { display: flex; flex-direction: column; max-height: calc(100vh - 32px); overflow: hidden; }
.fenetre-schema > h3, .fenetre-schema .schema-barre, .fenetre-schema .boutons { flex: none; }
.fenetre-schema .schema-barre { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin: 4px 0 10px; }
.fenetre-schema .schema-choix { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--doux); }
.fenetre-schema .schema-choix select { min-width: 18em; max-width: 56em; font-size: 13px; padding: 3px 6px; }
.fenetre-schema .schema-zone { flex: 1 1 auto; min-height: 0; overflow: auto; border: 1px solid var(--trait); border-radius: 8px; background: #fff; }
.fenetre-schema .schema-zone svg { display: block; width: 100%; height: auto; }
table.explication td.mt.refaite { font-style: italic; }
/* page Formation du résultat : graphe des formules (pages.js) */
.colonne:has(.formation) > .bloc { flex: none; max-height: 24vh; }
.colonne:has(.formation) > .bloc .defile { overscroll-behavior: contain; }
.colonne:has(.formation) > .bloc:has(.formation) { flex: 1 1 0; max-height: none; min-height: 0; }
@media (max-width: 900px) { .colonne:has(.formation) > .bloc:has(.formation) { height: 88vh; min-height: 0; } }
.bloc .defile:has(.formation), .defile > section:has(> .formation) { overflow: hidden; display: flex; flex-direction: column; flex: 1; min-height: 0; }
.formation { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 0; }
.formation-barre { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.formation-barre button { padding: 4px 9px; font-size: 12.5px; white-space: nowrap; }
.formation-barre label { display: flex; align-items: center; gap: 6px; color: var(--doux); font-size: 12px; }
.formation-barre select, .formation-barre input { font: inherit; padding: 4px 6px; border: 1px solid var(--trait); border-radius: 6px; max-width: 340px; }
.formation-cherche { position: relative; flex: 1; min-width: 180px; }
.formation-cherche input { width: 100%; box-sizing: border-box; max-width: none; }
.formation-resultats { position: absolute; z-index: 5; left: 0; right: 0; top: 100%; background: var(--carte); border: 1px solid var(--trait); border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.12); max-height: 320px; overflow: auto; }
.formation-resultats button { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--trait); border-radius: 0; white-space: normal; }
.formation-resultats p { margin: 8px 10px; }
.formation-legende { display: flex; flex-wrap: wrap; gap: 14px; color: var(--doux); font-size: 12px; }
.formation-legende i { display: inline-block; width: 14px; height: 10px; border: 2px solid; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.formation-corps { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 360px); grid-template-rows: minmax(0, 1fr); gap: 10px; flex: 1; min-height: 0; }
.formation-dessin { overflow: auto; overscroll-behavior: contain; border: 1px solid var(--trait); border-radius: 8px; background: #fbfcfd; min-height: 0; }
.formation-dessin svg { display: block; }
.formation-noeud { cursor: pointer; outline: none; }
.formation-noeud:hover rect:first-child, .formation-noeud:focus rect:first-child { filter: drop-shadow(0 2px 4px rgba(0,0,0,.18)); }
.formation-fiche { border: 1px solid var(--trait); border-radius: 8px; padding: 10px 12px; background: var(--carte); overflow: auto; overscroll-behavior: contain; min-height: 0; overflow-wrap: anywhere; }
.formation-fiche h3 { margin: 0 0 4px; font-size: 15px; }
.formation-fiche h4 { margin: 12px 0 4px; font-size: 12.5px; color: var(--doux); text-transform: uppercase; letter-spacing: .03em; }
.formation-fiche pre { white-space: pre-wrap; font: 12px/1.5 var(--mono); background: var(--accent-clair); padding: 8px; border-radius: 6px; margin: 0; }
.formation-fiche ul { margin: 0; padding-left: 18px; }
.formation-fiche code { font: 11.5px var(--mono); white-space: pre-wrap; }
.formation-liens a { display: inline-block; margin: 0 6px 4px 0; padding: 1px 7px; border: 1px solid var(--trait); border-radius: 10px; text-decoration: none; }
.formation-pastille { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }
@media (max-width: 900px) { .formation-corps { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 40%); } }
/* graphe des formules d'un exemple (seo.graphe_exemple) et accès au graphe de la session (Formation du résultat, lexique) */
.graphe-exemple { margin: 8px 0; overflow-x: auto; border: 1px solid var(--trait); border-radius: 8px; background: #fbfcfd; }
.graphe-exemple svg { display: block; width: 100%; height: auto; font-family: Inter, "Segoe UI", Arial, sans-serif; }
.gs-note { font-size: 11.5px; font-style: italic; fill: var(--doux); }
.gs-lien { fill: none; stroke: #c3c9d3; stroke-width: 1.2; }
.gs-fond { fill: #fff; stroke: var(--accent); stroke-width: 1.4; }
.gs-bord { fill: var(--accent); }
.gs-sym { font-size: 13px; font-weight: 700; fill: var(--accent); }
.gs-int { font-size: 12px; fill: var(--texte); }
.gs-mt { font-size: 13px; font-weight: 700; fill: var(--texte); }
.gs-nul .gs-fond { fill: #f2f4f7; stroke: var(--doux); }
.gs-nul .gs-bord { fill: var(--doux); }
.gs-nul .gs-sym, .gs-nul .gs-int, .gs-nul .gs-mt { fill: var(--doux); }
ul.formation-texte { font-size: 13px; }
ul.formation-texte ul { margin: 2px 0 4px; }
ul.formation-texte code { font-size: 12px; }
.formation-session { flex: none; margin: 0 0 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
small.graphe { display: block; margin-top: 2px; }
/* page Partenaires : mention de l'espace payant, cartes standard (partenaires.carte) */
.p-mention { margin: 0 0 12px; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--accent-clair); font-size: 13px; color: var(--doux); }
.partenaires { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.partenaire { border: 1px solid var(--trait); border-radius: 10px; padding: 14px 16px; background: var(--carte); display: flex; flex-direction: column; gap: 6px; }
.partenaire .p-tete { display: flex; gap: 12px; align-items: center; }
.partenaire .p-logo { width: 64px; height: 64px; object-fit: contain; flex: none; border-radius: 8px; border: 1px solid var(--trait); background: #fff; }
.partenaire .p-initiale { display: inline-flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 700; color: var(--accent); }
.partenaire h3 { margin: 0; font-size: 16px; }
.partenaire .p-accroche { margin: 2px 0 0; color: var(--doux); font-size: 13px; }
.partenaire p { margin: 0; }
.partenaire .p-badges, .defile .partenaire .p-badges { list-style: none; margin: 2px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.partenaire .p-badges li { font-size: 12px; padding: 2px 8px; border-radius: 10px; background: var(--accent-clair); color: var(--accent); }
.partenaire .p-liens { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; gap: 8px; }
.p-famille { margin: 18px 0 10px; font-size: 14px; color: var(--doux); text-transform: uppercase; letter-spacing: .04em; }

/* triangles de développement */
section.triangles { margin-top: 18px; }
section.triangles h3 { margin: 0 0 6px; font-size: 14px; }
.outils-triangles { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.defile-triangle { overflow-x: auto; }
table.explication.triangle td.futur { background: repeating-linear-gradient(135deg, transparent 0 6px, var(--trait) 6px 7px); }
table.explication.triangle tr.total td, table.explication.triangle tr.facteurs td { border-top: 1px solid var(--trait); font-weight: 600; }
table.explication.triangle tr.facteurs td { font-weight: 400; color: var(--doux); }

/* bibliothèque des calculs : chapitre « Calcul » des Paramètres, fenêtre « Changer de calcul », bandeau, exemples rangés par calcul */
.cartes-calcul { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; margin: 8px 0; padding: 2px; border-radius: 10px; }
.carte-calcul { border: 1px solid var(--trait); border-radius: 8px; padding: 10px 12px; background: var(--carte); display: flex; flex-direction: column; gap: 4px; }
.carte-calcul.courant { border: 2px solid var(--accent); background: var(--accent-clair); }
.carte-calcul .tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.carte-calcul h4 { margin: 0; font-size: 14px; }
.carte-calcul p { margin: 0; }
.carte-calcul dl { margin: 4px 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 3px 10px; font-size: 12.5px; }
.carte-calcul dt { color: var(--doux); font-weight: 600; }
.carte-calcul dd { margin: 0; }
.cartes-calcul.manque { outline: 2px solid var(--alerte); outline-offset: 2px; }
.famille-calcul { margin: 14px 0 2px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--doux); }
.carte-calcul.clause { border-left: 4px solid var(--accent); }
.carte-calcul details.fiche summary { cursor: pointer; color: var(--accent); font-size: 12.5px; }
.carte-calcul .cas-calcul { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 2px; }
.carte-calcul .cas-calcul button { font-size: 12px; padding: 3px 8px; }
.boutons-calculs { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.boutons-calculs .bouton { white-space: normal; text-align: left; }
.carte-calcul .boutons-carte { display: flex; gap: 6px; flex-shrink: 0; }
.carte-calcul .comment { background: var(--accent-clair); border-radius: 6px; padding: 6px 8px; margin: 2px 0; }
.carte-calcul .comment h5 { margin: 0 0 2px; font-size: 12.5px; color: var(--accent); }
.carte-calcul ol.etapes { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: 12px; counter-reset: etape; }
.carte-calcul ol.etapes li { counter-increment: etape; background: var(--carte); border: 1px solid var(--trait); border-radius: 5px; padding: 2px 7px; }
.carte-calcul ol.etapes li::before { content: counter(etape) ". "; color: var(--accent); font-weight: 600; }
.carte-calcul ol.etapes li:not(:last-child)::after { content: " →"; color: var(--doux); }
select.fixe { background: var(--accent-clair); cursor: not-allowed; }
.question:has(select.fixe) label::after { content: " \1F512"; font-size: 11px; }
.bibliotheque { max-height: 64vh; overflow-y: auto; }
.bibliotheque ul.exemples { max-height: none; overflow: visible; }
h5.calcul-exemples { margin: 12px 0 2px; font-size: 13px; color: var(--accent); }
/* page « Bibliothèque des calculs » : une fiche par calcul */
article.calcul { border: 1px solid var(--trait); border-radius: 8px; padding: 12px 16px; margin: 0 0 12px; background: var(--carte); scroll-margin-top: 12px; }
article.calcul:target { border: 2px solid var(--accent); }
article.calcul h3 { margin: 0 0 6px; }
article.calcul h4 { margin: 10px 0 2px; font-size: 13px; }
article.calcul p { margin: 4px 0; }
article.calcul dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 8px 0; }
article.calcul dt { color: var(--doux); font-weight: 600; }
article.calcul dd { margin: 0; }
article.calcul ul { margin: 2px 0 8px; padding-left: 18px; }
h3.famille-calcul { margin: 22px 0 8px; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--doux); }
article.calcul .comment { background: var(--accent-clair); border-radius: 6px; padding: 8px 12px; margin: 8px 0; }
article.calcul .comment h4 { margin: 0 0 4px; color: var(--accent); }
article.calcul ol.etapes { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: 13px; counter-reset: etape; }
article.calcul ol.etapes li { counter-increment: etape; background: var(--carte); border: 1px solid var(--trait); border-radius: 5px; padding: 2px 8px; }
article.calcul ol.etapes li::before { content: counter(etape) ". "; color: var(--accent); font-weight: 600; }
article.calcul ol.etapes li:not(:last-child)::after { content: " →"; color: var(--doux); }
article.calcul ul li { margin: 0; }
@media (max-width: 700px) { article.calcul dl { grid-template-columns: 1fr; } }

/* bandeau : bouton du calcul (point d'entrée), menu des calculs, panneau d'un calcul */
.zone-calcul { position: relative; flex-shrink: 1; min-width: 0; margin-right: 8px; }
.zone-calcul .bouton-calcul { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.zone-calcul .menu-calculs { display: none; position: absolute; top: 100%; left: 0; z-index: 50; min-width: 360px; max-width: 520px; padding: 6px;
  background: var(--carte); border: 1px solid var(--trait); border-radius: 8px; box-shadow: 0 6px 22px rgba(0, 0, 0, .14); }
.zone-calcul.ouvert .menu-calculs { display: block; }
.menu-calculs .famille { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--doux); margin: 8px 6px 2px; }
.menu-calculs button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 6px 8px; border-radius: 5px; font-size: 13.5px; }
.menu-calculs button:hover, .menu-calculs button:focus { background: var(--accent-clair); }
.menu-calculs button.courant { font-weight: 600; color: var(--accent); }
.menu-calculs .nombre { color: var(--doux); font-weight: 400; }
.question-choix { margin: 14px 0 8px; font-size: 15px; }
.panneau-calcul { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.panneau-calcul .choix { border: 1px solid var(--trait); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.panneau-calcul .tete-choix { display: flex; gap: 10px; align-items: flex-start; }
.panneau-calcul .numero { flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; display: flex;
  align-items: center; justify-content: center; }
.panneau-calcul h4 { margin: 2px 0 2px; }
.panneau-calcul .tete-choix .meta { margin: 0; }
.panneau-calcul .actions-choix { display: flex; flex-direction: column; gap: 6px; }
.panneau-calcul .actions-choix button { white-space: normal; text-align: left; }
.comment-replie summary { cursor: pointer; color: var(--accent); font-size: 13px; }
.comment-replie ol.etapes { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: 12px; counter-reset: etape; }
.comment-replie ol.etapes li { counter-increment: etape; background: var(--accent-clair); border-radius: 5px; padding: 2px 7px; }
.comment-replie ol.etapes li::before { content: counter(etape) ". "; color: var(--accent); font-weight: 600; }
@media (max-width: 800px) { .zone-calcul .bouton-calcul { max-width: 200px; } }
/* ------------------------------------------------------------ migration-tool : saisie du modèle */
.formulaire { display: flex; flex-direction: column; gap: 10px; max-width: 760px; margin: 0 0 14px; }
.champ { display: flex; flex-direction: column; gap: 3px; }
.champ .libelle { font-size: 12px; font-weight: 600; color: var(--doux); }
.champ input[type=text], .champ select, .champ textarea { font: inherit; padding: 5px 8px; border: 1px solid var(--trait); border-radius: 6px; background: #fff; color: var(--texte); }
.champ input[type=text]:focus, .champ select:focus, .champ textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-clair); }
.champ textarea { resize: vertical; }
.fenetre .champ input[type=text] { font: inherit; padding: 6px 8px; }
.fenetre .formulaire { max-width: none; }
table.grille.modele { table-layout: auto; width: 100%; margin: 0 0 10px; }
table.grille.modele th { position: sticky; top: 0; }
table.grille.modele td { padding: 5px 8px; vertical-align: top; }
table.grille.modele td.lib { position: static; white-space: normal; }
table.grille.modele td.desc { color: var(--doux); max-width: 380px; }
table.grille.modele td.mono { font: 12px var(--mono); }
table.grille.modele td.nb { text-align: right; font-variant-numeric: tabular-nums; }
table.grille.modele td.col-actions { white-space: nowrap; text-align: right; width: 1%; }
table.grille.modele td.col-actions button { padding: 1px 6px; font-size: 14px; border-color: transparent; }
table.grille.modele td.col-actions button:hover { border-color: var(--accent); }
table.grille.modele tr.manque td { background: #fef3f2; }
table.grille.modele tr.manque td.lib { box-shadow: inset 3px 0 0 var(--alerte); }
tr.manque { outline: none; }
.retrait { color: var(--doux); }
ul.signaux-ligne { list-style: none; margin: 3px 0 0; padding: 0; font-size: 11.5px; font-weight: 400; }
ul.signaux-ligne li.anomalie { color: var(--alerte); } ul.signaux-ligne li.information { color: var(--info); } ul.signaux-ligne li.a_documenter { color: var(--doux); }
.choix-doc { color: var(--attention); font-size: 12px; }
.pastille { display: inline-block; margin: 1px 6px 1px 0; padding: 1px 9px; border-radius: 10px; background: var(--accent-clair); color: var(--accent); font: 12px var(--mono); }
.sommaire .ajouter { margin-top: 4px; align-self: flex-start; }
.sommaire nav .ajouter { padding: 5px 9px; font-size: 12.5px; }
.boutons-ligne { display: flex; gap: 8px; align-items: center; }
#cible .groupe-p, #sources .groupe-p, #transformation .groupe-p, #resultats .groupe-p { margin-bottom: 18px; }
.groupe-p h4 { margin: 14px 0 4px; font-size: 12.5px; color: var(--accent); }
button.ajouter { font-size: 13px; padding: 5px 12px; line-height: 1.3; }
button.ajouter:disabled { opacity: .45; cursor: not-allowed; }
/* éditeur d'un bloc : cases des composants, refusées grisées avec leur motif */
.choix { display: flex; flex-direction: column; gap: 1px; max-height: 34vh; overflow-y: auto; border: 1px solid var(--trait); border-radius: 6px; padding: 6px 10px; background: #fff; }
.choix .case { display: block; font-size: 12.5px; padding: 2px 0; cursor: pointer; }
.choix .case.interdit { color: #98a2b3; cursor: not-allowed; }
.choix .motif { font-size: 11.5px; font-style: italic; }
.choix .groupe-choix { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--doux); margin: 6px 0 2px; }
.choix .groupe-choix:first-child { margin-top: 0; }
#travail.sans-session .volets, #travail.sans-session .volet { visibility: hidden; }
/* tableau d'administration (même disposition que sur les autres sites de l'éditeur) */
body.admin { display: block; overflow: auto; height: auto; background: var(--fond); }
#tete-admin { background: var(--accent); color: #fff; padding: 12px 24px; display: flex; justify-content: space-between; align-items: center; }
#tete-admin h1 { font-size: 18px; margin: 0; }
#tete-admin button { background: transparent; color: #fff; border-color: #ffffff88; }
#volets-admin { display: flex; gap: 8px; padding: 14px 24px 0; }
#volets-admin button { font-weight: 600; } #volets-admin button.actif { background: var(--accent); color: #fff; border-color: var(--accent); }
body.admin main { padding: 16px 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 16px; align-items: start; }
body.admin section { background: var(--carte); border: 1px solid var(--cadre); border-radius: 10px; padding: 14px 18px; }
body.admin h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--doux); margin: 0 0 10px; }
ul.controles { list-style: none; margin: 0; padding: 0; } ul.controles li { display: flex; gap: 8px; padding: 6px 0; border-bottom: 1px solid #eef0f3; font-size: 13px; }
ul.controles .ok { color: var(--ok); font-weight: 700; } ul.controles .ko { color: var(--alerte); font-weight: 700; }
ul.controles .conseil { color: #8a5a00; font-size: 12px; margin-top: 2px; }
.actions-admin { display: grid; grid-template-columns: max-content 1fr; gap: 10px 14px; align-items: center; }
.actions-admin button { padding: 8px 14px; } .actions-admin .meta { font-size: 12px; }
body.admin pre { background: #f7f8fa; border: 1px solid #eef1f4; padding: 8px; max-height: 280px; overflow: auto; white-space: pre-wrap; font-size: 12px; margin: 12px 0 0; }
body.admin pre.ko { color: var(--alerte); }
body.admin table { border-collapse: collapse; width: 100%; font-size: 12.5px; } body.admin td { padding: 5px 8px 5px 0; border-bottom: 1px solid #eef0f3; }
#connexion { max-width: 380px; margin: 80px auto; } #connexion input { width: 100%; box-sizing: border-box; padding: 8px; margin: 8px 0; font: inherit; border: 1px solid var(--trait); border-radius: 6px; }
#connexion .ko { color: var(--alerte); }
/* pages compagnons : une ou deux colonnes de fenêtres (classe posée par le générateur ; pas d'attribut style, refusé par la politique de sécurité) */
#fenetres.colonnes-1 { grid-template-columns: minmax(0, 1fr); } #fenetres.colonnes-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
#fenetres.colonnes-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tete-synthese .synthese { flex: 1; }
table.grille.modele.etroit { width: auto; min-width: 50%; }
/* titre du chapitre et ses boutons « Précédent » « Suivant » : fixés en haut du bloc de droite pendant le défilement */
.saisie .defile h3.titre-nav, #controle h3.titre-nav { position: sticky; top: -10px; z-index: 4; background: var(--carte); margin: -10px 0 6px; padding: 10px 0 8px; }
.saisie .defile table.grille.modele th { top: 34px; z-index: 3; }
.choix.composition { max-height: none; }
input.description { max-width: 760px; }
/* bouton de suppression de l'objet du chapitre, avec « Précédent » et « Suivant » */
.nav-chap button.supprimer { color: var(--alerte); border-color: #f1c8c4; background: #fff; margin-right: 6px; }
.nav-chap button.supprimer:hover { border-color: var(--alerte); }
/* BT : face-à-face des composants des sources et de la cible */
.face-a-face { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.face-a-face h4 { margin: 4px 0 6px; }
.sommaire .titre-sommaire.separe { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--trait); }
.pastille.lien { cursor: pointer; } .pastille.lien:hover { background: var(--accent); color: #fff; } .pastille.ko { background: #fef3f2; color: var(--alerte); }
p.totaux { font-weight: 600; margin: 4px 0 8px; } p.manque-texte { color: var(--alerte); }
#bloc-controle { min-height: 0; display: flex; flex-direction: column; } #controle .synthese { margin: 6px 0 10px; }
/* Contrôle : graphe sources → BT → cible → BC */
#controle .chiffre { cursor: default; } #controle .chiffre:hover { background: none; }
#controle .chiffre.partiel .val, #controle .chiffre.attention .val { color: var(--attention); } #controle .chiffre.ko .val { color: var(--alerte); }
.filtres-controle { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; font-size: 12.5px; margin: 4px 0 8px; }
.filtres-controle select { font: inherit; padding: 2px 6px; }
.cadre-graphe { overflow: auto; border: 1px solid var(--trait); border-radius: 8px; padding: 10px; background: #fff; }
svg.graphe { display: block; font-family: inherit; }
svg.graphe .tete { font-size: 12px; font-weight: 650; fill: var(--doux); }
svg.graphe .groupe { font-size: 11.5px; font-weight: 650; fill: var(--accent); cursor: pointer; } svg.graphe .groupe.attention { fill: var(--attention); }
svg.graphe .lien { fill: none; stroke: #9fb3cc; stroke-width: 1.3; transition: opacity .15s; }
svg.graphe .lien.allume { stroke: var(--accent); stroke-width: 2.2; } svg.graphe .lien.eteint { opacity: .12; }
svg.graphe .noeud { cursor: pointer; transition: opacity .15s; } svg.graphe .noeud.eteint { opacity: .25; }
svg.graphe .noeud rect { fill: #fff; stroke: #9fb3cc; stroke-width: 1.2; }
svg.graphe .noeud.bt rect, svg.graphe .noeud.bc rect { fill: var(--accent-clair); }
svg.graphe .noeud text { font-size: 12px; fill: var(--texte); pointer-events: none; }
svg.graphe .noeud.anomalie rect { stroke: var(--alerte); stroke-width: 2; fill: #fef3f2; } svg.graphe .noeud.anomalie .marque { fill: var(--alerte); }
svg.graphe .noeud.attention rect { stroke: var(--attention); stroke-width: 2; fill: #fffbeb; } svg.graphe .noeud.attention .marque { fill: var(--attention); }
svg.graphe .noeud:hover rect, svg.graphe .noeud:focus rect { stroke-width: 2.4; } svg.graphe .noeud:focus { outline: none; }
ul.legende { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0; margin: 8px 0; font-size: 12px; color: var(--doux); }
ul.legende li.anomalie::before, ul.legende li.attention::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; border: 2px solid; }
ul.legende li.anomalie::before { border-color: var(--alerte); background: #fef3f2; } ul.legende li.attention::before { border-color: var(--attention); background: #fffbeb; }
.a-regarder h4 { margin: 12px 0 4px; font-size: 13px; } .a-regarder ul { list-style: none; padding: 0; margin: 0; font-size: 12.5px; }
.a-regarder li { padding: 3px 0; } .a-regarder li.attention .pastille { border-color: var(--attention); color: var(--attention); }

/* audit de la session */
#controle .chiffre .plus-choix { display: block; font-size: 11px; color: var(--doux); }
#controle details.audit { border: 1px solid var(--trait); border-radius: 8px; padding: 8px 14px; margin: 4px 0 10px; background: #fff; font-size: 13px; }
#controle details.audit > summary { cursor: pointer; font-weight: 650; color: var(--accent); }
#controle details.audit section { margin-top: 8px; } #controle details.audit h4 { margin: 0 0 3px; font-size: 12.5px; }
#controle details.audit ul { margin: 0; padding-left: 18px; } #controle details.audit li { margin: 2px 0; line-height: 1.45; }
#controle details.audit a.lien { color: var(--accent); cursor: pointer; text-decoration: underline dotted; }
#controle .audit-corriger h4 { color: var(--alerte); } #controle .audit-confirmer h4, #controle .audit-choix h4 { color: var(--attention); }
#controle .audit-documenter h4 { color: var(--doux); } #controle .audit-ordre h4 { color: var(--ok); }
#controle details.audit .meta { margin: 8px 0 0; }

/* codes préfixés : préfixe imposé à gauche du champ ; préfixe discret à l'affichage */
.saisie-prefixe { display: flex; align-items: stretch; }
.saisie-prefixe .prefixe { display: flex; align-items: center; padding: 0 8px; border: 1px solid var(--trait); border-right: none; border-radius: 6px 0 0 6px;
  background: var(--accent-clair); color: var(--accent); font: 600 12.5px var(--mono); white-space: nowrap; }
.saisie-prefixe input { flex: 1; min-width: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.prefixe-code { color: var(--doux); font-weight: 400; }

/* deux niveaux d'onglets : On migre quoi / Comment on migre, puis leurs sous-onglets */
.groupes { display: flex; gap: 4px; flex: none; border-bottom: 2px solid var(--accent); }
.groupes button { display: flex; align-items: baseline; gap: 8px; padding: 8px 22px; border: 1px solid var(--cadre); border-bottom: none; border-radius: 9px 9px 0 0;
  background: var(--carte); font-weight: 700; font-size: 14.5px; color: var(--texte); margin-bottom: -2px; }
.groupes button .etat { font-weight: 500; font-size: 12px; color: var(--doux); }
.groupes button .etat.ko { color: var(--alerte); }
.groupes button.actif { background: var(--accent); border-color: var(--accent); color: #fff; } .groupes button.actif .etat { color: #fff; }
.groupes button.grise { background: #eef0f3; color: #98a2b3; cursor: not-allowed; }
.groupes button:not(.grise):not(.actif):hover { color: var(--accent); }
.volets button[hidden] { display: none; }
/* contraintes de la cible : sommaire, page d'un composant, graphe des vagues */
#sommaire-contraintes .sous-titre { margin: 10px 0 4px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--doux); }
#sommaire-contraintes a .n.a-faire { color: var(--attention); font-weight: 500; }
#contraintes .implicites, #contraintes .charge { font-size: 12.5px; color: var(--doux); margin: 4px 0 8px; }
#contraintes label.sans-dep { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; margin: 4px 0 8px; }
svg.graphe .lien.critique { stroke: var(--accent); stroke-width: 2.4; }
svg.graphe .lien.prepare { stroke-dasharray: 4 3; stroke: #b8c4d4; }
svg.graphe .noeud.critique rect { stroke: var(--accent); stroke-width: 2; }
svg.graphe .tete-vague { font-size: 12px; font-weight: 650; fill: var(--accent); }
svg.graphe .sous-tete { font-size: 10.5px; fill: var(--doux); }

/* bilan et leçons du séquencement : même présentation que l'audit */
#contraintes .lecons { margin: 2px 0 8px; } #contraintes .lecons details { font-size: 12.5px; background: var(--accent-clair); border-radius: 8px; padding: 6px 12px; margin-top: 4px; } #contraintes .lecons summary { cursor: pointer; font-weight: 600; } #contraintes .lecons ul { margin: 4px 0 2px; padding-left: 18px; } #contraintes .lecons li { margin: 2px 0; }
#contraintes details.audit { border: 1px solid var(--trait); border-radius: 8px; padding: 8px 14px; margin: 4px 0 10px; background: #fff; font-size: 13px; }
#contraintes details.audit > summary { cursor: pointer; font-weight: 650; color: var(--accent); }
#contraintes details.audit section { margin-top: 8px; } #contraintes details.audit h4 { margin: 0 0 3px; font-size: 12.5px; }
#contraintes details.audit ul { margin: 0; padding-left: 18px; } #contraintes details.audit li { margin: 2px 0; line-height: 1.45; }
#contraintes details.audit a.lien { color: var(--accent); cursor: pointer; text-decoration: underline dotted; }
#contraintes .audit-corriger h4 { color: var(--alerte); } #contraintes .audit-confirmer h4, #contraintes .audit-choix h4 { color: var(--attention); }
#contraintes .audit-documenter h4 { color: var(--doux); } #contraintes .audit-ordre h4 { color: var(--ok); }
#contraintes details.audit .meta { margin: 8px 0 0; }
/* contraintes des sources */
#contraintes_sources .carte-arrete { border: 1px solid var(--trait); border-radius: 8px; padding: 8px 14px; margin: 0 0 10px; background: #fff; }
#contraintes_sources h4 { margin: 14px 0 6px; }
#contraintes_sources td input.description { width: 100%; }
svg.graphe .arretes-vague { font-size: 11px; font-weight: 500; fill: var(--doux); }

#contraintes_sources details.audit { border: 1px solid var(--trait); border-radius: 8px; padding: 8px 14px; margin: 4px 0 10px; background: #fff; font-size: 13px; }
#contraintes_sources details.audit > summary { cursor: pointer; font-weight: 650; color: var(--accent); }
#contraintes_sources details.audit section { margin-top: 8px; } #contraintes_sources details.audit h4 { margin: 0 0 3px; font-size: 12.5px; }
#contraintes_sources details.audit ul { margin: 0; padding-left: 18px; } #contraintes_sources details.audit li { margin: 2px 0; line-height: 1.45; }
#contraintes_sources details.audit a.lien { color: var(--accent); cursor: pointer; text-decoration: underline dotted; }
#contraintes_sources .audit-corriger h4 { color: var(--alerte); } #contraintes_sources .audit-confirmer h4, #contraintes_sources .audit-choix h4 { color: var(--attention); }
#contraintes_sources .audit-documenter h4 { color: var(--doux); } #contraintes_sources .audit-ordre h4 { color: var(--ok); }
#contraintes_sources details.audit .meta { margin: 8px 0 0; }
#contraintes .audit-sources h4, #contraintes_sources .audit-sources h4 { color: var(--attention); }

/* page du comment qui restitue le quoi : lecture seule */
#contraintes .groupe-p.lecture-seule { background: #f6f7f9; border-radius: 8px; padding: 0 12px 12px; }
#contraintes .groupe-p.lecture-seule h3.titre-nav { background: #f6f7f9; }
#contraintes .vient-du-quoi { font-size: 12.5px; color: var(--doux); border-left: 3px solid var(--cadre); padding: 4px 10px; margin: 0 0 10px; background: #fff; }
#sommaire-contraintes a.lecture-seule { background: #f6f7f9; font-style: italic; }
