/* ===== ANIMATIONS PROFESSIONNELLES POUR YOUTHCONNEKT SAHEL 2025 ===== */

/* Variables CSS pour les animations */
:root {
    --animation-duration: 0.6s;
    --animation-delay: 0.1s;
    --bounce-height: 20px;
    --float-distance: 10px;
    --pulse-scale: 1.05;
}

/* ===== ANIMATIONS DE BASE ===== */

/* Animation de pulsation */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(var(--pulse-scale)); }
    100% { transform: scale(1); }
}

/* Animation de rebond */
@keyframes bounceIn {
    0% { 
        opacity: 0; 
        transform: translateY(-50px) scale(0.3); 
    }
    50% { 
        opacity: 1; 
        transform: translateY(0) scale(1.05); 
    }
    70% { 
        transform: translateY(-10px) scale(0.95); 
    }
    100% { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

/* Animation de flottement */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(var(--float-distance)); }
}

/* Animation de rotation */
@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Animation de typing */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

/* Animation de fade in avec délai */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation de slide in */
@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animation de slide in droite */
@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animation de zoom in */
@keyframes zoomIn {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animation de shimmer */
@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

/* ===== CLASSES D'ANIMATION ===== */

/* Pulsation */
.animate-pulse {
    animation: pulse 2s infinite;
}

/* Rebond */
.bounce-in {
    animation: bounceIn var(--animation-duration) ease-out;
}

/* Flottement */
.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Rotation */
.rotate-animation {
    animation: rotate 20s linear infinite;
}

/* Pulse pour les boutons */
.pulse-btn {
    animation: pulse 2s infinite;
    transition: all 0.3s ease;
}

.pulse-btn:hover {
    animation: none;
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(255, 87, 34, 0.4);
}

/* Hover lift pour les boutons */
.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Animation de typing */
.typing-animation {
    overflow: hidden;
    white-space: nowrap;
    animation: typing 3s steps(40, end);
}

/* Fade in avec délai */
.fade-in-delay {
    animation: fadeInUp 1s ease-out 0.5s both;
}

/* Slide in gauche */
.slide-in-left {
    animation: slideInLeft var(--animation-duration) ease-out;
}

/* Slide in droite */
.slide-in-right {
    animation: slideInRight var(--animation-duration) ease-out;
}

/* Zoom in */
.zoom-in {
    animation: zoomIn var(--animation-duration) ease-out;
}

/* ===== ANIMATIONS DES FORMES FLOTTANTES ===== */

.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, rgba(255, 87, 34, 0.1), rgba(46, 125, 50, 0.1));
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.shape-3 {
    width: 60px;
    height: 60px;
    top: 80%;
    left: 20%;
    animation-delay: 4s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    top: 30%;
    right: 30%;
    animation-delay: 1s;
}

.shape-5 {
    width: 70px;
    height: 70px;
    top: 70%;
    left: 60%;
    animation-delay: 3s;
}

/* ===== ANIMATIONS DES IMAGES ===== */

.hero-main-img {
    transition: all 0.3s ease;
}

.hero-main-img:hover {
    transform: scale(1.02);
}

/* ===== STYLES POUR LA SECTION PARTENAIRES MAGNIFIQUE ===== */

