@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

body {
    background: radial-gradient(circle at 20% 20%, #0f0f0f, #000000);
    background-attachment: fixed;
    font-family: "Poppins", sans-serif;
    color: white;
    margin: 0;
    padding: 0;
}

.discographie {
    padding: 0 2.5rem 2.5rem 2.5rem;
    text-align: center;

    .liste {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(17.5rem, 1fr));
        gap: 1.5rem;
        justify-content: center;
    }

    .disque {
        backdrop-filter: blur(1rem) saturate(180%);
        -webkit-backdrop-filter: blur(1rem) saturate(180%);
        background-color: rgba(255, 255, 255, 0.1);
        border-radius: 1.25rem;
        border: 0.063rem solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 0.5rem 2rem 0 rgba(31, 38, 135, 0.37);
        overflow: hidden;
        transition: transform 0.3s ease, box-shadow 0.3s ease;

        &:hover {
            transform: translateY(-0.313rem);
            box-shadow: 0 0.625rem 2.5rem rgba(0, 0, 0, 0.4);
        }
    }

    .pochette {
        width: 100%;
        height: 17.5rem;
        object-fit: cover;
        border-bottom: 0.063rem solid rgba(255,255,255,0.2);
    }

    .titre {
        padding: 1rem;
        text-align: left;

        /* -------- Animation du titre (défilement si trop long) -------- */
        p {
            margin: 0;
            font-size: 1.1rem;
            font-weight: 500;
            overflow: hidden;
            white-space: nowrap;
            position: relative;
            display: inline-block;
            width: 100%;

            span {
                display: block;
                font-size: 0.85rem;
                color: rgba(255,255,255,0.7);
                margin-top: 0.25rem;
                white-space: normal;

                &:first-child {
                    color: white;
                    font-size: 1rem;
                }
            }

            /* Texte défilant au survol */
            .scroll-text {
                display: inline-block;
                animation: none;
            }
            /* &:hover .scroll-text {
                animation: scroll-text 8s linear infinite;
            } */
        }
    }

    audio {
        width: 100%;
        margin-top: 0.625rem;
        max-height: 2.188rem;
        filter: invert(1) brightness(1.5);
    }

    .no-preview {
        margin-top: 0.625rem;
        padding: 0.75rem;
        text-align: center;
        font-size: 0.85rem;
        color: rgba(255,255,255,0.6);
        background: rgba(255, 255, 255, 0.08);
        border-radius: 0.75rem;
        border: 0.063rem solid rgba(255, 255, 255, 0.1);
    }

    .liens {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 1rem;

        padding: 1rem;
        border-top: 0.063rem solid rgba(255,255,255,0.1);

        a {
            display: flex;
            flex-direction: row;
            justify-content: center;
            align-items: center;

            background-color: var(--couleur-lien-disco);

            padding: 0.5rem;
            border-radius: 0.625rem;
            font-weight: 500;

            transition: all 300ms ease;
            text-decoration: none;

            svg {
                width: 1.25rem;
                height: 1.25rem;

                fill: var(--couleur-svg-lien);

                pointer-events: none;

                transition: fill 300ms ease;
            }

            span {
                transition: color 300ms ease;
                color: var(--couleur-lien-disco);
            }

            &:hover {
                transform: scale(1.1);
                background-color: var(--couleur-svg-lien);

                svg {
                    fill: var(--couleur-lien-disco);
                }
            }

            &.spotify-link {
                --couleur-lien-disco: #1db954;
                --couleur-svg-lien: white;
            }

            &.deezer-link {
                --couleur-lien-disco: #a53bff;
                --couleur-svg-lien: white;
            }

            &.youtube-link {
                --couleur-lien-disco: #ff0033;
                --couleur-svg-lien: white;
            }
        }
    }
}


@keyframes scroll-text {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* --------------------------------------------- */