/* General Styling */
:root {
    --primary-color: #00A9A5; /* Inspiré du bleu/vert de l'exemple */
    --secondary-color: #0A2A66; /* Bleu foncé de l'exemple */
    --accent-color: #4CAF50; /* Green for accents/success */
    --dark-text: #333;
    --light-text: #f4f4f4;
    --bg-light: #e0f2f7; /* Light blue background for sections */
    --bg-dark: #263238; /* Dark grey for footer/contact */
    --card-bg: #ffffff;
    --border-color: #bbdefb; /* Lighter blue for borders */
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.7;
    margin: 0;
    padding: 0;
    color: var(--dark-text);
    /* NOUVEAU: Couleur de fond gris */
    background-color: #e0e0e0; /* Gris clair */
    /* NOUVEAU: Logo de l'association comme image de fond */
    background-image: url('image_20ce66.png'); /* Utilisez le nom de votre fichier logo ici */
    background-size: cover; /* Couvre toute la page */
    background-repeat: no-repeat; /* Ne pas répéter l'image */
    background-position: center center; /* Centre l'image */
    background-attachment: fixed; /* Maintient l'image fixe lors du défilement */
    scroll-behavior: smooth;
    overflow-x: hidden; /* Empêche le défilement horizontal dû au défilement */
}

/* S'assurer que les sections ont des arrière-plans solides pour être lisibles sur l'image de fond du corps */
.section-padding:not(.bg-dark) { /* Appliquer à toutes les sections non explicitement foncées */
    background-color: var(--card-bg); /* Utilise du blanc pour la lisibilité */
    /* Optionnel: ajoute une ombre subtile pour un effet flottant si désiré */
    box-shadow: 0 0 15px rgba(0,0,0,0.05);
}

.bg-light { /* Remplacement pour les sections lumineuses spécifiques */
    background-color: var(--bg-light); /* Garde le bleu clair pour celles-ci */
}

/* --- MODERN HEADER STYLING (Basé sur votre exemple) --- */
header.modern-header {
    background: #ffffff;
    color: var(--dark-text);
    /* padding ajusté pour plus de compacité */
    padding: 10px 0; 
    position: sticky;
    top: 0;
    z-index: 1000;
    /* Ombre subtile comme dans votre exemple */
    box-shadow: 0 1px 4px rgba(0,0,0,0.08); 
    border-bottom: 1px solid #eee;
}

header.modern-header .container {
    display: flex;
    /* CHANGEMENT CLÉ: Utiliser space-between pour séparer le bloc logo/titre et le menu */
    justify-content: space-between; 
    align-items: center;
    /* padding horizontal de 40px comme dans votre exemple (simulé par le padding du container général) */
    padding: 0 12px; 
    gap: 15px;
}

header.modern-header .logo {
    display: flex;
    align-items: center;
    /* Ajout d'une marge à droite pour s'assurer qu'il y a un espace entre le bloc logo/titre et le menu */
    margin-right: 16px; /* Espace entre le logo/titre et le menu */
    margin-left: 0; /* S'assurer que le logo est collé à gauche */
    flex-shrink: 0; 
}

header.modern-header .logo img {
    height: 40px; /* Réduit pour libérer de l'espace au menu */
    width: auto;
    margin-right: 10px; /* Espace entre le logo et le titre IPECD */
}

header.modern-header h1 {
    /* Couleur inspirée de l'exemple */
    color: var(--secondary-color); 
    margin: 0;
    font-size: 1.8em; /* Ajusté */
    font-weight: 700;
    letter-spacing: 0.2px;
    text-align: left;
}

header.modern-header nav {
    /* Laisser la navigation prendre l'espace restant */
    flex-grow: 1; 
    display: flex;
    justify-content: flex-end; /* Aligner les liens à droite */
    margin-left: 0;
}

header.modern-header nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    /* Espace entre les éléments comme dans l'exemple */
    gap: 10px; 
}

header.modern-header nav ul li {
    margin-left: 0; 
}

