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

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

/* Conteneur principal */
.container {
    max-width: 1200px;
    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 + Image) --- */
.hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    margin-bottom: 60px;
}

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

.hero-text h1 {
    font-family: 'Bodoni Moda', serif;
    font-size: 7rem;
    font-weight: 400;
    line-height: 1;
}

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

.hero img {
    flex: 1;
    max-width: 400px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

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

.video-embed-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    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;
    margin: 0 auto;
    margin-right: 25%;
    max-width: 95%;
    color: white;
    text-decoration: none;
}

.bordered-box h3 {
    font-size: 2rem;
    margin-bottom: 15px;
    font-weight: 700;
    text-align: left;
}

/* --- 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;
    align-items: center;
}

.icons-container {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: 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));
}

.texte-projet {
    margin-top: 10px;
    margin-bottom: 10px;
    text-align: center;
    font-size: 1rem;
    margin-left: 0;
}

.project-btn {
    display: inline-block;
    background-color: #380710;
    color: white;
    text-decoration: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    margin-top: 10px;
}

.project-btn:hover {
    background-color: #550a18;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.4);
}

/* --- Footer Galerie en colonnes --- */
.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
    align-items: flex-start;
}

.gallery-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.gallery-column h1 {
    font-size: 1.5rem;
    margin: 0;
    line-height: 1.2;
}

.video-thumb {
    background-color: #ddd;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 8px;
    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;
}

.video-thumb[data-image-full]::after {
    display: none;
}

/* --- 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);
    justify-content: center;
    align-items: center;
}

.modal-box {
    background-color: #380710;
    width: 90%;
    max-width: 900px;
    padding: 30px;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 0 15px 5px #ff0000;
    border: 2px solid #ff0000;
}

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

.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;
}

.modal-video-container video,
.modal-video-container iframe {
    width: 100%;
    height: 100%;
    border-radius: 4px;
}

.modal-video-container video {
    object-fit: contain;
    display: block;
}

#modalImageDisplay {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: none;
}

.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 ========== */

/* Tablette large (1024px et moins) */
@media (max-width: 1024px) {
    .hero-text {
        padding-top: 80px;
    }
    
    .hero-text h1 {
        font-size: 5rem;
    }
    
    .hero-text h2 {
        font-size: 1.3rem;
    }
    
    .hero img {
        max-width: 350px;
    }
    
    .bordered-box p {
        font-size: 1.1rem;
        margin-right: 15%;
    }
    
    .bordered-box h3 {
        font-size: 1.8rem;
    }
    
    .gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .gallery-column h1 {
        font-size: 1.4rem;
    }
}

/* Tablette (900px et moins) */
@media (max-width: 900px) {
    body {
        padding: 15px;
    }
    
    header {
        margin-bottom: 30px;
    }
    
    .hero {
        flex-direction: column-reverse;
        gap: 30px;
        margin-bottom: 50px;
    }
    
    .hero-text {
        padding-top: 20px;
        width: 100%;
    }
    
    .hero-text h1 {
        font-size: 4rem;
    }
    
    .hero-text h2 {
        font-size: 1.2rem;
    }
    
    .hero img {
        max-width: 100%;
    }
    
    .contexte-video-wrapper {
        width: 100%;
        max-width: 100%;
    }
    
    .bordered-box {
        margin-bottom: 60px;
    }
    
    .bordered-box p {
        margin-right: 0;
        max-width: 100%;
    }
    
    .grid-section {
        grid-template-columns: 1fr;
        gap: 30px;
        margin-bottom: 30px;
    }
    
    .gallery {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* Mobile (768px et moins) */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    header {
        margin-bottom: 20px;
    }
    
    .btn-retour {
        padding: 7px 20px;
        font-size: 0.85rem;
    }
    
    .hero {
        margin-bottom: 40px;
        gap: 25px;
    }
    
    .hero-text h1 {
        font-size: 3.5rem;
    }
    
    .hero-text h2 {
        font-size: 1.1rem;
        margin-top: 8px;
    }
    
    .bordered-box {
        margin-bottom: 50px;
    }
    
    .bordered-box p {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    .bordered-box h3 {
        font-size: 1.6rem;
        margin-bottom: 12px;
    }
    
    .icons-container {
        gap: 12px;
    }
    
    .icon-img {
        width: 45px;
        height: 45px;
    }
    
    .texte-projet {
        font-size: 0.95rem;
        margin-top: 8px;
        margin-bottom: 8px;
    }
    
    .project-btn {
        font-size: 1rem;
        padding: 12px 35px;
    }
    
    .gallery {
        gap: 35px;
        margin-top: 40px;
    }
    
    .gallery-column h1 {
        font-size: 1.3rem;
    }
    
    /* Modal responsive */
    .modal-content {
        flex-direction: column;
    }
    
    .modal-box {
        padding: 40px 15px 15px 15px;
        max-width: 95%;
    }
    
    .modal-text-container {
        max-height: 200px;
        font-size: 0.9rem;
    }
    
    .close-btn {
        top: 10px;
        left: 10px;
        width: 32px;
        height: 32px;
        font-size: 20px;
    }
}

/* Mobile moyen (600px et moins) */
@media (max-width: 600px) {
    .hero-text h1 {
        font-size: 2.8rem;
    }
    
    .hero-text h2 {
        font-size: 1rem;
    }
    
    .bordered-box p {
        font-size: 0.95rem;
    }
    
    .bordered-box h3 {
        font-size: 1.4rem;
    }
    
    .icons-container {
        gap: 10px;
    }
    
    .icon-img {
        width: 40px;
        height: 40px;
    }
    
    .texte-projet {
        font-size: 0.9rem;
    }
    
    .project-btn {
        font-size: 0.95rem;
        padding: 10px 30px;
    }
    
    .gallery {
        gap: 30px;
    }
    
    .gallery-column h1 {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }
    
    .modal-box {
        padding: 35px 12px 12px 12px;
    }
    
    .modal-text-container {
        font-size: 0.85rem;
        line-height: 1.4;
    }
}

/* Petit mobile (400px et moins) */
@media (max-width: 400px) {
    body {
        padding: 8px;
    }
    
    .btn-retour {
        padding: 6px 18px;
        font-size: 0.8rem;
    }
    
    .hero-text h1 {
        font-size: 2.2rem;
    }
    
    .hero-text h2 {
        font-size: 0.9rem;
    }
    
    .bordered-box {
        margin-bottom: 40px;
    }
    
    .bordered-box p {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    .bordered-box h3 {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    
    .icons-container {
        gap: 8px;
    }
    
    .icon-img {
        width: 35px;
        height: 35px;
    }
    
    .texte-projet {
        font-size: 0.85rem;
        margin-top: 6px;
        margin-bottom: 6px;
    }
    
    .project-btn {
        font-size: 0.9rem;
        padding: 10px 25px;
    }
    
    .gallery {
        gap: 25px;
        margin-top: 30px;
    }
    
    .gallery-column {
        gap: 12px;
    }
    
    .gallery-column h1 {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }
    
    .modal-box {
        padding: 30px 10px 10px 10px;
        border-radius: 8px;
    }
    
    .modal-video-container {
        border-radius: 4px;
    }
    
    .modal-text-container {
        font-size: 0.8rem;
        max-height: 150px;
    }
    
    .close-btn {
        width: 28px;
        height: 28px;
        font-size: 18px;
        top: 8px;
        left: 8px;
    }
}