/*
Theme Name: Novagogie
Description: Thème WordPress du podcast Novagogie. Épisodes importés depuis un flux RSS, lecteur audio persistant, mode clair et sombre, pensé d'abord pour le mobile.
Version: 4.4.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: novagogie
*/

/* Polices : CashMarket Bold Rounded pour les titres (fichier dans assets/fonts), Arial pour le texte */
@font-face {
	font-family: "Cash Market";
	src: url("assets/fonts/cashmarket-bold-rounded.woff2") format("woff2"), url("assets/fonts/cashmarket-bold-rounded.ttf") format("truetype");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

/* ==========================================================================
   1. Palette : un seul bleu, #3A477C, avec du blanc et des gris neutres.
   Le blanc contraste à plus de 8:1 avec ce bleu. Le texte courant est gris
   très foncé ; titres et liens prennent le bleu ; les fonds clairs en sont
   une teinte très pâle. Le mode sombre est un gris neutre.
   ========================================================================== */
:root {
	--blue: #3a477c;

	--bg: #ffffff;
	--surface: #eff0f6;
	--ink: #23262d;
	--muted: #5b606b;
	--line: #dcdee7;
	--brand: #3a477c;
	--btn: #3a477c;
	--btn-ink: #ffffff;
	--hl: #e2e5f1;
	--on-dark-muted: #d6dbee;

	--head: "Cash Market", Arial, Helvetica, sans-serif;
	--sans: Arial, Helvetica, sans-serif;

	--header-h: 72px;
	--wrap: 1200px;
	color-scheme: light;
}

/* Mode sombre : automatique selon l'appareil, ou choisi avec le bouton de l'en-tête */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--bg: #15171c;
		--surface: #1e2128;
		--ink: #eceef2;
		--muted: #a6abb6;
		--line: #333742;
		--brand: #b9c3ee;
		--btn: #ffffff;
		--btn-ink: #3a477c;
		--hl: #2b3040;
		color-scheme: dark;
	}
}
:root[data-theme="dark"] {
	--bg: #15171c;
	--surface: #1e2128;
	--ink: #eceef2;
	--muted: #a6abb6;
	--line: #333742;
	--brand: #b9c3ee;
	--btn: #ffffff;
	--btn-ink: #3a477c;
	--hl: #2b3040;
	color-scheme: dark;
}

/* Zones bleues (identiques en clair et en sombre) : texte blanc, boutons blancs */
.site-header, .hero, .page-head, .ep-hero, .section--dark, .player, .side-block--blue {
	--bg: var(--blue);
	--ink: #ffffff;
	--muted: var(--on-dark-muted);
	--line: rgba(255, 255, 255, .28);
	--brand: #ffffff;
	--btn: #ffffff;
	--btn-ink: var(--blue);
	--hl: rgba(255, 255, 255, .16);
	background-color: var(--blue);
	color: #ffffff;
}

/* ==========================================================================
   2. Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + 1rem);
}
html.nav-locked { overflow: hidden; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font: 1.0625rem/1.6 var(--sans);
	-webkit-font-smoothing: antialiased;
}
body.has-player { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }

[hidden] { display: none !important; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
.entry a, .ref__ep a, .section__link { color: var(--brand); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }

h1, h2, h3, h4 {
	margin: 0;
	color: var(--brand);
	font-family: var(--head);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.01em;
}
p { margin: 0 0 1em; }

.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2rem, 780px); }

.icon { width: 1.35em; height: 1.35em; flex: none; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.skip-link:focus {
	position: fixed !important;
	top: .5rem; left: .5rem;
	width: auto; height: auto;
	clip: auto;
	z-index: 100;
	padding: .75rem 1rem;
	background: #fff;
	color: var(--blue);
}

/* Effet de surlignage au survol des titres cliquables */
.hl {
	text-decoration: none;
	background: linear-gradient(var(--hl), var(--hl)) 0 0 / 0% 100% no-repeat;
	transition: background-size .18s ease;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}
.hl:hover, .hl:focus-visible { background-size: 100% 100%; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}

/* ==========================================================================
   3. En-tête : fixe, menu complet sur ordinateur, burger sur mobile
   ========================================================================== */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	height: var(--header-h);
}
.site-header__inner {
	height: 100%;
	display: flex;
	align-items: center;
	gap: 1rem;
}

