/*
 * Médiablue — pages du blog (liste, article, épisode).
 * Style éditorial (validé le 14 novembre 2026) : la mise en page de base, puis, en fin de fichier, la couche
 * « magazine » qui la complète : des filets plutôt que des cartes, la typographie au premier plan,
 * le serif italique pour les chapôs et les citations. Aucun coin arrondi ; les boutons restent en pilule.
 */

:root { --r: 0px; --rule: var(--ink); }

/* Aperçu depuis l'administration */
.apercu-bandeau a { color: inherit; margin-left: 10px; }
.apercu-bandeau { position: sticky; top: var(--nav-h); z-index: 2; padding: 10px max(16px, 4.5vw); background: var(--honey); color: #1b1218; font-weight: 600; text-align: center; }

/* Thèmes */
.blog-head .label a { color: inherit; text-decoration: none; }
.blog-head .label a:hover { text-decoration: underline; }
.blog-themes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.blog-themes a { padding: 7px 15px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper-2); font-size: .93rem; font-weight: 500; text-decoration: none; color: var(--ink); }
.blog-themes a:hover { border-color: var(--honey); }
.blog-themes a[aria-current="page"] { background: var(--plum); border-color: var(--plum); color: var(--on-plum); }
.blog-podcast-link { margin-top: 16px; }
.blog-podcast-link a { color: var(--accent-ink); font-weight: 600; }

/* Cartes */
.blog-latest { padding-bottom: clamp(48px, 7vw, 88px); }
.post-card { display: grid; align-content: start; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; text-decoration: none; color: inherit; min-width: 0; transition: transform .2s ease, box-shadow .2s ease; }
.post-card:hover { transform: translateY(-3px); box-shadow: 0 22px 50px -28px rgba(40, 20, 35, .45); }
.post-card.is-big { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.post-cover { position: relative; display: block; min-height: 280px; background: var(--plum); overflow: hidden; }
.post-cover.has-image { background: var(--linen); min-height: 0; aspect-ratio: 1; }
.post-cover.has-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.post-cover canvas { position: absolute; inset: -10% -20% -10% 10%; width: 110%; height: 120%; opacity: .35; }
.post-body { display: grid; gap: 10px; align-content: start; padding: 26px 28px 30px; }
.is-big .post-body { align-content: center; padding: clamp(28px, 4vw, 52px); gap: 14px; }
.post-theme { font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); }
.post-meta { font-size: .9rem; color: var(--muted); }
.post-body .post-meta { margin-top: 4px; }
.post-title { font-family: var(--display); font-weight: 650; font-size: 1.3rem; line-height: 1.15; letter-spacing: -.015em; text-wrap: balance; }
.is-big .post-title { font-size: clamp(1.7rem, 3.2vw, 2.5rem); line-height: 1.05; letter-spacing: -.025em; }
.post-summary { color: var(--muted); }
.blog-others { background: var(--linen); }
.blog-others .post-card { background: var(--paper); }
.blog-others-title { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2.6vw, 32px); margin-top: 36px; }

/* Toutes les pages du blog : contenu et colonne latérale (dernier billet d'humeur, dernier épisode) */
.blog-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(28px, 4vw, 56px); align-items: start; padding-bottom: clamp(72px, 10vw, 128px); }
.blog-main { display: grid; gap: clamp(40px, 6vw, 64px); align-content: start; min-width: 0; }
.post-grid.is-two { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-top: 24px; }
.blog-aside { display: grid; gap: 20px; }
.side-box { display: grid; gap: 12px; padding: 18px; background: var(--linen); border-radius: var(--r); min-width: 0; }
.side-label { font-family: var(--body); font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--linen-ink); max-width: none; line-height: 1.3; }
.side-box .player { margin-top: 0; border-radius: var(--r); box-shadow: none; }
.player.is-compact .play-big { width: 54px; }
.player.is-compact .play-big::after { border-left-width: 16px; border-top-width: 10px; border-bottom-width: 10px; margin-left: 4px; }
.side-title { font-family: var(--display); font-weight: 650; font-size: 1.05rem; line-height: 1.25; text-decoration: none; text-wrap: balance; }
.side-title:hover { color: var(--accent-ink); }
.side-meta { font-size: .86rem; color: var(--linen-ink); }
.side-meta a { color: var(--accent-ink); font-weight: 600; text-decoration: none; }
.side-meta a:hover { text-decoration: underline; }

