/* =========================================
   1. SECTION VIDÉO (.hybrid-video-section)
   ========================================= */
.hybrid-video-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Permet à la vidéo de prendre son propre écran complet */
    width: 100%;
}

.hybrid-video-section__container {
    display: flex;
    flex-direction: row;
    align-items: stretch; 
    justify-content: space-between;
    box-sizing: border-box;
    gap: 50px;
    margin-top: 175px;
    padding: 0 100px;
    width: 100%;
}

.hybrid-video-section__info {
    display: flex;
    flex-direction: column;
    justify-content: start;
    width: 40%; 
}

.hybrid-video-section__title {
    font-size: 3rem;
    line-height: 1; 
    margin-top: 0;  
    margin-bottom: 0;
}

.hybrid-video-section__description {
    width: 100%; 
    margin-top: 20px; 
    font-size: 20px; /* Harmonisation avec l'ancienne règle dupliquée */
    line-height: 1.8rem;
    letter-spacing: 2%;
}

.hybrid-video-section__contact-btn {
    margin-top: auto; 
    align-self: flex-start;
    margin-bottom: 10px; 
    font-size: 20px;
}

.hybrid-video-section__player {
    width: 60%; 
}

.hybrid-video-section__iframe {
    width: 100%;
    height: 100%; 
    aspect-ratio: 16 / 9; 
    border-radius: 30px;
}


/* =========================================
   2. SECTION GALERIE (.hybrid-gallery-grid)
   ========================================= */
.hybrid-gallery-grid {
    column-count: 4;
    column-gap: 10px;
    padding: 0px 150px;
    max-width: 1400px;
    margin: 75px auto;
}

.hybrid-gallery-grid__item {
    break-inside: avoid;
    margin-bottom: 10px;
    background-color: transparent; 
    border-radius: 1px; 
    overflow: hidden; 
}

.hybrid-gallery-grid__img {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0; 
    transform: translateY(50px) scale(0.1); 
    transition: opacity 0.5s ease, transform 0.5s ease, filter 0.5s ease;
    cursor: pointer;
}

.hybrid-gallery-grid__img--visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.hybrid-gallery-grid__img:hover {
    box-shadow: 0 0 30px rgb(255, 255, 255);
    filter: brightness(0.5);
}

@media (max-width: 1024px) { .hybrid-gallery-grid { column-count: 3; } }
@media (max-width: 1024px) {
    /* 1. On transforme le conteneur principal (<main>) en colonne */
    .hybrid-project-page {
        display: flex;
        flex-direction: column;
    }

    /* 2. On "efface" virtuellement toutes les boîtes parentes pour gérer les éléments 1 par 1 */
    .hybrid-video-section,
    .hybrid-video-section__container,
    .hybrid-video-section__info {
        display: contents;
    }

    /* 3. Ordre 1 : Le titre */
    .hybrid-video-section__title {
        order: 1;
        font-size: 2rem;
        margin-top: 150px; /* On recrée l'espace avec le header car le container a été effacé */
        padding: 0 20px;
    }

    /* 4. Ordre 2 : La description */
    .hybrid-video-section__description {
        order: 2;
        margin-top: 15px;
        padding: 0 20px;
        font-size: 15px;
        width: 90%;
        line-height: 23px;
    }

    /* 5. Ordre 3 : Le lecteur vidéo */
    .hybrid-video-section__player {
        order: 3;
        width: 100%;
        margin-top: 30px;
        padding: 0 20px;
        box-sizing: border-box; /* S'assure que le padding ne fait pas déborder la vidéo */
    }

    /* 6. Ordre 4 : La galerie */
    .hybrid-gallery-grid {
        order: 4;
        column-count: 2; /* Reprise de ton ancienne règle */
        column-gap: 10px;
        padding: 10px 20px;
        margin: 40px auto; 
    }

    /* 7. Ordre 5 : Le bouton de contact tout en bas */
    .hybrid-video-section__contact-btn {
        order: 5;
        margin: 0 auto 50px auto; /* On le centre avec des marges auto */
        align-self: center;
    }
}

/* Pour les très petits écrans (reprise de ton ancienne règle) */
@media (max-width: 480px) { 
    .hybrid-gallery-grid { column-count: 1; } 
}


/* =========================================
   3. LIGHTBOX HYBRIDE (.hybrid-lightbox)
   ========================================= */
.hybrid-lightbox {
    visibility: hidden;
    opacity: 0;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    touch-action: none; 
}

.hybrid-lightbox--active {
    visibility: visible;
    opacity: 1;
}

.hybrid-lightbox__img {
    max-width: 90%;
    max-height: 90vh;
    box-shadow: 0 0 20px rgba(255,255,255,0.1);
    border-radius: 4px;
    animation: zoomIn 0.3s;
}

/* Contrôles */
.hybrid-lightbox__close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    z-index: 1005;
    line-height: 40px;
}
.hybrid-lightbox__close-btn:hover { color: #bbb; }

.hybrid-lightbox__share-btn {
    position: absolute;
    top: 25px; 
    right: 80px; 
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 1005;
    color: white;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s ease;
}
.hybrid-lightbox__share-btn svg { width: 20px; height: 20px; }
.hybrid-lightbox__share-btn:hover { background-color: rgba(255, 255, 255, 0.4); transform: scale(1.1); }

.hybrid-lightbox__nav-btn {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 30px;
    transition: 0.3s ease;
    user-select: none;
    z-index: 1002;
}

.hybrid-lightbox__nav-btn--next { right: 0; border-radius: 3px 0 0 3px; }
.hybrid-lightbox__nav-btn--prev { left: 0; border-radius: 3px 0 0 3px; }
.hybrid-lightbox__nav-btn:hover { background-color: rgba(0, 0, 0, 0.8); }

/* =========================================
   4. MODALE DE PARTAGE (.hybrid-share-modal)
   ========================================= */
.hybrid-share-modal {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 25px;
    border-radius: 12px;
    width: 300px;
    text-align: center;
    z-index: 2000; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    color: #333;
}

.hybrid-share-modal--active {
    display: block;
    animation: popIn 0.3s ease;
}

.hybrid-share-modal__title { margin-top: 0; margin-bottom: 20px; font-size: 18px; }
.hybrid-share-modal__options { display: flex; flex-direction: column; gap: 10px; }
.hybrid-share-modal__option {
    display: block; padding: 12px; text-decoration: none; border-radius: 8px;
    font-weight: bold; font-size: 14px; transition: 0.2s; border: none;
    cursor: pointer; text-align: center;
}

.hybrid-share-modal__option--fb { background: #3b5998; color: white; }
.hybrid-share-modal__option--x { background: #000; color: white; }
.hybrid-share-modal__option--wa { background: #25D366; color: white; }
.hybrid-share-modal__option--copy { background: #f0f0f0; color: #333; border: 1px solid #ccc; }

.hybrid-share-modal__option:hover { opacity: 0.85; }

.hybrid-share-modal__close-btn {
    margin-top: 20px; background: transparent; border: none; color: #666;
    cursor: pointer; font-size: 13px; text-decoration: underline;
}

@media (max-width: 600px) {
    .hybrid-lightbox__share-btn { right: 60px; top: 20px; width: 35px; height: 35px; }
    .hybrid-lightbox__close-btn { right: 15px; }
    .hybrid-lightbox__nav-btn { font-size: 20px; padding: 10px; }
}

/* Animations de Slide gérées par le JS */
.slide-next { animation: slideInRight 0.3s ease-out; }
.slide-prev { animation: slideInLeft 0.3s ease-out; }