/* ── Page lignes ─────────────────────────────────────────────────────────── */

.lignes-page {
  flex: 1;
  padding: var(--space-md);
}

.lignes-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-xl);
  color: var(--color-text-muted);
  min-height: 200px;
}

.lignes-content {
  max-width: 900px;
  margin: 0 auto;
}

/* ── Sélecteur de ligne ──────────────────────────────────────────────────── */

.ligne-selector {
  margin-bottom: var(--space-md);
}

.ligne-discs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}

.ligne-disc {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: -0.03em;
  cursor: pointer;
  border: 3px solid transparent;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  flex-shrink: 0;
  line-height: 1;
}

.ligne-disc:hover,
.ligne-disc:focus-visible {
  transform: scale(1.1);
  box-shadow: 0 0 0 2px var(--color-surface), 0 0 0 4px currentColor;
  outline: none;
}

.ligne-disc--selected {
  border-color: white;
  transform: scale(1.12);
  box-shadow: 0 0 0 2px var(--color-surface), 0 0 0 5px white;
}

/* ── Titre ligne courante ────────────────────────────────────────────────── */

.ligne-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-lg);
  min-height: 1.8rem;
}

/* ── Statistiques (2 cartes côte à côte) ────────────────────────────────── */

.ligne-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.stat-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.stat-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* ── Titres de section ───────────────────────────────────────────────────── */

.section-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-md);
}

/* ── Graphique en barres ─────────────────────────────────────────────────── */

.chart-section {
  margin-bottom: var(--space-xl);
}

.chart-container {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  padding: var(--space-md) var(--space-md) var(--space-sm);
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  height: 80px;
  gap: 2px;
}

.bar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  position: relative;
}

.bar-fill {
  width: 100%;
  background: var(--color-surface-2);
  border-radius: 2px 2px 0 0;
  transition: height 0.3s ease;
  min-height: 0;
}

.bar-fill--active {
  background: var(--color-accent);
}

.bar-fill--today {
  background: var(--color-success);
}

.bar-today-count {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--color-success);
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
}

.chart-empty {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  text-align: center;
  padding: var(--space-lg);
}

/* ── Responsive (desktop) ────────────────────────────────────────────────── */

@media (min-width: 768px) {
  .lignes-page {
    padding: var(--space-xl);
  }

  .bar-chart {
    height: 120px;
  }
}
