/* ══════════════════════════════════════════════════════════════════════════
   Blog public : /blog et /blog/:slug
   Fond blanc partout (règle design du projet), boutons = .sm-btn partagés.
   ══════════════════════════════════════════════════════════════════════════ */

/* La barre du haut est en position: fixed (topbar.index.css) et n'occupe donc
   aucune place dans le flux : sans cette marge, le début de page passe dessous. */
.blog {
  background: var(--white);
  padding-top: 68px;
  padding-bottom: 40px;
}

/* ── En-tête ──────────────────────────────────────────────────────────────── */
.blog-hero {
  padding: 56px 0 28px;
  text-align: center;
}
.blog-hero__eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.blog-hero__title {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--text-primary);
  margin: 0 0 14px;
}
.blog-hero__sub {
  max-width: 620px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ── Rubriques ────────────────────────────────────────────────────────────── */
.blog-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 8px 0 30px;
}
.blog-cat {
  padding: 7px 15px;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--white);
  text-decoration: none;
  transition: border-color .15s, color .15s, background .15s;
}
.blog-cat:hover { border-color: var(--accent-border); color: var(--accent); }
.blog-cat.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── Grille d'articles ────────────────────────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 26px 24px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}
.blog-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface-2);
  margin-bottom: 14px;
}
.blog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.blog-card:hover .blog-card__media img { transform: scale(1.035); }
/* Vignette de repli — voir views/common/blog-cover.pug.
   Tout est dessiné en SVG qui hérite de `currentColor` : une seule règle de
   couleur par teinte suffit à changer l'ensemble du motif. */
.blog-ph {
  position: absolute;
  inset: 0;
  display: block;
  background: #fff;
}
.blog-ph__art { width: 100%; height: 100%; display: block; }

