/* Importation de la police Poppins via Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');
/* --- CONFIGURATION GLOBALE --- */

html, body {
    /* Empêche le défilement horizontal indésirable */
    overflow-x: hidden; 
    /* Force la largeur à 100% de l'écran */
    width: 100%;        
}

body.aos-animate {
    /* Sécurité supplémentaire pour les animations AOS */
    overflow-x: hidden !important; 
}




/* Application de la police Poppins à tout le texte */
body, h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
}

        .no-scrollbar::-webkit-scrollbar {
            display: none;
        }

        .no-scrollbar {
            -ms-overflow-style: none;
            scrollbar-width: none;
        }

        @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fade {
    animation: fadeIn 1.5s ease-in-out forwards;
}
  
@keyframes bounce-slow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
  }
  .animate-bounce-slow {
    animation: bounce-slow 4s ease-in-out infinite;
  }
      
#campaign-section .group {
    box-shadow: none !important;
}

#campaign-section .group:hover p,
#campaign-section .group:hover span {
    color: #12842D !important;
}

#campaign-section .campaign-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Centre le menu principal entre le logo et le bouton de contact */
header > .container > div {
    position: relative;
}

header #main-nav {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    height: 100%;
    z-index: 1;
}

header #main-nav a {
    align-self: center;
}




/* Styles pour les liens de navigation actifs */
.nav-item.active-nav-link,
.mobile-nav-item.active-nav-link {
    color: #12842D !important;
    position: relative;
}

.nav-item.active-nav-link::after {
    width: 100% !important;
}

.mobile-nav-item.active-nav-link {
    background-color: rgba(18, 132, 45, 0.1);
}

.active-nav-icon {
    color: #12842D !important;
}

/* Transition pour le menu mobile */
#mobile-menu {
    transition: transform 0.3s ease-in-out;
}

#menu-overlay {
    transition: opacity 0.3s ease-in-out;
}








/* Styles pour la section des campagnes */
#campaign-section {
    position: relative;
    overflow: hidden;
}

/* Animation de fond au survol de la section */
#campaign-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: radial-gradient(circle at 0% 0%, rgba(22, 101, 52, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

/* Style des cartes */
#campaign-section .group {
    position: relative;
    backdrop-filter: blur(0px);
    transform: translateY(0);
}

#campaign-section .group:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(22, 101, 52, 0.25);
    border-color: rgba(22, 101, 52, 0.2);
}

/* Animation des images au survol */
#campaign-section .group:hover img {
    transform: scale(1.1);
    filter: brightness(1.05);
}

/* Overlay au survol */
#campaign-section .group:hover .absolute.inset-0 {
    background: linear-gradient(to top, rgba(22, 101, 52, 0.3), transparent);
}

/* Style du badge de catégorie */
#campaign-section .group span.inline-block {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
}

#campaign-section .group:hover span.inline-block {
    background: #166534;
    color: white !important;
    border-color: #166534;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(22, 101, 52, 0.2);
}

/* Animation du titre (devient vert au survol) */
#campaign-section .group h3 {
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: inline-block;
}

#campaign-section .group:hover h3 {
    color: #166534 !important;
}

/* Effet de soulignement animé pour le titre */
#campaign-section .group h3::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #166534, #22c55e);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#campaign-section .group:hover h3::after {
    width: 100%;
}

/* Animation du lien "Voir les détails" */
#campaign-section .group a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#campaign-section .group:hover a {
    color: #166534 !important;
    gap: 12px;
    transform: translateX(4px);
}

#campaign-section .group a span[aria-hidden="true"] {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

#campaign-section .group:hover a span[aria-hidden="true"] {
    transform: translateX(4px);
}

/* Effet de brillance au survol de la carte */
#campaign-section .group::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(34, 197, 94, 0.1),
        transparent
    );
    transition: left 0.5s ease;
    pointer-events: none;
    z-index: 1;
    border-radius: 2.5rem;
}

#campaign-section .group:hover::before {
    left: 100%;
}

/* Animation des cartes au chargement */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#campaign-section .group {
    animation: fadeInUp 0.6s ease-out backwards;
}

#campaign-section .group:nth-child(1) { animation-delay: 0.1s; }
#campaign-section .group:nth-child(2) { animation-delay: 0.2s; }
#campaign-section .group:nth-child(3) { animation-delay: 0.3s; }
#campaign-section .group:nth-child(4) { animation-delay: 0.4s; }
#campaign-section .group:nth-child(5) { animation-delay: 0.5s; }
#campaign-section .group:nth-child(6) { animation-delay: 0.6s; }

/* Animation du texte au survol */
#campaign-section .group p, 
#campaign-section .group .text-gray-600 {
    transition: color 0.3s ease;
}

#campaign-section .group:hover p,
#campaign-section .group:hover .text-gray-600 {
    color: #166534;
}

/* Style de la pagination au survol */
#campaign-section .flex.items-center.gap-3 a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

#campaign-section .flex.items-center.gap-3 a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(22, 101, 52, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

#campaign-section .flex.items-center.gap-3 a:hover::before {
    width: 100%;
    height: 100%;
}

/* Effet de pulse sur le lien "Suivant" */
#campaign-section .flex.items-center.gap-3 a.bg-\[\#166534\] {
    animation: subtlePulse 2s infinite;
}

@keyframes subtlePulse {
    0%, 100% {
        box-shadow: 0 4px 6px -1px rgba(22, 101, 52, 0.2);
    }
    50% {
        box-shadow: 0 6px 12px -2px rgba(22, 101, 52, 0.3);
    }
}

/* Adaptation responsive */
@media (max-width: 768px) {
    #campaign-section .group:hover {
        transform: translateY(-4px);
    }
    
    #campaign-section .group h3::after {
        bottom: -2px;
    }
}

/* Support du mode sombre (si nécessaire) */
@media (prefers-color-scheme: dark) {
    #campaign-section .group {
        background: rgba(255, 255, 255, 0.05);
    }
    
    #campaign-section .group:hover h3 {
        color: #22c55e !important;
    }
    
    #campaign-section .group:hover a {
        color: #22c55e !important;
    }
}

/* Animation pour le chargement des images */
#campaign-section .group img {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* Effet de focus pour l'accessibilité */
#campaign-section .group:focus-within {
    outline: 2px solid #166534;
    outline-offset: 2px;
    transform: translateY(-4px);
}

/* Style amélioré pour le texte vide */
#campaign-section .col-span-full {
    animation: fadeInUp 0.4s ease-out;
}

/* Effet de parallaxe subtil sur les images */
#campaign-section .group .relative.h-64 {
    overflow: hidden;
    transform-style: preserve-3d;
}

#campaign-section .group:hover .relative.h-64 {
    transform: translateZ(10px);
}