/* Page « Réseaux sociaux » (reseaux-sociaux.html). Chargé après candidates.css :
   mêmes panneaux arrondis, mêmes titres verts, mêmes pastilles de couleur. */

.social-period {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.social-chart {
  position: relative;
  padding: 22px 24px 20px;
  border-radius: var(--da-radius);
  background: var(--panel);
}

.social-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.social-metrics {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--da-pill-bg);
}

.social-metrics button,
.social-legend button {
  border: 1px solid transparent;
  font: inherit;
  cursor: pointer;
}

.social-metrics button {
  padding: 6px 14px;
  border-radius: 999px;
  background: none;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
}

.social-metrics button[aria-pressed="true"] {
  background: var(--da-accent);
  color: #fff;
}

.social-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.social-legend button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--da-pill-bg);
  color: var(--ink);
  font-size: 0.86rem;
}

.social-legend button:hover {
  background: var(--da-pill-bg-hover);
}

.social-legend button[aria-pressed="true"] {
  border-color: var(--ink);
}

.social-legend i,
.social-tooltip i,
.social-table th i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 32px;
}

@media (max-width: 820px) {
  .social-chart {
    padding: 18px 14px 16px;
  }

  .social-grid {
    grid-template-columns: 1fr;
  }
}

.social-panel h3 {
  margin: 0;
  color: var(--da-accent);
  font-family: var(--da-heading-font);
  font-size: 1.08rem;
  font-weight: 700;
}

.social-panel p {
  margin: 2px 0 6px;
  color: var(--muted);
  font-size: 0.84rem;
}

.social-panel svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0; /* styles.css impose une hauteur aux SVG du graphique principal */
  overflow: visible;
  touch-action: pan-y;
}

.social-panel .social-gridline {
  stroke: var(--line);
  stroke-width: 1;
  opacity: 0.55;
}

.social-panel .social-zero {
  stroke: var(--line-strong);
  stroke-width: 1;
}

.social-panel .social-tick {
  fill: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.social-panel .social-label {
  fill: var(--ink);
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.social-panel .social-marker {
  stroke: var(--panel);
  stroke-width: 2;
}

.social-panel .social-cross {
  stroke: var(--line-strong);
  stroke-dasharray: 3 3;
}

.social-tooltip {
  position: fixed;
  z-index: 20;
  min-width: 230px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 6px 22px rgba(40, 61, 59, 0.16);
  color: var(--ink);
  font-size: 0.82rem;
  pointer-events: none;
}

.social-tooltip strong {
  display: block;
  margin-bottom: 4px;
}

.social-tip-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-variant-numeric: tabular-nums;
}

.social-tip-row > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.social-tip-row.is-focus {
  font-weight: 700;
}

.social-details {
  margin-top: 24px;
}

.social-details summary {
  color: var(--da-accent);
  font-weight: 700;
  cursor: pointer;
}

.social-table {
  overflow-x: auto;
}

.social-table table {
  width: 100%;
  margin-top: 10px;
  border-collapse: collapse;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}

.social-table caption {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  text-align: left;
}

.social-table th,
.social-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

.social-table thead th {
  color: var(--muted);
  font-weight: 600;
}

.social-table th[scope="row"],
.social-table thead th:first-child {
  text-align: left;
}

.social-table th[scope="row"] {
  font-weight: 600;
}

.social-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.social-table small {
  display: block;
  color: var(--muted);
}

.social-error {
  margin: 0;
  color: var(--muted);
}

.social-method {
  max-width: 780px;
  margin: 40px 0 10px;
}

.social-method h2 {
  margin: 0 0 10px;
  color: var(--da-accent);
  font-size: 1.28rem;
  font-weight: 800;
}

.social-method p {
  margin: 0 0 12px;
  color: #3f5c59;
  line-height: 1.6;
}

.social-method a {
  color: var(--da-accent);
  font-weight: 600;
}
