/* Page « Transit » (transit.html). Chargé après style.css et simulateur.css (panneau, blocs), avant carte-sombre.css.
   Couleurs : transit en rouge, déplacements du Plateau en bleu ; débits de la carte dans js/transit.js. */

:root { --tr-transit: #dc2626; --tr-local: #2563eb; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --tr-transit: #f87171; --tr-local: #60a5fa; } }

.transit { --sidebar-w: 380px; }
.transit .pe-note { margin: 0 0 8px; font-size: .74rem; line-height: 1.45; color: var(--ink-500); }

.tr-gros { margin: 0 0 8px; font-size: .95rem; line-height: 1.4; color: var(--ink-700); }
.tr-gros b { color: var(--tr-transit); font-family: 'Poppins', 'Inter', sans-serif; }
#motorisation .tr-gros b, #od .tr-gros b { color: var(--tr-local); }   /* ménages du Plateau : couleur des résidents */

.tr-cartes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.tr-carte { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--glass-border); background: var(--glass-strong); }
.tr-carte b { font-family: 'Poppins', 'Inter', sans-serif; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.tr-carte span { font-size: .74rem; line-height: 1.35; color: var(--ink-700); }
.tr-carte small { font-size: .68rem; color: var(--ink-500); }
.tr-carte.tr-local b { color: var(--tr-local); }
.tr-carte.tr-transit b { color: var(--tr-transit); }

.tr-barre { display: flex; height: 14px; border-radius: 7px; overflow: hidden; margin: 2px 0 6px; background: var(--hairline); }
.tr-barre span { display: block; height: 100%; }
.tr-barre .tr-local, .repartition-legende i.tr-local, .gf-summary-item i.tr-local { background: var(--tr-local); }
.tr-barre .tr-transit, .repartition-legende i.tr-transit, .gf-summary-item i.tr-transit { background: var(--tr-transit); }
.transit .repartition-legende { margin-bottom: 8px; }

.transit .pe-table { width: 100%; border-collapse: collapse; margin: 0 0 8px; font-size: .78rem; }
.transit .pe-table th, .transit .pe-table td { padding: 6px 4px; border-bottom: 1px solid var(--hairline); text-align: right; font-variant-numeric: tabular-nums; }
.transit .pe-table thead th { font-size: .7rem; font-weight: 700; color: var(--ink-500); }
.transit .pe-table th[scope="row"] { text-align: left; font-weight: 600; color: var(--ink-700); }

/* Légende : en haut à droite, repliable */
.tr-legende-flottante {
  position: fixed; top: calc(16px + var(--gf-header-h, 60px)); right: 16px; z-index: 500; width: 220px;
  border-radius: 14px; border: 1px solid var(--glass-border); background: var(--glass-strong);
  box-shadow: var(--shadow-md, 0 6px 20px rgba(0, 0, 0, .12)); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.tr-legende-flottante summary { cursor: pointer; padding: 10px 14px; font-size: .78rem; font-weight: 700; color: var(--ink-700); list-style: none; }
.tr-legende-flottante summary::-webkit-details-marker { display: none; }
.tr-legende-flottante summary::before { content: '▸ '; color: var(--ink-500); }
.tr-legende-flottante[open] summary::before { content: '▾ '; }
.tr-legende-flottante .legende { padding: 0 14px 10px; }
@media (max-width: 760px) {
  .tr-legende-flottante { top: calc(20px + var(--gf-header-h, 60px)); right: 10px; width: min(220px, calc(100vw - 80px)); }
  .tr-cartes { grid-template-columns: 1fr; }
  .transit .gf-summary { bottom: calc(26px + env(safe-area-inset-bottom, 0px)); }
}
.transit .pe-table thead th:first-child { text-align: left; }
