/* SchoolInvest — UNE SEULE MAISON.
   Le système visuel de la maquette des profils (bibliotheque/schoolinvest-profils-
   maquette.html et systeme-visuel-reference.css, livrés le 27/09), intégré à
   l'espace réel : mêmes jetons, mêmes composants, mêmes classes. Clair seulement,
   comme la référence (color-scheme: light).
   Deux blocs ne sont PAS touchés : la connexion (#gate, .visuel, .gate-*) et la
   trame de setting (.trame-*). */
:root {
  --fond: #f3f5f8; --carte: #fff; --doux: #f8fafc; --bord: #dde4ee; --bord2: #edf1f6;
  --encre: #172238; --encre2: #62738c; --encre3: #7c8aa0;
  --accent: #234cd0; --accent-fond: #eaf0ff;
  --vert: #27765d; --vert-fond: #e7f4ee; --orange: #94651b; --orange-fond: #fff3dc;
  --rouge: #b04350; --rouge-fond: #fbecee; --neutre-fond: #edf0f4;
  --rail: #101e34; --rail-encre: #bfd0e7; --rail-survol: #253b54; --tuile-nuit: #172d50;
  --serie: #4265d6; --serie-pale: #dce5fc;
  color-scheme: light;
}
* { box-sizing: border-box; }
/* overflow-x: clip, pas hidden : hidden ferait du body un conteneur de défilement,
   et l'en-tête comme la barre basse cesseraient de coller. */
html, body { margin: 0; background: var(--fond); color: var(--encre); max-width: 100%; overflow-x: clip; }
body { font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; font-variant-numeric: tabular-nums; min-height: 100dvh; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 29px; line-height: 1.18; letter-spacing: -.8px; }
h2 { font-size: 18px; line-height: 1.3; letter-spacing: -.25px; }
h3 { font-size: 15px; line-height: 1.4; }
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #bb8d25; outline-offset: 3px; }
button:disabled { cursor: not-allowed; opacity: .55; }
code { font-size: 12px; }

/* ---------- connexion : le montage de SIA ---------- */
/* Trois couches sur le visuel : le voile bleu nuit, la photographie (servie par
   le projet), et un dégradé de secours en dernier — si l'image ne charge pas,
   l'écran reste présentable au lieu de virer au blanc. */
