/* ==========================================================================
   Effect.Labs — Blog (accueil pages/blog.html + articles pages/blog/*.html)
   Feuille partagée, chargée APRÈS css/style.css dont elle reprend les variables
   (--bg-card, --border, --primary, --gradient-primary, --text-secondary…).
   Le style propre aux démos de chaque article reste en ligne dans l'article.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Jetons du blog — lisibles dans les deux thèmes (AA sur le fond de page)
   -------------------------------------------------------------------------- */
body.blog-home,
body.blog-post {
  --blog-dim: var(--text-muted);          /* #8b8b93 sur #0a0a0f : 5,2:1 */
  --blog-link: var(--primary-light);      /* #818cf8 sur #0a0a0f : 7,2:1 */
  --blog-ring: rgba(99, 102, 241, 0.45);
  --blog-code-bg: #0b0b12;
  --blog-code-head: #12121a;
  --blog-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
body.theme-light.blog-home,
body.theme-light.blog-post {
  --blog-dim: #64748b;                    /* 4,8:1 sur #f8fafc */
  --blog-link: var(--primary-dark);       /* #4f46e5 sur #f8fafc : 6,3:1 */
}

/* Alias des variables historiques (:root des anciens articles) encore utilisées
   par le CSS en ligne des démos : --secondary, --success, --bg, --gradient… */
body.blog-post {
  --secondary: #8b5cf6;
  --success: #10b981;
  --warning: #f59e0b;
  --bg: var(--bg-primary);
  --text: var(--text-primary);
  --gradient: var(--gradient-primary);
  --bg-code: #0d0d14;
  --bg-card-hover: var(--bg-elevated);
}

.blog-main :focus-visible {
  outline: 2px solid var(--blog-link);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Composant commun : carte d'article (accueil + « À lire aussi »)
   -------------------------------------------------------------------------- */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.article-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  color: inherit;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}
.article-card:hover { border-color: var(--blog-ring); transform: translateY(-2px); }

.article-media {
  position: relative;
  aspect-ratio: 3 / 2;
  background: #0b0b12;
  overflow: hidden;
}
.article-media img { width: 100%; height: 100%; object-fit: cover; }

/* Effet sans poster (pas encore capturé) : aplat sobre + nom de l'effet */
.article-media--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ph, linear-gradient(135deg, #1a1a2e, #0b0b12));
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.article-chip {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(10, 10, 15, 0.74);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.article-chip--free {
  left: auto;
  right: 10px;
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.32);
}

.article-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
  padding: 16px 18px 18px;
}
.article-title {
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.article-excerpt {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-footer {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--blog-dim);
}

/* Titre de section commun (catalogue de l'article, « À lire aussi ») */
.post-section-title {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.post-section-sub {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0 0 20px;
}

/* ==========================================================================
   ACCUEIL DU BLOG
   ========================================================================== */
.blog-header { padding: 128px 0 36px; }
.blog-header h1 {
  font-size: clamp(2.25rem, 4.5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.025em;
}
.blog-lede {
  max-width: 600px;
  margin: var(--space-4) auto 0;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Chiffres clés : <dl><div><dt>…</dt><dd>…</dd></div> — valeur affichée au-dessus du libellé */
.blog-facts {
  display: flex;
  justify-content: center;
  gap: 44px;
  margin: 28px 0 0;
}
.blog-facts div { display: flex; flex-direction: column; align-items: center; }
.blog-facts dt {
  order: 2;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--blog-dim);
}
.blog-facts dd {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* Barre filtres + compteur */
.blog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 16px 0;
  margin-bottom: 36px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.blog-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.blog-filter {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}
.blog-filter:hover { color: var(--text-primary); border-color: var(--blog-ring); }
.blog-filter[aria-pressed="true"] {
  background: var(--primary-dark);   /* blanc sur #4f46e5 : 6,3:1 */
  border-color: var(--primary-dark);
  color: #fff;
}
.blog-count { font-size: 0.85rem; color: var(--blog-dim); }

/* À la une */
.blog-featured {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  margin-bottom: 56px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  color: inherit;
  transition: border-color var(--transition-fast);
}
.blog-featured:hover { border-color: var(--blog-ring); }
.blog-featured-media { position: relative; aspect-ratio: 3 / 2; max-height: 440px; background: #0b0b12; }
.blog-featured-media img { width: 100%; height: 100%; object-fit: cover; }
.blog-featured-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: 36px 40px;
}
.blog-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blog-link);
}
.blog-featured h2 {
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.blog-featured p { line-height: 1.6; color: var(--text-secondary); }
.blog-featured-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 0.85rem;
  color: var(--blog-dim);
}
.blog-featured-cta {
  align-self: flex-start;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--gradient-primary);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
}

/* Groupes thématiques */
.blog-group { margin-bottom: 56px; }
.blog-group[hidden] { display: none; }
.blog-group-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.blog-group-title { font-size: 1.125rem; font-weight: 700; letter-spacing: -0.01em; }
.blog-group-count { margin-left: auto; font-size: 0.8rem; color: var(--blog-dim); }

/* ==========================================================================
   ARTICLE
   ========================================================================== */
.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 264px;
  gap: 64px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 120px 0 72px;
}
.post-main { min-width: 0; max-width: 760px; }

/* En-tête */
.post-header { margin-bottom: 40px; }
.post-header .breadcrumb { margin-bottom: 22px; }
.post-category {
  display: inline-block;
  margin-bottom: 18px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--blog-link);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.post-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin-bottom: 18px;
}
.post-lede {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 24px;
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.post-author { display: flex; align-items: center; gap: 12px; }
.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}
.author-name { font-size: 0.95rem; font-weight: 600; }
.author-role { font-size: 0.8rem; color: var(--blog-dim); }
.post-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-left: auto;
  font-size: 0.875rem;
  color: var(--blog-dim);
}
.post-stat { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }

