
/* Variables de couleurs inspirées des images de Jolof Care */
:root {
    /* Couleurs principales basées sur le logo et les fonds clairs */
    --primary-color: #5BA82F; /* Un vert un peu plus vif, tiré du logo */
    --secondary-color: #3C5C36; /* Un vert foncé/gris du logo et des textes principaux */
    --accent-color: #F0B800; /* Un jaune doré/sable pour les accents, rappellant les paysages */
    --background-light: #F0EEE7; /* Un beige très clair, proche des fonds des cartes */
    --background-dark: #E2E1DC; /* Un gris-beige un peu plus soutenu pour alterner les sections */
    --text-color-dark: #333333; /* Texte sombre pour la lisibilité */
    --text-color-light: #FFFFFF; /* Texte blanc pour les fonds foncés */
    --button-hover: #4A8C26; /* Une nuance de vert pour le survol des boutons */
    --shadow-color: rgba(0, 0, 0, 0.1); /* Ombre douce */
    --card-background: #F8F7F4; /* Un blanc cassé pour les cartes et conteneurs intérieurs */
}

/* Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-color-dark);
    background-color: var(--background-light);
}

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

h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
    color: var(--secondary-color); /* Vert foncé pour les titres */
    margin-bottom: 20px;
}

h2 {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 40px;
}

h3 {
    font-size: 1.8em;
}

p {
    margin-bottom: 15px;
}

a {
    color: var(--primary-color); /* Lien dans le vert primaire */
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--button-hover);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Boutons */
.button {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1em;
}

.primary-button {
    background-color: var(--primary-color);
    color: var(--text-color-light);
}

.primary-button:hover {
    background-color: var(--button-hover);
    color: var(--text-color-light);
}

.secondary-button {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    margin-left: 15px;
}

.secondary-button:hover {
    background-color: var(--primary-color);
    color: var(--text-color-light);
}

.big-button {
    padding: 15px 30px;
    font-size: 1.2em;
    margin-top: 20px;
}

