/* Pages statistiques (en plus de site.css ; classes absentes de tw.css, qui est précompilé) */

h2.section { font-size: 1.1rem; font-weight: 600; color: #fff; margin-bottom: 12px; }
.lead { color: #94a3b8; font-size: 0.95rem; line-height: 1.7; }
.lead strong { color: #e2e8f0; }

.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 768px) { .kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.cols-2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
@media (min-width: 768px) { .cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Graphiques SVG */
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: rgba(148,163,184,0.12); stroke-width: 1; }
.chart .axis { fill: #64748b; font-size: 11px; font-family: Inter, sans-serif; }
.chart .val { fill: #cbd5e1; font-size: 11px; font-weight: 600; font-family: Inter, sans-serif; }
/* Les graphiques pleine largeur (viewBox 720) sont réduits de moitié sur mobile : texte agrandi en unités SVG */
@media (max-width: 640px) { .chart.wide .axis, .chart.wide .val { font-size: 22px; } }
.chart .bar-g:hover path, .chart .bar-g:hover rect[fill^="#"] { opacity: 0.8; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; color: #94a3b8; margin-bottom: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }

/* Barres horizontales */
.hbars { display: flex; flex-direction: column; gap: 8px; }
.hbar-row { display: grid; grid-template-columns: minmax(0, 9rem) 1fr auto; align-items: center; gap: 10px; font-size: 13px; }
.hbar-label { color: #cbd5e1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { height: 10px; }
.hbar { display: block; height: 10px; border-radius: 0 4px 4px 0; }
.hbar-val { color: #cbd5e1; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Tableaux */
.tbl { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; color: #64748b; font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; padding: 8px 10px; border-bottom: 1px solid rgba(148,163,184,0.15); }
.tbl td { padding: 8px 10px; border-bottom: 1px solid rgba(148,163,184,0.07); color: #cbd5e1; font-variant-numeric: tabular-nums; }
.tbl tr:hover td { background: rgba(255,255,255,0.02); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(59,130,246,0.12); color: #93c5fd; text-decoration: none; }
.chip:hover { background: rgba(59,130,246,0.22); }
details summary::-webkit-details-marker { color: #64748b; }
/* Tableaux des demi-colonnes : pas de largeur minimale (sinon la dernière colonne sort du cadre) */
.tbl.compact { min-width: 0; }

/* Recherche de trains : encart mis en avant, formulaire au format de la page remboursement */
.search-hero { border-radius: 0.75rem; padding: 24px; border: 1px solid rgba(59,130,246,0.35);
    background: linear-gradient(135deg, rgba(37,99,235,0.16), rgba(17,19,28,0.9) 60%); }
@media (min-width: 768px) { .search-hero { padding: 28px 32px; } }
.sform-title { font-size: 1.25rem; font-weight: 700; color: #fff; line-height: 1.3; margin: 0; }
.sform-help { font-size: 0.875rem; color: #94a3b8; margin: 6px 0 18px; line-height: 1.6; }
.sform-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 640px) { .sform-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .sform-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sform label { display: block; font-size: 12px; color: #94a3b8; margin-bottom: 4px; }
.sform input, .sform select { width: 100%; background: rgba(11,13,20,0.9); border: 1px solid rgba(96,165,250,0.3); color: #f1f5f9;
    font-size: 15px; padding: 11px 12px; border-radius: 8px; transition: border-color 0.15s, box-shadow 0.15s; }
.sform input::placeholder { color: #64748b; }
.sform input:focus, .sform select:focus { outline: none; border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(59,130,246,0.2); }
.sform-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.sform button { background: #2563eb; color: #fff; font-weight: 600; font-size: 15px; padding: 11px 24px; border-radius: 8px; border: 0; cursor: pointer; }
.sform button:hover { background: #3b82f6; }
.sform-reset { display: inline-block; background: #374151; color: #d1d5db; font-weight: 500; font-size: 15px; padding: 11px 24px; border-radius: 8px; }
.sform-reset:hover { background: #4b5563; }
.search-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; font-size: 13px; }
.search-chips span { color: #64748b; }
.search-chips a { padding: 5px 12px; border-radius: 999px; background: rgba(148,163,184,0.1); border: 1px solid rgba(148,163,184,0.2); color: #cbd5e1; }
.search-chips a:hover { background: rgba(59,130,246,0.18); border-color: rgba(96,165,250,0.5); color: #fff; }
