/**
 * HelloAsso Events - Styles CSS
 * Version: 1.0.0
 */

/* Messages d'erreur et notifications */
.helloasso-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
}

.helloasso-no-events {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
    text-align: center;
}

/* Container principal */
.helloasso-events {
    margin: 30px 0;
}

/* Mode Liste */
.helloasso-events-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.helloasso-events-list .helloasso-event-card {
    display: flex;
    flex-direction: row;
    gap: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.helloasso-events-list .helloasso-event-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.helloasso-events-list .helloasso-event-image {
    flex: 0 0 250px;
    min-height: 200px;
}

.helloasso-events-list .helloasso-event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.helloasso-events-list .helloasso-event-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Mode Grille */
.helloasso-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.helloasso-events-grid .helloasso-event-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.helloasso-events-grid .helloasso-event-card:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    transform: translateY(-4px);
}

.helloasso-events-grid .helloasso-event-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.helloasso-events-grid .helloasso-event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.helloasso-events-grid .helloasso-event-card:hover .helloasso-event-image img {
    transform: scale(1.05);
}

.helloasso-events-grid .helloasso-event-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Éléments communs */
.helloasso-event-title {
    font-size: 1.5em;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #333;
    line-height: 1.3;
}

.helloasso-event-date {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 0.95em;
    margin-bottom: 12px;
}

.helloasso-event-date .dashicons {
    color: #2196F3;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.helloasso-event-description {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
    flex: 1;
}

.helloasso-event-footer {
    display: flex;
    justify-content: flex-start;
    margin-top: auto;
}

.helloasso-event-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #2196F3;
    color: #fff !important;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none !important;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.95em;
}

.helloasso-event-link:hover {
    background-color: #1976D2;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
    transform: translateY(-1px);
}

.helloasso-event-link .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .helloasso-events-list .helloasso-event-card {
        flex-direction: column;
    }
    
    .helloasso-events-list .helloasso-event-image {
        flex: none;
        width: 100%;
        height: 200px;
    }
    
    .helloasso-events-grid {
        grid-template-columns: 1fr;
    }
    
    .helloasso-event-title {
        font-size: 1.3em;
    }
}

@media screen and (max-width: 480px) {
    .helloasso-event-title {
        font-size: 1.2em;
    }
    
    .helloasso-event-content {
        padding: 15px;
    }
    
    .helloasso-event-link {
        width: 100%;
        justify-content: center;
    }
}

/* Animation de chargement */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.helloasso-event-card {
    animation: fadeIn 0.4s ease-out;
}

.helloasso-event-card:nth-child(1) { animation-delay: 0.05s; }
.helloasso-event-card:nth-child(2) { animation-delay: 0.1s; }
.helloasso-event-card:nth-child(3) { animation-delay: 0.15s; }
.helloasso-event-card:nth-child(4) { animation-delay: 0.2s; }
.helloasso-event-card:nth-child(5) { animation-delay: 0.25s; }
