/* assets/style.css */

.delta-hls-container {
    margin: 20px 0;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.delta-hls-player-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* Ratio 16:9 */
    height: 0;
    overflow: hidden;
    background: #000;
}

.delta-hls-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* Fix pour maintenir les overlays en plein écran */
.delta-hls-player-wrapper:fullscreen .delta-hls-logo,
.delta-hls-player-wrapper:fullscreen .delta-hls-live-badge,
.delta-hls-player-wrapper:-webkit-full-screen .delta-hls-logo,
.delta-hls-player-wrapper:-webkit-full-screen .delta-hls-live-badge {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 2147483647 !important;
}

.delta-hls-player-wrapper:fullscreen video,
.delta-hls-player-wrapper:-webkit-full-screen video {
    width: 100% !important;
    height: 100% !important;
}

/* Personnalisation du lecteur vidéo HTML5 */
video::-webkit-media-controls-panel {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent) !important;
}

video::-webkit-media-controls-play-button,
video::-webkit-media-controls-mute-button,
video::-webkit-media-controls-volume-slider,
video::-webkit-media-controls-fullscreen-button,
video::-webkit-media-controls-current-time-display,
video::-webkit-media-controls-time-remaining-display {
    filter: brightness(0) invert(1) !important; /* Force le blanc pur */
}

/* --- VUE LISTE ADMIN --- */
.video-list-container.list-view .video-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

.video-list-container.list-view .video-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    height: 80px !important;
    width: 100% !important;
    margin: 0 !important;
}

.video-list-container.list-view .video-thumbnail {
    width: 120px !important;
    height: 80px !important;
    object-fit: cover !important;
}

.video-list-container.list-view .video-card-content {
    flex: 1 !important;
    padding: 0 20px !important;
}

.video-list-container.list-view .video-card-actions {
    background: transparent !important;
    border: none !important;
    padding-right: 20px !important;
}

.video-list-container.list-view .video-details br {
    display: none;
}

.video-list-container.list-view .video-details span {
    margin-right: 15px;
}

/* Infos vidéo */
.delta-hls-info {
    padding: 20px;
    background: #f9f9f9;
}

.delta-hls-info h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 18px;
}

.delta-hls-info p {
    margin: 10px 0;
    color: #666;
    font-size: 14px;
}

.delta-hls-info small {
    color: #999;
    font-size: 12px;
}

/* Mode responsive */
@media (max-width: 768px) {
    .delta-hls-container {
        margin: 10px 0;
    }
    
    .delta-hls-info {
        padding: 15px;
    }
    
    .delta-hls-info h3 {
        font-size: 16px;
    }
}

/* Indicateur de lecture en direct */
.delta-hls-live-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 12px;
    z-index: 10;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Logos positions */
.delta-hls-logo {
    position: absolute;
    max-width: 100px;
    z-index: 10;
    pointer-events: none;
}

.delta-hls-logo.top-right { top: 15px; right: 15px; }
.delta-hls-logo.top-left { top: 15px; left: 15px; }
.delta-hls-logo.bottom-right { bottom: 60px; right: 15px; }
.delta-hls-logo.bottom-left { bottom: 60px; left: 15px; }

/* --- NOUVEAUX CONTROLES MANUELS --- */
.delta-manual-controls {
    background: #1a1a1a;
    color: white;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #0073aa;
}

.delta-playing-label {
    color: #0073aa;
    font-weight: bold;
    font-size: 11px;
    margin-right: 8px;
}

.delta-stream-title {
    font-weight: 500;
    font-size: 15px;
}

.delta-ctrl-right {
    display: flex;
    gap: 15px;
}

.delta-btn-ctrl {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delta-btn-ctrl:hover {
    transform: scale(1.2);
    color: #0073aa;
}

.delta-btn-ctrl svg {
    display: block;
    fill: #ffffff !important;
}

.delta-btn-ctrl .dashicons,
.delta-btn-ctrl .dashicons-fullscreen,
.delta-btn-ctrl .dashicons-controls-volumeon,
.delta-btn-ctrl .dashicons-controls-volumeoff {
    font-size: 24px !important;
    width: 24px !important;
    height: 24px !important;
    color: #ffffff !important;
    line-height: 24px !important;
}

/* --- PROGRAMME DU JOUR --- */
.delta-schedule-wrap {
    background: #fff;
    border: 1px solid #ddd;
    margin-top: 10px;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

.delta-schedule-header {
    background: #f1f1f1;
    padding: 10px 15px;
    font-weight: bold;
    font-size: 12px;
    color: #444;
    border-bottom: 1px solid #ddd;
}

.delta-schedule-list {
    max-height: 250px;
    overflow-y: auto;
}

.delta-schedule-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #f9f9f9;
    font-size: 13px;
    transition: background 0.2s;
}

.delta-schedule-item:last-child {
    border-bottom: none;
}

.delta-schedule-item.active {
    background: #e7f5ff;
    border-left: 4px solid #0073aa;
}

.delta-sched-time {
    font-weight: bold;
    color: #0073aa;
    width: 60px;
}

.delta-sched-title {
    flex: 1;
    color: #333;
}

.delta-sched-status {
    font-size: 11px;
    color: #999;
}

.delta-schedule-item.active .delta-sched-status {
    color: #d63638;
    font-weight: bold;
}

/* --- SUPPRESSION ANCIENS STYLES --- */
.delta-unmute-overlay { display: none !important; }

/* Loader de vidéo */
.delta-hls-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