/* Header */
header {
    background-color: var(--background-light);
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 5px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    min-height: 120px; /* Hauteur de base quand le logo est visible */
    display: flex;
    align-items: center;
    /* Transition pour une animation fluide des changements de style */
    transition: transform 0.3s ease-out, min-height 0.3s ease-out, padding 0.3s ease-out, opacity 0.3s ease-out; /* Ajout d'opacité pour la transition */
    overflow: hidden; /* Cache le contenu qui dépasse quand la hauteur diminue */
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
   
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.logo {
    display: flex;
    align-items: center;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out; 
}

.logo img {
    height: 250px;
    width: auto;
    margin-right: 100px;
    transition: height 0.3s ease-out, opacity 0.3s ease-out; 
}

nav {
    align-self: center;
    transition: transform 0.3s ease-out; /* Transition pour la nav */
}

nav ul {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

nav ul li a {
    color: var(--secondary-color);
    font-weight: 600;
    padding: 5px 0;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    left: 0;
    bottom: -5px;
    transition: width 0.3s ease-in-out;
}

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

/* NOUVELLE CLASSE POUR Cacher LE HEADER QUAND ON SCROLL VERS LE BAS */
.header-hidden-completely {
    transform: translateY(-100%); /* Le fait remonter entièrement pour le cacher */
    opacity: 0; /* Le rend complètement transparent */
    pointer-events: none; /* Désactive les clics sur le header invisible */
}


/* Sections */
section {
    padding: 80px 0;
    text-align: center;
    /* La marge supérieure des sections doit compenser la hauteur MAXIMALE du header */
    margin-top: -120px; /* La hauteur non compacte du header */
    padding-top: calc(80px + 120px); /* Compense le décalage en ajoutant 120px au padding-top */
    scroll-margin-top: 120px; /* Important pour le défilement des ancres, doit être la hauteur max du header */
}

section:nth-of-type(even) {
    background-color: var(--background-dark);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('hero-background.jpeg') no-repeat center center/cover;
    color: var(--text-color-light);
    padding: 150px 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    scroll-margin-top: 120px; /* Doit être la hauteur max du header */
}

.hero-content {
    max-width: 800px;
}

.hero-content h2 {
    color: var(--text-color-light);
    font-size: 3.5em;
    margin-bottom: 25px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2em;
    margin-bottom: 40px;
    opacity: 0.9;
}

/* ABOUT SECTION - STYLES AMÉLIORÉS */
.about-section {
    background-color: var(--background-light);
    text-align: center;
}

.about-section h2 {
    color: var(--secondary-color);
}

.about-content-wrapper {
    display: flex;
    flex-direction: column; /* Par défaut, les éléments s'empilent */
    align-items: center;
    gap: 50px; /* Espace entre l'intro et la grille */
    margin-top: 50px;
}

.about-intro {
    max-width: 900px; /* Limite la largeur du texte introductif */
    margin: 0 auto;
    background-color: var(--card-background);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 20px var(--shadow-color);
    text-align: center; /* Centrer le texte dans cette boîte */
}

.about-intro p {
    font-size: 1.2em;
    line-height: 1.8;
    color: var(--text-color-dark);
    margin-bottom: 20px;
}

.about-intro .highlight-text {
    font-size: 1.4em; /* Texte plus grand pour la phrase clé */
    font-weight: 600;
    color: var(--primary-color); /* Couleur du texte principale pour la mise en évidence */
    margin-bottom: 30px;
}

.about-intro .button {
    margin-top: 20px;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    width: 100%; /* La grille prend toute la largeur du wrapper */
    text-align: left;
}

.about-item {
    background-color: var(--card-background);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px var(--shadow-color);
    transition: transform 0.3s ease;
}

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

.about-item h3 {
    color: var(--primary-color);
    font-size: 1.5em;
    margin-bottom: 15px;
}

.about-item ul {
    list-style: disc;
    margin-left: 20px;
}

.about-item ul li {
    margin-bottom: 8px;
}

/* Team Section (Notre Équipe) */
.team-section {
    background-color: var(--background-dark);
    text-align: center;
}

.team-member {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--card-background);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 20px var(--shadow-color);
}

.president-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 25px;
    border: 5px solid var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.15);
}

