/* CSS spécifique pour la page d'accueil */

/* Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.9), rgba(33, 150, 243, 0.8));
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section .display-4 {
    font-weight: 700;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease-out;
}

.hero-section .lead {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-section .btn-group {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-section img {
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    animation: fadeInRight 0.8s ease-out 0.6s both;
}

/* Featured Articles */
.featured-articles {
    background: linear-gradient(135deg, #F5F5F5 0%, #E8F5E8 100%);
}

.featured-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.4s ease;
    background: var(--white);
}

.featured-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(46, 125, 50, 0.2);
}

.featured-card .card-img-top {
    height: 250px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.featured-card:hover .card-img-top {
    transform: scale(1.1);
}

/* Focus Mali Section */
.focus-mali {
    background: #ffffff !important;
    color: #212529 !important;
    position: relative;
    overflow: hidden;
}

.focus-mali .container {
    position: relative;
    z-index: 1;
}

.mali-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.mali-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    background: #ffffff;
}

.mali-card .card-img-top {
    height: 180px;
    object-fit: cover;
}

/* International Section */
.international-section {
    background: #ffffff !important;
    color: #212529 !important;
}

.international-section .section-title {
    color: #212529 !important;
}

.international-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.international-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    background: #ffffff;
}

.international-card .card-img-top {
    height: 180px;
    object-fit: cover;
}

/* Popular Articles */
.popular-articles {
    background: linear-gradient(135deg, #F5F5F5 0%, #E3F2FD 100%);
}

.popular-articles .list-group-item {
    border: none;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    background: var(--white);
}

.popular-articles .list-group-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.popular-articles .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* Newsletter Card */
.newsletter-section .card {
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-green), var(--accent-green));
    color: var(--white);
    box-shadow: 0 10px 30px rgba(46, 125, 50, 0.3);
}

.newsletter-section .form-control {
    border: none;
    border-radius: 8px;
    padding: 0.75rem;
}

.newsletter-section .btn {
    border-radius: 8px;
    font-weight: 600;
}

/* CTA Section */
.cta-section {
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.95), rgba(33, 150, 243, 0.9));
    z-index: 1;
}

.cta-section .container {
    position: relative;
    z-index: 2;
}

.cta-section .btn-lg {
    padding: 0.875rem 2rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.cta-section .btn-lg:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: 60vh;
        text-align: center;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .hero-section .lead {
        font-size: 1.1rem;
    }
    
    .hero-section .btn-group {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-section img {
        margin-top: 2rem;
        max-width: 100%;
        height: auto;
    }
    
    .featured-card .card-img-top,
    .mali-card .card-img-top,
    .international-card .card-img-top {
        height: 150px;
    }
    
    .cta-section .btn-group {
        flex-direction: column;
    }
    
    .cta-section .btn-lg {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .hero-section .display-4 {
        font-size: 1.75rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .popular-articles .list-group-item {
        padding: 0.75rem;
    }
    
    .popular-articles .badge {
        font-size: 0.7rem;
    }
}

/* Performance optimizations */
.will-change-transform {
    will-change: transform;
}

.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Loading states */
.article-loading {
    position: relative;
    min-height: 200px;
}

.article-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid var(--primary-green);
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles */
.featured-card:focus,
.mali-card:focus,
.international-card:focus {
    outline: 3px solid var(--accent-green);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .hero-section,
    .cta-section {
        background: var(--white) !important;
        color: var(--black) !important;
    }
    
    .hero-section::before,
    .cta-section::before {
        display: none !important;
    }
    
    .btn {
        display: none;
    }
}
