﻿.custom-rounded {
    border-radius: 12px;
}

.video-thumbnail-wrapper {
    cursor: pointer;
    position: relative;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0,0,0,0.5);
    border-radius: 50%;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.video-thumbnail-wrapper:hover .play-overlay {
    opacity: 1;
    pointer-events: auto;
}

.icon-play,
.icon-pause {
    transition: opacity 0.3s ease;
    width: 36px;
    height: 36px;
}

.icon-pause {
    display: none;
}

.loader {
    display: none;
    border: 4px solid #f3f3f3;
    border-top: 4px solid white;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Quand on clique (mode loading) */
.video-thumbnail-wrapper.loading .icon-play {
    display: none;
}

.video-thumbnail-wrapper.loading .icon-pause {
    display: none;
}

.video-thumbnail-wrapper.loading .loader {
    display: block;
}

/* Juste après clic, on affiche pause brièvement */
.video-thumbnail-wrapper.show-pause .icon-play {
    display: none;
}

.video-thumbnail-wrapper.show-pause .icon-pause {
    display: block;
}

.icon-play {
    transition: transform 0.3s ease, opacity 0.3s ease;
    width: 36px;
    height: 36px;
}

.icon-pause {
    display: none;
    width: 36px;
    height: 36px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.video-thumbnail-wrapper.clicked .icon-play {
    animation: zoomAndRotate 0.4s ease forwards;
}

@keyframes zoomAndRotate {
    0% {
        transform: scale(1) rotate(0deg);
    }

    50% {
        transform: scale(1.2) rotate(10deg);
    }

    100% {
        transform: scale(0.9) rotate(0deg);
    }
}