.team-member h3 {
    font-size: 2.2em;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.team-member .role {
    font-size: 1.2em;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 25px;
}

.team-member p {
    font-size: 1.1em;
    line-height: 1.8;
    color: var(--text-color-dark);
    text-align: justify;
    margin-bottom: 20px;
}

.small-button {
    padding: 8px 18px;
    font-size: 0.9em;
    margin-top: 15px;
    margin-left: 0;
}

.small-button i {
    margin-right: 8px;
}

/* Actions Section */
.actions-section .action-item {
    background-color: var(--card-background);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px var(--shadow-color);
    margin-bottom: 40px;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.actions-section .action-item:last-child {
    margin-bottom: 0;
}

.actions-section .action-item h3 {
    color: var(--secondary-color);
    font-size: 2em;
    text-align: center;
    margin-bottom: 20px;
}

.action-icon {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.actions-section .action-item ul {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.actions-section .action-item ul li {
    background-color: var(--background-dark);
    padding: 10px 20px;
    margin-bottom: 10px;
    border-left: 5px solid var(--primary-color);
    border-radius: 5px;
    font-weight: 600;
}

.actions-section .action-item img {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 8px;
    margin-top: 25px;
    box-shadow: 0 4px 10px var(--shadow-color);
}


/* News & Events Section */
.news-events-section {
    background-color: var(--background-light);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.news-card {
    background-color: var(--card-background);
    border-radius: 8px;
    box-shadow: 0 4px 15px var(--shadow-color);
    overflow: hidden;
    text-align: left;
    transition: transform 0.3s ease;
}

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

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid #eee;
}

.news-card h3 {
    font-size: 1.4em;
    padding: 15px 20px 0;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.news-card p {
    padding: 0 20px;
    font-size: 0.9em;
}

.news-card .date {
    font-size: 0.8em;
    color: #777;
    padding: 0 20px;
    margin-bottom: 5px;
}

.news-card .read-more {
    display: inline-block;
    padding: 15px 20px 20px;
    color: var(--primary-color);
    font-weight: 600;
}

.news-card .read-more:hover {
    color: var(--button-hover);
}

.text-center {
    text-align: center;
    margin-top: 40px;
}

/* Contact Section */
.contact-section {
    background-color: var(--background-dark);
    padding-bottom: 40px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 50px;
    margin-top: 50px;
    text-align: left;
}

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

.contact-info ul {
    margin-top: 20px;
}

.contact-info ul li {
    margin-bottom: 15px;
    font-size: 1.1em;
    color: var(--secondary-color);
}

.contact-info ul li i {
    margin-right: 10px;
    color: var(--primary-color);
    font-size: 1.2em;
}

.social-links {
    margin-top: 30px;
    display: flex;
    gap: 20px;
}

.social-links a {
    font-size: 1.8em;
    color: var(--secondary-color);
    transition: color 0.3s ease;
}

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

.contact-form-container {
    background-color: var(--card-background);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px var(--shadow-color);
}

.contact-form-container h3 {
    color: var(--primary-color);
    margin-bottom: 25px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--secondary-color);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    font-family: 'Open Sans', sans-serif;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(91, 168, 47, 0.2);
}

.contact-form button[type="submit"] {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
    margin-top: 10px;
}

.form-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    display: none;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.donation-section {
    background-color: var(--card-background);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px var(--shadow-color);
    margin-top: 50px;
    text-align: center;
}

.donation-section h3 {
    color: var(--primary-color);
    font-size: 2em;
}

.donation-section p {
    font-size: 1.1em;
    margin-bottom: 25px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.donation-info {
    font-size: 0.9em;
    color: #666;
    margin-top: 15px;
}

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

footer a {
    color: var(--text-color-light);
    margin: 0 10px;
}

footer a:hover {
    color: var(--primary-color);
}

/* Styles pour les éléments désactivés par le script anti-double-clic */
.button.disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 992px) { /* Ajustement pour les tablettes */
    .about-content-wrapper {
        flex-direction: column;
        gap: 30px;
    }
    .about-intro {
        padding: 30px;
    }
    .about-intro p {
        font-size: 1.1em;
    }
    .about-intro .highlight-text {
        font-size: 1.25em;
    }

    /* Header responsive hidden */
    .header-hidden-completely {
        transform: translateY(-100%); /* Assure qu'il remonte complètement */
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }

    .logo {
        margin-bottom: 15px;
    }

    .logo img {
        height: 120px; /* Taille réduite pour les petits écrans */
    }

    nav ul {
        gap: 15px;
        margin-top: 10px;
    }

    /* Ajuster la marge des sections pour les écrans plus petits */
    section {
        margin-top: -80px; /* Ajustez en fonction de la nouvelle hauteur du header */
        padding-top: calc(80px + 80px); /* 80px de base + 80px de compensation */
        scroll-margin-top: 80px; /* Ajuster pour le défilement des ancres */
    }
    .hero-section {
        scroll-margin-top: 80px;
    }

    /* Header responsive hidden */
    .header-hidden-completely {
        transform: translateY(-100%); /* Assure qu'il remonte complètement */
    }

    h2 {
        font-size: 2em;
    }

    /* Team Section Responsive */
    .team-member {
        padding: 25px;
    }
    .team-member h3 {
        font-size: 1.8em;
    }
    .team-member .role, .team-member p {
        font-size: 1em;
    }
    .small-button {
        margin-left: auto;
        margin-right: auto;
        display: inline-block;
    }

    /* About Section Responsive */
    .about-intro {
        padding: 25px;
    }
    .about-intro p, .about-intro .highlight-text {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .logo img {
        height: 100px; /* Taille encore plus réduite pour les très petits écrans */
    }
    section {
        margin-top: -70px;
        padding-top: calc(80px + 70px);
        scroll-margin-top: 70px;
    }
    .hero-section {
        scroll-margin-top: 70px;
    }

    /* Header responsive hidden */
    .header-hidden-completely {
        transform: translateY(-100%); /* Assure qu'il remonte complètement */
    }

    .logo h1 {
        font-size: 1.5em;
    }

    nav ul li a {
        font-size: 0.9em;
    }

    .hero-content h2 {
        font-size: 2em;
    }

    .button {
        padding: 10px 20px;
        font-size: 0.9em;
    }

    .primary-button + .secondary-button {
        margin-left: 0;
        margin-top: 10px;
    }

    .contact-info ul li {
        font-size: 1em;
    }

    .social-links {
        justify-content: center;
    }

    /* Team Section Responsive */
    .president-photo {
        width: 150px;
        height: 150px;
    }
}
/* Styles pour les images côte à côte dans une news-card */
.news-images-horizontal {
    display: flex; /* Utilise Flexbox pour aligner les éléments sur une ligne */
    gap: 10px; /* Ajoute un petit espace entre les images */
    margin-bottom: 15px; /* Espace sous le conteneur d'images */
    overflow-x: auto; /* Permet le défilement horizontal si les images sont trop grandes */
    padding-bottom: 5px; /* Espace pour la barre de défilement si nécessaire */
    scroll-snap-type: x mandatory; /* Optionnel: aide au défilement par 'snap' */
    -webkit-overflow-scrolling: touch; /* Améliore le défilement sur iOS */
}

.news-images-horizontal img {
    flex: 1 0 48%; /* Chaque image prendra environ la moitié de l'espace, avec un léger rétrécissement si nécessaire */
    width: 100%; /* S'assure que l'image remplit son conteneur flex */
    height: 200px; /* Hauteur fixe comme tes autres images */
    object-fit: cover; /* Recadre l'image pour couvrir la zone sans déformation */
    border-radius: 5px; /* Bords légèrement arrondis */
    scroll-snap-align: start; /* Optionnel: les images se "snapperont" au début du défilement */
}

/* Ajustements pour les petits écrans si les images deviennent trop petites */
@media (max-width: 600px) {
    .news-images-horizontal {
        flex-wrap: nowrap; /* Force les images à rester sur une seule ligne */
    }
    .news-images-horizontal img {
        flex: 0 0 70%; /* Sur mobile, chaque image prendra 70% de la largeur du  */
    }
}
/* Styles for videos side-by-side in a news-card */
.news-videos-horizontal {
    display: flex; /* Use Flexbox to align elements on a row */
    gap: 10px; /* Add a small gap between the videos */
    margin-top: 15px; /* Space above the video container */
    margin-bottom: 15px; /* Space below the video container */
    overflow-x: auto; /* Allows horizontal scrolling if videos are too wide */
    padding-bottom: 5px; /* Space for scrollbar if needed */
    -webkit-overflow-scrolling: touch; /* Improves scrolling on iOS */
    scroll-snap-type: x mandatory; /* Optional: helps with "snapping" scroll behavior */
}

.news-videos-horizontal video {
    flex: 1 0 48%; /* Each video takes about half the width, with slight flexibility */
    width: 100%; /* Ensures the video fills its flex container */
    height: 200px; /* Fixed height, matching your image height */
    object-fit: cover; /* Crops the video to cover the area without distortion */
    border-radius: 5px; /* Slightly rounded corners */
    scroll-snap-align: start; /* Optional: videos will "snap" into view when scrolling */
}

/* Adjustments for smaller screens for videos */
@media (max-width: 600px) {
    .news-videos-horizontal {
        flex-wrap: nowrap; /* Forces videos to stay on one line */
    }
    .news-videos-horizontal video {
        flex: 0 0 70%; /* On mobile, each video will take 70% of the container width, allowing for scrolling */
    }
}
