/* 1. Reset et Fondamentaux */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #0a0a0a; /* Noir profond */
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Empêche le scroll sur mobile */
}

/* 2. L'Overlay (Plein écran) */
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    cursor: pointer;
    transition: opacity 0.5s ease;
}

#overlay h2 {
    font-weight: 300;
    letter-spacing: 1px;
    text-align: center;
    padding: 20px;
}

/* 3. Conteneur Principal */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* 4. Zone du CD */
.cd-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    /* On utilise vmin pour que le CD s'adapte à la plus petite dimension */
    width: 80vmin;
    height: 80vmin;
    max-width: 500px;
    max-height: 500px;
    min-width: 280px;
    min-height: 280px;
    cursor: pointer;
    /* pointer-events est géré par le JS pour Safari */
}

.cd {
    width: 100%;
    height: 100%;
    background-image: url('/cover/cover.png');
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 255, 255, 0.1);
    position: relative;
    will-change: transform; /* Optimisation pour Safari */
}

/* Le trou au centre du CD */
.cd::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18%;
    height: 18%;
    background-color: #0a0a0a;
    border-radius: 50%;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 1);
}

/* 5. Bouton Mobile (Acheter les Stems) */
#mobile-buy-btn {
    display: none; /* Affiché par JS uniquement sur mobile */
    margin-top: 40px;
    padding: 14px 28px;
    background-color: #ffffff;
    color: #000000;
    text-decoration: none;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: transform 0.2s ease, background-color 0.2s ease;
    z-index: 10;
}

#mobile-buy-btn:active {
    transform: scale(0.95);
    background-color: #e0e0e0;
}

/* 6. Adaptations tablettes/ordinateurs */
@media (min-width: 1024px) {
    .cd-container:hover {
        /* Effet de profondeur au survol sur PC */
        filter: brightness(1.1);
    }
}
