* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    position: relative;
    font-family: Arial, sans-serif;
    background-color: #044b07;
    color: #333;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
    margin: 1rem;
}

body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('img/background.perse.jpg');
    background-repeat: repeat-y;
    background-size: 100%; 
    z-index: -1;
    opacity:50%;
}

.main-container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* En-tête */
header {
    color: #fff;
    padding: 0.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    position: relative;
}

header h1 {
    font-size: 7rem;
    flex-grow: 1;
    text-align: center;
    font-family: "Rowdies";
    font-weight: 400;
    text-shadow: 4px 4px 4px #9e6f09;
    top: 0;
    left: 50%;
}

header .logo {
    width: 5rem;
    height: 5rem;
    border-radius: 10%;
}

.liste-musiques {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    justify-content: center;
    padding: 1.25rem;
    margin: 0 auto;
}

.music-item {
    display: flex;
    position: relative;
    justify-content: flex-start;
    align-items: flex-start;
    width: 90%; /* Largeur augmentée */
    max-width: 1000px; /* Largeur maximale augmentée */
    background-size: cover;
    padding: 5%;
    margin: 5%;
    height: 35rem; /* Hauteur augmentée */
    border: 2px solid transparent; /* Bordure transparente */
    background-clip: padding-box;
    border-image: linear-gradient(to right, #ff8c00, #ffcc00) 1; /* Bordure dégradée */
    background-color: transparent;

    /* Ajout de l'ombre */
    box-shadow: 4px 4px 10px rgba(181, 129, 17, 0.8); /* Ombre portée */
}

.music-item .cover {
    width: 50%; /* Largeur augmentée */
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
}

.music-item .text-box {
    position: relative;
    width: 100%;
    max-width: 500px; /* Largeur maximale augmentée */
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 5px;
    padding: 2rem;
    margin-left: 5%;
    margin-right: 5%;
}

.music-item h2 {
    font-weight: bold;
    color: #ffcc00;
    text-shadow: 4px 4px 4px #0a4f05;
}

.music-item p {
    margin: 0.625rem 0;
}

.icon-spotify, .icon-youtube {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    width: 3rem;
    height: 3rem;
}

.icon-spotify {
    right: 5rem;
}

.play-pause {
    position: absolute;
    bottom: 0.5rem;
    left: 20%;
    background-color: #ffcc00;
    border: none;
    color: #000;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 25px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.play-pause:hover {
    background-color: #e6b800;
    transform: scale(1.05);
}

.play-pause:active {
    transform: scale(0.95);
}

    .show-credits {
        position: absolute;
        bottom: 1rem; 
        left: 570px;
        background-color: #1a670a;
        border: none;
        color: #fff;
        padding: 0.75rem 1.5rem;
        cursor: pointer;
        font-size: 1rem;
        border-radius: 25px;
        transition: background-color 0.3s ease, transform 0.2s ease;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    
    .show-credits:hover {
        background-color: #153908;
        transform: scale(1.05);
    }
    
    .show-credits:active {
        transform: scale(0.95);
    }

.credits {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 2rem;
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.credits.show {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.credits h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #333;
    text-align: center;
}

.credits p {
    margin: 0.5rem 0;
    font-size: 1rem;
    color: #555;
}

.credits p strong {
    color: #333;
}

.close-credits {
    display: block;
    margin: 1.5rem auto 0;
    background-color: #ffcc00;
    border: none;
    color: #000;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 25px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.close-credits:hover {
    background-color: #e6b800;
    transform: scale(1.05);
}

.close-credits:active {
    transform: scale(0.95);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.overlay.show {
    display: block;
}

/* Formulaire */
#formulaireMusique {
    background-color: #fff;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 1000px;
    margin: 2rem auto;
}

#formulaireMusique h2.form-title {
    text-align: center;
    margin: 0 auto 1.5rem;
    width: 100%;
}

#formulaireMusique .form-group {
    margin-bottom: 1.5rem;
}

#formulaireMusique label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #333;
}

#formulaireMusique input,
#formulaireMusique textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#formulaireMusique input:focus,
#formulaireMusique textarea:focus {
    border-color: #ff8c00;
    box-shadow: 0 0 8px rgba(255, 140, 0, 0.5);
    outline: none;
}

#formulaireMusique textarea {
    resize: vertical;
    min-height: 120px;
}

