/* Events Archive Styles */
.events-archive-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Tabs Navigation */
.events-tabs-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.events-tabs {
    display: flex;
    border-radius: 50px;
    padding: 4px;
    border: 3px solid #272727;
}

.events-tab {
    background: transparent;
    border: none;
    padding: 16px 24px;
    border-radius: 46px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    text-align: center;
}

.events-tab:hover {
    color: #333;
}

.events-tab.active {
    background: #333;
    color: white;
}

/* Header */
.events-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #333;
    color: white;
    padding: 15px 25px;
    margin-bottom: 0;
    border-radius: 8px 8px 0 0;
}

.events-header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.calendar-navigation {
    display: flex;
    gap: 10px;
}

.nav-arrow {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.nav-arrow:hover {
    background: rgba(255, 255, 255, 0.1);
}

.current-period {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: white;
}

.events-header-right {
    display: flex;
    align-items: center;
}

/* Multi-Filter Dropdown */
.multi-filter-container {
    position: relative;
}

.multi-filter-trigger {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 180px;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.multi-filter-trigger:hover {
    background: rgba(255, 255, 255, 0.15);
}

.multi-filter-trigger.active {
    background: rgba(255, 255, 255, 0.2);
}

.filter-arrow {
    transition: transform 0.2s ease;
}

.multi-filter-trigger.active .filter-arrow {
    transform: rotate(180deg);
}

.multi-filter-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.multi-filter-dropdown.active {
    display: block;
}

.filter-option {
    padding: 0;
    border-bottom: 1px solid #f0f0f0;
}

.filter-option:last-child {
    border-bottom: none;
}

.filter-option label {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    cursor: pointer;
    margin: 0;
    transition: background-color 0.2s ease;
    gap: 8px;
    font-weight: 600;
}

.filter-option label:hover {
    background: #f8f9fa;
}

.filter-option input[type="checkbox"] {
    margin: 0;
    accent-color: #007cba;
    flex-shrink: 0;
}

.category-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #007cba;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.selected-category,
.selected-categories {
    display: flex;
    align-items: center;
    gap: 4px;
}

.selected-categories .category-color-dot {
    margin-right: 2px;
}

.selected-categories .category-color-dot:last-of-type {
    margin-right: 4px;
}

/* Adjust dot size in button trigger */
.multi-filter-trigger .category-color-dot {
    width: 10px;
    height: 10px;
}

.filter-label {
    color: #333;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.3;
    flex: 1;
}

/* Ensure consistent font-weight for all filter labels */
.multi-filter-dropdown .filter-label,
.month-header-filter .filter-label {
    font-weight: 600;
}

/* Month header filter styling */
.month-header-filter .multi-filter-trigger {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 180px;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.month-header-filter .multi-filter-trigger:hover {
    background: rgba(255, 255, 255, 0.15);
}

.month-header-filter .multi-filter-trigger.active {
    background: rgba(255, 255, 255, 0.2);
}

.month-header-filter .filter-arrow {
    transition: transform 0.2s ease;
}

.month-header-filter .multi-filter-trigger.active .filter-arrow {
    transform: rotate(180deg);
}

.month-header-filter .multi-filter-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.month-header-filter .multi-filter-dropdown.active {
    display: block;
}


/* Tab Content */
.events-content {
    position: relative;
}

.events-tab-content {
    display: none;
}

.events-tab-content.active {
    display: block;
}

/* Calendar View */
.calendar-grid {
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
}

.calendar-day-header {
    padding: 15px 10px;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: auto;
}

.calendar-day {
    border-right: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 8px;
    position: relative;
    background: white;
    overflow: hidden;
}

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

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

.calendar-day.today {
    background: #f0f8ff;
}

.day-number {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
}

.calendar-day.empty .day-number {
    color: #ccc;
}

.day-events {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.calendar-event {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 3px 6px;
    border-radius: 4px;
    background: rgba(0, 124, 186, 0.1);
    border-left: 3px solid #007cba;
    font-size: 10px;
    line-height: 1.3;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 2px;
    min-height: 18px;
}

.calendar-event .event-title, .calendar-event .event-time {
    font-size: 11px;
    margin: 0px;
}

.calendar-event:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.event-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #007cba;
    flex-shrink: 0;
    margin-top: 2px;
}

.event-content {
    flex: 1;
    min-width: 0;
}

.event-title {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
    hyphens: auto;
    margin-bottom: 1px;
}

.event-time {
    font-size: 9px;
    color: #666;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* List View */
.events-list-container {
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
}

/* Month sections for all events list */
.events-list-container.all-events {
    border-top: 1px solid #ddd;
    border-radius: 8px;
    margin-top: 20px;
}

.month-section {
    border-bottom: 2px solid #f0f0f0;
}

.month-section:last-child {
    border-bottom: none;
}

.month-header {
    background: #333;
    color: white;
    padding: 15px 25px;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    position: initial;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.month-header.first-month-header {
    border-radius: 8px 8px 0 0;
}

.month-name {
    flex: 1;
}

.month-header-filter {
    display: flex;
    align-items: center;
}

.month-header-filter .category-filter {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    min-width: 180px;
}

.month-header-filter .category-filter option {
    color: #333;
    background: white;
}

.event-list-item {
    display: grid;
    grid-template-columns: 80px 1fr 170px 150px;
    gap: 20px;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    align-items: center;
    transition: background-color 0.2s ease;
}

.event-list-item:hover {
    background: #f8f9fa;
}

.event-list-item:last-child {
    border-bottom: none;
}

.event-date-column {
    text-align: center;
}

.event-date-number {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    line-height: 1;
}

.event-date-day {
    font-size: 12px;
    text-transform: uppercase;
    color: #666;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.event-date-range {
    font-size: 10px;
    color: #999;
    margin-top: 4px;
}

.event-date-start,
.event-date-end {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 4px;
  line-height: 1;
}

.event-date-start .day,
.event-date-end .day{
  font-weight: 600;
  font-size: 1.1em;
}

.event-details-column {
    min-width: 0; /* Prevents grid item from overflowing */
}

.event-title {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.event-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.event-title a:hover {
    color: var(--uicore-primary-color);
}

.event-location {
    font-size: 14px;
    color: #666;
    margin-top: 4px;
}

.event-category-column {
    text-align: center;
}

.event-category {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: 15px;
    border: 1px solid #007cba;
    color: #007cba;
    background-color: rgba(0, 124, 186, 0.1);
    text-shadow: none;
    box-shadow: none;
    transition: all 0.2s ease;
}

.event-category:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.event-time-column {
    text-align: right;
}

.event-time {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.view-times-link {
    color: #007cba;
    text-decoration: none;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.view-times-link:hover {
    color: #005a87;
    text-decoration: underline;
}

/* List View Filter Header - Never reloaded */
.list-filter-header {
    margin-bottom: 0;
}

.list-filter-header .events-list-container {
    margin-top: 0;
    border-radius: 8px 8px 0 0;
    border-bottom: none;
}

.events-list-content {
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
}

.events-list-content .month-header {
    border-radius: 0;
}

.events-list-content .month-section:first-child .month-header {
    border-top: 1px solid #eee;
}

/* Filter section styling */
.filter-section {
    border-bottom: none !important;
}

.no-events-with-filter {
    padding: 40px;
    text-align: center;
    background: white;
}

.no-events-with-filter p {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 16px;
}

.no-events-with-filter small {
    color: #999;
    font-size: 14px;
}

/* No Events Message */
.no-events {
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 40px;
    text-align: center;
}

.no-events p {
    margin: 0;
    color: #666;
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .events-archive-container {
        padding: 15px;
    }
    
    .events-tabs {
        flex-direction: column;
        border-radius: 8px;
    }
    
    .events-tab {
        border-radius: 4px;
        margin: 2px;
    }
    
    .events-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .events-header-left {
        justify-content: center;
    }
    
    .calendar-body {
        grid-auto-rows: 80px;
    }
    
    .calendar-event {
        font-size: 10px;
    }
    
    .event-list-item {
        grid-template-columns: 60px 1fr;
        grid-template-rows: auto auto;
        gap: 10px;
        padding: 15px;
    }
    
    .event-date-column {
        grid-row: 1 / 3;
    }
    
    .event-details-column {
        grid-column: 2;
    }
    
    .event-category-column,
    .event-time-column {
        grid-column: 2;
        text-align: left;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .current-period {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .calendar-body {
        grid-auto-rows: 60px;
    }
    
    .calendar-event {
        font-size: 9px;
        padding: 1px 2px;
    }
    
    .day-events {
        max-height: 45px;
    }
    
    .event-date-number {
        font-size: 24px;
    }
}


/* Indicateur de récurrence */
.recurring-indicator {
    display: inline-block;
    background: rgba(0, 124, 186, 0.1);
    color: #007cba;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border: 1px solid rgba(0, 124, 186, 0.3);
    margin-top: 2px;
}

/* Style pour le bouton "View times" (qu'il soit un lien ou un bouton) */
.view-times-link {
    color: #007cba;
    text-decoration: none;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    transition: color 0.2s ease;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
}

.view-times-link:hover {
    color: #005a87;
    text-decoration: underline;
}

.view-times-link:focus {
    outline: 1px dotted #007cba;
    outline-offset: 2px;
}

/* Amélioration visuelle pour les événements récurrents */
.event-list-item.recurring-event {
    border-left: 3px solid rgba(0, 124, 186, 0.3);
    padding-left: 22px;
}

.event-list-item.recurring-event:hover {
    border-left-color: #007cba;
}

/* Style pour grouper visuellement les occurrences du même événement */
.event-list-item[data-recurring-group]:not(:first-of-type) {
    border-top: 1px dashed #e0e0e0;
}

.event-list-item[data-recurring-group]:first-of-type {
    position: relative;
}

.event-list-item[data-recurring-group]:first-of-type::before {
    content: "";
    position: absolute;
    left: -25px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, transparent, #007cba, transparent);
    opacity: 0.3;
}

