/* Facturation — feuille de style unique (aucun style en ligne : politique de sécurité du contenu stricte).
   Identité : encre et jaune de signalisation (RAL 1003), titres et montants en caractères de type DIN,
   statuts en voyants. Polices du système uniquement (aucune police téléchargée). */
:root {
  --encre: #16233a;
  --encre-2: #24375a;
  --papier: #f3f5f8;
  --blanc: #ffffff;
  --trait: #d5dbe5;
  --trait-fort: #aeb7c6;
  --texte: #1b2430;
  --texte-2: #586274;
  --signal: #f2c200;
  --signal-fonce: #c99f00;
  --vert: #1f7a45;
  --ambre: #a86f00;
  --rouge: #b42318;
  --fond-vert: #e8f4ec;
  --fond-ambre: #fdf3dc;
  --fond-rouge: #fbeceb;
  --din: "Bahnschrift", "DIN Alternate", "DIN 2014", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
  --corps: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --rayon: 6px;
}
* { box-sizing: border-box; }
html { font-size: 15px; }
body { margin: 0; background: var(--papier); color: var(--texte); font-family: var(--corps); line-height: 1.5; }
a { color: var(--encre-2); text-underline-offset: 2px; }
a:hover { color: var(--encre); }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--din); color: var(--encre); font-weight: 600; letter-spacing: .01em; line-height: 1.2; }
h1 { font-size: 1.85rem; margin: 0 0 .25rem; }
h2 { font-size: 1.3rem; margin: 1.8rem 0 .7rem; }
h3 { font-size: 1.05rem; margin: 1.2rem 0 .5rem; }
.chiffre, td.num, th.num, .montant { font-variant-numeric: tabular-nums; }
.lien-evitement { position: absolute; left: -9999px; }
.lien-evitement:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--signal); color: var(--encre); padding: .5rem 1rem; }

