/**
 * Video Player 120 - Styles
 */

/* Container principal */
.vp120-container {
    position: relative;
    max-width: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    margin: 20px 0;
}

.vp120-container * {
    box-sizing: border-box;
}

/* Titre de la vidéo */
.vp120-title {
    background: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent);
    color: #fff;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 600;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
}

/* Wrapper vidéo */
.vp120-video-wrapper {
    position: relative;
    width: 100%;
    background: #000;
}

.vp120-video {
    display: block;
    width: 100%;
    max-width: 100%;
    cursor: pointer;
}

/* Overlay de chargement */
.vp120-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    z-index: 15;
}

.vp120-container.loading .vp120-loading {
    display: block;
}

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

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

/* Bouton play central */
.vp120-big-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vp120-big-play svg {
    width: 40px;
    height: 40px;
    color: #fff;
    margin-left: 5px;
}

.vp120-big-play:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translate(-50%, -50%) scale(1.1);
}

.vp120-container.playing .vp120-big-play {
    display: none;
}

/* Contrôles */
.vp120-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 40px 15px 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 20;
}

.vp120-container:hover .vp120-controls,
.vp120-container.show-controls .vp120-controls {
    opacity: 1;
}

/* Barre de progression */
.vp120-progress-container {
    position: relative;
    width: 100%;
    height: 20px;
    padding: 8px 0;
    cursor: pointer;
}

.vp120-progress-bar {
    position: relative;
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    overflow: hidden;
}

.vp120-progress-buffered {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(255,255,255,0.5);
    width: 0%;
    transition: width 0.1s ease;
}

.vp120-progress-current {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #4CAF50;
    width: 0%;
    border-radius: 2px;
}

.vp120-progress-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    margin: 0;
}

/* Ligne des contrôles */
.vp120-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

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

/* Boutons */
.vp120-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vp120-btn:hover {
    background: rgba(255,255,255,0.2);
}

.vp120-btn svg {
    width: 24px;
    height: 24px;
    color: #fff;
}

/* Volume */
.vp120-volume-container {
    display: flex;
    align-items: center;
    gap: 5px;
}

.vp120-volume-slider {
    width: 0;
    opacity: 0;
    transition: width 0.2s ease, opacity 0.2s ease;
    cursor: pointer;
    accent-color: #4CAF50;
}

.vp120-volume-container:hover .vp120-volume-slider {
    width: 80px;
    opacity: 1;
}

/* Temps */
.vp120-time {
    color: #fff;
    font-size: 13px;
    white-space: nowrap;
    padding: 0 10px;
}

/* Menu vitesse */
.vp120-speed-container {
    position: relative;
}

.vp120-speed-btn {
    min-width: 45px;
}

.vp120-speed-value {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}

.vp120-speed-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 8px;
    padding: 8px 0;
    min-width: 80px;
    display: none;
    z-index: 30;
}

.vp120-speed-container.open .vp120-speed-menu {
    display: block;
}

.vp120-speed-option {
    display: block;
    width: 100%;
    padding: 8px 16px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 14px;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.vp120-speed-option:hover {
    background: rgba(255,255,255,0.2);
}

.vp120-speed-option.active {
    color: #4CAF50;
    font-weight: 600;
}

/* Plein écran */
.vp120-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    max-width: none;
    border-radius: 0;
    z-index: 999999;
}

.vp120-container.fullscreen .vp120-video {
    height: 100vh;
    object-fit: contain;
}

/* Message de reprise */
.vp120-resume-prompt {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 25px 35px;
    border-radius: 12px;
    text-align: center;
    z-index: 25;
}

.vp120-resume-prompt p {
    color: #fff;
    margin: 0 0 20px;
    font-size: 16px;
}

.vp120-resume-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.vp120-resume-yes,
.vp120-resume-no {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vp120-resume-yes {
    background: #4CAF50;
    color: #fff;
}

.vp120-resume-yes:hover {
    background: #45a049;
}

.vp120-resume-no {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.vp120-resume-no:hover {
    background: rgba(255,255,255,0.3);
}

/* Message d'erreur */
.vp120-error {
    color: #f44336;
    padding: 20px;
    text-align: center;
    background: #ffebee;
    border-radius: 8px;
}

/* Responsive */
@media (max-width: 600px) {
    .vp120-controls {
        padding: 30px 10px 8px;
    }

    .vp120-btn svg {
        width: 20px;
        height: 20px;
    }

    .vp120-time {
        font-size: 11px;
        padding: 0 5px;
    }

    .vp120-big-play {
        width: 60px;
        height: 60px;
    }

    .vp120-big-play svg {
        width: 30px;
        height: 30px;
    }

    .vp120-volume-container:hover .vp120-volume-slider {
        width: 60px;
    }

    .vp120-resume-prompt {
        padding: 20px;
        width: 90%;
    }

    .vp120-resume-buttons {
        flex-direction: column;
        gap: 10px;
    }
}