/* Article */
.post-head .label a { color: inherit; text-decoration: none; }
.post-head .label a:hover { text-decoration: underline; }
.post-head h1 { max-width: 22ch; }
.post-head .post-meta { margin-top: 22px; font-size: .98rem; }
.post-head .lede { max-width: 56ch; }
.post-text { font-size: 1.12rem; line-height: 1.7; }
.post-text h2:first-child, .post-text h3:first-child { margin-top: 0; }
.post-text blockquote { margin: 1.6em 0; padding: 4px 0 4px 24px; border-left: 3px solid var(--honey); font-family: var(--serif); font-style: italic; font-size: clamp(1.35rem, 2.4vw, 1.7rem); line-height: 1.3; }
.post-text blockquote p { margin: 0; }
.post-text figure { margin: 1.8em 0; }
.post-text figure img { display: block; width: 100%; height: auto; border-radius: var(--r); }
.post-text figcaption { margin-top: 10px; font-size: .92rem; color: var(--muted); }
.post-signature { display: grid; gap: 2px; margin-top: 2.4em !important; padding-top: 22px; border-top: 1px solid var(--line); font-family: var(--display); font-weight: 650; }
.post-signature span { font-family: var(--body); font-weight: 400; font-size: .95rem; color: var(--muted); }

/* Vidéo ou épisode en tête d'article, avec le sommaire de la série */
.post-media { margin-bottom: clamp(32px, 4vw, 48px); }
.post-media .player { margin-top: 0; border-radius: var(--r); }
.media-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.series { display: grid; gap: 10px; padding: 18px 20px; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; }
.series-title { font-size: 1rem; font-weight: 650; max-width: none; letter-spacing: 0; }
.series-list { list-style: none; margin: 0; padding: 0; max-height: 340px; overflow-y: auto; border-top: 1px solid var(--line); }
.series-list a { display: grid; gap: 2px; padding: 10px 2px; border-bottom: 1px solid var(--line); text-decoration: none; }
.series-list a:hover .series-item { color: var(--accent-ink); }
.series-list a[aria-current="page"] .series-item { color: var(--accent-ink); }
.series-list a[aria-current="page"] .series-item::before { content: "▸ "; }
.series-item { font-weight: 600; font-size: .93rem; line-height: 1.3; }
.series-meta { font-size: .8rem; color: var(--muted); }
.series-more { font-size: .9rem; }
.series-more a { color: var(--accent-ink); font-weight: 600; }

/* Lecteur audio (js/lecteur-audio.js) : sans JavaScript, le lecteur du navigateur reste affiché */
.audio-player { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 16px; align-items: center; padding: 16px 18px; background: var(--plum); color: var(--on-plum); border-radius: var(--r); --focus: var(--honey); }
.ap-cover { width: 72px; height: 72px; object-fit: cover; border-radius: var(--r); }
.ap-head { display: grid; gap: 2px; min-width: 0; }
.ap-show { font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--honey); }
.ap-title { font-family: var(--display); font-weight: 650; font-size: 1.05rem; line-height: 1.2; }
.ap-title a { color: inherit; text-decoration: none; }
.ap-title a:hover { text-decoration: underline; text-decoration-color: var(--honey); }
.ap-native, .ap-controls, .ap-links { grid-column: 1 / -1; }
.ap-native { width: 100%; }
.ap-controls { display: flex; align-items: center; gap: 10px; }
.ap-controls[hidden] { display: none; }
.ap-play { flex: none; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: var(--honey); color: #1b1218; cursor: pointer; transition: transform .15s ease; }
.ap-play:hover { transform: scale(1.06); }
.ap-play svg { width: 18px; height: 18px; fill: currentColor; }
.ap-play .ap-icon-pause, .ap-play.is-playing .ap-icon-play { display: none; }
.ap-play.is-playing .ap-icon-pause { display: block; }
.ap-skip, .ap-speed { flex: none; min-width: 38px; height: 28px; padding: 0 7px; border: 1px solid rgba(255, 255, 255, .28); border-radius: 999px; background: transparent; color: var(--on-plum); font: inherit; font-size: .75rem; font-weight: 600; cursor: pointer; }
.ap-skip:hover, .ap-speed:hover { border-color: var(--honey); color: var(--honey); }
.ap-track { flex: 1; display: grid; gap: 2px; min-width: 0; }
.ap-seek { --p: 0%; width: 100%; height: 16px; margin: 0; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; }
.ap-seek::-webkit-slider-runnable-track { height: 4px; border-radius: 999px; background: linear-gradient(to right, var(--honey) var(--p), rgba(255, 255, 255, .22) var(--p)); }
.ap-seek::-moz-range-track { height: 4px; border-radius: 999px; background: rgba(255, 255, 255, .22); }
.ap-seek::-moz-range-progress { height: 4px; border-radius: 999px; background: var(--honey); }
.ap-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; margin-top: -4.5px; border-radius: 50%; background: #fff; border: 0; }
.ap-seek::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 0; }
.ap-times { display: flex; justify-content: space-between; font-size: .72rem; color: var(--on-plum-muted); font-variant-numeric: tabular-nums; }
.ap-links { font-size: .82rem; color: var(--on-plum-muted); }
.ap-links a { color: var(--on-plum); text-decoration-color: var(--honey); text-underline-offset: 3px; }
.audio-player.is-compact { padding: 14px; gap: 10px 12px; }
.audio-player.is-compact .ap-cover { width: 52px; height: 52px; }
.audio-player.is-compact .ap-title { font-size: .95rem; }

