/* Vignettes d'événements publiques : contenu, image, réservation et suivi. */
.event-card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 640px) {
    .event-card-grid {
        /* Au plus 4 colonnes : les affiches grandissent au lieu de se multiplier. */
        grid-template-columns: repeat(
            auto-fill,
            minmax(min(100%, max(200px, calc((100% - 3.75rem) / 4))), 1fr)
        );
    }
}

.event-card {
    position: relative;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--color-gray-200);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 180ms ease, border-color 180ms ease;
}

.event-card:hover {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.10);
}

.event-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.event-card-link:focus-visible {
    outline: 3px solid var(--color-primary-600, #0d9488);
    outline-offset: -3px;
    border-radius: inherit;
}

.event-card-image {
    position: relative;
    flex-shrink: 0;
    aspect-ratio: 210 / 297;
    overflow: hidden;
    background: #f4f5f2;
    border-bottom: 1px solid #edf0ed;
}

.event-card-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.event-card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    min-width: 0;
}

.event-card-title {
    margin: 0;
    color: #24332e;
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.35;
}

.event-card-link:hover .event-card-title {
    color: var(--color-primary-700, #0f766e);
}

.event-card-date,
.event-card-location {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    line-height: 1.3;
}

.event-card-date {
    color: #285c50;
    font-weight: 600;
}

.event-card-location {
    color: #52615b;
}

.event-card-title,
.event-card-date span,
.event-card-location span,
.event-card-description {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.event-card-date span,
.event-card-location span {
    flex: 1;
}

.event-card-date svg,
.event-card-location svg,
.event-card-price svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.event-card-description {
    margin: 0;
    color: #6b746f;
    font-size: 0.8125rem;
    line-height: 1.4;
}

.event-card-price {
    align-self: flex-start;
    margin-top: auto;
    padding: 5px 9px;
    border-radius: 8px;
    background: #edf6f1;
    font-size: 0.75rem;
    line-height: 1.4;
}

.event-card-booking-ribbon {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.25rem;
    padding: 0.55rem 3.5rem 0.55rem 0.9rem;
    color: #ffffff;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
}

.event-card-booking-ribbon-text {
    display: block;
    max-width: 100%;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-card-booking-ribbon-online-payment {
    background: linear-gradient(90deg, var(--color-primary-600), var(--color-primary-700));
}

.event-card-booking-ribbon-booking-open {
    background: linear-gradient(90deg, var(--color-teal-500), var(--color-teal-700));
}

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

/* Bouton cœur toggle pour les favoris - UNIQUEMENT pour les cartes */
.event-card .favorite-btn {
    transition: all 0.2s ease;
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 10;
    padding: 0.5rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    transform: scale(1);
}

.event-card .favorite-btn:hover {
    transform: scale(1.1);
}

/* État non favori - UNIQUEMENT pour les cartes */
.event-card .favorite-btn[data-is-favorited="false"] {
    color: #6b7280; /* text-gray-500 */
}

.event-card .favorite-btn[data-is-favorited="false"]:hover {
    color: #374151; /* text-gray-700 */
    background: rgba(243, 244, 246, 0.95) !important;
}

/* État favori - UNIQUEMENT pour les cartes */
.event-card .favorite-btn[data-is-favorited="true"] {
    color: #dc2626; /* text-red-600 */
}

.event-card .favorite-btn[data-is-favorited="true"]:hover {
    color: #b91c1c; /* text-red-700 */
    background: rgba(254, 226, 226, 0.95) !important;
}

@media (max-width: 768px) {
    .event-card-booking-ribbon {
        min-height: 2rem;
        padding: 0.45rem 3rem 0.45rem 0.75rem;
    }

    .event-card-booking-ribbon-text {
        font-size: 0.6875rem;
        letter-spacing: 0.03em;
    }

    .event-card .favorite-btn {
        padding: 0.375rem;
    }

    .event-card .favorite-btn:hover {
        transform: scale(1.05);
    }
}

@media (prefers-reduced-motion: reduce) {
    .event-card,
    .event-card .favorite-btn {
        transition: none;
    }

    .event-card .favorite-btn:hover {
        transform: none;
    }
}
