/* APEX — fiches véhicule / chauffeur. Tout est préfixé #tab-apex pour ne pas toucher Space management. */
#tab-apex {
  --ax: #f97316; --ax-2: #fb923c; --ax-soft: rgba(249,115,22,.13); --ax-line: rgba(249,115,22,.45);
  --ax-blue: #60a5fa; --ax-violet: #a78bfa; --ax-amber: #fbbf24; --ax-red: #f87171; --ax-slate: #94a3b8; --ax-cyan: #22d3ee;
  font-family: 'Inter', 'DM Sans', system-ui, sans-serif; font-size: 14px; line-height: 1.45; color: var(--text-primary);
  font-feature-settings: 'tnum' 1, 'cv11' 1;
}
#tab-apex.hidden, #tab-space.hidden { display: none !important; }
.main-tabs { display: flex; gap: 8px; margin: 0 0 16px; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.main-tabs button { font: 600 14px 'Inter', 'DM Sans', sans-serif; background: var(--bg-elevated); color: var(--text-secondary); border: 1px solid var(--border); border-radius: 8px; padding: 8px 16px; cursor: pointer; }
.main-tabs button:hover { color: var(--text-primary); border-color: #f97316; }
.main-tabs button.on { color: #fff; background: rgba(249,115,22,.16); border-color: #f97316; }

.ax-layout { display: grid; grid-template-columns: minmax(380px, 460px) 1fr; gap: 18px; align-items: start; }
.ax-side { position: sticky; top: 12px; max-height: calc(100vh - 24px); display: flex; flex-direction: column; gap: 10px; }
.ax-main { min-width: 0; }
@media (max-width: 1100px) { .ax-layout { grid-template-columns: 1fr; } .ax-side { position: static; max-height: none; } }

/* ── contrôles ── */
#tab-apex input[type=search], #tab-apex select { background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font: 500 14px 'Inter', sans-serif; }
#tab-apex input[type=search] { width: 100%; }
.ax-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.ax-chip, .ax-btn { font: 600 13px 'Inter', sans-serif; background: var(--bg-elevated); color: var(--text-secondary); border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; cursor: pointer; white-space: nowrap; }
.ax-btn { border-radius: 8px; color: var(--text-primary); padding: 7px 13px; }
.ax-chip:hover, .ax-btn:hover { border-color: var(--ax); color: #fff; }
.ax-chip.on { color: #fff; background: var(--ax-soft); border-color: var(--ax); }
.ax-btn.primary { background: var(--ax); border-color: var(--ax); color: #1a0d03; }
.ax-btn.primary:hover { background: var(--ax-2); }
.ax-count { font-size: 13px; color: var(--text-secondary); }
#tab-apex button:focus-visible, #tab-apex input:focus-visible, #tab-apex select:focus-visible { outline: 2px solid var(--ax); outline-offset: 2px; }

/* ── liste ── */
.ax-list { overflow: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card); }
.ax-row { border-bottom: 1px solid var(--border-soft); }
.ax-row-h { display: flex; gap: 10px; align-items: center; padding: 9px 12px; cursor: pointer; flex-wrap: wrap; transition: background .12s; }
.ax-row-h:hover { background: rgba(249,115,22,.07); }
.ax-row.open > .ax-row-h { background: var(--ax-soft); box-shadow: inset 3px 0 0 var(--ax); }
.ax-row.sel > .ax-row-h { box-shadow: inset 3px 0 0 var(--ax); }
.ax-plate { font: 700 14px 'JetBrains Mono', ui-monospace, Menlo, monospace; letter-spacing: .02em; }
.ax-sub { font-size: 12px; color: var(--text-secondary); }
.ax-grow { flex: 1; }
.ax-score { display: inline-block; min-width: 38px; text-align: center; padding: 2px 8px; border-radius: 6px; font-weight: 700; font-size: 13px; }
.ax-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .28s ease; }
.ax-row.open > .ax-wrap { grid-template-rows: 1fr; }
.ax-wrap > div { overflow: hidden; }
.ax-wrap-in { padding: 4px 12px 14px; display: grid; gap: 12px; }
.ax-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .ax-cols { grid-template-columns: 1fr; } }
.ax-col h5 { font: 700 12px 'Inter', sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--ax-2); margin-bottom: 8px; display: flex; justify-content: space-between; gap: 6px; }
.ax-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ax-mini div { background: var(--bg-base); border: 1px solid var(--border-soft); border-radius: 8px; padding: 7px 9px; cursor: pointer; transition: border-color .12s; }
.ax-mini div:hover { border-color: var(--ax); }
.ax-mini b { display: block; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.ax-mini span { font-size: 11.5px; color: var(--text-secondary); }
.ax-meter { height: 8px; background: var(--bg-elevated); border-radius: 4px; position: relative; overflow: hidden; margin: 6px 0 2px; }
.ax-meter i { position: absolute; inset: 0 auto 0 0; background: var(--ax-blue); border-radius: 4px; }
.ax-meter u { position: absolute; top: -2px; bottom: -2px; width: 2px; background: #fff; opacity: .8; }

/* ── zone de travail ── */
.ax-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.ax-crumbs { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; min-height: 22px; }
.ax-crumbs a { color: var(--text-secondary); cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.ax-crumbs a:hover { color: #fff; background: var(--ax-soft); }
.ax-crumbs b { color: var(--text-primary); padding: 2px 6px; }
.ax-crumbs i { color: var(--text-muted); font-style: normal; }
.ax-stage { position: relative; perspective: 1400px; }
.ax-layer { transform-origin: var(--ox, 50%) var(--oy, 20%); }
.ax-layer.in { animation: axIn .42s cubic-bezier(.2,.75,.2,1) both; }
.ax-layer.out { animation: axOut .38s cubic-bezier(.2,.75,.2,1) both; }
@keyframes axIn { from { opacity: 0; transform: scale(.9) translateZ(-60px); filter: blur(5px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes axOut { from { opacity: 0; transform: scale(1.08); filter: blur(5px); } to { opacity: 1; transform: none; filter: none; } }
.ax-stage.d1 .ax-layer > .ax-head { box-shadow: 0 -6px 0 -2px rgba(249,115,22,.18); }
.ax-stage.d2 .ax-layer > .ax-head { box-shadow: 0 -6px 0 -2px rgba(249,115,22,.18), 0 -12px 0 -4px rgba(249,115,22,.1); }
.ax-stage.d3 .ax-layer > .ax-head { box-shadow: 0 -6px 0 -2px rgba(249,115,22,.18), 0 -12px 0 -4px rgba(249,115,22,.1), 0 -18px 0 -6px rgba(249,115,22,.06); }
@media (prefers-reduced-motion: reduce) { .ax-layer.in, .ax-layer.out { animation: none; } .ax-wrap { transition: none; } }

.ax-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.ax-card h3 { font: 700 13px 'Inter', sans-serif; letter-spacing: .05em; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 12px; display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.ax-card h3 em { font-style: normal; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text-muted); font-size: 12.5px; }
.ax-head { display: flex; gap: 16px; align-items: stretch; flex-wrap: wrap; margin-bottom: 14px; }
.ax-id { flex: 1 1 480px; position: relative; border-left: 4px solid var(--ax); }
.ax-id .kind { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ax-2); }
.ax-id h2 { font: 700 30px 'Inter', sans-serif; letter-spacing: -.01em; margin: 4px 0 8px; }
.ax-meta { display: flex; gap: 6px 22px; flex-wrap: wrap; font-size: 13px; color: var(--text-secondary); }
.ax-meta b { color: var(--text-primary); font-weight: 600; }
.ax-meta a, .ax-card a, .ax-tbl a { color: var(--ax-2); cursor: pointer; text-decoration: none; }
.ax-meta a:hover, .ax-card a:hover, .ax-tbl a:hover { text-decoration: underline; }
.ax-status { display: inline-block; padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 700; letter-spacing: .04em; border: 1px solid currentColor; }
.ax-gauge { flex: 0 0 230px; text-align: center; }
.ax-gauge svg { width: 100%; display: block; }
.ax-gauge .zone { font-weight: 700; font-size: 13px; letter-spacing: .04em; margin-top: -6px; }
.ax-gauge .note { font-size: 12px; color: var(--text-secondary); }
.ax-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 14px; }
.ax-kpi { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 13px 15px; cursor: pointer; transition: border-color .14s, transform .14s, background .14s; position: relative; }
.ax-kpi:hover { border-color: var(--ax); background: #17233a; transform: translateY(-2px); }
.ax-kpi.static { cursor: default; } .ax-kpi.static:hover { transform: none; border-color: var(--border); background: var(--bg-card); }
.ax-kpi .l { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.ax-kpi .v { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin-top: 3px; }
.ax-kpi .s { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.ax-kpi .go { position: absolute; right: 12px; top: 12px; color: var(--ax); opacity: 0; transition: opacity .14s; font-size: 14px; }
.ax-kpi:hover .go { opacity: 1; }
.ax-grid { display: grid; gap: 14px; }
.ax-g2 { grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); }
.ax-ok { color: var(--ax-blue); } .ax-warn { color: var(--ax-amber); } .ax-bad { color: var(--ax-red); } .ax-mut { color: var(--text-muted); } .ax-or { color: var(--ax-2); }

/* ── tables ── */
.ax-tw { overflow: auto; max-height: 420px; border-radius: 8px; }
.ax-tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ax-tbl th { font-size: 12px; font-weight: 600; color: var(--text-secondary); text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg-card); cursor: pointer; white-space: nowrap; z-index: 2; }
.ax-tbl th:hover { color: var(--ax-2); }
.ax-tbl td { padding: 8px 10px; border-bottom: 1px solid var(--border-soft); white-space: nowrap; }
.ax-tbl td.n, .ax-tbl th.n { text-align: right; font-variant-numeric: tabular-nums; }
.ax-tbl tr.click { cursor: pointer; }
.ax-tbl tr.click:hover { background: rgba(249,115,22,.08); }
.ax-tbl td.wrap { white-space: normal; max-width: 420px; }
.ax-empty { color: var(--text-muted); font-size: 13px; padding: 6px 0; }
details.ax-d { margin-top: 8px; } details.ax-d summary { cursor: pointer; font-weight: 600; font-size: 13.5px; padding: 6px 0; color: var(--text-secondary); } details.ax-d summary:hover { color: var(--ax-2); }

/* ── graphiques ── */
.ax-ch { position: relative; }
.ax-ch-bar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.ax-ch-bar .sp { flex: 1; }
.ax-ch svg { width: 100%; height: auto; display: block; overflow: visible; }
.ax-ch .hit { fill: transparent; cursor: pointer; }
.ax-ch .hit:hover { fill: rgba(249,115,22,.08); }
.ax-ch text { font-family: 'Inter', sans-serif; fill: #93a4bd; font-size: 11.5px; }
.ax-ch .val { fill: #e5edf8; font-weight: 600; font-size: 11px; }
.ax-ch .grid { stroke: #223049; stroke-width: 1; }
.ax-ch .xh { stroke: var(--ax); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; pointer-events: none; }
.ax-ch .thr { stroke: var(--ax-red); stroke-width: 1.5; stroke-dasharray: 6 4; }
.ax-leg { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; font-size: 12.5px; }
.ax-leg button { background: none; border: 0; color: var(--text-secondary); cursor: pointer; font: 500 12.5px 'Inter', sans-serif; display: inline-flex; gap: 6px; align-items: center; padding: 2px 4px; border-radius: 4px; }
.ax-leg button:hover { color: #fff; }
.ax-leg button.off { opacity: .4; text-decoration: line-through; }
.ax-leg i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
#ax-tip { position: fixed; z-index: 1000; pointer-events: none; background: #0b1220; border: 1px solid var(--ax-line); border-radius: 8px; padding: 8px 11px; font: 500 12.5px 'Inter', sans-serif; color: #e5edf8; box-shadow: 0 10px 30px rgba(0,0,0,.5); display: none; max-width: 300px; }
#ax-tip b { display: block; margin-bottom: 4px; font-size: 13px; }
#ax-tip div { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
#ax-tip i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; margin-right: 6px; }
.ax-strip { cursor: pointer; }
.ax-strip svg { width: 100%; display: block; background: #0a111c; border-radius: 4px; }
.ax-strip .months { position: relative; height: 16px; font-size: 11.5px; color: var(--text-muted); margin-top: 3px; }
.ax-strip .months span { position: absolute; }
.ax-pillar { margin-bottom: 11px; cursor: pointer; }
.ax-pillar:hover .t span:first-child { color: var(--ax-2); }
.ax-pillar .t { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; }
.ax-pillar .b { height: 8px; background: var(--bg-elevated); border-radius: 4px; overflow: hidden; }
.ax-pillar .b span { display: block; height: 100%; background: var(--ax); width: 0; transition: width .9s cubic-bezier(.2,.8,.2,1); }
.ax-note { font-size: 13px; color: var(--text-secondary); line-height: 1.55; }
.ax-gap { border-left: 3px solid var(--ax-amber); padding: 10px 14px; background: var(--bg-card); margin-bottom: 10px; border-radius: 0 8px 8px 0; }
.ax-gap h4 { font-size: 14px; margin-bottom: 3px; } .ax-gap.crit { border-color: var(--ax-red); } .ax-gap.low { border-color: var(--ax-blue); } .ax-gap.done { border-color: #64748b; opacity: .75; }
.ax-live { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ax-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: #64748b; }
.ax-dot.on { background: var(--ax); box-shadow: 0 0 0 3px rgba(249,115,22,.25); }

/* ── agrandir / zoom / drill visibles ── */
.ax-modal { position: fixed; inset: 0; background: rgba(3,7,14,.84); z-index: 900; display: flex; align-items: center; justify-content: center; padding: 3vh 3vw; }
.ax-modal[hidden] { display: none; }
.ax-modal-card { width: min(1700px, 100%); max-height: 94vh; overflow: auto; background: var(--bg-card); border: 1px solid var(--ax-line); border-radius: 14px; padding: 18px 24px 22px; animation: axIn .3s cubic-bezier(.2,.75,.2,1) both; }
.ax-modal-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.ax-modal-title { font-size: 16px; text-transform: capitalize; }
.ax-ch.has-drill .hit { cursor: pointer; }
.ax-ch:not(.has-drill) .hit { cursor: crosshair; }
.ax-ch .hit:hover { fill: rgba(249,115,22,.14); }

/* ── alignement : lignes de liste en grille, note dans un carré à gauche ── */
.ax-row-h { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 12px; }
.ax-sq { width: 52px; height: 52px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font: 700 21px 'Inter', sans-serif; font-variant-numeric: tabular-nums;
  color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border: 1.5px solid color-mix(in srgb, var(--c) 55%, transparent); cursor: pointer; transition: box-shadow .12s, transform .12s; }
.ax-sq:hover { box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 28%, transparent); transform: scale(1.04); }
.ax-sq.none { cursor: default; color: var(--text-muted); border-style: dashed; }
.ax-sq.none:hover { box-shadow: none; transform: none; }
.ax-rmain { min-width: 0; display: grid; gap: 5px; }
.ax-rl1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 22px; }
.ax-rl2 { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; min-height: 22px; }
.ax-ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ax-name { font-weight: 700; font-size: 14.5px; }
.ax-mp { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 28px; padding: 0 8px; border-radius: 7px; font: 700 14px 'Inter', sans-serif; font-variant-numeric: tabular-nums; cursor: pointer;
  color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 50%, transparent); }
.ax-mp.sm { min-width: 34px; height: 22px; font-size: 12.5px; border-radius: 6px; }
.ax-mp:hover { box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 28%, transparent); }
.ax-mp.none { cursor: default; color: var(--text-muted); border-style: dashed; }
.ax-row-h .ax-plate { min-width: 96px; }

/* mini-fiche : deux colonnes identiques, mêmes hauteurs de ligne */
.ax-cols { align-items: stretch; }
.ax-col { display: flex; flex-direction: column; min-width: 0; }
.ax-col h5 { align-items: center; height: 30px; margin-bottom: 8px; }
.ax-colsub { min-height: 42px; font-size: 12.5px; line-height: 1.5; color: var(--text-secondary); margin-bottom: 8px; }
.ax-colsub b { color: var(--text-primary); }
.ax-mini { grid-auto-rows: 1fr; }
.ax-mini div { min-height: 68px; display: flex; flex-direction: column; justify-content: center; }
.ax-colx { min-height: 36px; margin-top: 8px; }
.ax-colbtn { margin-top: auto; padding-top: 8px; }
.ax-colbtn .ax-btn { width: 100%; }

/* cartes KPI : toutes à la même hauteur, valeur et sous-texte alignés */
.ax-kpis { grid-auto-rows: 1fr; }
.ax-kpi { display: grid; grid-template-rows: auto auto 1fr; align-content: start; min-height: 112px; }
.ax-kpi .s { align-self: end; }
.ax-head > .ax-card { display: flex; flex-direction: column; justify-content: center; }
.ax-gauge.clickable { cursor: pointer; transition: border-color .14s, background .14s; }
.ax-gauge.clickable:hover { border-color: var(--ax); background: #17233a; }
.ax-card h3 { min-height: 22px; }
.ax-tbl td, .ax-tbl th { vertical-align: middle; }
.ax-strip .ax-leg { margin-top: 6px; }
.ax-colsub { height: 44px; overflow: hidden; }
.ax-colsub > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ax-kpis { grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); }
.ax-ch-bar { flex-wrap: wrap; gap: 6px; }
.ax-ch-bar .ax-chip { padding: 4px 10px; font-size: 12px; }

/* ── statut épuré ── */
.ax-rl1 { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.ax-st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--text-secondary); white-space: nowrap; }
.ax-st i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* ── véhicule = orange, chauffeur = indigo (teintes légères) ── */
.ax-col { padding: 10px; border-radius: 10px; border: 1px solid transparent; border-top-width: 3px; }
.ax-col.veh { background: color-mix(in srgb, #f97316 5%, transparent); border-color: rgba(249,115,22,.22); border-top-color: #f97316; }
.ax-col.drv { background: color-mix(in srgb, #818cf8 6%, transparent); border-color: rgba(129,140,248,.26); border-top-color: #818cf8; }
.ax-col.drv h5 { color: #a5b4fc; }
.ax-col.veh .ax-mini div { border-color: rgba(249,115,22,.16); }
.ax-col.drv .ax-mini div { border-color: rgba(129,140,248,.2); }
.ax-col.veh .ax-mini div:hover { border-color: #f97316; }
.ax-col.drv .ax-mini div:hover { border-color: #818cf8; }
.ax-layer[data-kind="veh"] .ax-kpi, .ax-layer[data-kind="veh"] .ax-card:not(.ax-id):not(.ax-gauge) { background: color-mix(in srgb, #f97316 3.5%, var(--bg-card)); }
.ax-layer[data-kind="drv"] .ax-kpi, .ax-layer[data-kind="drv"] .ax-card:not(.ax-id):not(.ax-gauge) { background: color-mix(in srgb, #818cf8 5%, var(--bg-card)); border-color: rgba(129,140,248,.2); }
.ax-layer[data-kind="drv"] .ax-id { border-left-color: #818cf8; }
.ax-layer[data-kind="drv"] .ax-id .kind, .ax-layer[data-kind="drv"] .ax-meta a, .ax-layer[data-kind="drv"] .ax-card a { color: #a5b4fc; }
.ax-layer[data-kind="drv"] .ax-kpi:hover { border-color: #818cf8; }
.ax-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ax-mini { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.ax-mini div { padding: 6px 8px; min-width: 0; }
.ax-mini b { font-size: 17px; }
.ax-wrap-in { padding: 4px 8px 12px; }
@media (max-width: 560px) { .ax-cols { grid-template-columns: minmax(0, 1fr); } }

/* ── classement horizontal (Ops) ── */
.ax-hb-leg { display: flex; gap: 18px; font-size: 12.5px; color: var(--text-secondary); margin: -4px 0 10px; }
.ax-hb-leg i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.ax-hbars { display: grid; gap: 4px; }
.ax-hb { display: grid; grid-template-columns: minmax(180px, 280px) minmax(0, 1fr); gap: 14px; align-items: center; padding: 7px 10px; border-radius: 8px; cursor: pointer; transition: background .12s; }
.ax-hb:hover { background: rgba(249,115,22,.08); }
.ax-hb-n { min-width: 0; display: grid; }
.ax-hb-n b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ax-hb-n small { font-size: 11.5px; color: var(--text-muted); }
.ax-hb-bars { display: grid; gap: 4px; }
.ax-hb-bar { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 8px; align-items: center; }
.ax-hb-bar b { font-size: 13px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.ax-hb-track { position: relative; height: 12px; background: var(--bg-elevated); border-radius: 6px; overflow: hidden; }
.ax-hb-track span { position: absolute; inset: 0 auto 0 0; border-radius: 6px; opacity: .92; }
.ax-hb-track u { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,.35); }
@media (max-width: 700px) { .ax-hb { grid-template-columns: minmax(0, 1fr); } }

/* chiffres toujours lisibles sur les graphiques : contour de la couleur du fond */
.ax-ch .val { paint-order: stroke; stroke: #0d1522; stroke-width: 3px; stroke-linejoin: round; }
.ax-ch text.val { font-size: 11px; }
.ax-tbl tr.ax-focus { background: rgba(249,115,22,.16); box-shadow: inset 3px 0 0 var(--ax); }
.ax-tbl th[data-relayer]:hover { color: var(--ax-2); }
.ax-tbl tr.ax-total td { background: rgba(249,115,22,.07); border-bottom: 1px solid var(--ax-line); position: sticky; top: 33px; z-index: 1; }
a.ax-chip { text-decoration: none; display: inline-block; }

/* aide intégrée (cohortes) */
details.ax-help { margin: 0 0 12px; border: 1px solid var(--ax-line); border-radius: 10px; background: color-mix(in srgb, #f97316 5%, var(--bg-card)); padding: 8px 14px; }
details.ax-help summary { cursor: pointer; font-weight: 700; font-size: 13.5px; color: var(--ax-2); list-style: none; }
details.ax-help summary::-webkit-details-marker { display: none; }
details.ax-help[open] summary { margin-bottom: 8px; }
details.ax-help .ax-note { line-height: 1.75; color: var(--text-primary); }
.ax-hm-leg { display: grid; grid-template-columns: auto auto 200px auto 1fr; gap: 10px; align-items: center; font-size: 12.5px; color: var(--text-secondary); margin: 0 0 10px; }
.ax-hm-leg i { height: 12px; border-radius: 6px; background: linear-gradient(to right, rgba(249,115,22,.1), rgba(249,115,22,.95)); }
.ax-hm-leg em { font-style: normal; color: var(--text-muted); text-align: right; }