header.modern-header nav ul li a {
    /* Style du lien inspiré de l'exemple */
    color: var(--secondary-color);
    font-size: 16px; 
    font-weight: 600;
    text-transform: uppercase;
    transition: color 0.3s ease, transform 0.2s ease;
    position: relative;
    padding-bottom: 6px; /* Espace pour l'underline */
    white-space: nowrap;
}

header.modern-header nav ul li a:hover {
    color: var(--primary-color);
    text-decoration: none;
    transform: none; /* Enlève la transformation translateY pour un effet plus plat */
}

/* Modern Hover Effect: Underline (Basé sur votre exemple) */
header.modern-header nav ul li a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    background-color: var(--primary-color);
    left: 0; 
    bottom: -4px;
    transform: none;
    transition: width 0.3s ease-out;
}

header.modern-header nav ul li a:hover::after,
header.modern-header nav ul li a.active::after {
    width: 100%;
}

/* Burger Icon for Mobile */
.burger {
    display: none;
    cursor: pointer;
    /* NOUVEAU: S'assurer que le burger est toujours visible pour mobile */
    z-index: 1001; 
}

.burger div {
    width: 28px;
    height: 3px;
    background-color: var(--dark-text);
    margin: 6px;
    transition: all 0.3s ease;
}

/* Burger Animation on Toggle */
.burger.toggle .line1 {
    transform: rotate(-45deg) translate(-7px, 6px);
}
.burger.toggle .line2 {
    opacity: 0;
}
.burger.toggle .line3 {
    transform: rotate(45deg) translate(-7px, -6px);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('background.jpg') no-repeat center center;
    background-size: cover;
    box-shadow: 0 12px 48px rgba(33,150,243,0.18);
}

.hero-overlay {
    background: rgba(255,255,255,0.7); /* léger voile blanc pour lisibilité du texte */
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0; left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    box-shadow: 0 8px 32px rgba(33,150,243,0.12);
}

