.sidebar-title {
    font-size: 1.8em;
    font-weight: 800;
    color: rgba(40, 143, 226, 1);
    margin-bottom: 40px;
    letter-spacing: 1px;
}

.sidebar-menu {
    width: 100%;
    text-align: left;
}

nav.sidebar-menu {
    padding: 0; /* Réinitialise le padding */
}

.parite-sidebar {
    flex: 0 0 280px;
    position: sticky;
    top: 280px;              /* distance depuis le haut */
    align-self: flex-start; /* IMPORTANT dans un layout flex */
    height: fit-content;
    margin-top: 130px;
    gap: 90px;
}

/* MENU LISTE */
.sidebar-menu ul {
    list-style: none;            /* supprime les puces */
    margin: 0;
    padding: 0px;         /* 🔸 retrait du contenu */
    width: 100%;
}

.sidebar-menu li {
    display: block;
    width: 100%;
    text-transform: none;
}

.sidebar-menu a {
    color: #707070;
    text-decoration: none;
    font-size: 1.1em;
    padding: 5px 0;
    transition: color 0.3s ease;
    text-align: left;
    display: block;
    text-transform: none;       /* ✅ casse normale */
    position: relative;         /* nécessaire pour le ::before */
}

.sidebar-menu a:hover {
    color: orange;
}

p{
    font-weight: 500 !important;
    font-size: 0.95rem !important;
    margin-bottom: 1.5rem !important;
    text-align: justify !important;
    color: gray !important;
    font-size: 18px !important;
    line-height: 1.5rem !important;
}
#description {
    scroll-margin-top: 150px;
}
#composition {
    scroll-margin-top: 150px;
}
#evenement-actualite {
    scroll-margin-top: 150px;
}
#liens-utiles {
    scroll-margin-top: 150px;
}

/* --- COLONNE DROITE --- */
.parity-content {
    flex: 1;
    width: 100%;
    box-sizing: border-box;
    margin-top: 40px;
}

.parity-content .two-columns {
    column-count: 2;
    column-gap: 3rem;
}

.parity-content .mission-list li {
    margin-bottom: 1rem;
    break-inside: avoid;
    font-size: 18px;
    color: gray;
    line-height: 1.5rem;
}

.mission-list {
    margin-bottom: 50px;
}
.missions-title .intro-text strong {
    font-weight: 600 !important; /* Force le gras */
    display: inline; /* S'assure qu'il reste sur la ligne */
    color: inherit; /* Pour qu'il garde la couleur du texte ou celle choisie */
}

/* ----- Membres --- */

#membres {
    margin-top: 60px;
}

.membres-grid {
    column-count: 3;
    column-gap: 30px; /* Réduit un peu l'écart si besoin */
    margin-top: 30px;
    margin-bottom: 30px;
    margin-left: 0;   /* Force l'alignement à gauche */
    margin-right: 0;  /* Force l'alignement à droite */
    padding: 0;       /* Supprime tout padding interne */
    width: 100%;
    box-sizing: border-box;
}

.membre-card {
    /* INDISPENSABLE : Empêche la carte de se couper en deux entre deux colonnes */
    break-inside: avoid;
    display: block; /* On repasse en block pour le flux de colonne */
    width: 100%;

    /* On remplace le 'gap' vertical par une marge basse */
    margin-bottom: 30px;
    box-sizing: border-box;
    background-color: #ffffff;
    padding: 15px;
    border-radius: 0 0 30px 0;
    /*box-shadow: 0 4px 14px rgba(0,0,0,0.08);*/
    border: 1px solid #707070;
    transition: transform 0.25s ease;

    /* On laisse le contenu respirer normalement */
    height: auto;
}

.membre-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 22px rgba(0,0,0,0.12);
}

.membre-card h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #278EE1;
    text-transform: none;
}

.membre-card h3::after {
    content: "";
    display: block;
    width: auto;
    height: 2px;
    background-color: #278EE1;
    margin: 10px 0 14px 0;
    border-radius: 2px;
}

.membre-card .nom {
    margin: 0 0 6px 0;
    font-weight: 600 !important;
    font-size: 0.95rem;
    color: #333;
}

.membre-card .dept {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #555;
}

/*///////////// Événements /////////////////*/
.titre-evenements {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(39, 143, 226, 1);
    margin-bottom: 20px;
}

