* {
    padding: 0;
    margin: 0;

    user-select: none;
    -webkit-user-select: none;

    -webkit-user-drag: none;
}

html {
    height: 100%;
    font-family: 'Nunito', sans-serif;
}

body {
    background-color: #333;
    color: #fff;
    text-align: center;
    position: relative;
    overflow-x: hidden;
}

@keyframes entrer {
    0% {
        padding-left: 0;
    }

    50% {
        padding-left: 2em;
    }
}

#porte-dentree {
    position: fixed;
    height: 100%;
    width: 100%;

    background: url(pattern.webp);
    background-size: 20vh;
    filter: invert(1);
    z-index: 999;

    color: black;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1em;

    transition: opacity 1s;

    & p {
        cursor: pointer;
        padding: 2em 0;

        &:hover {
            animation: entrer 1s infinite;
        }
    }

    &.hidden {
        pointer-events: none;
        opacity: 0;
    }
}

h1 {
    font-size: 36px;
    text-transform: uppercase;
    letter-spacing: 4px;
    padding: 30px 0;
}

image-gallery {
    z-index: 999;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    justify-content: space-between;
}

image-gallery img {
    height: 200px;
    /* Set the fixed height */
    width: auto;
    /* Automatically adjust width while preserving aspect ratio */
    max-width: 720px;
    margin: 20px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    transition: transform 0.3s;
}

.frame {
    --frame-border-width: 3em;
    
    border: 5px solid #ad9f55;
    border-image: url(frame.png) 140;
    background-color: #ffffe0;
    border-color: #ad9f55;
    border-width: var(--frame-border-width);
    background-clip: padding-box;
}

image-gallery img:hover {
    transform: scale(1.1);
}

#haut-droite {
    position: absolute;
    top: 10px;
    right: 10px;

    display: flex;
    flex-direction: row;
    gap: 1em;
    align-items: center;
    justify-content: space-around;
}

#jouer-musique {
    width: 3em;
    height: 3em;

    cursor: pointer;

    box-sizing: border-box;
    border-style: solid;
    border-width: 1.5em 0px 1.5em 2.5em;
    border-color: transparent transparent transparent #9f9f9f;
    transition: all 100ms ease-in-out;

    &.pause {
        border-style: double;
        border-width: 0px 0px 0px 1.8em;
    }
}

.admin-button {
    position: relative;
    background-color: #0074d9;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    padding-bottom: .8em;
}

.admin-button:hover {
    background-color: #0056a4;
}

.an-image {
    position: relative;

    &:hover .remove-button {
        visibility: visible;
    }
}

.remove-button {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 30px;
    height: 30px;
    background: rgba(255, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    visibility: hidden;
}

.remove-button::before,
.remove-button::after {
    content: '';
    position: absolute;
    width: 3px;
    height: 16px;
    background: white;
}

.remove-button::before {
    transform: rotate(45deg);
}

.remove-button::after {
    transform: rotate(-45deg);
}

.notification {
    position: fixed;
    left: 2em;
    bottom: -4em;

    font-size: 1.2em;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    color: white;
    text-align: center;
    padding: 1em;
    opacity: 0;
    transform: translateZ(180deg);

    transition: bottom 0.5s, opacity 0.5s;
    z-index: 9999;
}

label.admin-button::after {
    content: "(glisser ou coller)";
    position: absolute;
    bottom: -.3em;
    font-size: .5em;
    left: 50%;
    transform: translate(-50%, -50%);
    text-wrap: nowrap;
    white-space: nowrap;
}

#filtre {
    z-index: 800;
    position: fixed;
    height: 100%;
    width: 100%;
    pointer-events: none;

    &.dark {
        background-color: rgba(0, 0, 0, 0.7);
        pointer-events: all;
    }
}

#pattern {
    position: absolute;
    height: 100%;
    width: 100%;
    background: url(pattern.webp);
    background-size: 20vh;
    opacity: .5;
    filter: invert(1);
    z-index: -1;
}

