* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.title {
    text-align: center;
    color: white;
    font-size: 3.5rem;
    text-transform: uppercase;
    letter-spacing: 8px;
    margin-bottom: 60px;
    text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.8);
    font-weight: 900;
}

.polaroid-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    position: relative;
    padding: 0;
}

.polaroid {
    background: white;
    padding: 10px 10px 0 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    width: 220px;
    height: 235px;

    display: flex;
    /* Magie */
    flex-direction: column;
    /* image en haut, caption en bas */
    box-sizing: border-box;
    /* pour éviter les dépassements */

    /* Optimisation GPU */
    backface-visibility: hidden;

}

.polaroid.animating {
    /* Position fixed appliquée via JS pour éviter le saut */
    transition: transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 16;
    transform-origin: center center;
    will-change: transform;
    pointer-events: none; /* Désactive le hover pendant l'animation */
}

.polaroid:hover:not(.animating) {
    transform: rotate(0deg) scale(1.3) !important;
    z-index: 2;
}

.polaroid.hovered {
    transform: rotate(0deg) scale(1.3) !important;
    z-index: 2;
}

.polaroid.hovered::before {
    display: none;
}

.polaroid:hover:not(.animating) .grayed {
    filter: none;
}

.grayed {
    filter: grayscale(0.95) contrast(2);
    transition: filter 0.8s ease;
    will-change: filter;
}


.weaseled {
    /* border: 1px solid red; */
    /* background-image: url('../assets/images/weaseled.png'); */
    /* background-image: url('../assets/images/weasel-white.svg');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center center; */
    /* padding: 14px; */
    text-align: center;
    font-size: 2rem;
    font-weight: 900;
    align-content: center;
    opacity: 0;
    /* padding-bottom: 60px; */
    /* box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); */
    position: absolute;
    top: 0;
    left: 0;

    display: flex;
    justify-content: center;
    padding: 0;

    transition: opacity 0.8s ease-in-out;
    width: 100%;
    height: 160px;
    z-index: 3;
    /* filter: grayscale(1); */
    /* cursor: url('../assets/cursors/visor128.png') 64 64,auto; */

    /* Optimisation GPU */
    will-change: opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    pointer-events: none; /* Permet le clic de passer à travers quand opacity=0 */
}

.weaseled:hover {
    opacity: 0 !important;
}

.weaseled img {
    height: 150px;
    width: auto;
    position: relative;
    /* left: -25px; */
    top: 15px;
    filter: drop-shadow(0px 0px 2px black) drop-shadow(1px 1px 1px black);
    will-change: opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    /* Force le rendu de l'image pour mobile */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}


.polaroid-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    background: #f0f0f0;
    transform: translateZ(0);
    backface-visibility: hidden;
    position: relative;
    z-index: 1;
}

.polaroid-caption {
    /* text-align: center;
    margin-top: 5px; */
    font-family: 'Arial Black', Arial, sans-serif;

    display: flex;
    align-items: center;
    /* centre vertical */
    justify-content: center;
    /* centre horizontal */
    flex: 1;
    /* prend tout l'espace restant sous l'image */
    text-align: center;
    /* plus cohérent pour le texte centré */
}

.band-name {
    font-size: 1rem;
    font-weight: 900;
    text-transform: uppercase;
    color: #000;
    margin-bottom: 0px;
    letter-spacing: -1px;
    line-height: 1rem;
}

.band-style {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
    font-style: italic;
    font-family: Arial, sans-serif;
}

/* Effet tape sur certains polaroids */
.polaroid::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%) translateZ(0);
    width: 80px;
    height: 25px;
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border-radius: 2px;
    transition: opacity 0.3s ease;
    will-change: opacity;
}

.polaroid:hover:not(.animating)::before {
    opacity: 0;
}

.polaroid.animating::before {
    display: none; /* Masque la tape pendant l'animation */
}

.artist-details {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    padding: 0 1.5rem 0 1.5rem;
    background: rgba(0, 0, 0, 0.95);
    z-index: 20;
    overflow-y: auto;
}

.artist-details-img {
    margin: auto;
    width: auto;
    max-height: 750px;
}

#artist-details-name {
    font-size: 4rem;
}

.artist-details-text {
    font-size: large;
    text-align: justify;
    text-justify: inter-word;
}

.bloodShed {
    width: 50px;
    height: 50px;
    z-index: 2;
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.bloodShed img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    pointer-events: none;
}

#iSpotiPlayer {
    height: 100%;
    width: 100%;
}

#iYtPlayer {
    width: 100%;
    height: 52%;
    margin: auto;
    /* position: relative;
    top: 0;
    left: 0; */
}

#divYtPlayer {
    position: relative;
    display: none;
}


#divYtPlayer .ytOldScreen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1;

}

/* #divYtPlayer iframe {
    position: absolute;
    top: 8%;
    left: 10%;
    width: 66%;
    height: 50%;
} */


.ytOldScreen {
    width: 100%;
    height: 100%;
    filter: grayscale(0.7);
    position: absolute;
    top: 0;
    left: 0;
}

#closeDetailsIcon {
    cursor: pointer;
}

#blackScreen {
    z-index: 15;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    transition: all 0.8s;
    box-sizing: border-box;
}

#blackScreen.blackened {
    background: rgba(0, 0, 0, 0.95);
}

/* Mobile en mode paysage (landscape) - 3 colonnes */
@media (max-width: 926px) and (orientation: landscape) {
    .polaroid-grid {
        gap: 15px;
    }

    .polaroid {
        width: calc(33.333% - 10px);
        max-width: 220px;
    }

    .polaroid-image {
        height: 160px;
    }

    .weaseled {
        width: 100%;
        height: 160px;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }

    .weaseled img {
        height: 150px;
        top: 15px;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }
}

@media (max-width: 768px) {
    .title {
        font-size: 2rem;
        letter-spacing: 4px;
    }

    .polaroid-grid {
        gap: 20px;
    }

    .polaroid {
        width: calc(50% - 10px);
        max-width: 180px;
        height: auto;
    }

    .polaroid-image {
        height: 140px;
    }

    .weaseled {
        width: 100%;
        height: 140px;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }

    .weaseled img {
        height: 130px;
        top: 15px;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }

    .band-name {
        font-size: 0.85rem;
        line-height: 0.9rem;
    }

    .band-style {
        font-size: 0.75rem;
    }
}

/* Pour les très petits écrans */
@media (max-width: 400px) {
    .polaroid {
        width: calc(50% - 8px);
        max-width: 160px;
    }

    .polaroid-image {
        height: 120px;
    }

    .weaseled {
        height: 120px;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }

    .weaseled img {
        height: 110px;
        top: 15px;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }

    .band-name {
        font-size: 0.75rem;
        line-height: 0.8rem;
        letter-spacing: -0.5px;
    }

    .band-style {
        font-size: 0.7rem;
    }

    .polaroid-grid {
        gap: 25px 15px;
    }
}