.partner-card-magnifique {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.partner-card-magnifique::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.partner-card-magnifique:hover::before {
    left: 100%;
}

.partner-card-magnifique:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.partner-logo-magnifique {
    transition: all 0.3s ease;
    filter: grayscale(20%);
}

.partner-card-magnifique:hover .partner-logo-magnifique {
    transform: scale(1.1);
    filter: grayscale(0%) drop-shadow(0 5px 15px rgba(0,0,0,0.2));
}

.partner-name-magnifique {
    transition: all 0.3s ease;
}

.partner-card-magnifique:hover .partner-name-magnifique {
    color: #FF6B35 !important;
    transform: scale(1.05);
}

.partner-role-magnifique {
    transition: all 0.3s ease;
}

.partner-card-magnifique:hover .partner-role-magnifique {
    color: #666 !important;
}

/* Animation de défilement pour les cartes partenaires */
@keyframes slideInFromLeft {
    0% {
        transform: translateX(-100px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    0% {
        transform: translateX(100px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromBottom {
    0% {
        transform: translateY(50px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.partner-card-magnifique:nth-child(odd) {
    animation: slideInFromLeft 0.8s ease-out;
}

.partner-card-magnifique:nth-child(even) {
    animation: slideInFromRight 0.8s ease-out;
}

.partner-card-magnifique:nth-child(3n) {
    animation: slideInFromBottom 0.8s ease-out;
}

/* Animation de pulsation pour le message de remerciement */
.thank-you-message {
    animation: fadeInUp 1s ease-out 0.5s both;
}

@keyframes fadeInUp {
    0% {
        transform: translateY(30px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Effet de brillance sur les cartes */
@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.partner-card-magnifique {
    background: linear-gradient(90deg, transparent, transparent, rgba(255,255,255,0.1), transparent, transparent);
    background-size: 200px 100%;
    background-repeat: no-repeat;
    background-position: -200px 0;
}

.partner-card-magnifique:hover {
    animation: shimmer 1.5s ease-in-out;
}

/* Animation de rotation pour les icônes */
.partner-logo-container i {
    transition: all 0.3s ease;
}

.partner-card-magnifique:hover .partner-logo-container i {
    transform: rotate(360deg) scale(1.2);
}

/* Effet de particules flottantes pour la section partenaires */
.partners-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.partners-particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 1;
    }
}
    filter: brightness(1.1);
}

.floating-img {
    position: absolute;
    transition: all 0.3s ease;
}

.floating-img-1 {
    top: 10%;
    right: 10%;
    animation: float 4s ease-in-out infinite;
}

.floating-img-2 {
    bottom: 20%;
    left: 5%;
    animation: float 5s ease-in-out infinite 1s;
}

.floating-img-3 {
    top: 50%;
    right: 5%;
    animation: float 3s ease-in-out infinite 2s;
}

.img-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 30px;
    height: 30px;
    background: linear-gradient(45deg, #FF5722, #FF9800);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    animation: pulse 2s infinite;
}

/* ===== ANIMATIONS DU COUNTDOWN ===== */

.animate-countdown .countdown-item {
    transition: all 0.3s ease;
}

.animate-countdown .countdown-item:hover {
    transform: scale(1.1);
}

.countdown-number {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(45deg, #FF5722, #FF9800);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 2s infinite;
}

/* ===== ANIMATIONS DES SECTIONS ===== */

.section-animate {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.section-animate.animate {
    opacity: 1;
    transform: translateY(0);
}

/* ===== ANIMATIONS DES CARTES ===== */

.card-animate {
    transition: all 0.3s ease;
    transform: translateY(0);
}

.card-animate:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* ===== ANIMATIONS DES STATISTIQUES ===== */

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    background: linear-gradient(45deg, #2E7D32, #4CAF50);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 2s infinite;
}

/* ===== ANIMATIONS DES BOUTONS ===== */

.btn-animated {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-animated::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-animated:hover::before {
    left: 100%;
}

/* ===== ANIMATIONS RESPONSIVE ===== */

@media (max-width: 768px) {
    .floating-img {
        display: none;
    }
    
    .shape {
        display: none;
    }
    
    .countdown-number {
        font-size: 2rem;
    }
}

/* ===== ANIMATIONS DE CHARGEMENT ===== */

.loading-animation {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== EFFET DE GRADIENT ANIMÉ ===== */

.gradient-text {
    background: linear-gradient(45deg, #FF5722, #FF9800, #FFC107, #4CAF50);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ===== ANIMATIONS D'APPARITION AU SCROLL ===== */

.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== STYLES DU HEADER AMÉLIORÉ ===== */

.navbar {
    backdrop-filter: blur(10px);
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.95) 0%, rgba(76, 175, 80, 0.95) 100%) !important;
    transition: all 0.3s ease;
    z-index: 1050 !important;
}

/* Correction pour éviter que le header couvre le contenu */
body {
    padding-top: 80px !important;
}

/* Ajustement pour les sections avec margin-top */
.hero-section {
    margin-top: 0 !important;
}

.navbar.scrolled {
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.98) 0%, rgba(76, 175, 80, 0.98) 100%) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.brand-logo img {
    transition: all 0.3s ease;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.brand-logo:hover img {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.logo-fallback {
    transition: all 0.3s ease;
}

.brand-logo:hover .logo-fallback {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Styles pour les logos des partenaires dans le footer */
.partner-logo {
    transition: all 0.3s ease;
    opacity: 0.7;
}

.partner-logo:hover {
    opacity: 1;
    transform: scale(1.1);
    filter: brightness(0) invert(1) drop-shadow(0 0 10px rgba(255, 255, 255, 0.3)) !important;
}

.brand-text {
    line-height: 1.2;
}

.brand-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: white;
}

.brand-subtitle {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.navbar-nav .nav-link {
    position: relative;
    transition: all 0.3s ease;
    font-weight: 500;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(45deg, #FF5722, #FF9800);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 100%;
}

.navbar-nav .nav-link:hover {
    color: #FFD700 !important;
    transform: translateY(-2px);
}

.dropdown-menu {
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 10px 0;
    margin-top: 10px;
    z-index: 1060 !important;
}

.dropdown-item {
    transition: all 0.3s ease;
    padding: 8px 20px;
}

.dropdown-item:hover {
    background: linear-gradient(45deg, #2E7D32, #4CAF50);
    color: white;
    transform: translateX(5px);
}

.president-badge {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: linear-gradient(45deg, #FF5722, #FF9800);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* ===== ANIMATIONS DES PARTICLES ===== */

.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: particleFloat 8s linear infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}