.titre-evenements h1 {
    margin: 0;
}

.titre-evenements .line {
    position: relative;
    display: inline-block;
    font-size: 2rem;
    font-weight: 700;
    line-height: 2.5rem;
}

.titre-evenements .line::before {
    content: "";
    position: absolute;
    top: -12px;      /* 5px au-dessus du texte */
    left: 0;
    width: 100%;     /* s’arrête à la fin du span, donc premier N */
    height: 1px;
    background-color: #278FE2;
}

.titre-evenements .voir-plus a {
    color: rgba(39, 143, 226, 1);
    text-decoration: none;
    font-size: 0.8rem;
}

.titre-evenements .voir-plus a:hover {
    color: orange;
    font-weight: 600;
}

.titre-evenement p {
    font-size: 22px;
    font-weight: 500;
    color: rgba(39, 143, 226, 1);
    margin: 40px 0 10px 0;
    text-align: left;
    font-weight: 700;
}

.container-evenements {
    /*display: flex;*/
    /*flex-wrap: wrap;*/
    /*gap: 0;*/
    /*justify-content: flex-start;*/
    display: grid;
    /* On force 3 colonnes de taille égale */
    grid-template-columns: repeat(3, 1fr);
    gap: 20px; /* Réduit un peu le gap pour les petits écrans */
    width: 100%;
    font-family: 'Raleway', sans-serif;
}

.container-evenement {
    position: relative;
    /*flex: 0 0 400px;*/
    max-width: none;
    /*margin-right: 20px;*/
    box-sizing: border-box;
    background-color: rgba(248, 246, 242, 1);
    border-bottom-right-radius: 50px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
    height: 500px;
}

.container-evenement:hover {
    transform: translateY(-5px);
}

.image-evenement {
    position: relative;
    /* 1. Dimensions fixes (doit correspondre au conteneur parent) */
    /*width: 300px;*/
    /*height: 300px;*/

    height: 50%;        /* occupe 50% de la hauteur de la vignette */
    width: 100%;

    /* 2. Fond transparent (ou blanc, selon ce que vous souhaitez voir derrière l'image) */
    background-color: transparent;

    /* 3. Configuration Flexbox pour le centrage */
    display: flex;
    justify-content: center; /* Centre horizontalement */
    align-items: center;     /* Centre verticalement */

    /* 4. S'assurer que les images qui dépassent sont coupées */
    overflow: hidden;
}
.image-evenement img {
    /* Maintient le ratio de l'image et s'assure qu'elle est entièrement visible dans le conteneur */
    object-fit: contain;

    /* Limite la taille pour qu'elle ne dépasse jamais le conteneur */
    max-width: 100%;  /* Max 300px de large */
    max-height: 100%; /* Max 300px de haut */

    /* Pour annuler les styles en ligne qui pourraient étirer l'image */
    /*width: auto !important;*/
    /*height: auto !important;*/
    width: 100%;
    height: 100%;
    object-fit: cover;     /* remplissage complet avec recadrage si nécessaire */
    display: block;
}

/*.date-evenement {*/
/*    position: absolute;      !* Retire du flux et permet de superposer sur l'image *!*/
/*    top: 50%;                !* 50% depuis le haut du parent *!*/
/*    left: 50%;               !* 50% depuis la gauche *!*/
/*    transform: translate(-50%, -50%); !* centre horizontalement et verticalement *!*/

/*    !* Styles visuels *!*/
/*    background-color: rgba(39, 143, 226, 1); !* fond semi-transparent *!*/
/*    color: white;*/
/*    padding: 5px 10px;*/
/*    border-radius: 4px;*/
/*    z-index: 10;            !* devant l'image *!*/
/*    text-align: center;*/
/*    white-space: nowrap;     !* empêche le texte de passer à la ligne *!*/
/*    font-weight: bold;*/
/*    font-size: 0.9rem;*/
/*}*/


/*.date-evenement p {*/
/*    margin: 0; !* Important pour supprimer les marges par défaut des paragraphes *!*/
/*    font-size: 0.85rem;*/
/*    font-weight: bold;*/
/*    padding: 10px;*/
/*}*/
.date-evenement {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(39, 143, 226, 1);
    color: white;

    /* On fixe la hauteur ici */
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0 15px; /* On gère la largeur par le padding latéral uniquement */
    border-radius: 4px;
    z-index: 10;
    white-space: nowrap;
}

