/* Style global */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&family=Roboto:wght@400;700&display=swap');

body, html {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', Arial, sans-serif; /* Police principale */
    color: white;
    background-color: #000;
    box-sizing: border-box; /* Applique box-sizing globalement */
}

*,
*::before,
*::after {
    box-sizing: inherit; /* Hérite de box-sizing */
}

/* Conteneur principal du player */
.player-container {
    position: relative;
    height: 90vh;
    width: 100%; /* S'assure qu'il occupe toute la largeur sans déborder */
    max-width: 1200px; /* Largeur maximale standard */
    margin: 0 auto; /* Centre horizontalement */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    overflow: hidden; /* Empêche les débordements internes */
}

/* Image de fond cadrée */
.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    overflow: hidden;
}

/* Pochette affichée en carré */
.cover {
    position: absolute;
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    height: 50%;
    max-height: 50vh;
    object-fit: cover;
    z-index: 10;
}

/* Dégradé noir sur la moitié inférieure */
.gradient-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0.5));
    z-index: 2;
}

/* Zone des informations et bouton */
.info-container {
    position: absolute;
    bottom: 15%;
    width: 100%;
    padding: 20px;
    text-align: center;
    z-index: 3;
    color: white;
}

.track-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
}

.track-artist {
    font-size: 1.2rem;
    margin-top: 5px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
}

.buy-link a {
    color: #FFD700;
    text-decoration: none;
    font-weight: bold;
}

/* Bouton play/pause */
.play-btn {
    margin-top: 20px;
    padding: 15px 30px;
    font-size: 1.5rem;
    border: none;
    background-color: #FFD700;
    color: black;
    border-radius: 30px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.play-btn:hover {
    background-color: #FFC107;
}

/* Zone du morceau suivant */
.next-track {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    z-index: 3;
}

.next-track img {
    max-width: 50px;
    max-height: 50px;
    border-radius: 5px;
    margin-right: 10px;
}

.next-track-info {
    text-align: left;
}

.next-track-title {
    font-size: 1rem;
    font-weight: bold;
    margin: 0;
}

.next-track-artist {
    font-size: 0.9rem;
    margin: 0;
}

footer{
    width: 300px;
    text-align: center;
    margin: auto;
}



/* Responsive pour mobile */
@media (max-width: 768px) {
    .player-container {
        width: 100%;
        margin: 0;
        padding: 0 10px; /* Ajoute un peu d'espace pour les petits écrans */
    }

    .info-block {
        width:100%;
        padding: 10px;
    }

    .track-title {
        font-size: 1.2rem;
    }

    .track-artist {
        font-size: 1rem;
    }

    .play-btn {
        font-size: 1.2rem;
    }

    .next-track-title {
        font-size: 0.9rem;
    }

    .next-track-artist {
        font-size: 0.8rem;
    }
}