.blog-ph--t0 { color: #1e7a4e; }  /* vert BranShee */
.blog-ph--t1 { color: #1d6fa5; }  /* bleu */
.blog-ph--t2 { color: #9a5b1c; }  /* ambre */
.blog-ph--t3 { color: #6b4a9c; }  /* violet */

/* Léger zoom au survol, comme sur une vraie photo, pour que la carte
   réagisse de la même façon qu'elle ait une image ou non. */
.blog-card__media .blog-ph__art { transition: transform .35s ease; }
.blog-card:hover .blog-ph__art { transform: scale(1.04); }
.blog-card__body { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.blog-card__cat {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--accent);
}
.blog-card__title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 0;
}
.blog-card:hover .blog-card__title { color: var(--accent); }
.blog-card__excerpt {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
  /* 3 lignes maximum : les cartes doivent rester alignées entre elles. */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}
.blog-card__dot { opacity: .6; }

/* Article en vedette : occupe deux colonnes et passe en deux blocs côte à côte. */
@media (min-width: 900px) {
  .blog-card--lead {
    grid-column: 1 / -1;
    flex-direction: row;
    gap: 30px;
    align-items: center;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 6px;
  }
  .blog-card--lead .blog-card__media {
    flex: 0 0 52%;
    margin-bottom: 0;
    aspect-ratio: 16 / 9;
  }
  .blog-card--lead .blog-card__body { flex: 1 1 auto; gap: 10px; }
  .blog-card--lead .blog-card__title { font-size: 27px; line-height: 1.2; }
  .blog-card--lead .blog-card__excerpt { font-size: 15px; -webkit-line-clamp: 4; line-clamp: 4; }
}

/* ── Pagination ───────────────────────────────────────────────────────────── */
.blog-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 44px 0 10px;
}
.blog-pager__info { font-size: 13.5px; color: var(--text-muted); }
.blog-pager__btn {
  padding: 9px 18px;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
}
.blog-pager__btn:hover { border-color: var(--accent-border); color: var(--accent); }

/* ── Vide ─────────────────────────────────────────────────────────────────── */
.blog-empty { text-align: center; padding: 40px 0 60px; }
.blog-empty__t { font-size: 22px; font-weight: 700; color: var(--text-primary); margin: 0 0 8px; }
.blog-empty__d { font-size: 15px; color: var(--text-secondary); margin: 0 0 20px; }

/* ── Bandeau d'appel à l'action ───────────────────────────────────────────── */
.blog-cta { padding: 56px 0 20px; }
.blog-cta__box {
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
  border-radius: 22px;
  padding: 38px 28px;
  text-align: center;
}
.blog-cta__t {
  font-size: clamp(21px, 3.4vw, 28px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0 0 8px;
}
.blog-cta__d { font-size: 15px; color: var(--text-secondary); margin: 0 0 20px; }

/* ══════════════════════════════════════════════════════════════════════════
   Page article
   ══════════════════════════════════════════════════════════════════════════ */

.post__head { padding: 44px 0 22px; max-width: 760px; }
.post__crumb {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.post__crumb a { color: var(--text-muted); text-decoration: none; }
.post__crumb a:hover { color: var(--accent); }
.post__crumb-sep { opacity: .6; }

.post__title {
  font-size: clamp(28px, 4.6vw, 42px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin: 0 0 16px;
}
.post__lead {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 18px;
}
.post__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  font-size: 13.5px;
  color: var(--text-muted);
}
.post__dot { opacity: .6; }

.post__cover {
  max-width: 900px;
  margin-bottom: 34px;
}
.post__cover img {
  width: 100%;
  height: auto;
  border-radius: 20px;
  display: block;
}

/* Corps de l'article : la largeur est bridée pour rester lisible (~70 signes
   par ligne), indépendamment de la largeur de .container. */
.post__body {
  max-width: 720px;
  font-size: 17.5px;
  line-height: 1.78;
  color: var(--text-primary);
}
.post__body > *:first-child { margin-top: 0; }
.post__body p { margin: 0 0 22px; }
.post__body h2 {
  font-size: 25px;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin: 42px 0 14px;
}
.post__body h3 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  margin: 32px 0 10px;
}
.post__body ul, .post__body ol { margin: 0 0 22px; padding-left: 24px; }
.post__body li { margin-bottom: 9px; }
.post__body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.post__body a:hover { color: var(--accent-hover); }
.post__body strong { font-weight: 700; }
.post__body blockquote {
  margin: 28px 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--accent);
  color: var(--text-secondary);
  font-style: italic;
  font-size: 18px;
}
.post__body img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  margin: 26px 0;
  display: block;
}
.post__body figure { margin: 26px 0; }
/* Nos schémas sont des SVG sur fond blanc : sans filet, ils se confondent avec
   la page et on ne voit plus où commence l'illustration. */
.post__body figure img {
  margin: 0;
  border: 1px solid var(--border-light);
  background: #fff;
}
.post__body figcaption {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}
.post__body hr { border: 0; border-top: 1px solid var(--border-light); margin: 38px 0; }
.post__body code {
  font-family: var(--font-mono);
  font-size: .88em;
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 6px;
}
.post__body pre {
  background: var(--surface-2);
  padding: 16px 18px;
  border-radius: 12px;
  overflow-x: auto;
  margin: 0 0 22px;
}
.post__body pre code { background: none; padding: 0; }
/* Un tableau large doit défiler dans son coin, jamais élargir la page. */
.post__body table { width: 100%; border-collapse: collapse; margin: 0 0 22px; font-size: 15px; }
.post__body th, .post__body td { border: 1px solid var(--border-light); padding: 9px 12px; text-align: left; }
.post__body th { background: var(--surface); font-weight: 700; }

.post__cta { max-width: 720px; padding-top: 14px; }
.post__cta-box {
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
  border-radius: 20px;
  padding: 28px 26px;
  text-align: center;
}
.post__cta-t {
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0 0 8px;
}
.post__cta-d { font-size: 15px; line-height: 1.6; color: var(--text-secondary); margin: 0 0 18px; }

/* Encart au milieu d'un article long. Plus sobre que celui de fin de page :
   il coupe la lecture, il ne doit pas la voler. D'où le fond neutre, le trait
   d'accent sur le côté et l'absence de gros titre. */
/* Padding vertical seulement : le raccourci `padding` écraserait la gouttière
   horizontale de .container et l'encart toucherait les bords sur mobile. */
.post__inline-cta { max-width: 720px; padding-top: 6px; padding-bottom: 2px; }
.post__inline-cta__box {
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--accent);
  border-radius: 14px;
  padding: 20px 22px;
  background: #fff;
}
.post__inline-cta__eyebrow {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.post__inline-cta__t {
  font-size: 16.5px;
  line-height: 1.5;
  font-weight: 650;
  color: var(--text-primary);
  margin: 0 0 14px;
}

.post__more { padding: 56px 0 20px; border-top: 1px solid var(--border-light); margin-top: 50px; }
.post__more-t {
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0 0 22px;
}

@media (max-width: 640px) {
  .blog-hero { padding: 36px 0 20px; }
  .blog-grid { grid-template-columns: 1fr; gap: 24px; }
  .post__head { padding: 30px 0 18px; }
  .post__body { font-size: 16.5px; }
  .post__body h2 { font-size: 22px; margin-top: 34px; }
  .post__cover img, .blog-card__media { border-radius: 14px; }
  .blog-cta__box, .post__cta-box { padding: 26px 20px; border-radius: 18px; }
}
