/**
 * MGA Événements - Styles Frontend
 * Couleur principale : #009444 (vert MGA)
 */

/* ================================
   Grille des événements
   ================================ */

.mga-events-grid {
    display: grid;
    gap: 30px;
    margin: 30px 0;
}

/* Colonnes */
.mga-events-grid.mga-columns-1 {
    grid-template-columns: 1fr;
}

.mga-events-grid.mga-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.mga-events-grid.mga-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.mga-events-grid.mga-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Responsive */
@media (max-width: 992px) {
    .mga-events-grid.mga-columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .mga-events-grid.mga-columns-3,
    .mga-events-grid.mga-columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .mga-events-grid.mga-columns-2,
    .mga-events-grid.mga-columns-3,
    .mga-events-grid.mga-columns-4 {
        grid-template-columns: 1fr;
    }
}

/* ================================
   Élément événement
   ================================ */

.mga-event-item {
    position: relative;
}

.mga-event-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease;
}

.mga-event-link:hover {
    transform: translateY(-5px);
}

.mga-event-link:focus {
    outline: 2px solid #009444;
    outline-offset: 4px;
}

/* Image */
.mga-event-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 8px;
    background: transparent;
}

.mga-event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.mga-event-link:hover .mga-event-image img {
    transform: scale(1.05);
}

.mga-event-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
}

/* Contenu */
.mga-event-content {
    padding: 15px 0 0 0;
}

.mga-event-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    color: #1d2327;
}

.mga-event-link:hover .mga-event-title {
    color: #009444;
}

.mga-event-dates {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.mga-event-dates.mga-permanent {
    color: #009444;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ================================
   Pagination
   ================================ */

.mga-events-pagination {
    margin-top: 40px;
    text-align: center;
}

.mga-events-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    margin: 0 4px;
    background: #f0f0f0;
    border-radius: 4px;
    text-decoration: none;
    color: #1d2327;
    font-weight: 500;
    transition: all 0.2s ease;
}

.mga-events-pagination .page-numbers:hover {
    background: #009444;
    color: #fff;
}

.mga-events-pagination .page-numbers.current {
    background: #009444;
    color: #fff;
}

.mga-events-pagination .page-numbers.dots {
    background: transparent;
    cursor: default;
}

.mga-events-pagination .page-numbers.prev,
.mga-events-pagination .page-numbers.next {
    background: transparent;
    color: #009444;
}

.mga-events-pagination .page-numbers.prev:hover,
.mga-events-pagination .page-numbers.next:hover {
    background: #f0f0f0;
    color: #1d2327;
}

/* ================================
   Message "Aucun événement"
   ================================ */

.mga-no-events {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 8px;
    color: #666;
    font-size: 16px;
}

/* ================================
   Animations
   ================================ */

@keyframes mga-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mga-event-item {
    animation: mga-fade-in 0.4s ease forwards;
}

.mga-event-item:nth-child(1) { animation-delay: 0.05s; }
.mga-event-item:nth-child(2) { animation-delay: 0.1s; }
.mga-event-item:nth-child(3) { animation-delay: 0.15s; }
.mga-event-item:nth-child(4) { animation-delay: 0.2s; }
.mga-event-item:nth-child(5) { animation-delay: 0.25s; }
.mga-event-item:nth-child(6) { animation-delay: 0.3s; }
.mga-event-item:nth-child(7) { animation-delay: 0.35s; }
.mga-event-item:nth-child(8) { animation-delay: 0.4s; }
.mga-event-item:nth-child(9) { animation-delay: 0.45s; }
.mga-event-item:nth-child(10) { animation-delay: 0.5s; }
.mga-event-item:nth-child(11) { animation-delay: 0.55s; }
.mga-event-item:nth-child(12) { animation-delay: 0.6s; }
