/* ══════════════════════════════════════════════════════════════
   article.css — VHS Studio
   Chargé via $extra_css = "/actualites/article.css" sur chaque article.

   Variables héritées de header.php :
     --bg            oklch(0.965 0.010 80)   beige clair
     --bg-warm       oklch(0.945 0.014 75)   beige chaud
     --bg-card       oklch(0.99 0.005 80)
     --border        oklch(0.86 0.012 80)
     --text          oklch(0.14 0.018 60)    quasi-noir chaud
     --text-muted    oklch(0.48 0.012 70)    gris doux
     --mag           oklch(0.55 0.25 345)    magenta #9b1957
     --cyan          oklch(0.55 0.18 205)    cyan
     --mag-light     oklch(0.93 0.06 345)    rose très pâle
     --cyan-light    oklch(0.93 0.05 205)
   Polices :
     'Bebas Neue'  → titres display (.display)
     'DM Sans'     → corps de texte
══════════════════════════════════════════════════════════════ */


/* ══════════════════════════════════════════════════════════════
   HERO ARTICLE
══════════════════════════════════════════════════════════════ */

.article-hero {
  padding: calc(var(--nav-h, 72px) + 48px) 0 48px;
  background: var(--bg-warm);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

/* ── Fil d'Ariane ─────────────────────────────────────────── */
.article-breadcrumb {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.article-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color .2s;
}
.article-breadcrumb a:hover { color: var(--mag); }
.article-breadcrumb-sep { opacity: .4; }

/* ── Badge catégorie ──────────────────────────────────────── */
.article-category-badge {
  display: inline-block;
  background: var(--mag-light);
  color: var(--mag);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 3px 12px;
  border-radius: 3px;
  border: 1px solid oklch(0.85 0.10 205);
  margin-bottom: 18px;
}

/* ── H1 + meta ────────────────────────────────────────────── */
.article-hero h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(28px, 5vw, 52px);
  letter-spacing: .04em;
  line-height: 1.1;
  color: var(--text);
  margin: 0 auto 16px;
  max-width: 860px;
}

.article-meta {
  font-size: 15px;
  color: var(--text-muted);
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}
.article-meta time { font-variant-numeric: tabular-nums; }
.article-meta .read-time::before { content: '· '; opacity: .5; }


/* ══════════════════════════════════════════════════════════════
   LAYOUT CORPS
══════════════════════════════════════════════════════════════ */

.article-body {
  padding: 48px 0 96px;
}

.article-inner {
  max-width: 860px;
  margin: 0 auto;
}

/* ── Image de couverture ──────────────────────────────────── */
.article-cover {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  margin: 0 0 40px;
  box-shadow: 0 8px 32px oklch(0 0 0 / .08);
}

/* ── Lien retour ──────────────────────────────────────────── */
.article-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--mag);
  text-decoration: none;
  margin-bottom: 32px;
  transition: gap .2s;
}
.article-back:hover { gap: 10px; }


/* ══════════════════════════════════════════════════════════════
   TYPOGRAPHIE DU CONTENU
══════════════════════════════════════════════════════════════ */

.article-content h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: .04em;
  line-height: 1.15;
  color: var(--text);
  margin: 48px 0 16px;
  padding-left: 16px;
  border-left: 3px solid var(--mag);
}

.article-content h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(18px, 2.5vw, 24px);
  letter-spacing: .04em;
  color: var(--text);
  margin: 36px 0 12px;
  opacity: .9;
}

.article-content h4 {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--mag);
  margin: 28px 0 8px;
}

.article-content p {
  font-size: 17px;
  line-height: 1.85;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.article-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 24px auto;
  border-radius: 6px;
}

.article-content ul,
.article-content ol {
  padding-left: 22px;
  margin-bottom: 18px;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.75;
}
.article-content ul:not(.article-list) { list-style: disc; }
.article-content ol { list-style: decimal; }
.article-content li { margin-bottom: 6px; }