#gate { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100dvh; background: #fff; color: #172333; }
.visuel {
  background:
    linear-gradient(155deg, rgba(17,32,51,.62), rgba(15,76,129,.72)),
    url("../images/connexion.jpg") center/cover no-repeat,
    linear-gradient(155deg, #112033, #0f4c81);
  color: #fff;
}
.visuel-interieur { height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: 46px 48px; }
.gate-marque { font-weight: 700; font-size: 18px; letter-spacing: .3px; }
.gate-citation { margin: 0 0 18px; font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 3.4vw, 46px); line-height: 1.18; letter-spacing: -.5px; font-weight: 500; max-width: 17ch; }
.gate-pour { margin: 0; font-size: 16px; color: #dce5ef; max-width: 40ch; }
.gate-domaines { font-size: 11px; letter-spacing: 1.8px; text-transform: uppercase; color: #b8c8da; }
.gate-formulaire { display: flex; align-items: center; justify-content: center; padding: 46px 32px; background: #fff; }
.gate-contenu { width: 100%; max-width: 380px; }
.gate-contenu h1 { margin: 0 0 6px; font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  font-size: 34px; font-weight: 500; letter-spacing: -.5px; color: #172333; }
.gate-sous { margin: 0 0 24px; color: #607184; font-size: 15px; }
.gate-contenu label { color: #3c4b5c; font-weight: 600; font-size: 13px; }
.gate-contenu input { background: #fff; color: #172333; border-color: #c9d3df; }
.gate-bouton { display: block; width: 100%; margin-top: 20px; padding: 13px; border: 0; border-radius: 8px; background: #101f32; color: #fff;
  font-size: 15px; font-weight: 600; cursor: pointer; }
.gate-bouton:hover { background: #1b3150; }
.gate-lien { text-align: center; margin: 16px 0 0; font-size: 14px; }
.gate-lien a { color: #1740c9; }
.gate-filet { border: 0; border-top: 1px solid #e1e6ec; margin: 26px 0 16px; }
.gate-note { margin: 0; color: #607184; font-size: 13px; line-height: 1.6; }
.gate-contenu .message { font-size: 14px; }
@media (max-width: 860px) {
  #gate { grid-template-columns: 1fr; }
  .visuel-interieur { padding: 30px 24px 34px; gap: 44px; }
  .gate-citation { font-size: 30px; }
  .gate-domaines { display: none; }
  .gate-formulaire { padding: 28px 22px 44px; align-items: flex-start; }
}

/* La connexion reste telle qu'elle était : ses jetons et ses champs d'avant
   la maison commune sont figés ici, pour qu'aucune règle générale ne la change. */
#gate { --fond: #f6f7f9; --carte: #ffffff; --bord: #dfe6ed; --encre: #172333; --encre2: #607184; --encre3: #97a6b6;
  --accent: #1740c9; --accent-fond: #eaf0fd; --vert: #168975; --vert-fond: #e8f2ef; --rouge: #b42318; --rouge-fond: #fdeeec;
  line-height: 1.65; }
#gate h1 { line-height: 1.65; }
#gate label { display: block; font-size: 13px; margin: 12px 0 4px; }
#gate input { width: 100%; padding: 11px 12px; border: 1px solid #c9d3df; border-radius: 8px; font-size: 15px; min-height: 0; }
#gate .message { padding: 12px 15px; border-radius: 9px; margin: 10px 0; }
#gate .message.info { color: var(--encre); }

/* ===========================================================================
   LA MAISON — le système de schoolinvest-profils-maquette.html, intégré.
   Source : bibliotheque/systeme-visuel-reference.css (sha256 a4da5d52…), dont
   la portée .si-prototype est levée ici, règle par règle. Mêmes valeurs,
   mêmes classes. Ce qui n'est pas dans la référence (tableaux de Fabrice,
   pointage, graphiques, fonctionnement) est redessiné avec ses jetons.
   =========================================================================== */

/* ---------- ossature bureau (administration, sur ordinateur) ---------- */
.cadre { display: flex; min-height: 100dvh; }
.rail { width: 220px; flex-shrink: 0; background: var(--rail); color: #fff; padding: 28px 19px; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100dvh; overflow-y: auto; }
.marque { font-size: 17px; font-weight: 800; letter-spacing: 1px; }
.marque span { color: #82b6ff; }
.rail .liens { display: grid; gap: 7px; margin: 30px 0; }
.rail .liens a, .rail .liens button { border: 0; text-align: left; background: transparent; color: #bfd0e7; border-radius: 7px; padding: 12px; font-size: 14px; display: block; }
.rail .liens a:hover { background: var(--rail-survol); }
.rail .liens .actif { background: var(--accent); color: #fff; }
.rail .qui { color: #8fa5c2; margin-top: auto; font-size: 12px; font-weight: 400; }
.rail .qui a { color: #bfd0e7; display: block; margin-top: 6px; }
.rail .secondaires { display: grid; gap: 2px; margin: 0 0 18px; }
.rail .secondaires a { color: #8fa5c2; font-size: 12px; padding: 5px 12px; border-radius: 6px; }
.rail .secondaires a.actif { color: #fff; background: var(--rail-survol); }
.colonne { min-width: 0; flex: 1; }
.principal { padding: 26px 30px 36px; max-width: 1800px; margin: auto; }

/* ---------- l'en-tête du métier ---------- */
.haut-mobile { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 15px 22px; background: #fff;
  border-bottom: 1px solid var(--bord); position: sticky; top: 0; z-index: 4; min-height: 66px; }
.profil-mobile { display: flex; align-items: center; gap: 9px; }
.profil-mobile b { font-size: 13px; }
.profil-mobile small { display: block; color: var(--encre2); font-size: 11px; }
.avatar { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; background: #e8eef9; color: #3c5f9d;
  border-radius: 10px; font-size: 12px; font-weight: 750; flex-shrink: 0; }
.haut-droite { display: flex; align-items: center; gap: 8px; }
.lecture-seule { color: #526b8e; background: #edf2fa; border: 1px solid #dce5f2; border-radius: 30px; padding: 4px 9px; font-size: 10px; font-weight: 650; white-space: nowrap; }

/* ---------- l'application des métiers : une colonne de lecture ---------- */
.app { max-width: 500px; margin: 24px auto 38px; background: var(--fond); box-shadow: 0 12px 45px #132c4c12; border: 1px solid #d7e0ed;
  border-radius: 20px; overflow: clip; min-height: 800px; }
.app .principal { padding: 23px 18px 12px; }
.app .grille.deux, .app .grille.trois, .app .grille.graphe { grid-template-columns: 1fr; }
.app .haut-mobile { padding: 14px 17px; }

/* ---------- titres et textes ---------- */
.entete { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.entete h1 { margin: 0; }
.entete p, .entete .sous { margin-top: 7px; }
.sous, .discret { color: var(--encre2); font-size: 13px; }
.surtitre { font-size: 10px; letter-spacing: 1.7px; text-transform: uppercase; font-weight: 750; color: var(--encre2); margin-bottom: 9px; }
.surtitre small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.num, .montant { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- cartes ---------- */
.bloc { background: var(--carte); border: 1px solid var(--bord); border-radius: 10px; margin-bottom: 15px; overflow: hidden; }
.bloc > h2 { padding: 18px 19px 0; margin: 0; }
.bloc > h2 small { font-weight: 400; color: var(--encre2); font-size: 12px; margin-left: 6px; letter-spacing: 0; }
.corps { padding: 17px 19px; }
.corps > p + p { margin-top: 10px; }
.bloc-tete { display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 18px 19px 0; }
.bloc > .tableau-wrap, .bloc > .lignes, .bloc > .liste { margin-top: 12px; }
.catalogue { border-top: 3px solid #234cd0; }

/* ---------- LE chiffre qui domine : la tuile bleu nuit ---------- */
.dominant { background: var(--tuile-nuit); color: #fff; border-radius: 11px; padding: 23px; margin-bottom: 16px; }
.dominant .surtitre { color: #b4c8e7; }
.dominant b { display: block; font-size: 37px; letter-spacing: -1px; line-height: 1.2; margin: 9px 0; font-variant-numeric: tabular-nums; }
.dominant b:first-child { margin-top: 0; }
.dominant p, .dominant span { color: #c2d1e8; font-size: 13px; display: block; }
.dominant .b { margin-top: 17px; background: #fff; border: 0; color: #213f6a; }

/* ---------- les mesures secondaires ---------- */
.chiffres, .tuiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 17px; }
.chiffre, .tuile { border: 1px solid var(--bord); border-radius: 8px; background: #fff; padding: 13px; min-width: 0; }
.chiffre span, .tuile span { display: block; color: var(--encre2); font-size: 11px; }
.chiffre b, .tuile b { display: block; font-size: 24px; letter-spacing: -.5px; margin: 4px 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.chiffre em, .tuile em { display: block; font-style: normal; font-size: 11px; color: var(--encre2); }
.cadre .chiffres { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.hausse { color: var(--vert); } .baisse { color: var(--rouge); }

.grille { display: grid; gap: 16px; }
.grille.deux { grid-template-columns: 1fr 1fr; }
.grille.trois { grid-template-columns: repeat(3, 1fr); }
.grille.graphe { grid-template-columns: 3fr 2fr; }

/* ---------- boutons ---------- */
.b { display: inline-flex; align-items: center; justify-content: center; gap: 7px; background: #fff; color: #344c70; border: 1px solid #cfd9e7;
  border-radius: 7px; padding: 10px 13px; min-height: 44px; font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; }
.b.principal-b { background: var(--accent); color: #fff; border-color: var(--accent); }
.b.large { width: 100%; }
.b.petit { font-size: 12px; padding: 7px 10px; min-height: 0; }
.b.fantome { background: transparent; border-color: transparent; color: var(--accent); }
.b:disabled, .b[disabled] { cursor: not-allowed; opacity: .55; }
.actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.cadre .b { min-height: 34px; padding: 7px 12px; }
.cadre .b.large { padding: 10px 13px; }

/* ---------- états : un mot ET une couleur ---------- */
.p { display: inline-block; padding: 3px 7px; font-size: 11px; font-weight: 650; line-height: 1.5; border-radius: 5px; background: var(--neutre-fond); color: var(--encre2); white-space: nowrap; }
.p.ok { background: var(--vert-fond); color: var(--vert); }
.p.att { background: var(--orange-fond); color: var(--orange); }
.p.ko { background: var(--rouge-fond); color: var(--rouge); }
.p.info { background: var(--accent-fond); color: var(--accent); }

/* ---------- filtres ---------- */
.pastilles { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.pastilles .titre { font-size: 10px; letter-spacing: 1.7px; text-transform: uppercase; color: var(--encre2); font-weight: 750; margin-right: 4px; min-width: 76px; }
.pastille { background: #fff; border: 1px solid var(--bord); color: var(--encre2); border-radius: 6px; padding: 9px 12px; min-height: 44px; font-size: 12px;
  cursor: pointer; display: inline-flex; gap: 7px; align-items: center; white-space: nowrap; text-decoration: none; }
.pastille i { font-style: normal; font-size: 11px; color: var(--encre3); font-variant-numeric: tabular-nums; }
.pastille.allumee { background: #eaf0ff; color: #315ac2; border-color: #cbd8f4; }
.pastille.allumee i { color: #315ac2; }
.cadre .pastille { min-height: 34px; padding: 6px 11px; }
.pastille.mini { padding: 3px 10px; min-height: 30px; font-size: 12px; }
.pastille.defaut { border-style: dashed; border-color: #cbd8f4; color: #315ac2; background: #f5f8ff; }
.pastille[disabled] { cursor: default; opacity: .75; }

/* ---------- cartes dépliables ---------- */
details.ligne { border-top: 1px solid var(--bord2); }
details.ligne > summary { padding: 16px 19px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 56px; }
details.ligne > summary::-webkit-details-marker { display: none; }
details.ligne > summary::after { content: '+'; font-size: 18px; color: #8292a9; flex-shrink: 0; }
details.ligne[open] > summary::after { content: '−'; }
details.ligne[open] > summary { background: #fafbfd; }
.qui { font-weight: 650; font-size: 14px; min-width: 0; }
.qui small { display: block; color: var(--encre2); font-size: 12px; font-weight: 400; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; }
.detail { padding: 0 19px 19px; }
details.ligne[open] > .detail { padding-top: 14px; }
.quoi { color: var(--encre2); font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* Sur le bureau de Fabrice, les listes longues gardent leurs colonnes (--gabarit). */
.cadre .lignes[style*="--gabarit"] > details.ligne > summary, .cadre .entetes-lignes { display: grid; grid-template-columns: var(--gabarit) 18px; gap: 14px; }
.cadre .lignes[style*="--gabarit"] > details.ligne > summary .qui { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.entetes-lignes { display: none; padding: 10px 19px 6px; font-size: 10px; letter-spacing: 1.7px; text-transform: uppercase; color: var(--encre2); font-weight: 750; }
.entetes-lignes::after { content: ''; }
.app .quoi, .app .masque-mobile { display: none !important; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 9px 15px; font-size: 12px; margin: 13px 0; }
.kv dt { color: var(--encre2); }
.kv dd { margin: 0; text-align: right; }
.cadre .kv { font-size: 13px; }

/* ---------- listes ---------- */
.liste { list-style: none; padding: 0; margin: 0; }
.liste li { padding: 15px 19px; border-top: 1px solid var(--bord2); }
.l1 { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.l2 { color: var(--encre2); font-size: 12px; margin-top: 5px; }

/* ---------- champs ---------- */
label { display: block; font-size: 13px; color: #4b607b; font-weight: 600; margin: 16px 0 6px; }
input, select, textarea { width: 100%; border: 1px solid #c8d4e3; border-radius: 7px; padding: 12px; background: #fff; color: var(--encre); font-size: 16px; min-height: 46px; }
textarea { resize: vertical; min-height: 150px; line-height: 1.65; }
textarea.longue { min-height: 440px; }
input[type=checkbox], input[type=radio] { width: 19px; height: 19px; min-height: 0; flex-shrink: 0; accent-color: var(--accent); padding: 0; }
input[type=file] { padding: 10px; }
.case { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; font-size: 13px; line-height: 1.5; }
[aria-invalid=true] { border: 1px solid var(--rouge); background: #fffafb; }
.erreur-champ { color: var(--rouge); font-size: 12px; margin-top: 5px; }
.aide-champ { font-size: 12px; color: var(--encre2); margin-top: 6px; }
.recherche { max-width: 340px; }
.cadre input, .cadre select { font-size: 14px; min-height: 40px; padding: 9px 11px; }

/* ---------- messages, vide, chargement ---------- */
.message { padding: 13px; border-radius: 7px; margin: 13px 0; font-size: 13px; background: #edf2f8; color: var(--encre2); }
.message.ko { color: var(--rouge); background: var(--rouge-fond); }
.message.ok { color: var(--vert); background: var(--vert-fond); }
.message.info { background: var(--accent-fond); color: #385581; }
.vide { padding: 28px 20px; color: var(--encre2); font-size: 13px; text-align: center; }
.vide b { display: block; color: #284468; font-size: 18px; margin: 9px 0; }
.vide .sigle { margin: auto; width: 44px; height: 44px; background: #edf2fa; border-radius: 12px; color: #7290b6; font-size: 25px; display: grid; place-items: center; }
.chargement { padding: 24px 19px; color: #617792; }
.squelette { background: #e7edf5; border-radius: 6px; height: 14px; margin: 12px 0; }
.squelette.large { height: 110px; }
.non-mesure { color: var(--encre2); font-weight: 600; }
.chiffre b .non-mesure, .tuile b .non-mesure { font-size: 14px; letter-spacing: 0; }
.non-calc { display: grid; grid-template-columns: minmax(160px, 1fr) 2fr; gap: 8px 18px; font-size: 13px; }
.non-calc b { font-weight: 650; } .non-calc span { color: var(--encre2); }
.app .non-calc { grid-template-columns: 1fr; }

/* ---------- sauvegarde et éditeur ---------- */
.sauvegarde { font-size: 11px; color: var(--vert); display: inline-flex; gap: 5px; align-items: center; min-height: 22px; }
.sauvegarde.ko { color: var(--rouge); } .sauvegarde.att { color: var(--orange); }
.editeur-barre { position: sticky; top: 69px; z-index: 3; background: #f3f5f8ed; backdrop-filter: blur(8px); padding: 9px 0; display: flex; justify-content: space-between; align-items: center; gap: 8px; }

/* ---------- la barre basse ---------- */
.nav-bas { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: space-around; background: #fff; border-top: 1px solid var(--bord); padding: 6px 8px calc(7px + env(safe-area-inset-bottom)); }
.nav-bas a, .nav-bas button { background: none; border: 0; color: #72849e; font-size: 11px; min-height: 48px; min-width: 60px; padding: 5px 8px; border-radius: 6px;
  display: flex; flex-direction: column; align-items: center; gap: 3px; text-decoration: none; cursor: pointer; }
.nav-bas .actif { color: #234cd0; background: #edf2ff; font-weight: 650; }
.nav-bas .sym { font-size: 19px; line-height: 1.1; }
.pied { font-size: 11px; text-align: center; color: #7d8da3; padding: 21px 13px 26px; }
.pied b { color: #60738f; }

/* ---------- divers de la référence ---------- */
.lien-genere { border: 1px dashed #c9d7ea; background: #f5f8fd; padding: 12px; border-radius: 6px; font-size: 12px; overflow-wrap: anywhere; color: #48668f; }
.progression { height: 5px; background: #304768; border-radius: 4px; margin: 17px 0 10px; }
.progression span { height: 5px; background: #b4cdfb; display: block; border-radius: 4px; }
.date-live { border-left: 3px solid #8da9ec; padding-left: 12px; }
.date-live strong { display: block; font-size: 14px; }
.separation { border: 0; border-top: 1px solid var(--bord); margin: 18px 0; }
.manuel h2 { margin: 22px 0 8px; } .manuel h2:first-child { margin-top: 0; }
.manuel ul { padding-left: 20px; font-size: 14px; color: #546b88; } .manuel li { margin: 9px 0; }
.manuel p { font-size: 14px; color: #546b88; }
.notice-source { color: #7d8da4; font-size: 10px; margin: 10px 0 16px; }
.reference { padding: 14px 19px; background: #e9eef5; border: 1px solid #dce3ed; border-radius: 8px; font-size: 12px; margin: 17px 0; color: #586e8e; }
.reference b { color: #294770; }
.lien-discret { border: 0; background: none; color: var(--encre2); font-size: 12px; cursor: pointer; padding: 2px 0; text-decoration: underline; min-height: 0; }

/* ---------- panneau : latéral sur bureau, feuille sur téléphone ---------- */
.panneau-fond { position: fixed; inset: 0; background: #0c1d3d66; z-index: 40; display: flex; justify-content: flex-end; }
.panneau { background: #fff; width: min(520px, 100vw); max-height: 100dvh; overflow: auto; padding: 24px max(20px, env(safe-area-inset-right)) calc(30px + env(safe-area-inset-bottom));
  box-shadow: -8px 0 30px #0002; position: relative; }
.panneau .fermer { float: right; }
.panneau h2 { margin: 12px 0 20px; }
.panneau p { font-size: 14px; color: #536b87; margin: 13px 0; }

/* ---------- tableaux denses (bureau) ---------- */
table.dense { width: 100%; border-collapse: collapse; font-size: 13px; }
table.dense th { font-size: 10px; text-align: left; text-transform: uppercase; letter-spacing: .4px; color: #7a8ba3; background: #f8fafc; padding: 11px 15px; border-bottom: 1px solid var(--bord); white-space: nowrap; }
table.dense th.num { text-align: right; }
table.dense td { padding: 12px 15px; border-bottom: 1px solid var(--bord2); vertical-align: top; }
table.dense td.date { white-space: nowrap; }
table.dense tfoot td { font-weight: 700; border-top: 1px solid var(--bord); }
.tableau-wrap { overflow: auto; }
.tableau-pied { padding: 12px 19px 16px; color: var(--encre2); font-size: 12px; }

/* ---------- bandes de Fabrice : ce qui est cassé, ce qui attend ---------- */
.bande { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 19px; border-radius: 10px; margin-bottom: 15px; font-size: 14px; font-weight: 650; border: 1px solid; }
.bande.rouge { background: var(--rouge-fond); color: var(--rouge); border-color: #f1ccd1; cursor: pointer; }
.bande.vert { background: var(--vert-fond); color: var(--vert); border-color: #cfe6dc; }
.bande small { font-weight: 400; }
details.bande-decisions > summary { cursor: pointer; list-style: none; padding: 15px 19px; display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; }
details.bande-decisions > summary::-webkit-details-marker { display: none; }
details.bande-decisions > summary::after { content: 'Voir'; margin-left: auto; color: var(--accent); font-size: 13px; }
details.bande-decisions[open] > summary::after { content: 'Replier'; }
.decisions details.ligne.cout1 > summary { box-shadow: inset 3px 0 0 var(--rouge); }
.decisions details.ligne.cout2 > summary { box-shadow: inset 3px 0 0 var(--orange); }
.decisions details.ligne.cout3 > summary { box-shadow: inset 3px 0 0 var(--encre3); }

/* ---------- pointage ---------- */
.pointage-ligne { display: grid; grid-template-columns: 92px minmax(0,1.3fr) minmax(0,1.3fr) auto 150px; gap: 16px; align-items: center; padding: 13px 19px; border-top: 1px solid var(--bord2); }
.pointage-ligne.confirme { background: #fbfdfc; }
.pointage-ligne .qui b { display: block; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pointage-ligne small { display: block; color: var(--encre2); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.pointage-ligne .quoi { font-size: 13px; color: var(--encre); }
.pointage-ligne .roles { display: grid; grid-template-columns: auto auto; gap: 5px 8px; align-items: center; }
.pointage-ligne .role-nom { font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--encre2); font-weight: 750; }
.pointage-ligne .choix { display: flex; gap: 4px; flex-wrap: wrap; }
.pointage-ligne .etat { text-align: right; }
.app .pointage-ligne { grid-template-columns: 1fr; gap: 8px; } .app .pointage-ligne .etat { text-align: left; }

/* ---------- graphiques : une série, une teinte ---------- */
.graphe-svg { width: 100%; height: auto; display: block; }
.graphe-svg .grille-axe { stroke: var(--bord2); stroke-width: 1; }
.graphe-svg .axe { fill: var(--encre3); font-size: 11px; }
.graphe-svg .etiq { fill: var(--encre2); font-size: 11px; font-variant-numeric: tabular-nums; }
.graphe-svg .barre { fill: var(--serie); }
.graphe-svg .barre.partiel { fill: url(#hachure); }
.graphe-svg .cible { fill: transparent; }
.graphe-svg g:hover .barre { opacity: .8; }
.bulle { position: fixed; pointer-events: none; background: var(--rail); color: #fff; border-radius: 7px; padding: 7px 10px; font-size: 12px; z-index: 50; display: none; white-space: nowrap; }
.repart .ligne-r { display: grid; grid-template-columns: minmax(120px, 1.3fr) 3fr; gap: 12px; align-items: center; padding: 6px 0; }
.repart .nom { font-size: 13px; line-height: 1.35; }
.repart .nom small { display: block; color: var(--encre2); font-size: 11px; }
.repart .piste { height: 20px; position: relative; }
.repart .rempli { height: 100%; background: var(--serie); border-radius: 0 4px 4px 0; min-width: 2px; }
.repart .val { position: absolute; top: 0; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- fonctionnement ---------- */
.chaine { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; counter-reset: etape; }
.app .chaine { grid-template-columns: 1fr 1fr; }
.etape { background: #fff; border: 1px solid var(--bord); border-radius: 8px; padding: 13px; }
.etape.auto { border-top: 3px solid var(--accent); } .etape.humain { border-top: 3px solid var(--orange); } .etape.mixte { border-top: 3px dashed var(--accent); }
.etape.bloque { border-color: var(--rouge); }
.etape h3 { margin: 0 0 6px; font-size: 13px; }
.etape h3::before { counter-increment: etape; content: counter(etape) ' · '; color: var(--encre3); }
.etape .n { font-size: 24px; font-weight: 700; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.etape .qui { font-size: 12px; color: var(--encre2); font-weight: 400; }
.etape .argent { margin-top: 8px; font-size: 12px; background: var(--vert-fond); color: var(--vert); border-radius: 7px; padding: 6px 8px; }
.etape .p { white-space: normal; }
.legende { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--encre2); margin: 10px 0 0; }
.legende i { display: inline-block; width: 18px; height: 3px; vertical-align: middle; margin-right: 6px; }
.cadre-doc { width: 100%; height: calc(100dvh - 160px); min-height: 520px; border: 1px solid var(--bord); border-radius: 10px; background: #fff; }
details.plier { margin-top: 4px; }
details.plier > summary { cursor: pointer; color: var(--accent); font-size: 13px; padding: 4px 0; }

/* ---------- téléphone ---------- */
@media (max-width: 860px) {
  .grille.deux, .grille.trois, .grille.graphe { grid-template-columns: 1fr; }
  .pointage-ligne { grid-template-columns: 1fr; gap: 8px; } .pointage-ligne .etat { text-align: left; }
}
@media (max-width: 640px) {
  .app { max-width: none; border: 0; border-radius: 0; box-shadow: none; min-height: 100dvh; margin: 0;
    padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .app.sans-barre { padding-bottom: 0; }
  .app .haut-mobile { padding-top: max(13px, env(safe-area-inset-top)); padding-left: max(17px, env(safe-area-inset-left)); padding-right: max(17px, env(safe-area-inset-right)); }
  .app .principal { padding-left: max(17px, env(safe-area-inset-left)); padding-right: max(17px, env(safe-area-inset-right)); padding-bottom: 24px; }
  h1 { font-size: 27px; }
  .panneau-fond { align-items: flex-end; }
  .panneau { width: 100%; max-height: 91dvh; border-radius: 18px 18px 0 0; padding-top: 16px; }
  .editeur-barre { top: 72px; }
  .app .nav-bas { position: fixed; left: 0; right: 0; bottom: 0; }
  .app:has(textarea:focus) .nav-bas { display: none; }
  .app:has(textarea:focus) { padding-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
@media print {
  .rail, .nav-bas, .haut-mobile, .panneau-fond, .actions, .ne-pas-imprimer, .pastilles { display: none !important; }
  .app { max-width: none; border: 0; box-shadow: none; margin: 0; } .principal { padding: 0; } .bloc { break-inside: avoid; } body { background: #fff; }
}

/* ---------- la trame de setting ---------- */
.trame-bloc { border: 1px solid var(--bord); border-radius: 11px; margin: 0 0 12px; overflow: hidden; background: var(--carte); }
.trame-tete { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--bord2); background: var(--doux); flex-wrap: wrap; }
.trame-droite { display: flex; gap: 6px; align-items: center; }
.trame-texte { padding: 12px 14px; white-space: pre-wrap; font-size: 15px; line-height: 1.55; outline: none; word-break: break-word; }
.trame-texte:focus { box-shadow: inset 0 0 0 2px var(--accent-fond); }
.trame-pied { display: flex; gap: 10px; align-items: center; padding: 0 14px 12px; flex-wrap: wrap; }
.trame-captures { padding: 0 14px 14px; }
.trame-captures img { width: 100%; border: 1px solid var(--bord); border-radius: 8px; max-height: 420px; object-fit: contain; background: var(--doux); display: block; }
.trame-note { color: var(--encre2); font-size: 13px; margin: -4px 0 12px; padding-left: 10px; border-left: 2px solid var(--bord); }
.trame-pas { justify-content: space-between; border-top: 1px solid var(--bord2); padding-top: 14px; margin-top: 18px; }