.brand {
	position: relative;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: .7rem;
	margin-right: auto;
	text-decoration: none;
	font-family: var(--head);
	font-weight: 700;
	font-size: 1.25rem;
	line-height: 1.1;
}
.brand__mark {
	display: grid;
	place-items: center;
	width: 40px; height: 40px;
	background: #fff;
	color: var(--blue);
	flex: none;
}
.brand__mark svg { width: 20px; height: 20px; fill: currentColor; }
.brand__logo { display: block; line-height: 0; }
.brand__logo img { display: block; height: 46px; width: auto; max-width: none; }
.brand--footer .brand__logo img { height: 64px; }
@media (max-width: 599px) {
	/* Sans version carrée, le logo rectangulaire est simplement borné en largeur */
	.brand__logo img { max-width: 150px; object-fit: contain; }
}

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(1rem, 2vw, 2rem); }
.site-nav a { display: inline-block; padding: .35rem .1rem; font-size: .95rem; font-weight: 600; text-decoration: none; }
.site-nav a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .35em; }
.site-nav .current-menu-item > a, .site-nav a[aria-current="page"] {
	text-decoration: underline;
	text-decoration-thickness: 3px;
	text-underline-offset: .35em;
}

.theme-toggle, .burger {
	position: relative;
	z-index: 2;
	display: inline-grid;
	place-items: center;
	width: 46px; height: 46px;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
}
.theme-toggle:hover, .burger:hover { background: rgba(255, 255, 255, .16); }
.theme-toggle .icon { width: 22px; height: 22px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
	:root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}

.burger { display: none; }
.burger__bars,
.burger__bars::before,
.burger__bars::after {
	content: "";
	display: block;
	width: 24px; height: 2px;
	background: currentColor;
	transition: transform .2s ease, background-color .2s ease;
}
.burger__bars { position: relative; }
.burger__bars::before { position: absolute; top: -7px; }
.burger__bars::after { position: absolute; top: 7px; }
.is-open .burger__bars { background: transparent; }
.is-open .burger__bars::before { transform: translateY(7px) rotate(45deg); }
.is-open .burger__bars::after { transform: translateY(-7px) rotate(-45deg); }

.nav-backdrop { display: none; }

@media (max-width: 899px) {
	.burger { display: inline-grid; }
	.nav-backdrop {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 0;
		background: rgba(8, 14, 26, .6);
		opacity: 0;
		visibility: hidden;
		transition: opacity .25s ease, visibility 0s .25s;
	}
	.is-open .nav-backdrop { opacity: 1; visibility: visible; transition: opacity .25s ease; }

	.site-nav {
		position: fixed;
		z-index: 1;
		top: 0; right: 0; bottom: 0;
		width: min(380px, 88vw);
		padding: calc(var(--header-h) + 1.5rem) 1.75rem 2rem;
		background: var(--blue);
		overflow-y: auto;
		box-shadow: -10px 0 30px rgba(0, 0, 0, .3);
		transform: translateX(100%);
		visibility: hidden;
		transition: transform .25s ease, visibility 0s .25s;
	}
	.is-open .site-nav { transform: none; visibility: visible; transition: transform .25s ease; }
	.site-nav ul { flex-direction: column; gap: .25rem; }
	.site-nav a { display: block; padding: .55rem 0; font-family: var(--head); font-size: 1.7rem; line-height: 1.2; }
}

/* ==========================================================================
   4. Bannières (accueil, pages, articles) et plateformes d'écoute
   Image facultative, sous un voile bleu réglable ; sans image, aplat bleu.
   ========================================================================== */