.article-content a {
  color: var(--mag);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .2s;
}
.article-content a:hover { color: oklch(0.45 0.18 205); }
.article-content strong { color: var(--text); font-weight: 700; }
.article-content em { opacity: .85; }
.article-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}


/* ══════════════════════════════════════════════════════════════
   SOMMAIRE (TOC)
══════════════════════════════════════════════════════════════ */

.article-toc {
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin: 0 0 40px;
  box-shadow: 0 2px 14px oklch(0 0 0 / .05);
}
.article-toc .toc-title {
  display: flex;
  align-items: center;
  gap: 9px;
  background: oklch(0.96 0.022 205);
  border-bottom: 1px solid oklch(0.87 0.045 205);
  padding: 13px 22px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: oklch(0.42 0.16 205);
  font-weight: 700;
  margin: 0;
}
.article-toc .toc-title::before {
  content: '≡';
  font-size: 17px;
  font-weight: 400;
  opacity: .7;
  line-height: 1;
}
.article-toc ol {
  padding: 8px 0;
  margin: 0;
  list-style: none;
  counter-reset: toc-c;
}
.article-toc ol li {
  counter-increment: toc-c;
}
.article-toc a {
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  padding: 9px 22px 9px 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background .15s, border-color .15s, color .15s, padding-left .15s;
}
.article-toc a::before {
  content: counter(toc-c, decimal-leading-zero);
  justify-self: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--mag);
  opacity: .55;
  font-variant-numeric: tabular-nums;
}
.article-toc a:hover {
  background: oklch(0.93 0.05 205 / .22);
  border-left-color: var(--mag);
  color: oklch(0.38 0.16 205);
  padding-left: 6px;
}


/* ══════════════════════════════════════════════════════════════
   FIGURES / IMAGES HABILLÉES
══════════════════════════════════════════════════════════════ */

.article-figure {
  margin: 32px 0;
  overflow: hidden;
}
/* L'image d'en-tête suit directement le lien retour : pas de double marge */
.article-content > .article-figure:first-child { margin-top: 0; }
.article-figure img {
  width: 100%;
  display: block;
  border-radius: 6px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.article-figure figcaption {
  padding: 8px 4px 0;
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  line-height: 1.5;
}
.article-figures-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 24px 0;
}
.article-figures-grid .article-figure { margin: 0; }


/* ══════════════════════════════════════════════════════════════
   CITATION / PULL QUOTE
══════════════════════════════════════════════════════════════ */

.article-pullquote {
  border-top: 1px solid oklch(0.75 0.12 205);
  border-bottom: 1px solid oklch(0.75 0.12 205);
  padding: 32px 16px;
  margin: 40px 0;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(20px, 3vw, 28px);
  letter-spacing: .04em;
  color: oklch(0.55 0.18 205);
  text-align: center;
  line-height: 1.4;
  quotes: "\00AB\00A0" "\00A0\00BB";
}
.article-pullquote::before { content: open-quote; }
.article-pullquote::after  { content: close-quote; }


/* ══════════════════════════════════════════════════════════════
   ENCART / NOTE
══════════════════════════════════════════════════════════════ */

.article-note {
  background: oklch(0.975 0.008 80);
  border-left: 3px solid var(--cyan);
  border-radius: 0 6px 6px 0;
  padding: 16px 24px;
  font-size: 16px;
  color: var(--text-muted);
  margin: 24px 0;
  line-height: 1.75;
}
.article-note a { color: var(--mag); }
.article-note p { margin-bottom: 6px; font-size: inherit; line-height: inherit; color: inherit; }
.article-note p:last-child { margin-bottom: 0; }


/* ══════════════════════════════════════════════════════════════
   LISTE STYLÉE
══════════════════════════════════════════════════════════════ */

.article-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}
.article-list li {
  padding: 12px 12px 12px 36px;
  border-bottom: 1px solid var(--border);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-muted);
  position: relative;
}
.article-list li:first-child { border-top: 1px solid var(--border); }
.article-list li::before {
  content: '▶';
  color: var(--mag);
  font-size: .55em;
  position: absolute;
  left: 12px;
  top: 16px;
}
.article-list li strong { color: var(--text); }