#formulaireMusique button[type="submit"] {
    background: linear-gradient(to right, #ff8c00, #ffcc00);
    border: none;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: block;
    margin: 1.5rem auto 0;
}

#formulaireMusique button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

#formulaireMusique button[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Champs obligatoires */
#formulaireMusique .required {
    color: #ff0000;
    font-weight: bold;
}

/* Pied de page */
footer {
    background-color: #222;
    color: #fff;
    padding: 2rem 1rem;
    text-align: center;
    width: 100%;
    margin-top: 2rem;
    border-top: 2px solid #ffcc00;
    position: relative;
}

footer section {
    max-width: 800px;
    margin: 0 auto;
}

footer h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #ffcc00;
    text-transform: uppercase;
    letter-spacing: 1px;
}

footer p {
    font-size: 1rem;
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 1rem;
}

footer a {
    color: #ffcc00;
    text-decoration: underline;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #fff;
}

footer .linkedin-logo {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    transition: transform 0.3s ease;
}

footer .linkedin-logo img {
    width: 40px;
    height: auto;
}

footer .linkedin-logo img:hover {
    transform: scale(1.1);
}

#previewUserMusique {
    background-color: #fff;
    border: 2px solid #ffcc00;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 2rem auto;
    max-width: 600px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

#previewUserMusique h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 1rem;
}

#previewUserMusique audio {
    width: 100%;
    margin-bottom: 1rem;
}

#previewUserMusique p {
    font-size: 1rem;
    color: #555;
    margin-bottom: 1rem;
}

#previewUserMusique img {
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* Media Queries pour le responsive design */
@media (max-width: 1200px) {
    header h1 {
        font-size: 5rem;
    }

    .music-item {
        width: 90%;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 3rem;
    }

    .music-item {
        width: 100%;
        padding: 2%;
        margin: 2%;
        height: 30rem; /* Hauteur réduite pour les écrans moyens */
    }

    .music-item .cover {
        width: 100%; /* Pleine largeur sur les écrans moyens */
    }

    .music-item .text-box {
        max-width: 100%; /* Pleine largeur sur les écrans moyens */
    }

    .play-pause {
        left: 10%;
    }

    .show-credits {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 480px) {
    /* Réorganiser le contenu pour que le texte soit en dessous des couvertures */
    .music-item {
        flex-direction: column; /* Empiler les éléments verticalement */
        align-items: center; /* Centrer les éléments */
        height: auto; /* Ajuster la hauteur automatiquement */
        padding: 1rem; /* Réduire le padding */
        margin: 1rem 0; /* Réduire la marge */
    }

    .music-item .cover {
        width: 80%; /* Réduire la largeur de la couverture */
        height: auto; /* Conserver le ratio hauteur/largeur */
        margin-bottom: 1rem; /* Espacement entre la couverture et le texte */
    }

    .music-item .text-box {
        width: 100%; /* Pleine largeur */
        margin-left: 0; /* Supprimer la marge gauche */
        margin-right: 0; /* Supprimer la marge droite */
        padding: 1rem; /* Réduire le padding */
        text-align: center; /* Centrer le texte */
    }

    /* Réduire la taille des icônes Spotify et YouTube */
    .icon-spotify, .icon-youtube {
        width: 2rem; /* Réduire la largeur */
        height: 2rem; /* Réduire la hauteur */
    }

    .icon-spotify {
        right: 4rem; /* Ajuster la position */
    }

    /* Ajuster la taille et la position des boutons */
    .play-pause {
        position: static; /* Retirer le positionnement absolu */
        margin: 1rem auto; /* Centrer le bouton */
        width: 80%; /* Réduire la largeur */
        font-size: 0.9rem; /* Réduire la taille du texte */
        padding: 0.5rem 1rem; /* Ajuster le padding */
    }

    .show-credits {
        position: static; /* Retirer le positionnement absolu */
        margin: 1rem auto; /* Centrer le bouton */
        width: 80%; /* Réduire la largeur */
        font-size: 0.9rem; /* Réduire la taille du texte */
        padding: 0.5rem 1rem; /* Ajuster le padding */
        transform: none; /* Supprimer toute transformation */
        left: auto; /* Réinitialiser la position gauche */
        bottom: auto; /* Réinitialiser la position basse */
    }
}