/* =========================================================
   ARTICLE PAGE — styles
   ========================================================= */

/* Progress bar */
.read-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: transparent;
  z-index: 100;
  pointer-events: none;
}
.read-progress__bar {
  height: 100%;
  background: var(--bs-green);
  width: 0%;
  transition: width 0.1s linear;
}

/* Article hero — noir pleine largeur
   padding-bottom serré : la barre noire s'arrête juste après le bloc meta,
   le visuel featured démarre sur fond crème (pas d'overlap). */
.article-hero {
  background: var(--bs-black);
  color: var(--bs-cream);
  padding: var(--s-8) 0 var(--s-5);
  position: relative;
  overflow: hidden;
}
.article-hero__inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 var(--s-5);
}
.article-hero__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--bs-green);
  text-decoration: none;
  transition: gap var(--dur-fast) var(--ease-out);
  width: fit-content;
}
.article-hero__back-wrap {
  display: block;
  margin-bottom: var(--s-6);
}
.article-hero__back:hover { gap: 12px; color: var(--bs-green); }

.article-hero__category {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bs-green);
  margin-bottom: var(--s-5);
}
.article-hero__category::before {
  content: '';
  width: 8px; height: 8px;
  background: var(--bs-green);
  border-radius: 999px;
}

.article-hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(34px, 4.6vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--bs-cream);
  margin: 0 0 var(--s-5);
  text-wrap: balance;
}
.article-hero__dek {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.55;
  color: var(--bs-cream);
  opacity: 0.95;
  margin: 0 0 var(--s-6);
  max-width: 64ch;
  text-wrap: pretty;
  letter-spacing: -0.005em;
}
.article-hero__meta {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding-top: var(--s-5);
  border-top: 1px solid rgba(235, 245, 223, 0.15);
}
.article-hero__author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.author-avatar {
  width: 44px; height: 44px;
  border-radius: 999px;
  background: var(--bs-green);
  color: var(--bs-black);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
}
.article-hero__author-info { display: flex; flex-direction: column; }
.article-hero__author-info strong {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--bs-cream);
}
.article-hero__author-info span {
  font-family: var(--font-body);
  font-size: 12px;
  color: rgba(235, 245, 223, 0.55);
}
.article-hero__stats {
  display: flex;
  gap: var(--s-5);
  margin-left: auto;
  font-family: var(--font-body);
  font-size: 13px;
  color: rgba(235, 245, 223, 0.6);
}
.article-hero__stats span { display: inline-flex; align-items: center; gap: 6px; }
.article-hero__stats svg { opacity: 0.7; }

/* Featured image — démarre sur fond crème, séparation propre du hero noir */
.article-feature {
  max-width: 1200px;
  margin: var(--s-6) auto 0;
  padding: 0 var(--s-5);
  position: relative;
  z-index: 2;
}
.article-feature img {
  width: 100%;
  aspect-ratio: 16/7;
  object-fit: cover;
  border-radius: var(--r-xl);
}

/* Article layout — 3 cols
   IMPORTANT : placement explicite par grid-column pour que la sidebar reste
   à droite même si la TOC est vide / masquée par app.js (display:none).
   Sans ça : la TOC qui disparaît fait glisser .article-column dans la piste 1 (220px)
   → article ultra-étroit, sidebar géante. */
/* Article layout — 2 cols éditorial
   max-width 1200 + padding 24 identique à .article-feature → sidebar + corps
   parfaitement alignés sur les bords du hero image. */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  column-gap: var(--s-6);
  row-gap: var(--s-6);
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--s-8) var(--s-5);
  align-items: start;
}
.article-layout > .article-toc     { display: none; }
.article-layout > .article-column  { grid-column: 1; }
.article-layout > .article-sidebar { grid-column: 2; }

@media (max-width: 860px) {
  .article-layout { grid-template-columns: 1fr; padding: var(--s-6) 0; }
  .article-layout > .article-column  { grid-column: 1; }
  .article-layout > .article-sidebar { grid-column: 1; order: 2; }
}

/* TOC */
.article-toc {
  position: sticky;
  top: 100px;
  font-family: var(--font-body);
}
.article-toc__label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: var(--s-4);
  display: flex;
  align-items: center;
  gap: 8px;
}
.article-toc__label::before {
  content: '';
  width: 16px; height: 2px;
  background: var(--bs-green);
}
.article-toc ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.article-toc li a {
  display: block;
  padding: 8px 0 8px 14px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--fg-2);
  text-decoration: none;
  border-left: 2px solid var(--border-1);
  transition: all var(--dur-fast) var(--ease-out);
}
.article-toc li a:hover { color: var(--fg-1); border-left-color: var(--fg-2); }
.article-toc li a.is-active {
  color: var(--bs-black);
  font-weight: 600;
  border-left-color: var(--bs-green);
  border-left-width: 3px;
}

/* Article body */
.article-body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.75;
  color: var(--fg-1);
  max-width: 880px;
}
.article-body > * + * { margin-top: var(--s-5); }
.article-body p { font-weight: 400; font-size: 18px; line-height: 1.75; }
.article-body p strong { font-weight: 600; color: var(--bs-black); }

.article-body h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: var(--s-7) 0 var(--s-4);
  scroll-margin-top: 100px;
}
.article-body h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: var(--s-6) 0 var(--s-3);
  scroll-margin-top: 100px;
}

