/* =========================================================
   BLOG — liste et article (mise en page éditoriale)
   ========================================================= */

/* ---------- Cartes d'article ---------- */
.post-card { position: relative; display: grid; gap: var(--space-2); align-content: start; height: 100%; }
.post-card__media { overflow: hidden; border-radius: var(--radius); background: var(--c-sand); }
.post-card__media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .6s var(--ease); }
.post-card:hover .post-card__media img { transform: scale(1.04); }
.post-card__body { display: grid; gap: .55rem; }
.post-card__meta { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--c-muted); }
.post-card__title { font-size: var(--fs-h4); line-height: 1.25; }
.post-card__title a { color: inherit; text-decoration: none; }
/* Toute la carte est cliquable via le lien du titre */
.post-card__title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.post-card__title a:focus-visible { outline: none; }
.post-card:has(a:focus-visible) { outline: 2.5px solid var(--c-accent); outline-offset: 6px; border-radius: var(--radius); }
.post-card__excerpt { color: var(--c-muted); font-size: var(--fs-sm); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card__more { display: inline-flex; align-items: center; gap: .4rem; font-size: var(--fs-sm); font-weight: 600; color: var(--c-primary); }
.post-card__more .icon { transition: transform .3s var(--ease); }
.post-card:hover .post-card__more .icon { transform: translateX(4px); }

/* Article à la une */
.post-card--featured { margin-bottom: var(--space-5); padding-bottom: var(--space-5); border-bottom: 1.5px dashed color-mix(in srgb, var(--c-accent) 60%, transparent); }
.post-card--featured .post-card__title { font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.6rem); letter-spacing: -.01em; }
.post-card--featured .post-card__excerpt { font-size: var(--fs-lg); -webkit-line-clamp: 4; }
@media (min-width: 960px) {
  .post-card--featured { grid-template-columns: 1.25fr 1fr; gap: var(--space-5); align-items: center; }
  .post-card--featured .post-card__media img { aspect-ratio: 4 / 3; }
}

.post-grid { display: grid; gap: var(--space-5) var(--space-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }

.pager { display: flex; justify-content: center; gap: .4rem; margin-top: var(--space-5); }
.pager a { display: grid; place-items: center; min-width: 44px; height: 44px; border-radius: var(--radius-pill); border: 1px solid var(--c-line); text-decoration: none; font-weight: 600; color: var(--c-text); }
.pager a:hover { border-color: var(--c-primary); }
.pager a[aria-current="page"] { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.blog-empty { padding: var(--space-5) 0; text-align: center; color: var(--c-muted); }

/* ---------- Article ---------- */
.post__head { display: grid; gap: var(--space-2); justify-items: start; max-width: 860px; padding-block: var(--space-5) var(--space-4); }
.post__meta { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--c-accent-strong); }
.post__head h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem); line-height: 1.12; letter-spacing: -.015em; max-width: 24ch; }
.post__lead { font-size: var(--fs-lg); color: var(--c-muted); max-width: 60ch; }

.post__cover { margin-bottom: var(--space-5); }
.post__cover img { width: 100%; aspect-ratio: 16 / 9; max-height: 620px; object-fit: cover; border-radius: var(--radius-l); }

.post__body { width: min(68ch, 100% - 2rem); margin-inline: auto; padding-bottom: var(--space-6); font-size: var(--fs-lg); line-height: 1.75; }
.post__body > * + * { margin-top: 1.1em; }
.post__body h2 { margin-top: 1.8em; font-size: var(--fs-h3); line-height: 1.25; }
.post__body h3 { margin-top: 1.5em; font-family: var(--font-body); font-size: var(--fs-lg); font-weight: 600; }
.post__body ul, .post__body ol { padding-left: 1.3em; }
.post__body li + li { margin-top: .35em; }
.post__body li::marker { color: var(--c-accent-strong); font-weight: 600; }
.post__body a { color: var(--c-primary); text-decoration-color: var(--c-accent); text-underline-offset: 3px; }
.post__body blockquote { padding: var(--space-2) var(--space-3); border-left: 3px solid var(--c-accent); background: var(--c-sand); border-radius: 0 var(--radius-s) var(--radius-s) 0; font-family: var(--font-title); font-style: italic; }
/* Lettrine sur le premier paragraphe */
.post__body > p:first-child::first-letter { float: left; margin: .08em .12em 0 0; font-family: var(--font-title); font-size: 3.4em; line-height: .85; color: var(--c-primary); }

.post__cta { margin-top: var(--space-5); padding: var(--space-4); border-radius: var(--radius-l); background: var(--c-primary); color: var(--c-on-dark); font-size: var(--fs-base); }
.post__cta h2 { margin: 0 0 .4rem; color: #fff; font-size: var(--fs-h4); }
.post__cta p { color: var(--c-on-dark-muted); }
.post__cta-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: var(--space-3); }
.post__cta .btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .45); }
.post__cta .btn--ghost:hover { border-color: #fff; }

.post__share { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.2rem; font-size: var(--fs-sm); color: var(--c-muted); }
.post__share a { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; color: var(--c-primary); text-decoration: none; }
.post__share a:hover { text-decoration: underline; }
