/**
 * Styles pour la caméra Foscam Live
 */

.foscam-camera-container {
    max-width: 900px;
    margin: 20px auto;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.foscam-camera-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.foscam-camera-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.foscam-video-wrapper {
    position: relative;
    background: #000;
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.foscam-stream {
    width: 100%;
    height: auto;
    display: block;
}

.foscam-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

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

@keyframes foscam-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.foscam-controls {
    padding: 15px 20px;
    background: #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.foscam-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #333;
}

.foscam-status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #22c55e;
    animation: foscam-pulse 2s infinite;
}

.foscam-status-indicator.offline {
    background: #ef4444;
    animation: none;
}

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

.foscam-reconnect-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.foscam-reconnect-btn:hover {
    background: #5568d3;
}

.foscam-reconnect-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.foscam-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 15px 20px;
    margin: 0;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .foscam-camera-container {
        margin: 10px;
        border-radius: 5px;
    }
    
    .foscam-camera-header h3 {
        font-size: 20px;
    }
    
    .foscam-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .foscam-reconnect-btn {
        width: 100%;
    }
    
    .foscam-video-wrapper {
        min-height: 250px;
    }
}

/* Intégration avec thèmes WordPress communs */
.foscam-camera-container * {
    box-sizing: border-box;
}

.foscam-camera-container img {
    max-width: 100%;
    height: auto;
}
