/* Lecteur I MEERIO */
.pl { position: relative; background: #000; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9; outline: none;
  user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.pl:focus-visible { box-shadow: 0 0 0 2px var(--cyan); }
.pl video { width: 100%; height: 100%; display: block; background: #000; object-fit: contain; }
.pl.fs { border-radius: 0; aspect-ratio: auto; width: 100vw; height: 100vh; }
.pl.idle { cursor: none; }

/* logo de la chaîne (incrustation) */
.pl-logo { position: absolute; top: 3.2%; right: 2.6%; width: clamp(70px, 15%, 190px); height: auto; opacity: .92;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.55)) drop-shadow(0 0 1px rgba(255,255,255,.9)); pointer-events: none; z-index: 2; }

/* badge source (en haut à gauche, géré par la page) */
.pl .overlay { z-index: 3; }

/* barre de commandes */
.pl-bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; display: flex; align-items: center; gap: 4px;
  padding: 28px 12px 10px; background: linear-gradient(transparent, rgba(5,8,14,.55) 40%, rgba(5,8,14,.85));
  transition: opacity .25s, transform .25s; }
.pl.idle .pl-bar, .pl.idle .overlay { opacity: 0; transform: translateY(8px); pointer-events: none; }
.pl-grow { flex: 1; }
.pl-btn { width: 40px; height: 40px; padding: 8px; display: grid; place-items: center; background: transparent; border: 0;
  border-radius: 10px; color: #fff; cursor: pointer; }
.pl-btn:hover { background: rgba(255,255,255,.12); }
.pl-btn:focus-visible, .pl-live:focus-visible, .pl-slider:focus-visible { outline: 2px solid var(--cyan); outline-offset: 1px; }
.pl-btn svg, .pl-big svg, .pl-unmute svg { width: 100%; height: 100%; fill: currentColor; }
.pl-btn.on { color: var(--cyan); }

/* volume */
.pl-vol { display: flex; align-items: center; }
.pl-slider { -webkit-appearance: none; appearance: none; width: 0; opacity: 0; height: 4px; padding: 0; margin: 0; border: 0;
  border-radius: 99px; cursor: pointer; transition: width .2s, opacity .2s, margin .2s;
  background: linear-gradient(90deg, #fff var(--p, 100%), rgba(255,255,255,.3) var(--p, 100%)); }
.pl-vol:hover .pl-slider, .pl-vol:focus-within .pl-slider { width: 86px; opacity: 1; margin: 0 8px 0 2px; }
.pl-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 0; }
.pl-slider::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 0; }

/* indicateur direct */
.pl-live { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; margin-left: 4px; border-radius: 99px;
  background: var(--live); border: 0; color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .08em; cursor: default; }
.pl-live i { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pulse 1.2s infinite; }
.pl-live.behind { background: rgba(255,255,255,.16); cursor: pointer; }
.pl-live.behind i { background: #c9d3e3; animation: none; }
.pl-live.behind span::after { content: " · revenir"; font-weight: 600; }

/* qualité courante */
.pl-q { font-size: 12px; font-weight: 700; color: #e6edf7; padding: 3px 8px; border-radius: 6px; background: rgba(255,255,255,.12);
  margin-right: 4px; white-space: nowrap; }
.pl-q.hd { background: var(--grad); color: #0a0e17; }
.pl-q:empty { display: none; }

/* menu */
.pl-menu { position: absolute; right: 12px; bottom: 62px; z-index: 6; min-width: 250px; max-height: 70%; overflow: auto;
  background: rgba(14,20,34,.96); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 6px;
  box-shadow: 0 18px 50px rgba(0,0,0,.5); backdrop-filter: blur(10px); }
.pl-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; background: transparent; border: 0;
  border-radius: 8px; color: #fff; text-align: left; font-size: 14px; cursor: pointer; }
.pl-menu button:hover, .pl-menu button:focus-visible { background: rgba(255,255,255,.09); outline: none; }
.pl-menu svg { width: 18px; height: 18px; fill: var(--cyan); flex: none; }
.pl-menu .pl-sp { width: 18px; flex: none; }
.pl-menu em { color: #b7c3d7; font-style: normal; font-size: 12px; margin-left: 6px; }
.pl-menu b { font-size: 10px; background: var(--grad); color: #0a0e17; padding: 1px 5px; border-radius: 4px; margin-left: 4px; }
.pl-mh { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #b7c3d7; padding: 8px 10px 4px; }
.pl-mnote { font-size: 12px; color: #b7c3d7; padding: 4px 10px 8px; }

/* gros bouton lecture, son, chargement, messages */
.pl-big { position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; padding: 20px 18px 20px 22px; border-radius: 50%;
  border: 0; background: var(--grad); color: #0a0e17; z-index: 5; cursor: pointer; display: none;
  box-shadow: 0 10px 40px rgba(38,214,238,.35); }
.pl.paused .pl-big { display: block; }
.pl-unmute { position: absolute; left: 14px; bottom: 66px; z-index: 5; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 10px; border-radius: 99px; border: 0; background: #fff; color: #0a0e17; font-weight: 700; cursor: pointer;
  box-shadow: 0 6px 24px rgba(0,0,0,.35); animation: nudge 2.4s ease-in-out infinite; }
.pl-unmute svg { width: 20px; height: 20px; }
.pl-unmute[hidden] { display: none; }
@keyframes nudge { 0%, 85%, 100% { transform: none; } 90% { transform: translateY(-3px); } }
.pl-spinner { position: absolute; inset: 0; margin: auto; width: 46px; height: 46px; border-radius: 50%; z-index: 3; display: none;
  border: 4px solid rgba(255,255,255,.2); border-top-color: var(--cyan); animation: spin .9s linear infinite; }
.pl.loading:not(.paused) .pl-spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
.pl-toast { position: absolute; top: 14px; left: 50%; transform: translate(-50%, -8px); z-index: 6; opacity: 0; pointer-events: none;
  background: rgba(10,14,23,.85); color: #fff; padding: 6px 14px; border-radius: 99px; font-size: 13px; font-weight: 600; transition: .2s; }
.pl-toast.on { opacity: 1; transform: translate(-50%, 0); }
.pl-error { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 5; background: rgba(10,14,23,.85);
  color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; }
.pl-stats { position: absolute; left: 12px; top: 48px; z-index: 5; margin: 0; padding: 10px 12px; border-radius: 10px;
  background: rgba(5,8,14,.8); color: #d8e2f0; font: 12px/1.6 ui-monospace, Consolas, monospace; pointer-events: none; }

/* sous-titres */
.pl video::cue { background: rgba(0,0,0,.75); color: #fff; font-size: 1.05em; }
.pl.fs video::cue { font-size: 1.5em; }

/* mobile */
@media (max-width: 640px) {
  .pl-bar { padding: 22px 6px 6px; gap: 0; }
  .pl-btn { width: 38px; height: 38px; }
  .pl-q, .pl-vol .pl-slider { display: none; }
  .pl-pip { display: none; }
  .pl-unmute { bottom: 54px; left: 10px; }
  .pl-menu { right: 6px; left: 6px; min-width: 0; bottom: 52px; }
  .pl-live.behind span::after { content: ""; }
}
@media (prefers-reduced-motion: reduce) { .pl-unmute, .pl-live i, .pl-spinner { animation: none; } }
