
/* Styles Généraux */
:root {
    --primary-color: #0056b3; /* Bleu MSP */
    --secondary-color: #f8f9fa; /* Gris clair */
    --accent-color: #28a745; /* Vert pour les boutons/liens */
    --text-color: #333;
    --light-text-color: #666;
    --white: #fff;
    --dark-blue: #003d80;
    --primarys-color: #3498db; /* Bleu */
    --secondarys-color: #2c3e50; /* Gris foncé */
    --text-color-light: #ecf0f1; /* Gris très clair */
    --text-color-dark: #333; /* Gris foncé pour le texte */
    --hover-color: #2980b9; /* Bleu plus foncé */
}

/* Navbar générale */
.navbar {
  font-family: Poppins, sans-serif;
    background-color: var(--secondarys-color);
    color: var(--text-color-light);
    padding: 15px 0;
    position: fixed; /* Rendre la navbar fixe en haut */
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000; /* Assurer qu'elle est au-dessus du contenu */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo/Brand */
.navbar-brand {
    width: 200px;
}
.navbar-brand img{
    width: 100%;
    height: 100%;
}

/* Menu principal */
.navbar-menu {
    flex-grow: 1; /* Permet au menu de prendre l'espace disponible */
    display: flex;
    justify-content: flex-end; /* Aligne les éléments à droite */
}

.navbar-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex; /* Pour aligner les éléments de menu horizontalement */
}

.nav-item {
    position: relative; /* Nécessaire pour le positionnement du dropdown */
    margin-left: 30px; /* Espacement entre les éléments du menu */
}
.nav-item a{
    color: #fff;
}

.nav-link {
    color: var;
    text-decoration: none;
    padding: 10px 0;
    display: block;
    font-size: 1.1em;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primarys-color);
}

/* Dropdown menu */
.dropdown-menu {
    display: none; /* Cache le menu déroulant par défaut */
    position: absolute;
    background-color: var(--secondarys-color);
    min-width: 180px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    top: 100%; /* Place le dropdown juste en dessous du nav-link */
    left: -10px; /* Ajustement léger pour l'alignement */
    border-top: 3px solid var(--primarys-color);
    animation: fadeIn 0.3s ease-out; /* Animation à l'apparition */
}

.nav-item.dropdown:hover .dropdown-menu {
    display: block; /* Affiche le menu déroulant au survol */
}