/* Corps de l'article */
.article-content { font-size: 1.0625rem; line-height: 1.75; }
.article-content > h2 {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 56px 0 18px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  scroll-margin-top: 96px;
}
.article-content > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.article-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 32px 0 12px;
  scroll-margin-top: 96px;
}
.article-content p { margin: 0 0 20px; color: var(--text-secondary); }
.article-content strong { color: var(--text-primary); font-weight: 600; }
.article-content a {
  color: var(--blog-link);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.article-content a:hover { color: var(--text-primary); }
.article-content ul,
.article-content ol { margin: 0 0 20px; padding-left: 22px; color: var(--text-secondary); }
.article-content li { margin-bottom: 8px; }
.article-content li::marker { color: var(--blog-link); }
.article-content :not(pre) > code {
  font-family: var(--blog-mono);
  font-size: 0.86em;
  padding: 0.15em 0.4em;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--text-primary);
}

/* Blocs de code — toujours sombres (les deux thèmes), la coloration reste lisible */
.code-block {
  margin: 24px 0 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: hidden;
  background: var(--blog-code-bg);
}
.theme-light .code-block { border-color: rgba(15, 23, 42, 0.12); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); }
.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 10px 16px;
  background: var(--blog-code-head);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.code-header-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.code-dots { display: flex; gap: 6px; }
