:root {
            --primary-blue: #2b6cb0;
            --primary-green: #38a169;
            --white: #fff;
            --light-gray: #f7fafc;
            --dark-gray: #2d3748;
            --black: #000;
            --secondary-green: #2f855a;
            --text-color-medium: #4a5568;
            --text-color-light: #718096;
            --border-color: #e2e8f0;
            --shadow-light: rgba(43, 108, 176, 0.07);
            --shadow-medium: rgba(43, 108, 176, 0.15);
            --spacing-xs: 0.5rem;
            --spacing-sm: 1rem;
            --spacing-md: 1.5rem;
            --spacing-lg: 2rem;
            --spacing-xl: 3rem;
            --spacing-2xl: 4rem;
            --border-radius-sm: 0.25rem;
            --border-radius-md: 0.5rem;
            --border-radius-lg: 0.75rem;
            --border-radius-xl: 1rem;
        }

        .all-events-container {
            max-width: 1200px;
            margin: 2.5rem auto;
            background: var(--white);
            border-radius: 12px;
            box-shadow: 0 4px 24px var(--shadow-light);
            padding: 5rem 4rem;
        }

        .section-header {
            text-align: center;
            margin-bottom: 40px;
        }

        .section-header h1 {
            color: var(--primary-blue);
            font-size: 2.5rem;
            margin-bottom: 10px;
            font-weight: 700;
        }

        .section-subtitle {
            color: var(--primary-green);
            font-size: 1.2rem;
            font-weight: 500;
        }

        .search-bar {
            display: flex;
            justify-content: center;
            align-items: center;
            margin-top: 30px;
            margin-bottom: 40px;
            gap: 10px;
        }

        .search-bar input[type="text"] {
            width: 100%;
            max-width: 400px;
            padding: 12px 20px;
            border: 1px solid var(--border-color);
            border-radius: 25px;
            font-size: 1rem;
            outline: none;
            transition: all 0.3s ease;
            box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        }

        .search-bar input[type="text"]:focus {
            border-color: var(--primary-blue);
            box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.2);
        }

        .search-bar button {
            background-color: var(--primary-blue);
            color: white;
            border: none;
            border-radius: 25px;
            padding: 12px 18px;
            cursor: pointer;
            font-size: 1rem;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background-color 0.3s ease, transform 0.2s ease;
        }

        .search-bar button:hover {
            background-color: var(--primary-green);
            transform: translateY(-2px);
        }

        .events-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 30px;
            align-items: stretch;
        }

        .event-card {
            border-radius: 12px;
            box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
            overflow: hidden;
            position: relative;
            height: 380px;
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
            border: 1px solid var(--border-color);
        }

        .event-card:hover {
            transform: translateY(-8px);
            box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
        }
        .event-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}
