/* ============ BLOG ============ */

/* Header */
.blog-hero { padding: 3.5rem 0 1.5rem; }
.blog-hero h1 {
  font-family: 'Nunito', sans-serif;
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.05;
  margin-bottom: 0.6rem;
}
.blog-hero p { font-size: 15px; color: var(--text2); font-weight: 300; }

/* ---- Barre de filtres par tag ---- */
.tag-filter { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 2rem; }
.tag-chip {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font-family: 'DM Sans', sans-serif; font-size: 13px;
  padding: 5px 13px; border-radius: 99px;
  border: 1px solid var(--border2); background: var(--bg2);
  color: var(--text2); transition: all 0.15s;
}
.tag-chip:hover { background: var(--bg3); color: var(--text); }
.tag-chip.on { background: var(--text); border-color: var(--text); color: var(--bg2); }
.tag-chip .count { font-family: 'DM Mono', monospace; font-size: 11px; font-weight: 500; color: var(--amber); }
.tag-chip.on .count { color: var(--bg2); }

/* ---- Grille d'articles ---- */
.post-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem; margin-bottom: 4rem;
}
.post-card {
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r3); padding: 1.5rem; min-height: 200px;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s ease, box-shadow 0.3s ease;
}
.post-card:hover { transform: translateY(-8px) scale(1.02); border-color: var(--border2); box-shadow: 0 24px 48px rgba(0, 0, 0, 0.14); }
@media (prefers-reduced-motion: reduce) {
  .post-card { transition: border-color 0.15s; }
  .post-card:hover { transform: none; box-shadow: none; }
}
.post-card.hidden { display: none; }
.post-card h2 {
  font-size: 18px; font-weight: 600; letter-spacing: -0.02em;
  line-height: 1.3; margin-bottom: 0.5rem;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.post-card-date { font-family: 'DM Mono', monospace; font-size: 12px; color: var(--text3); margin-bottom: 0.85rem; }
.post-card p { font-size: 13.5px; color: var(--text2); line-height: 1.6; font-weight: 300; }
.post-card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; padding-top: 1.25rem; }
.post-tag {
  font-size: 11.5px; padding: 3px 10px;
  border: 1px solid var(--border); border-radius: 99px;
  color: var(--text3); background: var(--bg);
}
.blog-empty, .blog-error {
  grid-column: 1 / -1; padding: 3rem 1rem; text-align: center;
  font-size: 14px; color: var(--text2); font-weight: 300;
}
.blog-error a { color: var(--text); }

@media (max-width: 900px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .post-grid { grid-template-columns: 1fr; } }

/* ---- Article ---- */
.article-head { padding: 3.5rem 0 2rem; border-bottom: 1px solid var(--border); margin-bottom: 2.5rem; }
.article-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'DM Mono', monospace; font-size: 12px;
  color: var(--text3); text-decoration: none;
  margin-bottom: 1.75rem; transition: color 0.15s;
}
.article-back:hover { color: var(--text); }
.article-meta {
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
  font-family: 'DM Mono', monospace; font-size: 11.5px;
  color: var(--text3); margin-bottom: 1rem;
}
.article-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--border2); }
.article-head h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 400; letter-spacing: -0.035em; line-height: 1.15;
}
.article-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 1.25rem; }

/* ---- Prose (Markdown rendu) ---- */
.prose { max-width: 680px; margin: 0 auto 2.5rem; }

/* FAQ (questions fréquentes) */
.article-faq { max-width: 680px; margin: 0 auto 2.5rem; }
.article-faq > h2 {
  font-size: 24px; font-weight: 500; letter-spacing: -0.025em;
  margin-bottom: 1.25rem;
}
.faq-item { padding: 1rem 0; border-top: 1px solid var(--border); }
.faq-item:first-of-type { border-top: none; padding-top: 0; }
.faq-item h3 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 0.4rem; }
.faq-item p { font-size: 15px; color: var(--text2); line-height: 1.7; font-weight: 300; }

/* À lire aussi (maillage interne) */
.article-related { max-width: 680px; margin: 1rem auto 4rem; }
.article-related > h2 {
  font-family: 'DM Mono', monospace; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text3); margin-bottom: 1rem;
}
.related-list { display: grid; gap: 0.75rem; }
.related-card {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1rem 1.25rem; border: 1px solid var(--border);
  border-radius: var(--r2); background: var(--bg2);
  text-decoration: none; color: inherit;
  transition: background 0.15s, border-color 0.15s;
}
.related-card:hover { background: var(--bg3); border-color: var(--border2); }
.related-title { font-size: 14px; font-weight: 500; line-height: 1.35; }
.related-date { font-family: 'DM Mono', monospace; font-size: 11px; color: var(--text3); white-space: nowrap; }

/* Signature de fin d'article */
.article-byline {
  max-width: 680px; margin: 0 auto 2.5rem;
  padding-top: 1.5rem; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 0.6rem;
  font-family: 'DM Mono', monospace; font-size: 12.5px; color: var(--text3);
}
.article-byline strong { color: var(--text); font-weight: 500; }
.article-byline .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--border2); }
.prose > * { margin-bottom: 1.15rem; }
.prose h2 {
  font-size: 24px; font-weight: 500; letter-spacing: -0.025em;
  line-height: 1.25; margin-top: 2.5rem; margin-bottom: 1rem;
}
.prose h3 {
  font-size: 18px; font-weight: 600; letter-spacing: -0.015em;
  margin-top: 2rem; margin-bottom: 0.75rem;
}
.prose p, .prose li { font-size: 16px; line-height: 1.8; color: var(--text); font-weight: 300; }
.prose strong { font-weight: 600; }
.prose a { color: var(--green); text-decoration: underline; text-underline-offset: 2px; }
.prose ul, .prose ol { padding-left: 1.4rem; display: flex; flex-direction: column; gap: 0.4rem; }
.prose li { padding-left: 0.25rem; }
.prose blockquote {
  border-left: 2px solid var(--green); padding: 0.25rem 0 0.25rem 1.25rem;
  color: var(--text2); font-style: italic;
}
.prose code {
  font-family: 'DM Mono', monospace; font-size: 13.5px;
  background: var(--bg3); border: 1px solid var(--border);
  padding: 1px 6px; border-radius: 4px; color: var(--text);
}
.prose pre {
  background: #1A1917; color: #F0EFED;
  border-radius: var(--r2); padding: 1.25rem 1.5rem;
  overflow-x: auto; font-size: 13px; line-height: 1.6;
}
.prose pre code { background: none; border: none; padding: 0; color: inherit; font-size: 13px; }
.prose img { max-width: 100%; height: auto; border-radius: var(--r2); border: 1px solid var(--border); }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }
.prose h2:first-child, .prose h3:first-child, .prose p:first-child { margin-top: 0; }

@media (max-width: 640px) {
  .prose p, .prose li { font-size: 15px; }
}
