/* SUNSET BLD – Lecteur podcast v1.4.1
 * Reprend les couleurs du thème Impreza (variables --color-content-*), avec des valeurs de secours.
 */
.sbld-podcast {
	--sbp-primary: var(--color-content-primary, #e8562a);
	--sbp-bg: var(--color-content-bg-alt, #f5f3f0);
	--sbp-border: var(--color-content-border, #e2ddd6);
	--sbp-heading: var(--color-content-heading, #1f1f1f);
	--sbp-text: var(--color-content-text, #333);
	--sbp-faded: var(--color-content-faded, #777);
	--sbp-progress: 0%;

	box-sizing: border-box;
	margin: 1.5em 0;
	padding: 18px 20px;
	background: var(--sbp-bg);
	border: 1px solid var(--sbp-border);
	border-radius: 14px;
	color: var(--sbp-text);
	line-height: 1.35;
}
.sbld-podcast *,
.sbld-podcast *::before,
.sbld-podcast *::after { box-sizing: border-box; }

/* En-tête */
.sbld-podcast__head {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 14px;
}
.sbld-podcast__cover {
	flex: 0 0 64px;
	width: 64px;
	height: 64px;
	border-radius: 10px;
	object-fit: cover;
	margin: 0;
}
.sbld-podcast__meta {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}
.sbld-podcast__kicker {
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--sbp-primary);
}
.sbld-podcast__title {
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--sbp-heading);
}
.sbld-podcast__info {
	font-size: 0.85rem;
	color: var(--sbp-faded);
}
.sbld-podcast__resume::before { content: " · "; }
.sbld-podcast__resume button {
	all: unset;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 2px;
}
.sbld-podcast__resume button:focus-visible { outline: 2px solid var(--sbp-primary); outline-offset: 2px; }

/* Lecteur natif (sans JavaScript) */
.sbld-podcast__audio { display: block; width: 100%; }
.sbld-podcast.is-enhanced .sbld-podcast__audio { display: none; }

/* Commandes personnalisées */
.sbld-podcast__controls[hidden] { display: none; }
.sbld-podcast__controls {
	display: flex;
	align-items: center;
	gap: 10px;
}
.sbld-podcast button {
	font: inherit;
	line-height: 1;
	margin: 0;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.sbld-podcast__play {
	position: relative;
	flex: 0 0 52px;
	width: 52px;
	height: 52px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--sbp-primary);
	color: #fff;
	display: grid;
	place-items: center;
	transition: transform 0.15s ease, filter 0.15s ease;
}
.sbld-podcast__play:hover { filter: brightness(1.08); }
.sbld-podcast__play:active { transform: scale(0.95); }
.sbld-podcast__play svg { width: 24px; height: 24px; fill: currentColor; }
.sbld-podcast__play .i-pause,
.sbld-podcast.is-playing .sbld-podcast__play .i-play { display: none; }
.sbld-podcast.is-playing .sbld-podcast__play .i-pause { display: block; }

.sbld-podcast__spinner {
	position: absolute;
	inset: -4px;
	border-radius: 50%;
	border: 3px solid transparent;
	border-top-color: var(--sbp-primary);
	opacity: 0;
	pointer-events: none;
}
.sbld-podcast.is-loading .sbld-podcast__spinner {
	opacity: 1;
	animation: sbld-podcast-spin 0.9s linear infinite;
}
@keyframes sbld-podcast-spin { to { transform: rotate(360deg); } }

.sbld-podcast__skip,
.sbld-podcast__rate {
	flex: 0 0 auto;
	min-width: 44px;
	height: 36px;
	padding: 0 8px;
	border: 1px solid var(--sbp-border);
	border-radius: 18px;
	background: transparent;
	color: var(--sbp-text);
	font-size: 0.85rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}
.sbld-podcast__skip:hover,
.sbld-podcast__rate:hover { border-color: var(--sbp-primary); color: var(--sbp-primary); }

.sbld-podcast button:focus-visible {
	outline: 2px solid var(--sbp-primary);
	outline-offset: 2px;
}

/* Barre de progression */
.sbld-podcast__track {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.sbld-podcast__seek {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	height: 22px;
	margin: 0;
	padding: 0;
	background: transparent;
	cursor: pointer;
}
.sbld-podcast__seek::-webkit-slider-runnable-track {
	height: 6px;
	border-radius: 3px;
	background: linear-gradient(to right, var(--sbp-primary) var(--sbp-progress), var(--sbp-border) var(--sbp-progress));
}
.sbld-podcast__seek::-moz-range-track {
	height: 6px;
	border-radius: 3px;
	background: var(--sbp-border);
}
.sbld-podcast__seek::-moz-range-progress {
	height: 6px;
	border-radius: 3px;
	background: var(--sbp-primary);
}
.sbld-podcast__seek::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 16px;
	height: 16px;
	margin-top: -5px;
	border: 0;
	border-radius: 50%;
	background: var(--sbp-primary);
	box-shadow: 0 0 0 3px var(--sbp-bg);
}
.sbld-podcast__seek::-moz-range-thumb {
	width: 16px;
	height: 16px;
	border: 0;
	border-radius: 50%;
	background: var(--sbp-primary);
	box-shadow: 0 0 0 3px var(--sbp-bg);
}
.sbld-podcast__seek:focus-visible { outline: 2px solid var(--sbp-primary); outline-offset: 2px; border-radius: 4px; }

.sbld-podcast__time {
	display: flex;
	justify-content: space-between;
	font-size: 0.78rem;
	color: var(--sbp-faded);
	font-variant-numeric: tabular-nums;
}

.sbld-podcast__error {
	margin: 12px 0 0;
	font-size: 0.9rem;
	color: #b3261e;
}

/* Liens vers les plateformes */
.sbld-podcast__links {
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px solid var(--sbp-border);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
}
.sbld-podcast__links-label {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--sbp-faded);
}
.sbld-podcast__links-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.sbld-podcast__links-list li { margin: 0; padding: 0; }
.sbld-podcast__links-list li::before { display: none; }
.sbld-podcast a.sbld-podcast__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 40px;
	padding: 0 14px 0 9px;
	border: 1px solid var(--sbp-border);
	border-radius: 20px;
	background: #fff;
	color: var(--sbp-heading);
	font-size: 0.88rem;
	font-weight: 600;
	text-decoration: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.sbld-podcast a.sbld-podcast__link:hover {
	border-color: var(--sbp-primary);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	transform: translateY(-1px);
	color: var(--sbp-heading);
}
.sbld-podcast a.sbld-podcast__link:focus-visible { outline: 2px solid var(--sbp-primary); outline-offset: 2px; }
.sbld-podcast__link img {
	width: 22px;
	height: 22px;
	margin: 0;
	object-fit: contain;
	border-radius: 5px;
}

/* Mobile : la barre passe sur sa propre ligne */
@media (max-width: 600px) {
	.sbld-podcast { padding: 16px; }
	.sbld-podcast__controls {
		flex-wrap: wrap;
		justify-content: center;
		gap: 12px 14px;
	}
	.sbld-podcast__track { order: -1; flex-basis: 100%; }
	.sbld-podcast__links { flex-direction: column; align-items: flex-start; }
	.sbld-podcast__links-list { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
	.sbld-podcast a.sbld-podcast__link { width: 100%; min-width: 0; font-size: 0.82rem; }
	.sbld-podcast__link span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

@media (prefers-reduced-motion: reduce) {
	.sbld-podcast__play,
	.sbld-podcast a.sbld-podcast__link { transition: none; }
	.sbld-podcast a.sbld-podcast__link:hover { transform: none; }
	.sbld-podcast.is-loading .sbld-podcast__spinner { animation-duration: 2.5s; }
}

/* v1.1.1 — Neutralise le soulignement des liens et boutons hérité du thème
 * (bordure basse, box-shadow ou dégradé de fond utilisés comme soulignement). */
.sbld-podcast .sbld-podcast__links a.sbld-podcast__link,
.sbld-podcast .sbld-podcast__links a.sbld-podcast__link:hover,
.sbld-podcast .sbld-podcast__links a.sbld-podcast__link:focus {
	text-decoration: none !important;
	background-image: none !important;
	border-bottom-width: 1px !important;
	border-bottom-style: solid !important;
}
.sbld-podcast .sbld-podcast__links a.sbld-podcast__link {
	border-bottom-color: var(--sbp-border) !important;
	box-shadow: none !important;
}
.sbld-podcast .sbld-podcast__links a.sbld-podcast__link:hover {
	border-bottom-color: var(--sbp-primary) !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}
.sbld-podcast .sbld-podcast__controls button {
	text-decoration: none !important;
	background-image: none !important;
	box-shadow: none !important;
}
.sbld-podcast .sbld-podcast__controls .sbld-podcast__skip,
.sbld-podcast .sbld-podcast__controls .sbld-podcast__rate {
	border-bottom: 1px solid var(--sbp-border) !important;
}
.sbld-podcast .sbld-podcast__controls .sbld-podcast__skip:hover,
.sbld-podcast .sbld-podcast__controls .sbld-podcast__rate:hover {
	border-bottom-color: var(--sbp-primary) !important;
}
.sbld-podcast .sbld-podcast__controls .sbld-podcast__play {
	border: 0 !important;
}
.sbld-podcast__resume button { border: 0 !important; box-shadow: none !important; }

/* v1.3.0 — Ligne d'info et mini-séries */
.sbld-podcast__people::before { content: " · "; }
.sbld-podcast__dur:empty + .sbld-podcast__people::before { content: none; }

.sbld-podcast__list {
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px solid var(--sbp-border);
}
.sbld-podcast:not(.is-enhanced) .sbld-podcast__list { display: none; }
.sbld-podcast__list-title {
	display: block;
	margin-bottom: 8px;
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--sbp-heading);
}
.sbld-podcast__list-title small {
	margin-left: 6px;
	font-size: 0.8rem;
	font-weight: 400;
	color: var(--sbp-faded);
}
.sbld-podcast ol.sbld-podcast__items {
	margin: 0;
	padding: 0;
	list-style: none;
}
.sbld-podcast ol.sbld-podcast__items li { margin: 0; padding: 0; }
.sbld-podcast ol.sbld-podcast__items li::before { display: none; }

.sbld-podcast .sbld-podcast__list button.sbld-podcast__item {
	display: grid;
	grid-template-columns: 30px 1fr auto auto;
	align-items: center;
	gap: 10px;
	width: 100%;
	min-height: 46px;
	padding: 8px 10px;
	border: 0 !important;
	border-radius: 10px;
	background: transparent;
	box-shadow: none !important;
	color: var(--sbp-text);
	font-size: 0.92rem;
	text-align: left;
	text-transform: none;
	letter-spacing: normal;
	transition: background-color 0.15s ease;
}
.sbld-podcast .sbld-podcast__list button.sbld-podcast__item:hover { background: rgba(0, 0, 0, 0.04); }
.sbld-podcast .sbld-podcast__list button.sbld-podcast__item[aria-current="true"] {
	background: #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06) !important;
}
.sbld-podcast__item-num {
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 1px solid var(--sbp-border);
	font-size: 0.8rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: var(--sbp-faded);
}
.sbld-podcast__item[aria-current="true"] .sbld-podcast__item-num {
	background: var(--sbp-primary);
	border-color: var(--sbp-primary);
	color: #fff;
}
.sbld-podcast__item-title {
	min-width: 0;
	font-weight: 600;
	color: var(--sbp-heading);
	line-height: 1.3;
}
.sbld-podcast__item-dur {
	font-size: 0.8rem;
	color: var(--sbp-faded);
	font-variant-numeric: tabular-nums;
}
.sbld-podcast__item-state {
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--sbp-faded);
	white-space: nowrap;
}
.sbld-podcast__item.is-done .sbld-podcast__item-state::before { content: "✓ écouté"; }
.sbld-podcast__item.is-playing .sbld-podcast__item-state::before { content: "en cours"; color: var(--sbp-primary); }

@media (max-width: 600px) {
	.sbld-podcast .sbld-podcast__list button.sbld-podcast__item {
		grid-template-columns: 28px 1fr auto auto;
		gap: 8px;
		padding: 8px 6px;
		font-size: 0.88rem;
	}
	.sbld-podcast__item.is-done .sbld-podcast__item-state::before { content: "✓"; }
	.sbld-podcast__item.is-playing .sbld-podcast__item-state::before { content: "●"; }
}

/* v1.4.0 */
.sbld-podcast__links-list li[hidden] { display: none !important; }
