/**
 * VDO.ninja Dashboard - Frontend Styles
 */

/* Réinitialisation des styles pour le dashboard */
.vdo-ninja-dashboard * {
    box-sizing: border-box;
}

/* Container principal */
.vdo-ninja-dashboard {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
}

/* Icônes personnalisées */
.vdo-icon {
    font-size: 18px;
    display: inline-block;
}

/* Animation de chargement */
@keyframes vdo-loading {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.vdo-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: vdo-loading 0.8s linear infinite;
}

/* Tooltips */
.vdo-tooltip {
    position: relative;
}

.vdo-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    font-size: 12px;
    white-space: nowrap;
    border-radius: 4px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    margin-bottom: 5px;
}

.vdo-tooltip:hover::after {
    opacity: 1;
}

/* Transitions douces */
.vdo-control-btn,
.vdo-chat-toggle,
.vdo-btn-close {
    transition: all 0.3s ease;
}

/* Focus pour l'accessibilité */
.vdo-control-btn:focus,
.vdo-chat-toggle:focus,
button:focus {
    outline: 2px solid #6441a5;
    outline-offset: 2px;
}

/* États de chargement */
.vdo-video-container.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border: 4px solid rgba(100, 65, 165, 0.3);
    border-radius: 50%;
    border-top-color: #6441a5;
    animation: vdo-loading 1s linear infinite;
    z-index: 10;
}

/* Message d'erreur */
.vdo-error {
    background: #ff4444;
    color: white;
    padding: 15px;
    border-radius: 5px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.vdo-error::before {
    content: '⚠️';
    font-size: 24px;
}

/* Message de succès */
.vdo-success {
    background: #00c851;
    color: white;
    padding: 15px;
    border-radius: 5px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.vdo-success::before {
    content: '✅';
    font-size: 24px;
}

/* Info message */
.vdo-info {
    background: #33b5e5;
    color: white;
    padding: 15px;
    border-radius: 5px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.vdo-info::before {
    content: 'ℹ️';
    font-size: 24px;
}

/* Badge de notification */
.vdo-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #ff4444;
    color: white;
    border-radius: 10px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 5px;
}

/* Liste des invités (pour mode director) */
.vdo-guests-list {
    background: #2c2c2c;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.vdo-guest-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: #1a1a1a;
    border-radius: 5px;
    margin-bottom: 10px;
    color: white;
}

.vdo-guest-name {
    font-weight: bold;
}

.vdo-guest-controls {
    display: flex;
    gap: 5px;
}

.vdo-guest-controls button {
    padding: 5px 10px;
    background: #444;
    border: 1px solid #666;
    border-radius: 3px;
    color: white;
    cursor: pointer;
    font-size: 12px;
}

.vdo-guest-controls button:hover {
    background: #555;
}

/* Stats en temps réel */
.vdo-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.vdo-stat-item {
    background: #2c2c2c;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    color: white;
}

.vdo-stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #6441a5;
}

.vdo-stat-label {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

/* Mode compact pour petit écran */
@media (max-width: 480px) {
    .vdo-ninja-dashboard {
        padding: 10px;
    }

    .vdo-controls {
        justify-content: center;
    }

    .vdo-control-btn {
        flex: 1 1 auto;
        min-width: 0;
    }

    .vdo-control-btn span {
        font-size: 20px;
    }

    .vdo-control-volume {
        width: 100%;
        order: 10; /* Placer en dernier */
    }
}

/* Mode sombre forcé */
@media (prefers-color-scheme: dark) {
    .vdo-ninja-dashboard {
        background: #0e0e10;
    }

    .vdo-alerts-container {
        background: #18181b;
    }
}

/* Impression */
@media print {
    .vdo-ninja-dashboard {
        display: none;
    }
}

/* Animations d'entrée */
@keyframes vdo-slide-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vdo-ninja-dashboard > * {
    animation: vdo-slide-in 0.5s ease-out;
}

/* Gestion du fullscreen */
.vdo-video-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: #000;
}

.vdo-video-container.fullscreen iframe {
    height: 100vh !important;
}

/* Bouton fullscreen */
.vdo-fullscreen-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    z-index: 100;
}

.vdo-fullscreen-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* Indicateur de qualité */
.vdo-quality-indicator {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 5px;
    color: white;
    font-size: 12px;
    z-index: 100;
}

.vdo-quality-indicator.good {
    border-left: 3px solid #00ff00;
}

.vdo-quality-indicator.medium {
    border-left: 3px solid #ffaa00;
}

.vdo-quality-indicator.poor {
    border-left: 3px solid #ff0000;
}

/* Mode picture-in-picture */
.vdo-pip-btn {
    padding: 8px 12px;
    background: #2c2c2c;
    border: 2px solid #444;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.vdo-pip-btn:hover {
    background: #3c3c3c;
}

/* Scrollbar personnalisée pour le chat */
.vdo-chat-section::-webkit-scrollbar {
    width: 8px;
}

.vdo-chat-section::-webkit-scrollbar-track {
    background: #18181b;
}

.vdo-chat-section::-webkit-scrollbar-thumb {
    background: #6441a5;
    border-radius: 4px;
}

.vdo-chat-section::-webkit-scrollbar-thumb:hover {
    background: #7d5bbe;
}