/* ══════════════════════════════════════════════════════════════
   TABLEAU
══════════════════════════════════════════════════════════════ */

.article-table-wrap {
  overflow-x: auto;
  border-radius: 6px;
  margin: 24px 0;
  border: 1.5px solid var(--border);
}
.article-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  background: oklch(0.975 0.008 80);
}
.article-table thead tr {
  background: var(--mag-light);
  border-bottom: 1.5px solid oklch(0.85 0.10 205);
}
.article-table th {
  padding: 12px 18px;
  text-align: left;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--mag);
  white-space: nowrap;
}
.article-table td {
  padding: 11px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  line-height: 1.6;
  vertical-align: top;
}
.article-table tbody tr:nth-child(even) { background: oklch(0.97 0.006 80); }
.article-table tbody tr:hover { background: var(--mag-light); }
.article-table strong { color: var(--text); }


/* ══════════════════════════════════════════════════════════════
   BLOC CTA
══════════════════════════════════════════════════════════════ */

.article-cta {
  background: oklch(0.975 0.008 80);
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--mag);
  border-radius: 0 6px 6px 0;
  padding: 40px 36px;
  text-align: left;
  margin: 56px 0 16px;
  box-shadow: 0 8px 32px oklch(0.55 0.18 205 / .06);
}
.article-cta h2 {
  font-family: 'Bebas Neue', sans-serif !important;
  font-size: clamp(22px, 3vw, 30px) !important;
  letter-spacing: .04em;
  color: var(--text) !important;
  border-left: none !important;
  padding-left: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 10px;
  line-height: 1.15;
}
.article-cta p {
  color: var(--text-muted);
  margin: 0 0 24px;
  line-height: 1.7;
  font-size: 17px;
}
/* PC : le texte occupe toute la largeur utile, le bouton se place à
   droite, centré verticalement (plus de bloc à moitié vide). */
@media (min-width: 900px) {
  .article-cta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 56px;
    align-items: center;
    padding: 44px 48px;
  }
  .article-cta > * { grid-column: 1; }
  .article-cta > .btn-article-cta {
    grid-column: 2;
    grid-row: 1 / span 8;
    justify-self: end;
    white-space: nowrap;
  }
  .article-cta > p:last-of-type { margin-bottom: 0; }
}
.article-cta-btn { text-align: center; margin: 40px 0; }
.btn-article-cta {
  display: inline-block;
  background: var(--mag);
  color: #fff !important;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .03em;
  padding: 16px 36px;
  border-radius: 6px;
  text-decoration: none !important;
  box-shadow: 0 6px 20px oklch(0.55 0.18 205 / .25);
  transition: background .2s, transform .2s, box-shadow .2s;
}
.btn-article-cta:hover {
  background: oklch(0.48 0.18 205);
  transform: translateY(-2px);
  color: #fff !important;
}

