/* Graphiques du design system (/lafabrik/graphiques.js) : bulle de survol, légende, barres
   rangées, carte de chaleur, barre segmentée. Le texte garde les couleurs d'encre ; seules les
   marques prennent la couleur des données. */
.lf-graph-vide { color: var(--encre-douce); margin: 0; }
.lf-graph-sous { display: block; font-size: 13px; color: var(--encre-douce); }
.lf-graph-defile { overflow-x: auto; }
.lf-graph-barres { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lf-graph-barre { display: grid; grid-template-columns: minmax(0, 13rem) minmax(0, 1fr) 2.5rem; align-items: center; gap: 10px; font-size: 14px; }
.lf-graph-barre:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.lf-graph-cible { cursor: default; outline: none; }
.lf-graph-cible:focus-visible { outline: 2px solid var(--focus); }
svg .lf-graph-cible:hover circle:last-child, svg .lf-graph-cible:focus circle:last-child { stroke: #1c1917; }
.lf-graph-legende { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--encre-douce); }
.lf-graph-legende li { display: inline-flex; align-items: center; gap: 6px; }
.lf-graph-bulle { position: fixed; z-index: 50; pointer-events: none; max-width: 300px; padding: 8px 10px; border-radius: 8px; background: #fff; color: var(--encre); box-shadow: 0 6px 24px #1c19172e, 0 0 0 1px var(--ligne); font-size: 13px; line-height: 18px; display: grid; gap: 3px; }
.lf-graph-bulle[hidden] { display: none; }
.lf-graph-chaleur { border-collapse: separate; border-spacing: 2px; font-size: 13px; }
.lf-graph-chaleur th { font-weight: 500; color: var(--encre-douce); padding: 4px 8px; text-align: left; white-space: nowrap; }
.lf-graph-chaleur thead th { vertical-align: bottom; text-align: center; }
.lf-graph-chaleur tbody th { max-width: 230px; white-space: normal; line-height: 17px; }
.lf-graph-segments { display: flex; gap: 2px; height: 28px; }
.lf-graph-segment { display: flex; align-items: center; padding-left: 8px; border-radius: 4px; font-size: 12px; font-weight: 500; white-space: nowrap; overflow: visible; min-width: 4px; }
.lf-graph-segment:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.lf-graph-legende-texte { margin: 8px 0 0; font-size: 13px; color: var(--encre-douce); }
.lf-graph-repere { color: var(--encre); font-size: 10px; }
.lf-graph-barre__nom { overflow-wrap: anywhere; line-height: 18px; }
.lf-graph-barre__piste { height: 10px; border-radius: 0 4px 4px 0; background: var(--piste); overflow: hidden; }
.lf-graph-barre__plein { display: block; height: 100%; border-radius: 0 4px 4px 0; background: #2a78d6; }
.lf-graph-barre__n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; color: var(--encre); }
.lf-graph-legende__cle { display: inline-block; flex: none; }
.lf-graph-legende__cle--carre { width: 10px; height: 10px; border-radius: 3px; }
.lf-graph-legende__cle--ligne { width: 16px; height: 3px; border-radius: 2px; }
.lf-graph-bulle__titre { font-weight: 600; margin-bottom: 2px; }
.lf-graph-bulle__ligne { display: flex; align-items: center; gap: 8px; }
.lf-graph-bulle__ligne strong { font-variant-numeric: tabular-nums; }
.lf-graph-bulle__ligne span:last-child { color: var(--encre-douce); }
.lf-graph-bulle__cle { width: 12px; height: 3px; border-radius: 2px; flex: none; }
.lf-graph-bulle__detail { color: var(--encre-douce); font-size: 12px; }
.lf-graph-chaleur__entete { display: inline-flex; gap: 5px; align-items: baseline; }
.lf-graph-chaleur__case { min-width: 52px; height: 34px; text-align: center; border-radius: 4px; font-weight: 500; font-variant-numeric: tabular-nums; }
.lf-graph-chaleur__case--vide { background: var(--surface-douce); }
.lf-graph-chaleur__case:focus-visible { outline: 2px solid var(--focus); }
@media (max-width: 640px) {
    .lf-graph-barre { grid-template-columns: minmax(0, 7rem) minmax(0, 1fr) 2rem; }
}
/* Histogramme par tranches (histogrammeTranches) : colonnes de même largeur, 2 px d'air entre elles */
.lf-graph-histo { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; align-items: end; min-height: 112px; }
.lf-graph-histo__col { display: grid; grid-template-rows: 18px 64px auto; justify-items: stretch; text-align: center; }
.lf-graph-histo__n { font-size: 12px; font-weight: 600; color: var(--encre); font-variant-numeric: tabular-nums; }
.lf-graph-histo__piste { display: flex; align-items: flex-end; border-bottom: 1px solid var(--ligne-forte); }
.lf-graph-histo__barre { display: block; width: 100%; max-width: 24px; margin: 0 auto; border-radius: 4px 4px 0 0; }
.lf-graph-histo__libelle { padding-top: 4px; font-size: 11px; line-height: 13px; color: var(--encre-douce); overflow-wrap: anywhere; }
.lf-graph-histo__col:hover .lf-graph-histo__barre, .lf-graph-histo__col:focus-visible .lf-graph-histo__barre { filter: brightness(.92); }
