/* Video Bubble Custom - Styles */

.vbc-bubble {
    position: fixed;
    bottom: 30px;
    z-index: 9999;
    transition: all 0.3s ease;
}

.vbc-bubble.vbc-position-right {
    right: 30px;
}

.vbc-bubble.vbc-position-left {
    left: 30px;
}

/* État initial - Petite bulle */
.vbc-bubble-inner {
    width: 170px;
    height: 170px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.vbc-bubble-inner:hover {
    transform: scale(1.05);
}

.vbc-bubble-inner video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 3px solid #7FCDCA;
    border-radius: 50%;
    position: relative;
    z-index: 1;
}

/* TEXTE AU-DESSUS DE LA BULLE */
.vbc-bubble > .vbc-text-overlay {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 15px;
    background: #7FCDCA;
    color: #1a1a2e;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    width: 200px;
    max-width: 300px;
    word-wrap: break-word;
    line-height: 1.3;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

/* Cacher le texte quand la bulle est agrandie */
.vbc-bubble.expanded > .vbc-text-overlay {
    display: none;
}

.vbc-bubble > .vbc-close {
    position: absolute;
    top: -8px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #1a1a2e;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vbc-bubble:hover > .vbc-close {
    opacity: 1;
}

.vbc-bubble.expanded > .vbc-close {
    display: none;
}

/* État agrandi - Texte au-dessus */
.vbc-bubble-expanded {
    display: none;
    width: 380px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    position: relative;
}

.vbc-bubble.expanded .vbc-bubble-inner {
    display: none;
}

.vbc-bubble.expanded .vbc-bubble-expanded {
    display: block;
}

/* TEXTE AU-DESSUS DE LA VIDÉO */
.vbc-text-header {
    background: #7FCDCA;
    color: #1a1a2e;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.3px;
    line-height: 1.4;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.vbc-video-container {
    position: relative;
    width: 100%;
    height: 500px;
    background: #000;
}

.vbc-video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Contrôles personnalisés */
.vbc-custom-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    padding: 15px 12px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.vbc-video-container:hover .vbc-custom-controls {
    opacity: 1;
}

.vbc-play-pause {
    background: none;
    border: none;
    color: #1a1a2e;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.vbc-play-pause:hover {
    color: #1a1a2e;
}

.vbc-progress-container {
    flex: 1;
    height: 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

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

.vbc-progress-filled {
    height: 100%;
    background: #7FCDCA;
    width: 0%;
    transition: width 0.1s linear;
}

.vbc-time {
    color: #fff;
    font-size: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    display: flex;
    gap: 4px;
    align-items: center;
    flex-shrink: 0;
}

.vbc-separator {
    opacity: 0.6;
}

.vbc-volume-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.vbc-volume-btn {
    background: none;
    border: none;
    color: #1a1a2e;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vbc-volume-btn:hover {
    color: #1a1a2e;
}

.vbc-volume-slider {
    width: 60px;
    height: 4px;
    -webkit-appearance: none;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    outline: none;
}

.vbc-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #7FCDCA;
    border-radius: 50%;
    cursor: pointer;
}

.vbc-volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #7FCDCA;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.vbc-close-expanded {
    position: absolute;
    top: -40px;
    right: 5px;
    background: none;
    border: none;
    color: #1a1a2e;
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 999999;
    display: none;
    padding: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.vbc-bubble.expanded .vbc-close-expanded {
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .vbc-bubble-inner {
        width: 140px;
        height: 140px;
    }
    
    .vbc-bubble-expanded {
        width: 340px;
    }
    
    .vbc-video-container {
        height: 450px;
    }
    
    .vbc-text-header {
        font-size: 15px;
        padding: 12px 16px;
    }
}

@media (max-width: 480px) {
    .vbc-bubble {
        bottom: 20px;
    }
    
    .vbc-bubble.vbc-position-right {
        right: 20px;
    }
    
    .vbc-bubble.vbc-position-left {
        left: 20px;
    }
    
    .vbc-bubble-inner {
        width: 120px;
        height: 120px;
    }
    
    .vbc-bubble-expanded {
        width: 300px;
    }
    
    .vbc-video-container {
        height: 400px;
    }
}

/* Masquer les contrôles indésirables */
video::-webkit-media-controls-fullscreen-button {
    display: none !important;
}

video::-webkit-media-controls-picture-in-picture-button {
    display: none !important;
}

video::-webkit-media-controls-download-button {
    display: none !important;
}

/* Firefox */
video::-moz-media-controls-fullscreen-button {
    display: none !important;
}

/* Masquer le menu vitesse de lecture et les 3 points */
video::-webkit-media-controls-overflow-button {
    display: none !important;
}

video::-webkit-media-controls-overflow-menu-button {
    display: none !important;
}

video::-webkit-media-controls-toggle-closed-captions-button {
    display: none !important;
}

/* Forcer masquage des contrôles overflow */
.vbc-video-expanded::-webkit-media-controls-overflow-button,
.vbc-video-expanded::-webkit-media-controls-overflow-menu-button {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
}
