
/**
 * CSS pour le filtre de catégories d'événements avec responsive amélioré
 * Ajout de styles pour les événements passés
 */

/* Styles de base */
.tec-category-filter {
    margin-bottom: 40px;
}

/* Conteneur pour les boutons de catégorie */
.tec-category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
	align-items: flex-start;
}

.tec-category-item {
    flex: 0 0 100px;   /* largeur fixe */
    height: 120px;     /* hauteur fixe */
    display: flex;
}

.tec-category-button {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* on empile en haut */
    background: none;
    border: 2px solid #92C9B1;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    color: #333333;
    overflow: hidden; /* rien ne dépasse */
}

/* Image : taille fixe */
.tec-category-button img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 50%;
	margin-bottom: 10px;
}

/* Texte : zone fixe */
.tec-category-button span {
    font-weight: 600;
    font-size: 14px; /* adaptatif, min 10px max 14px */
    line-height: 1.2em;
    text-align: center;
    height: 2.5em;            /* fixe la zone texte */
    overflow: hidden;         /* coupe le surplus */
    text-overflow: ellipsis;  /* ajoute "…" si trop long */
    display: block;
}



.tec-category-button:hover {
    border-color: #92C9B1;
	background-color: #EBF7F2;
    transform: translateY(-3px);
	color: #333333;
}

.tec-category-button.active {
    border-color: #92C9B1;
    background-color: #EBF7F2;
}



/* Style pour l'icône du bouton "Tous les événements" */
.tec-icon-wrapper {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    border-radius: 50%;
    margin-bottom: 10px;
}

.tec-icon-wrapper .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: #23282d;
}



/* Navigation vers la vue calendrier */
.tec-view-navigation {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 15px;
}

.tec-calendar-view-btn {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background-color: #f5f5f5;
    border: 1px solid #73BA9B;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.tec-calendar-view-btn:hover {
    background-color: #EBF7F2;
    text-decoration: none;
    color: #000;
}

.tec-view-nav-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 5px;
    vertical-align: middle;
    line-height: 1;
}

/* Style pour le lien "voir plus" */
.tec-event-see-more {
    display: inline-block;
    margin-top: 10px;
    font-size: 16px;
    font-weight: 500;
    color: #333333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tec-event-see-more:hover {
    color: #9D5876;
    text-decoration: underline;
}

.tec-event-see-more .dashicons {
    font-size: 16px;
    width: 16px;
    margin-left: 5px;
    vertical-align: middle;
}


 /* Style pour la pagination */
.tec-pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    gap: 5px;
}
        
.tec-pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;       
}
        
.tec-pagination-btn.active {
	background-color: #A45175;
	color: white;
	border-color: #A45175;
}
        
.tec-pagination-btn:hover:not(.active) {
	background-color: #EBF7F2;
	color: #333333;
}

.tec-pagination-btn.disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.tec-pagination-btn .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}


/* Styles pour la bascule entre événements à venir et passés */
.tec-events-toggle {
    display: flex;
    margin-bottom: 20px;
}

.tec-events-toggle-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 15px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tec-events-toggle-btn:first-child {
    border-radius: 4px 0 0 4px;
}

.tec-events-toggle-btn:last-child {
    border-radius: 0 4px 4px 0;
}

.tec-events-toggle-btn.active {
    background-color: #EBF7F2;
    color: #333333;
    border-color: #73BA9B;
}

.tec-events-toggle-btn:hover:not(.active) {
    background-color: #EBF7F2;
	border-color: #73BA9B;
	color: #333333;
}

.tec-events-toggle-btn .dashicons {
    margin-right: 5px;
}

/* Styles pour la vue liste - version desktop */
.tec-events-list {
    margin-top: 20px;
}

.tec-event-list-item {
    display: flex;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    margin-bottom: 15px;
    overflow: hidden;
    background-color: #fff;
    transition: all 0.3s ease;
}

.tec-event-list-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

/* Style spécial pour les événements passés */
.tec-past-event {
    opacity: 0.8;
    background-color: #f9f9f9;
}

.tec-past-event .tec-event-date-block {
    background-color: #333;
	color: white;
}