/* ── Téléchargements (notices PDF des fiches modèle) ──────────
   Une carte par fichier, centrées : icône de document, nom,
   version / pages / poids, action « Télécharger ».
──────────────────────────────────────────────────────────── */
.article-downloads {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin: 32px 0 10px;
}
.article-content a.notice-dl {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1 1 380px;
  max-width: 540px;
  padding: 18px 22px 18px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 2px 14px oklch(0 0 0 / .05);
  color: var(--text);
  text-decoration: none;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.article-content a.notice-dl:hover {
  color: var(--text);
  border-color: var(--mag);
  box-shadow: 0 10px 28px oklch(0 0 0 / .09);
  transform: translateY(-2px);
}
.article-content a.notice-dl:focus-visible {
  outline: 3px solid var(--mag);
  outline-offset: 3px;
}
/* Icône : une feuille au coin corné, marquée PDF */
.notice-dl-icone {
  flex: none;
  width: 46px;
  height: 58px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 9px;
  background: var(--mag);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  border-radius: 5px;
  clip-path: polygon(0 0, 68% 0, 100% 24%, 100% 100%, 0 100%);
}
.notice-dl-secondaire .notice-dl-icone { background: var(--text-muted); }
.notice-dl-texte {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}
.notice-dl-texte strong {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}
.notice-dl-infos {
  font-size: 15px;
  line-height: 1.4;
  color: var(--text-muted);
}
.notice-dl-action {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--mag-light);
  font-size: 16px;
  font-weight: 700;
  color: var(--mag);
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.notice-dl-action svg { width: 18px; height: 18px; transition: transform .2s; }
.article-content a.notice-dl:hover .notice-dl-action { background: var(--mag); color: #fff; }
.article-content a.notice-dl:hover .notice-dl-action svg { transform: translateY(2px); }
.article-content p.article-downloads-note {
  margin: 0 0 32px;
  text-align: center;
  font-size: 15px;
  color: var(--text-muted);
}
@media (max-width: 480px) {
  .article-content a.notice-dl { padding: 14px 16px 14px 14px; gap: 14px; }
  .notice-dl-mot { display: none; }      /* sur mobile, l'icône de téléchargement suffit */
  .notice-dl-action { padding: 10px; }
  .notice-dl-texte strong { font-size: 17px; }
}


/* ══════════════════════════════════════════════════════════════
   FAQ (accordéon natif <details>)
══════════════════════════════════════════════════════════════ */

.faq-list { display: grid; gap: 0; margin-top: 16px; }

details.faq-item {
  border-bottom: 1.5px solid var(--border);
  background: oklch(0.975 0.008 80);
}
details.faq-item:first-of-type { border-top: 1.5px solid var(--border); }

details.faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 8px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: color .2s;
  gap: 16px;
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after {
  content: '+';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  font-size: 20px;
  font-weight: 400;
  color: var(--mag);
  flex-shrink: 0;
  transition: transform .25s, border-color .2s;
  line-height: 1;
}
details.faq-item summary:hover::after,
details.faq-item[open] > summary::after { border-color: var(--mag); }
details.faq-item[open] > summary::after { content: '−'; }
details.faq-item summary:hover { color: var(--mag); }

.faq-answer {
  padding: 0 8px 22px;
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.75;
}
.faq-answer p             { margin-bottom: 10px; }
.faq-answer p:last-child  { margin-bottom: 0; }
.faq-answer a             { color: var(--mag); }
.faq-answer strong        { color: var(--text); }


/* ══════════════════════════════════════════════════════════════
   PC : même largeur que l'accueil (container de 1 280 px), sommaire
   à sa place dans le texte, police un peu plus grande, images
   plafonnées en hauteur pour ne pas envahir l'écran.
══════════════════════════════════════════════════════════════ */

@media (min-width: 1100px) {
  .article-hero h1 { max-width: 1100px; }
  .article-inner { max-width: none; }
  .article-content p { font-size: 18px; }
  .article-content ul,
  .article-content ol { font-size: 18px; }
  .article-toc a { font-size: 17px; }
  .article-list li { font-size: 18px; }
  .article-table { font-size: 17px; }
  .article-note { font-size: 17px; }
  .article-cta p { font-size: 18px; }
  .faq-answer { font-size: 18px; }
  details.faq-item summary { font-size: 19px; }
  .article-figure img { max-height: 620px; }
  .article-figure figcaption { font-size: 15px; }
}


/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .article-hero { padding: calc(var(--nav-h, 72px) + 32px) 0 36px; }
  .article-body { padding: 36px 0 72px; }
  .article-figures-grid { grid-template-columns: 1fr; gap: 12px; }
  .article-content h2 { font-size: 22px; }
  .article-toc a { font-size: 15px; }
}

@media (max-width: 480px) {
  .article-hero h1 { font-size: 26px; }
  .article-cta { padding: 28px 20px; }
  .article-table th,
  .article-table td { padding: 10px 12px; font-size: 15px; }
}
