/* ═══════════════════════════════════════════════════════════
   assets/css/blog.css — Pages blog Pulse
   Complète landing.css pour les pages blog.html et blog-post.html
   ═══════════════════════════════════════════════════════════ */

/* ─── Hero blog ────────────────────────────────────────────── */
.blog-hero {
  padding: 120px 0 60px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.blog-hero .section-badge { display: block; margin-bottom: 12px; }
.blog-hero__title {
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -.025em;
  color: var(--text);
  margin-bottom: 10px;
}
.blog-hero__sub { font-size: 16px; color: var(--muted); }

/* ─── Grille blog (blog.html) ─────────────────────────────── */
.blog-main { padding: 60px 0 96px; }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* Premier article en vedette (full width) */
.blog-card--featured {
  grid-column: 1 / -1;
  flex-direction: row;
}
.blog-card--featured .blog-card__img {
  width: 420px;
  height: 100%;
  min-height: 220px;
  flex-shrink: 0;
  border-radius: 0;
}
.blog-card--featured .blog-card__title { font-size: 20px; }
.blog-card--featured .blog-card__excerpt { -webkit-line-clamp: 4; }

/* Loading spinner */
.blog-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 0;
  color: var(--subtle);
  font-size: 14px;
}
.blog-loading__spinner {
  width: 24px; height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Empty state */
.blog-empty {
  text-align: center;
  padding: 80px 24px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.blog-empty i { font-size: 3rem; opacity: .25; }
.blog-empty p { font-size: 16px; }

/* Pagination */
.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 48px;
}
.btn-page {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.btn-page:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}
.btn-page:disabled { opacity: .4; cursor: not-allowed; }
#page-info { font-size: 13px; color: var(--muted); }

/* ─── Article individuel (blog-post.html) ─────────────────── */
.post-wrapper {
  max-width: 760px;
  margin: 0 auto;
  padding: 100px 24px 60px;
  min-height: 60vh;
}

/* Loading */
.post-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 0;
}

/* Breadcrumb */
.post-breadcrumb {
  margin-bottom: 28px;
}
.post-breadcrumb a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--subtle);
  text-decoration: none;
  transition: color 0.15s;
}
.post-breadcrumb a:hover { color: var(--accent); }

/* Header article */
.post-header { margin-bottom: 36px; }

.post-title {
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 16px;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  color: var(--subtle);
  margin-bottom: 24px;
}
.post-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.post-meta i { color: var(--accent); }

.post-cover {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}

/* Corps de l'article */
.post-content {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 17px;
  line-height: 1.85;
  color: #2D2D3A;
}

.post-content h2 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin: 36px 0 14px;
  letter-spacing: -.015em;
}
.post-content h3 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  margin: 28px 0 10px;
}
.post-content p { margin-bottom: 20px; }
.post-content strong { font-weight: 700; color: var(--text); }
.post-content em { font-style: italic; }
.post-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.post-content a:hover { opacity: .75; }
.post-content ul, .post-content ol {
  margin: 0 0 20px 24px;
}
.post-content li { margin-bottom: 6px; }
.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 12px 20px;
  margin: 24px 0;
  background: var(--accent-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--muted);
}
.post-content code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent);
}
.post-content pre {
  background: #1a1a2e;
  border-radius: var(--radius-sm);
  padding: 20px;
  overflow-x: auto;
  margin: 24px 0;
}
.post-content pre code {
  background: none;
  border: none;
  color: #E0E0F0;
  padding: 0;
  font-size: 14px;
}
.post-content img {
  max-width: 100%;
  border-radius: var(--radius-sm);
  margin: 16px 0;
}
.post-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

/* Navigation prev/next */
.post-nav { margin-top: 56px; border-top: 1px solid var(--border); padding-top: 32px; }
.post-nav__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.post-nav__link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  transition: all 0.15s;
}
.post-nav__link:hover { border-color: var(--accent); background: var(--accent-light); }
.post-nav__link span { font-size: 11px; color: var(--subtle); display: flex; align-items: center; gap: 5px; }
.post-nav__link strong { font-size: 13px; font-weight: 600; }
.post-nav__link--next { text-align: right; }
.post-nav__link--next span { justify-content: flex-end; }

/* 404 */
.post-notfound {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 80px 24px;
  text-align: center;
  color: var(--muted);
}
.post-notfound h2 { font-size: 22px; font-weight: 700; color: var(--text); }

/* CTA section bas de page */
.post-cta-section { padding: 40px 0; background: var(--bg-alt); border-top: 1px solid var(--border); }
.post-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.post-cta span { font-size: 15px; font-weight: 600; color: var(--text); }

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 960px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-card--featured { flex-direction: column; }
  .blog-card--featured .blog-card__img { width: 100%; height: 200px; }
}
@media (max-width: 640px) {
  .blog-grid   { grid-template-columns: 1fr; }
  .post-nav__inner { grid-template-columns: 1fr; }
  .post-cta { flex-direction: column; text-align: center; }
}
