/* ============================================================
   Cheval 3F — articles (articles/*.html), engendrés par
   outils/articles.mjs. Les encadrés reprennent les classes du
   livre (outils/markdown.mjs) : même sens, même couleur.
   ============================================================ */

.fil {
  font-size: .85rem; color: var(--c-ink-soft); margin: 0 0 18px;
}
.fil a { color: inherit; }

.article { max-width: 720px; margin: 0 auto; }
.article-tete { padding: 48px 0 8px; }
.article-tete h1 { margin: 10px 0 16px; }
.article-chapo { font-size: 1.18rem; line-height: 1.6; color: var(--c-ink-soft); }
.article-maj { font-size: .85rem; color: var(--c-ink-soft); margin-top: 12px; }

.article-image { margin: 26px 0 8px; }
.article-image img {
  width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: var(--radius-m); display: block;
}
.article-image figcaption { font-size: .78rem; color: var(--c-ink-soft); margin-top: 8px; }

.article-corps { font-size: 1.04rem; line-height: 1.75; }
.article-corps h2 { font-size: 1.55rem; margin: 2.1em 0 .55em; }
.article-corps h3 { font-size: 1.2rem; margin: 1.7em 0 .45em; }
.article-corps h4 { font-size: 1.05rem; margin: 1.4em 0 .3em; }
.article-corps p, .article-corps li { color: var(--c-ink); }
.article-corps ul, .article-corps ol { padding-left: 1.3em; }
.article-corps li { margin-bottom: .35em; }
.article-corps li::marker { color: var(--c-clay); }
.article-corps a { color: var(--c-clay-dark); }
.article-corps hr {
  border: 0; width: 56px; margin: 2.2em auto;
  border-top: 2px solid var(--c-clay); opacity: .7;
}
.article-corps table { width: 100%; border-collapse: collapse; font-size: .92rem; margin: 1.2em 0; }
.article-corps th, .article-corps td { text-align: left; vertical-align: top; padding: 9px 10px; border-bottom: 1px solid var(--c-line); }
.article-corps th { background: var(--c-moss-pale); color: var(--c-moss); }

/* Les encadrés : mêmes classes et mêmes couleurs que dans le livre. */
.encadre {
  margin: 1.6em 0; padding: 18px 22px 8px;
  border-radius: var(--radius-s);
  background: var(--c-bg-alt); border-left: 5px solid var(--c-line);
}
.encadre-titre {
  font-size: .78rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--c-ink-soft); margin: 0 0 8px;
}
.encadre.science { background: var(--c-moss-pale); border-left-color: var(--c-moss); }
.encadre.science .encadre-titre { color: var(--c-moss); }
.encadre.retenir { border-left-color: var(--c-clay); }
.encadre.retenir .encadre-titre { color: var(--c-clay-dark); }
.encadre.ecurie { background: var(--c-surface); border: 1.5px solid var(--c-line); border-left: 5px solid var(--c-moss-light); }
.encadre.ecurie .encadre-titre { color: var(--c-moss-light); }
/* Rouge réservé à l'avis professionnel, comme dans le bilan et le livre. */
.encadre.avis { background: #fbf0ea; border-left-color: var(--c-alert); }
.encadre.avis .encadre-titre { color: var(--c-alert); }

.sources { font-size: .86rem; color: var(--c-ink-soft); }
.titre-sources {
  font-family: var(--font-body); font-size: .8rem !important; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--c-ink-soft);
  border-top: 1px solid var(--c-line); padding-top: 18px;
}

/* ── Pour aller plus loin ─────────────────────────────────── */
.suite {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin: 48px 0 0;
}
.suite-carte {
  background: var(--c-surface); border: 1.5px solid var(--c-line);
  border-radius: var(--radius-m); padding: 22px 24px;
  display: flex; flex-direction: column; gap: 8px;
}
.suite-carte .eyebrow { margin: 0; }
.suite-carte h2 { font-size: 1.15rem; margin: 0; }
.suite-carte p { margin: 0; color: var(--c-ink-soft); font-size: .95rem; flex: 1; }
.suite-carte .btn { align-self: flex-start; margin-top: 8px; }
.suite-carte.guide { background: var(--c-moss); border-color: var(--c-moss); color: #eef1ea; }
.suite-carte.guide h2 { color: #fff; }
.suite-carte.guide p { color: #cfd8c6; }
.suite-carte.guide .eyebrow { color: #e7b98c; }
/* Sur fond vert, le bouton secondaire (vert sur transparent) disparaissait. */
.suite-carte.guide .btn-secondary { color: #fff; border-color: rgba(255, 255, 255, .7); }
.suite-carte.guide .btn-secondary:hover { background: #fff; color: var(--c-moss); border-color: #fff; }

.autres { margin-top: 56px; }
.autres h2 { font-size: 1.2rem; }
.autres ul { list-style: none; padding: 0; display: grid; gap: 8px; }
.autres a { color: var(--c-moss); font-weight: 600; text-decoration: none; }
.autres a:hover { text-decoration: underline; }

/* ── Page d'accueil des articles ──────────────────────────── */
.recherche-articles { margin: 28px 0 0; max-width: 460px; }
.recherche-articles input[type="search"] {
  width: 100%; padding: 0.85em 1.1em; border-radius: var(--radius-s);
  border: 1.5px solid var(--c-line); background: var(--c-surface);
  font-size: 1rem; font-family: var(--font-body); color: var(--c-ink);
}
.recherche-articles input[type="search"]:focus { border-color: var(--c-moss-light); }
.recherche-vide { color: var(--c-ink-soft); margin: 32px 0; }
.articles-grille {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px; margin-top: 30px;
}
.article-carte {
  background: var(--c-surface); border: 1.5px solid var(--c-line);
  border-radius: var(--radius-m); overflow: hidden;
  text-decoration: none; color: inherit; display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.article-carte:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
/* « height: auto » est indispensable : sans lui, l'attribut height="675" du
   HTML l'emporte sur aspect-ratio et la photo s'étire en hauteur. */
.article-carte img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.article-carte div { padding: 18px 22px 22px; }
.article-carte h3 { font-size: 1.18rem; margin: 0 0 8px; }
.rubrique { margin-top: 48px; }
.rubrique h2 { font-size: 1.6rem; margin: 0 0 6px; }
.rubrique-chapo { color: var(--c-ink-soft); margin: 0; max-width: 640px; }
.article-carte p { margin: 0; color: var(--c-ink-soft); font-size: .95rem; }

@media (max-width: 760px) {
  .suite { grid-template-columns: 1fr; }
  .article-tete { padding-top: 28px; }
}
