/* --- Variables et Reset --- */
:root {
    --primary-color: #2ecc71; /* Vert espoir */
    --secondary-color: #3498db; /* Bleu soutien */
    --dark-color: #2c3e50;
    --light-color: #f8f9fa;
    --text-color: #555;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}
/* --- Alignement du Logo et du Titre --- */
.logo .logo-link {
    display: flex;
    align-items: center; /* Aligne le logo et le texte sur le même axe central vertical */
    gap: 12px;           /* Espace de sécurité entre l'image et le titre */
    text-decoration: none; /* Supprime le soulignement du lien sur le texte */
}

.navbar-logo {
    height: 45px;        /* Hauteur contrôlée pour ne pas déformer la barre de navigation */
    width: auto;
    object-fit: contain;
    border-radius: 4px;  /* Optionnel : adoucit légèrement les angles du logo si besoin */
}

/* Assure que le titre ne saute pas à la ligne */
.logo h1 {
    display: inline-block;
    margin: 0;
    font-size: 1.6rem;   /* Taille légèrement ajustée pour équilibrer avec les 45px du logo */
}
html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--light-color);
    color: var(--text-color);
    overflow-x: hidden;
}

.container {
    width: 85%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 0;
}

/* --- Typographie Générale --- */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 40px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin: 10px auto 0 auto;
    border-radius: 2px;
}

/* --- Header / Navbar --- */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
}

.logo h1 {
    font-size: 1.8rem;
    color: var(--dark-color);
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-links li a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 600;
    margin: 0 15px;
    transition: color 0.3s ease;
}

.nav-links li a:hover {
    color: var(--primary-color);
}

.btn-contact {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white) !important;
    padding: 10px 20px;
    border-radius: 25px;
    transition: transform 0.3s ease !important;
}

.btn-contact:hover {
    transform: scale(1.05);
}

.burger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-color);
}

/* --- Hero Section (Le conteneur reste fixe) --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding: 0 20px;
    margin-top: 70px;
    position: relative;
    overflow: hidden; /* Coupe le zoom de l'image pour qu'il ne dépasse pas de l'écran */
}

/* Force le texte à rester au-dessus de l'animation d'arrière-plan */
.hero-content {
    position: relative;
    z-index: 2;
}

/* --- Hero Section (Le conteneur reste fixe) --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding: 0 20px;
    margin-top: 70px;
    position: relative;
    overflow: hidden;
}

/* Force le texte à rester au-dessus */
.hero-content {
    position: relative;
    z-index: 2;
}

/* --- Le Calque d'Arrière-plan Animé (Vrai Zoom Lent) --- */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    animation: slowMotionSlider 24s infinite ease-in-out; /* Augmenté à 24s pour un rendu encore plus doux */
}

/* --- LE CORRECTEUR DE FLASH (Préchargement Invisible) --- */
/* Ce bloc charge les images en taille 1px caché pour que le navigateur les garde en mémoire */
.hero::after {
    content: "";
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    z-index: -9999;
    background-image: 
        url('../images/hero1.avif'),
        url('../images/hero2.avif'),
        url('../images/hero3.avif'),
}

/* --- Animation optimisée sans coupure brute --- */
@keyframes slowMotionSlider {
    /* --- IMAGE 1 --- */
    0%, 5% {
        background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), 
                          url('../images/hero1.avif');
        transform: scale(1);
        opacity: 1;
    }
    30% {
        transform: scale(1.06);
        opacity: 1;
    }
    33% {
        opacity: 0.2; /* L'image s'estompe doucement au lieu de disparaître d'un coup */
    }

    /* --- IMAGE 2 --- */
    34%, 38% {
        background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), 
        url('../images/hero2.avif');
        transform: scale(1);
        opacity: 1;
    }
    63% {
        transform: scale(1.06);
        opacity: 1;
    }
    66% {
        opacity: 0.2;
    }

    /* --- IMAGE 3 --- */
    67%, 71% {
        background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), 
        url('../images/hero3.avif');
        transform: scale(1);
        opacity: 1;
    }
    96% {
        transform: scale(1.06);
        opacity: 1;
    }
    100% {
        background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), 
        url('../images/hero1.avif');
        transform: scale(1);
        opacity: 1;
    }
}







