/* Articles (articles/*.html, articles.html). Chargé après candidates.css :
   mêmes titres, mêmes tableaux (.candidate-polls), mêmes pastilles de couleur.
   Le texte suit une colonne de lecture ; tableaux et graphiques en débordent
   un peu, dans un panneau clair comme ceux des fiches candidats. */

.article-breadcrumb {
  margin: -8px 0 18px;
  color: var(--muted);
  font-size: 0.84rem;
}

.article-breadcrumb a {
  color: var(--da-accent);
  font-weight: 600;
  text-decoration: none;
}

.article-breadcrumb a:hover {
  text-decoration: underline;
}

.article {
  max-width: 820px;
}

.article-head {
  max-width: 740px;
  margin-bottom: 30px;
}

/* Nom du site en simple paragraphe, avec l'apparence du h1 des autres pages. */
.brand .site-name {
  color: var(--da-accent);
  font-family: var(--da-heading-font);
  font-size: clamp(2.3rem, 4vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.02;
}

.article-head h1 {
  margin: 6px 0 0;
  font-size: clamp(1.65rem, 3.4vw, 2.35rem);
  line-height: 1.15;
  text-wrap: balance;
}

/* --- Corps de texte --------------------------------------------------------- */

.article-body {
  max-width: 740px;
  color: #2f403d;
  font-size: 1.04rem;
  line-height: 1.72;
}

.article-body > p,
.article-body > ul,
.article-body > ol,
.article-body > blockquote {
  margin: 0 0 1.1em;
}

.article-body h3 {
  margin: 2em 0 0.55em;
  color: var(--da-accent);
  font-size: 1.36rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.article-body h4 {
  margin: 1.6em 0 0.4em;
  color: var(--da-green);
  font-size: 1.08rem;
  font-weight: 800;
}

.article-body a {
  color: var(--da-accent);
  font-weight: 600;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.article-body strong {
  color: var(--da-green);
  font-weight: 700;
}

.article-body ul,
.article-body ol {
  padding-left: 1.3em;
}

.article-body li + li {
  margin-top: 0.45em;
}

.article-body blockquote {
  padding: 2px 0 2px 18px;
  border-left: 3px solid rgba(46, 107, 98, 0.35);
  color: #3f5c59;
}

/* --- Figures : tableaux, graphiques, images --------------------------------- */

.article-figure {
  margin: 28px 0 30px;
  padding: 20px 22px 16px;
  border: 1px solid rgba(46, 107, 98, 0.10);
  border-radius: var(--da-radius);
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(40, 61, 59, 0.05), 0 10px 28px rgba(40, 61, 59, 0.07);
}

/* Les tableaux et graphiques peuvent prendre un peu plus que la colonne de texte. */
.article-body > .article-figure {
  width: min(820px, 100%);
  max-width: none;
}

@media (min-width: 900px) {
  .article-body > .article-figure {
    width: 820px;
  }
}

.article-figure figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.article-figure figcaption a {
  font-weight: 600;
  white-space: nowrap;
}

.article-figure img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.article-table-title {
  margin: 0 0 12px !important;
  color: var(--da-green) !important;
  font-size: 0.92rem !important;
  font-weight: 700;
}

.article-table-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.article-poll-table {
  font-variant-numeric: tabular-nums;
}

.article-poll-table thead th.is-score {
  vertical-align: bottom;
}

.article-poll-table tbody th {
  font-weight: 400;
  white-space: nowrap;
}

.article-poll-table td.is-score {
  font-weight: 500;
}

.article-poll-table td.is-score strong {
  color: var(--da-green);
  font-weight: 800;
}

.article-poll-table td.is-missing {
  color: #b8c2bf;
}

.article-hypothesis {
  display: block;
  color: var(--da-green);
  font-weight: 800;
}

.article-hypothesis-label {
  display: block;
  max-width: 11em;
  margin-left: auto;
  color: var(--muted);
  font-weight: 500;
  white-space: normal;
}

.article-delta {
  display: inline-block;
  min-width: 2.2em;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 500;
  text-align: left;
}

.article-evolution svg {
  max-width: 640px;
  margin: 0 auto;
}

/* Graphique du site intégré : la page du graphique envoie sa hauteur
   (assets/app.js, reportEmbedHeight) ; la valeur de départ évite un saut. */
/* Le graphique intégré apporte son propre panneau : pas de second cadre. */
.article-chart {
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

.article-embed {
  display: block;
  width: 100%;
  border: 0;
}

.article-chart figcaption {
  padding: 0 12px;
}

/* --- Pied d'article --------------------------------------------------------- */

.article-foot {
  max-width: 740px;
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid rgba(46, 107, 98, 0.16);
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

.article-foot p {
  margin: 0;
}

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

@media (max-width: 560px) {
  .brand .site-name {
    font-size: 2rem;
  }
}

@media (max-width: 640px) {
  .article-body {
    font-size: 1rem;
  }

  .article-figure {
    margin: 22px -4px 24px;
    padding: 16px 12px 12px;
  }

  .article-chart {
    padding: 0;
  }
}
