/* Lecteur media riche, mobile-first. */
.rich-player, .rich-audio-player { position: relative; }
.rich-player .player-youtube { position: absolute; inset: 0; z-index: 2; }
.rich-player .rp-overlay, .rich-audio-player .raf-body { z-index: 4; }
.rich-player.is-loading::after, .rich-audio-player.is-loading::after { content: 'Chargement...'; position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; color: #fff; background: rgba(4, 7, 13, .58); font-size: 13px; font-weight: 700; }
.player-error { position: absolute; inset: 0; z-index: 8; display: grid; place-content: center; gap: 12px; padding: 24px; text-align: center; color: #fff; background: rgba(4, 7, 13, .9); }
.player-error.is-hidden { display: none; }
.player-error strong { font-size: 18px; }
.player-error span { color: rgba(255,255,255,.75); font-size: 13px; }
.player-error button { justify-self: center; padding: 9px 15px; border: 1px solid rgba(255,255,255,.4); background: #2458d3; color: #fff; cursor: pointer; font-weight: 700; }
.player-settings { position: absolute; right: 14px; bottom: 62px; z-index: 9; display: none; min-width: 180px; padding: 12px; background: rgba(5, 12, 24, .96); border: 1px solid rgba(255,255,255,.18); color: #fff; box-shadow: 0 14px 30px rgba(0,0,0,.3); }
.player-settings-title { margin: 0 0 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #93c5fd; }
.player-settings button { width: 100%; padding: 7px 8px; border: 0; background: transparent; color: #fff; text-align: left; cursor: pointer; }
.player-settings button:hover, .player-settings button.is-active { background: rgba(36,88,211,.6); }
.player-playlist { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: thin; }
.player-playlist-item { flex: 0 0 auto; max-width: 220px; padding: 8px 12px; border: 1px solid #d9e0ec; background: #fff; color: #16233b; cursor: pointer; text-align: left; font-size: 12px; }
.player-playlist-item:hover, .player-playlist-item.is-active { border-color: #2458d3; background: #eef4ff; color: #1746a2; }
.player-muted { margin: 0; color: #64748b; font-size: 13px; }
.rich-player.is-error video, .rich-audio-player.is-error audio { visibility: hidden; }

/* Fenêtre TV flottante, réduite par défaut pour ne pas interrompre la page. */
.floating-live { position: fixed; left: 18px; bottom: 18px; z-index: 1000; width: min(370px, calc(100vw - 28px)); filter: drop-shadow(0 16px 34px rgba(15, 23, 42, .28)); }
.floating-live-launcher { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 50px; padding: 9px 14px; border: 1px solid rgba(255,255,255,.2); background: linear-gradient(135deg, #132b50, #071426); color: #fff; cursor: pointer; font: 700 13px var(--font-text); text-align: left; }
.floating-live-launcher-copy { display: flex; flex-direction: column; gap: 1px; }
.floating-live-launcher-copy small { color: rgba(255,255,255,.62); font-size: 10px; font-weight: 500; }
.floating-live-launcher i { margin-left: auto; transition: transform .2s ease; }
.floating-live.is-open .floating-live-launcher i { transform: rotate(180deg); }
.floating-live-dot { display: inline-block; width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 4px rgba(239,68,68,.18); }
.floating-live-panel { overflow: hidden; border: 1px solid #dbe3ef; border-top: 0; background: #fff; }
.floating-live-heading { display: flex; align-items: center; gap: 9px; padding: 10px 12px; color: #17233b; font-size: 12px; }
.floating-live-heading strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.floating-live-heading-status { display: inline-flex; align-items: center; gap: 6px; color: #dc2626; font-size: 9px; font-weight: 800; letter-spacing: .08em; white-space: nowrap; }
.floating-live-close { width: 28px; height: 28px; margin-left: auto; border: 0; background: transparent; color: #64748b; cursor: pointer; font-size: 22px; line-height: 1; }
.floating-live-player { width: 100%; }
.floating-live-player.rich-player { aspect-ratio: 16 / 9; background: #030712; }
.floating-live-player .rp-overlay { opacity: 1; padding: 9px; }
.floating-live-player .rp-center { display: grid; }
.floating-live-player .rp-big-btn { width: 48px; height: 48px; }
.floating-live-player .rp-controls { gap: 7px; }
.floating-live-player .rp-btn { width: 32px; height: 32px; font-size: 11px; }
.floating-live-player .rp-volume { width: 70px; }
.floating-live-player .player-error { position: absolute; }
@media (max-width: 560px) {
    .floating-live { left: 10px; width: min(340px, calc(100vw - 20px)); bottom: 72px; }
    .floating-live-launcher { min-height: 44px; }
}
@media (max-width: 560px) {
    .rp-overlay { padding: 10px; }
    .rp-controls { gap: 7px; }
    .rp-volume, .raf-volume { width: 54px; }
    .rp-quality { display: none; }
    .rp-btn, .raf-btn { width: 42px; height: 42px; }
    .rp-progress, .raf-progress { min-width: 0; }
    .player-settings { right: 8px; bottom: 70px; }
}
@media (prefers-reduced-motion: reduce) {
    .rp-overlay, .raf-body { transition: none; }
}
