/* Reset de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #4a0e1b; /* Rouge bordeaux sombre */
    color: white;
    font-family: 'Inter', sans-serif;
    display: flex;
    justify-content: center;
    padding: 20px;
}

/* Conteneur principal */
.container {
    max-width: 1200px; /* Largeur ajustée pour un meilleur rendu texte */
    width: 100%;
}

/* --- Bouton Retour --- */
header {
    margin-bottom: 40px;
}

.btn-retour {
    display: inline-block;
    border: 1px solid white;
    padding: 8px 25px;
    border-radius: 50px;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-retour:hover {
    background: white;
    color: #4a0e1b;
    transform: translateY(-2px);
}

/* --- Section Hero (Titre + Vidéo) --- */
.hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 50px;
}

.hero-text {
    flex: 1;
    padding-top: 100px;
}

.hero-text h1 {
    font-family: 'Bodoni Moda', serif;
    font-size: 5rem; /* Ajusté pour éviter que ça soit trop énorme */
    font-weight: 400;
    line-height: 1;
}

.hero-text h2 {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 1.5rem;
    margin-top: 5px;
}

.contexte-video-wrapper {
    flex: 1;
    max-width: 600px;
}

.video-embed-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* Ratio 16:9 */
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border-radius: 8px;
    overflow: hidden;
}

.video-embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* --- Styles pour les boîtes de texte (Description & Détails) --- */
.bordered-box {
    margin-bottom: 90px;}

.bordered-box p {
    font-size: 1.2rem;
    line-height: 1.6;        /* Texte aéré */
         /* Texte centré */
    margin: 0 auto;
    max-width: 95%;
    color: white;
    text-decoration: none;   /* Pas de soulignement */
}

.bordered-box h3 {
    font-size: 2rem;
    margin-bottom: 15px;
    font-weight: 700;
    text-align: left; /* Les titres restent alignés à gauche ou centre selon préférence */
}

/* --- Grille pour Détails et Outils --- */
.grid-section {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 30px;
    margin-bottom: 40px;
}

/* Styles Outils & Icônes */
.tools {
    display: flex;
    flex-direction: column;
}

.icons-container {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

.icon-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    transition: all 0.3s ease;
    cursor: pointer;
}

.icon-img:hover {
    transform: scale(1.15);
    filter: brightness(1.2) drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
}


/* --- Footer Galerie --- */
.gallery {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.video-thumb {
    background-color: #ddd;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 8px;
    background-image: url('https://placehold.co/600x400/333/888?text=Video+Click'); /* Image temporaire */
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255,255,255,0.2);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.video-thumb:hover {
    transform: scale(1.05);
    border-color: white;
}

/* --- Styles du Pop-up (MODAL) --- */
.modal-overlay {
    display: none; 
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px); /* Flou d'arrière-plan */
    justify-content: center;
    align-items: center;
}

.modal-box {
    background-color: #380710; /* Fond très sombre */
    width: 90%;
    max-width: 900px;
    padding: 30px;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 0 15px 5px #ff0000; /* Lueur rouge */
    border: 2px solid #ff0000;        /* Bordure rouge */
}

.modal-content {
    display: flex;
    gap: 20px;
    align-items: center;
}

/* Conteneur vidéo */
.modal-video-container {
    flex: 1.5;
    aspect-ratio: 16/9;
    background: black; /* Fond noir si la vidéo ne remplit pas tout */
    border-radius: 4px;
    overflow: hidden;
}

/* Cible la balise <video> au lieu de <iframe> */
.modal-video-container video {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Assure que toute la vidéo est visible sans être coupée */
    display: block;
}
.modal-video-container iframe {
    width: 100%;
    height: 100%;
    border-radius: 4px;
}

.modal-text-container {
    flex: 1;
    color: #fff;
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: justify;
    max-height: 300px;
    overflow-y: auto;
}

.close-btn {
    position: absolute;
    top: -15px;
    left: -15px;
    background-color: #ff0000;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 0 10px #ff0000;
    transition: transform 0.2s;
}

.close-btn:hover {
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        flex-direction: column-reverse;
        align-items: flex-start;
    }
    .contexte-video-wrapper {
        width: 100%;
        max-width: 100%;
    }
    .grid-section {
        grid-template-columns: 1fr;
    }
    .modal-content {
        flex-direction: column;
    }
    .modal-box {
        padding: 40px 15px 15px 15px;
    }
    .close-btn {
        top: 10px;
        left: 10px;
    }
}


/* Style de l'image dans le pop-up */
#modalImageDisplay {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: none;
}



/* SI c'est une image (data-image-full), on CACHE le triangle Play */
.video-thumb[data-image-full]::after {
    display: none;
}

.modal-video-container {
    flex: 1.5;
    aspect-ratio: 16/9;
    background: black;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gallery {
    display: flex;
    gap: 20px;
    margin-top: 50px;
    align-items: flex-start; /* Aligne tout vers le haut */
}

.gallery-column {
    flex: 1;          /* Force les 3 colonnes à avoir la même taille */
    min-width: 0;     /* Empêche les bugs d'affichage vidéo */
    display: flex;
    flex-direction: column;
    gap: 15px;        /* Espace entre le titre H1 et la vidéo/image */
}

/* On s'assure que les titres du footer soient propres */
.gallery-column h1 {
    font-size: 1.2rem;
    margin: 0;
    text-transform: uppercase;
}



/* Style et espacement du texte "projet de groupe" */
/* Style et espacement du texte "projet de groupe" */
/* Le conteneur parent */
.tools {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Aligne tous les éléments à gauche */
    text-align: left;        /* Aligne le texte à gauche */
}

/* Les icônes */
.icons-container {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    justify-content: flex-start; /* Force les icônes à gauche */
}

/* Le texte "Projet de groupe" */
.texte-projet {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1rem;
    margin-left: 0; /* On s'assure qu'il n'y a pas de décalage */
}

/* Le bouton */
.project-btn {
    display: inline-block;
    background-color: #380710;
    color: white;
    text-decoration: none;
    padding: 14px 40px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    transition: all 0.3s ease;
    /* On ne met pas de margin: auto pour qu'il reste à gauche */
}

/* Effet au survol (Hover) */
.project-btn:hover {
    background-color: #550a18; /* S'éclaircit légèrement au passage de la souris */
    transform: translateY(-2px); /* Petit saut vers le haut */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Effet au clic */
.project-btn:active {
    transform: translateY(0);
}