.rc-archive-podcast-tag-item.musique {
    --theme-clr: #CBB4E8;
}

.rc-archive-podcast-tag-item.art-culture {
    --theme-clr: #F8DAEA;
}

.rc-archive-podcast-tag-item.jeunesse {
    --theme-clr: #FEEF88;
}

.rc-archive-podcast-tag-item.societe {
    --theme-clr: #C1DCF5;
}

.rc-archive-podcast-tag-item.environnement {
    --theme-clr: #BCD3C5;
}

.rc-archive-podcast-tag-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;

    & a {
        text-decoration: none !important;
        outline: none !important;
    }

    & .rc-archive-podcast-tag-item {
        border: 2px solid #000;
        background: #fff;
        display: grid;
        grid-template-rows: auto 1fr;
        transition: 500ms;

        &:hover {
            transform: translate3d(-2px, -2px, 0.1px) !important;
            box-shadow: 8px 8px 0px 0px #000 !important;
        }

        &:hover .podcast-infos {
            background: var(--theme-clr);
        }

        &:hover .featured-container::before {
            opacity: .85;
        }

        & .featured-container {
            aspect-ratio: 1;
            width: 100%;
            position: relative;

            &::before {
                content: '';
                position: absolute;
                inset: 0;
                background: var(--theme-clr);
                opacity: 0;
                z-index: 1;
                transition: 500ms;
            }

            & img {
                width: 100%;
                height: 100%;
                object-fit: cover;
                filter: grayscale(1)
            }

            & .audio {
                position: absolute;
                inset: 0;
                cursor: pointer;
                z-index: 2;

                &::before {
                    content: '';
                    background: center no-repeat url(https://radiogrenouille.com/wp-content/uploads/2026/07/play.png);
                    background-size: contain;
                    width: 28px;
                    height: auto;
                    aspect-ratio: 1;
                    position: absolute;
                    top: 50%;
                    left: 50%;
                    transform: translate(-50%, -50%);
                    filter: invert(1);
                }

                &.pause::before {
                    background: center no-repeat url(https://radiogrenouille.com/wp-content/uploads/2026/07/pause.png);
                    background-size: contain;
                }

                &:hover::before {
                    filter: invert(0);
                }
            }

            & a.category {
                z-index: 9;
                position: absolute;
                bottom: 0;
                left: 20px;
                width: fit-content;
                color: #2f2f2f;
                border: 1px solid #000;
                background: linear-gradient(to right, #2f2f2f), linear-gradient(to right, var(--theme-clr, #fff));
                background-repeat: no-repeat;
                background-position: bottom right, bottom left;
                background-size: 0% 100%, 100% 100%;
                transition: background-size 300ms, color 500ms;

                font-family: 'Poppins';
                font-size: 13px;
                font-weight: 500;
                line-height: 1.5;
                letter-spacing: 0.1em;
                padding: 2px 10px;

                &:hover {
                    color: var(--theme-clr);
                    background-position: bottom left, bottom left;
                    background-size: 100% 100%, 100% 100%;
                }
            }
        }

        & .podcast-infos {
            border-top: 2px solid #000;
            display: flex;
            flex-flow: column wrap;
            justify-content: space-between;
            transition: 500ms;

            & .title {
                padding: 15px 15px 0;

                & a {
                    display: -webkit-box;
                    overflow: hidden;
                    -webkit-box-orient: vertical;
                    -webkit-line-clamp: 3;

                    color: #000;
                    font-family: 'Poppins';
                    font-size: 19px;
                    font-weight: 600;
                    line-height: 1.3;
                }
            }

            & .podcast-meta {
                border-top: 2px solid #000;
                display: grid;
                grid-template-columns: 1fr auto;

                & .date {
                    padding: 10px 5px 10px 20px;
                    border-right: 2px solid #000;

                    & p {
                        font-family: 'Poppins';
                        font-size: 16px;
                        font-weight: 500;
                        line-height: 1.4;
                    }
                }

                & .length {
                    padding: 10px 20px;

                    & p {
                        font-family: 'Poppins';
                        font-size: 16px;
                        font-weight: 400;
                        line-height: 1.4;
                    }
                }

                & p {
                    color: #000;
                    margin: 0;
                }
            }
        }
    }
}

.rc-archive-podcast-tag-pagination {
    display: flex;
    justify-content: end;
    gap: 2px;
    align-items: center;
    margin-top: 25px;
    color: #fff;

    & a {
        outline: none !important;
        text-decoration: none !important;
        color: #fff;
        font-family: 'Poppins';
        font-size: 16px;
        font-weight: 500;
        line-height: 1;
        padding: 0 4px 2px;
        background: linear-gradient(to right, #fff);
        background-repeat: no-repeat;
        background-position: bottom right;
        background-size: 0% 1px;
        transition: background-size 500ms;

        &.active {
            font-weight: 600;
            background-size: 100% 1px;
        }

        &:hover {
            background-position: bottom left;
            background-size: 100% 1px;
        }
    }
}

@media screen and (width <= 767px) {
    .rc-archive-podcast-tag-container {
        overflow: scroll;

        & .rc-archive-podcast-tag-grid {
            grid-auto-flow: column;
            grid-auto-columns: 70%;
            grid-template-columns: 70%;
        }
    }

    .rc-archive-podcast-tag-pagination {
        margin-top: 15px;
    }
}