/* Styles spécifiques pour la page montage */

/* Fond d'écran spécifique pour la page montage */
body {
    position: relative;
}

/* Fond d'écran PC (par défaut pour les écrans de plus de 400px) */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('./IMG/Foncpcmontage.webp'); /* Chemin vers votre image PC */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1; /* En arrière-plan */
}

/* Styles pour le titre principal */
.montage-title {
    text-align: left;
    margin-top: 120px;
    margin-bottom: 30px;
    padding: 0 20px 0 40px;
    position: relative;
    z-index: 10;
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
}

.montage-title h1 {
    font-family: "Bebas Neue", sans-serif;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
    font-size: 60px;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    display: inline-block;
    transition: color 0.3s ease;
}

.montage-title h1:hover {
    color: rgba(97, 0, 206, 0.8);
}

/* Container principal pour l'organisation */
.montage-container {
    display: block;
    width: 100%;
    max-width: 1600px;
    margin: 30px auto 40px;
    padding: 0 20px;
    position: relative;
    z-index: 5;
}

/* Boîte en verre (effet frosted glass) */
.glass-box {
    flex: none;
    width: 80%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: height 0.3s ease;
}

/* Liste des clients */
.client-list {
    list-style: none;
    padding: 0;
    margin-bottom: 40px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.client-list li {
    font-family: "Bebas Neue", sans-serif;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
    font-size: 28px;
    letter-spacing: 1px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: color 0.3s ease;
    padding: 10px 15px;
}

.client-list li:hover {
    color: rgba(97, 0, 206, 0.8);
    cursor: pointer;
}

/* ================ CARROUSEL ET GRILLE ================ */

/* Conteneur du carrousel avec les flèches */
.carousel-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease;
}

/* Masquer les flèches de navigation pour toutes les tailles d'écran */
.carousel-arrow {
    display: none !important;
}

/* Carrousel/Mosaïque d'images */
.image-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    grid-gap: 20px;
    position: relative;
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
    transition: all 0.5s ease;
}

.carousel-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 180px;
    display: block !important;
    opacity: 1 !important;
    transform: scale(1) !important;
    cursor: pointer;
}

.carousel-item:hover {
    transform: translateY(-5px) scale(1.02) !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.3s ease;
}

.carousel-item:hover img {
    filter: brightness(1.1);
}

/* ================ LECTEUR VIDÉO INTÉGRÉ ================ */

/* Conteneur pour le lecteur vidéo - CORRIGÉ */
.video-player-container {
    width: 100%;
    margin-top: 20px;
    transition: all 0.5s ease;
    display: none; /* Caché par défaut */
}

/* En-tête du lecteur vidéo avec bouton retour */
.video-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

/* Bouton retour au carrousel */
.back-button {
    display: flex;
    align-items: center;
    background: rgba(97, 0, 206, 0.7);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 15px;
    font-family: "Bebas Neue", sans-serif;
    font-size: 18px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-button:hover {
    background: rgba(97, 0, 206, 0.9);
    transform: translateY(-2px);
}

.back-button svg {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

/* Wrapper pour le lecteur vidéo (ratio 16:9) - CORRIGÉ */
.video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    background-color: #000; /* Ajout d'un fond noir pour les vidéos */
}

/* Animation pour les transitions */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.fade-in {
    animation: fadeIn 0.5s forwards;
}

.fade-out {
    animation: fadeOut 0.5s forwards;
}

/* Responsive design */
@media (max-width: 900px) {
    .montage-title {
        margin-top: 100px;
        padding: 0 20px;
    }
    
    .montage-title h1 {
        font-size: 45px;
    }
    
    .glass-box {
        width: 90%;
        padding: 30px;
    }
    
    .client-list li {
        font-size: 24px;
    }
    
    .image-carousel {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        grid-gap: 15px;
    }
    
    .carousel-item {
        height: 150px;
    }
    
    .back-button {
        font-size: 16px;
        padding: 8px 12px;
    }
}

@media (max-width: 600px) {
    .montage-title {
        margin-top: 80px;
    }
    
    .montage-title h1 {
        font-size: 36px;
    }
    
    .glass-box {
        width: 95%;
        padding: 20px;
    }
    
    .client-list {
        gap: 10px;
    }
    
    .client-list li {
        font-size: 20px;
        padding: 8px 12px;
    }
    
    /* Ajustement du carrousel pour mobile */
    .image-carousel {
        grid-template-columns: 1fr 1fr;  /* Deux colonnes sur mobile */
        grid-gap: 10px;
    }
    
    .carousel-item {
        height: 120px;
    }
    
    .back-button {
        font-size: 14px;
        padding: 6px 10px;
    }
    
    .back-button svg {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 400px) {
    /* Fond d'écran mobile */
    body::before {
        background-image: url('./IMG/Fonmobilemontage.webp'); /* Chemin vers votre image mobile */
    }
    
    .montage-title {
        margin-top: 70px;
    }
    
    .montage-title h1 {
        font-size: 28px;
        letter-spacing: 1px;
    }
    
    .glass-box {
        padding: 15px;
    }
    
    .client-list li {
        font-size: 18px;
        padding: 5px 10px;
    }
    
    /* Ajustements pour les très petits écrans */
    .image-carousel {
        grid-gap: 8px;
    }
    
    .carousel-item {
        height: 100px;
    }
}

/* Améliorations pour l'intégration Twitter/X */
.tweet-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: transparent !important;
    padding: 0 !important;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 15px;
    min-height: 500px;
}

/* Style pour le conteneur d'iframe Twitter */
.twitter-tweet-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    margin: 0 auto;
}

/* Correction pour les iframes Twitter */
.video-wrapper iframe.twitter-tweet {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 auto !important;
    max-width: 550px !important;
}

/* Correction spécifique pour les tweets affichés - CORRIGÉ */
.twitter-tweet-rendered {
    margin: 0 auto !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 550px !important; /* Limitation de la largeur maximale pour un meilleur rendu */
}

/* Correction pour le message de chargement */
.tweet-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 300px;
    margin: 0 auto;
}

/* Style pour l'erreur de chargement des tweets */
.tweet-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 200px;
    background-color: rgba(245, 248, 250, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    margin: 0 auto;
}

/* Amélioration du bouton pour voir sur X */
.tweet-view-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 12px 24px;
    background-color: #1da1f2;
    color: white;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
}

.tweet-view-btn:hover {
    background-color: #0c7abf;
}

/* Ajustement pour le mode mobile */
@media (max-width: 600px) {
    .tweet-container {
        min-height: 400px;
    }
    
    .video-wrapper {
        min-height: 450px;
    }
    
    /* Style d'adaptation pour les petits écrans */
    .twitter-tweet-container {
        width: 100%;
        max-width: 100%;
    }
}

/* Style pour l'icône de lecture */
.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(97, 0, 206, 0.7);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.play-icon svg {
    width: 30px;
    height: 30px;
}

.carousel-item:hover .play-icon {
    background-color: rgba(97, 0, 206, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}