/* Page Taxis : démo interactive (fenêtre .appwin de project.css) et graphiques des résultats. */
.appwin canvas { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; background: #ffffff; }

/* ---- Commandes de la démo ---- */
.taxi-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; max-width: 820px; }
.taxi-group { display: flex; flex-wrap: wrap; gap: 8px; }
.taxi-controls .sep { width: 1px; align-self: stretch; background: var(--line-strong); margin: 0 4px; }
.pill[disabled] { opacity: .45; cursor: not-allowed; }
#taxiPlay .on, #taxiPlay[aria-pressed="true"] .off { display: none; }
#taxiPlay[aria-pressed="true"] .on { display: inline; }
.taxi-controls label.speed { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .9rem; margin-left: auto; }
.taxi-controls input[type=range] { width: 110px; accent-color: var(--solution); }
@media (max-width: 620px) { .taxi-controls label.speed { margin-left: 0; } .taxi-controls .sep { display: none; } }

/* ---- Compteurs : courses terminées par taxi ---- */
.taxi-stats { margin-top: 16px; max-width: 820px; }
.taxi-clock { color: var(--text); margin: 0 0 8px; font-variant-numeric: tabular-nums; }
.taxi-tasks { color: var(--muted); }
.taxi-row { display: grid; grid-template-columns: 4.2em minmax(0, 1fr) 12.5em; gap: 12px; align-items: center; padding: 3px 0;
            font-size: .92rem; color: var(--muted); }
.taxi-row .who { color: var(--text); }
.taxi-row .meter { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.taxi-row .meter i { display: block; height: 100%; background: var(--solution); border-radius: 0 4px 4px 0; transition: width .2s; }
.taxi-row .num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
@media (max-width: 520px) {
  .taxi-row { grid-template-columns: 4em minmax(0, 1fr); row-gap: 2px; }
  .taxi-row .num { grid-column: 2; text-align: left; }
}

/* ---- Graphiques : barres horizontales (≤ 24 px, bout arrondi 4 px, 2 px entre deux barres) ---- */
.chart-metric { margin: 0 0 22px; }
.charts { display: grid; gap: 34px; max-width: 820px; }
.hchart-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 18px; margin-bottom: 10px; }
.hchart-head h3 { font: 600 1rem/1.4 var(--sans); color: var(--text); margin: 0; }
.hchart-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; color: var(--muted); font-size: .88rem; }
.hchart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.hchart-legend i { width: 16px; height: 3px; border-radius: 2px; }
.hchart-plot { --scale: calc(100% - 5.8em); display: grid; grid-template-columns: 4.6em minmax(0, 1fr); column-gap: 12px; }
.hchart-label { color: var(--body); font-size: .92rem; align-self: center; }
.hchart-axis { position: relative; height: 1.5em; color: var(--muted); font: 500 .74rem var(--mono); }
.hchart-axis span { position: absolute; bottom: 2px; transform: translateX(-50%); white-space: nowrap; }
.hchart-axis span:first-child { transform: none; }
.hchart-track { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 7px 0; border-radius: 4px; outline: none; }
.hchart-track:hover, .hchart-track:focus-visible { background: color-mix(in srgb, var(--surface) 70%, transparent); }
.hchart-track:focus-visible { box-shadow: 0 0 0 2px var(--line-strong); }
.hchart-ticks { position: absolute; inset: 0; pointer-events: none; }
.hchart-ticks i { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
.hchart-bar { position: relative; display: flex; align-items: center; gap: 7px; height: 14px; }
.hchart-bar i { display: block; height: 100%; border-radius: 0 4px 4px 0; flex: none; }
.hchart-bar span { color: var(--text); font: 500 .78rem var(--mono); white-space: nowrap; font-variant-numeric: tabular-nums; }
.hchart-tip { position: absolute; z-index: 20; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px;
              padding: 8px 10px; box-shadow: 0 8px 24px rgba(0,0,0,.45); pointer-events: none; min-width: 11em; }
.hchart-tip[hidden] { display: none; }
.hchart-tip p { margin: 0; font-size: .85rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.hchart-tip .tip-cat { color: var(--text); font-weight: 600; margin-bottom: 4px; }
.hchart-tip b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.hchart-tip i { width: 14px; height: 3px; border-radius: 2px; flex: none; }

/* ---- Vue tableau ---- */
.chart-data { margin-top: 22px; max-width: 820px; color: var(--muted); }
.chart-data summary { cursor: pointer; color: var(--body); font-size: .92rem; }
.chart-table { overflow-x: auto; margin-top: 10px; }
.chart-table table { border-collapse: collapse; font-size: .88rem; min-width: 100%; }
.chart-table th, .chart-table td { text-align: left; padding: 6px 12px 6px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.chart-table th { color: var(--text); font-weight: 600; }
.chart-table td:nth-child(n+3) { font-variant-numeric: tabular-nums; text-align: right; }
.chart-table th:nth-child(n+3) { text-align: right; }
