/**
 * Événements Liste Widget - Styles
 */

/* Container */
.elw-container {
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Header */
.elw-header {
    padding: 50px 20px;
    text-align: center;
}

.elw-header-title {
    font-size: 36px;
    font-weight: 700;
    color: #1a1a4e;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.elw-header-subtitle {
    font-size: 16px;
    color: #ffffff;
    margin: 0;
    font-weight: 400;
}

/* Filters */
.elw-filters {
    padding: 20px;
}

.elw-filters-inner {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.elw-month-nav {
    display: flex;
    gap: 8px;
}

.elw-nav-arrow {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.elw-nav-arrow:hover {
    color: #1a1a4e;
}

.elw-filter-btn {
    background-color: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 0 !important;
    padding: 10px 18px;
    font-size: 14px;
    color: #333333;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.elw-filter-btn.active {
    background-color: #fff;
    border-color: #fff !important;
    color: #2a7a9b !important;
}

.elw-filter-btn.active:hover {
    background-color: #1a5a7b;
    border-color: #1a5a7b;
}

.elw-filter-btn svg {
    transition: transform 0.3s ease;
}

/* Dropdowns */
.elw-period-dropdown,
.elw-category-dropdown {
    position: relative;
}

.elw-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.elw-period-dropdown.active .elw-dropdown-menu,
.elw-category-dropdown.active .elw-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(5px);
}

.elw-period-dropdown.active .elw-filter-btn svg,
.elw-category-dropdown.active .elw-filter-btn svg {
    transform: rotate(180deg);
}

.elw-dropdown-menu a {
    display: block;
    padding: 12px 18px;
    color: #333333;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.elw-dropdown-menu a:hover {
    background-color: #f5f5f5;
}

.elw-dropdown-menu a.active {
    background-color: #e8f4f8;
    color: #1a1a4e;
    font-weight: 600;
}

/* Events Section */
.elw-events-section {
    background-color: #8fb3c4;
    padding: 30px 20px;
}

.elw-section-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a4e;
    margin: 40px 0 25px 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.elw-events-list {
    max-width: 1200px;
    margin: 0 auto;
}

/* No Events Message */
.elw-no-events {
    background-color: rgba(0, 0, 0, 0.1);
    padding: 25px;
    text-align: center;
    color: #fff !important;
    font-size: 18px;
    border-radius: 4px;
}

/* Event Item */
.elw-event-item {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    padding: 25px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.elw-event-item:last-child {
    border-bottom: none;
}

/* Date Badge */
.elw-date-badge {
    flex-shrink: 0;
    width: 70px;
    text-align: center;
    color: #1a1a4e;
}

.elw-date-month {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
}

.elw-date-day {
    display: block;
    font-size: 46px;
    font-weight: 700;
    line-height: 1.1;
    color: #fff;
}

.elw-date-year {
    display: block;
    font-size: 14px;
    color: #fff;
}

/* Event Content */
.elw-event-content {
    flex: 1;
    min-width: 0;
}

.elw-event-meta {
    font-size: 13px;
    color: #555555;
    margin-bottom: 8px;
}

.elw-event-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.elw-event-title a {
    color: #1a1a4e;
    text-decoration: none;
    transition: color 0.3s ease;
}

.elw-event-title a:hover {
    color: #3a3a7e;
}

.elw-event-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: #444444;
}

/* Event Image */
.elw-event-image {
    flex-shrink: 0;
    width: 220px;
}

.elw-event-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
    transition: transform 0.3s ease;
}

.elw-event-image a:hover img {
    transform: scale(1.03);
}

/* Loading State */
.elw-events-list.loading {
    opacity: 0.5;
    pointer-events: none;
}

.elw-events-list.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #1a1a4e;
    border-top-color: transparent;
    border-radius: 50%;
    animation: elw-spin 0.8s linear infinite;
}

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

/* Responsive */
@media (max-width: 992px) {
    .elw-event-image {
        width: 180px;
    }
}

@media (max-width: 768px) {
    .elw-header-title {
        font-size: 28px;
    }

    .elw-filters-inner {
        justify-content: center;
    }

    .elw-event-item {
        flex-wrap: wrap;
        gap: 20px;
    }

    .elw-date-badge {
        width: 60px;
    }

    .elw-date-day {
        font-size: 32px;
    }

    .elw-event-content {
        flex: 1 1 calc(100% - 90px);
    }

    .elw-event-image {
        width: 100%;
        order: 3;
    }

    .elw-event-image img {
        max-width: 300px;
    }

    .elw-event-title {
        font-size: 18px;
    }
}

@media (max-width: 576px) {
    .elw-header {
        padding: 35px 15px;
    }

    .elw-header-title {
        font-size: 24px;
        letter-spacing: 1px;
    }

    .elw-filters {
        padding: 15px;
    }

    .elw-filters-inner {
        gap: 10px;
    }

    .elw-filter-btn {
        padding: 8px 14px;
        font-size: 13px;
    }

    .elw-events-section {
        padding: 20px 15px;
    }

    .elw-section-title {
        font-size: 20px;
    }

    .elw-event-item {
        flex-direction: column;
        gap: 15px;
    }

    .elw-date-badge {
        width: auto;
        display: flex;
        align-items: baseline;
        gap: 8px;
    }

    .elw-date-day {
        font-size: 28px;
    }

    .elw-event-content {
        width: 100%;
    }
}

/* Past Events Section */
.elw-past-events {
    padding-top: 0;
}

.elw-past-events .elw-section-title {
    margin-top: 20px;
}

/* Accessibility */
.elw-filter-btn:focus,
.elw-nav-arrow:focus {
    outline: 2px solid #1a1a4e;
    outline-offset: 2px;
}

.elw-dropdown-menu a:focus {
    background-color: #e8f4f8;
    outline: none;
}
