/* ============================================= */
/* STYLES GÉNÉRAUX DU SITE              */
/* ============================================= */

body, html {
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    background-color: #FAF5E6; 
    color: #004AAD; 
}

body {

}
/* ============================================= */
/* CONTENEUR POUR LE CONTENU PRINCIPAL           */
/* ============================================= */

/*
 On cible toutes nos sections de contenu principales pour les centrer
 et leur donner une largeur maximale pour que le texte reste lisible.
*/
.presentation, .institut-container, #calendrier-container, 
#archive-container, .layout-deux-colonnes {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    /* On ajoute un padding pour que le contenu ne touche pas les bords sur mobile */
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box; /* S'assure que le padding est inclus dans la largeur */
}

/* On fait de même pour les sections de la page d'accueil */
.upcoming-events .events-grid, 
.activities-showcase .activities-grid {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}
/* ============================================= */
/* EN-TÊTE ET NAVIGATION              */
/* ============================================= */

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background-color: transparent;
}

.logo {
    font-weight: bold;
    font-size: 1.2em;
    color: #FF6D4D; /* Logo en orange pour la cohérence du menu */
    line-height: 1.1;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.main-nav ul li {
    margin-left: 25px;
}

/* Ajout du séparateur "|" entre les éléments du menu */
.main-nav ul li:not(:first-child)::before {
    content: "|";
    margin-right: 25px;
    color: rgba(255, 109, 77, 0.5); /* Séparateur orange transparent */
}

.main-nav a {
    display: inline-block; /* Pour que la transformation (scale) fonctionne */
    text-decoration: none;
    color: #FF6D4D;
    font-weight: bold;
    font-size: 0.9em;
    transition: transform 0.2s ease-in-out;
}

/* Effet de grossissement au survol */
.main-nav a:hover {
    color: #FF6D4D;
    transform: scale(1.15);
}

/* ============================================= */
/* STYLES PAGE D'ACCUEIL                */
/* ============================================= */

.hero {
    background-image: url('image/BG-Homepage.jpg'); 
    height: 500px;
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
}

.hero-content {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 30px 50px;
    border-radius: 5px;
}

.hero-content h1 {
    font-size: 3em;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.5em;
    margin-top: 10px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.presentation {
    padding: 60px 40px;
    text-align: center;
    font-size: 1.1em;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

.presentation .join-us strong {
    color: #FF6D4D;
}
/* ============================================= */
/* STYLES DES NOUVELLES SECTIONS D'ACCUEIL     */
/* ============================================= */

/* Styles généraux pour les titres de section */
.section-title {
    text-align: center;
    font-size: 2.5em;
    color: #004AAD;
    margin-bottom: 50px;
}

/* Boutons */
.text-center {
    text-align: center;
    margin-top: 40px;
}

.bouton-secondaire {
    display: inline-block;
    background-color: transparent;
    color: #FF6D4D;
    padding: 12px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    border: 2px solid #FF6D4D;
    transition: background-color 0.3s, color 0.3s;
}

.bouton-secondaire:hover {
    background-color: #FF6D4D;
    color: white;
}

/* Section 3 : Prochains événements */
.upcoming-events {
    padding: 60px 20px;
    background-color: #fff;
}

.events-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.event-card-link {
    text-decoration: none;
    color: inherit;
}

.event-card-preview {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    padding: 20px;
    min-width: 300px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.event-card-preview:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.date-preview {
    text-align: center;
    margin-right: 20px;
    color: #FF6D4D;
}
.date-preview .day {
    font-size: 2.5em;
    font-weight: bold;
    display: block;
    line-height: 1;
}
.date-preview .month {
    text-transform: uppercase;
}

.title-preview h3 {
    margin: 0 0 5px 0;
    color: #004AAD;
}
.title-preview p {
    margin: 0;
    font-size: 0.9em;
    color: #666;
}

/* Section 4 : Activités */
.activities-showcase {
    padding: 60px 20px;
}

.activities-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    text-align: center;
}

.activity-card {
    flex-basis: 280px;
}

.activity-icon {
    font-size: 3em;
    margin-bottom: 20px;
    /* Vous pouvez remplacer les textes par de vraies icônes plus tard */
}

/* Section 5 : Témoignage */
.testimonial-section {
    background-color: #004AAD;
    color: white;
    padding: 80px 20px;
    text-align: center;
}

.testimonial-content {
    max-width: 700px;
    margin: 0 auto;
}

.testimonial-content blockquote {
    font-size: 1.5em;
    font-style: italic;
    border: none;
    margin: 0;
}

.testimonial-content cite {
    display: block;
    margin-top: 20px;
    font-weight: bold;
    opacity: 0.8;
}
/* ============================================= */
/* STYLES PAGE "L'INSTITUT"             */
/* ============================================= */

.institut-container {
    display: flex;
    gap: 40px;
    padding: 50px 40px;
}

.institut-texte {
    flex: 3;
    line-height: 1.7;
}

.institut-image {
    flex: 2;
    min-width: 300px;
}

.institut-texte h1 {
    font-size: 3.5em;
    color: #FF6D4D;
    margin-top: 0;
    margin-bottom: 30px;
}

.activites-liste {
    list-style-type: '✔  ';
    padding-left: 20px;
}

.institut-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.prochains-evenements {
    margin-top: 50px;
    padding: 25px;
    border: 2px solid rgba(0, 74, 173, 0.2);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.5);
}

.prochains-evenements h3 {
    color: #004AAD;
    margin-top: 0;
}
/* ============================================= */
/* STYLES POUR LISTES AVEC ICÔNES (PAGE INSTITUT) */
/* ============================================= */

.liste-a-icones {
  list-style-type: none; /* On supprime les puces par défaut */
  padding-left: 0;
}

.liste-a-icones li {
  display: flex; /* Aligne l'icône et le texte sur la même ligne */
  align-items: flex-start; /* Aligne le haut de l'icône avec le haut du texte */
  margin-bottom: 20px; /* Espace entre chaque ligne de la liste */
  line-height: 1.7;
}

.liste-a-icones .liste-icone {
  /* Définit la taille de votre icône (PNG ou SVG) */
  width: 20px;
  height: 20px;
  margin-right: 20px; /* Espace entre l'icône et le texte */
}


/* ============================================= */
/* PIED DE PAGE                  */
/* ============================================= */

.main-footer {
    text-align: center;
    padding: 20px;
    font-size: 0.8em;
    margin-top: 40px;
    color: #004AAD;
    border-top: 1px solid rgba(0, 74, 173, 0.15);
}

/* ============================================= */
/* ADAPTATION MOBILE (RESPONSIVE)      */
/* ============================================= */

@media (max-width: 900px) {
    /* Fait passer la page "Institut" sur une seule colonne */
    .institut-container {
        flex-direction: column;
    }
}
/* ============================================= */
/* STYLES PAGE CALENDRIER             */
/* ============================================= */
/* ============================================= */
/* STYLES POUR LES BANDEAUX DE TITRE      */
/* ============================================= */

.page-header {
    text-align: center; /* Centre bien le titre */
    padding: 40px 0;    /* Ajoute juste de l'espace au-dessus et en-dessous */
}

.page-header h1 {
    color: #FF6D4D;      /* Met le texte du titre en orange */
    margin: 0;
    font-size: 2.5em;
}


#calendrier-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.event-card {
    display: flex;
    background-color: #FFFFFF;
    border: 1px solid rgba(0, 74, 173, 0.2);
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    overflow: hidden; /* Pour que le border-radius s'applique bien */
}

.event-date-box {
    background-color: #FF6D4D;
    color: white;
    text-align: center;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 100px;
}

.event-day {
    font-size: 2.5em;
    font-weight: bold;
    line-height: 1;
}

.event-month {
    font-size: 1.2em;
    text-transform: uppercase;
    font-weight: bold;
}

.event-details {
    padding: 20px 25px;
}

.event-details h3 {
    margin-top: 0;
    color: #004AAD;
    font-size: 1.5em;
}

.event-details .event-info {
    font-size: 0.9em;
    color: #555;
    line-height: 1.6;
    border-left: 3px solid #FF6D4D;
    padding-left: 10px;
    margin-bottom: 15px;
}

.aucun-evenement {
    text-align: center;
    font-size: 1.2em;
    padding: 50px;
    color: #777;
}
/* Styles pour les boutons de tri */
.sort-controls {
    max-width: 900px;
    margin: 0 auto 20px auto;
    padding: 0 20px;
    text-align: right;
}

.sort-controls span {
    margin-right: 10px;
    font-weight: bold;
    color: #555;
}

.sort-btn {
    background-color: #fff;
    border: 1px solid #ddd;
    color: #333;
    padding: 5px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.sort-btn:hover {
    background-color: #f5f5f5;
}

.sort-btn.active {
    background-color: #004AAD;
    color: white;
    border-color: #004AAD;
}
/* ============================================= */
/* STYLES POUR LE SÉLECTEUR DE VUE DU CALENDRIER */
/* ============================================= */

.view-toggle {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    border: 2px solid #004AAD;
    border-radius: 8px;
    overflow: hidden;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.toggle-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background-color: #FFFFFF;
    color: #004AAD;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.toggle-btn:not(:last-child) {
    border-right: 2px solid #004AAD;
}

.toggle-btn.active {
    background-color: #FF6D4D;
    color: white;
}

.calendar-view.hidden {
    display: none;
}

/* Style spécifique pour la carte d'une permanence */
/* NOUVELLE VERSION */
.permanence-card .event-date-box {
    background-color: #004AAD; /* Fond bleu pour différencier */
    width: 130px; /* On force une largeur fixe */
    flex-shrink: 0; /* Empêche le bloc de se rétrécir */
}

/* On s'assure que le texte du jour ne sera jamais trop grand */
.permanence-card .permanence-day {
    font-size: 1.3em; 
    font-weight: bold;
    text-transform: uppercase;
}
/* ============================================= */
/* STYLES PAGE CONTACT                  */
/* ============================================= */

.layout-deux-colonnes {
    display: flex;
    gap: 40px;
    padding: 50px 40px;
}

.colonne-texte {
    flex: 2; /* Le texte prend 2 parts */
}

.colonne-visuels {
    flex: 3; /* Les visuels prennent 3 parts */
}

.colonne-texte h2 {
    color: #FF6D4D;
    border-bottom: 2px solid rgba(255, 109, 77, 0.2);
    padding-bottom: 10px;
}

.bouton-primaire {
    display: inline-block;
    background-color: #FF6D4D;
    color: white;
    padding: 12px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
}

.bouton-primaire:hover {
    background-color: #e65633;
}

.map-responsive {
    overflow: hidden;
    padding-bottom: 75%; /* Ratio 4:3 */
    position: relative;
    height: 0;
}

.map-responsive iframe {
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    position: absolute;
}


/* Adaptation mobile */
@media (max-width: 900px) {
    .layout-deux-colonnes {
        flex-direction: column-reverse; /* Les visuels passent en premier sur mobile */
    }
}
/* ============================================= */
/* STYLE POUR DESCRIPTION PLIABLE (CALENDRIER)   */
/* ============================================= */

.event-description {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    /* On ajoute un peu d'espace pour que le texte ne soit pas collé */
    margin: 0;
    padding: 0;
}

.event-description.is-expanded {
    max-height: 500px; /* Hauteur max suffisante pour la description */
    transition: max-height 0.4s ease-in;
}

.toggle-description {
    background: none;
    border: 1px solid #004AAD;
    color: #004AAD;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    font-weight: bold;
    font-family: 'Montserrat', sans-serif;
    transition: background-color 0.2s, color 0.2s;
}

.toggle-description:hover {
    background-color: #004AAD;
    color: white;
}
/* ============================================= */
/* STYLES PAGE ARCHIVES                          */
/* ============================================= */

#archive-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.archive-entry {
    background-color: #fff;
    padding: 25px 30px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.archive-entry h3 {
    color: #004AAD;
    font-size: 1.8em;
    margin-top: 0;
}

.archive-date {
    font-style: italic;
    color: #555;
    margin-top: -10px;
    margin-bottom: 20px;
}

.compte-rendu {
    line-height: 1.7;
    margin-bottom: 25px;
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.gallery-photo img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 5px;
    transition: transform 0.3s ease;
}

.gallery-photo img:hover {
    transform: scale(1.05);
}

.gallery-photo figcaption {
    font-size: 0.8em;
    text-align: center;
    color: #666;
    margin-top: 5px;
}
/* ============================================= */
/* STYLES PAGE ARCHIVES (VERSION BULLES)         */
/* ============================================= */

#archive-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

.archive-bubble {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background-color: #004AAD;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-size: cover;
    background-position: center;
    position: relative;
}

.archive-bubble:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.archive-bubble .bubble-overlay {
    background-color: rgba(0, 74, 173, 0.7);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.bubble-titre {
    font-weight: bold;
    font-size: 1.1em;
}

.bubble-date {
    font-size: 0.9em;
    opacity: 0.8;
    margin-top: 5px;
}

/* Styles pour la fenêtre modale */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    padding: 30px 40px;
    border-radius: 10px;
    width: 80%;
    max-width: 900px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2.5em;
    color: #aaa;
    cursor: pointer;
}

.modal-body {
    display: flex;
    gap: 30px;
}

.modal-texte {
    flex: 3;
}
.modal-photos {
    flex: 2;
}

#modal-titre {
    color: #FF6D4D;
    margin-top: 0;
}

/* Pour empêcher le scroll de la page en arrière-plan */
body.modal-open {
    overflow: hidden;
}
/* ============================================= */
/* CLASSE UTILITAIRE POUR CACHER DES ÉLÉMENTS    */
/* ============================================= */

.hidden {
  display: none !important;
}
/* ============================================= */
/* STYLES POUR LA LIGHTBOX PHOTO                 */
/* ============================================= */

.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  z-index: 1100; /* Doit être au-dessus de la modale */
  display: flex;
  justify-content: center;
  align-items: center;
  /* Effet de fondu */
  opacity: 1;
  transition: opacity 0.3s ease;
}

.lightbox-overlay.hidden {
  opacity: 0;
  pointer-events: none; /* Empêche les clics quand c'est caché */
}

.lightbox-content {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 3em;
  font-weight: bold;
  cursor: pointer;
}

/* On rend les images de la galerie cliquables */
.gallery-photo img {
    cursor: pointer;
}