.article-body a {
  color: var(--bs-black);
  text-decoration: underline;
  text-decoration-color: var(--bs-green);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  font-weight: 500;
  transition: background var(--dur-fast) var(--ease-out);
}
.article-body a:hover { background: var(--bs-green); }

.article-body blockquote {
  margin: var(--s-6) 0;
  padding: var(--s-5) var(--s-6);
  background: var(--bs-green);
  border-radius: var(--r-lg);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--bs-black);
  position: relative;
}
.article-body blockquote::before {
  content: '"';
  position: absolute;
  top: 8px; left: 16px;
  font-family: var(--font-display);
  font-size: 56px;
  line-height: 1;
  color: rgba(0,0,0,0.15);
  font-weight: 700;
}
.article-body blockquote p { margin: 0; font-size: inherit; line-height: inherit; }
.article-body blockquote cite {
  display: block;
  margin-top: var(--s-3);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  font-style: normal;
  opacity: 0.7;
}

.article-body ul, .article-body ol {
  padding-left: var(--s-5);
}
.article-body li { margin-bottom: 10px; font-size: 18px; line-height: 1.7; }
.article-body ul li::marker { color: var(--bs-green); }

.article-body figure {
  margin: var(--s-7) 0;
}
.article-body figure img {
  width: 100%;
  border-radius: var(--r-md);
}
.article-body figcaption {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--fg-3);
  text-align: center;
  margin-top: 10px;
  font-style: italic;
}

.article-body hr {
  border: none;
  height: 1px;
  background: var(--border-1);
  margin: var(--s-7) 0;
}

.article-body code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bs-cream);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--bs-black);
}

/* Callout box */
.callout {
  display: flex;
  gap: var(--s-4);
  padding: var(--s-5);
  background: var(--bs-black);
  color: var(--bs-cream);
  border-radius: var(--r-lg);
  margin: var(--s-6) 0;
}
.callout__icon {
  width: 36px; height: 36px;
  border-radius: 999px;
  background: var(--bs-green);
  color: var(--bs-black);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.callout__content h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  color: var(--bs-green);
}
.callout__content p {
  font-size: 15px !important;
  line-height: 1.55 !important;
  color: rgba(235, 245, 223, 0.85);
  margin: 0 !important;
}

/* Article sidebar */
.article-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  position: sticky;
  top: 100px;
  align-self: start;
}
@media (max-width: 860px) { .article-sidebar { position: static; } }

/* Share bar */
.share-bar {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-4) 0;
  border-top: 1px solid var(--border-1);
  border-bottom: 1px solid var(--border-1);
  margin: var(--s-6) 0;
  font-family: var(--font-body);
}
.share-bar__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-right: auto;
}
.share-btn {
  width: 40px; height: 40px;
  border-radius: 999px;
  border: 1.5px solid var(--border-2);
  display: grid;
  place-items: center;
  color: var(--fg-1);
  background: transparent;
  transition: all var(--dur-fast) var(--ease-out);
}
.share-btn:hover { background: var(--bs-black); color: var(--bs-green); border-color: var(--bs-black); }

/* Tags */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: var(--s-5) 0;
}
.article-tag {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bs-cream);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--bs-black);
  text-decoration: none;
  transition: all var(--dur-fast) var(--ease-out);
}
.article-tag:hover { background: var(--bs-green); }

/* Author bio */
.author-bio {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s-5);
  align-items: start;
  padding: var(--s-6);
  background: var(--bs-white);
  border: 1px solid var(--border-1);
  border-radius: var(--r-lg);
  margin: var(--s-7) 0;
}
.author-bio__avatar {
  width: 72px; height: 72px;
  border-radius: 999px;
  background: var(--bs-black);
  color: var(--bs-green);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.02em;
}
.author-bio h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.015em;
  margin: 0 0 4px;
}
.author-bio__role {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--bs-green-700);
  font-weight: 500;
  margin-bottom: var(--s-3);
}
.author-bio p {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.6;
  color: var(--fg-2);
  margin: 0 0 var(--s-3);
}
.author-bio__links {
  display: flex;
  gap: var(--s-3);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
}
.author-bio__links a {
  color: var(--bs-black);
  text-decoration: none;
  border-bottom: 1px solid var(--bs-green);
  padding-bottom: 1px;
}

/* Article footer CTA (big green banner) */
.article-cta {
  background: var(--bs-green);
  color: var(--bs-black);
  border-radius: var(--r-xl);
  padding: var(--s-7);
  margin: var(--s-7) 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s-5);
  align-items: center;
}
@media (max-width: 720px) { .article-cta { grid-template-columns: 1fr; } }
.article-cta h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  text-wrap: balance;
}
.article-cta p {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
  max-width: 50ch;
}

/* Prev/Next nav */
.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-4);
  margin: var(--s-7) 0;
}
@media (max-width: 720px) { .article-nav { grid-template-columns: 1fr; } }
.article-nav a {
  display: block;
  padding: var(--s-5);
  background: var(--bs-white);
  border: 1px solid var(--border-1);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: var(--fg-1);
  transition: all var(--dur-base) var(--ease-out);
}
.article-nav a:hover { border-color: var(--bs-black); transform: translateY(-2px); }
.article-nav__label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.article-nav__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0;
}
.article-nav__next { text-align: right; }
.article-nav__next .article-nav__label { justify-content: flex-end; }

/* Related articles */
.related {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--s-7) var(--s-5) var(--s-8);
  border-top: 1px solid var(--border-1);
}
.related .section-head { margin-top: 0; }
