/* Style moderne pour l'affichage en liste des événements - Type Billetterie */

/* Container principal */
.cdfef-event-list-container {
    width: 100%;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Header de la liste */
.cdfef-list-header {
    background: #f8f9fa;
    padding: 24px 32px;
    border-bottom: 1px solid #e5e7eb;
}

.cdfef-list-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 8px;
}

.cdfef-list-subtitle {
    font-size: 0.9375rem;
    color: #6b7280;
    margin: 0;
}

/* Wrapper avec scroll */
.cdfef-list-wrapper {
    max-height: 420px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Scrollbar custom */
.cdfef-list-wrapper::-webkit-scrollbar {
    width: 6px;
}

.cdfef-list-wrapper::-webkit-scrollbar-track {
    background: #f3f4f6;
}

.cdfef-list-wrapper::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.cdfef-list-wrapper::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Liste des événements */
.cdfef-event-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Item d'événement */
.cdfef-list-item {
    display: flex;
    align-items: center;
    padding: 20px 32px;
    border-bottom: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.cdfef-list-item:hover {
    background: #f9fafb;
}

.cdfef-list-item:last-child {
    border-bottom: none;
}

/* Date section */
.cdfef-list-date {
    flex: 0 0 100px;
    text-align: center;
    padding-right: 24px;
    border-right: 2px solid #e5e7eb;
    margin-right: 24px;
}

.cdfef-list-day {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    color: #1a1a1a;
}

.cdfef-list-month {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    margin-top: 4px;
}

.cdfef-list-year {
    display: block;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 2px;
}

/* Info section */
.cdfef-list-info {
    flex: 1;
    min-width: 0;
}

.cdfef-list-event-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 8px;
    line-height: 1.3;
}

.cdfef-list-event-title a {
    color: inherit;
    text-decoration: none;
}

.cdfef-list-event-title a:hover {
    color: #4267B2;
}

.cdfef-list-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 0.875rem;
    color: #6b7280;
}

.cdfef-list-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cdfef-list-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: #9ca3af;
}

/* Actions section */
.cdfef-list-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 24px;
    position: relative;
    z-index: 2;
}

/* Image de fond */
.cdfef-list-bg-image {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 40%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cdfef-list-bg-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, 
        rgba(255, 255, 255, 1) 0%, 
        rgba(255, 255, 255, 0.95) 30%,
        rgba(255, 255, 255, 0.8) 60%,
        rgba(255, 255, 255, 0.4) 100%);
}

.cdfef-list-item:hover .cdfef-list-bg-image {
    opacity: 1;
}

.cdfef-list-button {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 8px 16px !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
    font-family: inherit !important;
    line-height: 1.2 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.cdfef-list-button-primary {
    background: #4267B2 !important;
    color: white !important;
}

.cdfef-list-button-primary:hover {
    background: #365899 !important;
    transform: translateY(-1px) !important;
    color: white !important;
}

.cdfef-list-button-secondary {
    background: #f3f4f6 !important;
    color: #374151 !important;
    border: 1px solid #e5e7eb !important;
}

.cdfef-list-button-secondary:hover {
    background: #e5e7eb !important;
    color: #111827 !important;
}

.cdfef-list-button-icon {
    width: 16px;
    height: 16px;
}

/* Badge "Complet" ou autres statuts */
.cdfef-list-badge {
    position: absolute;
    top: 50%;
    right: 32px;
    transform: translateY(-50%);
    padding: 4px 12px;
    background: #fee2e2;
    color: #dc2626;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
}

.cdfef-list-badge.available {
    background: #d1fae5;
    color: #059669;
}

/* État vide */
.cdfef-list-empty {
    padding: 60px 32px;
    text-align: center;
    color: #6b7280;
}

.cdfef-list-empty-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    color: #d1d5db;
}

/* Footer avec lien "Voir tous" */
.cdfef-list-footer {
    background: #f8f9fa;
    padding: 16px 32px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.cdfef-list-view-all {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    color: #4267B2 !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    font-size: 0.9375rem !important;
    transition: all 0.2s ease !important;
}

.cdfef-list-view-all:hover {
    color: #365899 !important;
    transform: translateX(4px) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .cdfef-list-header,
    .cdfef-list-item,
    .cdfef-list-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .cdfef-list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .cdfef-list-date {
        flex: 0 0 auto;
        border-right: none;
        border-bottom: 2px solid #e5e7eb;
        padding-right: 0;
        padding-bottom: 16px;
        margin-right: 0;
        margin-bottom: 16px;
        width: 100%;
        display: flex;
        align-items: center;
        gap: 12px;
        text-align: left;
    }
    
    .cdfef-list-day {
        font-size: 1.5rem;
    }
    
    .cdfef-list-info {
        width: 100%;
    }
    
    .cdfef-list-meta {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .cdfef-list-actions {
        width: 100%;
        margin-left: 0;
        margin-top: 12px;
        justify-content: stretch;
    }
    
    .cdfef-list-button {
        flex: 1;
        justify-content: center;
    }
    
    .cdfef-list-badge {
        position: static;
        transform: none;
        display: inline-block;
        margin-top: 8px;
    }
}

@media (max-width: 480px) {
    .cdfef-list-actions {
        flex-direction: column;
    }
    
    .cdfef-list-button {
        width: 100%;
    }
}

/* Animation d'entrée */
.cdfef-list-item {
    animation: slideIn 0.3s ease forwards;
    opacity: 0;
}

.cdfef-list-item:nth-child(1) { animation-delay: 0.05s; }
.cdfef-list-item:nth-child(2) { animation-delay: 0.1s; }
.cdfef-list-item:nth-child(3) { animation-delay: 0.15s; }
.cdfef-list-item:nth-child(4) { animation-delay: 0.2s; }
.cdfef-list-item:nth-child(5) { animation-delay: 0.25s; }

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Indicateur de nouveauté */
.cdfef-list-item.new::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #4267B2;
}

/* Hover state amélioré */
.cdfef-list-item:hover .cdfef-list-event-title {
    color: #4267B2;
}

.cdfef-list-item:hover .cdfef-list-day {
    color: #4267B2;
}

/* Loading state */
.cdfef-list-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 32px;
}

.cdfef-list-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top-color: #4267B2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Mode compact (optionnel via attribut) */
.cdfef-event-list-container.compact .cdfef-list-item {
    padding: 12px 24px;
}

.cdfef-event-list-container.compact .cdfef-list-date {
    flex: 0 0 70px;
}

.cdfef-event-list-container.compact .cdfef-list-day {
    font-size: 1.25rem;
}

.cdfef-event-list-container.compact .cdfef-list-event-title {
    font-size: 1rem;
}

.cdfef-event-list-container.compact .cdfef-list-actions {
    gap: 8px;
}

.cdfef-event-list-container.compact .cdfef-list-button {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
}