/* Entete */
.entete {
    padding: 0.5%;
    text-align: center;
    background-color:#161c2d;
}

/* 🔹 MENU PRINCIPAL */
.mainMenu {
    list-style: none;
    padding: 10px 20px;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #13132c69;
    flex-wrap: wrap; /* Permet le passage en colonne sur petits écrans */
}

.mainMenu li {
    margin: 0 3%;
    position: relative;
    text-align: center; /* Centre le texte et l'image */
}

.mainMenu li img {
    display: block;
    margin: 10px auto 5px; /* Centre l'image et ajoute un espace */
    max-width: 100%;
    max-height: 16.5em; /* Taille ajustée */
    height: auto;
    border-radius: 8px;
}

.mainMenu #bouttonA {
    padding: 8px 12px;
    color: #eeeeee;
    text-decoration: none;
    display: block;
    font-weight: bold;
    font-size: clamp(1rem, 4vw, 1.6rem);
}

.mainMenu #bouttonA:hover {
    background-color: #ffffff;
    color: #060735; /* Couleur au survol */
    border-radius: 5px;
    transition: background-color 0.3s;
}

/* Conteneur principal */
.conteneur {
    display: flex;               /* Active Flexbox */
    justify-content: space-between; /* Ajoute de l'espace entre les sections */
    align-items: stretch;        /* Les sections s'étirent pour avoir la même hauteur */
    gap: 20px;                   /* Espacement entre les sections */
    padding: 1.5em;
}

/* 🔹 Blocs */
.box {
    background-color: #2a2a2a;
    padding: 1.5em;
    border-radius: 10px;
    box-shadow: 0px 2px 4px rgba(255, 255, 255, 0.08);
    text-align: center;
    flex: 1; /* Chaque bloc prend la moitié de l'espace */
}

.box img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

.box p {
    margin-bottom: 1em;
}

/* 🔹 Grand bloc pour les projets */
.joinUsProjets {
    display: flex;
    align-items: center;
    gap: 20px;
    background-color: #2a2a2a;
    box-shadow: 0px 2px 4px rgba(255, 255, 255, 0.08);
    padding: 1.5rem;
    margin: 0 auto 2em;
    max-width: 90%;
    border-radius: 10px;
}

.joinUsProjets img {
    width: 40%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 10px;
}

.joinUsProjets div {
    flex: 1; /* Prend tout l'espace restant */
    text-align: center;
}

.joinUsProjets h2 {
    font-size: 1.8rem;
    padding-bottom: 1em;
}

/* 🔹 Section news */
.lastNews {
    max-width: 1400px;
    margin: auto;
    gap: 20px;
    padding: 10px;
    background-color: #2a2a2a;
    border-radius: 10px;
    box-shadow: 0px 4px 8px rgba(255, 255, 255, 0.1);
    text-align: center;
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 4 colonnes égales */
    grid-template-rows: repeat(3, auto);
    grid-template-areas: 
    "h2 h2 h2"
    "art evnt agd"
    "art conf reu";
}

.lastNews h2 {
    grid-area: h2;
    font-size: 2rem;
    color: #ffffff;
    margin-bottom: 20px;
}

.lastNews #reu-activites {
    grid-area: reu;
}

.lastNews #last-articles {
    grid-area: art;
}

.lastNews #futur-event {
    grid-area: evnt;
}

.lastNews #futur-conf {
    grid-area: conf;
}

.lastNews #agenda {
    grid-area: agd;
}


/* 🔹 Blocs individuels */
.lastNews > div {
    background: #191919;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 2px 4px rgba(255, 255, 255, 0.08);
    text-align: left;
}

/* 🔹 Titres */
.lastNews h3 {
    font-size: 1.4rem;
    color: #ffffff;
    margin-bottom: 10px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 5px;
}

/* 🔹 Listes */
.lastNews ul {
    list-style-type: none;
    padding: 0;
}

.lastNews li {
    padding: 10px 0;
    border-bottom: 1px solid #444;
}

.lastNews li h4 {
    font-size: 1.2rem;
    color: #f4f4f4;
    margin: 0;
}

/* 🔹 Liens */
.lastNews a {
    text-decoration: none;
    color: #007bff;
    font-weight: bold;
}

.lastNews a:hover {
    text-decoration: underline;
}

/* 🔹 Table de l'agenda */
#agenda table {
    width: 100%;
    border-collapse: collapse;
}

#agenda th, #agenda td {
    padding: 10px;
    border: 1px solid #444;
    text-align: left;
}

#agenda th {
    background: #007bff;
    color: white;
}


/*Section "About"*/
.about {
    text-align: left;
    display: block;
    padding: 1% 6% 1%;
    margin-top: 1.5em;
    background: #222222;
    text-align: left;
}

.bureau {
    display: flex;
    justify-content: center;
    background-color: #333333;
    padding: 1rem 1rem 0rem 1rem;
    border-radius: 1rem;
    text-align: center;
}

.bureau td {
    padding-bottom: 1rem;
}

.bureau img {
    max-width: 11rem;
    border-radius: 1rem;
}

/* 🔹 Responsive Design */
@media (max-width: 768px) {
    /* 🎯 Adaptation du menu pour mobile */
    .mainMenu {
        text-align: center;
        padding: 15px 0;
    }

    .mainMenu li {
        margin-bottom: 10px;
    }

    .mainMenu li img {
        width: 200px; /* Réduction de la taille des images sur mobile */
    }

    .mainMenu a {
        font-size: medium;
    }

    .conteneur {
        display: block;
    }

    .box {
        margin-bottom: 1em;
    }

    .joinUsInscriptionDiscord {
        flex-direction: column;
        gap: 20px;
    }

    .joinUsProjets {
        flex-direction: column;
        text-align: center;
    }

    .joinUsProjets img {
        width: 100%;
        max-height: 200px;
    }

    .joinUsProjets h2 {
        font-size: larger;
        text-align: left;
        margin-bottom: 15px;
    }

    .lastNews {
        display: block;
        margin: 0 1em;
        background-color: #1e1e1ea0;
    }

    #agenda, #futur-conf, #futur-event, #last-articles {
        margin: 1em;
    }

    .bureau {
        display: block;
    }
}

@media (max-width: 480px) {
    h2 {
        font-size: 1.2rem;
    }

    .ctaButton {
        font-size: 0.9rem;
        padding: 10px 15px;
    }

    .mainMenu li img {
        width: 150px; /* Encore plus petit sur très petits écrans */
    }
}

/* 🌌 Fond étoilé animé */
@keyframes twinkling {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}

.stars {
    position: fixed;
    width: 100%;
    height: 100%;
    background: transparent;
    overflow: hidden;
    top: 0;
    left: 0;
    z-index: -1;
}

.star {
    position: absolute;
    width: 3px;
    height: 3px;
    background: white;
    border-radius: 50%;
    opacity: 0.3;
    animation: twinkling 1.5s infinite alternate ease-in-out;
}

/* Génération aléatoire des étoiles */
.star:nth-child(odd) {
    animation-duration: 1.5s;
}

.star:nth-child(even) {
    animation-duration: 2.5s;
}