/* ==========================================================================
   Vichy Radio — fenêtre lecteur (/lecteur/)
   Bleu Vichy Radio comme le lecteur fixe, égaliseur orange, bouton en bulle.
   ========================================================================== */

html, body.popup { height: 100%; }
body.popup {
	padding: 0;
	background: var(--ink);
	color: #fff;
	overflow-x: hidden;
}
body.popup::before {
	content: ""; position: fixed; inset: 0 0 auto; height: 5px; background: var(--accent); z-index: 2;
}

.pp {
	min-height: 100%;
	max-width: 440px; margin-inline: auto;
	display: flex; flex-direction: column; gap: 14px;
	padding: 20px 22px 20px;
}

/* En-tête */
.pp__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pp__brand { display: inline-flex; align-items: baseline; gap: .4em; color: #fff; text-decoration: none; }
.pp__brand .brand__word { font-size: 1.45rem; font-weight: 900; line-height: 1; text-transform: uppercase; letter-spacing: -0.02em; }
.pp__brand .brand__sub { color: var(--accent); font-size: 1.1rem; font-weight: 850; text-transform: lowercase; letter-spacing: -0.02em; }
.pp__live {
	display: inline-flex; align-items: center; gap: 7px;
	font-size: .75rem; font-weight: 850; padding: 3px 10px 3px 8px; border-radius: 999px;
	background: var(--accent); color: var(--ink); text-transform: uppercase; letter-spacing: .06em;
}
.pp__live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.is-playing .pp__live::before { animation: pulse 1.6s ease-out infinite; }

/* Pochette */
.pp__cover {
	position: relative; aspect-ratio: 1; width: 100%; max-width: clamp(150px, calc(100vh - 520px), 300px); margin-inline: auto;
	border-radius: 30px 30px 30px 8px; overflow: hidden;
	background: var(--ink-3);
	box-shadow: 0 24px 50px -20px rgba(0,0,0,.6);
}
.pp__cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.pp__cover-ph {
	position: absolute; inset: 0; display: grid; place-items: end center; padding: 22% 16% 20%;
	background: radial-gradient(120% 90% at 50% 110%, #2A2AA8 0%, var(--ink-3) 60%);
}
.eq--cover { --eq-h: 100%; --eq-gap: 7%; width: 100%; height: 100%; }
.eq--cover span { border-radius: 999px; }

/* Titre */
.pp__track { text-align: center; }
.pp__title {
	margin: 0; font-size: clamp(1.4rem, 6vw, 1.75rem); line-height: 1.1;
	font-weight: 900; letter-spacing: -0.02em;
	overflow-wrap: anywhere;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pp__artist { margin: 6px 0 0; color: var(--on-ink); font-weight: 500; }

/* Égaliseur */
.pp__eq { display: block; width: 100%; height: 64px; }

/* Commandes */
.pp__controls { display: flex; align-items: center; gap: 18px; }
.pp__play {
	position: relative; flex: none; display: grid; place-items: center; width: 68px; height: 64px; border-radius: 20px 20px 20px 6px;
	border: 0; background: var(--accent); color: var(--ink); cursor: pointer; transform: rotate(-5deg);
	box-shadow: 0 10px 30px -8px rgba(255, 143, 0, .55);
	transition: transform .15s ease, background .15s ease;
}
.pp__play:hover { background: var(--accent-hover); transform: rotate(0) scale(1.04); }
.pp__play:active { transform: rotate(-5deg) scale(.96); }
.pp__play:focus-visible, .pp__mute:focus-visible, .pp a:focus-visible, .pp button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.pp__play .icon { width: 32px; height: 32px; }
.pp__play .icon--stop { display: none; }
.is-playing .pp__play .icon--play { display: none; }
.is-playing .pp__play .icon--stop { display: block; }
.is-loading-stream .pp__play { animation: pp-wait 1s ease-in-out infinite alternate; }
@keyframes pp-wait { to { box-shadow: 0 0 0 10px rgba(255, 143, 0, .2); } }

.pp__volume { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.pp__mute { flex: none; border: 0; background: none; padding: 6px; display: grid; color: var(--on-ink); cursor: pointer; }
.pp__mute:hover { color: #fff; }
.pp__mute .icon--mute { display: none; }
.is-muted .pp__mute .icon--volume { display: none; }
.is-muted .pp__mute .icon--mute { display: block; }
.pp__volume input { flex: 1; min-width: 0; accent-color: var(--accent); }

.pp__notice {
	margin: -6px 0 0; padding: 10px 14px; border-radius: var(--radius);
	background: rgba(255,255,255,.08); color: #fff; font-size: .9rem; font-weight: 600;
}

/* Émission en cours */
.pp__show {
	margin-top: auto;
	background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08);
	border-radius: 24px 24px 24px 6px; padding: 14px 16px;
}
.pp__label { margin: 0 0 10px; font-size: .78rem; font-weight: 850; color: var(--accent-soft); text-transform: uppercase; letter-spacing: .08em; }
.pp__show-main { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: center; }
.pp__show-thumb {
	position: relative; width: 56px; height: 56px; border-radius: 14px 14px 14px 4px; overflow: hidden;
	display: grid; place-items: center; text-decoration: none;
	background: var(--accent);
}
.pp__show-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pp__show-thumb span { color: var(--ink); font-size: 1.6rem; font-weight: 900; line-height: 1; transform: rotate(-6deg); }
.pp__show-txt { min-width: 0; line-height: 1.3; }
.pp__show-title {
	display: block; color: #fff; text-decoration: none; font-weight: 900; font-size: 1.08rem;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pp__show-title:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.pp__show-hosts { margin: 2px 0 0; color: var(--on-ink); font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp__show-hosts:empty { display: none; }
.pp__show-time {
	display: flex; align-items: center; gap: 10px; margin-top: 14px;
	font-size: .85rem; color: var(--on-ink); font-variant-numeric: tabular-nums;
}
.pp__bar { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,.14); overflow: hidden; }
.pp__bar span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 2px; transition: width .6s ease; }
.pp__next { margin: 12px 0 0; font-size: .9rem; color: var(--on-ink); }
.pp__next b { color: #fff; font-weight: 700; }

/* Très petites fenêtres : on serre */
@media (prefers-reduced-motion: reduce) {
	.is-playing .pp__live::before { animation: none; }
}

/* --------------------------------------------------------------------------
   v1.2 : j'aime, message au studio, flux de secours
   -------------------------------------------------------------------------- */
.pp__track-actions { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pp__msg { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 10px; border-radius: 999px; border: 0; box-shadow: inset 0 0 0 2px rgba(255,255,255,.2); color: var(--on-ink); text-decoration: none; font-weight: 800; font-size: .9rem; }
.pp__msg .icon { width: 18px; height: 18px; }
.pp__msg:hover { color: var(--ink); background: var(--accent); box-shadow: none; }
.pp__backup { font-size: .78rem; font-weight: 850; color: var(--accent-soft); }

/* --------------------------------------------------------------------------
   Lecteur intégré (iframe sur un autre site)
   -------------------------------------------------------------------------- */
html:has(body.is-embed) { background: transparent; }
body.is-embed { background: transparent; }
body.is-embed::before { display: none; }
body.is-embed .pp { min-height: 0; height: 100vh; max-width: none; border-radius: 16px; background: var(--ink); overflow: hidden; position: relative; }
body.is-embed .pp::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--accent); }

/* Format bandeau */
.pp--bar { flex-direction: row; align-items: center; gap: 14px; padding: 12px 16px; }
.pp--bar .pp__play { width: 56px; height: 54px; box-shadow: none; }
.pp--bar .pp__play .icon { width: 26px; height: 26px; }
.pp--bar .pp__cover { width: 56px; max-width: 56px; margin: 0; flex: none; border-radius: 14px 14px 14px 4px; box-shadow: none; }
.pp--bar .pp__cover-ph { padding: 14px 10px; }
.pp--bar .pp__meta { flex: 1; min-width: 0; line-height: 1.25; }
.pp--bar .pp__status { display: flex; align-items: center; gap: 8px; margin: 0; font-size: .8rem; color: var(--on-ink); white-space: nowrap; overflow: hidden; }
.pp--bar .pp__live { font-size: .75rem; padding: 1px 8px 1px 6px; }
.pp--bar .pp__show-name { overflow: hidden; text-overflow: ellipsis; }
.pp--bar .pp__title { margin: 2px 0 0; font-size: 1.05rem; font-style: normal; font-weight: 850; -webkit-line-clamp: 1; text-align: left; }
.pp--bar .pp__artist { margin: 0; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp--bar .pp__eq { width: 160px; height: 40px; flex: none; }
.pp--bar .pp__volume { flex: none; width: 130px; }
.pp__brand--mini { flex: none; flex-direction: column; gap: 0; align-items: flex-end; }
.pp__brand--mini .brand__word { font-size: 1.15rem; }
.pp__brand--mini .brand__sub { font-size: .9rem; margin-top: -2px; }
.pp--bar .pp__notice { position: absolute; left: 86px; right: 16px; bottom: 6px; margin: 0; padding: 2px 8px; font-size: .78rem; }
@media (max-width: 720px) { .pp--bar .pp__eq, .pp__brand--mini { display: none; } }
@media (max-width: 520px) { .pp--bar .pp__volume { display: none; } }
@media (max-width: 360px) { .pp--bar .pp__cover { display: none; } }
.embed--no-eq .pp__eq { display: none !important; }

/* Bandeau clair */
body.is-embed.embed--clair .pp--bar { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
body.embed--clair .pp__title { color: var(--ink); }
body.embed--clair .pp__status, body.embed--clair .pp__artist { color: var(--muted); }
body.embed--clair .pp__live { background: var(--accent); color: var(--ink); }
body.embed--clair .pp__mute { color: var(--muted); }
body.embed--clair .pp__brand { color: var(--ink); }
body.embed--clair .pp__brand .brand__sub { color: var(--accent-deep); }
body.embed--clair .pp :focus-visible { outline-color: var(--ink); }
body.embed--clair .pp__cover, body.embed--clair .pp__cover-ph { background: var(--mist); }

/* Format carte (popup-player.php dans une iframe de hauteur fixe) : on fait défiler plutôt qu'écraser. */
body.is-embed .pp:not(.pp--bar) { overflow-y: auto; }
body.is-embed .pp:not(.pp--bar) > * { flex-shrink: 0; }
body.is-embed .pp:not(.pp--bar) .pp__cover { max-width: clamp(150px, calc(100vh - 470px), 240px); }