.event-card-link:focus .event-card,
.event-card-link:hover .event-card {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    transform: translateY(-10px) scale(1.02);
}
.event-card-link .btn-details {
    pointer-events: none; /* Pour éviter le double-clic sur le bouton, tout le lien est cliquable */
}

        .event-card img {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
            z-index: 1;
        }

        .event-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 50%, rgba(0,0,0,0) 100%);
            z-index: 2;
            pointer-events: none;
        }

        .event-info {
            padding: 20px;
            position: relative;
            z-index: 3;
            color: var(--white);
            text-align: left;
            display: flex;
            flex-direction: column;
            gap: 8px;
            flex-grow: 1;
            justify-content: flex-end;
        }

        .event-info h3 {
            color: var(--white);
            margin-bottom: 10px;
            font-size: 1.5rem;
            font-weight: 700;
            line-height: 1.3;
            text-shadow: 0 1px 4px rgba(0,0,0,0.8);
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .event-dates {
            font-size: 0.9rem;
            color: rgba(255, 255, 255, 0.9);
            margin-bottom: 15px;
            font-weight: 500;
            text-shadow: 0 1px 3px rgba(0,0,0,0.7);
        }

        .event-dates i {
            margin-right: 8px;
            color: var(--primary-green);
        }

        .btn-details {
            display: inline-block;
            background: var(--primary-green);
            color: #fff;
            padding: 10px 20px;
            border-radius: 8px;
            text-decoration: none;
            font-weight: 600;
            transition: background 0.3s ease, transform 0.2s ease;
            text-align: center;
            margin-top: auto;
            align-self: flex-start;
            box-shadow: 0 2px 8px rgba(56, 161, 105, 0.2);
        }

        .btn-details:hover {
            background: var(--secondary-green);
            transform: translateY(-2px);
        }
        
.pagination-controls {
    display: flex;
    justify-content: center;
    margin-top: 50px;
    margin-bottom: 20px;
}

.pagination {
    list-style: none;
    display: flex;
    padding: 0;
    margin: 0;
    border-radius: 8px;
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    overflow: hidden;
}

.page-item {
    margin: 0;
}

.page-link {
    display: block;
    padding: 12px 18px;
    text-decoration: none;
    color: var(--primary-blue);
    font-weight: 600;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    border-right: 1px solid var(--border-color);
}

.page-item:last-child .page-link {
    border-right: none;
}

.page-link:hover {
    background-color: var(--light-gray);
    color: var(--primary-green);
}

.page-item.active .page-link {
    background-color: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
    cursor: default;
}

.page-item.active .page-link:hover {
    background-color: var(--primary-blue);
    color: var(--white);
}

.page-item.disabled .page-link {
    color: #a0aec0;
    pointer-events: none;
    background-color: var(--white);
    opacity: 0.6;
}

/* --- Footer --- */
footer {
  background-color: var(--dark-gray);
  color: var(--white);
  padding: 2rem 0;
  text-align: center;
}

.footer-section a {
  color: var(--white);
  font-size: 1.5rem;
  margin: 0 0.5rem;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--secondary-green);
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Section Contact */
.footer-section {
  background-color: var(--dark-gray);
  color: var(--white);
  padding: 3rem 0;
  text-align: center;
}

.footer-section h3 {
  margin-bottom: 1rem;
  color: var(--white);
}

.footer-section p {
  margin-bottom: 0.5rem;
}

.footer-section i {
  margin-right: 0.5rem;
  color: var(--secondary-green);
}

@media (max-width: 768px) {
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        border-radius: 0;
        box-shadow: none;
    }

    .page-item {
        margin: 5px 2px;
    }

    .page-item:first-child .page-link,
    .page-item:last-child .page-link {
        border-radius: 5px;
    }

    .page-link {
        border-right: 1px solid var(--border-color);
        padding: 10px 14px;
        font-size: 0.9rem;
    }

    .page-item:last-child .page-link {
        border-right: 1px solid var(--border-color);
    }
}

        .loading,
        .no-items-found,
        .error-message {
            text-align: center;
            padding: 40px 20px;
            font-size: 1.2rem;
            color: var(--text-color-medium);
            grid-column: 1 / -1;
            font-weight: 500;
        }

        .error-message {
            color: #e53e3e;
            font-weight: 600;
        }

        /* Responsive styles */
        @media (max-width: 992px) {
            .all-events-container {
                padding: 4rem 3rem;
                margin: 4rem 2rem;
            }
        }

        @media (max-width: 768px) {
            .section-header h1 {
                font-size: 2rem;
            }

            .section-subtitle {
                font-size: 1rem;
            }

            .search-bar {
                flex-direction: column;
                gap: 15px;
            }

            .search-bar input[type="text"] {
                max-width: 90%;
            }

            .search-bar button {
                width: 70%;
                max-width: 250px;
            }

            .events-grid {
                grid-template-columns: 1fr;
                gap: 20px;
            }

            .event-card {
                height: 350px;
            }

            .event-info {
                padding: 15px;
            }

            .event-info h3 {
                font-size: 1.3rem;
            }
        }

        @media (max-width: 576px) {
            .all-events-container {
                padding: 3rem 2rem;
                margin: 3rem 1rem;
                border-radius: 16px;
            }
        }

        
.activity-btn {
    display: inline-block;
    padding: 10px 22px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--white);
    text-decoration: none;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all 0.4s ease;
    box-shadow: 0 4px 10px rgba(56, 161, 105, 0.3);
}

.activity-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(56, 161, 105, 0.5);
}

.activity-btn.active {
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(56, 161, 105, 0.6);
}

@media (max-width: 576px) {
    .activity-btn {
        padding: 8px 18px;
        font-size: 0.95rem;
    }
}