/* Blog — chargé après styles.css, dont il reprend les variables, la navigation,
   les boutons, la FAQ et le pied de page. */

/* La landing bloque la sélection partout ; un article doit pouvoir se citer. */
body.blog, body.blog * { user-select: text; -webkit-user-select: text; }

.blog-nav .desktop-nav a[aria-current="page"] { color: var(--text); }
.lang-switch { display: grid; place-items: center; min-width: 38px; height: 34px; margin-right: 10px; padding: 0 10px; color: var(--muted); border: 1px solid var(--line); border-radius: 8px; font-family: var(--mono); font-size: .68rem; letter-spacing: .08em; transition: color .2s ease, border-color .2s ease; }
.lang-switch:hover { color: var(--text); border-color: var(--violet); }

.blog-main { padding-top: 150px; }
.post, .blog-index { max-width: 760px; }
.blog-index { max-width: 1160px; padding-bottom: 130px; }

.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 30px; padding: 0; list-style: none; color: var(--dim); font-family: var(--mono); font-size: .66rem; letter-spacing: .06em; }
.breadcrumbs li + li::before { content: "/"; margin-right: 8px; color: var(--line-bright); }
.breadcrumbs a { color: var(--muted); transition: color .2s ease; }
.breadcrumbs a:hover { color: var(--violet); }
.breadcrumbs li[aria-current] { overflow: hidden; max-width: 42ch; text-overflow: ellipsis; white-space: nowrap; }

.post-header { margin-bottom: 56px; }
.post-header h1 { max-width: 100%; margin-bottom: 24px; font-size: clamp(2.4rem, 5vw, 3.7rem); font-weight: 500; letter-spacing: -.06em; line-height: 1.02; }
.post-lead { max-width: 640px; margin-bottom: 26px; color: var(--muted); font-size: 1.12rem; line-height: 1.6; }
.post-meta { margin: 0; color: var(--dim); font-family: var(--mono); font-size: .66rem; letter-spacing: .06em; }
.post-meta span { margin: 0 6px; color: var(--line-bright); }

/* ── Contenu Markdown ─────────────────────────────────────────────────────── */
.prose { color: #d3cfd6; font-size: 1.06rem; line-height: 1.75; }
.prose > * + * { margin-top: 1.15em; }
.prose p, .prose ul, .prose ol, .prose blockquote { margin-bottom: 0; }
.prose h2 { margin: 2.4em 0 0; color: var(--text); font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 500; letter-spacing: -.04em; line-height: 1.15; }
.prose h3 { margin: 1.9em 0 0; color: var(--text); font-size: 1.25rem; font-weight: 500; letter-spacing: -.02em; line-height: 1.3; }
.prose h2 + *, .prose h3 + * { margin-top: .7em; }
.prose strong { color: var(--text); font-weight: 600; }
.prose em { color: var(--text); }
.prose a { color: var(--violet); border-bottom: 1px solid rgba(206,130,255,.35); transition: border-color .2s ease; }
.prose a:hover { border-color: var(--violet); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--violet); }
.prose blockquote { margin-left: 0; margin-right: 0; padding: 4px 0 4px 20px; color: var(--muted); border-left: 2px solid var(--violet); }
.prose hr { margin: 2.6em 0; border: 0; border-top: 1px solid var(--line); }
.prose code { padding: .1em .35em; color: var(--text); background: var(--surface-strong); border-radius: 4px; font-family: var(--mono); font-size: .86em; }
.prose .table-wrap { margin-top: 1.6em; }
.prose table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: .9rem; line-height: 1.45; }
.prose th, .prose td { padding: 14px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose thead th { color: var(--muted); font-family: var(--mono); font-size: .66rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; }
.prose td { color: var(--muted); }
.prose td:first-child { color: var(--text); }

/* ── FAQ et appel à l'action ──────────────────────────────────────────────── */
.blog-faq { margin-top: 80px; }
.blog-faq > h2 { margin-bottom: 24px; font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 500; letter-spacing: -.04em; }

.blog-cta { position: relative; overflow: hidden; margin: 80px 0 0; padding: 48px 40px; border: 1px solid var(--line-bright); border-radius: 18px; background: #1e1923; }
.blog-cta .cta-pattern { opacity: .4; }
.blog-cta-content { position: relative; z-index: 1; max-width: 520px; }
.blog-cta-title { margin-bottom: 14px; color: var(--text); font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 500; letter-spacing: -.05em; line-height: 1.08; }
.blog-cta-content p:not(.blog-cta-title) { margin-bottom: 28px; color: #d3cfd6; font-size: .98rem; line-height: 1.6; }

/* ── Listes d'articles ────────────────────────────────────────────────────── */
.related { padding-top: 110px; padding-bottom: 130px; }
.related-heading { margin-bottom: 28px; font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 500; letter-spacing: -.04em; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.post-card { display: flex; flex-direction: column; padding: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; transition: transform .3s ease, border-color .3s ease; }
.post-card:hover { transform: translateY(-5px); border-color: rgba(206,130,255,.4); }
.post-card h2, .post-card h3 { margin: 16px 0 12px; font-size: 1.3rem; font-weight: 500; letter-spacing: -.03em; line-height: 1.25; }
.post-card h2 a, .post-card h3 a { transition: color .2s ease; }
.post-card h2 a:hover, .post-card h3 a:hover { color: var(--violet); }
.post-card > p:not(.post-meta) { margin-bottom: 22px; color: var(--muted); font-size: .92rem; line-height: 1.55; }
.post-card .text-link { align-self: flex-start; margin-top: auto; }

@media (max-width: 760px) {
  .lang-switch { margin-left: auto; margin-right: 8px; height: 32px; }
  .blog-nav .nav-button { margin-left: 0; }
}

@media (max-width: 620px) {
  .blog-main { padding-top: 118px; }
  .post-header { margin-bottom: 40px; }
  .post-lead { font-size: 1rem; }
  .prose { font-size: 1rem; }
  .blog-cta { margin-top: 60px; padding: 32px 22px; }
  .blog-cta .button { width: 100%; }
  .related { padding-top: 80px; padding-bottom: 90px; }
  .post-grid { grid-template-columns: 1fr; }
  .breadcrumbs li[aria-current] { max-width: 24ch; }
}
