body {
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  background: #f7f9fb;
  color: #333;
}

/* Variables CSS (facultatif mais bonne pratique) */
:root {
    --primary-color: #3498db; /* Bleu */
    --secondary-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é */
}

header.hero {
  background: var(--primary-color);
  color: var(--text-color-light);
  padding: 40px;
  text-align: center;
}

/* Navbar générale */
.navbar {
  font-family: Poppins, sans-serif;
    background-color: var(--secondary-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-link {
    color: var(--text-color-light);
    text-decoration: none;
    padding: 10px 0;
    display: block;
    font-size: 1.1em;
    transition: color 0.3s ease;
}

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

/* Dropdown menu */
.dropdown-menu {
    display: none; /* Cache le menu déroulant par défaut */
    position: absolute;
    background-color: var(--secondary-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(--primary-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(--secondary-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);
    }
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
  padding: 30px;
  background-color: #e3f2fd;
}

.story-card {
  background: white;
  border: 1px solid #bbdefb;
  padding: 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
}

.story-card:hover {
  background: #90caf9;
  color: white;
}

.chapter-box {
  padding: 30px;
  max-width: 800px;
  margin: auto;
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.media-section {
  padding: 40px 20px;
  text-align: center;
}
.video-frame{
  display: flex;
}
.video-frame h3 {
  margin-bottom: 20px;
  color: #1565c0;
  text-align: center;
}
.video-frame .biographie {
  width: 50%;
  background: #e3f2fd;
  padding: 20px;
  border-radius: 8px;
}
.biographie img {
  float: left;
  width: 100px;
  margin-right: 15px;
  border-radius: 8px;
}
.biographie p {
  text-align: justify;
  line-height: 1.6;
  color: #333;
}

/* Responsive  */
@media (max-width: 768px) {
  .video-frame {
    flex-direction: column;
  }
  .video-frame .biographie{
    width: 100%;
    margin-bottom: 20px;
  }
}

.video-frame iframe {
  width: 50%;
  height: 450px;
  border-radius: 8px;
}


/* Responsive  */
@media (max-width: 768px) {
  .video-frame iframe {
    width: 100%;
  }
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.gallery-grid img {
  width: 100%;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.lightbox {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.lightbox span {
  position: absolute;
  top: 20px; right: 40px;
  font-size: 40px;
  color: white;
  cursor: pointer;
}

#lightbox-content img {
  max-width: 90%;
  max-height: 80vh;
  border-radius: 8px;
}


/* 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);
}