#preview-image {
    position: fixed;
    z-index: 999;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    --preview-image-width: min(
            calc(95vw - var(--frame-border-width)*2),
            calc((95vh - var(--frame-border-width)*2)*var(--image-width)/var(--image-height))
    );
    width: var(--preview-image-width);
    height: calc(var(--preview-image-width)*var(--image-height)/var(--image-width));

    &::after {
        content: 'FERMER';
        position: absolute;
        top: 1em;
        right: 1em;
        cursor: pointer;
        text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
    }
}

/*.feur {*/
/*    display: none;*/
/*    position: fixed;*/
/*    z-index: 999;*/
/*    top: 50%;*/
/*    left: 50%;*/
/*    transform: translate(-50%, -50%);*/
/*    width: 80vw;*/
/*    height: 80vh;*/
/*    border: 5px solid lime;*/
/*}*/

#legend {
    text-align: left;
    user-select: none;
    -webkit-user-select: none;
    position: absolute;
    top: .5em;
    left: .5em;
    font-size: .8em;
    color: gray;
    font-weight: bolder;
}

#background {
    position: fixed;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    pointer-events: none;
    filter: blur(15px);
}

.glowing {
    position: relative;
    min-width: 700px;
    height: 550px;
    margin: -150px;
    transform-origin: right;
    animation: colorChange 5s linear infinite;
}

.glowing:nth-child(even) {
    transform-origin: left;
}

@keyframes colorChange {
    0% {
        filter: hue-rotate(0deg);
        transform: rotate(0deg);
    }

    100% {
        filter: hue-rotate(360deg);
        transform: rotate(360deg);
    }
}

.glowing span {
    position: absolute;
    top: calc(80px * var(--i));
    left: calc(80px * var(--i));
    bottom: calc(80px * var(--i));
    right: calc(80px * var(--i));
}

.glowing span::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -8px;
    width: 15px;
    height: 15px;
    background: #f00;
    border-radius: 50%;
}

.glowing span:nth-child(3n + 1)::before {
    background: rgba(134, 255, 0, 1);
    box-shadow: 0 0 20px rgba(134, 255, 0, 1),
        0 0 40px rgba(134, 255, 0, 1),
        0 0 60px rgba(134, 255, 0, 1),
        0 0 80px rgba(134, 255, 0, 1),
        0 0 0 8px rgba(134, 255, 0, .1);
}

.glowing span:nth-child(3n + 2)::before {
    background: rgba(255, 214, 0, 1);
    box-shadow: 0 0 20px rgba(255, 214, 0, 1),
        0 0 40px rgba(255, 214, 0, 1),
        0 0 60px rgba(255, 214, 0, 1),
        0 0 80px rgba(255, 214, 0, 1),
        0 0 0 8px rgba(255, 214, 0, .1);
}

.glowing span:nth-child(3n + 3)::before {
    background: rgba(0, 226, 255, 1);
    box-shadow: 0 0 20px rgba(0, 226, 255, 1),
        0 0 40px rgba(0, 226, 255, 1),
        0 0 60px rgba(0, 226, 255, 1),
        0 0 80px rgba(0, 226, 255, 1),
        0 0 0 8px rgba(0, 226, 255, .1);
}

.glowing span:nth-child(3n + 1) {
    animation: animate 10s alternate infinite;
}

.glowing span:nth-child(3n + 2) {
    animation: animate-reverse 3s alternate infinite;
}

.glowing span:nth-child(3n + 3) {
    animation: animate 8s alternate infinite;
}

@keyframes animate {
    0% {
        transform: rotate(180deg);
    }

    50% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes animate-reverse {
    0% {
        transform: rotate(360deg);
    }

    50% {
        transform: rotate(180deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

#rond-connexion {
    display: inline-block;
    width: .7em;
    height: .7em;
    margin-right: .2em;
    border-radius: 50%;
    background-color: red;

    &.yes {
        background-color: green;
    }
}

#nbOeuvres {
    cursor: help;
}