
/* Définition des variables pour le mode clair et sombre */
:root {
    /* Mode clair (par défaut) */
    --primary-color: #137840;
    --secondary-color: #083723;
    --accent-color: #32bd70;
    --light-color: #f5f5f5;
    --dark-color: #333;
    --text-color: #444;
    --white: #fff;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --body-bg: #fbfbfb;
    --content-bg: white;
    --card-bg: white;
    --card-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    --card-hover-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* Pour la page actualités, on utilise les mêmes classes que pour la page activités */
.page-activities,
body.dark-mode {
    --light-color: #f5f5f5;
    --dark-color: #f5f5f5;
    --text-color: #e0e0e0;
    --body-bg: #131313;
    --content-bg: #121212;
    --card-bg: #222;
    --card-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    --card-hover-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    margin: 0;
    padding: 0;
    background-color: var(--body-bg);
    line-height: 1.6;
}

/* Navbar Styles */
.nav-link {
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 0;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.don-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.don-button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Header Styles */
.page-header {
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('assets/imgs/30.png');
    background-size: cover;
    background-position: center;
    height: 60vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    margin-top: 80px;
}

.page-header h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1s ease;
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    background-color: var(--content-bg);
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    position: relative;
    margin-top: -50px;
    margin-bottom: 50px;
}

.news-section {
    margin-bottom: 60px;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    color: var(--primary-color);
    font-size: 2.2rem;
    font-weight: 600;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--accent-color);
}

.section-title p {
    font-size: 1.1rem;
    color: var(--text-color);
    max-width: 700px;
    margin: 20px auto 0;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.news-item {
    background-color: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--card-hover-shadow);
}

.news-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-item:hover .news-image img {
    transform: scale(1.05);
}

.news-date {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--primary-color);
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 600;
}

.news-content {
    padding: 25px;
}

.news-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--dark-color);
    transition: color 0.3s ease;
}

.news-item:hover .news-title {
    color: var(--primary-color);
}

.news-excerpt {
    color: var(--text-color);
    margin-bottom: 20px;
    line-height: 1.7;
}

.news-link {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.news-link:hover {
    border-bottom-color: var(--primary-color);
}

/* Newsletter Section */
.newsletter-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 60px 40px;
    border-radius: 15px;
    color: white;
    text-align: center;
    margin-top: 50px;
}

.newsletter-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.newsletter-text {
    max-width: 700px;
    margin: 0 auto 30px;
    font-size: 1.1rem;
    line-height: 1.7;
}

.newsletter-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 15px;
}

.newsletter-input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    outline: none;
}

.newsletter-button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-button:hover {
    background-color: white;
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.2);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.page-item {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--card-bg);
    border-radius: 50%;
    color: var(--text-color);
    font-weight: 600;
    text-decoration: none;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.page-item:hover,
.page-item.active {
    background-color: var(--primary-color);
    color: white;
}

/* Footer */
.footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 60px 0 20px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 60px;
}

.footer-info {
    flex-basis: 35%;
    margin-bottom: 30px;
}

.footer-logo {
    display: inline-block;
    margin-bottom: 20px;
}

.footer-logo img {
    height: 80px;
}

.footer-desc {
    margin-bottom: 20px;
    line-height: 1.7;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: var(--accent-color);
    color: var(--dark-color);
    transform: translateY(-3px);
}

.footer-links {
    flex-basis: 15%;
    margin-bottom: 30px;
}

.footer-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--accent-color);
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.footer-contact {
    flex-basis: 30%;
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.contact-icon {
    margin-right: 15px;
    color: var(--accent-color);
    font-size: 1.2rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fadeInUp {
    animation: fadeInUp 1s ease;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

.delay-4 {
    animation-delay: 0.8s;
}

/* Responsive Design */
@media screen and (max-width: 992px) {
    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-input,
    .newsletter-button {
        width: 100%;
    }
}

@media screen and (max-width: 768px) {
    .page-header h1 {
        font-size: 2.5rem;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .newsletter-title {
        font-size: 1.8rem;
    }
    
    .footer-top {
        flex-direction: column;
    }
    
    .footer-info, 
    .footer-links, 
    .footer-contact {
        flex-basis: 100%;
    }
}

.footer-cta .btn {
    background-color: var(--accent-color);
    color: var(--dark-color);
    border-color: var(--accent-color);
}

.footer-cta .btn:hover {
    background-color: transparent;
    color: var(--accent-color);
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: 2px solid var(--primary-color);
}

/* Style pour indiquer l'élément de menu actif */
.nav-item .nav-link.active span {
    color: var(--primary-color) !important;
}

.nav-item .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

/* Navbar Dark Mode */
.page-activities .navbar,
.dark-mode .navbar {
    background-color: #121212;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}