* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #1a1a1a;
    font-family: Arial, sans-serif;
}

.video-container {
    position: relative;
    max-width: 900px;
    width: 100%;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 50px rgba(0,0,0,0.5);
}

#video {
    width: 100%;
    display: block;
}

.controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-container:hover .controls {
    opacity: 1;
}

.progress-container {
    width: 100%;
    height: 5px;
    background: rgba(255,255,255,0.2);
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 15px;
}

.progress-bar {
    height: 100%;
    background: #3b82f6;
    border-radius: 5px;
    width: 0%;
    transition: width 0.1s linear;
}

.controls-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.left-controls, .right-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

button {
    background: transparent;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    transition: transform 0.2s;
}

button:hover {
    transform: scale(1.1);
}

.time {
    color: white;
    font-size: 14px;
}

#volume {
    width: 80px;
    cursor: pointer;
}

input[type="range"] {
    accent-color: #3b82f6;
}
/* --- RESPONSIVE STYLES --- */

/* Tablettes et petits écrans (max 768px) */
@media (max-width: 768px) {
    .controls {
        padding: 15px;
    }
    
    /* Agrandir les cibles tactiles */
    button {
        padding: 12px;
        font-size: 24px;
    }
    
    #volume {
        width: 60px; /* Raccourcir le slider volume */
    }
}

/* Mobiles (max 480px) */
@media (max-width: 480px) {
    .controls-bottom {
        flex-wrap: wrap; /* Permettre le passage à la ligne si nécessaire */
        justify-content: center;
        gap: 10px;
    }

    .left-controls, .right-controls {
        width: 100%;
        justify-content: space-between; /* Distribuer l'espace */
    }

    /* Masquer les contrôles secondaires pour gagner de la place */
    #rewind, #forward, #volume {
        display: none;
    }
    
    /* Garder le bouton mute mais cacher le slider */
    .right-controls {
        justify-content: flex-end;
        gap: 20px;
    }

    /* Ajuster la taille du temps */
    .time {
        font-size: 12px;
        margin-left: auto; /* Pousser le temps vers la droite du groupe gauche */
    }

    /* Le bouton Play devient central et plus grand */
    #play-pause {
        font-size: 28px;
    }
}
