/**
 * Styles pour l'affichage des événements de Sainte-Maxime
 * Plugin: Sainte-Maxime Events Display
 * Version: 1.0.0
 */

/* Container principal */
.sm-events-container {
    width: 100%;
    margin: 20px 0;
}

/* État de chargement */
.sm-events-loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

/* Grille d'événements */
.sm-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin: 20px 0;
}

/* Liste d'événements */
.sm-events-list .sm-event-card {
    display: flex;
    margin-bottom: 25px;
    flex-direction: row;
}

.sm-events-list .sm-event-image {
    width: 280px;
    min-width: 280px;
    height: auto;
}

.sm-events-list .sm-event-content {
    flex: 1;
}

/* Carte d'événement */
.sm-event-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.sm-event-card:hover {
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* Image de l'événement */
.sm-event-image {
    width: 100%;
    height: 220px;
    background: #f5f5f5;
    overflow: hidden;
}

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

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

/* Contenu de l'événement */
.sm-event-content {
    padding: 20px;
}

/* Date de l'événement */
.sm-event-date {
    color: #0066cc;
    font-weight: bold;
    font-size: 15px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Titre de l'événement */
.sm-event-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: #222;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sm-event-card:hover .sm-event-title {
    color: #0066cc;
}

/* Catégorie */
.sm-event-category {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
    font-weight: 500;
}

/* Description de l'événement */
.sm-event-description {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Métadonnées (lieu, heure) */
.sm-event-meta {
    font-size: 13px;
    color: #777;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

/* Lien "Voir les détails" */
.sm-event-link {
    display: inline-block;
    background: #0066cc;
    color: #fff !important;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none !important;  /* ← AJOUTEZ !important */
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.sm-event-link:hover {
    background: #0052a3;
    transform: translateX(3px);
    text-decoration: none !important;  /* ← ET ICI aussi */
}

/* Pied de page des événements */
.sm-events-footer {
    text-align: center;
    padding: 20px;
    color: #888;
    font-size: 14px;
    font-style: italic;
    border-top: 1px solid #eee;
    margin-top: 20px;
}

/* Messages d'erreur */
.sm-events-error {
    background: #fff3cd;
    border: 1px solid #ffc107;
    padding: 20px;
    border-radius: 6px;
    color: #856404;
    text-align: center;
}

.sm-events-error strong {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .sm-events-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .sm-events-list .sm-event-card {
        flex-direction: column;
    }
    
    .sm-events-list .sm-event-image {
        width: 100%;
        height: 200px;
    }
    
    .sm-event-title {
        font-size: 18px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .sm-events-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .sm-events-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