.date-evenement p {
    margin: 0 !important;    /* Annule les marges automatiques du thème */
    padding: 0 !important;   /* Annule les paddings automatiques */
    line-height: 1;          /* Évite que l'interligne n'augmente la hauteur */
    font-size: 0.85rem;
    font-weight: bold;
    color: white !important;
}
/* Contenu texte */
.contenu-evenement {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.desc-evenement p {
    font-weight: 400;
    color: rgba(112, 112, 112, 1);
    margin: 0 0 10px 0;
    flex: 1;
    text-align: left;
    font-family: "Roboto Light";
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;

    overflow: hidden;
    text-overflow: ellipsis;

    line-height: 1.4em;
    max-height: calc(1.4em * 3);
}

.contenu-evenement .voir-plus {
    font-size: 10px;
    color: rgba(39, 143, 226, 1);
    font-weight: 600;
    margin-top: 20px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.contenu-evenement .voir-plus:hover {
    color: orange;
    font-weight: 600;
    text-decoration: underline;
}

/* Navigation boutons événements */
.actualite-navigation,
.nav-btn {
    position: relative;
    z-index: 1;
}

.evenements-pagination {
    display: flex;
    justify-content: left;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding: 10px 0;
}

/* Liens pagination */
.evenements-pagination .page-num,
.evenements-pagination .nav-btn {
    text-decoration: none;
    font-family: Raleway, Regular;
    padding: 4px 6px;
    border: none;              /* 🔥 PAS D’ENCADREMENT */
    background: none;
    color: #0B2951;
    font-weight: 500;
    cursor: pointer;
}

/* Survol */
.evenements-pagination .page-num:hover,
.evenements-pagination .nav-btn:hover {
    color: #ff7a00; /* orange */
}

/* Flèches < et > plus grandes */
.evenements-pagination .nav-btn {
    font-size: 2.4rem;   /* ajuste si besoin : 1.3 / 1.5 / 1.6 */
    line-height: 2;
    font-weight: 400;
}

/* Actif (numéro sélectionné ou navigation) */
.evenements-pagination .page-num.active {
    color: #ff7a00; /* ORANGE */
    font-weight: 700;
}

/* Désactivé */
.evenements-pagination .nav-btn.disabled {
    opacity: 0.4;
    pointer-events: none;
}


#evenements {
    scroll-margin-top: 130px;
    margin-right: 40px;
    margin-bottom: 30px;
}

/* Conteneur deux colonnes */
.liens-utiles-grid {
    display: flex;
    gap: 40px; /* espace entre colonnes */
    flex-wrap: wrap;
}

/* Conteneur qui contient les deux blocs */
.parity-links-wrapper {
    display: flex;
    flex-wrap: wrap;       /* Permet de passer l'un sous l'autre sur mobile */
    gap: 40px;             /* Espace entre les deux colonnes */
    margin: 30px 0;
    align-items: flex-start;
}

/* On ajuste la largeur de chaque bloc pour qu'ils fassent environ 50% */
.parity-links-wrapper .download-content-layout {
    flex: 1;               /* Prend 50% de l'espace disponible */
    min-width: 300px;      /* Largeur minimum avant de passer à la ligne */
    margin-bottom: 0;      /* On enlève la marge du bas puisqu'ils sont côte à côte */
}

/* Style spécifique pour l'icône globe si c'est du FontAwesome */
.parity-links-wrapper .fa-globe {
    font-size: 50px;
    color: #092851;
    display: block;
}

.download-content-layout {
    margin-bottom: 30px;
    display: flex;
    align-items: center; /* Aligne l'icône verticalement avec le milieu de la liste */
    position: relative;
    padding: 25px 0;      /* Espace intérieur pour que le texte ne colle pas aux lignes */
    margin: 20px 0;       /* Espace extérieur entre les blocs */

    /* Ligne du haut */
    border-top: 1px solid #092851;

    /* Ligne du bas */
    border-bottom: 1px solid #092851;
}

/* On ajuste un peu l'icône pour qu'elle soit bien centrée entre les deux lignes */
.download-icon-block {
    display: flex;
    align-items: center;
    justify-content: center;
}

.web-links-layout .large-download-icon {
    /* Si tu veux ajuster spécifiquement l'icône globe */
    opacity: 0.8;
}

.outils-text {
    margin-top: 20px;
    font-style: italic;
    color: #666;
}

/* Style des liens pour qu'ils ressemblent à ceux de l'autre page */
.download-link-item {
    text-decoration: none;
    color: #092851;
    font-weight: 600;
    transition: color 0.2s;
}

.download-link-item:hover {
    color: #278FE2;
    text-decoration: underline;
}

.large-download-icon {
    /*font-size: 4em; !* grosse icône *!*/
    color: rgba(11, 41, 81, 1);
    transition: transform 0.3s ease, color 0.3s ease;
    vertical-align: middle;
    margin-right: 0;
    width: 80px; /* Ajuste la taille ici */
    height: auto;
    flex-shrink: 0;
}

.large-download-icon:hover {
    transform: scale(1.1);
    color: #f57c00;
}

.event-modal {
    display: none;
    position: fixed;
    z-index: 5000;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    padding: 30px;
}

.event-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-modal-content {
    position: relative;
    background: white;
    width: min(900px, 95vw);
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.35);
}

