/* Réinitialisation de base pour une cohérence entre navigateurs */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

/* Conteneur principal */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* En-tête */
header {
    background: #E1B051;
    color: #fff;
    padding: 20px 0;
    text-align: center;
}

.title-left, .title-right {
    display: inline-block;
    vertical-align: middle;
}

.title-left {
    font-size: 24px;
    color: #004D99; /* Bleu titre */
    margin-right: 20px;
}

.title-right {
    font-size: 20px;
    /* color: #FF8C00;  Orange */
}

/* Mise en page en trois colonnes avec Flexbox */
.main-content {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
}

.column {
    flex: 1;
    max-width: 100%;
}

.left, .right {
    flex-basis: 25%; /* Ajustez selon le contenu */
}


.middle {
    flex-grow: 2; /* Pour lui donner deux fois plus d'espace à grandir que les autres colonnes */
    flex-basis: 45%; /* Garder cette valeur */
}


/* Barre latérale */
aside {
    background: #ECE9D8;
    padding: 20px;
}

aside img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 20px;
}

aside h3 {
    color: #004D99;
    border-bottom: 2px solid #FF8C00;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

/* Programme et Prix */
.program h4, .prizes h4 {
    color: #004D99;
    margin: 20px 0 10px;
}

.program ul, .prizes ul {
    list-style-type: none;
    padding-left: 0;
        display: block; 
}

.program li, .prizes li {
    background: #f9f9f9;
    margin-bottom: 10px;
    padding: 5px 10px;
    border-left: 4px solid #FF8C00;
}

/* Contenu principal */
.section-content {
    overflow: hidden; /* Contient le float de l'image */
}

.justified-text {
    text-align: justify;
}

.image-gallery {
    display: flex;
    gap: 1px; /* Espace entre les images */
    overflow-x: auto; /* Permet le défilement horizontal si nécessaire */
}

.image-gallery img {
    max-height: 90px; /* Définissez ici la hauteur maximale */
    height: auto; /* Garde le ratio d'aspect */
    width: auto; /* Ajuste la largeur pour conserver le ratio */
    flex: 1 0 auto; /* Permet aux images de se redimensionner uniformément */
    object-fit: cover; /* Pour s'assurer que l'image couvre tout l'espace sans déformation */
}

.image-gallery-100 img {
 /*   max-height: 100px;  Définissez ici la hauteur maximale */
 /*   height: auto;  Garde le ratio d'aspect */
    width: 100%; /* Ajuste la largeur pour conserver le ratio */
    flex: 1 0 auto; /* Permet aux images de se redimensionner uniformément */
    object-fit: cover; /* Pour s'assurer que l'image couvre tout l'espace sans déformation */
}

/* Pour rendre la galerie responsive */
@media screen and (max-width: 768px) {
    .image-gallery {
        flex-wrap: nowrap; /* Empêche les images de passer à la ligne */
    }
    .image-gallery img {
        flex: 0 0 auto; /* Empêche les images de s'étirer, nécessaire pour le défilement horizontal */
    }
}

/* Galerie */
.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.gallery figure {
    flex-basis: calc(33.33% - 10px);
    margin-bottom: 10px;
}

.gallery img {
  /*  width: 100%; */
  /*  height: auto; */
    width: 100%;
    height: 100%;
    max-height: 50px;
    max-width: 50%;    
}

.gallery figcaption {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* Articles */
article {
    margin-bottom: 30px;
}

article h2 {
    color: #004D99;
    margin-bottom: 10px;
    margin: revert;
}

article h3 {
    color: #004D99;
    margin-bottom: 10px;
    margin: revert;
}

.article li {
    background: #f9f9f9;
    margin-bottom: 10px;
    padding: 5px 10px;
    border-left: 4px solid #FF8C00;
}

.article-image {
    float: left;
    margin-right: 20px;
/*    width: 120px; */
    height: auto;
}


.text-and-image {
    display: flex;  /* Utilise Flexbox pour aligner les éléments côte à côte */
    align-items: center; /* Centre les éléments verticalement */
    gap: 20px; /* Ajoute un espace entre l'image et le texte */
}

.side-image {
    /* Dimensionnez votre image comme nécessaire */
    width: 150px; /* Par exemple, si vous voulez une largeur fixe */
    height: auto; /* Garde le ratio d'aspect de l'image */
}

.side-text {
    flex: 1; /* Permet au texte de prendre le reste de l'espace disponible */
}


/* Contenu de la colonne droite */
.side-content h3 {
    color: #004D99;
    margin-bottom: 10px;
}

.side-content p {
    margin-bottom: 15px;
}

.separator {
    border: 0;
    height: 1px;
    background: #ccc;
    margin: 20px 0;
}

.media-links .media-item {
    margin-bottom: 20px;
    text-align: center;
}

.media-links img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
}

.media-links a {
    text-decoration: none;
    color: #333;
}

.media-links a:hover {
    text-decoration: underline;
}

/* Pied de page */
footer {
    background: #E1B051;
    color: #fff;
    text-align: center;
    padding: 15px 0;
    clear: both;
}

/* Media queries pour la responsivité */
@media screen and (max-width: 1024px) {
    .left, .middle, .right {
        flex-basis: 100%;
    }
}

@media screen and (max-width: 768px) {
    .gallery figure {
        flex-basis: calc(50% - 10px);
    }
}

@media screen and (max-width: 480px) {
    .gallery figure {
        flex-basis: 100%;
    }
    
    .article-image {
        float: none;
        width: 100%;
        margin: 0 0 20px 0;
    }
}


/* Section des sponsors */
.sponsors {
    margin-bottom: 30px;
}


.sponsor-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.sponsor-item-yes {
/*    display: flex; */
    margin-bottom: 5px;
    background: #f9f9f9;
    padding: 5px 10px; 
    border-left: 4px solid #FF8C00;
    align-items: flex-start;
    width: 100%;
    text-align: left;
}

.sponsor-item-no {
/*    display: flex; */
    margin-bottom: 5px;
    background: #f9f9f9;
    padding: 5px 10px;
    border-left: 4px solid #312f2d;
    align-items: flex-start;
    text-align: left;
    width: 100%;
}

.sponsor-link {
    color: #333;
    text-decoration: none;
}

.sponsor-link:hover {
    text-decoration: underline;
}


/* Section des affiches */
.sponsor-posters {
    margin-top: 30px;
}


.poster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 20px;
}

.poster-item {
    text-decoration: none;
}

.poster-image {
    width: 100%;
    height: auto;
    border: 1px solid #ddd;
    transition: transform 0.3s ease;
}

.poster-image:hover {
    transform: scale(1.05);
}

/* Pour les écrans plus petits */
@media (max-width: 600px) {
    .sponsor-list {
        flex-direction: column;
    }

    .sponsor-item {
        border-left: none;
        border-bottom: 4px solid #FF8C00;
    }

    .poster-grid {
        grid-template-columns: 1fr;
    }
}