/* DRIP Video Tutorial - Styles */

/* Variables par défaut (surchargeables via inline styles) */
#drip-video-tutorial-wrapper {
    --primary-color: #000000;
    --accent-color: #D4AF37;
}

/* ========================================
   BOUTON FLOTTANT
   ======================================== */

#drip-video-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9998;
    
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--accent-color);
    background: var(--primary-color);
    color: var(--accent-color);
    
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#drip-video-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.4);
}

#drip-video-btn:active {
    transform: scale(0.95);
}

#drip-video-btn .play-icon {
    width: 28px;
    height: 28px;
    transition: transform 0.3s ease;
}

#drip-video-btn:hover .play-icon {
    transform: scale(1.1);
}

/* Tooltip */
#drip-video-btn .btn-tooltip {
    position: absolute;
    right: 70px;
    background: var(--primary-color);
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#drip-video-btn .btn-tooltip::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: var(--primary-color);
}

#drip-video-btn:hover .btn-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Animation pulse subtile pour attirer l'attention */
@keyframes drip-pulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(212, 175, 55, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 0 10px rgba(212, 175, 55, 0);
    }
}

#drip-video-btn.pulse {
    animation: drip-pulse 2s ease-in-out 3;
}

/* ========================================
   BULLE D'AIDE
   ======================================== */

#drip-help-bubble {
    position: fixed;
    bottom: 90px;
    right: 24px;
    z-index: 9997;
    
    background: var(--primary-color);
    color: #fff;
    padding: 12px 40px 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--accent-color);
    
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    font-weight: 500;
    
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    
    transform-origin: bottom right;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Petite flèche pointant vers le bouton */
#drip-help-bubble::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 24px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid var(--primary-color);
}

#drip-help-bubble::before {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 23px;
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 9px solid var(--accent-color);
}

/* États de la bulle */
#drip-help-bubble.drip-bubble-hidden {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8) translateY(10px);
    pointer-events: none;
}

#drip-help-bubble.drip-bubble-visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

/* Animation d'entrée */
@keyframes drip-bubble-bounce {
    0% {
        opacity: 0;
        transform: scale(0.5) translateY(20px);
    }
    50% {
        transform: scale(1.05) translateY(-5px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

#drip-help-bubble.drip-bubble-entering {
    animation: drip-bubble-bounce 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Bouton fermer de la bulle */
#drip-help-bubble .bubble-close {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    
    width: 22px;
    height: 22px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 50%;
    
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    
    display: flex;
    align-items: center;
    justify-content: center;
    
    transition: all 0.2s ease;
}

#drip-help-bubble .bubble-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

#drip-help-bubble .bubble-text {
    display: block;
}

/* ========================================
   LIGHTBOX
   ======================================== */

#drip-video-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

#drip-video-lightbox.drip-lightbox-hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

#drip-video-lightbox.drip-lightbox-visible {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

/* Overlay sombre */
.drip-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    transition: opacity 0.3s ease;
}

#drip-video-lightbox.drip-lightbox-hidden .drip-lightbox-overlay {
    opacity: 0;
}

/* Contenu */
.drip-lightbox-content {
    position: relative;
    max-width: 900px;
    width: 100%;
    background: #111;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
}

#drip-video-lightbox.drip-lightbox-visible .drip-lightbox-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Bouton fermer */
.drip-lightbox-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.drip-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.drip-lightbox-close svg {
    width: 20px;
    height: 20px;
}

/* Container vidéo */
.drip-video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.drip-video-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Titre sous la vidéo */
.drip-video-title {
    padding: 16px 20px;
    background: linear-gradient(135deg, #111 0%, #1a1a1a 100%);
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.drip-video-title span {
    font-size: 18px;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    #drip-video-btn {
        width: 54px;
        height: 54px;
        bottom: 20px;
        right: 16px;
    }
    
    #drip-video-btn .play-icon {
        width: 24px;
        height: 24px;
    }
    
    #drip-video-btn .btn-tooltip {
        display: none;
    }
    
    #drip-help-bubble {
        right: 16px;
        bottom: 82px;
        font-size: 13px;
        padding: 10px 36px 10px 14px;
    }
    
    #drip-video-lightbox {
        padding: 10px;
    }
    
    .drip-lightbox-content {
        border-radius: 12px;
    }
    
    .drip-lightbox-close {
        top: 8px;
        right: 8px;
        width: 36px;
        height: 36px;
    }
    
    .drip-video-title {
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* Éviter conflit avec d'autres boutons flottants (WhatsApp, etc.) */
@media (max-width: 480px) {
    #drip-video-btn {
        bottom: 90px; /* Au-dessus du bouton WhatsApp si présent */
    }
    
    #drip-help-bubble {
        bottom: 152px;
        max-width: calc(100vw - 32px);
    }
}
