/* Onglet steve -- squelette repris du standard portail (#47/#116) : .tree-group-header/.tree-cat (portal.css, commun) + volet retractable 260px (largeur standard, cf organisation.css pour la reference nested). */
.agent-tab { padding:0; height:100%; display:flex; flex-direction:column; }
main > #tab-steve-slot { padding:0; overflow:hidden; }
main > #tab-steve-slot section { padding:0; flex:1; min-height:0; display:flex; flex-direction:column; }

.agent-layout { display:grid; grid-template-columns:260px 1fr; flex:1; min-height:0; transition:grid-template-columns .2s; }
.agent-layout.sidebar-hidden { grid-template-columns:0 1fr; }
.agent-layout.sidebar-hidden #steve-sidebar { visibility:hidden; border-right:none; }
#steve-sidebar { background:rgba(20,20,23,.25); border-right:1px solid rgba(255,255,255,.1); overflow-y:auto; backdrop-filter:blur(24px) saturate(180%); }
#steve-tree { list-style:none; margin:0; padding:.35rem 0; }

/* Groupe niveau 1 -- .tree-group-header customise (commun portal.css) */
.agent-group { margin-bottom:.15rem; }
.agent-group-header { padding:.5rem .85rem .4rem; align-items:center; text-transform:none; letter-spacing:normal; font-size:.78rem; display:flex; gap:.5rem; cursor:pointer; }
.agent-group-header:hover { background:rgba(var(--p-base-rgb),.06); }
.agent-group-header .agent-gicon { color:var(--p-base); flex-shrink:0; display:inline-flex; align-items:center; }
.agent-group-header .g-name { flex:1; }
.agent-group-header .g-chevron { margin-left:.4rem; transition:transform .15s; color:var(--p-base); }
.agent-group.collapsed .g-chevron { transform:rotate(-90deg); }
.agent-group.collapsed .agent-group-items { display:none; }
.agent-group-items { list-style:none; margin:0; padding:0; }
/* Groupe navigable (clic sur le libelle = section overview, clic chevron = repli seul) --
   titre categorie toujours dans la teinte principale du portail (comme Pepper) */
