     *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    :root {
      --bg: #f4f6fb;
      --surface: #ffffff;
      --surface2: #f0f2f8;
      --border: rgba(0,0,0,0.08);
      --text: #1a1d2e;
      --muted: #6b7280;
      --accent: #4f7bff;
      --accent-glow: rgba(79,123,255,0.12);
      --radius: 12px;
      --font: 'Segoe UI', system-ui, sans-serif;
    }

    body {
      background: var(--bg);
      color: var(--text);
      font-family: var(--font);
      min-height: 100vh;
    }

    .container {
     max-width:98%;
      padding: 2.5rem 1.5rem;
    }

    /* ── Header ── */
    .page-header { margin-bottom: 2rem; }
    .page-title {
      font-size: 2.5rem;
      font-weight: 700;
      letter-spacing: -0.03em;
      color: blue;text-align: center;
    }
    .page-subtitle { margin-top: 6px; color: var(--muted); font-size: 0.95rem; }

    /* ── Layout ── */
    .video-layout {
      display: flex;
      gap: 20px;
      align-items: flex-start;
    }
    .video-main { flex: 1; min-width: 0; }

    /* ── Player ── */
    .video-player {
      position: relative;
      background: #080a10;
      border-radius: var(--radius);
      overflow: hidden;
      aspect-ratio: 16/9;
      border: 1px solid var(--border);
      width:100%;
    }

    /* La vraie balise <video> remplit tout le conteneur */
    #videoEl {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: contain;
      background: #000;
      display: block;
    }

    /* Icône de fond affichée avant le premier clic */
    .player-bg {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      pointer-events: none;
    }
    .player-bg i { font-size: 72px; color: rgba(255,255,255,0.04); }

    .player-overlay {
      position: absolute;
      inset: 0;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      padding: 14px;
      background: transparent;
      pointer-events: none;
      transition: background 0.3s;
    }
    .player-overlay > * { pointer-events: auto; }

    /* Contrôles : cachés par défaut, visibles via .show-controls */
    .player-overlay { background: transparent !important; }

    .player-center,
    .player-controls {
      opacity: 0;
      transition: opacity 0.25s;
    }
    .video-player.show-controls .player-overlay {
      background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, transparent 35%, transparent 60%, rgba(0,0,0,0.65) 100%) !important;
    }
    .video-player.show-controls .player-center,
    .video-player.show-controls .player-controls { opacity: 1; }

    .player-top-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .player-live-badge {
      background: #e03535;
      color: #fff;
      font-size: 11px;
      font-weight: 600;
      padding: 3px 10px;
      border-radius: 4px;
      display: flex;
      align-items: center;
      gap: 6px;
      letter-spacing: 0.05em;
    }
    .live-dot {
      width: 6px; height: 6px;
      border-radius: 50%;
      background: #fff;
      animation: blink 1.3s infinite;
    }
    @keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.2} }
    .player-quality { font-size: 11px; color: rgba(255,255,255,0.6); }

    .player-center {
      display: flex;
      justify-content: center;
      align-items: center;
    }
    .play-btn {
      width: 60px; height: 60px;
      border-radius: 50%;
      background: rgba(0,0,0,0.43);
      border: none;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 20px;
      color: #fff;
      transition: transform 0.15s, background 0.15s;
      padding-left: 4px;
    }
    .play-btn:hover { transform: scale(1.1); background: red; }

    .player-controls { display: flex; flex-direction: column; gap: 10px; }
    .progress-track {
      height: 4px;
      background: rgba(255,255,255,0.2);
      border-radius: 2px;
      cursor: pointer;
      position: relative;
    }
    .progress-thumb {
      height: 100%;
      border-radius: 2px;
      background: var(--accent);
      width: 0%;
      transition: width 0.2s linear;
    }
    .controls-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .controls-left, .controls-right { display: flex; align-items: center; gap: 10px; }
    .ctrl-btn {
      background: none;
      border: none;
      color: rgba(255,255,255,0.75);
      cursor: pointer;
      font-size: 14px;
      padding: 2px;
      transition: color 0.12s;
    }
    .ctrl-btn:hover { color: #fff; }
    .time-display { font-size: 12px; color: rgba(255,255,255,0.65); white-space: nowrap; }

    /* accent bar bottom */
    .accent-bar {
      position: absolute;
      bottom: 0; left: 0; right: 0;
      height: 3px;
      background: var(--accent);
      transition: background 0.3s;
    }

    /* ── Video info ── */
    .video-info { margin-top: 14px; }
    .video-title {
      font-size: 1.5rem;
      font-weight: 600;
      color: firebrick;
      margin-bottom: 8px;
    }
    .video-meta {
      display: flex;
      gap: 16px;
      font-size: 13px;
      color: var(--muted);
      flex-wrap: wrap;
    }
    .video-meta span { display: flex; align-items: center; gap: 6px; }

    /* ── Playlist ── */
    .playlist {
      width: 380px;
      flex-shrink: 0;
      display: flex;
      flex-direction: column;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      overflow: hidden;
    }

    .playlist-header {
      padding: 14px 16px 12px;
      border-bottom: 1px solid var(--border);
      position: sticky;
      top: 0;
      background: var(--surface);
      z-index: 2;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .playlist-heading {
      font-size: 15px;
      font-weight: bolder;
      letter-spacing: 0.07em;
      text-transform: uppercase;
      color: blue;
      margin: 0;
    }
    .playlist-count {
      font-size: 11px;
      color: var(--muted);
      background: var(--surface2);
      padding: 2px 8px;
      border-radius: 20px;
      border: 1px solid var(--border);
    }

    .playlist-list {
      display: flex;
      flex-direction: column;
      overflow-y: auto;
      max-height: 520px;
      scrollbar-width: thin;
      scrollbar-color: rgba(0,0,0,0.1) transparent;
    }
    .playlist-list::-webkit-scrollbar { width: 4px; }
    .playlist-list::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 2px; }

    .playlist-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 10px 14px;
      background: none;
      border: none;
      border-bottom: 1px solid var(--border);
      cursor: pointer;
      text-align: left;
      transition: background 0.15s;
      color: var(--text);
      width: 100%;
      position: relative;
    }
    .playlist-item:last-child { border-bottom: none; }
    .playlist-item:hover { background: var(--surface2); }
    .playlist-item.active {
      background: linear-gradient(90deg, var(--accent-glow) 0%, transparent 100%);
      border-left: 3px solid var(--accent);
      padding-left: 11px;
    }

    /* Miniature colorée */
    .pl-thumb {
      width: 48px;
      height: 34px;
      border-radius: 6px;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 13px;
      font-weight: 800;
      color: rgba(255,255,255,0.9);
      position: relative;
      overflow: hidden;
      transition: transform 0.15s;
    }
    .playlist-item:hover .pl-thumb { transform: scale(1.05); }
    .pl-thumb-overlay {
      position: absolute;
      inset: 0;
      background: rgba(0,0,0,0.3);
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      transition: opacity 0.15s;
    }
    .playlist-item:hover .pl-thumb-overlay,
    .playlist-item.active .pl-thumb-overlay { opacity: 1; }
    .pl-thumb-overlay i { font-size: 14px; color: #fff; }
    .playlist-item.active .pl-thumb-overlay i.fa-play { display: none; }

    /* Infos texte */
    .playlist-info {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    .playlist-item-title {
      font-size: 14px;
      font-weight: 500;
      line-height: 1.3;
      color: var(--text);
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }
    .playlist-item.active .playlist-item-title { color: var(--accent); }

    .pl-meta-row {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .playlist-dur {
      font-size: 10px;
      color: var(--muted);
      display: flex;
      align-items: center;
      gap: 3px;
    }
    .pl-progress-mini {
      flex: 1;
      height: 2px;
      background: rgba(255,255,255,0.08);
      border-radius: 1px;
      overflow: hidden;
    }
    .pl-progress-mini-fill {
      height: 100%;
      border-radius: 1px;
      background: var(--accent);
      width: 0%;
      transition: width 0.3s;
    }

    /* Badge "en cours" sur item actif */
    .pl-badge-live {
      display: none;
      font-size: 9px;
      font-weight: 700;
      letter-spacing: 0.06em;
      color: var(--accent);
      text-transform: uppercase;
    }
    .playlist-item.active .pl-badge-live { display: inline; }

    /* ── Responsive ── */
    @media (max-width: 900px) {
      .playlist { width: 240px; }
    }

    @media (max-width: 700px) {
      .video-layout { flex-direction: column; }
      .playlist {
        width: 100%;
        border-radius: var(--radius);
      }
      .playlist-list { max-height: 260px; }

      /* En mobile : items plus compacts, côte à côte */
      .playlist-item { padding: 8px 12px; gap: 10px; }
      .pl-thumb { width: 42px; height: 30px; }
    }
    /* ── Contrôle vitesse ── */
    .speed-wrap {
      position: relative;
    }
    .speed-btn {
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.02em;
      padding: 2px 6px;
      border: 1px solid rgba(255,255,255,0.3);
      border-radius: 4px;
      color: rgba(255,255,255,0.85);
      background: rgba(255,255,255,0.1);
      cursor: pointer;
      transition: background 0.15s;
    }
    .speed-btn:hover { background: rgba(255,255,255,0.22); }

    .speed-menu {
      display: none;
      position: absolute;
      bottom: calc(100% + 8px);
      right: 0;
      background: rgba(15,17,25,0.97);
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 10px;
      padding: 6px;
      min-width: 110px;
      backdrop-filter: blur(8px);
      z-index: 100;
      box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    }
    .speed-menu.open { display: flex; flex-direction: column; gap: 2px; }

    .speed-menu-title {
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 0.07em;
      text-transform: uppercase;
      color: rgba(255,255,255,0.35);
      padding: 4px 8px 6px;
    }
    .speed-opt {
      background: none;
      border: none;
      color: rgba(255,255,255,0.75);
      font-size: 13px;
      font-weight: 500;
      padding: 7px 10px;
      border-radius: 6px;
      cursor: pointer;
      text-align: left;
      transition: background 0.12s, color 0.12s;
    }
    .speed-opt:hover { background: rgba(255,255,255,0.1); color: #fff; }
    .speed-opt.active {
      background: var(--accent);
      color: #fff;
      font-weight: 700;
    }
