/* Fond général */
body {
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    color: #ffffff;
    font-family: 'Orbitron', sans-serif;
    text-align: center;
    margin: 0;
    margin-top: 30px;
    padding: 0;
}

/* Loader */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0f2027;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    font-size: 1.5rem;
}

/* Stream vidéo */
.stream-wrapper {
    position: relative;
    display: inline-block;
    margin-top: 30px;
    max-width: 90%;
    width: 100%;
}

.camera-stream {
    width: 100%;
    max-width: 1000px;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
    transition: transform 0.3s ease;
}

.camera-stream:hover {
    transform: scale(1.02);
}

/* Bouton plein écran */
#fullscreenBtn {
    position: absolute;
    bottom: 15px;
    right: 70px;
    background-color: rgba(0, 0, 0, 0.6);
    border: 1px solid #00ffff;
    color: #00ffff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.3s ease, border 0.3s ease;
}

#fullscreenBtn:hover {
    background-color: rgba(0, 255, 255, 0.2);
    border-color: #00c6ff;
}

/* Footer */
footer {
    margin-top: 50px;
    padding: 20px;
    font-size: 0.9rem;
    color: #cccccc;
}

/* Progress Bar */
#progress-container {
    position: relative;
    width: 90%;
    max-width: 600px;
    height: 30px;
    background-color: #2c2c2c;
    border-radius: 15px;
    overflow: hidden;
    margin: 20px auto;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

#progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00c6ff, #0072ff);
    transition: width 0.4s ease;
}

#progress-text {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-weight: bold;
    line-height: 30px;
    font-family: Arial, sans-serif;
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stream-wrapper {
        margin-top: 20px;
    }

    .camera-stream {
        width: 95%;
    }

    #progress-container {
        width: 90%;
    }

    #fullscreenBtn {
        right: 10px;
        bottom: 10px;
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    #progress-text {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    #fullscreenBtn {
        right: 5px;
        bottom: 5px;
        padding: 5px 8px;
        font-size: 0.7rem;
    }

    #progress-text {
        font-size: 0.8rem;
    }
}