.tec-past-event:hover {
    opacity: 0.95;
}

.tec-event-date-block {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #92C9B1;
    color: #333333;
    padding: 10px 15px;
    min-width: 80px;
    text-align: center;
}

.tec-event-weekday {
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.tec-event-day {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
}

.tec-event-month {
    font-size: 14px;
    text-transform: uppercase;
}

.tec-event-list-details {
    flex: 1;
    padding: 15px;
    min-width: 0; /* Pour que le texte puisse être tronqué */
}

.tec-event-title {
    margin-top: 0;
    margin-bottom: 10px;
}

.tec-event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 10px 0;
    color: #666;
    font-size: 14px;
}

.tec-meta-item {
    display: inline-flex;
    align-items: center;
}

.tec-meta-item .dashicons {
    margin-right: 5px;
}

.tec-separator {
    margin: 0 5px;
}

.tec-event-excerpt {
    margin: 10px 0;
    color: #333333;
    line-height: 1.5;
}

.tec-event-list-image {
    width: 150px;
    overflow: hidden;
	display: block;
}

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

.tec-event-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background-color: #f5f5f5;
    color: #aaa;
}

/* Message quand aucun événement n'est disponible */
.tec-no-events {
    padding: 20px;
    background-color: #f5f5f5;
    border-radius: 6px;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Styles responsive pour mobile */
@media (max-width: 768px) {
    /* Boutons de catégorie */
    .tec-category-item {
        flex: 0 0 120px;
        height: 140px;
    }
	
	.tec-event-title {
    font-size: 28px !important;
}
    
    .tec-icon-wrapper, .tec-category-button img {
        width: 60px;
        height: 60px;
    }
    
    .tec-icon-wrapper .dashicons {
        font-size: 30px;
        width: 30px;
        height: 30px;
    }
    
    /* Boutons de basculement événements */
    .tec-events-toggle {
        width: 100%;
    }
    
    .tec-events-toggle-btn {
        flex: 1;
        justify-content: center;
        padding: 8px 5px;
        font-size: 15px;
    }
    
    /* Vue calendrier */
    .tec-view-navigation {
        margin-bottom: 15px;
    }
    
    /* RESTRUCTURATION VERTICALE POUR MOBILE */
    .tec-event-list-item {
        flex-direction: column;
    }
    
    /* Bloc de date avec orientation horizontale sur mobile */
    .tec-event-date-block {
        width: 100%;
        flex-direction: row;
        justify-content: center;
        padding: 8px;
    }
    
    .tec-event-weekday, .tec-event-day, .tec-event-month {
        margin: 0 5px;
    }
    
    .tec-event-day {
        font-size: 20px;
    }
    
    /* Détails de l'événement */
    .tec-event-list-details {
        padding: 12px;
        width: 100%;
    }
    
    /* Métadonnées sur une seule colonne */
    .tec-event-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .tec-separator {
        display: none; /* Suppression des séparateurs verticaux */
    }
    
    /* Image en bas en pleine largeur */
    .tec-event-list-image {
        width: 100%;
        height: 160px;
        order: 3;
    }
    
    .tec-event-no-image {
        height: 120px;
    }
    
    /* Titre plus petit sur mobile */
    .tec-event-title {
        font-size: 18px;
    }
}

/* Ajustements fins pour les très petits écrans */
@media (max-width: 480px) {
    .tec-category-buttons {
        gap: 10px;
    }
    
    .tec-category-item {
        flex: 0 0 100px;
        height: 120px;
    }
    
    .tec-icon-wrapper, .tec-category-button img {
        width: 50px;
        height: 50px;
    }
    
    .tec-event-list-image {
        height: 140px;
    }
    
    .tec-event-meta {
        font-size: 15px;
    }
    
    .tec-events-toggle-btn {
        font-size: 15px;
    }
    
    .tec-events-toggle-btn .dashicons {
        font-size: 16px;
        width: 16px;
        height: 16px;
    }
}

.tec-event-mobile-image {
    display: none;
}


@media (max-width: 768px) {
    .tec-event-mobile-image {
        display: block;
        margin: 15px 0;
	}

    .tec-event-list-image {
        display: none;
    }
}