/* Styles spécifiques pour mobile */
@media screen and (max-width: 1023px) {
    .section-projects {
        padding-top: 250px;
    }

    .video-carousel {
        height: auto;
        transform: none;
        perspective: none;
        margin: 0;
        padding: 0;
    }

    .video-container {
        transform: none !important;
        position: static;
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 100px;
        padding: 20px;
    }

    .video-item {
        position: relative !important;
        transform: none !important;
        width: 100%;
        max-width: none;
        display: block;
        margin: 0;
        opacity: 0;
        transform: translateY(50px) !important;
        transition: opacity 0.5s ease, transform 0.5s ease;
        will-change: transform, opacity;
    }

    .video-item.visible {
        opacity: 1;
        transform: translateY(0) !important;
    }

    /* Style alterné pour les vidéos */
    .video-item:nth-child(odd) {
        align-self: flex-start;
        width: 85%;
    }

    .video-item:nth-child(even) {
        align-self: flex-end;
        width: 85%;
    }

    /* Style spécial pour la première vidéo */
    .video-item:first-child {
        align-self: center;
        width: 90%;
    }

    .video-wrapper {
        width: 100%;
        border-radius: 15px;
        overflow: hidden;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        position: relative;
        background-color: #f5f5f5;
        aspect-ratio: 16/9;
    }

    .video-wrapper.vertical-video {
        aspect-ratio: 9/16;
    }

    .video-wrapper video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 15px;
        opacity: 0;
        transition: opacity 0.3s ease;
        background-color: transparent;
    }

    .video-wrapper video.loaded {
        opacity: 1;
    }

    /* Thumbnail styles */
    .video-thumbnail {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 15px;
        z-index: 1;
        opacity: 1;
        transition: opacity 0.3s ease;
        background-color: #f5f5f5;
    }

    .video-thumbnail.hidden {
        opacity: 0;
    }

    /* Play button overlay */
    .play-button {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 60px;
        height: 60px;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 2;
        transition: transform 0.3s ease, background-color 0.3s ease;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }

    .play-button::before {
        content: '';
        width: 0;
        height: 0;
        border-style: solid;
        border-width: 12px 0 12px 20px;
        border-color: transparent transparent transparent #000;
        margin-left: 4px;
    }

    .play-button:hover {
        transform: translate(-50%, -50%) scale(1.1);
        background: rgba(255, 255, 255, 1);
    }

    .play-button.hidden {
        opacity: 0;
        pointer-events: none;
    }

    /* Masquer les contrôles du carousel */
    .carousel-controls {
        display: none !important;
    }

    /* Masquer la réflexion */
    .video-reflection {
        display: none;
    }
}

/* Ajustements supplémentaires pour différentes tailles d'écran mobile */
@media screen and (max-width: 1023px) and (max-height: 700px) {
    .section-projects {
        padding-top: 220px;
    }
}

@media screen and (max-width: 1023px) and (min-height: 800px) {
    .section-projects {
        padding-top: 280px;
    }
}

@media screen and (max-width: 380px) {
    .section-projects {
        padding-top: 200px;
    }
}

/* Styles pour l'indicateur de chargement */
.video-wrapper.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5) url('Anim chargement.gif') center center no-repeat;
    background-size: 50px;
    border-radius: 15px;
    z-index: 3;
} 