.code-dot { width: 10px; height: 10px; border-radius: 50%; }
.code-dot.red { background: #ef4444; }
.code-dot.yellow { background: #f59e0b; }
.code-dot.green { background: #22c55e; }
.code-filename {
  font-family: var(--blog-mono);
  font-size: 0.8rem;
  color: #a1a1aa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.code-copy {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.code-copy:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.22); }
.code-copy:focus-visible { outline: 2px solid var(--primary-light); outline-offset: 2px; }
.code-copy.copied { background: rgba(16, 185, 129, 0.2); border-color: rgba(16, 185, 129, 0.5); color: #6ee7b7; }
.code-body { padding: 18px 20px; overflow-x: auto; }
.code-body pre {
  margin: 0;
  font-family: var(--blog-mono);
  font-size: 0.84rem;
  line-height: 1.65;
  tab-size: 2;
}
.code-body code { color: #e2e8f0; }

/* Extrait de code nu (<pre><code> sans bloc « Copier » : 4 articles) : même cadre sombre */
.article-content > pre,
.article-content > div > pre {
  margin: 20px 0 24px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: var(--blog-code-bg);
  color: #e2e8f0;
  font-family: var(--blog-mono);
  font-size: 0.84rem;
  line-height: 1.65;
  overflow-x: auto;
  tab-size: 2;
}
.article-content > pre code,
.article-content > div > pre code { font: inherit; padding: 0; background: none; color: inherit; }
.theme-light .article-content > pre,
.theme-light .article-content > div > pre { border-color: rgba(15, 23, 42, 0.12); }

/* Coloration syntaxique (jetons .token générés dans les articles) */
.token.comment { color: #71717a; font-style: italic; }
.token.selector { color: #fbbf24; }
.token.property { color: #f472b6; }
.token.value { color: #34d399; }
.token.string { color: #34d399; }
.token.number { color: #f472b6; }
.token.unit { color: #60a5fa; }
.token.keyword { color: #c084fc; }
.token.function { color: #60a5fa; }
.token.tag { color: #f472b6; }
.token.attr-name { color: #fbbf24; }
.token.attr-value { color: #34d399; }
.token.punctuation { color: #94a3b8; }

/* Cadre de démo (le contenu de la démo est stylé dans l'article) */
.demo-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  margin: 20px 0 28px;
  padding: 56px 40px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: var(--bg-card);
  overflow: hidden;
}
.demo-box.dark { background: radial-gradient(120% 90% at 50% 0%, #171730 0%, #0f0f1a 60%, #0b0b12 100%); }
.theme-light .demo-box { border-color: rgba(15, 23, 42, 0.12); }

/* Encadrés */
.info-box {
  display: flex;
  gap: 14px;
  margin: 24px 0;
  padding: 18px 20px;
  border: 1px solid transparent;
  border-radius: 12px;
}
.info-box.tip { background: rgba(16, 185, 129, 0.08); border-color: rgba(16, 185, 129, 0.28); }
.info-box.warning { background: rgba(245, 158, 11, 0.08); border-color: rgba(245, 158, 11, 0.3); }
.info-box.info { background: rgba(99, 102, 241, 0.1); border-color: rgba(99, 102, 241, 0.3); }
.info-box-icon { flex-shrink: 0; font-size: 1.25rem; line-height: 1.4; }
.info-box-content { flex: 1; min-width: 0; }
.info-box-title { font-weight: 700; margin-bottom: 4px; }
.info-box.tip .info-box-title { color: #34d399; }
.info-box.warning .info-box-title { color: #fbbf24; }
.info-box.info .info-box-title { color: #a5b4fc; }
.theme-light .info-box.tip .info-box-title { color: #047857; }
.theme-light .info-box.warning .info-box-title { color: #b45309; }
.theme-light .info-box.info .info-box-title { color: #4338ca; }
.info-box p { margin: 0; font-size: 0.95rem; }

/* Appel vers le catalogue, dans le corps de l'article */
.fx-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin: 36px 0;
  padding: 22px 24px;
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.06));
}
.fx-cta-text strong { display: block; font-size: 1.02rem; color: var(--text-primary); margin-bottom: 2px; }
.fx-cta-text p { margin: 0; font-size: 0.9rem; color: var(--text-secondary); }
.fx-cta-btn {
  flex-shrink: 0;
  padding: 11px 18px;
  border-radius: 10px;
  background: var(--gradient-primary);
  color: #fff !important;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none !important;
  white-space: nowrap;
}
.fx-cta-btn:hover { filter: brightness(1.08); }

/* Colonne latérale : sommaire collant + partage */
.post-aside {
  position: sticky;
  top: 96px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.post-toc,
.post-share {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
}
.post-toc summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blog-dim);
  cursor: default;
}
.post-toc summary::-webkit-details-marker { display: none; }
.post-toc summary svg { display: none; }
@media (min-width: 1025px) {
  .post-toc summary { pointer-events: none; }   /* à côté de l'article, le sommaire reste déplié */
}
.toc-progress {
  height: 3px;
  margin-bottom: 14px;
  border-radius: 2px;
  background: var(--border);
  overflow: hidden;
}
.toc-progress-bar { width: 0; height: 100%; background: var(--gradient-primary); }
.toc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.toc-list a {
  display: block;
  padding: 6px 0 6px 12px;
  border-left: 2px solid transparent;
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--text-secondary);
  transition: color var(--transition-fast), border-color var(--transition-fast);
}
.toc-list a:hover { color: var(--text-primary); }
.toc-list a.active { color: var(--text-primary); border-left-color: var(--primary); font-weight: 600; }
.share-title {
  margin-bottom: 12px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blog-dim);
}
.share-buttons { display: flex; gap: 10px; }
.share-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}
.share-btn:hover { color: var(--text-primary); border-color: var(--blog-ring); }
.share-btn.copied { color: #6ee7b7; border-color: rgba(16, 185, 129, 0.5); }
.theme-light .share-btn.copied { color: #047857; }

/* Fin d'article : les effets du catalogue */
.post-effects { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--border); }
.fx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.fx-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  color: inherit;
  transition: border-color var(--transition-fast);
}
.fx-card:hover { border-color: var(--blog-ring); }
.fx-card-media { aspect-ratio: 3 / 2; background: #0b0b12; }
.fx-card-media img { width: 100%; height: 100%; object-fit: cover; }
.fx-card-body { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 12px; }
.fx-card-name { font-size: 0.9rem; font-weight: 600; line-height: 1.3; }
.fx-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--blog-dim);
}
.fx-badge {
  padding: 2px 8px;
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.fx-badge--free { color: #6ee7b7; background: rgba(16, 185, 129, 0.15); border-color: rgba(16, 185, 129, 0.25); }
.theme-light .fx-badge { color: #6d28d9; }
.theme-light .fx-badge--free { color: #047857; }

/* À lire aussi */
.post-related { max-width: 1120px; margin: 0 auto; padding: 0 0 72px; }

/* Lettre d'information */
.post-newsletter {
  padding: 64px 0;
  border-top: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.06));
}
.newsletter-content { max-width: 560px; margin: 0 auto; text-align: center; }
.newsletter-content h2 { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 10px; }
.newsletter-content p { color: var(--text-secondary); margin-bottom: 24px; }
.newsletter-form { display: flex; gap: 10px; }
.newsletter-form input {
  flex: 1;
  min-width: 0;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--text-primary);
  font: inherit;
}
.newsletter-form input:focus-visible { outline: 2px solid var(--blog-link); outline-offset: 2px; border-color: var(--primary); }
.newsletter-form button {
  padding: 13px 22px;
  border: 0;
  border-radius: 10px;
  background: var(--gradient-primary);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Écrans étroits
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .post-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 104px; }
  .post-main { max-width: none; }
  /* La colonne disparaît : le sommaire passe AVANT l'article (replié), le partage APRÈS */
  .post-aside { display: contents; }
  .post-toc { order: -1; }
  .post-toc summary { margin-bottom: 0; cursor: pointer; }
  .post-toc[open] summary { margin-bottom: 14px; }
  .post-toc summary svg { display: block; transition: transform var(--transition-fast); }
  .post-toc[open] summary svg { transform: rotate(180deg); }
  .toc-progress { display: none; }
  .post-share { order: 1; }
}

@media (max-width: 900px) {
  .blog-featured { grid-template-columns: 1fr; }
  .blog-featured-body { padding: 24px; }
}

@media (max-width: 768px) {
  .blog-header { padding-top: 104px; }
  .blog-facts { gap: 28px; }
  .articles-grid { grid-template-columns: 1fr; }
  .post-stats { margin-left: 0; }
  .demo-box { min-height: 220px; padding: 36px 16px; }
  .code-body { padding: 14px; }
  .fx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .newsletter-form { flex-direction: column; }
}

/* Tableaux et identifiants longs : jamais plus larges que la colonne sur téléphone */
.article-content table { display: block; max-width: 100%; overflow-x: auto; }
.article-content :not(pre) > code { overflow-wrap: anywhere; }