.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.slogan {
    font-style: italic;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 600;
}

.description {
    max-width: 700px;
    margin: 0 auto 30px auto;
    font-size: 1.1rem;
    font-weight: 300;
}

.btn-primary {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: background 0.3s, transform 0.3s;
}

.btn-primary:hover {
    background-color: #27ae60;
    transform: translateY(-3px);
}

/* --- Section Missions --- */
.missions {
    background-color: var(--white);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.card {
    background-color: var(--light-color);
    padding: 40px 30px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border-top: 4px solid transparent;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-top: 4px solid var(--secondary-color);
}

.icon-box {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.card h3 {
    color: var(--dark-color);
    margin-bottom: 15px;
}

/* --- Section Blog --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.blog-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.blog-card:hover {
    transform: translateY(-5px);
}

.blog-img img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.blog-content {
    padding: 25px;
}

.blog-date {
    font-size: 0.85rem;
    color: #999;
    display: block;
    margin-bottom: 10px;
}

.blog-content h3 {
    color: var(--dark-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.blog-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.btn-read-more {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.btn-read-more:hover {
    color: var(--primary-color);
}

/* --- Footer --- */
footer {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 60px 0 20px 0;
}

.footer-container {
    width: 85%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-info {
    flex: 2;
    min-width: 250px;
}

.footer-info h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.footer-slogan {
    font-style: italic;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.social-icons a {
    color: var(--white);
    font-size: 1.5rem;
    margin-right: 15px;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: var(--secondary-color);
}

.footer-links {
    flex: 1;
    min-width: 150px;
}

.footer-links h4 {
    margin-bottom: 20px;
    position: relative;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: #bbb;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links ul li a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    font-size: 0.9rem;
    color: #bbb;
}

.text-danger {
    color: #e74c3c;
}

/* --- Section Équipe --- */
.team {
    background-color: var(--light-color);
}

.section-subtitle {
    text-align: center;
    margin-top: -30px;
    margin-bottom: 50px;
    font-size: 1.1rem;
    color: #777;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.team-card {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.team-img-container {
    position: relative;
    overflow: hidden;
    height: 320px;
}

.team-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Effet Zoom sur l'image au survol */
.team-card:hover .team-img-container img {
    transform: scale(1.08);
}

/* Superposition pour les réseaux sociaux */
.team-social {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 62, 80, 0.7); /* Fond dark transparent */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.team-card:hover .team-social {
    opacity: 1;
}

.team-social a {
    width: 45px;
    height: 45px;
    background-color: var(--white);
    color: var(--dark-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-size: 1.2rem;
    transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
    transform: translateY(20px);
}

.team-card:hover .team-social a {
    transform: translateY(0);
}

/* Décalage d'apparition des icônes pour un effet dynamique */
.team-social a:nth-child(1) { transition-delay: 0.1s; }
.team-social a:nth-child(2) { transition-delay: 0.15s; }
.team-social a:nth-child(3) { transition-delay: 0.2s; }

.team-social a:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: scale(1.1);
}

.team-info {
    padding: 25px 15px;
}

.team-info h3 {
    color: var(--dark-color);
    font-size: 1.25rem;
    margin-bottom: 5px;
    font-weight: 600;
}

.team-info .role {
    color: var(--secondary-color);
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}







/* --- Responsive (Mobile) --- */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* Cache les liens sur mobile pour le JS */
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--white);
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        padding: 20px 0;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 15px 0;
    }

    .burger {
        display: block;
    }

    .hero-content h2 {
        font-size: 2rem;
    }
    
    .slogan {
        font-size: 1.1rem;
    }
}