.dropdown-item {
    color: var(--text-color-light);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 1em;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.dropdown-item:hover {
    background-color: var(--hover-color);
    color: var(--text-color-light);
}

/* Icône de flèche pour le dropdown */
.dropdown-toggle .fas.fa-caret-down {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

/* Rotate arrow on hover for dropdown */
.nav-item.dropdown:hover .dropdown-toggle .fas.fa-caret-down {
    transform: rotate(180deg);
}

/* Toggler (Bouton Hamburger) pour mobile */
.navbar-toggler {
    background: none;
    border: none;
    color: var(--text-color-light);
    font-size: 1.8em;
    cursor: pointer;
    display: none; /* Caché sur desktop */
    outline: none;
}

/* Styles Responsives (Media Queries) */
@media screen and (max-width: 768px) {
    .navbar-toggler {
        display: block; /* Affiche le hamburger sur mobile */
    }

    .navbar-menu {
        display: none; /* Cache le menu par défaut sur mobile */
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 60px; /* Sous la navbar */
        left: 0;
        background-color: var(--secondarys-color);
        box-shadow: 0 8px 16px rgba(0,0,0,0.2);
        overflow: hidden; /* Pour l'animation de hauteur */
        max-height: 0; /* Pour l'animation de slide up/down */
        transition: max-height 0.4s ease-out; /* Animation du menu mobile */
    }

    .navbar-menu.active {
        display: flex; /* Affiche le menu quand actif */
        max-height: 500px; /* Valeur suffisante pour contenir tout le menu */
    }

    .navbar-nav {
        flex-direction: column;
        width: 100%;
        padding: 10px 0;
    }

    .nav-item {
        margin-left: 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .nav-item:last-child {
        border-bottom: none;
    }

    .nav-link {
        padding: 15px 20px;
        text-align: left;
    }

    /* Dropdown sur mobile */
    .nav-item.dropdown .dropdown-menu {
        position: s; /* Retire le positionnement absolu sur mobile */
        width: 100%;
        background-color: rgba(44, 62, 80, 0.9); /* Légèrement transparent */
        box-shadow: none;
        border-top: none;
        animation: none; /* Pas d'animation fade in sur mobile */
        max-height: 0; /* Pour le slide des sous-menus */
        transition: max-height 0.3s ease-out;
        overflow: hidden;
    }

    /* Afficher le dropdown mobile quand son parent est actif */
    .nav-item.dropdown.active .dropdown-menu {
        max-height: 300px; /* Assurez-vous que c'est assez grand */
    }

    .dropdown-item {
        padding-left: 40px; /* Indentation pour les sous-éléments */
    }

    .nav-item.dropdown:hover .dropdown-menu {
        display: flex; /* Désactiver le hover sur mobile */
    }
    

     .dropdown-toggle .fas.fa-caret-down {
        float: right; /* Aligner la flèche à droite sur mobile */
        margin-right: 20px;
        line-height: inherit; /* Alignement vertical */
    }

    .nav-item.dropdown.active .dropdown-toggle .fas.fa-caret-down {
        transform: rotate(180deg);
    }
}

/* Animation fadeIn pour le dropdown desktop */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f2f5; /* Un gris plus doux */
    color: #333;
    line-height: 1.6;
}

header {
    background-color: #28a745; /* Vert vibrant */
    color: white;
    padding: 1.5rem 0;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-top: 60px; /* Pour éviter que le header ne soit caché par la navbar fixe */
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
}

main {
    padding: 20px;
    max-width: 1200px;
    margin: 30px auto;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.08);
}

.gallery-section {
    margin-bottom: 50px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.gallery-section h2 {
    text-align: center;
    color: #0056b3; /* Bleu foncé */
    margin-bottom: 30px;
    font-size: 2rem;
    position: relative;
}

.gallery-section h2::after { /* Petite ligne décorative */
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: #28a745;
    margin: 10px auto 0;
    border-radius: 2px;
}

/* Styles pour la grille d'images */
.image-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Colonnes responsives */
    gap: 20px; /* Espace plus généreux entre les images */
    padding: 10px;
}

.image-grid-container a {
    display: block;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none; /* Enlève le soulignement des liens */
}

.image-grid-container a:hover {
    transform: translateY(-8px); /* Effet de léger soulèvement */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.image-grid-container img {
    width: 100%;
    height: 220px; /* Hauteur fixe pour toutes les miniatures */
    object-fit: cover; /* Assure que l'image remplit l'espace en recadrant si besoin */
    display: block;
    transition: transform 0.3s ease;
}

.image-grid-container a:hover img {
    transform: scale(1.05); /* Léger zoom sur l'image au survol */
}

/* Styles pour la section vidéo */
.video-container {
    display: flex;
    flex-wrap: wrap; /* Permet aux vidéos de passer à la ligne */
    justify-content: center;
    gap: 25px; /* Espace entre les vidéos */
    padding: 10px;
}

.video-container iframe {
    width: 100%; /* Par défaut, occupe toute la largeur du conteneur */
    max-width: 560px; /* Taille maximale pour une vidéo */
    height: 315px; /* Hauteur standard pour un ratio 16:9 */
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.video-container iframe:hover {
    transform: scale(1.02);
}

footer {
    text-align: center;
    padding: 25px;
    background-color: #333;
    color: white;
    margin-top: 50px;
    font-size: 0.9rem;
}

/* --- Styles LightBox (pour l'affichage des images en grand) --- */
#lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Arrière-plan plus sombre */
    display: flex;
    flex-direction: column; /* Pour centrer le contenu verticalement */
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Assure qu'elle est au-dessus de tout */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

#lightbox-overlay.visible {
    opacity: 1;
    visibility: visible;
}

#lightbox-image {
    max-width: 90%;
    max-height: 80%; /* Laisse de la place pour le titre et les boutons */
    display: block;
    border: 5px solid white;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

#lightbox-close {
    position: absolute;
    top: 25px;
    right: 35px;
    color: white;
    font-size: 50px; /* Plus grand pour être visible */
    cursor: pointer;
    z-index: 1001;
    transition: color 0.2s ease;
}

#lightbox-close:hover {
    color: #ff4d4d; /* Rouge vif au survol */
}

#lightbox-caption {
    color: white;
    text-align: center;
    padding: 15px 20px;
    margin-top: 15px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    max-width: 80%;
    font-size: 1.1rem;
}

#lightbox-prev, #lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 12px 18px;
    border: none;
    cursor: pointer;
    font-size: 30px; /* Plus grands */
    border-radius: 5px;
    z-index: 1001;
    transition: background-color 0.3s ease;
}

#lightbox-prev:hover, #lightbox-next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

#lightbox-prev {
    left: 20px;
}

#lightbox-next {
    right: 20px;
}

/* Classe utilitaire pour masquer/afficher */
.hidden {
    display: none !important;
}

/* Media Queries pour la responsivité */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .gallery-section h2 {
        font-size: 1.6rem;
    }

    .image-grid-container {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 15px;
    }

    .video-container iframe {
        width: 95%;
        height: 250px;
    }

    #lightbox-prev, #lightbox-next {
        font-size: 24px;
        padding: 8px 12px;
    }

    #lightbox-close {
        font-size: 40px;
        top: 15px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }

    .gallery-section h2 {
        font-size: 1.4rem;
    }

    .image-grid-container {
        grid-template-columns: 1fr; /* Une seule colonne sur petits écrans */
    }

    .video-container iframe {
        height: 200px;
    }

    #lightbox-prev, #lightbox-next {
        display: none; /* Masque les flèches sur les très petits écrans si l'espace est limité */
    }
}

/* footer  */
footer {
  font-family: Poppins, sans-serif;
  background-color: #2c3e50;
  color: white;
  text-align: center;
  padding: 20px 0;
  font-size: 0.9em;
}
footer p {
  margin: 0;
  padding: 0;
    line-height: 1.5;
}
footer a {
  color: white;
  text-decoration: none;
  transition: color 0.3s ease;
}
footer a:hover {
  color: #3498db;
}

/* style.css */
.hidden {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}
.visible {
  opacity: 1;
  transform: translateY(0);
}