
/* 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é */
}


body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: var(--text-color);
    background-color: var(--secondary-color);
}

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

/* Importation des polices Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&family=Open+Sans:wght@400;600&display=swap');

/* 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;
    --card-bg: #ffffff;
    --card-shadow: 0 4px 10px rgba(0,0,0,0.05);
    --card-hover-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: var(--text-color);
    background-color: var(--secondary-color);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
    color: var(--dark-blue);
    text-align: center;
    margin-bottom: 20px;
}

h1 {
    font-size: 2.5em;
}

h2 {
    font-size: 2em;
}


/* Nouveau Carousel */
.carousel {
    position: relative;
    width: 100%;
    height: 450px; /* Hauteur fixe pour le carousel */
    overflow: hidden;
    margin-bottom: 40px; /* Espace sous le carousel */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.carousel-images {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.carousel-images img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Recadre les images pour couvrir la zone */
    display: block; /* Supprime l'espace sous les images */
    flex-shrink: 0; /* Empêche les images de rétrécir */
}

.carousel-nav button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: var(--white);
    border: none;
    padding: 10px 15px;
    font-size: 1.5em;
    cursor: pointer;
    z-index: 10;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.carousel-nav button:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.carousel-nav .prev {
    left: 10px;
}

.carousel-nav .next {
    right: 10px;
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    z-index: 10;
}

.carousel-dots .dot {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.carousel-dots .dot.active {
    background-color: var(--primary-color); /* Couleur du point actif */
    border: 2px solid var(--white);
}

.carousel-caption {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); /* Overlay sombre */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white);
    padding: 20px;
}

.carousel-caption h2 {
    font-size: 3em;
    margin-bottom: 10px;
    color: var(--white);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

.carousel-caption p {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: var(--white);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}

.carousel-quick-nav {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.carousel-quick-nav .nav-link {
    background-color: var(--accent-color);
    color: var(--white);
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.carousel-quick-nav .nav-link:hover {
    background-color: #218838;
    text-decoration: none;
}


/* Main Content - Updates Section (reste inchangé) */
#updates {
    padding: 60px 0;
    background-color: var(--white);
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

#updates .intro-text {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
    font-size: 1.1em;
    color: var(--light-text-color);
}

/* Filter Controls (reste inchangé) */
.filter-controls {
    text-align: center;
    margin-bottom: 40px;
}

.filter-controls label {
    font-size: 1.1em;
    color: var(--dark-blue);
    margin-right: 10px;
    font-weight: 600;
}

.filter-controls select {
    padding: 10px 15px;
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    font-size: 1em;
    color: var(--text-color);
    background-color: var(--white);
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.filter-controls select:focus {
    outline: none;
    border-color: var(--accent-color);
}

/* Updates Grid (reste inchangé) */
.updates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive grid */
    gap: 30px; /* Espace entre les cartes */
}

.update-card {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Pour pousser le bouton en bas */
}

.update-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
}

.update-card h3 {
    color: var(--primary-color);
    font-size: 1.4em;
    margin-top: 0;
    margin-bottom: 10px;
    text-align: left;
}

.update-card .date {
    font-size: 0.9em;
    color: var(--light-text-color);
    margin-bottom: 15px;
    text-align: left;
    font-style: italic;
}

.update-card p {
    font-size: 1em;
    color: var(--text-color);
    line-height: 1.6;
    text-align: left;
    margin-bottom: 15px;
    flex-grow: 1; /* Permet au paragraphe de prendre l'espace disponible */
}

.update-card .read-more-btn {
    background-color: var(--accent-color);
    color: var(--white);
    padding: 10px 20px;
    font-size: 0.9em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    align-self: flex-start; /* Aligner le bouton à gauche */
}

.update-card .read-more-btn:hover {
    background-color: #218838;
}

.update-card .full-content {
    margin-top: 15px;
    border-top: 1px solid #eee;
    padding-top: 15px;
    font-size: 0.95em;
    color: var(--light-text-color);
}

.update-card .full-content.hidden {
    display: none;
}


/* Media Queries pour la responsivité */
@media (max-width: 768px) {
    .carousel {
        height: 350px;
    }
    .carousel-caption h2 {
        font-size: 2.2em;
    }
    .carousel-caption p {
        font-size: 1.2em;
    }
    .carousel-quick-nav .nav-link {
        padding: 10px 20px;
        font-size: 0.9em;
    }

    h1 {
        font-size: 2em;
    }

    h2 {
        font-size: 1.8em;
    }

    section {
        padding: 40px 0;
    }

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

    .update-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .carousel {
        height: 250px;
    }
    .carousel-caption h2 {
        font-size: 1.8em;
    }
    .carousel-caption p {
        font-size: 1em;
    }
    .carousel-quick-nav {
        flex-direction: column;
        gap: 10px;
    }
    .carousel-quick-nav .nav-link {
        width: 80%;
        margin: 0 auto;
        text-align: center;
    }

    .container {
        padding: 15px 0;
    }
    .filter-controls label, .filter-controls select {
        font-size: 0.9em;
    }
    .filter-controls select {
        padding: 8px 10px;
    }
    .update-card h3 {
        font-size: 1.2em;
    }
    .update-card p {
        font-size: 0.9em;
    }
    .update-card .read-more-btn {
        padding: 8px 15px;
        font-size: 0.85em;
    }
}



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