/* StormPress — blog. S'appuie sur les tokens de style.css, chargé avant.
   Direction : la page d'accueil vend, le blog se lit. Même ciel d'orage, mais une colonne
   de texte à ~68 caractères, un corps plus grand, et l'accent cyan réservé aux repères
   (catégorie, sommaire, filets), jamais aux paragraphes. */

.nav-links a[aria-current="page"] { color: var(--text); }

/* ── Index ──────────────────────────────────────── */
.blog-hero { position: relative; padding: calc(var(--space-section) * .45) 0 calc(var(--space-section) * .35); overflow-x: clip; }
.blog-hero .wrap { position: relative; z-index: 1; }
.blog-hero h1 { font-size: clamp(2.2rem, 1.2rem + 3.6vw, 3.9rem); letter-spacing: -0.035em; margin-bottom: 1.1rem; }
.blog-cats { list-style: none; padding: 0; margin: 1.6rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.blog-cats li { font-family: var(--font-mono); font-size: .72rem; padding: .25rem .6rem; border-radius: var(--radius-pill); border: 1px solid var(--line-strong); color: var(--text-2); }

.blog-list { padding-top: 0; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.post-grid > * { min-width: 0; }
@media (max-width: 960px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .post-grid { grid-template-columns: 1fr; } }

.post-card {
  position: relative; display: flex; flex-direction: column; gap: .7rem;
  padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--glass-strong), var(--glass));
  transition: border-color var(--dur-fast) var(--ease), transform var(--dur) var(--ease);
}
.post-card:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.post-card:focus-within { border-color: var(--storm); }
.post-card h2, .post-card h3 { font-size: 1.2rem; line-height: 1.25; letter-spacing: -0.015em; }
/* Toute la carte est cliquable, mais un seul lien dans l'arbre d'accessibilité. */
.post-card h2 a::after, .post-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.post-card h2 a:focus-visible, .post-card h3 a:focus-visible { outline: none; }
.post-card > p:last-child { color: var(--text-2); font-size: .95rem; }

.post-card.featured {
  margin-bottom: 1rem; padding: clamp(1.6rem, 1.2rem + 2vw, 2.6rem);
  border-color: rgba(34, 211, 238, .35);
  background: radial-gradient(70% 140% at 0% 0%, rgba(34, 211, 238, .14), transparent 60%), linear-gradient(180deg, var(--glass-strong), var(--glass));
}
.post-card.featured h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.2rem); max-width: 40rem; }
.post-card.featured > p:last-child { font-size: 1.05rem; max-width: 44rem; }

.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1rem; font-family: var(--font-mono); font-size: .74rem; color: var(--text-3); }
.post-meta .cat { color: var(--storm); letter-spacing: .06em; text-transform: uppercase; }
.feed-link { margin-top: 2rem; font-size: .9rem; color: var(--text-3); }
.feed-link a { text-decoration: underline; text-underline-offset: 3px; }
.feed-link a:hover { color: var(--text); }

/* ── Article ────────────────────────────────────── */
.post-head { padding: calc(var(--space-section) * .4) 0 2.5rem; border-bottom: 1px solid var(--line); }
.post-head h1 { font-size: clamp(2rem, 1.2rem + 3vw, 3.4rem); letter-spacing: -0.03em; max-width: 52rem; margin: 1rem 0 1.2rem; }
.post-head .lead { max-width: 46rem; margin-bottom: 1.4rem; }
.crumbs { display: flex; gap: .55rem; font-family: var(--font-mono); font-size: .76rem; color: var(--text-3); }
.crumbs a { color: var(--storm); }
.crumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }

.post-layout { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 3.5rem; padding-block: 3rem 1rem; align-items: start; }
.post-layout > .prose:only-child { grid-column: 1 / -1; }
@media (max-width: 1000px) { .post-layout { grid-template-columns: minmax(0, 1fr); gap: 2rem; } }

.toc { position: sticky; top: 96px; font-size: .88rem; }
.toc p { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-bottom: .8rem; }
.toc ol { list-style: none; padding: 0 0 0 .9rem; margin: 0; display: grid; gap: .55rem; border-left: 1px solid var(--line-strong); counter-reset: toc; }
.toc li { counter-increment: toc; color: var(--text-2); line-height: 1.35; }
.toc li::before { content: counter(toc, decimal-leading-zero) " "; font-family: var(--font-mono); font-size: .7rem; color: var(--storm); }
.toc a:hover { color: var(--text); }
@media (max-width: 1000px) {
  .toc { position: static; padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--glass); }
}

.prose { max-width: 44rem; font-size: clamp(1.02rem, .98rem + .2vw, 1.12rem); line-height: 1.75; color: #d5dbe8; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { font-size: clamp(1.4rem, 1.15rem + 1vw, 1.85rem); margin-top: 2.6em; color: var(--text); line-height: 1.2; }
.prose h3 { font-size: 1.18rem; margin-top: 2em; color: var(--text); line-height: 1.3; }
.prose h2 + *, .prose h3 + * { margin-top: .75em; }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--storm-2); text-decoration: underline; text-decoration-color: rgba(122, 231, 246, .4); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: currentColor; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--storm); }
.prose :not(pre) > code {
  font-size: .86em; padding: .1em .38em; border-radius: 6px;
  background: var(--ink-3); border: 1px solid var(--line); color: #e6f7fb; overflow-wrap: anywhere;
}
.prose pre {
  margin-top: 1.4em; padding: 1.1rem 1.2rem; border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, .45); border: 1px solid var(--line);
  font-size: .82rem; line-height: 1.6; overflow-x: auto; color: #d7dcea;
}
.prose pre .k { color: var(--storm); } .prose pre .s { color: #9ec5ff; } .prose pre .c { color: var(--text-3); }
.prose blockquote { margin-inline: 0; padding-left: 1.2rem; border-left: 2px solid var(--storm); color: var(--text); font-size: 1.08em; }
.prose hr { border: 0; height: 1px; background: var(--line-strong); margin-block: 2.5em; }

/* Encadrés : « note » pour un repère, « honest » pour une limite assumée. Deux rôles,
   deux teintes — la seconde emprunte l'ambre du comparatif (« partiel »). */
.prose .note, .prose .honest {
  padding: 1rem 1.2rem; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--glass); font-size: .95em;
}
.prose .note { border-left: 2px solid var(--storm); }
.prose .honest { border-left: 2px solid var(--partial); }
.prose .note > p:first-child, .prose .honest > p:first-child { margin-top: 0; }
.prose .note > * + *, .prose .honest > * + * { margin-top: .6em; }
.prose .label { display: block; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .4rem; }
.prose .note .label { color: var(--storm); }
.prose .honest .label { color: var(--partial); }

.prose .table-wrap { margin-top: 1.4em; }
.prose table { min-width: 520px; font-size: .9rem; }
.prose th:first-child, .prose td:first-child { position: static; background: none; }
.prose th:nth-child(2), .prose td:nth-child(2) { background: none; border-inline: 0; font-weight: inherit; }

.prose ul.post-tags { list-style: none; padding: 0; margin-top: 2.6em; display: flex; flex-wrap: wrap; gap: .4rem; }
.prose .post-tags li { margin: 0; font-family: var(--font-mono); font-size: .72rem; padding: .25rem .6rem; border-radius: var(--radius-pill); border: 1px solid var(--line-strong); color: var(--text-2); }

.post-cta { padding: 1rem 0 0; }
.post-cta .cta-inline { margin-top: 0; }
.related { padding-top: 4rem; }
.related h2 { font-size: 1.5rem; margin-bottom: 1.4rem; }
