/* ==========================================================================
   Power 21 — Blog : liste, article, derniers articles de la home.
   Chargée après layout.css (pages blog) ou home.css (home). Préfixe : .blg-
   ========================================================================== */

/* 1. Hero (liste + article) ---------------------------------------------- */
.blg-hero { padding-top: clamp(150px, 20vh, 220px); }
.blg-hero--index .lyt-hero__title { font-size: clamp(51px, 8vw, 132px); }
.blg-hero__crumb {
  font-family: var(--ff-mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255,255,255,.72);
}
.blg-hero__crumb a { color: inherit; border-bottom: 1px solid rgba(255,255,255,.4); }
.blg-hero__crumb a:hover { color: var(--c-white); }
.blg-hero__title {
  max-width: 1100px; font-weight: 800; font-size: clamp(34px, 5vw, 76px);
  line-height: 1.02; letter-spacing: -.045em; text-wrap: balance;
}
.blg-hero__lead { max-width: 760px; }
.blg-byline { font-size: 15px; line-height: 1.6; color: rgba(255,255,255,.82); text-align: right; }
.blg-byline strong { color: var(--c-white); }

/* 2. Grille de cartes ----------------------------------------------------- */
.blg-list { padding: clamp(56px, 7vw, 100px) var(--gutter) clamp(80px, 10vw, 140px); background: var(--c-paper); }
.blg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 2.6vw, 40px); }
.blg-card { min-width: 0; }
.blg-card__link {
  display: flex; flex-direction: column; height: 100%;
  background: var(--c-white); border-radius: 18px; overflow: hidden; color: var(--c-ink);
  box-shadow: 0 1px 0 rgba(15,17,21,.06);
  transition: transform .3s var(--ease), box-shadow .3s ease;
}
.blg-card__link:hover { color: var(--c-ink); transform: translateY(-4px); box-shadow: 0 18px 40px -20px rgba(15,17,21,.35); }
.blg-card__media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--c-blue); }
.blg-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.blg-card__link:hover .blg-card__media img { transform: scale(1.04); }
.blg-card__media--empty { display: flex; align-items: center; justify-content: center; }
.blg-card__media--empty img { width: 34%; height: auto; object-fit: contain; }
.blg-card__link:hover .blg-card__media--empty img { transform: none; }
.blg-card__body { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 24px 26px 28px; }
.blg-card__meta { font-family: var(--ff-mono); font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--c-grey); }
.blg-card__title { font-weight: 800; font-size: clamp(20px, 1.6vw, 24px); line-height: 1.18; letter-spacing: -.025em; text-wrap: balance; }
.blg-card__excerpt {
  font-size: 15.5px; line-height: 1.6; color: var(--c-body);
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.blg-card__more {
  margin-top: auto; padding-top: 8px; display: inline-flex; align-items: center; gap: 12px;
  font-size: 14.5px; font-weight: 700; transition: gap .25s var(--ease);
}
.blg-card__link:hover .blg-card__more { gap: 20px; }

.blg-empty { font-size: clamp(19px, 1.6vw, 24px); color: var(--c-body); }

.blg-pager {
  margin-top: clamp(48px, 6vw, 80px);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
}
.blg-pager > :last-child { justify-self: end; }
.blg-pager__count { font-family: var(--ff-mono); font-size: 13px; color: var(--c-grey); }

/* 3. Article --------------------------------------------------------------- */
.blg-article { background: var(--c-paper); }
.blg-cover {
  width: min(100% - 2 * var(--gutter), 1100px); margin: clamp(-80px, -5vw, -40px) auto 0;
  position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--c-blue);
}
.blg-cover img { width: 100%; height: 100%; object-fit: cover; }
.blg-hero:has(+ .blg-cover) .lyt-hero__inner { padding-bottom: clamp(100px, 10vw, 150px); }   /* place pour le chevauchement */

.blg-prose {
  width: min(100% - 2 * var(--gutter), 720px); margin: clamp(48px, 6vw, 80px) auto 0;
  font-size: 18.5px; line-height: 1.75; color: var(--c-body);
}
.blg-prose > * + * { margin-top: 1.1em; }
.blg-prose h2, .blg-prose h3, .blg-prose h4 { color: var(--c-ink); font-weight: 800; letter-spacing: -.03em; line-height: 1.15; text-wrap: balance; }
.blg-prose h2 { font-size: clamp(28px, 2.6vw, 36px); margin-top: 1.8em; }
.blg-prose h3 { font-size: clamp(22px, 2vw, 27px); margin-top: 1.6em; }
.blg-prose h4 { font-size: 20px; margin-top: 1.4em; }
.blg-prose strong { color: var(--c-ink); }
.blg-prose a[href] { color: var(--c-blue-deep); text-decoration: underline; text-decoration-color: var(--c-yellow); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.blg-prose a[href]:hover { color: var(--c-ink); }
.blg-prose ul, .blg-prose ol { padding-left: 1.3em; }
.blg-prose ul { list-style: disc; }
.blg-prose ol { list-style: decimal; }
.blg-prose li + li { margin-top: .4em; }
.blg-prose li::marker { color: var(--c-blue); }
.blg-prose blockquote {
  margin-inline: 0; padding: 4px 0 4px 28px; border-left: 3px solid var(--c-yellow);
  font-family: var(--ff-serif); font-style: italic; font-size: 1.3em; line-height: 1.45; color: var(--c-ink);
}
.blg-prose img { max-width: 100%; height: auto; border-radius: 12px; }
.blg-prose table { width: 100%; border-collapse: collapse; font-size: 16px; display: block; overflow-x: auto; }
.blg-prose th, .blg-prose td { padding: 10px 14px; border-bottom: 1px solid var(--c-grey-light); text-align: left; vertical-align: top; }
.blg-prose th { color: var(--c-ink); font-weight: 700; background: rgba(91,124,182,.08); }

.blg-back { width: min(100% - 2 * var(--gutter), 720px); margin: clamp(48px, 6vw, 72px) auto 0; padding-bottom: clamp(72px, 9vw, 120px); }

/* 4. Home : derniers articles (sous le bloc 11 CTA, qui a déjà sa marge basse) */
.blg-latest { padding: 0 var(--gutter) 150px; }
.blg-latest__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 40px; margin-bottom: clamp(32px, 4vw, 56px); }
.blg-latest__title { font-weight: 800; font-size: clamp(28px, 3vw, 42px); line-height: 1.08; letter-spacing: -.035em; }   /* = .cta__title */
.blg-latest__title em { color: var(--c-blue); }

/* Responsive ---------------------------------------------------------------- */
@media (max-width: 1000px) {
  .blg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .blg-latest .blg-card:nth-child(3) { display: none; }   /* home : 2 cartes sur 2 colonnes */
}
@media (max-width: 760px) {
  .blg-grid { grid-template-columns: 1fr; }
  .blg-latest .blg-card:nth-child(3) { display: block; }
  .blg-latest { padding-bottom: 100px; }
  .blg-byline { text-align: left; }
  .blg-prose { font-size: 17px; }
  .blg-pager { grid-template-columns: 1fr; justify-items: start; }
  .blg-pager > :last-child { justify-self: start; }
  .blg-pager__count { order: -1; }
}
@media (prefers-reduced-motion: reduce) {
  .blg-card__link, .blg-card__media img { transition: none; }
}
