.rc-thematique-episodes-item.musique {
    --theme-clr: #CBB4E8;
}

.rc-thematique-episodes-item.art-culture {
    --theme-clr: #F8DAEA;
}

.rc-thematique-episodes-item.jeunesse {
    --theme-clr: #FEEF88;
}

.rc-thematique-episodes-item.societe {
    --theme-clr: #C1DCF5;
}

.rc-thematique-episodes-item.environnement {
    --theme-clr: #BCD3C5;
}

.rc-thematique-episodes-container {
    overflow: hidden !important;
}

#backward {
    margin-bottom: 24px !important;
    transform: rotate(180deg);
    background-image: url(/wp-content/uploads/2026/07/arrow-dark.svg);
    height: 26px !important;
    width: 26px !important;
    display: block;
    border: 0 !important;
    background-size: cover !important;
    font-size: 0;
    cursor: pointer;
    user-select: none;
}

#forward {
    margin-inline: -2px 20px;
    background-image: url(/wp-content/uploads/2026/07/arrow-dark.svg);
    height: 26px !important;
    width: 26px !important;
    display: block;
    border: 0 !important;
    background-size: cover !important;
    font-size: 0;
    cursor: pointer;
    user-select: none;
}

.rc-thematique-episodes-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 9.5%;
    gap: 20px;

    transition: transform .35s ease;
    will-change: transform;

    & a {
        color: #FFFFFF80 !important;
        font-family: 'Poppins';
        font-size: 12px;
        font-weight: 600;
        line-height: 1.3em;
        text-transform: uppercase;

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

        text-decoration: none !important;
        outline: none !important;
    }

    & .rc-thematique-episodes-item {
        display: grid;
        grid-template-rows: auto 1fr;
        transition: 500ms;

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

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

        & .featured-container {
            aspect-ratio: 1;
            width: 100%;
            position: relative;
            box-shadow: 4px 4px 0 0 var(--theme-clr);
            transition: 500ms;

            &:hover {
                box-shadow: 4px 4px 0 0 #fff;
            }

            &::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);
                    opacity: 0;
                }

                &.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);
                }
            }
        }

        &:hover .audio::before {
            opacity: 1;
        }

        & .title {
            line-height: 1.3;
            margin-top: 15px;
        }
    }
}

@media screen and (width <=767px) {
    .rc-thematique-episodes-container {
        overflow: hidden;
    }

    .rc-thematique-episodes-grid {
        grid-auto-flow: column;
        grid-auto-columns: 33%;
        grid-template-columns: 33%;
    }
}