/* Réagir, commentaires, article précédent / suivant (dans la colonne principale) */
.post-react { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; padding: clamp(22px, 3vw, 32px); background: var(--linen); border-radius: var(--r); }
.post-react-title { font-size: clamp(1.4rem, 2.4vw, 1.8rem); max-width: none; }
.post-comments { max-width: 760px; }
.post-comments-title { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.post-comments-note { margin: 10px 0 28px; color: var(--muted); }
.post-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding-top: 32px; border-top: 1px solid var(--line); }
.post-nav-link { display: grid; gap: 4px; text-decoration: none; font-family: var(--display); font-weight: 650; font-size: 1.15rem; line-height: 1.2; }
.post-nav-link span { font-family: var(--body); font-weight: 600; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.post-nav-link:hover { color: var(--accent-ink); }
.post-nav-link.is-next { grid-column: 2; text-align: right; }

/* Mise en page élargie : en-tête, contenu et pied de page alignés sur 1440 px */
.is-wide .wrap { max-width: 1440px; }

@media (max-width: 1240px) {
  .blog-main .post-card.is-big { grid-template-columns: minmax(0, 1fr); }
  .blog-main .post-card.is-big .post-cover { min-height: 200px; }
}
@media (max-width: 1000px) {
  .blog-layout { grid-template-columns: minmax(0, 1fr); }
  .blog-aside { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}
@media (max-width: 900px) {
  .post-card.is-big { grid-template-columns: minmax(0, 1fr); }
  .post-cover { min-height: 160px; }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .post-grid, .post-grid.is-two { grid-template-columns: minmax(0, 1fr); }
  .post-nav { grid-template-columns: minmax(0, 1fr); }
  .post-nav-link.is-next { grid-column: auto; text-align: left; }
  .post-media .player-meta { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .post-card, .ap-play { transition: none; }
  .post-card:hover { transform: none; }
}

/* ════ Couche éditoriale ════ */

/* ── En-tête du blog : un titre de une, encadré de filets ─────────── */
.blog-head { padding-bottom: 0; }
.blog-head .wrap { border-bottom: 3px solid var(--rule); padding-bottom: 0; }
.blog-head .label { margin-bottom: 14px; }
.blog-head h1 { font-size: clamp(3rem, 8vw, 6.6rem); line-height: .92; letter-spacing: -.045em; max-width: 14ch; }
.blog-head .lede { font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 2.2vw, 1.7rem); line-height: 1.3; color: var(--ink); max-width: 40ch; }
.blog-themes { gap: 0; margin-top: 40px; border-top: 1px solid var(--rule); }
.blog-themes a { padding: 14px 18px 13px 0; margin-right: 18px; border: 0; border-radius: 0; background: none; font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.blog-themes a:hover { color: var(--ink); }
.blog-themes a[aria-current="page"] { background: none; color: var(--ink); box-shadow: inset 0 -3px 0 var(--honey); }

/* ── Mise en page : colonne de lecture et colonne latérale séparées par un filet ── */
.blog-layout { padding-top: clamp(32px, 4vw, 48px); grid-template-columns: minmax(0, 1fr) 340px; column-gap: 0; }
.blog-main { padding-right: clamp(28px, 4vw, 56px); border-right: 1px solid var(--line); }
.blog-aside { padding-left: clamp(24px, 3vw, 40px); gap: 36px; }

/* ── Cartes → articles de journal : pas de boîte, un filet au-dessus ── */
.post-card { background: none; border: 0; border-top: 1px solid var(--rule); border-radius: 0; overflow: visible; }
.post-card:hover { transform: none; box-shadow: none; }
.post-card:hover .post-title { text-decoration: underline; text-decoration-color: var(--honey); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.post-body { padding: 16px 0 8px; gap: 8px; }
.post-theme { color: var(--accent-ink); }
.post-title { font-size: 1.45rem; line-height: 1.1; letter-spacing: -.02em; }
.post-summary { font-family: var(--serif); font-style: italic; font-size: 1.12rem; line-height: 1.35; color: var(--ink); opacity: .85; }
.post-meta { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }

/* La une : grande image, titre très grand, sans cadre */
.post-card.is-big { grid-template-columns: minmax(0, 1fr); border-top: 0; }
.post-card.is-big .post-cover { min-height: 0; aspect-ratio: 21 / 9; }
.is-big .post-body { padding: 22px 0 0; gap: 12px; }
.is-big .post-title { font-size: clamp(2.2rem, 4.6vw, 3.9rem); line-height: .98; letter-spacing: -.035em; max-width: 18ch; }
.is-big .post-summary { font-size: clamp(1.25rem, 2vw, 1.55rem); max-width: 46ch; }

/* Articles précédents : colonnes séparées par des filets verticaux */
.blog-others-title { font-size: .8rem; font-family: var(--body); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; padding-bottom: 12px; border-bottom: 3px solid var(--rule); max-width: none; }
.post-grid.is-two { gap: 0; margin-top: 0; margin-left: -21px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.post-grid.is-two .post-card { border-top: 0; border-bottom: 1px solid var(--line); padding: 0 20px 18px; border-left: 1px solid var(--line); margin-left: -1px; }
.post-grid.is-two .post-cover.has-image { aspect-ratio: 16 / 10; margin-top: 18px; }

/* ── Colonne latérale : des rubriques, pas des encadrés ─────────── */
.side-box { padding: 0; background: none; border-top: 3px solid var(--rule); padding-top: 12px; gap: 14px; }
.side-label { color: var(--ink); }
.side-meta { color: var(--muted); }

/* ── Article ───────────────────────────────────────────── */
.post-head .wrap { border-bottom: 3px solid var(--rule); padding-bottom: clamp(28px, 4vw, 44px); }
.post-head h1 { font-size: clamp(2.6rem, 6vw, 5rem); line-height: .95; letter-spacing: -.04em; max-width: 18ch; }
.post-head .lede { font-family: var(--serif); font-style: italic; font-size: clamp(1.35rem, 2.4vw, 1.85rem); line-height: 1.3; color: var(--ink); max-width: 44ch; }
.post-head .post-meta { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }
/* Vignette de l'article (image sans texte) : tout l'espace à droite du titre, du haut du titre au bas du chapô */
.post-head .wrap.has-vignette { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: clamp(32px, 4vw, 64px); }
.has-vignette .post-head-text { display: contents; }
.has-vignette .post-head-text > * { grid-column: 1; }
.post-head-vignette { grid-column: 2; grid-row: 2 / span 3; margin: 0 calc(-1 * max(16px, 4.5vw)) 0 0; min-height: 320px; overflow: hidden; background: var(--plum); }   /* jusqu'au bout du filet */
.post-head-vignette img { display: block; width: 100%; height: 100%; object-fit: cover; }
.post-text { max-width: 700px; font-size: 1.15rem; line-height: 1.75; }
.post-text > p:first-of-type::first-letter { float: left; font-family: var(--display); font-weight: 700; font-size: 4.6em; line-height: .82; margin: .06em .1em 0 0; color: var(--accent-ink); }
.post-text h2 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); padding-top: 14px; border-top: 1px solid var(--rule); }
.post-text blockquote { border: 0; border-top: 3px solid var(--honey); border-bottom: 1px solid var(--line); padding: 20px 0; margin: 2em 0; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.2; text-align: center; }
.post-signature { border-top: 3px solid var(--rule); }
.series { border: 0; border-top: 3px solid var(--rule); padding: 12px 0 0; background: none; }
.post-react { background: none; padding: 22px 0; border-top: 3px solid var(--rule); border-bottom: 1px solid var(--line); }

@media (max-width: 1000px) {
  .blog-layout { grid-template-columns: minmax(0, 1fr); }
  .blog-main { padding-right: 0; border-right: 0; }
  .post-head .wrap.has-vignette { grid-template-columns: minmax(0, 1fr); }
  .post-head-vignette { grid-column: 1; grid-row: auto; min-height: 0; aspect-ratio: 16 / 10; margin: 28px 0 0; }
  .blog-aside { padding-left: 0; padding-top: 24px; }
}
@media (max-width: 560px) {
  .post-grid.is-two { margin-left: 0; }
  .post-grid.is-two .post-card { padding: 0 0 18px; border-left: 0; margin-left: 0; }
  .post-card.is-big .post-cover { aspect-ratio: 16 / 10; }
}
