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


.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    margin-top: 90px;
    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;
}


/* Header */
header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

header h1 {
    color: var(--white);
    margin: 0;
    text-align: left;
    font-size: 2.2em;
}

header nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: flex-end;
}

header nav ul li {
    margin-left: 20px;
}

header nav ul li a {
    color: var(--white);
    font-weight: 600;
    font-size: 1.1em;
    padding: 5px 10px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

header nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    text-decoration: none;
}

/* Hero Section */
#hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../Contact/image1.png') no-repeat center center/cover;
    color: var(--white);
    text-align: center;
    padding: 100px 0;
    height: 400px; /* Ajustez la hauteur selon vos préférences */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

#hero h2 {
    color: var(--white);
    font-size: 3em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

#hero p {
    font-size: 1.3em;
    margin-bottom: 30px;
    max-width: 700px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}

#learnMoreBtn {
    background-color: var(--accent-color);
    color: var(--white);
    padding: 15px 30px;
    font-size: 1.1em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#learnMoreBtn:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

/* Sections Générales */
section {
    padding: 60px 0;
    background-color: var(--white);
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

section:nth-of-type(odd) {
    background-color: var(--secondary-color);
}

section p {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 20px auto;
    font-size: 1.1em;
    color: var(--light-text-color);
}

/* Partners Section */
#partners .partner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.partner-card {
    background-color: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.partner-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.partner-card h3 {
    color: var(--primary-color);
    font-size: 1.5em;
    margin-top: 0;
    margin-bottom: 15px;
}

.partner-card p {
    font-size: 0.95em;
    color: var(--light-text-color);
    line-height: 1.7;
    margin-bottom: 20px;
}

.partner-link {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.partner-link:hover {
    background-color: var(--dark-blue);
    text-decoration: none;
}

/* Contact Section */
../Contact/index.html .contact-link {
    font-weight: bold;
    font-size: 1.2em;
    color: var(--accent-color);
}

../Contact/index.html .contact-link:hover {
    text-decoration: underline;
    color: #218838;
}

/* Media Queries pour la responsivité */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }
    header nav ul {
        justify-content: center;
        margin-top: 15px;
    }
    header nav ul li {
        margin: 0 10px;
    }

    #hero h2 {
        font-size: 2.2em;
    }

    #hero p {
        font-size: 1.1em;
    }

    h1 {
        font-size: 2em;
    }

    h2 {
        font-size: 1.8em;
    }

    section {
        padding: 40px 0;
    }

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

@media (max-width: 480px) {
    #hero h2 {
        font-size: 1.8em;
    }

    #hero p {
        font-size: 1em;
    }

    #learnMoreBtn {
        padding: 12px 25px;
        font-size: 1em;
    }

    header h1 {
        font-size: 1.8em;
    }
}


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