/* ============================================
   STYLES GÉNÉRAUX
   ============================================ */

.ec-public-events,
.ec-check-dates {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* ============================================
   NOTIFICATIONS
   ============================================ */

.ec-notice {
    padding: 12px 15px;
    margin: 15px 0;
    border-left: 4px solid;
    border-radius: 4px;
}

.ec-notice-success {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.ec-notice-warning {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.ec-notice-error {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.ec-info-banner {
    background: #e3f2fd;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #0073aa;
}

/* ============================================
   FORMULAIRES DE FILTRES
   ============================================ */

.ec-filters-grid {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 16px;
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.ec-filter-group {
    flex: 1;
    min-width: 180px;
}

.ec-filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 13px;
    color: #495057;
}

.ec-filter-group select,
.ec-filter-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    background: white;
}

.ec-date-range {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ec-date-range input {
    flex: 1;
}

.ec-date-range span {
    color: #6c757d;
}

.ec-filter-actions {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

/* ============================================
   BOUTONS
   ============================================ */

.ec-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.3s ease;
}

.ec-btn-primary {
    background: #0073aa;
    color: white;
}

.ec-btn-primary:hover {
    background: #005a87;
    transform: translateY(-2px);
}

.ec-btn-secondary {
    background: #e9ecef;
    color: #495057;
}

.ec-btn-secondary:hover {
    background: #dee2e6;
}

.ec-btn-details,
.ec-btn-details-small {
    background: none;
    border: none;
    color: #0073aa;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.ec-btn-details:hover,
.ec-btn-details-small:hover {
    background: #e3f2fd;
}

.ec-btn-details-small {
    padding: 4px 12px;
    font-size: 12px;
}

/* ============================================
   GRILLE DES ÉVÉNEMENTS (CARDS)
   ============================================ */

.ec-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 25px;
}

.ec-event-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.ec-event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.ec-event-poster {
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.ec-event-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ec-poster-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
}

.ec-event-info {
    padding: 20px;
}

.ec-event-title {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a2e;
}

.ec-event-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.ec-meta-type {
    background: #e3f2fd;
    color: #0073aa;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.ec-meta-location {
    color: #6c757d;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ec-meta-venue {
    background: #f0f0f0;
    color: #555;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.ec-event-dates {
    display: flex;
    gap: 15px;
    background: #f8f9fa;
    padding: 12px;
    border-radius: 12px;
    margin: 12px 0;
}

.ec-date-badge {
    background: #0073aa;
    color: white;
    padding: 8px 12px;
    border-radius: 12px;
    text-align: center;
    min-width: 60px;
}

.ec-date-day {
    font-size: 22px;
    font-weight: bold;
    display: block;
    line-height: 1;
}

.ec-date-month {
    font-size: 12px;
    text-transform: uppercase;
}

.ec-date-details {
    font-size: 13px;
    color: #495057;
    line-height: 1.5;
}

.ec-event-desc {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
    margin: 12px 0;
}

.ec-event-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.ec-event-price {
    color: #28a745;
    font-weight: 600;
    font-size: 14px;
}

/* ============================================
   TABLEAUX (pour vérification des dates)
   ============================================ */

.ec-events-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.ec-events-table th,
.ec-events-table td {
    border: 1px solid #e9ecef;
    padding: 12px;
    text-align: left;
}

.ec-events-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.ec-events-table tbody tr:hover {
    background: #f8f9fa;
}

.ec-event-link {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.ec-event-link:hover {
    text-decoration: underline;
}

/* ============================================
   PAGINATION
   ============================================ */

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

.ec-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 4px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    text-decoration: none;
    color: #495057;
    transition: all 0.3s ease;
}

.ec-pagination .page-numbers.current {
    background: #0073aa;
    border-color: #0073aa;
    color: white;
}

.ec-pagination .page-numbers:hover:not(.current) {
    background: #e9ecef;
}

/* ============================================
   MODAL
   ============================================ */

.ec-modal {
    display: none;
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ec-modal-content {
    background-color: white;
    margin: 5% auto;
    width: 90%;
    max-width: 700px;
    border-radius: 20px;
    animation: slideDown 0.3s ease;
    max-height: 85vh;
    overflow-y: auto;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.ec-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px 20px 0 0;
}

.ec-modal-header h3 {
    margin: 0;
    color: white;
    font-size: 22px;
}

.ec-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: white;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.ec-modal-close:hover {
    opacity: 1;
}

.ec-modal-body {
    padding: 25px;
}

.ec-modal-event-poster {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 20px;
}

.ec-modal-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.ec-modal-section h4 {
    margin: 0 0 10px 0;
    color: #0073aa;
    font-size: 16px;
}

.ec-modal-info-row {
    display: flex;
    margin-bottom: 10px;
}

.ec-modal-label {
    font-weight: 600;
    width: 120px;
    color: #495057;
}

.ec-modal-value {
    flex: 1;
    color: #1a1a2e;
}

.ec-modal-contact {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    margin-top: 15px;
}

.ec-modal-social {
    display: inline-block;
    background: #1877f2;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    margin-top: 10px;
}

.ec-loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.ec-error {
    text-align: center;
    padding: 40px;
    color: #dc3545;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .ec-events-grid {
        grid-template-columns: 1fr;
    }
    
    .ec-filters-grid {
        flex-direction: column;
    }
    
    .ec-filter-group {
        width: 100%;
    }
    
    .ec-modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .ec-modal-info-row {
        flex-direction: column;
    }
    
    .ec-modal-label {
        width: auto;
        margin-bottom: 5px;
    }
    
    .ec-events-table {
        display: block;
        overflow-x: auto;
    }
}

/* ============================================
   FILTRES RÉTRACTABLES
   ============================================ */

.ec-filters-wrapper {
    margin-bottom: 30px;
}

.ec-filters-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.ec-filters-header:hover {
    opacity: 0.9;
}

.ec-filters-title {
    font-size: 16px;
}

.ec-filters-icon {
    transition: transform 0.3s ease;
    font-size: 14px;
}

.ec-filters-form.expanded + .ec-filters-header .ec-filters-icon {
    transform: rotate(180deg);
}

.ec-filters-form {
    display: none;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 0 0 16px 16px;
    margin-top: -5px;
}

.ec-filters-form.expanded {
    display: block;
}

/* Recherche textuelle */
.ec-filter-group input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    background: white;
}

/* Responsive */
@media (max-width: 768px) {
    .ec-filters-form {
        padding: 15px;
    }
}