.hero .container {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero h2 {
    color: var(--secondary-color); /* CHANGEMENT: Plus lisible sur fond blanc */
    font-size: 2.6em;
    margin-bottom: 18px;
    text-shadow: 2px 2px 6px rgba(255,255,255,0.6); /* CHANGEMENT: Ombre plus claire */
}

.hero p {
    color: var(--dark-text); /* CHANGEMENT: Plus lisible sur fond blanc */
    font-size: 1.1em;
    margin-bottom: 28px;
    max-width: 650px;
    line-height: 1.6;
    text-shadow: 1px 1px 4px rgba(255,255,255,0.6); /* CHANGEMENT: Ombre plus claire */
}

.btn-primary {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 15px 35px;
    border-radius: 5px;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 1.1em;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Effet 3D et shadow pour toutes les cards */
.card-3d {
    box-shadow: 0 8px 32px rgba(33,150,243,0.18), 0 1.5px 8px rgba(0,0,0,0.12);
    border-radius: 18px;
    background: linear-gradient(135deg, #fff 80%, #e3f2fd 100%);
    transition: transform 0.3s cubic-bezier(.25,.8,.25,1), box-shadow 0.3s;
    perspective: 800px;
    will-change: transform, box-shadow;
    position: relative;
}
.card-3d:hover {
    transform: translateY(-12px) scale(1.03) rotateX(4deg);
    box-shadow: 0 16px 48px rgba(33,150,243,0.28), 0 3px 16px rgba(0,0,0,0.18);
    z-index: 2;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
}

.about-item {
    background-color: var(--card-bg);
    padding: 18px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.about-item:hover {
    transform: translateY(-5px);
}

.about-item h4 {
    color: var(--primary-color);
    margin-top: 0;
}

/* Objectives Section */
.objectives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
    text-align: center;
}

.objective-card {
    background-color: var(--card-bg);
    padding: 18px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.objective-card:hover {
    transform: translateY(-5px);
}

/* Interventions Section */
.intervention-axes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.axis-item ul {
    list-style: none;
    padding: 0;
}

.axis-item ul li {
    margin-bottom: 15px;
    position: relative;
    padding-left: 25px;
}

.axis-item ul li:before {
    content: "\f00c"; /* Checkmark icon */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: var(--accent-color);
    position: absolute;
    left: 0;
    top: 0;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
}

.project-card {
    background-color: var(--card-bg);
    padding: 18px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    text-align: center;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-card h4 {
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
}

.project-card h4 i {
    font-size: 1.5em;
    margin-right: 10px;
}

/* Results Section */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
    text-align: center;
}

.result-card {
    background-color: var(--card-bg);
    padding: 18px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.result-card:hover {
    transform: translateY(-5px);
}

/* --- PARTNERSHIP LOGOS ANIMATION --- */
.partners-list {
    margin-top: 30px;
    overflow: hidden; /* Hide content outside the container */
    white-space: nowrap; /* Keep all items on one line */
    position: relative;
    padding: 20px 0; /* Add some vertical padding for the animation */
}

.partners-marquee-inner {
    display: inline-block; /* Make it behave like text for animation */
    animation: marquee 25s linear infinite; /* Animation duration and type */
    padding-right: 50px; /* Space to prevent cut-off at loop start/end */
}

.partners-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    justify-content: center;
    align-items: flex-start;
    margin-top: 24px;
}

.partner-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(33,150,243,0.10);
    padding: 18px 22px;
    min-width: 140px;
    transition: box-shadow 0.2s;
    margin-bottom: 18px;
}

.partner-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 12px;
}

.partner-item span {
    font-size: 1em;
    color: #222;
    text-align: center;
    font-weight: 600;
    margin-top: 0;
}

.partner-item:hover {
    box-shadow: 0 6px 24px rgba(33,150,243,0.18);
    transform: translateY(-4px) scale(1.04);
}

.partners-carousel {
    overflow: hidden;
    width: 100%;
    margin: 30px 0;
    background: transparent;
}

.carousel-track {
    display: flex;
    gap: 32px;
    align-items: center;
    animation: carousel-move 15s linear infinite; /* vitesse plus rapide */
}

@keyframes carousel-move {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Pause animation on hover for accessibility */
.partners-list:hover .partners-marquee-inner {
    animation-play-state: paused;
}

.partners-note {
    text-align: center;
    margin-top: 30px;
    font-style: italic;
    color: #666;
}

/* Team Section */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
}

.team-role {
    background-color: var(--card-bg);
    padding: 18px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.team-role ul {
    list-style: none;
    padding: 0;
}

.team-role ul li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.team-role ul li i {
    margin-right: 10px;
    color: var(--primary-color);
}

/* Migration Section */
.migration-services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
    text-align: center;
}

.service-item {
    background-color: var(--card-bg);
    padding: 18px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
}

.center-text {
    text-align: center;
}

.mt-4 {
    margin-top: 2rem;
}

/* Activities Section */
.activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
}

.activity-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.activity-card:hover {
    transform: translateY(-5px);
}

.activity-card .activity-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.activity-card h4 {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 20px 0;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.activity-logo-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
    margin-right: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.activity-card p {
    padding: 0 20px 20px;
    margin: 0;
}

/* Contact Section */
#contact {
    text-align: center;
    padding-bottom: 40px;
}

.contact-info p {
    font-size: 1.1em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-info p i {
    margin-right: 15px;
    color: var(--primary-color);
}

.contact-info a {
    color: var(--primary-color);
}

.contact-info a:hover {
    color: var(--accent-color);
}

.social-media {
    margin-top: 30px;
}

.social-media a {
    color: #fff;
    font-size: 1.8em;
    margin: 0 15px;
    transition: color 0.3s ease;
}

.social-media a:hover {
    color: var(--primary-color);
}

/* Footer */
footer {
    background: var(--dark-text);
    color: var(--light-text);
    text-align: center;
    padding: 18px 0;
    font-size: 0.95em;
}

footer p {
    margin: 5px 0;
}

/* Réduit la hauteur des sections pour un site plus compact */
.section-padding {
    padding: 35px 0;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    /* Le padding pour le container de l'en-tête est écrasé ci-dessus, mais conservé ici pour les autres sections */
    padding: 0 18px; 
}

/* Ajuste la taille des titres pour éviter qu'ils prennent trop de place */
h2, h3 {
    font-size: 2.2em;
    margin-bottom: 18px;
}

.hero h2 {
    font-size: 2.6em;
    margin-bottom: 18px;
}

.hero p {
    font-size: 1.1em;
    margin-bottom: 28px;
    max-width: 650px;
}

/* Réduit la taille des cards et des grilles */
.card-3d,
.about-item,
.objective-card,
.axis-item,
.project-card,
.result-card,
.team-role,
.service-item,
.activity-card {
    padding: 18px;
    border-radius: 12px;
}

.activity-card .activity-img {
    height: 140px;
}

/* Réduit l'espace entre les éléments des grilles */
.about-grid,
.objectives-grid,
.intervention-axes,
.projects-grid,
.results-grid,
.team-grid,
.migration-services,
.activity-grid {
    gap: 18px;
}

/* Footer plus compact */
footer {
    padding: 18px 0;
    font-size: 0.95em;
}

/* NOUVEAUX STYLES POUR LA SECTION RECONNAISSANCE ET VIDÉO */
.lead-text {
    font-size: 1.15em;
    font-weight: 500;
    max-width: 800px;
    margin: 20px auto 30px; /* Center and add space below */
    line-height: 1.6;
    color: var(--dark-text);
}

.text-center {
    text-align: center;
}

.video-container {
    max-width: 800px; /* Largeur maximale pour la vidéo sur grands écrans */
    margin: 0 auto; /* Centrer le conteneur */
    padding: 10px; /* Rembourrage à l'intérieur du conteneur pour l'effet 3D */
    background: var(--card-bg); /* Couleur de fond de la carte */
}

.video-container video {
    width: 100%;
    max-width: 100%;
    display: block;
    border-radius: 8px; /* Coins légèrement arrondis pour l'élément vidéo */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Responsive: Navigation mobile */
@media (max-width: 1024px) {
    header.modern-header .container {
        /* Ajuste le padding pour les écrans plus petits */
        padding: 0 18px; 
    }
    
    header.modern-header nav ul {
        display: none; /* Hide standard navigation */
    }

    .burger {
        display: block; /* Show burger icon */
    }

    .nav-links {
        position: absolute;
        right: 0px;
        top: 80px; /* Position below header */
        height: auto;
        width: 60%;
        background-color: #ffffff;
        display: flex;
        flex-direction: column;
        text-align: center;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
        box-shadow: -2px 5px 15px rgba(0,0,0,0.1);
        padding: 20px 0;
        border-radius: 0 0 0 10px;
        z-index: 999;
    }

    .nav-links.nav-active {
        transform: translateX(0%);
    }

    .nav-links li {
        opacity: 0;
        margin: 15px 0;
    }

    .nav-links li a {
        font-size: 1.1em;
        font-weight: 700;
        color: var(--secondary-color); /* Assurer la couleur dans le menu mobile */
    }
    
    /* Enlever l'effet underline sur mobile pour plus de clarté */
    .nav-links li a::after {
        content: none !important; 
    }
}


/* Responsive: encore plus compact sur mobile */
@media (max-width: 768px) {
    .section-padding {
        padding: 22px 0;
    }
    h2, h3 {
        font-size: 1.8em; /* Légère augmentation de la taille des titres pour mobile */
        margin-bottom: 12px;
    }
    .hero h2 {
        font-size: 2em;
    }
    .container {
        padding: 0 8px;
    }
    .card-3d,
    .about-item,
    .objective-card,
    .axis-item,
    .project-card,
    .result-card,
    .team-role,
    .service-item,
    .activity-card {
        padding: 10px;
        border-radius: 8px;
    }
    .activity-card .activity-img {
        height: 90px;
    }
    footer {
        padding: 10px 0;
    }
}