.ws-evenements-archive__header {
    padding: 2rem 0;
    border-bottom: 1px solid var(--sporsora-light-border);
}

.ws-evenements-archive__filters {
    display: flex;
    gap: 0.8rem;

    @media (max-width: 767px) {
        flex-direction: column;

        & .ws-evenements-archive__filter {
            font-size: 1.2rem;
            border-radius: 0.8rem;
        }
    }
}

.ws-evenements-archive .ws-evenements-archive__filter {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1.6rem;
    color: var(--sporsora-quinary-color);
    cursor: pointer;
    font-size: 1.4rem;
    font-weight: 700;
    border-radius: 50rem;
    border: 1px solid var(--sporsora-light-border);
    transition: color 0.2s, border-color 0.2s;

    &:hover {
        color: var(--sporsora-black-color);
        border-color: var(--sporsora-quinary-color);
    }

    &.ws-active {
        color: white;
        background-color: var(--sporsora-primary-color);
        border: 0;
    }

    @media (max-width: 767px) {
        border-radius: 0.8rem;
    }
}

.ws-evenements-archive__events {
    padding: 6.4rem 0;
}

.ws-evenements-archive__events.ws-evenements-archive__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.4rem;

    @media (max-width: 1023px) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    @media (max-width: 639px) {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }

    & .ws-evenements-archive__event {
        position: relative;
        display: flex;
        flex-direction: column;
        background-color: white;
        border-radius: 1.2rem;
        overflow: hidden;
        border: 1px solid var(--sporsora-light-border);
        transition-duration: 0.15s, 0.6s, 0.6s;
        transition-timing-function: ease, ease, ease;
        transition-property: box-shadow, opacity, transform;


        &:hover {
            box-shadow: var(--sporsora-card-shadow);

            & .ws-evenements-archive__title {
                color: var(--sporsora-primary-color);
            }

            & .ws-evenements-archive__thumbnail-container img {
                transform: scale(1.05);
            }
        }

        & .ws-evenements-archive__date {
            position: absolute;
            top: 1.2rem;
            left: 1.2rem;
            display: flex;
            flex-direction: column;
            align-items: center;
            border-radius: 0.8rem;
            padding: 0.8rem 1.2rem;
            background-color: white;
            z-index: 10;

            & .ws-evenements-archive__day {
                color: var(--sporsora-text-color);
                font-size: 2.4rem;
                font-weight: 700;
            }

            & .ws-evenements-archive__month {
                text-transform: uppercase;
                font-size: 1.1rem;
                font-weight: 700;
                color: var(--sporsora-primary-color);
            }
        }
    }

    & .ws-evenements-archive__thumbnail-container {
        width: 100%;
        height: 19.2rem;
        overflow: hidden;
        flex-shrink: 0;
        background-color: var(--sporsora-secondary-color);

        & img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.5s ease;
        }
    }

    & .ws-past .ws-evenements-archive__thumbnail-container {
        filter: grayscale(100%);
    }

    & .ws-evenements-archive__past {
        position: absolute;
        top: 1.2rem;
        right: 1.2rem;
        padding: 0.4rem 1rem;
        font-size: 1rem;
        font-weight: 700;
        text-transform: uppercase;
        line-height: 1.5rem;
        color: var(--sporsora-quinary-color);
        background-color: var(--sporsora-secondary-bg-color);
        border-radius: 50rem;
        z-index: 10;
    }

    & .ws-evenements-archive__content {
        height: 100%;
        display: flex;
        flex-direction: column;
        gap: 0.8rem;
        padding: 2rem;
    }

    & .ws-evenements-archive__title {
        flex: 1;
        color: var(--sporsora-text-color);
        font-size: 1.8rem;
        font-weight: 700;
        transition: color 0.15s ease;
    }

    & .ws-evenements-archive__excerpt {
        font-weight: 500;
        color: var(--sporsora-quinary-color);
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        overflow: hidden;
    }

    & .ws-evenements-archive__location {
        font-size: 1.1rem;
        font-weight: 500;
        color: var(--sporsora-quinary-color);
    }

    & .ws-evenements-archive__restricted {
        --restriction-color: #047857;

        display: flex;
        align-items: center;
        gap: 0.6rem;
        color: var(--restriction-color);
        border: 1px solid color-mix(in srgb, var(--restriction-color) 20%, white);
        background-color: color-mix(in srgb, var(--restriction-color) 5%, transparent);
        font-size: 1.1rem;
        font-weight: 700;
        padding: 0.6rem 1rem;
        margin-bottom: 0.8rem;
        border-radius: 0.6rem;

        &.ws-restricted {
            --restriction-color: #e16309;
        }
    }

    & .ws-evenements-archive__btn {
        height: 3.6rem;
        width: 100%;
    }
}

