:root {
    --bg-color: #0b0b0d;
    --card-bg: #16161a;
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --accent-gradient: linear-gradient(135deg, #a855f7 0%, #3b82f6 100%);
    --error-color: #ff4d4d;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Segoe UI', Tahoma, sans-serif;
    overflow-x: hidden;
}

header { 
    text-align: center; 
    padding: 4rem 1rem; }
h1 { 
    font-size: 3rem; 
    margin-bottom: 1rem; }

.h1suite { 
    color: #8b5cf6; }

.gradient-text { 
    background: var(--accent-gradient); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; }
.intro-text { 
    color: var(--text-muted); 
    max-width: 600px; 
    margin: 0 auto; }

#galerie-container {
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 2rem 0;
    cursor: grab; 
}

#galerie-container:active {
    cursor: grabbing;
}

#galerie-container::-webkit-scrollbar {
    height: 8px;
}

#galerie-container::-webkit-scrollbar-track {
    background: #0b0b0d;
    border-radius: 4px;
}

#galerie-container::-webkit-scrollbar-thumb {
    background: #333; 
    border-radius: 4px;
}

#galerie-container::-webkit-scrollbar-thumb:hover {
    background: #8b5cf6;
}

#galerie-track {
    display: flex;
    gap: 2rem;
    width: max-content;
    padding: 0 5vw; 
}

.source-album {
    display: block;       
    margin-top: auto;     
    padding-top: 1rem;    
    font-size: 0.75rem;   
    color: #666;          
    font-style: italic;   
    text-decoration: underline; 
    transition: color 0.3s;
}

.source-album:hover {
    color: #8b5cf6;
    text-decoration: underline;
    cursor: pointer; 
}

.album {
    flex: 0 0 300px;
    width: 300px;
    scroll-snap-align: center;
    background-color: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.album:hover { transform: translateY(-10px); border-color: rgba(139, 92, 246, 0.5); }

.album img {
    width: 100%;
    aspect-ratio: 1/1; 
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1rem;
    cursor: pointer;
}
.album h2 { 
    font-size: 1.2rem; 
    margin-bottom: 
    0.5rem; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; }
.album p { 
    color: var(--text-muted); 
    font-size: 0.9rem; 
    display: -webkit-box; 
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical; 
    overflow: hidden; }

.popup-invisible { display: none !important; }

/* --- MODALE (SCROLLABLE) --- */
.popup {
    position: fixed; 
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    backdrop-filter: blur(10px);
    
    /* C'est ICI que ça se joue : */
    overflow-y: auto; /* Active le scroll vertical SI nécessaire */
    
    display: flex;
    flex-direction: column;
    align-items: center;
    
    /* On enlève justify-content: center pour éviter que ça coupe le haut sur petits écrans */
    justify-content: flex-start; 
    
    padding: 2rem 1rem; /* Un peu de marge sur les côtés */
}

/* On ajoute ça pour que le contenu soit centré s'il y a de la place, 
   mais scrollable s'il n'y en a pas */
.popup-content {
    margin: auto; /* La marge automatique centre l'élément dans le flexbox */
    /* ... tes autres styles de grid restent ici ... */
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1000px;
    width: 100%;
    align-items: center;
}

.popup-left { 
    text-align: center; }
.popup-left img {
    width: 400px; 
    height: 400px; 
    border-radius: 10px; 
    margin-top: 1rem; 
    object-fit: cover;
    opacity: 1; 
}
#spotify-container { 
    width: 100%; 
    border-radius: 12px; 
    overflow: hidden
}

.popup-right { 
    text-align: left; }
.popup-right h2 { 
    font-size: 2.5rem; 
    margin-bottom: 1.5rem; }
.popup-avis-box {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.popup-avis-box h3 { 
    color: #8b5cf6; 
    margin-bottom: 0.5rem; 
    font-size: 0.9rem; 
    text-transform: uppercase; 
    letter-spacing: 2px; }
.popup-avis-box p { 
    font-size: 1.1rem; 
    line-height: 1.6; }

#btn-fermer {
    margin-top: 2rem;
    background: transparent; 
    border: 1px solid white; 
    padding: 10px 30px;
    color: white; border-radius: 50px; cursor: pointer; transition: 0.3s;
}
#btn-fermer:hover { background: white; color: black; }

#contribution {
    max-width: 600px; 
    margin: 6rem auto; 
    background-color: var(--card-bg);
    padding: 3rem; 
    border-radius: 24px; 
    border: 1px solid rgba(255, 255, 255, 0.05);
}
#contribution h2 { 
    text-align: center; 
    margin-bottom: 1rem; }

.info-obligatoire { 
    text-align: center; 
    color: var(--text-muted); 
    font-size: 0.8rem; 
    margin-bottom: 2rem; }

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

label { 
    display: block; 
    margin-bottom: 0.5rem; 
    font-weight: 600; 
    color: var(--text-muted); }

input, textarea {
    width: 100%; 
    padding: 14px; 
    background-color: var(--bg-color); 
    border: 1px solid #333;
    border-radius: 12px; 
    color: white; 
    font-family: inherit; 
    font-size: 1rem;
}

input:focus, textarea:focus { 
    outline: none; 
    border-color: #8b5cf6; 
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1); }

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

#apercu { 
    margin-top: 2rem; 
    padding: 1.5rem; 
    background: rgba(255, 255, 255, 0.03); 
    border-radius: 12px; 
    border-left: 3px solid #8b5cf6; 
    overflow-wrap: break-word;}

#apercu h3 { 
    font-size: 0.9rem; 
    text-transform: uppercase; 
    color: var(--text-muted); 
    margin-bottom: 1rem; }

#btn-envoyer {
    width: 100%; 
    margin-top: 1rem; 
    padding: 15px; 
    font-size: 1.1rem;
    background: #8b5cf6; 
    border: none; 
    color: white;
    border-radius: 50px; 
    cursor: pointer; 
    font-weight: bold; transition: transform 0.2s;
}
#btn-envoyer:hover { 
    transform: scale(1.02); }

footer { 
    background-color: #000; 
    padding: 4rem 1rem; 
    margin-top: 4rem; 
    border-top: 1px solid rgba(255,255,255,0.1); 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 1rem; 
    color: var(--text-muted); 
    font-size: 0.9rem; }

footer a { 
    color: white; 
    text-decoration: underline; 
    opacity: 0.6; }

footer a:hover { 
    opacity: 1; 
    text-decoration: underline; }

@media (max-width: 768px) {
    .popup-content { 
        grid-template-columns: 1fr; } 
    .popup-right h2 { 
        font-size: 1.5rem; }
    .cursor, .cursor-follower { 
        display: none; }
    body { 
        cursor: auto; }
    
    #btn-fermer {
        position: fixed;   
        bottom: 20px;
        left: 50%; 
        transform: translateX(-50%);
        width: 80%;         
        background-color: white; 
        color: black;         
        font-weight: bold;
        box-shadow: 0 5px 20px rgba(0,0,0,0.5);
        z-index: 20000;      
    }
}

.separator-title {
    margin-top: 2rem;     
    padding-top: 1.5rem;  
    border-top: 1px solid rgba(255, 255, 255, 0.1); 
    color: #8b5cf6;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

#popup-tracks-list {
    list-style: none;
    padding: 0;
}

#popup-tracks-list li {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #ccc;
    transition: transform 0.2s, background 0.2s;
}