/* ─── EDITORIAL PLAN CHARTS ──────────────────────────────────────────────── */

.ep-charts-section {
  margin-bottom: 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.ep-charts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
}

.ep-charts-header:hover { background: var(--bg3); }

.ep-charts-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text3);
}

.ep-charts-toggle {
  color: var(--text3);
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ep-charts-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ep-charts-body.collapsed { display: none; }

/* ─── LIGNE 1 — même hauteur ─────────────────────────────────────────────── */
.ep-charts-row1 {
  display: grid;
  grid-template-columns: 220px 220px 1fr;
  gap: 16px;
  align-items: stretch;
}

/* ─── DONUTS ─────────────────────────────────────────────────────────────── */
.ep-donut-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
}

.ep-donut-card-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text3);
  margin-bottom: 12px;
  flex-shrink: 0;
}

.ep-donut-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-height: 0;
}

.ep-donut-svg { flex-shrink: 0; }

.ep-donut-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.ep-donut-legend-item {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: var(--text2);
  min-width: 0;
}

.ep-donut-legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ep-donut-legend-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.ep-donut-legend-count {
  font-weight: 700;
  color: var(--text);
  font-size: 10px;
  text-align: right;
}

/* ─── FRISE TEMPORELLE ───────────────────────────────────────────────────── */
.ep-timeline-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
}

.ep-timeline-card-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text3);
  margin-bottom: 2px;
  flex-shrink: 0;
}

.ep-timeline-card-desc {
  font-size: 10px;
  color: var(--text3);
  margin-bottom: 8px;
  font-style: italic;
  flex-shrink: 0;
}

.ep-timeline-ws-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.ep-timeline-ws-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  color: var(--text3);
}

.ep-timeline-ws-legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.ep-timeline-scroll {
  overflow-x: auto;
  flex: 1;
  display: flex;
  align-items: flex-end;
}

.ep-timeline-grid {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  min-width: max-content;
  width: 100%;
  padding-bottom: 2px;
}

.ep-timeline-month {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex: 1;
  min-width: 28px;
}

.ep-timeline-bar-wrap {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1px;
  height: 60px;
  width: 14px;
}

.ep-timeline-segment {
  width: 100%;
  border-radius: 2px;
  transition: opacity 0.2s;
  cursor: default;
}

.ep-timeline-segment:hover { opacity: 0.75; }

.ep-timeline-count {
  font-size: 9px;
  color: var(--text3);
  font-weight: 600;
  line-height: 1;
}

.ep-timeline-month-label {
  font-size: 9px;
  color: var(--text3);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1;
}

.ep-timeline-month.is-current .ep-timeline-month-label { color: var(--accent); }
.ep-timeline-month.is-empty .ep-timeline-bar-wrap { opacity: 0.18; }

/* ─── LIGNE 2 ─────────────────────────────────────────────────────────────── */
.ep-charts-row2 {
  display: grid;
  grid-template-columns: 35% 65%;
  gap: 16px;
  align-items: start;
}

/* ─── BARRES HORIZONTALES ────────────────────────────────────────────────── */
.ep-hbar-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}

.ep-hbar-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
  flex-wrap: wrap;
  gap: 6px;
}

.ep-hbar-card-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text3);
}

.ep-hbar-card-desc {
  font-size: 10px;
  color: var(--text3);
  margin-bottom: 10px;
  font-style: italic;
}

.ep-hbar-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ep-hbar-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ep-hbar-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.ep-hbar-label {
  font-size: 11px;
  color: var(--text2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.ep-hbar-values {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ep-hbar-articles {
  font-size: 10px;
  font-weight: 700;
  color: var(--text);
}

.ep-hbar-volume {
  font-size: 10px;
  color: var(--accent2);
  font-weight: 700;
}

.ep-hbar-tracks {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ep-hbar-track {
  height: 5px;
  background: var(--bg4);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.ep-hbar-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  border-radius: 3px;
  min-width: 3px;
}

/* ─── RADIO SWITCH ───────────────────────────────────────────────────────── */
.ep-radio-switch {
  display: inline-flex;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.ep-radio-switch label {
  display: flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text3);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  margin: 0;
}

.ep-radio-switch input[type="radio"] { display: none; }

.ep-radio-switch label.active {
  background: var(--accent);
  color: #fff;
}

/* ─── LÉGENDE ────────────────────────────────────────────────────────────── */
.ep-hbar-legend {
  display: flex;
  gap: 14px;
  margin-bottom: 10px;
  font-size: 10px;
  color: var(--text3);
}

.ep-hbar-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.ep-hbar-legend-dot {
  display: inline-block;
  width: 12px;
  height: 5px;
  border-radius: 2px;
}