.event-modal-close {
    position: absolute;
    top: 12px;
    right: 18px;
    border: none;
    background: none;
    font-size: 36px;
    cursor: pointer;
    color: #333;
}

#eventModalImage {
    width: 100%;
    max-height: 420px;
    object-fit: contain;
    margin-bottom: 20px;
    border-radius: 8px;
}

.event-modal-date {
    font-weight: bold;
    margin-bottom: 10px;
    color: #16519C;
}

#eventModalTitle {
    margin-bottom: 15px;
}

#eventModalDesc {
    line-height: 1.6;
}

.event-modal-link {
    display: inline-block;
    margin-top: 20px;
    font-weight: bold;
    text-decoration: none;
}

@media (max-width: 768px) {
    .parity-content .two-columns {
        column-count: 1;
    }

    /* Aligne la sidebar et le contenu verticalement */
    .layout-flex {
        display: flex;
        flex-direction: column;
        margin: 10px 10px 100px 10px !important;
    }

    /* La sidebar prend toute la largeur et s'affiche en premier (ou selon l'ordre HTML) */
    .parite-sidebar {
        position: static !important; /* Annule le sticky */
        top: auto !important; /* Annule le décalage du haut */
        margin-top: 0 !important; /* Supprime la marge imposée */
        width: 100% !important; /* Prend toute la largeur */
        flex: none !important; /* Désactive les contraintes flex desktop */
        align-self: stretch; /* S'étire sur toute la largeur */
        margin-bottom: 60px;
    }

    .sidebar-menu ul {
        display: flex; /* Optionnel : mettre les liens côte à côte ? */
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px;
        justify-content: center;
    }

    /* Le contenu principal prend toute la largeur */
    .parity-content {
        width: 100% !important;
    }

    .parity-links-wrapper {
        display: flex;
        flex-direction: column; /* Empile les blocs Téléchargement et Web */
        gap: 20px;
    }

    .download-content-layout {
        width: 100%;
    }

    /* Pour la grille des membres */
    .membres-grid {
        display: grid;
        grid-template-columns: 1fr !important; /* Une seule carte par ligne */
        gap: 15px;
    }

    /* Ajustement des bannières bleues pour le mobile */
    .blue-banner h2 {
        font-size: 1.2rem;
        padding: 10px;
    }

    .container-evenements {
        /* On passe de 3 colonnes à 1 seule colonne */
        grid-template-columns: 1fr !important;

        /* On peut ajuster l'écart entre les tuiles si besoin */
        gap: 25px;

        /* On s'assure que le conteneur prend bien toute la largeur */
        width: 100%;
    }

    .container-evenement {
        /* Optionnel : on s'assure que chaque tuile occupe toute la largeur */
        display: block;
        width: 100%;
    }

    p {
        font-size: 14px !important;
    }

    .parity-content .mission-list li {
        font-size: 14px;
    }

    @media (max-width: 1024px) {
        .membres-grid {
            grid-template-columns: repeat(2, 1fr);
        }
    }

    @media (max-width: 600px) {
        .membres-grid {
            grid-template-columns: 1fr;
        }
    }
}