/* ---------------------------------------------------------------- cadre */
.cadre { display: grid; grid-template-columns: 228px 1fr; min-height: 100vh; }
.barre { background: var(--encre); color: #dfe6f1; padding: 1.2rem 0; display: flex; flex-direction: column; }
.marque { font-family: var(--din); font-size: 1.25rem; color: var(--blanc); padding: 0 1.2rem 1rem; text-decoration: none; display: block; }
.marque span { display: block; font-family: var(--corps); font-size: .78rem; color: #9fb0c8; margin-top: .15rem; }
.marque::after { content: ""; display: block; height: 3px; width: 36px; background: var(--signal); margin-top: .7rem; }
.nav { list-style: none; margin: .4rem 0; padding: 0; }
.nav a { display: block; padding: .5rem 1.2rem; color: #dfe6f1; text-decoration: none; border-left: 3px solid transparent; }
.nav a:hover { background: var(--encre-2); color: var(--blanc); }
.nav a[aria-current="page"] { border-left-color: var(--signal); background: var(--encre-2); color: var(--blanc); }
.nav-titre { color: #8193ad; font-size: .8rem; padding: 1rem 1.2rem .2rem; }
.barre-pied { margin-top: auto; padding: 1rem 1.2rem 0; font-size: .85rem; color: #9fb0c8; }
.barre-pied form { margin-top: .5rem; }
.barre-pied a { color: #dfe6f1; }
.bouton-lien { background: none; border: 0; padding: 0; color: #dfe6f1; text-decoration: underline; cursor: pointer; font: inherit; }
.principal { min-width: 0; }
.entete { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem 2rem;
          background: var(--blanc); border-bottom: 1px solid var(--trait); font-size: .9rem; color: var(--texte-2); }
.entete strong { color: var(--texte); }
.contenu { padding: 1.6rem 2rem 3rem; max-width: 1240px; }
.bandeau-demo { background: var(--signal); color: var(--encre); padding: .35rem 2rem; font-size: .88rem; }
.menu-mobile { display: none; }

/* ---------------------------------------------------------------- titres de page */
.titre-page { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.titre-page p { margin: .2rem 0 0; color: var(--texte-2); }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

/* ---------------------------------------------------------------- boutons */
.bouton { display: inline-flex; align-items: center; gap: .4rem; font: inherit; font-weight: 600; padding: .5rem .95rem;
          border-radius: var(--rayon); border: 1px solid var(--trait-fort); background: var(--blanc); color: var(--encre);
          text-decoration: none; cursor: pointer; line-height: 1.2; }
.bouton:hover { border-color: var(--encre-2); color: var(--encre); }
.bouton-principal { background: var(--encre); border-color: var(--encre); color: var(--blanc); }
.bouton-principal:hover { background: var(--encre-2); color: var(--blanc); }
.bouton-signal { background: var(--signal); border-color: var(--signal-fonce); color: var(--encre); }
.bouton-signal:hover { background: #ffd21f; color: var(--encre); }
.bouton-danger { color: var(--rouge); border-color: #e4b4ae; }
.bouton-danger:hover { border-color: var(--rouge); color: var(--rouge); }
.bouton-petit { padding: .3rem .6rem; font-size: .88rem; font-weight: 500; }
.bouton[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------------------------------------------------------------- messages */
.messages { list-style: none; padding: 0; margin: 0 0 1.2rem; }
.messages li { padding: .65rem 1rem; border-radius: var(--rayon); margin-bottom: .5rem; border: 1px solid; }
.messages .success { background: var(--fond-vert); border-color: #a9d6b8; color: #14532d; }
.messages .error { background: var(--fond-rouge); border-color: #efb5af; color: #7a1a12; }
.messages .info, .messages .warning { background: var(--fond-ambre); border-color: #ecd08e; color: #5c3d00; }

/* ---------------------------------------------------------------- surfaces */
.surface { background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 1.2rem 1.4rem; }
.surface + .surface { margin-top: 1.2rem; }
.grille-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.grille-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }

/* tableau de bord : relevé de compteurs */
.compteurs { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--trait); border-radius: var(--rayon);
             background: var(--blanc); margin-bottom: 1.6rem; }
.compteur { padding: 1rem 1.2rem; border-left: 1px solid var(--trait); text-decoration: none; color: inherit; }
.compteur:first-child { border-left: 0; }
.compteur .valeur { font-family: var(--din); font-size: 1.9rem; color: var(--encre); font-variant-numeric: tabular-nums; display: block; }
.compteur .libelle { color: var(--texte-2); font-size: .9rem; }
a.compteur:hover .valeur { text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 3px; }

/* ---------------------------------------------------------------- tableaux */
.tableau { width: 100%; border-collapse: collapse; background: var(--blanc); }
.tableau th { text-align: left; font-weight: 600; color: var(--texte-2); font-size: .85rem; padding: .55rem .7rem;
              border-bottom: 2px solid var(--trait-fort); white-space: nowrap; }
.tableau td { padding: .55rem .7rem; border-bottom: 1px solid var(--trait); vertical-align: top; }
.tableau tbody tr:hover { background: #f8f9fb; }
.tableau .num { text-align: right; white-space: nowrap; }
.tableau .vide { text-align: center; color: var(--texte-2); padding: 2rem; }
.tableau-cadre { border: 1px solid var(--trait); border-radius: var(--rayon); overflow-x: auto; background: var(--blanc); }
.tableau-cadre .tableau { border: 0; }
.secondaire { color: var(--texte-2); font-size: .88rem; }

/* voyants de statut */
.voyant { display: inline-flex; align-items: center; gap: .4rem; font-size: .88rem; white-space: nowrap; }
.voyant::before { content: ""; width: .62rem; height: .62rem; border-radius: 50%; background: var(--trait-fort); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.voyant-brouillon::before { background: var(--blanc); box-shadow: inset 0 0 0 2px var(--trait-fort); }
.voyant-emise::before { background: var(--vert); }
.voyant-annulee::before { background: var(--rouge); }
.voyant-a_qualifier::before { background: var(--ambre); }
.voyant-retard::before { background: var(--rouge); }
.voyant-solde::before { background: var(--vert); }
.voyant-partiel::before { background: var(--ambre); }
.voyant-du::before { background: var(--blanc); box-shadow: inset 0 0 0 2px var(--ambre); }
.champ-affectation { width: 7.5rem; text-align: right; font-variant-numeric: tabular-nums; }
.tranches { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--trait); border-radius: var(--rayon); background: var(--blanc); margin: 1rem 0 1.4rem; }
.tranches > div { padding: .9rem 1.1rem; border-left: 1px solid var(--trait); }
.tranches > div:first-child { border-left: 0; }
.tranches .valeur { font-family: var(--din); font-size: 1.5rem; color: var(--encre); display: block; font-variant-numeric: tabular-nums; }
.tranches .critique .valeur { color: var(--rouge); }
@media (max-width: 760px) { .tranches { grid-template-columns: 1fr 1fr; } .tranches > div:nth-child(3) { border-left: 0; } .tranches > div:nth-child(n+3) { border-top: 1px solid var(--trait); } }

/* ---------------------------------------------------------------- formulaires */
.filtres { display: flex; gap: .6rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1rem; }
.filtres input[type="search"] { min-width: 18rem; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .25rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="number"],
input[type="date"], select, textarea {
  font: inherit; width: 100%; padding: .48rem .6rem; border: 1px solid var(--trait-fort); border-radius: var(--rayon);
  background: var(--blanc); color: var(--texte); }
textarea { min-height: 4.5rem; }
input:focus, select:focus, textarea:focus { border-color: var(--encre-2); outline: 3px solid rgba(242, 194, 0, .55); outline-offset: 0; }
.champ { margin-bottom: 1rem; }
.champ .aide { color: var(--texte-2); font-size: .84rem; margin-top: .2rem; }
.champ .erreur, .erreurs-form { color: var(--rouge); font-size: .88rem; margin-top: .25rem; }
.erreurs-form { background: var(--fond-rouge); border: 1px solid #efb5af; padding: .6rem .9rem; border-radius: var(--rayon); margin-bottom: 1rem; }
.champ-invalide input, .champ-invalide select, .champ-invalide textarea { border-color: var(--rouge); }
.champs { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 1rem; }
.l-12 { grid-column: span 12; } .l-8 { grid-column: span 8; } .l-6 { grid-column: span 6; } .l-4 { grid-column: span 4; }
.l-3 { grid-column: span 3; } .l-2 { grid-column: span 2; }
.case { display: flex; gap: .5rem; align-items: center; font-weight: 500; }
.case input { width: auto; }
fieldset { border: 0; padding: 0; margin: 0 0 .5rem; }
legend { font-family: var(--din); font-size: 1.05rem; color: var(--encre); margin-bottom: .6rem; padding: 0; }
.radio-liste { list-style: none; padding: 0; margin: 0; }
.radio-liste label { font-weight: 500; display: flex; gap: .5rem; align-items: center; padding: .6rem .8rem; border: 1px solid var(--trait);
                     border-radius: var(--rayon); margin-bottom: .5rem; background: var(--blanc); }
.pied-form { display: flex; gap: .6rem; justify-content: flex-end; align-items: center; border-top: 1px solid var(--trait);
             padding-top: 1rem; margin-top: .5rem; }

/* ---------------------------------------------------------------- connexion */
.page-seule { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: var(--encre); }
.boite-connexion { width: 100%; max-width: 410px; background: var(--blanc); border-radius: var(--rayon); padding: 2rem 2rem 1.6rem;
                   border-top: 6px solid var(--signal); }
.boite-connexion h1 { font-size: 1.6rem; }
.boite-connexion .sous-titre { color: var(--texte-2); margin: 0 0 1.4rem; }
.boite-connexion .bouton { width: 100%; justify-content: center; padding: .65rem; margin-top: .4rem; }
.qr { display: block; margin: .5rem auto 1rem; width: 210px; height: 210px; border: 1px solid var(--trait); }
.secret { font-family: ui-monospace, Consolas, monospace; font-size: 1.05rem; letter-spacing: .06em; background: var(--papier);
          padding: .5rem .7rem; border-radius: var(--rayon); text-align: center; word-break: keep-all; word-spacing: .3em; }
.etapes { color: var(--texte-2); font-size: .9rem; padding-left: 1.2rem; }

/* ---------------------------------------------------------------- pièce : édition */
.lignes td { padding: .35rem .3rem; }
.lignes th { padding: .45rem .3rem; }
.lignes input, .lignes select { padding: .35rem .4rem; font-size: .92rem; }
.lignes .c-type { width: 7.5rem; } .lignes .c-designation { min-width: 16rem; } .lignes .c-qte { width: 5.5rem; }
.lignes .c-designation select { margin-bottom: .3rem; }
.lignes tr:not(.ligne-article) .champ-article { display: none; }
.lignes .c-unite { width: 7rem; } .lignes .c-pu { width: 7.5rem; } .lignes .c-remise { width: 5rem; }
.lignes .c-tva { width: 9rem; } .lignes .c-nature { width: 6.5rem; } .lignes .c-montant { width: 7rem; }
.lignes .c-outils { width: 5.5rem; white-space: nowrap; }
.lignes tr.ligne-texte .seul-chiffre { visibility: hidden; }
.lignes input[type="number"] { text-align: right; }
.lignes .montant-ligne { text-align: right; padding-top: .65rem; }
.outil { background: none; border: 1px solid transparent; border-radius: 4px; cursor: pointer; padding: .15rem .35rem; color: var(--texte-2); font: inherit; }
.outil:hover { border-color: var(--trait-fort); color: var(--encre); }
.ligne-erreur td { background: var(--fond-rouge); }

/* récapitulatif des montants : le bloc qui se lit en premier sur une pièce */
.bas-piece { display: grid; grid-template-columns: 1fr 360px; gap: 1.5rem; align-items: start; margin-top: 1.2rem; }
.totaux { border: 2px solid var(--encre); border-radius: var(--rayon); background: var(--blanc); }
.totaux table { width: 100%; border-collapse: collapse; }
.totaux td { padding: .45rem 1rem; font-variant-numeric: tabular-nums; }
.totaux td.num { text-align: right; }
.totaux tr.tva td { color: var(--texte-2); font-size: .9rem; padding-top: .15rem; padding-bottom: .15rem; }
.totaux tr.net td { background: var(--encre); color: var(--blanc); font-family: var(--din); font-size: 1.35rem; padding: .7rem 1rem; }
.totaux tr.net td.num { color: var(--signal); }
.totaux .note { padding: .5rem 1rem .7rem; color: var(--texte-2); font-size: .85rem; }
.meta-piece { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem 1.4rem; margin: 0; }
.meta-piece dt { color: var(--texte-2); font-size: .85rem; }
.meta-piece dd { margin: 0; font-weight: 600; }
.empreinte { font-family: ui-monospace, Consolas, monospace; font-size: .8rem; color: var(--texte-2); word-break: break-all; }
.confirmation { border-left: 6px solid var(--signal); }

/* ---------------------------------------------------------------- pagination */
.pagination { display: flex; gap: .4rem; align-items: center; margin-top: 1rem; color: var(--texte-2); font-size: .9rem; }

.etroit-seul { display: none; }

/* ---------------------------------------------------------------- écrans étroits */
@media (max-width: 900px) {
  .cadre { grid-template-columns: 1fr; }
  .barre { display: none; }
  .menu-mobile { display: block; background: var(--encre); color: var(--blanc); }
  .menu-mobile summary { padding: .8rem 1rem; cursor: pointer; font-family: var(--din); font-size: 1.1rem; }
  .menu-mobile .nav a { padding: .6rem 1rem; }
  .menu-mobile form { padding: .6rem 1rem 1rem; }
  .contenu { padding: 1rem; }
  .entete { padding: .6rem 1rem; flex-wrap: wrap; }
  .compteurs { grid-template-columns: 1fr 1fr; }
  .compteur:nth-child(3) { border-left: 0; }
  .compteur:nth-child(n+3) { border-top: 1px solid var(--trait); }
  .grille-2, .grille-3, .bas-piece { grid-template-columns: 1fr; }
  .champs > * { grid-column: span 12; }
  .meta-piece { grid-template-columns: 1fr 1fr; }
  .filtres input[type="search"] { min-width: 0; width: 100%; }
  .etroit-masque { display: none; }
  .etroit-seul { display: block; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.alerte { background: var(--fond-ambre); border: 1px solid #ecd08e; color: #5c3d00; padding: .55rem .85rem; border-radius: var(--rayon); }
details.surface > summary { cursor: pointer; font-family: var(--din); color: var(--encre); font-size: 1.05rem; }
details.surface[open] > summary { margin-bottom: 1rem; }
.lignes tr.ligne-supprimee td { opacity: .45; text-decoration: line-through; }
.lignes .c-outils .case { display: inline-flex; font-weight: 400; margin: 0; cursor: pointer; }
.liste-simple { margin: .6rem 0 0; padding-left: 1.1rem; }
.liste-simple li { margin: .2rem 0; }
.chronologie { list-style: none; margin: .6rem 0 0; padding: 0; border-left: 2px solid var(--trait); }
.chronologie li { padding: .15rem 0 .35rem .9rem; position: relative; }
.chronologie li::before { content: ""; position: absolute; left: -.4rem; top: .55rem; width: .62rem; height: .62rem; border-radius: 50%; background: var(--encre); }
.onglets { display: flex; gap: .3rem; border-bottom: 1px solid var(--trait); margin: 1rem 0; }
.onglets a { padding: .5rem .9rem; text-decoration: none; color: var(--texte-2); border-bottom: 3px solid transparent; }
.onglets a[aria-current="page"] { color: var(--encre); border-bottom-color: var(--signal); font-weight: 600; }
.compteurs-3 { grid-template-columns: repeat(3, 1fr); margin-top: 1rem; }
.compteur-alerte .valeur { color: var(--rouge); }
@media (max-width: 760px) { .compteurs-3 { grid-template-columns: 1fr; } .compteurs-3 .compteur { border-left: 0; border-top: 1px solid var(--trait); } .compteurs-3 .compteur:first-child { border-top: 0; } }

/* ================================================================ organisation de CPFactures (5.1) */
:root { --bleu-cpf: #0054a9; --bleu-cpf-fonce: #003f80; --rouge-cpf: #b82010; --jaune-ligne: #ffffcc; }
.bandeau-cpf { display: flex; align-items: center; gap: 1.2rem; padding: .45rem 1.2rem; background: var(--blanc);
               border-bottom: 1px solid var(--trait); font-size: .9rem; color: var(--texte-2); }
.bandeau-cpf .marque { font-family: var(--din); font-size: 1.35rem; color: var(--rouge-cpf); padding: 0; text-decoration: none; }
.bandeau-cpf .marque::after { display: none; }
.bandeau-utilisateur { margin-left: auto; color: var(--texte); font-weight: 600; }
.bandeau-date { white-space: nowrap; }
.barre-menus { background: var(--bleu-cpf); position: sticky; top: 0; z-index: 20; }
.menu-cpf { list-style: none; margin: 0; padding: 0 .6rem; display: flex; flex-wrap: wrap; align-items: stretch; }
.menu-cpf > li { position: relative; }
.menu-cpf .menu-direct, .menu-cpf summary { display: block; padding: .62rem .95rem; color: #fff; text-decoration: none; cursor: pointer;
  font-weight: 600; list-style: none; background: none; border: 0; font: inherit; font-weight: 600; }
.menu-cpf summary::-webkit-details-marker { display: none; }
.menu-cpf summary::after { content: " ▾"; font-size: .75em; opacity: .8; }
.menu-cpf .menu-direct:hover, .menu-cpf summary:hover, .menu-cpf details[open] > summary, .menu-cpf .menu-direct[aria-current],
.menu-cpf summary.menu-actif { background: var(--bleu-cpf-fonce); color: #fff; }
.menu-cpf summary.menu-actif, .menu-cpf .menu-direct[aria-current] { box-shadow: inset 0 -3px 0 var(--signal); }
.menu-cpf details > ul { list-style: none; margin: 0; padding: .35rem 0; position: absolute; top: 100%; left: 0; min-width: 19rem;
  background: var(--blanc); border: 1px solid var(--trait-fort); border-radius: 0 0 var(--rayon) var(--rayon);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .15); z-index: 30; }
.menu-cpf details > ul a { display: block; padding: .42rem 1rem; color: var(--texte); text-decoration: none; }
.menu-cpf details > ul a:hover, .menu-cpf details > ul a:focus { background: #eef3fb; color: var(--rouge-cpf); }
.menu-cpf .separateur { border-top: 1px solid var(--trait); margin: .3rem 0; }
.menu-cpf form { margin: 0; height: 100%; }
.menu-cpf .bouton-lien { text-decoration: none; height: 100%; }
.barre-menus .menu-mobile { display: none; }
.contenu { max-width: 1400px; margin: 0 auto; }
.pied-application { text-align: center; color: var(--texte-2); font-size: .8rem; padding: 1.2rem; }
@media (max-width: 900px) {
  .barre-menus .menu-large { display: none; }
  .barre-menus .menu-mobile { display: block; }
  .barre-menus .menu-mobile > summary { color: #fff; padding: .7rem 1rem; font-weight: 600; cursor: pointer; }
  .menu-mobile .menu-cpf { flex-direction: column; padding: 0 0 .6rem; }
  .menu-mobile .menu-cpf details > ul { position: static; box-shadow: none; border: 0; border-radius: 0; min-width: 0; background: #eef3fb; }
  .bandeau-cpf { flex-wrap: wrap; gap: .4rem 1rem; }
  .bandeau-utilisateur { margin-left: 0; }
}

/* listes et tableaux */
.tableau tbody tr.ligne-memo td { background: #d9d9d9; }
.tableau tbody tr.surligne td { background: var(--jaune-ligne); }
.tableau tfoot th, .tableau tfoot td { padding: .55rem .7rem; font-weight: 700; border-top: 2px solid var(--trait-fort); background: #f3f5f8; }
.tableau-compact td, .tableau-compact th { padding: .35rem .5rem; font-size: .9rem; }
.tableau th a { color: inherit; text-decoration: none; }
.tableau th a:hover { color: var(--rouge-cpf); }
.compteur-liste { color: var(--texte-2); margin: .6rem 0; font-weight: 600; }
.outils-ligne { white-space: nowrap; }
.outils-ligne form { display: inline; }
.outils-ligne .bouton { margin: 0 .15rem .15rem 0; }
.remisee { color: var(--rouge-cpf); }
td.echue { color: var(--rouge); font-weight: 700; }
.attente-banque { color: var(--ambre); font-weight: 600; white-space: nowrap; }
.date-banque-inline { display: inline-flex; gap: .3rem; align-items: center; }
.date-banque-inline input { width: 9.5rem; padding: .25rem .35rem; }
.cases-ligne, .radio-ligne > div, .radio-ligne ul { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.radio-ligne ul { list-style: none; margin: 0; padding: 0; }
.radio-ligne ul label, .radio-ligne > div > label { font-weight: 500; display: inline-flex; gap: .35rem; align-items: center; }
.radio-ligne input[type="radio"] { width: auto; }
.vide { color: var(--texte-2); }
.haut { border-top: 0; border-bottom: 1px solid var(--trait); padding: 0 0 1rem; margin: 0 0 1rem; }

/* accueil */
.accueil-cpf { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.accueil-cpf .surface { margin-bottom: 1rem; }
.accueil-cpf .surface + .surface { margin-top: 0; }
.accueil-cpf h2, .tableau-bord h2 { margin-top: 0; font-size: 1.12rem; color: var(--rouge-cpf); }
.ligne-bord { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem .2rem; border-bottom: 1px solid var(--trait);
  color: var(--texte); text-decoration: none; }
a.ligne-bord:hover { background: var(--jaune-ligne); }
.ligne-bord .montant { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.alerte-ligne .montant { color: var(--rouge); }

/* dossiers client */
.grille-dossiers { display: grid; grid-template-columns: minmax(0, 18rem) minmax(0, 1fr) minmax(0, 17rem); gap: 1.2rem; align-items: start; }
.colonne-dossiers h2, .colonne-historique h2 { margin-top: 0; }
.bloc-dossier { background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--rayon); padding: .7rem .9rem; margin-bottom: .9rem; }
.bloc-dossier header { display: flex; gap: .8rem; align-items: baseline; flex-wrap: wrap; }
.bloc-dossier header a { color: var(--texte); text-decoration: none; }
.bloc-dossier header .montant { margin-left: auto; font-weight: 700; }
.bloc-actif { border-color: var(--rouge-cpf); box-shadow: 0 0 0 2px rgba(184, 32, 16, .25); }
.bloc-actif header a { color: var(--rouge-cpf); }
.pastilles { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; padding: 0; margin: .5rem 0; align-items: center; }
.pastille { display: inline-block; min-width: 3rem; text-align: center; padding: .18rem .4rem; border-radius: 4px; font-size: .78rem; font-weight: 700;
  border: 1px solid var(--trait); color: #9aa3b1; background: #f1f3f6; cursor: not-allowed; text-decoration: none; }
.pastille.active { color: var(--bleu-cpf); border-color: var(--bleu-cpf); background: var(--blanc); cursor: pointer; }
.pastille.active:hover { background: var(--bleu-cpf); color: #fff; }
.actions-dossier { margin-left: auto; display: inline-flex; gap: .3rem; }
.actions-dossier form { display: inline; }
.carte-histo { background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--rayon); padding: .45rem .6rem; margin-bottom: .5rem; font-size: .9rem; }
.date-histo { margin: 0 0 .2rem; color: var(--texte-2); font-size: .8rem; }
.carte-histo p { margin: 0; }
.nouveau-dossier { margin-top: 1rem; border-top: 1px solid var(--trait); padding-top: 1rem; }
.identite-client p { margin: 0 0 .4rem; }
.identite-client .meta-piece { grid-template-columns: 1fr; gap: .4rem; }

/* gestion du dossier */
.lignes-dossier td { vertical-align: top; }
.lignes-dossier tr.ligne-en-cours td { background: var(--jaune-ligne); }
.lignes-dossier tr.ligne-ae td { color: var(--ambre); }
.legendes { font-size: .88rem; color: var(--texte-2); }
.form-ligne .separateur { margin: .2rem 0 .6rem; color: var(--texte-2); font-style: italic; border-top: 1px dashed var(--trait); padding-top: .5rem; }
.stock-produit { color: var(--bleu-cpf); font-weight: 600; margin: -.4rem 0 .6rem; }
.cadre-dossier { margin-top: 1.2rem; }
.totaux-dossier { font-size: 1.05rem; }
.logos-choix .choix-logo { display: inline-flex; flex-direction: column; align-items: flex-start; gap: .3rem; margin: 0 1rem .5rem 0; font-weight: 500; }
.logos-choix img { max-height: 3.2rem; max-width: 9rem; border: 1px solid var(--trait); padding: 2px; background: #fff; }
.logos-choix input { width: auto; }
.onglets-dossier { display: flex; flex-wrap: wrap; gap: .2rem; margin: 1.4rem 0 0; border-bottom: 2px solid var(--bleu-cpf); }
.onglets-dossier a { padding: .55rem 1.1rem; text-decoration: none; color: var(--texte-2); background: #e9eef6; border-radius: var(--rayon) var(--rayon) 0 0; }
.onglets-dossier a.genere { color: var(--texte); font-weight: 700; }
.onglets-dossier a.genere-avoir { color: var(--bleu-cpf); }
.onglets-dossier a[aria-current="page"] { background: var(--bleu-cpf); color: #fff; }
.onglets-actifs .onglet-dossier { display: none; }
.onglets-actifs .onglet-dossier.onglet-actif { display: block; border-top-left-radius: 0; }
#onglets .onglet-dossier { margin-top: 0; }
#onglets:not(.onglets-actifs) .onglet-dossier { margin-top: 1rem; }
.etat-document { background: #f6f8fb; border: 1px solid var(--trait); border-radius: var(--rayon); padding: .7rem .9rem; margin-bottom: 1rem; }
.etat-document p { margin: .2rem 0; }
.actions-document { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-top: .5rem; }
.bloc-reglements { margin-bottom: 1rem; }
.bloc-reglements h3 { display: flex; align-items: center; gap: .8rem; }
.bloc-reglements tr.solde td, .bloc-reglements tr.solde th { color: var(--rouge-cpf); }

/* options */
.liste-modeles ul { list-style: none; padding: 0; columns: 2; column-gap: 2rem; }
.liste-modeles li { break-inside: avoid; padding: .2rem 0; }
.liste-modeles label { font-weight: 500; display: flex; gap: .45rem; align-items: center; }
.liste-modeles input { width: auto; }
.apercu-logo { max-width: 100%; max-height: 6rem; border: 1px solid var(--trait); padding: 4px; background: #fff; margin-bottom: .8rem; }
.logo-emplacement form { margin-top: .6rem; }

@media (max-width: 1100px) { .grille-dossiers { grid-template-columns: minmax(0, 16rem) minmax(0, 1fr); } .colonne-historique { grid-column: 1 / -1; } }
@media (max-width: 900px) {
  .accueil-cpf, .grille-dossiers { grid-template-columns: minmax(0, 1fr); }
  .liste-modeles ul { columns: 1; }
  .actions-dossier { margin-left: 0; }
}

/* Formulaires d'une seule action (suppressions) dans les barres d'actions */
.actions form { display: inline; margin: 0; }
.pagination { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.pagination .choix-page { display: inline-flex; gap: .35rem; align-items: center; margin: 0; }
.pagination .choix-page select { width: auto; }
.legende-ae { color: #b45309; font-weight: 600; }
.quantite-pas { display: inline-flex; gap: .2rem; margin-left: .3rem; }
.quantite-pas button { min-width: 2rem; padding: .1rem .4rem; }
/* Accueil sur téléphone : tableaux défilants dans leur cadre, actions renvoyées à la ligne */
.accueil-cpf .tableau-cadre { border: 0; }
.accueil-cpf .outils-ligne { white-space: normal; }
@media (max-width: 640px) {
  .accueil-cpf .outils-ligne .bouton { margin-bottom: .2rem; }
  .ligne-bord { gap: .5rem; }
  .ligne-bord .montant { white-space: nowrap; }
}
.accueil-cpf > *, .grille-dossiers > * { min-width: 0; }

/* Texte riche des désignations (5.3) : barre de mise en forme et zone de saisie */
.barre-riche { display: flex; gap: .25rem; flex-wrap: wrap; margin-bottom: .25rem; }
.barre-riche .bouton-riche { min-width: 2.2rem; }
.barre-riche .bouton-riche-bold { font-weight: 700; }
.barre-riche .bouton-riche-italic { font-style: italic; }
.barre-riche .bouton-riche-underline { text-decoration: underline; }
.zone-riche { min-height: 4.5rem; padding: .48rem .6rem; border: 1px solid var(--trait-fort); border-radius: var(--rayon); background: var(--blanc); color: var(--texte); overflow-wrap: anywhere; }
.zone-riche:focus { border-color: var(--encre-2); outline: 3px solid rgba(242, 194, 0, .55); outline-offset: 0; }
.zone-riche ul, .zone-riche ol, .designation-riche ul, .designation-riche ol { margin: .2rem 0 .2rem 1.2rem; padding: 0; }
.zone-riche p, .designation-riche p { margin: 0; }
/* Listes longues : filtre de saisie (5.3) */
.filtre-liste { display: block; width: 100%; margin-bottom: .25rem; }
.filtre-liste[hidden], .lignes tr:not(.ligne-article) .filtre-liste { display: none; }
/* Options > Utilisateurs (5.3) */
.code-activation { font-size: 1.15rem; font-weight: 700; letter-spacing: .08em; padding: .1rem .4rem; background: var(--fond-ambre); }
.actions-compte { display: flex; gap: .5rem; flex-wrap: wrap; }
.action-sensible { margin-top: .8rem; padding-top: .6rem; border-top: 1px solid var(--trait); }
tr.inactif td { color: var(--texte-2); }
/* Mot de passe : œil pour afficher la saisie (5.3.1) */
.champ-mot-de-passe { position: relative; display: block; }
.champ-mot-de-passe input { width: 100%; padding-right: 2.6rem; }
.voir-mot-de-passe { position: absolute; right: .25rem; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center;
  justify-content: center; width: 2.1rem; height: 2.1rem; padding: 0; border: 0; border-radius: var(--rayon); background: transparent;
  color: var(--texte-2); cursor: pointer; }
.voir-mot-de-passe:hover, .voir-mot-de-passe[aria-pressed="true"] { color: var(--encre-2); background: var(--fond-ambre); }
/* Logo ELGESCo (fichier fourni, octets d'origine) : cadré sur le dessin, les marges blanches de l'image sont rognées */
.logo-elgesco { display: inline-block; object-fit: cover; object-position: 50% 52%; vertical-align: middle; }
.bandeau-cpf .logo-elgesco { width: 132px; height: 35px; margin-right: .6rem; }
.logo-connexion { display: block; width: 300px; max-width: 100%; height: auto; aspect-ratio: 300 / 80; margin: 0 auto 1rem; }


/* ---------------------------------------------------------------- tableau de bord de l'accueil (5.3.11)
   Palette validée (daltonisme compris) : bleu #2a78d6 pour l'exercice, orange #eb6834 pour l'année précédente ;
   couleurs de statut réservées à l'ancienneté des créances, toujours accompagnées de leur libellé. */
.tdb { margin-bottom: 1.4rem; }
.tdb-titre { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: .8rem; }
.tdb-titre h2 { margin: 0; font-size: 1.3rem; }
.tdb-titre p { margin: 0; }
.tdb-kpi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.kpi { background: var(--blanc); border: 1px solid var(--trait); border-top: 4px solid #2a78d6; border-radius: var(--rayon); padding: .9rem 1.1rem 1rem; }
.kpi-alerte { border-top-color: #d03b3b; }
.kpi p { margin: 0; }
.kpi-titre { font-size: .86rem; color: var(--texte-2); }
.kpi-valeur { margin: .3rem 0 .2rem !important; font-family: var(--din); font-size: 1.8rem; font-weight: 600; color: var(--encre); font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpi-unite { font-size: .85rem; font-weight: 400; color: var(--texte-2); }
.kpi-detail { font-size: .86rem; color: var(--texte-2); }
.voyant-retard { display: inline-block; width: 1.05rem; height: 1.05rem; border-radius: 50%; background: #d03b3b; color: #fff; font-weight: 700;
  font-size: .75rem; line-height: 1.05rem; text-align: center; }
.kpi-variation { margin-top: .4rem !important; font-size: .82rem; font-weight: 600; }
.kpi-variation span { font-weight: 400; color: var(--texte-2); }
.kpi-variation.hausse { color: var(--vert); }
.kpi-variation.baisse { color: var(--rouge); }
.kpi-variation.stable { color: var(--texte-2); }
.tdb-graphiques { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.tdb-g { margin: 0; min-width: 0; }
.tdb-g.large { grid-column: 1 / -1; }
.tdb-g + .tdb-g { margin-top: 0; }
.tdb-g h3 { margin: 0 0 .5rem; font-size: 1.02rem; }
.entete-graphique { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .4rem 1rem; }
.legende { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; margin: 0 0 .4rem; padding: 0; font-size: .86rem; color: var(--texte-2); }
.puce-serie { display: inline-block; flex: none; width: .8rem; height: .8rem; border-radius: 3px; margin-right: .4rem; vertical-align: -1px; }
.puce-serie.serie-1 { background: #2a78d6; }
.puce-serie.serie-2 { background: #eb6834; border-radius: 50%; }
.graphique { display: block; width: 100%; height: auto; }
.graphique .grille { stroke: #e6e9ef; stroke-width: 1; }
.graphique .grille.base { stroke: #aeb7c6; }
.graphique text { font-family: var(--corps); fill: var(--texte-2); font-size: 13px; }
.graphique .libelle, .graphique .valeur { fill: var(--texte); font-size: 14px; }
.graphique .valeur { font-weight: 600; font-variant-numeric: tabular-nums; }
.graphique .detail { fill: var(--texte-2); font-weight: 400; }
.graphique .serie-1 { fill: #2a78d6; }
.graphique .serie-neutre { fill: #b8c0cc; }
.graphique .serie-2-ligne { fill: none; stroke: #eb6834; stroke-width: 2; stroke-linejoin: round; }
.graphique .serie-2-point { fill: #eb6834; stroke: #fff; stroke-width: 2; }
.graphique .statut-bon { fill: #0ca30c; }
.graphique .statut-attention { fill: #fab219; }
.graphique .statut-serieux { fill: #ec835a; }
.graphique .statut-critique { fill: #d03b3b; }
.graphique .cible { fill: transparent; }
.graphique .cible:hover { fill: rgba(22, 35, 58, .05); }
.tdb-g details { margin-top: .5rem; font-size: .88rem; }
.tdb-g summary { cursor: pointer; color: var(--encre-2); }
@media (max-width: 1100px) { .tdb-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tdb-graphiques { grid-template-columns: minmax(0, 1fr); } }
.defile-x { overflow: visible; }
.defile-x .graphique { overflow: visible; }
@media (max-width: 560px) { .tdb-kpi { grid-template-columns: minmax(0, 1fr); } .defile-x .graphique text.axe { font-size: 28px; } }
@media print { .tdb details { display: none; } }

/* 5.3.12 : « Revoir l'animation », discret, en haut à droite */
.revoir-animation { display: inline-flex; align-items: center; justify-content: center; width: 1.7rem; height: 1.7rem;
  border: 1px solid var(--trait); border-radius: 50%; color: var(--texte-2); text-decoration: none; font-size: .7rem;
  flex: none; opacity: .7; }
.revoir-animation:hover, .revoir-animation:focus-visible { opacity: 1; color: var(--bleu-cpf); border-color: var(--bleu-cpf); }
.visuellement-cache { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* 5.3.13 : tableau de bord de pilotage (période bornée, comparatif, statistiques) */
.pilotage h1 { margin: 0; font-size: 1.4rem; }
.lien-pilotage { margin-left: auto; font-size: .88rem; }
.barre-pilotage { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: flex-end; padding: .8rem 1rem; margin: 0 0 1rem; }
.barre-pilotage label { display: flex; flex-direction: column; gap: .2rem; font-size: .82rem; color: var(--texte-2); }
.barre-pilotage select, .barre-pilotage input { min-height: 2.2rem; }
.pil-kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi-avant { margin: .3rem 0 0 !important; font-size: .78rem; color: var(--texte-2); line-height: 1.35; }
.tdb-g h2.h3 { margin: 0 0 .5rem; font-size: 1.02rem; }
.graphique .serie-1-ligne { fill: none; stroke: #2a78d6; stroke-width: 2.5; stroke-linejoin: round; }
.graphique .serie-1-point { fill: #2a78d6; stroke: #fff; stroke-width: 2; }
.graphique .serie-3-ligne { fill: none; stroke: #1baf7a; stroke-width: 2; stroke-dasharray: 6 4; stroke-linejoin: round; }
.graphique .serie-3-point { fill: #1baf7a; stroke: #fff; stroke-width: 2; }
.puce-serie.serie-3 { background: #1baf7a; border-radius: 50%; }
.suivi-commercial td { padding: .55rem .5rem; }
.suivi-commercial tr.a-suivre td:first-child a { font-weight: 600; }
.tdb-g .tableau .kpi-variation { margin: 0 !important; }
.petit { font-size: .78rem; }
@media (max-width: 1100px) { .pil-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .pil-kpi { grid-template-columns: minmax(0, 1fr); } .lien-pilotage { margin-left: 0; } }
@media print { .barre-pilotage { display: none; } }

/* 5.4.6 : accueil allégé, le chat zen à la place du graphique (indicateurs et graphiques : Tableau de bord) */
.accueil-zen { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 1.2rem; padding: .9rem 1.2rem; }
.accueil-zen picture { flex: none; line-height: 0; }
.accueil-zen .chat-zen { display: block; width: clamp(88px, 10vw, 132px); height: auto; border-radius: 50%; }
.accueil-zen-texte { min-width: 0; }
.accueil-zen-texte p { margin: 0 0 .3rem; }
.accueil-zen-titre { font-family: var(--din); font-size: 1.25rem; color: var(--rouge-cpf); }
.accueil-zen .lien-pilotage { display: inline-block; margin-top: .2rem; }
@media (max-width: 560px) {
  .accueil-zen { gap: .85rem; padding: .75rem .85rem; }
  .accueil-zen .chat-zen { width: 72px; }
  .accueil-zen-titre { font-size: 1.08rem; }
}
.alerte + .accueil-zen { margin-top: 1rem; }

/* 5.5.0 — suivi des dossiers (BL à facturer, ARC à livrer, Historique SAV) */
.suivi-dossiers .suivi-total { margin: .2rem 0 .6rem; }
.suivi-dossiers .suivi-liens { margin: .6rem 0 0; font-size: .92rem; }
.suivi-dossiers td { vertical-align: top; }
.etiquette-suivi { display: inline-block; padding: .05rem .4rem; border-radius: 999px; border: 1px solid var(--trait-fort);
  background: var(--fond-ambre); color: var(--texte); font-size: .74rem; line-height: 1.5; white-space: nowrap; }
.alerte-sav { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; justify-content: space-between;
  border-left: 4px solid var(--bleu-cpf); background: #eef4fb; }
.alerte-sav p { margin: 0; flex: 1 1 22rem; }
.barre-recherche-sav { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.barre-recherche-sav input { flex: 1 1 16rem; min-width: 0; font: inherit; padding: .5rem .7rem; border: 1px solid var(--trait-fort);
  border-radius: var(--rayon); background: var(--blanc); }
.barre-recherche-sav label { font-weight: 600; }

/* 5.5.0 — Mon travail du jour */
.pastille-travail { display: inline-block; min-width: 1.25rem; margin-left: .3rem; padding: 0 .35rem; border-radius: 999px; background: var(--blanc);
  color: var(--bleu-cpf); font-size: .72rem; font-weight: 700; line-height: 1.25rem; text-align: center; vertical-align: middle; }
.pastille-travail.nouvelle { background: var(--signal); color: var(--encre); }
.travail-section { margin-bottom: 1rem; }
.travail-section > summary { font-weight: 700; cursor: pointer; }
.taches { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.tache { border: 1px solid var(--trait); border-radius: var(--rayon); padding: .6rem .75rem; background: var(--blanc); }
.tache-nouvelle { border-left: 4px solid var(--signal); }
.tache-faite .tache-titre { text-decoration: line-through; color: #5b6573; }
.tache-titre { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.tache-meta, .tache-note { margin: .2rem 0 0; font-size: .88rem; color: #46505e; overflow-wrap: anywhere; }
.tache-actions { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; align-items: center; }
.tache-actions form { margin: 0; }
.tache-form-ligne { display: inline-flex; gap: .3rem; align-items: center; flex-wrap: wrap; }
.tache-form-ligne input, .tache-form-ligne select { width: auto; max-width: 100%; }
.tache-historique { margin-top: .4rem; font-size: .84rem; }
.tache-historique ul { margin: .3rem 0 0; padding-left: 1.1rem; }

/* 5.5.0 — aide (chat zen) : icône à droite de la barre bleue, panneau latéral, pages d'aide */
.barre-menus { display: flex; align-items: flex-start; }
.barre-menus > .menu-large, .barre-menus > .menu-mobile { flex: 1 1 auto; min-width: 0; }
.aide-bouton { flex: none; display: flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: 0 .9rem;
  color: #fff; text-decoration: none; }
.aide-bouton img { display: block; width: 30px; height: 30px; border-radius: 50%; background: var(--blanc); border: 2px solid rgba(255, 255, 255, .9); }
.aide-bouton:hover, .aide-bouton[aria-expanded="true"] { background: var(--bleu-cpf-fonce); }
.aide-bouton[aria-expanded="true"] { box-shadow: inset 0 -3px 0 var(--signal); }
.aide-panneau { position: fixed; top: 0; right: 0; bottom: 0; z-index: 40; width: min(27rem, 100vw); overflow-y: auto;
  overscroll-behavior: contain; background: var(--blanc); border-left: 1px solid var(--trait); box-shadow: -8px 0 28px rgba(22, 35, 58, .18);
  padding: 0 1.1rem 1.2rem; }
.aide-panneau[hidden] { display: none; }
.aide-entete { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: .75rem; margin: 0 -1.1rem; padding: .7rem 1.1rem;
  background: var(--bleu-cpf); color: #fff; }
.aide-entete h2 { margin: 0; font-size: 1.15rem; color: #fff; }
.aide-entete p { margin: 0; font-size: .82rem; color: #d7e4f5; }
.aide-entete-texte { flex: 1 1 auto; min-width: 0; }
.aide-mascotte { flex: none; border-radius: 50%; background: var(--blanc); }
.aide-entete .aide-mascotte { border: 2px solid rgba(255, 255, 255, .9); }
.aide-fermer { flex: none; width: 2.2rem; height: 2.2rem; border: 0; border-radius: var(--rayon); background: transparent; color: #fff;
  font-size: 1.6rem; line-height: 1; cursor: pointer; }
.aide-fermer:hover { background: var(--bleu-cpf-fonce); }
.aide-bulle { position: relative; margin: 1rem 0 .9rem; padding: .7rem .9rem; background: #eef3fb; border: 1px solid #cfdcf0;
  border-radius: 12px 12px 12px 3px; color: var(--encre); font-size: .93rem; }
.aide-form { display: flex; gap: .5rem; }
.aide-form input { flex: 1 1 auto; min-width: 0; font: inherit; padding: .5rem .65rem; border: 1px solid var(--trait-fort); border-radius: var(--rayon); }
.aide-form .bouton { flex: none; }
.aide-groupe h3, .aide-liste h3 { margin: 1.1rem 0 .35rem; font-size: .92rem; text-transform: uppercase; letter-spacing: .04em; color: var(--texte-2); }
.aide-groupe ul, .aide-liste ul, .aide-resultats-liste { list-style: none; margin: 0; padding: 0; }
.aide-groupe li, .aide-liste li, .aide-resultats-liste li { padding: .38rem 0; border-bottom: 1px solid #edf0f5; overflow-wrap: anywhere; }
.aide-groupe li a, .aide-liste li a { font-weight: 600; }
.aide-detail { display: block; color: var(--texte-2); font-size: .84rem; }
.aide-resultats-liste .aide-detail { display: inline; }
.aide-article h3 { margin: .4rem 0 .1rem; font-size: 1.15rem; }
.aide-famille { margin: 0 0 .6rem; color: var(--texte-2); font-size: .82rem; }
.aide-texte h3, .aide-texte h4 { font-size: 1rem; margin: 1rem 0 .3rem; }
.aide-texte ol, .aide-texte ul { padding-left: 1.3rem; }
.aide-texte li { margin: .25rem 0; }
.aide-texte code { background: #f1f3f7; padding: 0 .25rem; border-radius: 3px; }
.aide-note { padding: .55rem .8rem; border-left: 3px solid var(--signal); background: var(--fond-ambre); }
.aide-lien { background: none; border: 0; padding: 0; font: inherit; color: var(--encre-2); text-decoration: underline; cursor: pointer; }
.aide-retour { margin: 1rem 0 0; }
.aide-plein, .aide-pied { font-size: .85rem; }
.aide-pied { margin: 1.2rem 0 0; padding-top: .6rem; border-top: 1px solid var(--trait); }
.aide-intro { display: flex; gap: 1.2rem; align-items: flex-start; }
.aide-intro > div { flex: 1 1 auto; min-width: 0; }
.aide-form-page { max-width: 38rem; margin-top: .6rem; }
.aide-resultats-page { margin-top: 1.2rem; }
.aide-resultats-page h2 { margin-top: 0; }
.aide-colonnes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; margin-top: 1.2rem; }
.aide-colonnes .surface + .surface { margin-top: 0; }
.aide-colonnes h2 { margin-top: 0; }
.aide-sommaire { list-style: none; margin: 0; padding: 0; }
.aide-sommaire li { padding: .45rem 0; border-bottom: 1px solid #edf0f5; }
.aide-sommaire li a { display: block; font-weight: 600; }
.aide-article-page { max-width: 52rem; }
.aide-article-page h1 { margin-bottom: .8rem; }
.aide-fil { margin-bottom: .6rem; }
@media (max-width: 1100px) { .aide-colonnes { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) { .barre-menus { background: var(--encre); }
  .barre-menus .aide-bouton { position: absolute; top: 0; right: 0; min-height: 2.9rem; background: var(--encre); } .barre-menus .aide-bouton:hover, .barre-menus .aide-bouton[aria-expanded="true"] { background: var(--encre-2); } }
@media (max-width: 560px) { .aide-intro .aide-mascotte { width: 52px; height: 52px; } .aide-form .bouton { padding: .5rem .7rem; } }
@media print { .aide-bouton, .aide-panneau { display: none !important; } }

/* 5.5.0 — tableau de bord sur téléphone : les tableaux de chiffres détaillés défilent dans leur cadre (plus de débordement de page) */
@media (max-width: 700px) { .tdb-g { overflow-x: auto; } }

/* ===== 5.6.0 factures brouillon ===== */
.voyant-non_emise::before { background: var(--blanc); box-shadow: inset 0 0 0 2px var(--ambre); }
.champ-case label { display: flex; gap: .5rem; align-items: flex-start; font-weight: normal; }
.champ-case input[type=checkbox] { margin-top: .25rem; }
.actions-code { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .4rem 0; }
.actions-code form.envoi-code { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
@media print {
  body.impression-code * { visibility: hidden; }
  body.impression-code #code-activation, body.impression-code #code-activation * { visibility: visible; }
  body.impression-code #code-activation { position: absolute; left: 0; top: 0; width: 100%; }
  body.impression-code #code-activation .actions-code, body.impression-code #code-activation .petit { display: none; }
  body.impression-code #code-message { display: block !important; white-space: pre-wrap; font-family: inherit; }
}

/* ===== 5.6.0 SAV — SAV numérotés (rubrique Historique SAV, fiche, liens sur BL / ARC / dossier / client) ===== */
.voyant-sav-ouvert::before { background: var(--blanc); box-shadow: inset 0 0 0 2px var(--ambre); }
.voyant-sav-diagnostic::before, .voyant-sav-intervention::before { background: var(--ambre); }
.voyant-sav-attente_pieces::before { background: var(--rouge); }
.voyant-sav-resolu::before { background: var(--vert); }
.voyant-sav-cloture::before { background: var(--trait-fort); }
.barre-recherche-sav select { width: auto; flex: 0 0 auto; min-width: 12rem; }
.tableau td input[type="text"] { width: 100%; min-width: 4rem; }
.bloc-sav-lies { margin-top: 1rem; }
.bloc-sav-tete { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; justify-content: space-between; }
.bloc-sav-tete h2 { margin: 0; }
.liste-sav { list-style: none; margin: .6rem 0 0; padding: 0; }
.liste-sav li { padding: .35rem 0; border-bottom: 1px solid #edf0f5; display: flex; flex-wrap: wrap; gap: .3rem .6rem; align-items: center; }
.liste-sav li:last-child { border-bottom: 0; }
.ligne-sav { margin: .6rem 0 0; }
.grille-sav { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1.2rem; }
.grille-sav .surface + .surface { margin-top: 0; }
.historique-sav { list-style: none; margin: 0; padding: 0; }
.historique-sav li { padding: .6rem 0 .6rem .9rem; border-left: 3px solid var(--trait); margin-left: .3rem; }
.historique-sav li + li { border-top: 1px solid #edf0f5; }
.historique-sav li.evt-statut { border-left-color: var(--signal); }
.historique-sav li.evt-intervention, .historique-sav li.evt-piece_remplacee { border-left-color: var(--vert); }
.historique-sav p { margin: .15rem 0; }
.historique-sav .evt-tete { font-size: .92rem; }
.sav-modifier, .sav-ajout { margin-top: 1rem; }
.sav-modifier summary, .sav-ajout summary { cursor: pointer; font-weight: 600; }
.sav-document { margin-top: .8rem; }
.tableau td textarea { width: 100%; min-width: 12rem; min-height: 2.2rem; }
@media (max-width: 900px) { .grille-sav { grid-template-columns: minmax(0, 1fr); } }
/* 5.6.0 : libellé de statut long (brouillon à numéro réservé) : passe à la ligne sur téléphone */
.voyant-texte { white-space: normal; }
