/* VSM Studio — identité visuelle Safran : bleu ciel du logo, bleu profond, gris-bleu du logotype, blanc. */
:root {
  --sf-bleu: #1999D4;
  --sf-bleu-f: #065EA6;
  --sf-gris: #4F5468;
  --sf-marine: #0E1B33;
  --rouge: #E5484D; --orange: #F5A524; --vert: #30C48D; --or: #FFC94A;
  --fond: #0b1322; --panneau: #111a2b; --panneau2: #162236; --ligne: #22314b; --ligne2: #2c3e5c;
  --texte: #e6ecf5; --doux: #8d9ab0; --accent: var(--sf-bleu);
  --ombre: 0 10px 30px rgba(0,0,0,.35);
  --r: 10px;
  /* schéma Blueprint (thème sombre) */
  --s-fond: #0b1322; --s-grille1: #16213a; --s-grille2: #1d2b47; --s-corps: #141c2b; --s-bord: #2b3953; --s-survol: #5c7ba8;
  --s-txt: #e7edf6; --s-lab: #8796ae; --s-fil: #dfe7f2; --s-barre: #0c121d; --s-etiq: #111a2a; --s-etiq-bord: #24324b;
  --s-tl: #8fa2c0; --s-sel: #ffffff; --s-goulot: #3a1418; --s-ombre: .35; --s-rouge: #ff6b70; --s-orange: #F5A524; --s-vert: #30C48D; --s-bande: .05;
  /* barres d'outils */
  --onglets-fond: var(--sf-marine); --onglets-txt: #a9b8d0; --onglets-actif: #fff;
  --outil-fond: #111a2b; --outil-bord: #263654; --outil-txt: #b9c6da; --outil-survol: #1d2a42;
  color-scheme: dark;
}
:root[data-theme="clair"] {
  --fond: #eef2f7; --panneau: #ffffff; --panneau2: #f5f8fc; --ligne: #dbe2ec; --ligne2: #c9d3e1;
  --texte: #1c2333; --doux: #5f6a80; --ombre: 0 8px 24px rgba(14,27,51,.10);
  --s-fond: #f3f6fa; --s-grille1: #e5ebf3; --s-grille2: #d3dce8; --s-corps: #ffffff; --s-bord: #c6d0de; --s-survol: #1999D4;
  --s-txt: #1c2333; --s-lab: #66728a; --s-fil: #4F5468; --s-barre: #e6ebf2; --s-etiq: #ffffff; --s-etiq-bord: #d3dce8;
  --s-tl: #7d8aa0; --s-sel: #065EA6; --s-goulot: #fdecec; --s-ombre: .08; --s-rouge: #d32f35; --s-orange: #c27400; --s-vert: #138a5b; --s-bande: .07;
  --onglets-fond: #ffffff; --onglets-txt: #4F5468; --onglets-actif: #065EA6;
  --outil-fond: #ffffff; --outil-bord: #d5dde8; --outil-txt: #4F5468; --outil-survol: #eef4fa;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: Barlow, "Segoe UI", Arial, sans-serif; font-size: 14px; color: var(--texte); background: var(--fond);
  display: grid; grid-template-rows: auto auto 1fr auto; overflow: hidden;
}
svg:not(.sch) { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
button { font: inherit; color: inherit; }
b { font-weight: 700; }

/* ---------------- en-tête (blanc, comme l'identité Safran) ---------------- */
.entete {
  display: flex; align-items: center; gap: 22px; padding: 10px 20px; background: #fff; color: #1c2333;
  border-bottom: 3px solid var(--sf-bleu); position: relative; z-index: 5;
}
.marque { display: flex; align-items: center; gap: 16px; }
.logo { height: 30px; display: block; }
.sep { width: 1px; height: 34px; background: #d5dbe5; }
.app-nom { font-family: "Barlow Condensed", Barlow, sans-serif; font-size: 22px; letter-spacing: .02em; color: var(--sf-marine); line-height: 1; }
.app-nom b { color: var(--sf-bleu-f); }
.app-sous { font-size: 11.5px; color: var(--sf-gris); margin-top: 3px; }
.produit-carte { padding-left: 22px; border-left: 1px solid #e3e8ef; }
.pc-nom { font-weight: 700; font-size: 15px; color: var(--sf-marine); }
.pc-meta { font-size: 11.5px; color: var(--sf-gris); }
.entete-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.source { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--sf-gris); padding: 6px 12px; background: #f2f5f9; border-radius: 20px; margin-right: 6px; max-width: 360px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pastille { width: 8px; height: 8px; border-radius: 50%; background: #b8c0cc; flex: none; }
.pastille.ok { background: var(--vert); box-shadow: 0 0 0 3px rgba(48,196,141,.2); }
.pastille.vit { animation: pouls 1s ease; }
@keyframes pouls { 50% { box-shadow: 0 0 0 7px rgba(25,153,212,.35); background: var(--sf-bleu); } }
.btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 8px; border: 1px solid #d5dbe5;
  background: #fff; color: var(--sf-marine); cursor: pointer; font-weight: 600; font-size: 13px; transition: .15s;
}
.btn:hover { border-color: var(--sf-bleu); color: var(--sf-bleu-f); background: #f3f9fd; }
.btn.prim { background: var(--sf-bleu-f); border-color: var(--sf-bleu-f); color: #fff; }
.btn.prim:hover { background: var(--sf-bleu); }
.btn.icone { padding: 8px; }
.interrupteur { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--sf-gris); cursor: pointer; user-select: none; }
.interrupteur input { display: none; }
.interrupteur span { width: 32px; height: 18px; border-radius: 10px; background: #c9d1dc; position: relative; transition: .2s; }
.interrupteur span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: .2s; }
.interrupteur input:checked + span { background: var(--sf-bleu); }
.interrupteur input:checked + span::after { left: 16px; }

/* ---------------- onglets ---------------- */
.onglets { display: flex; gap: 2px; padding: 0 14px; background: var(--onglets-fond); border-bottom: 1px solid var(--ligne); overflow-x: auto; scrollbar-width: none; }
.onglets button {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px; border: 0; background: none; color: var(--onglets-txt); cursor: pointer;
  font-weight: 600; font-size: 13.5px; border-bottom: 3px solid transparent; white-space: nowrap; transition: .15s;
}
.onglets button:hover { color: var(--onglets-actif); background: rgba(25,153,212,.06); }
.onglets button.actif { color: var(--onglets-actif); border-bottom-color: var(--sf-bleu); background: rgba(25,153,212,.10); }
.onglets svg { width: 16px; height: 16px; }
.compteur { background: var(--rouge); color: #fff; border-radius: 10px; padding: 0 7px; font-size: 11px; line-height: 18px; }

/* ---------------- schéma : contexte (fil d'Ariane de l'arborescence) + barre d'outils ---------------- */
.schema-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.contexte { display: flex; align-items: center; gap: 12px; padding: 8px 16px; min-height: 46px; background: var(--panneau); border-bottom: 1px solid var(--ligne); }
.ctx-lib { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--doux); padding-right: 12px; border-right: 1px solid var(--ligne); }
.ariane { display: flex; align-items: center; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; font-size: 13px; }
.ariane li { display: flex; align-items: center; color: var(--doux); }
.ariane li + li::before { content: ""; width: 6px; height: 6px; border-top: 2px solid var(--ligne2); border-right: 2px solid var(--ligne2); transform: rotate(45deg); margin: 0 10px 0 6px; }
.ariane a { color: var(--doux); text-decoration: none; cursor: pointer; padding: 4px 9px; border-radius: 7px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid transparent; }
.ariane a:hover { background: var(--panneau2); border-color: var(--ligne); color: var(--texte); }
.ariane li:last-child a { color: var(--texte); font-weight: 700; background: var(--panneau2); border-color: var(--ligne); }
.ariane .niv { font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 5px; color: #0b1322; }
.ariane .etape { font-family: Consolas, monospace; font-size: 11px; opacity: .7; }
.kpi-ruban { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.kpi-ruban .k { display: flex; align-items: baseline; gap: 6px; padding: 3px 10px; font-size: 12px; color: var(--doux); white-space: nowrap; }
.kpi-ruban .k + .k { border-left: 1px solid var(--ligne); }
.kpi-ruban .k b { color: var(--texte); font-size: 13px; }
.kpi-ruban .k.rouge b { color: var(--rouge); } .kpi-ruban .k.orange b { color: var(--orange); }

/* ---------------- zone principale ---------------- */
main { position: relative; overflow: hidden; min-height: 0; }
.vue { display: none; height: 100%; }
.vue.actif { display: flex; }
.vue.page { overflow: auto; padding: 22px 26px 40px; flex-direction: column; gap: 18px; }
.vue.page > * { flex-shrink: 0; }

/* toile du schéma */
.toile { position: relative; flex: 1; min-height: 0; overflow: hidden; background: var(--s-fond); }
.toile > svg.sch { width: 100%; height: 100%; display: block; cursor: grab; user-select: none; touch-action: none; }
.toile > svg.sch.pan { cursor: grabbing; }
.barre-outils { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 7px 12px; background: var(--panneau2); border-bottom: 1px solid var(--ligne); }
.barre-outils .groupe { display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 9px; background: var(--outil-fond); border: 1px solid var(--outil-bord); }
.ob { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 9px; border: 0; border-radius: 6px; background: none; color: var(--outil-txt); cursor: pointer; font-size: 12.5px; font-weight: 600; }
.ob:hover { background: var(--outil-survol); color: var(--texte); }
.ob.actif { background: rgba(25,153,212,.18); color: var(--texte); box-shadow: inset 0 0 0 1px rgba(25,153,212,.6); }
.ob svg { width: 16px; height: 16px; }
.zoom-val { min-width: 48px; text-align: center; font-size: 12px; color: var(--texte); font-variant-numeric: tabular-nums; }
.niveaux .ob { padding: 0 8px; font-weight: 800; font-size: 11.5px; }
.niveaux .ob i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.niveaux .ob.off { opacity: .35; }
.recherche { display: flex; align-items: center; gap: 6px; padding: 0 8px; color: var(--doux); }
.recherche input { background: none; border: 0; outline: 0; color: var(--texte); width: 150px; font: inherit; font-size: 12.5px; }
.minicarte { position: absolute; right: 14px; bottom: 46px; width: 230px; height: 150px; border-radius: 10px; background: var(--outil-fond); border: 1px solid var(--outil-bord); box-shadow: var(--ombre); cursor: crosshair; z-index: 3; opacity: .95; }
.legende { position: absolute; left: 12px; right: 260px; bottom: 10px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; font-size: 11.5px; color: var(--doux); z-index: 2; pointer-events: none; }
.legende i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -2px; }
.l-goulot { background: var(--s-goulot); box-shadow: inset 0 0 0 2px var(--rouge); } .l-trs { background: #C2185B; } .l-stock { background: var(--orange); clip-path: polygon(50% 0, 100% 100%, 0 100%); } .l-crit { background: var(--or); }
.aide-souris { margin-left: auto; opacity: .75; }
.infobulle { position: absolute; pointer-events: none; z-index: 6; background: var(--panneau); border: 1px solid var(--ligne2); border-radius: 9px; padding: 10px 12px; font-size: 12px; max-width: 300px; display: none; box-shadow: var(--ombre); color: var(--texte); }
.infobulle b { color: var(--texte); }
.infobulle .al { margin-top: 6px; }

/* inspecteur */
.inspecteur { width: 340px; flex: none; background: var(--panneau); border-left: 1px solid var(--ligne); overflow-y: auto; transition: width .2s; }
.insp-vide { padding: 60px 30px; text-align: center; color: var(--doux); }
.insp-vide svg { width: 36px; height: 36px; opacity: .5; }
.petit { font-size: 12px; opacity: .8; }
.insp-photo { position: relative; height: 190px; background: #e9edf3; display: grid; place-items: center; overflow: hidden; }
.insp-photo img { height: 100%; width: 100%; object-fit: contain; }
.insp-photo .type { position: absolute; left: 12px; top: 12px; padding: 3px 9px; border-radius: 6px; font-size: 11px; font-weight: 800; color: #fff; letter-spacing: .05em; }
.insp-tete { padding: 14px 18px 10px; border-bottom: 1px solid var(--ligne); }
.insp-tete h2 { margin: 0; font-size: 18px; }
.insp-tete .id { font-family: Consolas, monospace; font-size: 12px; color: var(--doux); }
.insp-corps { padding: 12px 18px 24px; display: grid; gap: 14px; }
.insp-grille { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mesure { background: var(--panneau2); border: 1px solid var(--ligne); border-radius: 8px; padding: 8px 10px; }
.mesure span { display: block; font-size: 11px; color: var(--doux); }
.mesure b { font-size: 15px; }
.mesure.rouge b { color: var(--rouge); } .mesure.orange b { color: var(--orange); } .mesure.vert b { color: var(--vert); }
.insp-h { font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--doux); text-transform: uppercase; margin-bottom: -6px; }
.alerte-l { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; font-size: 12.5px; background: rgba(229,72,77,.1); border: 1px solid rgba(229,72,77,.35); }
.alerte-l.orange { background: rgba(245,165,36,.1); border-color: rgba(245,165,36,.4); }
.alerte-l.vigilance { background: rgba(25,153,212,.08); border-color: rgba(25,153,212,.35); }
.alerte-l svg { color: var(--rouge); width: 16px; height: 16px; margin-top: 1px; }
.alerte-l.orange svg { color: var(--orange); } .alerte-l.vigilance svg { color: var(--sf-bleu); }
.insp-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.insp-actions .btn { padding: 6px 10px; font-size: 12px; }
.liens a { display: flex; justify-content: space-between; padding: 6px 10px; border-radius: 7px; background: var(--panneau2); margin-top: 4px; cursor: pointer; color: var(--texte); text-decoration: none; font-size: 12.5px; }
.liens a:hover { outline: 1px solid var(--sf-bleu); }
.commentaire { font-size: 12.5px; padding: 10px 12px; border-left: 3px solid var(--sf-bleu); background: var(--panneau2); border-radius: 0 8px 8px 0; font-style: italic; }

/* ---------------- pages ---------------- */
.page h1 { margin: 0; font-size: 22px; display: flex; align-items: center; gap: 12px; }
.page h1 small { font-size: 13px; color: var(--doux); font-weight: 500; }
.page-tete { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-tete .outils { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.carte { background: var(--panneau); border: 1px solid var(--ligne); border-radius: 12px; padding: 16px 18px; box-shadow: var(--ombre); }
.carte h3 { margin: 0 0 12px; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.carte h3 small { color: var(--doux); font-weight: 500; margin-left: auto; font-size: 12px; }
.grille-kpi { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 12px; }
.kpi { background: var(--panneau); border: 1px solid var(--ligne); border-radius: 12px; padding: 14px 16px; position: relative; overflow: hidden; }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--sf-bleu); }
.kpi.rouge::before { background: var(--rouge); } .kpi.orange::before { background: var(--orange); } .kpi.vert::before { background: var(--vert); } .kpi.or::before { background: var(--or); }
.kpi .t { font-size: 11.5px; color: var(--doux); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.kpi .v { font-size: 26px; font-weight: 800; margin-top: 4px; font-family: "Barlow Condensed", Barlow, sans-serif; }
.kpi .s { font-size: 11.5px; color: var(--doux); margin-top: 2px; }
.deux { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.deux-eg { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 1100px) { .deux, .deux-eg { grid-template-columns: 1fr; } .produit-carte, .kpi-ruban { display: none; } }
select, input[type=text], input[type=search] {
  font: inherit; font-size: 13px; color: var(--texte); background: var(--panneau2); border: 1px solid var(--ligne2); border-radius: 8px; padding: 7px 10px; outline: 0;
}
select:focus, input:focus { border-color: var(--sf-bleu); }
.graph svg, .tl svg { width: 100%; height: auto; stroke: none; fill: initial; stroke-width: 1; }
.graph text { font-family: Barlow, sans-serif; }

/* tableaux */
.tableau-boite { overflow: auto; border: 1px solid var(--ligne); border-radius: 12px; background: var(--panneau); max-height: calc(100vh - 260px); }
table.tab { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.tab th { position: sticky; top: 0; z-index: 1; background: var(--sf-bleu-f); color: #fff; text-align: left; padding: 9px 10px; font-weight: 600; white-space: nowrap; cursor: pointer; user-select: none; }
.tab th.calc { background: var(--sf-gris); }
.tab th:hover { filter: brightness(1.15); }
.tab td { padding: 7px 10px; border-bottom: 1px solid var(--ligne); white-space: nowrap; }
.tab tr:hover td { background: rgba(25,153,212,.08); cursor: pointer; }
.tab td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tab td.rouge { color: var(--rouge); font-weight: 700; } .tab td.orange { color: var(--orange); font-weight: 700; }
.tab tr.goulot td { background: rgba(229,72,77,.10); }
.tab .id { font-family: Consolas, monospace; color: var(--sf-bleu); font-weight: 700; }
.etiq { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; }
.e-rouge { background: rgba(229,72,77,.18); color: var(--rouge); } .e-orange { background: rgba(245,165,36,.18); color: var(--orange); }
.e-vert { background: rgba(48,196,141,.16); color: var(--vert); } .e-bleu { background: rgba(25,153,212,.16); color: var(--sf-bleu); } .e-gris { background: var(--panneau2); color: var(--doux); }
.puce { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: 6px; }

/* peigne */
.peigne-carte { display: grid; grid-template-columns: 240px 1fr 230px; gap: 16px; align-items: center; }
.peigne-carte .se-nom { font-weight: 700; font-size: 15px; }
.peigne-carte .se-chemin { font-size: 11.5px; color: var(--doux); margin-top: 3px; }
.peigne-carte .tl svg { width: 100%; height: 86px; }
.jauge { font-size: 12px; }
.jauge .barre { height: 10px; border-radius: 5px; background: var(--panneau2); position: relative; margin: 6px 0; overflow: hidden; }
.jauge .barre i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; }
.indent { display: inline-block; }

/* nomenclature */
.arbre .ligne { display: grid; grid-template-columns: minmax(320px, 2fr) 70px 90px 90px 80px 110px 140px 120px; align-items: center; gap: 8px; padding: 7px 12px; border-bottom: 1px solid var(--ligne); font-size: 13px; }
.arbre .ligne.tete { font-size: 11px; font-weight: 800; letter-spacing: .06em; color: var(--doux); text-transform: uppercase; position: sticky; top: 0; background: var(--panneau); z-index: 1; }
.arbre .ligne:not(.tete):hover { background: rgba(25,153,212,.07); cursor: pointer; }
.arbre .nom { display: flex; align-items: center; gap: 8px; }
.arbre .pli { width: 18px; height: 18px; border: 0; background: none; cursor: pointer; color: var(--doux); padding: 0; display: grid; place-items: center; }
.arbre .pli svg { width: 14px; height: 14px; transition: .15s; }
.arbre .ferme .pli svg { transform: rotate(-90deg); }
.arbre img { width: 30px; height: 30px; border-radius: 6px; object-fit: cover; background: #e9edf3; }
.arbre .num { text-align: right; font-variant-numeric: tabular-nums; }

/* alertes */
.alertes-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; }
.al-carte { display: grid; grid-template-columns: 54px 1fr; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--panneau); border: 1px solid var(--ligne); border-left: 4px solid var(--rouge); cursor: pointer; transition: .15s; }
.al-carte:hover { transform: translateY(-1px); border-color: var(--sf-bleu); }
.al-carte.orange { border-left-color: var(--orange); } .al-carte.vigilance { border-left-color: var(--sf-bleu); }
.al-carte img { width: 54px; height: 54px; border-radius: 8px; object-fit: cover; background: #e9edf3; }
.al-carte .tt { font-weight: 700; } .al-carte .mm { font-size: 12px; color: var(--doux); margin-top: 2px; }
.al-carte .piste { font-size: 12px; margin-top: 6px; color: var(--sf-bleu); }
.filtres-al { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 6px 12px; border-radius: 16px; border: 1px solid var(--ligne2); background: var(--panneau); cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--doux); }
.chip.actif { background: var(--sf-bleu-f); border-color: var(--sf-bleu-f); color: #fff; }

/* exports */
.exports-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.ex-carte { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 12px; background: var(--panneau); border: 1px solid var(--ligne); }
.ex-carte .ic { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: rgba(25,153,212,.14); color: var(--sf-bleu); }
.ex-carte .ic svg { width: 22px; height: 22px; }
.ex-carte h4 { margin: 0; font-size: 15px; }
.ex-carte p { margin: 0; font-size: 12.5px; color: var(--doux); flex: 1; }
.ex-carte .quand { font-size: 11px; font-weight: 700; color: var(--sf-bleu); text-transform: uppercase; letter-spacing: .06em; }
.ex-carte .act { display: flex; gap: 6px; flex-wrap: wrap; }
.ex-carte .act .btn { padding: 6px 10px; font-size: 12px; }
:root:not([data-theme="clair"]) .page .btn { background: var(--panneau2); color: var(--texte); border-color: var(--ligne2); }
:root:not([data-theme="clair"]) .page .btn:hover { border-color: var(--sf-bleu); color: #fff; }
:root:not([data-theme="clair"]) .page .btn.prim, :root:not([data-theme="clair"]) .inspecteur .btn.prim { background: var(--sf-bleu-f); border-color: var(--sf-bleu-f); color: #fff; }
:root:not([data-theme="clair"]) .inspecteur .btn { background: var(--panneau2); color: var(--texte); border-color: var(--ligne2); }

/* aide */
.aide { max-width: 1050px; line-height: 1.55; }
.aide h2 { font-size: 17px; margin: 22px 0 6px; color: var(--sf-bleu); }
.aide code { background: var(--panneau2); padding: 1px 6px; border-radius: 5px; font-size: 12.5px; }
.aide kbd { background: var(--panneau2); border: 1px solid var(--ligne2); border-bottom-width: 2px; padding: 0 6px; border-radius: 5px; font-size: 12px; }
.formule { font-family: "Cambria Math", Cambria, serif; font-size: 15px; padding: 10px 14px; background: var(--panneau2); border-radius: 8px; display: inline-block; margin: 4px 0; }
.signature { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: 12px; background: linear-gradient(120deg, var(--sf-marine), #13305c); color: #fff; margin-top: 18px; }
.signature img { height: 26px; background: #fff; padding: 6px 10px; border-radius: 8px; }

/* pied, dépôt, toasts */
.pied { display: flex; gap: 16px; padding: 6px 20px; font-size: 11.5px; color: var(--doux); background: var(--panneau); border-top: 1px solid var(--ligne); }
.pied-droite { margin-left: auto; }
.pied b { color: var(--texte); }
.depot { position: fixed; inset: 0; z-index: 50; background: rgba(6,94,166,.82); display: none; place-items: center; color: #fff; font-size: 22px; font-weight: 700; }
.depot svg { width: 64px; height: 64px; display: block; margin: 0 auto 10px; }
.depot.visible { display: grid; }
.toasts { position: fixed; right: 20px; bottom: 44px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { padding: 11px 16px; border-radius: 10px; background: #13203a; color: #fff; border-left: 4px solid var(--sf-bleu); box-shadow: var(--ombre); font-size: 13px; animation: entre .25s ease; max-width: 420px; }
.toast.erreur { border-left-color: var(--rouge); } .toast.ok { border-left-color: var(--vert); }
@keyframes entre { from { transform: translateY(10px); opacity: 0; } }
.vide-etat { padding: 40px; text-align: center; color: var(--doux); }

/* historique */
.histo-tab td.delta-bon { color: var(--vert); font-weight: 700; } .histo-tab td.delta-mauvais { color: var(--rouge); font-weight: 700; }

@media print { body { display: block; overflow: visible; } }

/* ---------------- écran d'accueil ---------------- */
.accueil { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; cursor: pointer;
  background: radial-gradient(1200px 600px at 50% 40%, #13305c 0%, #0E1B33 55%, #070f1f 100%); transition: opacity .6s ease, visibility .6s; }
.accueil::before { content: ""; position: absolute; inset: 0; opacity: .25;
  background-image: linear-gradient(#1d2b47 1px, transparent 1px), linear-gradient(90deg, #1d2b47 1px, transparent 1px); background-size: 40px 40px;
  mask-image: radial-gradient(circle at 50% 45%, #000 0%, transparent 70%); -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 0%, transparent 70%); }
.accueil.fin { opacity: 0; visibility: hidden; }
.acc-carte { position: relative; text-align: center; color: #fff; animation: acc-entre .8s cubic-bezier(.2,.8,.2,1) both; }
@keyframes acc-entre { from { opacity: 0; transform: translateY(18px) scale(.98); } }
.acc-logo { height: 46px; background: #fff; padding: 14px 22px; border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.35); }
.acc-trait { width: 64px; height: 3px; margin: 26px auto 22px; border-radius: 2px; background: var(--sf-bleu); }
.acc-nom { font-family: "Barlow Condensed", Barlow, sans-serif; font-size: 58px; line-height: 1; letter-spacing: .02em; font-weight: 600; }
.acc-nom b { color: var(--sf-bleu); font-weight: 700; }
.acc-sous { margin-top: 10px; font-size: 15px; color: #a9b8d0; }
.acc-charge { width: 260px; height: 4px; margin: 34px auto 10px; border-radius: 2px; background: rgba(255,255,255,.12); overflow: hidden; }
.acc-charge i { display: block; height: 100%; width: 40%; border-radius: 2px; background: var(--sf-bleu); animation: acc-barre 1.1s ease-in-out infinite; }
@keyframes acc-barre { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
.acc-etat { font-size: 12px; color: #7f8fab; }
.acc-auteur { margin-top: 40px; font-size: 14px; color: #c9d4e6; }
.acc-auteur b { color: #fff; }
.acc-pied { margin-top: 6px; font-size: 11.5px; color: #6f7f9b; letter-spacing: .06em; }

/* ---------------- liens du menu haut + fenêtre vidéo ---------------- */
.liens-haut { display: flex; gap: 4px; }
.lien { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 8px; border: 0; background: none; cursor: pointer;
  color: var(--sf-bleu-f); font: inherit; font-weight: 700; font-size: 13px; text-decoration: none; }
.lien:hover { background: #eef6fc; }
.lien svg { width: 17px; height: 17px; }
.sep-haut { width: 1px; height: 26px; background: #dfe5ed; margin: 0 4px; }
.modale { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(6,18,38,.78); backdrop-filter: blur(4px); }
.modale[hidden] { display: none; }
.modale-boite { width: min(1180px, 94vw); background: var(--panneau); border-radius: 14px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.5); border: 1px solid var(--ligne); }
.modale-tete { display: flex; align-items: center; gap: 10px; padding: 10px 14px; color: var(--texte); }
.modale-tete > div { flex: 1; }
.modale-tete .petit { color: var(--doux); margin-left: 6px; }
.modale video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
@media (max-width: 1300px) { .liens-haut .lien { font-size: 0; gap: 0; } .liens-haut .lien svg { width: 20px; height: 20px; } }
/* en-tête : une seule ligne, les textes longs s'abrègent */
.entete { gap: 16px; }
.btn, .lien { white-space: nowrap; text-decoration: none; }
.marque { flex: none; }
.produit-carte { flex: 1; min-width: 0; }
.app-sous, .pc-nom, .pc-meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.source { max-width: 230px; }
.entete-actions { flex: none; }
@media (max-width: 1800px) { .source { display: none; } }
@media (max-width: 1450px) { .app-sous { display: none; } }
