.product-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.8rem;
    box-shadow: 0 0.4rem 0.8rem rgba(0, 0, 0, 0.1);
    transition: opacity 0.3s ease;
}

.product-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
    border-radius: inherit;
}

/* Icône mobile pour déclencher la vidéo */
.mobile-video-trigger {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    cursor: pointer;
    z-index: 4;
    transition: all 0.3s ease;
    /* Améliorations pour iOS/mobile */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

.mobile-video-trigger:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.mobile-video-trigger.active {
    background: #3492f4;
    color: white;
}

.product-miniature-image {
    position: relative;
    overflow: hidden;
}

.product-miniature-image.has-video {
    cursor: pointer;
}

.product-miniature-image.has-video:hover .product-video-overlay {
    opacity: 1;
}

.product-miniature-image.has-video:hover .product-image {
    opacity: 0;
}

.product-video-overlay .product-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}


/* Styles pour les vidéos dans le slider produit */
.product-cover-item.video-item {
    position: relative;
}

.product-video-slider {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    height: 800px !important;
}

@media all and (max-width : 780px) {
    .product-video-slider {
        height: 125vw !important;
    }
}

.video-overlay-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.product-cover-item.video-item:hover .video-overlay-slider {
    opacity: 1;
}

.video-play-button {
    width: 6rem;
    height: 6rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    color: #3492f4;
    transition: all 0.3s ease;
}

.video-play-button:hover {
    background: white;
    transform: scale(1.1);
}

.video-badge-main {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 0.4rem;
    font-size: 1.2rem;
    font-weight: 500;
    z-index: 3;
}

/* Responsive */
@media (max-width: 768px) {
    .product-video {
        border-radius: 0.4rem;
    }
    
    .video-play-button {
        width: 4.8rem;
        height: 4.8rem;
        font-size: 1.8rem;
    }
    
    .video-badge-main {
        top: 0.5rem;
        left: 0.5rem;
        font-size: 1rem;
        padding: 0.3rem 0.6rem;
    }
}

/* Styles pour les vignettes vidéo */
.thumb-container.video-thumb {
    position: relative;
}

.video-thumbnail-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.video-thumb-preview {
    width: 100%;
    height: 152px;
    object-fit: cover;
    border-radius: 0.4rem;
}

@media (max-width: 980px) {
    .video-thumb-preview {
        height: 132px !important;
    }
}


@media (max-width: 480px) {
    .video-thumb-preview {
        height: 92px !important;
    }
}

.video-thumb-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 2rem;
    text-shadow: 0 0.2rem 0.4rem rgba(0, 0, 0, 0.7);
    pointer-events: none;
    z-index: 2;
}

.video-thumb-badge {
    position: absolute;
    top: 0.2rem;
    right: 0.2rem;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 0.2rem 0.4rem;
    border-radius: 0.2rem;
    font-size: 0.8rem;
    font-weight: 500;
    z-index: 3;
}

.thumb-container.video-thumb:hover .video-thumb-indicator {
    color: #3492f4;
    transform: translate(-50%, -50%) scale(1.1);
    transition: all 0.3s ease;
}

/* Affichage conditionnel selon le device */
@media all and (max-width: 980px) {
    /* Appareils tactiles (mobile/tablette) */
    .mobile-video-trigger {
        display: flex !important;
    }
}

@media all and (min-width: 980px) {
    /* Appareils avec souris (desktop) */
    .mobile-video-trigger {
        display: none !important;
    }
}

/* Responsive pour les vignettes */
@media (max-width: 768px) {
    .video-thumb-indicator {
        font-size: 1.6rem;
    }
    
    .video-thumb-badge {
        font-size: 0.7rem;
        padding: 0.1rem 0.3rem;
    }
    
    .mobile-video-trigger {
        width: 2.8rem;
        height: 2.8rem;
        font-size: 1.4rem;
        top: 0.6rem;
        right: 0.6rem;
    }
}

/* Spinner de chargement vidéo */
.video-loading-spinner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 5;
    border-radius: inherit;
}

.spinner-icon {
    width: 2.4rem;
    height: 2.4rem;
    border: 0.3rem solid rgba(255, 255, 255, 0.3);
    border-top: 0.3rem solid #3492f4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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