.ws-evenements-archive__events.ws-evenements-archive__calendar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;

    @media (max-width: 1279px) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    @media (max-width: 1023px) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    @media (max-width: 639px) {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }

    & .ws-evenements-archive__month-item {
        border-radius: 1.2rem;
        border: 1px solid var(--sporsora-light-border);
        background-color: white;
        overflow: hidden;

        &.ws-no-events {
            border-color: color-mix(in srgb, var(--sporsora-secondary-color) 50%, transparent);
            background-color: color-mix(in srgb, var(--sporsora-secondary-bg-color) 30%, transparent);

            & .ws-evenements-archive__month-header {
                color: var(--sporsora-quinary-color);
                background-color: var(--sporsora-secondary-bg-color);
            }
        }

        &:not(.ws-no-events):hover {
            border-color: var(--sporsora-primary-bg-color);
            box-shadow: var(--sporsora-card-shadow);
        }
    }

    & .ws-evenements-archive__month-header {
        display: flex;
        justify-content: space-between;
        font-size: 1.4rem;
        font-weight: 700;
        padding: 1.2rem 2rem;
        color: white;
        background-color: var(--sporsora-text-color);
    }

    & .ws-evenements-archive__month-header.ws-no-events {
        color: var(--sporsora-quinary-color);
        background-color: var(--sporsora-quaternary-color);
    }

    & .ws-evenements-archive__month-title {
        font-size: 1.4rem;
        font-weight: 600;
        text-transform: uppercase;
    }

    & .ws-evenements-archive__event-count {
        font-size: 1.1rem;
        font-weight: 600;
        padding: 0.2rem 0.8rem;
        color: white;
        border-radius: 50rem;
        background-color: var(--sporsora-primary-color);
    }

    & .ws-evenements-archive__events {
        padding: 1.6rem;
    }

    & .ws-evenements-archive__no-events {
        font-size: 1.2rem;
        font-weight: 500;
        font-style: italic;
        color: color-mix(in srgb, var(--sporsora-quinary-color) 60%, transparent);
    }

    & .ws-evenements-archive__events > .ws-evenements-archive__event:not(:first-child) {
        margin-top: 1.2rem;
        padding-top: 1.2rem;
        border-top: 1px solid color-mix(in srgb, var(--sporsora-light-border) 50%, transparent);
    }

    & .ws-evenements-archive__event {
        display: flex;
        align-items: center;
        gap: 1.2rem;

        &:hover .ws-evenements-archive__event-title {
            color: var(--sporsora-primary-color);
        }
    }

    & .ws-evenements-archive__event-day {
        flex-shrink: 0;
        width: 4rem;
        height: 4rem;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.4rem;
        font-weight: 700;
        border-radius: 0.5rem;
        color: var(--sporsora-primary-color);
        background-color: var(--sporsora-primary-bg-color);
    }


    & .ws-evenements-archive__month-content {
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 0.4rem;
    }

    & .ws-evenements-archive__event-title {
        font-family: var(--sporsora-font-titles);
        font-weight: 700;
        font-size: 1.4rem;
        color: var(--sporsora-text-color);
        transition: color 0.2s ease;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
    }

    & .ws-evenements-archive__tags {
        display: flex;
        align-items: center;
        gap: 0.8rem;

        & .sporsora-tag {
            display: flex;
            align-items: center;
            font-size: 1rem;
            border-radius: 0.4rem;
        }
    }

    & .ws-evenements-archive__restricted-icon {
        font-size: 1.2rem;
        color: var(--sporsora-quinary-color);
    }

    & .ws-evenements-archive__location {
        font-size: 1.2rem;
        color: var(--sporsora-quinary-color);
    }
}