/* Tribe Events Calendar Shortcode Styles */
/* Version 1.1.0 - Compatible avec Elementor Kit de Style */

.tribe-calendar-wrapper {
    max-width: 100%;
    margin: 20px auto;
    font-family: var(--e-global-typography-text-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);
    font-size: var(--e-global-typography-text-font-size, 16px);
}

/* Navigation */
.tribe-calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--e-global-color-secondary, #f8f9fa);
    border-radius: 8px;
}

.tribe-calendar-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: var(--e-global-color-text, #333);
    font-family: var(--e-global-typography-primary-font-family, inherit);
}

.tribe-calendar-prev,
.tribe-calendar-next {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: var(--e-global-color-text, #333);
    transition: all 0.3s ease;
    font-family: var(--e-global-typography-text-font-family, inherit);
}

.tribe-calendar-prev:hover,
.tribe-calendar-next:hover {
    background: var(--e-global-color-primary, #007bff);
    color: #fff;
    border-color: var(--e-global-color-primary, #007bff);
}

/* Grille du calendrier */
.tribe-calendar-grid {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.tribe-calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--e-global-color-primary, #007bff);
    color: #fff;
}

.tribe-calendar-day-name {
    padding: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    font-family: var(--e-global-typography-secondary-font-family, inherit);
}

.tribe-calendar-day-name:last-child {
    border-right: none;
}

.tribe-calendar-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #fff;
}

.tribe-calendar-day {
    min-height: 100px;
    padding: 8px;
    border-right: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
    position: relative;
    transition: background-color 0.2s ease;
}

.tribe-calendar-day:nth-child(7n) {
    border-right: none;
}

.tribe-calendar-day.empty {
    background: #f8f9fa;
}

/* Dates passées - grisées */
.tribe-calendar-day.past {
    background: #f5f5f5;
    opacity: 0.6;
}

.tribe-calendar-day.past .tribe-calendar-day-number {
    color: #999;
}

.tribe-calendar-day.past .tribe-calendar-event {
    opacity: 0.7;
}

.tribe-calendar-day:not(.empty):not(.past):hover {
    background: #f8f9fa;
}

.tribe-calendar-day.today {
    background: var(--e-global-color-accent, #fff3cd);
    border: 2px solid var(--e-global-color-primary, #ffc107);
}

.tribe-calendar-day.today .tribe-calendar-day-number {
    background: var(--e-global-color-primary, #ffc107);
    color: #fff;
}

.tribe-calendar-day-number {
    display: inline-block;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    border-radius: 50%;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 5px;
    color: var(--e-global-color-text, #333);
}

.tribe-calendar-day.has-events .tribe-calendar-day-number {
    background: var(--e-global-color-primary, #007bff);
    color: #fff;
}

.tribe-calendar-day.past.has-events .tribe-calendar-day-number {
    background: #999;
}

/* Événements */
.tribe-calendar-events {
    margin-top: 5px;
}

.tribe-calendar-event {
    display: block;
    padding: 4px 6px;
    margin-bottom: 4px;
    background: var(--e-global-color-secondary, #e7f3ff);
    border-left: 3px solid var(--e-global-color-primary, #007bff);
    border-radius: 3px;
    font-size: 12px;
    text-decoration: none;
    color: var(--e-global-color-text, #333);
    transition: all 0.2s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--e-global-typography-text-font-family, inherit);
}

.tribe-calendar-event:hover {
    background: var(--e-global-color-primary, #007bff);
    color: #fff;
    transform: translateX(2px);
}

.tribe-calendar-event .event-time {
    font-weight: 600;
    margin-right: 4px;
}

.tribe-calendar-event .event-title {
    font-size: 11px;
}

/* Responsive */
@media (max-width: 768px) {
    .tribe-calendar-day {
        min-height: 80px;
        padding: 5px;
    }
    
    .tribe-calendar-day-number {
        width: 24px;
        height: 24px;
        line-height: 24px;
        font-size: 12px;
    }
    
    .tribe-calendar-event {
        font-size: 10px;
        padding: 3px 4px;
    }
    
    .tribe-calendar-event .event-title {
        font-size: 10px;
    }
    
    .tribe-calendar-title {
        font-size: 18px;
    }
    
    .tribe-calendar-day-name {
        font-size: 12px;
        padding: 8px 4px;
    }
}

@media (max-width: 480px) {
    .tribe-calendar-day {
        min-height: 60px;
        padding: 3px;
    }
    
    .tribe-calendar-event .event-time {
        display: none;
    }
    
    .tribe-calendar-event {
        white-space: normal;
        line-height: 1.2;
    }
}

/* Variantes de couleurs pour différentes catégories d'événements */
.tribe-calendar-event.category-1 {
    background: var(--e-global-color-secondary, #e7f3ff);
    border-left-color: var(--e-global-color-primary, #007bff);
}

.tribe-calendar-event.category-2 {
    background: #d4edda;
    border-left-color: #28a745;
}

.tribe-calendar-event.category-3 {
    background: #fff3cd;
    border-left-color: #ffc107;
}

.tribe-calendar-event.category-4 {
    background: #f8d7da;
    border-left-color: #dc3545;
}
