/* ════════════════════════════════════
   JLTomyVOD – Lecteur Vidéo CSS
════════════════════════════════════ */

.player-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,0.7);
}

.player-container.theater-mode {
    position: fixed;
    inset: 0;
    z-index: 2000;
    border-radius: 0;
    aspect-ratio: auto;
    height: 100vh;
}

.player-container.fullscreen-mode {
    position: fixed;
    inset: 0;
    z-index: 3000;
    border-radius: 0;
    aspect-ratio: auto;
    height: 100vh;
}

#videoPlayer {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000;
}

/* ── UI overlay ── */
.player-ui {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.player-ui.active { pointer-events: all; }

/* Big play button */
.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.player-overlay.show { opacity: 1; }

.play-big-btn {
    width: 72px; height: 72px;
    background: rgba(145, 71, 255, 0.9);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 40px rgba(145, 71, 255, 0.6);
    transition: transform 0.2s, background 0.2s;
    pointer-events: all;
    padding-left: 4px;
    color: #fff;
}

.play-big-btn:hover { transform: scale(1.1); background: var(--purple-primary); }

/* ── Contrôles ── */
.player-controls {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    padding: 24px 16px 12px;
    transform: translateY(100%);
    transition: transform 0.25s ease;
    pointer-events: all;
}

.player-container:hover .player-controls,
.player-container:focus-within .player-controls {
    transform: translateY(0);
}

/* Progress bar */
.progress-bar-wrap {
    margin-bottom: 10px;
    cursor: pointer;
    padding: 6px 0;
}

.progress-bar {
    height: 4px;
    background: rgba(255,255,255,0.25);
    border-radius: 2px;
    position: relative;
    transition: height 0.15s;
}

.progress-bar-wrap:hover .progress-bar { height: 6px; }

.progress-fill {
    height: 100%;
    background: var(--purple-primary);
    border-radius: 2px;
    position: absolute;
    left: 0; top: 0;
    pointer-events: none;
    transition: width 0.1s linear;
}

.progress-thumb {
    width: 14px; height: 14px;
    background: var(--purple-primary);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 8px var(--purple-glow);
    opacity: 0;
    transition: opacity 0.15s;
    pointer-events: none;
}

.progress-bar-wrap:hover .progress-thumb { opacity: 1; }

/* Controls row */
.controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.controls-left, .controls-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ctrl-btn {
    color: rgba(255,255,255,0.85);
    font-size: 0.9rem;
    padding: 6px 8px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
    min-width: 32px;
    text-align: center;
    cursor: pointer;
    background: none;
    border: none;
}

.ctrl-btn:hover {
    color: #fff;
    background: rgba(255,255,255,0.12);
}

.ctrl-select {
    background: rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.85);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    outline: none;
}

/* Volume */
.volume-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.volume-slider {
    width: 70px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    cursor: pointer;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px; height: 12px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
}

/* Time display */
.time-display {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.8);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Buffering spinner */
.player-buffering {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}

.player-buffering.active { opacity: 1; }

.player-spinner {
    width: 44px; height: 44px;
    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: var(--purple-primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