.agent-group-header.agent-navgroup .g-name { cursor:pointer; color:var(--p-base); }
.agent-group-header.agent-navgroup.active { background:rgba(var(--p-glow-rgb),.10); }
.agent-group-header.agent-navgroup.active .agent-gicon { color:var(--p-base); }
.agent-group-empty { padding:.3rem .85rem .5rem 1.6rem; font-size:.7rem; font-style:italic; color:#52525b; }
/* Entree solo sans sous-sections (ex: Vue d'ensemble) -- grisee tant que vide, redevient
   normale des que du contenu reel est branche (retirer le flag ready sur le noeud) */
.agent-group-header.agent-navgroup.is-empty .g-name { color:#52525b; }
.agent-group-header.agent-navgroup.is-empty .agent-gicon { color:#3f3f46; }

/* Sous-groupe niveau 2 (ex: Cady/Bricolage) -- meme mecanique, indentation +1.1rem */
.agent-subgroup { list-style:none; }
.agent-subgroup-header { display:flex; align-items:center; gap:.4rem; padding:.45rem .85rem .4rem 1.6rem; font-size:.8rem; color:#d4d4d8; cursor:pointer; }
.agent-subgroup-header:hover { color:var(--p-light); }
.agent-subgroup-header .agent-icon { color:var(--p-light); flex-shrink:0; display:inline-flex; align-items:center; }
.agent-subgroup-header .agent-label { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.agent-subgroup-header .g-chevron { margin-left:.4rem; transition:transform .15s; }
/* Sous-groupe sans page propre ET sans rien de reel a l'interieur : grise integralement */
.agent-subgroup-header.is-empty { color:#52525b; }
.agent-subgroup-header.is-empty .agent-icon { color:#3f3f46; }
.agent-subgroup.collapsed .g-chevron { transform:rotate(-90deg); }
.agent-subgroup.collapsed .agent-subgroup-items { display:none; }
.agent-subgroup-items { list-style:none; margin:0; padding:0; }
.agent-subgroup-items .tree-cat { padding-left:2.7rem; }

.agent-group-items .tree-cat { padding-left:1.6rem; font-size:.8rem; color:#d4d4d8; text-transform:none; letter-spacing:normal; }
.agent-icon { color:var(--p-light); flex-shrink:0; display:inline-flex; align-items:center; }
.tree-cat.active .agent-icon { color:var(--p-base); }
.agent-label { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
/* Sous-categorie sans contenu reel -- titre grise, redevient normal quand la sous-categorie recoit du contenu (retirer is-empty) */
.tree-cat.is-empty .agent-label { color:#52525b; }
.tree-cat.is-empty .agent-icon { color:#3f3f46; }

#steve-main { display:flex; flex-direction:column; background:transparent; position:relative; overflow:hidden; min-height:0; }

#steve-content { flex:1; overflow-y:auto; padding:1rem 1.2rem; display:flex; flex-direction:column; gap:.85rem; }
.agent-empty { color:#64748b; font-style:italic; padding:1rem; }

/* ===== Barre de filtration standard (principe id63) — onglet Steve ===== */
#steve-toolbar { min-height:3.15rem; display:flex; align-items:center; gap:.6rem; padding:.45rem .9rem; border-bottom:1px solid rgba(255,255,255,.08); background:rgba(20,20,23,.25); backdrop-filter:blur(24px) saturate(180%); }
#steve-toolbar:empty { display:none; }
.st-tb-title { font-size:.85rem; font-weight:600; color:var(--p-base); }
.st-tb-spacer { flex:1; }
.st-select { background:rgba(39,39,42,.7); color:#e4e4e7; border:1px solid rgba(255,255,255,.14); border-radius:6px; padding:.3rem .5rem; font-size:.8rem; }
.st-btn { background:rgba(var(--p-base-rgb),.15); color:var(--p-base); border:1px solid rgba(var(--p-base-rgb),.4); border-radius:6px; padding:.32rem .7rem; font-size:.8rem; cursor:pointer; }
.st-btn:hover { background:rgba(var(--p-base-rgb),.28); }
.st-btn-sec { background:rgba(39,39,42,.55); color:#d4d4d8; border-color:rgba(255,255,255,.14); }

/* ===== Page Salaires ===== */
.st-kpis { display:grid; grid-template-columns:repeat(auto-fit, minmax(150px, 1fr)); gap:.7rem; margin-bottom:.85rem; }
.st-kpi { background:rgba(24,24,27,.55); border:1px solid rgba(255,255,255,.09); border-radius:10px; padding:.6rem .75rem; }
.st-kpi-l { font-size:.68rem; text-transform:uppercase; letter-spacing:.04em; color:#a1a1aa; }
.st-kpi-v { font-size:1.25rem; font-weight:700; color:#fafafa; margin-top:.15rem; }
.st-kpi-s { font-size:.7rem; color:#71717a; margin-top:.15rem; }
.st-kpi-up .st-kpi-v { color:var(--p-base); }
.st-kpi-down .st-kpi-v { color:#f87171; }

.st-card { margin-bottom:.85rem; }
.st-card h3 { margin:0 0 .55rem; font-size:.9rem; color:var(--p-base); }
.st-grid2 { display:grid; grid-template-columns:1fr 1fr; gap:.85rem; }
@media (max-width: 1100px) { .st-grid2 { grid-template-columns:1fr; } }

.st-svg { width:100%; height:auto; display:block; }
.st-svg .st-grid { stroke:rgba(255,255,255,.07); stroke-width:1; }
.st-svg .st-ax { fill:#71717a; font-size:11px; }
.st-line-gross polyline { stroke:var(--p-base); }
.st-line-net polyline { stroke:#4ade80; }
.st-bar-gross { fill:rgba(var(--p-base-rgb),.75); }
.st-bar-net { fill:rgba(74,222,128,.8); }
.st-legend { display:flex; gap:1rem; font-size:.72rem; color:#a1a1aa; margin-top:.25rem; }
.st-lg::before { content:''; display:inline-block; width:14px; height:3px; margin-right:.35rem; vertical-align:middle; }
.st-lg-gross::before { background:var(--p-base); }
.st-lg-net::before { background:#4ade80; }
.st-spark { width:260px; max-width:100%; height:46px; }
.st-spark polyline { stroke:var(--p-base); stroke-width:1.5; }

.st-hrow { display:flex; align-items:center; gap:.6rem; margin:.28rem 0; font-size:.8rem; }
.st-hlbl { width:9.5rem; color:#d4d4d8; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.st-hbar { flex:1; height:.62rem; background:rgba(255,255,255,.06); border-radius:4px; overflow:hidden; }
.st-hbar span { display:block; height:100%; background:rgba(var(--p-base-rgb),.75); border-radius:4px; }
.st-hval { width:9.5rem; text-align:right; color:#e4e4e7; font-variant-numeric:tabular-nums; }
.st-hval i { color:#71717a; font-style:normal; font-size:.72rem; }

/* G63 : « N anomalie(s) detectee(s) » est un COMPTEUR, pas une categorie -> rectangle.
   Rayon 4px = celui de `kpi-badge` au socle, l'analogue le plus proche. */
.st-badge { display:inline-block; padding:.22rem .5rem; border-radius:4px; font-size:.74rem; font-weight:600; margin-bottom:.5rem; }
.st-badge-ok { background:rgba(74,222,128,.15); color:#4ade80; border:1px solid rgba(74,222,128,.35); }
.st-badge-alert { background:rgba(248,113,113,.15); color:#f87171; border:1px solid rgba(248,113,113,.4); }
.st-anom { border-left:3px solid #71717a; padding:.35rem .6rem; margin:.35rem 0; font-size:.8rem; color:#d4d4d8; background:rgba(255,255,255,.03); }
.st-anom-high { border-left-color:#f87171; }
.st-anom-medium { border-left-color:#fbbf24; }
.st-anom-info { border-left-color:#60a5fa; }
.st-analysis-md { font-size:.82rem; color:#d4d4d8; line-height:1.45; }
.st-analysis-md p { margin:.4rem 0; }
.st-analysis-md ul { margin:.3rem 0 .3rem 1.1rem; padding:0; }
.st-running { color:var(--p-light); font-style:italic; }

.st-sim-in { font-size:.85rem; color:#d4d4d8; margin-bottom:.5rem; }
.st-sim-in input { width:5rem; background:rgba(39,39,42,.7); color:#fafafa; border:1px solid rgba(255,255,255,.14); border-radius:6px; padding:.25rem .4rem; font-size:.9rem; text-align:right; }
.st-simtab { width:100%; border-collapse:collapse; font-size:.82rem; }
.st-simtab th { text-align:right; color:#a1a1aa; font-weight:500; padding:.25rem .4rem; }
.st-simtab th:first-child { text-align:left; }
.st-simtab td { padding:.28rem .4rem; text-align:right; color:#e4e4e7; border-top:1px solid rgba(255,255,255,.06); font-variant-numeric:tabular-nums; }
.st-simtab td:first-child { text-align:left; color:#a1a1aa; }
.st-sim-delta td { color:var(--p-base); }

.st-note { font-size:.72rem; color:#71717a; margin-top:.55rem; line-height:1.4; }
.st-empty { color:#71717a; font-style:italic; }

/* Heatmap de carriere (page Salaires) : colonnes = annees, lignes = mois */
.hm-wrap { overflow-x:auto; padding-bottom:.25rem; }
.hm-row { display:flex; gap:2px; margin-bottom:2px; align-items:center; }
.hm-mois { width:1.15rem; font-size:.6rem; color:#71717a; text-align:center; flex-shrink:0; }
.hm-c { width:13px; height:13px; border-radius:2px; background:rgba(255,255,255,.05); flex-shrink:0; box-sizing:border-box; }
.hm-future { background:transparent; border:1px dashed rgba(255,255,255,.13); }
.hm-void { background:transparent; }
.hm-mile { outline:2px solid #f87171; outline-offset:1px; background:rgba(248,113,113,.25); }
.hm-mile-demo { display:inline-block; width:10px; height:10px; border-radius:2px; outline:2px solid #f87171; outline-offset:1px; background:rgba(248,113,113,.25); vertical-align:middle; margin:0 .15rem; }
.hm-head { height:2.2rem; align-items:flex-end; }
.hm-y { width:13px; flex-shrink:0; writing-mode:vertical-rl; transform:rotate(180deg); font-size:.58rem; color:#71717a; display:flex; align-items:center; justify-content:flex-start; height:2.2rem; box-sizing:border-box; }
.hm-y-mile { color:#f87171; font-weight:700; }

/* Qualification des libelles de primes (cases a cocher, carte Primes) */
.st-lbl-details { margin-top:.6rem; }
.st-lbl-details summary { font-size:.76rem; color:var(--p-light); cursor:pointer; }
.st-lbltab { width:100%; border-collapse:collapse; font-size:.78rem; margin-top:.45rem; }
.st-lbltab th { text-align:left; color:#a1a1aa; font-weight:500; padding:.2rem .4rem; border-bottom:1px solid rgba(255,255,255,.1); }
.st-lbltab td { padding:.22rem .4rem; color:#d4d4d8; border-bottom:1px solid rgba(255,255,255,.05); }
.st-lbltab td:nth-child(3), .st-lbltab td:nth-child(4), .st-lbltab th:nth-child(3), .st-lbltab th:nth-child(4) { text-align:right; font-variant-numeric:tabular-nums; }
.st-lbltab input[type=checkbox] { accent-color:var(--p-base); cursor:pointer; }
.st-lbltab td:nth-child(3), .st-lbltab td:nth-child(4), .st-lbltab th:nth-child(3), .st-lbltab th:nth-child(4) { text-align:right; font-variant-numeric:tabular-nums; }
.st-lbltab input[type=checkbox] { accent-color:var(--p-base); cursor:pointer; }

/* Rangee heatmap + qualification (la heatmap n'a pas besoin de toute la largeur) */
.st-grid-hm { display:grid; grid-template-columns:minmax(0,1fr) minmax(300px,380px); gap:.85rem; align-items:start; margin-bottom:.85rem; }
.st-grid-hm > .st-card { margin-bottom:0; }
@media (max-width: 1150px) { .st-grid-hm { grid-template-columns:1fr; } }
.st-qualif-wrap { max-height:330px; overflow-y:auto; }

/* Compteurs d'entete de la page Salaires (extraits / dataset / mois de carriere) */
.st-tb-meta { font-size:.74rem; color:#a1a1aa; font-variant-numeric:tabular-nums; margin-left:.35rem; cursor:default; }

/* v9 : h3 avec case a cocher + heatmap pleine largeur avec legende a droite */
.st-h3row { display:flex; align-items:center; justify-content:space-between; gap:.8rem; margin-bottom:.55rem; }
.st-h3row h3 { margin:0; }
.st-chk { font-size:.74rem; color:#a1a1aa; display:inline-flex; gap:.35rem; align-items:center; cursor:pointer; user-select:none; }
.st-chk input { accent-color:var(--p-base); cursor:pointer; }
.hm-flex { display:flex; gap:1.6rem; align-items:flex-start; }
.hm-flex .hm-wrap { flex:0 1 auto; min-width:0; }
.hm-legend { flex:1; min-width:210px; font-size:.76rem; color:#a1a1aa; padding-top:2.2rem; }
.hm-lg-t { font-size:.7rem; text-transform:uppercase; letter-spacing:.05em; color:#71717a; margin-bottom:.35rem; }
.hm-lg-i { display:flex; gap:.5rem; align-items:center; margin:.32rem 0; }
.hm-sw { width:12px; height:12px; border-radius:2px; flex-shrink:0; box-sizing:border-box; }
.hm-sw-future { border:1px dashed rgba(255,255,255,.2); background:transparent; }
.hm-mile-demo2 { outline:2px solid #f87171; outline-offset:1px; background:rgba(248,113,113,.25); }

/* v10 : heatmap au design STANDARD portail (cellules cal-c 5 niveaux, cf dashboards Pepper) */
.cal-c { width:12px; height:12px; border-radius:2px; display:block; background:rgba(255,255,255,.05); box-sizing:border-box; }
.cal-l0 { background:rgba(255,255,255,.05); }
.cal-l1 { background:rgba(var(--p-base-rgb),.30); }
.cal-l2 { background:rgba(var(--p-base-rgb),.52); }
.cal-l3 { background:rgba(var(--p-base-rgb),.74); }
.cal-l4 { background:var(--p-base); }
.cal-legend { display:flex; align-items:center; gap:3px; font-size:.58rem; color:#64748b; text-transform:uppercase; letter-spacing:.06em; }
.cal-legend .cal-c { width:12px; height:12px; }
.dh-crow { display:flex; align-items:center; gap:3px; height:14px; box-sizing:border-box; margin-bottom:3px; }
.dh-crow .cal-c { flex-shrink:0; }
.hm2-lab { width:1.15rem; flex-shrink:0; font-size:.6rem; color:#71717a; text-align:center; }
.hm-head { height:2.2rem; align-items:flex-end; margin-bottom:4px; }
.hm-head .hm-y { width:12px; }

/* Tooltip de survol des graphes (date / serie / valeur) */
.st-tip { position:fixed; display:none; z-index:300; background:rgba(20,20,23,.96); border:1px solid rgba(var(--p-base-rgb),.35); border-radius:6px; padding:.4rem .6rem; font-size:.74rem; color:#e4e4e7; pointer-events:none; line-height:1.45; box-shadow:0 4px 14px rgba(0,0,0,.5); font-variant-numeric:tabular-nums; }
.st-tip b { color:var(--p-base); }
.st-tip i { color:#71717a; }
svg[data-kind] { cursor:crosshair; }

/* Sparkline PAS pleine largeur (axe carriere complet depuis 1989) */
.st-spark-full { width:100%; max-width:900px; height:auto; display:block; }

/* Analyse Claude : section retractable en bas de page */
details.st-card-claude summary { cursor:pointer; font-size:.9rem; font-weight:600; color:var(--p-base); user-select:none; list-style-position:inside; }
details.st-card-claude summary:hover { color:var(--p-light); }
details.st-card-claude[open] summary { margin-bottom:.55rem; }

/* Heatmap : case avec bulletin = cliquable (ouvre le PDF) */
.cal-c[data-doc] { cursor:pointer; }
.cal-c[data-doc]:hover { outline:1px solid rgba(var(--p-base-rgb),.8); outline-offset:1px; }

/* Detail des anomalies : sous-volet retractable dans la carte Analyse */
.st-anom-details { margin:.3rem 0 .5rem; }
.st-anom-details summary { cursor:pointer; font-size:.78rem; color:var(--p-light); user-select:none; }
.st-anom-details summary:hover { color:var(--p-base); }

/* Notes/corrections pour l'analyse (sous-volet retractable, meme famille que st-anom-details) */
.st-notes-ta { width:100%; box-sizing:border-box; margin-top:.4rem; background:rgba(39,39,42,.7); color:#e4e4e7; border:1px solid rgba(255,255,255,.14); border-radius:6px; padding:.5rem .6rem; font:inherit; font-size:.8rem; resize:vertical; }
.st-notes-ta:focus { outline:none; border-color:rgba(var(--p-base-rgb),.6); }
.st-notes-actions { display:flex; align-items:center; gap:.6rem; margin-top:.4rem; }
.st-notes-actions .st-note { margin-top:0; }
