/* ########################### */
/* DANS style-realisation.css */
/* ########################### */

/* Conteneur principal */
.realisation-container.static-content {
    display: block !important;
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    text-align: center;
}

/* 1. Bloc de texte initial (Centré et Encadré) */
.texte {
    max-width: 800px;
    margin: 0 auto 40px auto;
    padding: 20px;
    background-color: #f0f8ff;
    border: 1px solid #004d99;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
    line-height: 1.6;
    font-size: 1.1em;
}

.texte br {
    display: none;
}

.images {
    display: block !important;
    margin: 0 auto;
    text-align: center;
}

/* 2. Style pour chaque installation (Ligne Flexbox) */
.realisation-item {
    display: flex;
    align-items: center;
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto 50px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.photo-container {
    flex: 1;
    /* Permet à la photo de prendre une taille équivalente à la légende */
    max-width: 50%;
    flex-shrink: 0;
}

.photo-container img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 5px;
}

.caption-container {
    flex: 1;
    max-width: 50%;
}

.caption-container h5 {
    margin: 0;
    font-size: 1.3em;
    color: #004d99;
    line-height: 1.5;
    text-align: left;
    /* Aligner le texte à gauche dans sa colonne */
}


/* 3. Alternance des blocs */

/* Image à GAUCHE : Ordre par défaut (image puis légende) */
.item-photo-left {
    flex-direction: row;
}

/* Image à DROITE : Inverser l'ordre (légende puis image) */
.item-photo-right {
    flex-direction: row-reverse;
    /* Inverse l'ordre des éléments Flex */
}

/* 4. Media Query (Smartphone : Empiler les éléments) */
@media (max-width: 768px) {

    .texte {
        max-width: 100%;
        text-align: left;
    }

    .realisation-item {
        /* Les deux configurations (gauche et droite) passent en colonne */
        flex-direction: column;
        align-items: center;
        gap: 15px;
        padding: 15px;
    }

    .photo-container,
    .caption-container {
        max-width: 100%;
        /* Les éléments prennent toute la largeur sur mobile */
    }

    .caption-container h5 {
        text-align: center;
        /* Centre le texte sous l'image */
        font-size: 1.1em;
    }
}