/* ============ Page Statistiques (présentations + finances) ============ */
.stx-shell { display: flex; flex-direction: column; gap: 18px; }
.stx-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.stx-period { display: inline-flex; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08); }
.stx-period-btn { padding: 9px 16px; font-size: 13px; font-weight: 700; color: #475569; background: #fff; text-decoration: none; transition: background .13s ease, color .13s ease; }
.stx-period-btn + .stx-period-btn { border-left: 1px solid #eef0f3; }
.stx-period-btn.is-on { background: #1e4fb0; color: #fff; }

.stx-section { display: flex; flex-direction: column; gap: 14px; }
.stx-section h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 18px; color: #16243e; }
.stx-section h3 { margin: 6px 0 0; font-size: 14px; font-weight: 800; color: #475569; }

.stx-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stx-gauge-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 10px; }
.stx-gauge-card span { font-size: 12px; font-weight: 700; color: #64748b; }

.stx-chart { display: flex; align-items: flex-end; gap: 8px; height: 180px; padding: 8px 4px 0; border-bottom: 1px solid #e6e9ef; overflow-x: auto; }
.stx-col { flex: 1 1 0; min-width: 40px; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.stx-bars { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 3px; width: 100%; min-height: 0; }
.stx-bar { width: 14px; max-width: 42%; border-radius: 5px 5px 0 0; min-height: 2px; transition: height .3s ease; }
.stx-bar.is-pass, .stx-bar.is-rev { background: linear-gradient(180deg, #25c065, #148a43); }
.stx-bar.is-fail, .stx-bar.is-exp { background: linear-gradient(180deg, #f0616d, #d22f3c); }
.stx-col-label { font-size: 10.5px; font-weight: 700; color: #8a929d; white-space: nowrap; }

.stx-legend { display: flex; gap: 18px; font-size: 12px; font-weight: 600; color: #475569; }
.stx-legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: middle; }
.stx-legend .dot.is-pass, .stx-legend .dot.is-rev { background: #1aa653; }
.stx-legend .dot.is-fail, .stx-legend .dot.is-exp { background: #e0414c; }

.stx-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.stx-table th { text-align: right; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; color: #8a929d; padding: 7px 10px; border-bottom: 1.5px solid #e6e9ef; }
.stx-table th:first-child, .stx-table td:first-child { text-align: left; }
.stx-table td { text-align: right; padding: 8px 10px; border-bottom: 1px solid #eef1f5; color: #33415c; }
.stx-table td.is-pass, .stx-table b.is-pass { color: #148a43; font-weight: 700; }
.stx-table td.is-fail, .stx-table b.is-fail { color: #d22f3c; font-weight: 700; }

.stx-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.stx-empty { font-size: 13px; color: #6b7280; font-style: italic; margin: 4px 0; }

@media (max-width: 760px) {
  .stx-grid2 { grid-template-columns: 1fr; }
  .stx-head { align-items: stretch; }
}