.hero, .page-head, .ep-hero {
	background-image:
		linear-gradient(rgba(58, 71, 124, var(--veil, .82)), rgba(58, 71, 124, var(--veil, .82))),
		var(--hero-img, linear-gradient(#3a477c, #3a477c));
	background-size: cover;
	background-position: center;
}
@media (max-width: 599px) {
	.hero {
		background-image:
			linear-gradient(rgba(58, 71, 124, var(--veil, .82)), rgba(58, 71, 124, var(--veil, .82))),
			var(--hero-img-m, var(--hero-img, linear-gradient(#3a477c, #3a477c)));
	}
}

.hero { padding: clamp(1.75rem, 5vw, 3.25rem) 0; }
.hero__grid { display: grid; gap: 1.25rem; }
.hero .ep__cover, .ep-hero .ep__cover { background: rgba(255, 255, 255, .14); box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); }
.hero .ep__cover { width: min(100%, 150px); }
.hero__kicker { margin: 0 0 .5rem; font-weight: 700; color: var(--muted); }
.hero__title { font-size: clamp(1.7rem, 4.6vw, 3rem); line-height: 1.08; letter-spacing: -0.02em; }
.hero__excerpt {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	max-width: 64ch;
	margin: .9rem 0 0;
	color: var(--muted);
	font-family: var(--sans);
	font-size: 1.1rem;
	line-height: 1.55;
}
.hero__tagline { max-width: 52ch; margin: 0 0 1rem; font-family: var(--sans); font-size: clamp(1.15rem, 2.6vw, 1.4rem); line-height: 1.5; color: var(--muted); }
.hero .ep__actions { margin-top: 1.25rem; }
.hero .play { min-height: 54px; padding-inline: 1.4rem 1.7rem; font-size: 1.05rem; }
.hero .kw { margin-top: 1rem; }
@media (min-width: 720px) {
	.hero__grid { grid-template-columns: 250px minmax(0, 1fr); gap: 2.5rem; align-items: center; }
	.hero .ep__cover { width: 100%; }
}

.chip {
	display: inline-flex;
	align-items: center;
	gap: .55rem;
	min-height: 46px;
	padding: 0 1.15rem;
	border: 2px solid var(--ink);
	background: transparent;
	color: inherit;
	font: 700 .95rem var(--sans);
	text-decoration: none;
	cursor: pointer;
}
.chip:hover, .chip[aria-pressed="true"], .chip[aria-current="true"] { background: var(--ink); color: var(--bg); }
.chip:disabled { opacity: .5; cursor: progress; }
.chip--small { min-height: 38px; padding: 0 .9rem; font-size: .85rem; }

/* ==========================================================================
   5. Mise en page : contenu + colonne latérale
   ========================================================================== */
.layout__main { min-width: 0; }
.layout { display: grid; gap: 1rem clamp(2rem, 4vw, 3.5rem); padding-block: clamp(2.5rem, 6vw, 4.5rem); }
@media (min-width: 1000px) {
	.layout { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
}
.block + .block { margin-top: clamp(3rem, 7vw, 5rem); }

.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section--alt { background: var(--surface); }
.section__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: .5rem 1.5rem;
	margin-bottom: clamp(1.5rem, 3.5vw, 2.5rem);
}
.section__title { font-size: clamp(1.8rem, 4.4vw, 2.8rem); }
.section__link { font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: .25em; }
.section__intro { max-width: 60ch; margin: -.75rem 0 2rem; color: var(--muted); }
.empty { padding: 1.25rem; border: 2px dashed var(--line); color: var(--muted); }

.meta { display: flex; flex-wrap: wrap; margin: 0 0 .4rem; font-size: .875rem; color: var(--muted); }
.meta > * + *::before {
	content: "";
	display: inline-block;
	width: 1px; height: .85em;
	margin: 0 .7em;
	background: currentColor;
	opacity: .5;
	vertical-align: -.1em;
}
.dur { font-weight: 700; color: var(--ink); }
.dur:empty { display: none; }

/* ==========================================================================
   6. Épisodes
   ========================================================================== */
.ep__cover {
	position: relative;
	aspect-ratio: 1;
	overflow: hidden;
	background: var(--blue);
}
.ep__cover img { width: 100%; height: 100%; object-fit: cover; }
.ep__ph { position: absolute; inset: 0; margin: auto; width: 40%; height: 40%; fill: #fff; }
.ep__title { font-size: 1.25rem; line-height: 1.25; }
.ep__excerpt { margin: .5rem 0 0; color: var(--muted); }
.ep__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; margin-top: 1rem; }
.ep__actions a { font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: .25em; }

.ep__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(0, 0, 0, .4); }
.ep__progress i { display: block; height: 100%; background: #fff; }
.ep__progress.is-done i { opacity: .7; }

/* Bouton de lecture */
.play {
	display: inline-flex;
	align-items: center;
	gap: .6rem;
	min-height: 48px;
	padding: .7rem 1.25rem .7rem 1rem;
	border: 0;
	background: var(--btn);
	color: var(--btn-ink);
	font: 700 1rem var(--sans);
	cursor: pointer;
}
.play:hover { filter: brightness(1.12); }
.play svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.i-pause { display: none; }
.play.is-playing .i-play, .player.is-playing .i-play { display: none; }
.play.is-playing .i-pause, .player.is-playing .i-pause { display: block; }
.play--icon {
	position: absolute;
	right: .5rem; bottom: .5rem;
	width: 44px; height: 44px; min-height: 0;
	padding: 0;
	justify-content: center;
	background: #fff;
	color: var(--blue);
	box-shadow: 0 2px 10px rgba(10, 10, 30, .35);
}
.play--icon .play__label, .play--icon .screen-reader-text {
	position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* Liste horizontale compacte : un épisode par ligne */
.ep-list { border-top: 1px solid var(--line); }
.ep--wide {
	display: grid;
	grid-template-columns: 88px minmax(0, 1fr);
	gap: .25rem 1rem;
	align-items: start;
	padding: .9rem 0;
	border-bottom: 1px solid var(--line);
}
.ep--wide .ep__cover { }
.ep--wide .play--icon { width: 34px; height: 34px; right: .3rem; bottom: .3rem; }
.ep--wide .play--icon svg { width: 16px; height: 16px; }
.ep--wide .ep__title { font-size: 1.1rem; line-height: 1.25; }
.ep--wide .ep__excerpt, .ep--wide .kw { display: none; }
.ep__top { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .75rem; margin-bottom: .3rem; }
.ep__top .tags, .ep__top .meta { margin: 0; }
@media (min-width: 700px) {
	.ep--wide { grid-template-columns: 112px minmax(0, 1fr); gap: .25rem 1.25rem; padding: 1.1rem 0; }
	.ep--wide .play--icon { width: 40px; height: 40px; }
	.ep--wide .play--icon svg { width: 18px; height: 18px; }
	.ep--wide .ep__title { font-size: 1.3rem; }
	.ep--wide .ep__excerpt {
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
		margin-top: .3rem;
		font-size: .95rem;
	}
	.ep--wide .kw { display: flex; margin-top: .55rem; }
}

/* Mots-clés */
.kw { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.kw a {
	display: inline-block;
	padding: .05rem .65rem;
	border: 1px solid var(--line);
	background: var(--surface);
	color: var(--muted);
	font: 600 .78rem/1.7 var(--sans);
	text-decoration: none;
}
.kw a:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.hero .kw a, .ep-hero .kw a, .page-head .kw a { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .35); color: #fff; }
.hero .kw a:hover, .ep-hero .kw a:hover, .page-head .kw a:hover { background: #fff; color: var(--blue); }
.page-head .kw, .ep-hero .kw { margin-top: 1rem; }

/* Étiquettes de format */
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .6rem; }
.tag {
	display: inline-block;
	padding: .1rem .65rem;
	border: 1.5px solid var(--brand);
	color: var(--brand);
	font: 700 .78rem/1.6 var(--sans);
}
.tag--role { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* ==========================================================================
   7. Colonne latérale : épisodes au hasard, Suivez-nous, widgets
   ========================================================================== */
.sidebar { display: grid; gap: 1.5rem; min-width: 0; }
.side-block { padding: 1.5rem; background: var(--surface); min-width: 0; }
.side-block__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: 1.25rem; }
.side-block__title { font-size: 1.35rem; line-height: 1.2; }
.side-block .wp-block-image img { }

/* « Écoutez le podcast où vous voulez » */
.side-block--blue {
	--ink: #fff;
	--muted: var(--on-dark-muted);
	--line: rgba(255, 255, 255, .3);
	background: var(--blue);
	color: #fff;
}
.side-platforms .side-block__title { margin-bottom: 1rem; }
.yt-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .6rem;
	width: 100%;
	min-height: 50px;
	margin-bottom: .9rem;
	background: #fff;
	color: var(--blue);
	font: 700 1rem var(--sans);
	text-decoration: none;
}
.yt-btn:hover { filter: brightness(.94); }
.plat-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.plat {
	display: flex;
	align-items: center;
	gap: .6rem;
	height: 100%;
	min-height: 46px;
	padding: .35rem .75rem;
	border: 1.5px solid rgba(255, 255, 255, .4);
	color: #fff;
	font: 600 .88rem/1.2 var(--sans);
	text-decoration: none;
}
.plat:hover { background: #fff; color: var(--blue); }
.plat .icon { width: 20px; height: 20px; }
.only-narrow { margin-bottom: 2.5rem; }
@media (min-width: 1000px) { .only-narrow { display: none; } }
@media (max-width: 999px) { .only-wide { display: none; } }

/* Défilement horizontal (téléphone, tablette) : au doigt, à la souris, avec flèches */
.carousel { position: relative; }
.tiles {
	display: flex;
	gap: 1rem;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	padding-bottom: .25rem;
}
.tiles::-webkit-scrollbar { display: none; }
.tiles.is-drag { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.tiles img { -webkit-user-drag: none; }
.ep--side { flex: 0 0 min(62vw, 230px); scroll-snap-align: start; }
.ep--side .ep__body { padding-top: .75rem; }
.ep--side .ep__title { font-size: 1.05rem; }

.carousel__nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; }
.carousel__btn {
	display: inline-grid;
	place-items: center;
	width: 44px; height: 44px;
	border: 2px solid var(--ink);
	background: transparent;
	color: var(--ink);
	cursor: pointer;
}
.carousel__btn:hover:not(:disabled) { background: var(--ink); color: var(--surface); }
.carousel__btn:disabled { opacity: .35; cursor: default; }
.carousel__dots { display: flex; gap: .45rem; }
.carousel__dots span { width: 9px; height: 9px; background: var(--line); }
.carousel__dots span.is-on { background: var(--ink); }

/* Sur grand écran, la colonne latérale affiche les épisodes en liste verticale */
@media (min-width: 1000px) {
	.tiles { flex-direction: column; overflow: visible; gap: 1.25rem; scroll-snap-type: none; }
	.ep--side { flex: none; display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 1rem; align-items: start; }
	.ep--side .ep__body { padding-top: 0; }
	.ep--side .play--icon { width: 34px; height: 34px; right: .3rem; bottom: .3rem; }
	.ep--side .play--icon svg { width: 16px; height: 16px; }
	.carousel__nav { display: none; }
}

/* Suivez-nous : logos seuls (pied de page) */
.follow__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.icon-link {
	display: inline-grid;
	place-items: center;
	width: 44px; height: 44px;
	border: 2px solid rgba(255, 255, 255, .5);
	color: #fff;
	text-decoration: none;
}
.icon-link:hover { background: #fff; color: rgb(var(--footer-rgb, 38, 42, 48)); }
.icon-link .icon { width: 20px; height: 20px; }

/* ==========================================================================
   8. Articles « Pour aller plus loin » et références
   ========================================================================== */
.pcards { display: grid; gap: 2.5rem 1.75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.pcard__thumb { display: block; aspect-ratio: 3 / 2; margin-bottom: 1rem; overflow: hidden; background: var(--surface); }
.pcard__thumb img { width: 100%; height: 100%; object-fit: cover; }
.pcard__title { margin-bottom: .6rem; font-size: 1.4rem; line-height: 1.2; }
.pcard__excerpt { margin: 0; color: var(--muted); }

.refs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.ref { display: grid; gap: .6rem 2rem; padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
@media (min-width: 760px) {
	.ref { grid-template-columns: 9rem minmax(0, 1fr) auto; align-items: start; }
}
.ref__type {
	display: inline-flex;
	align-items: center;
	gap: .45rem;
	justify-self: start;
	padding: .3rem .65rem;
	background: var(--ink);
	color: var(--bg);
	font: 700 .8rem/1.2 var(--sans);
}
.ref__type .icon, .ref-tag .icon { width: 15px; height: 15px; }
.ref-tag { display: inline-flex; align-items: center; gap: .45rem; }
.ref__acts { display: flex; flex-wrap: wrap; gap: .5rem; }
.ref__ep { margin-top: .45rem; }
.ref__title { font-size: 1.35rem; line-height: 1.25; }
.ref__meta { margin: .35rem 0 0; color: var(--muted); }
.ref__note { margin: .5rem 0 0; font-size: .95rem; color: var(--muted); }
.ref__ep { margin: 0; font-size: .9rem; color: var(--muted); }
.ref__ep a { color: var(--ink); }

/* ==========================================================================
   9. Pages, articles, fiches d'épisodes
   ========================================================================== */
.page-head { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem); }
.page-head h1 { max-width: 22ch; font-size: clamp(2.1rem, 5.6vw, 3.6rem); }
.page-head .tags, .page-head .meta { margin-bottom: .9rem; }
.page-head .meta { margin-top: 1rem; margin-bottom: 0; }
.page-head .ep__actions { margin-top: 1.5rem; }

.ep-hero { padding: clamp(2rem, 5vw, 3.5rem) 0; }
.ep-hero__grid { display: grid; gap: 1.5rem; }
.ep-hero .ep__cover { width: min(100%, 240px); }
.ep-hero h1 { margin-bottom: 1.25rem; font-size: clamp(1.9rem, 5vw, 3.2rem); line-height: 1.1; }
.ep-hero .ep__actions { margin-top: 0; }
@media (min-width: 760px) {
	.ep-hero__grid { grid-template-columns: 300px 1fr; gap: 3rem; align-items: center; }
	.ep-hero .ep__cover { width: 100%; }
}

.entry { font-family: var(--sans); font-size: 1.15rem; line-height: 1.75; }
.entry > *:first-child { margin-top: 0; }
.entry h2 { margin: 2.2em 0 .6em; font-size: clamp(1.6rem, 3.4vw, 2rem); }
.entry h3 { margin: 1.8em 0 .5em; font-size: 1.4rem; }
.entry ul, .entry ol { padding-left: 1.4rem; }
.entry li { margin-bottom: .35em; }
.entry a { color: var(--brand); text-decoration-thickness: 2px; text-underline-offset: .2em; }
.entry figure { margin: 2rem 0; }
.entry figcaption, .wp-caption-text { margin-top: .5rem; color: var(--muted); font: .9rem/1.4 var(--sans); text-align: center; }
.entry img { }
.entry blockquote { margin: 1.75em 0; padding: .25rem 0 .25rem 1.25rem; border-left: 4px solid var(--brand); font-style: italic; }
.entry blockquote p:last-child { margin-bottom: 0; }

.toc { margin: 0 0 2.5rem; padding: 1.25rem 1.5rem; background: var(--surface); font: 1rem/1.5 var(--sans); }
.toc__title { margin: 0 0 .4rem; font-weight: 700; }
.toc ol { margin: 0; padding-left: 1.25rem; }
.toc li { margin-bottom: .3rem; }
.toc__l3 { margin-left: 1rem; list-style-type: circle; }

.related { margin: 0 0 2.5rem; }
.related__title { margin-bottom: 1rem; font-size: 1.5rem; }
.pair { margin: 0 0 2rem; padding: 1.1rem 1.25rem; border-left: 4px solid var(--brand); background: var(--surface); }
.pair__label { margin: 0 0 .25rem; color: var(--muted); font-size: .9rem; }
.pair a { font-family: var(--head); font-size: 1.3rem; font-weight: 700; }
.transcript { margin: 2rem 0 3rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.transcript summary { cursor: pointer; font-weight: 700; }
.source-btn { display: inline-flex; margin: 0 0 2rem; padding: .8rem 1.3rem; background: var(--btn); color: var(--btn-ink); font: 700 1rem var(--sans); text-decoration: none; }

.formats { display: grid; gap: 1.25rem 2rem; margin: 2rem 0 0; }
.formats > div { padding-left: 1rem; border-left: 4px solid var(--ink); }
.formats dt { margin-bottom: .3rem; font-family: var(--head); font-size: 1.2rem; font-weight: 700; }
.formats dd { margin: 0; color: var(--muted); font-size: .95rem; }
@media (min-width: 900px) { .formats { grid-template-columns: repeat(3, 1fr); } }
.filters { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 2rem; }
.filter { display: block; width: 100%; max-width: 420px; margin-top: 1.25rem; padding: .85rem 1.1rem; border: 2px solid var(--ink); background: transparent; color: inherit; font: inherit; }
.filter::placeholder { color: var(--muted); }

.post-nav { padding: 1rem 0 0; }
.post-nav .nav-links { display: flex; justify-content: space-between; gap: 1rem; }
.post-nav a { font-family: var(--head); font-weight: 700; }
.pagination { padding: 2rem 0 4rem; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.page-numbers { min-width: 44px; padding: .55rem .9rem; border: 2px solid var(--line); text-align: center; text-decoration: none; font-weight: 700; }
.page-numbers.current { background: var(--ink); border-color: var(--ink); color: var(--bg); }

main { transition: opacity .15s ease; }
main:focus { outline: none; }
main.is-loading { opacity: .5; }

/* Champ de recherche (colonne latérale, menu mobile) */
.search-form { display: flex; gap: .5rem; }
.search-form input[type="search"] {
	flex: 1;
	min-width: 0;
	padding: .8rem 1rem;
	border: 2px solid var(--ink);
	background: transparent;
	color: inherit;
	font: inherit;
}
.search-form input::placeholder { color: var(--muted); }
.side-about .side-block__title { margin-bottom: .75rem; }
.side-about__text { font-size: .98rem; line-height: 1.6; }
.side-about__text > *:last-child { margin-bottom: 0; }
.side-search .side-block__title { margin-bottom: 1rem; }
.side-search .search-form { flex-direction: column; }
.side-search .btn { justify-content: center; }
.nav-search { display: none; }
@media (max-width: 899px) {
	.nav-search { display: block; margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
	.nav-search .search-form { flex-direction: column; }
	.nav-search .btn { justify-content: center; }
}

/* Fiche d'une référence */
.dl { display: grid; gap: .9rem 2rem; margin: 0 0 1.75rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.dl dt { color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.dl dd { margin: .15rem 0 0; font-weight: 700; }
.apa { margin: 2rem 0; padding: 1.1rem 1.25rem; border-left: 4px solid var(--brand); background: var(--surface); }
.apa h2 { margin-bottom: .5rem; font-size: 1.15rem; }
.apa p { margin: 0 0 .9rem; padding-left: 1.5rem; text-indent: -1.5rem; overflow-wrap: anywhere; }
.apa__state { margin-left: .75rem; color: var(--brand); font-size: .88rem; font-weight: 700; }
.filters--refs { margin: 0 0 1.5rem; }

/* Équipe (page Qui sommes-nous) */
.team__title { margin: 2.5rem 0 0; font-size: 1.6rem; }
.team { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); margin-top: 1.5rem; }
.mem { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); }
.mem__photo { aspect-ratio: 1; overflow: hidden; background: var(--blue); }
.mem__photo img { width: 100%; height: 100%; object-fit: cover; }
.mem__photo--ph { display: grid; place-items: center; color: #fff; font: 700 2.6rem var(--head); }
.mem__body { display: flex; flex: 1; flex-direction: column; gap: .35rem; padding: 1rem 1.1rem 1.2rem; }
.mem__body h3 { font-size: 1.2rem; }
.mem__role { color: var(--muted); font-size: .85rem; font-weight: 700; }
.mem__bio { color: var(--muted); font-size: .92rem; }
.mem__bio p { margin: .2rem 0 0; }
.mem__links { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto; padding-top: .8rem; }
.ln { display: inline-flex; align-items: center; gap: .4rem; min-height: 38px; padding: 0 .8rem; border: 2px solid var(--brand); color: var(--brand); font-size: .85rem; font-weight: 700; text-decoration: none; }
.ln:hover { background: var(--brand); color: var(--bg); }
.ln .icon { width: 16px; height: 16px; }

/* ==========================================================================
   10. Pied de page : gris foncé. Deux colonnes (financeurs | newsletter et
   réseaux), puis une barre (copyright et identifiant | liens légaux).
   ========================================================================== */
.site-footer {
	--footer-rgb: 38, 42, 48;
	--bg: rgb(var(--footer-rgb));
	--ink: #ffffff;
	--muted: var(--on-dark-muted);
	--line: rgba(255, 255, 255, .22);
	--brand: #ffffff;
	--btn: #ffffff;
	--btn-ink: rgb(var(--footer-rgb));
	--hl: rgba(255, 255, 255, .16);
	padding: clamp(2.5rem, 6vw, 4rem) 0 0;
	background-color: rgb(var(--footer-rgb));
	background-image: linear-gradient(rgba(var(--footer-rgb), .92), rgba(var(--footer-rgb), .92)), var(--footer-img, none);
	background-size: cover;
	background-position: center;
	color: #fff;
	font-size: .95rem;
}

.footer-main { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 900px) { .footer-main { grid-template-columns: 1fr 1fr; gap: 4rem; } }

/* Colonne 1 : financeurs et partenaires */
.footer-funders p { max-width: 62ch; margin: 0 0 .9rem; color: var(--muted); }
.footer-funders a { color: #fff; font-weight: 600; }
.funders { list-style: none; margin: 1.5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.funders li { display: flex; }
.funders a { display: flex; align-items: center; }
.funders--white a, .funders--white li > img { padding: .6rem .9rem; background: #fff; }
.funders img { display: block; width: auto; height: 44px; max-width: 150px; object-fit: contain; }

/* Colonne 2 : newsletter, puis logos des réseaux */
.newsletter__grid { display: grid; gap: 1rem; }
.newsletter h2 { margin-bottom: .4rem; font-size: clamp(1.4rem, 3vw, 1.9rem); }
.newsletter__grid p { margin: 0; color: var(--muted); }
.nl-row { display: flex; gap: .5rem; }
.nl-row input[type="email"] {
	flex: 1;
	min-width: 0;
	padding: .8rem 1rem;
	border: 2px solid #fff;
	background: rgba(255, 255, 255, .1);
	color: #fff;
	font: inherit;
}
.nl-row input::placeholder { color: var(--on-dark-muted); }
.nl-consent { display: flex; align-items: flex-start; gap: .6rem; margin-top: .8rem; color: var(--muted); font-size: .85rem; }
.nl-consent input { flex: none; width: 18px; height: 18px; margin-top: .15rem; accent-color: #fff; }
.nl-consent a { color: #fff; }
.nl-msg { margin: .75rem 0 0 !important; color: #fff !important; font-weight: 700; }
.nl-msg:empty { display: none; }
.nl-msg.is-error { color: #ffd0d0 !important; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.footer-join .follow { margin-top: 1.5rem; }

.btn { justify-content: center; }
.nav-search { display: none; }
@media (max-width: 899px) {
	.nav-search { display: block; margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
	.nav-search .search-form { flex-direction: column; }
	.nav-search .btn { justify-content: center; }
}

.btn {
	display: inline-flex;
	align-items: center;
	min-height: 46px;
	padding: 0 1.25rem;
	border: 0;
	background: var(--btn);
	color: var(--btn-ink);
	font: 700 1rem var(--sans);
	cursor: pointer;
}
a.btn { text-decoration: none; }
.btn--line { border: 2px solid var(--brand); background: transparent; color: var(--brand); }
.btn:hover { filter: brightness(.94); }
.btn:disabled { opacity: .6; cursor: progress; }

/* Barre du bas */
.footer-bottom { margin-top: clamp(2rem, 5vw, 3rem); border-top: 1px solid var(--line); }
.footer-bar { display: flex; flex-direction: column; align-items: flex-start; gap: .75rem; padding-block: 1.25rem 1.75rem; color: var(--muted); font-size: .85rem; }
@media (min-width: 700px) { .footer-bar { flex-direction: row; align-items: center; justify-content: space-between; } }
.footer-bar p { margin: 0; }
.footer-handle { margin-left: .6rem; padding-left: .8rem; border-left: 1px solid var(--line); color: #fff; font-weight: 700; }
.footer-legal-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; }
.footer-legal-nav a { color: #fff; font-weight: 600; text-underline-offset: .25em; }

/* ==========================================================================
   11. Lecteur audio persistant (barre fixe en bas d'écran)
   ========================================================================== */
.player {
	position: fixed;
	left: 0; right: 0; bottom: 0;
	z-index: 60;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: .75rem;
	padding: .9rem 1rem calc(.7rem + env(safe-area-inset-bottom));
	box-shadow: 0 -8px 28px rgba(8, 14, 26, .35);
}
.player__cover { width: 48px; height: 48px; object-fit: cover; background: rgba(255, 255, 255, .1); }
.player__title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: .9rem;
	font-weight: 700;
	line-height: 1.25;
}
.player__time { color: var(--on-dark-muted); font-size: .78rem; font-variant-numeric: tabular-nums; }
.player__controls { display: flex; align-items: center; gap: .15rem; }
.pbtn {
	display: inline-grid;
	place-items: center;
	min-width: 42px; height: 42px;
	padding: 0 .3rem;
	border: 0;
	background: transparent;
	color: inherit;
	font: 700 .8rem var(--sans);
	cursor: pointer;
}
.pbtn:hover { background: rgba(255, 255, 255, .16); }
.pbtn svg { width: 22px; height: 22px; fill: currentColor; }
.pbtn--main { width: 50px; height: 50px; background: #fff; color: var(--blue); }
.pbtn--main:hover { background: #fff; filter: brightness(.94); }

.player__seek {
	position: absolute;
	left: 0; top: -10px;
	width: 100%; height: 20px;
	margin: 0;
	background: transparent;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
	--p: 0%;
}
.player__seek::-webkit-slider-runnable-track { height: 4px; background: linear-gradient(to right, #fff var(--p), rgba(255, 255, 255, .3) var(--p)); }
.player__seek::-moz-range-track { height: 4px; background: rgba(255, 255, 255, .3); }
.player__seek::-moz-range-progress { height: 4px; background: #fff; }
.player__seek::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border: 0; background: #fff; }
.player__seek::-moz-range-thumb { width: 14px; height: 14px; border: 0; background: #fff; }

@media (max-width: 599px) {
	.player__speed, .player__close { display: none; }
}
@media (min-width: 900px) {
	.player { padding-inline: max(1rem, calc((100vw - var(--wrap)) / 2)); }
}
