body, html {
    font-family: Arial, sans-serif;
    background-color: #f8f8f8;
    margin: 0;
    padding: 0;
}

header {
    display: flex;
    align-items: center;
    margin-bottom: 50px;
    background: linear-gradient(to bottom left, #4fe8b5 0%, #13dd99 10%, #1dba8a 100%);
    justify-content: center;
    height: 67px;
}

header h1 {
    color: white;
    margin: 0;
    font-size: 2em;
}

header img {
    height: calc(100% + 5px);
    margin-left: 10vw;
}

@media screen and (max-width: 800px) {
    header {
        height: 60px;
    }
}

@media screen and (max-width: 600px) {
    header {
        height: 50px;
    }
}

@media screen and (max-width: 380px) {
    header {
        justify-content: space-evenly;
    }

    header img {
        margin-left: 0px;
    }
}

#main {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
}

#slider {
    position: relative;
    overflow-x: auto;
    scroll-behavior: smooth;
    display: flex;

    height: 40vh;
    width: 100vw;

    margin: 50px 0px;

    overscroll-behavior: contain; 
    touch-action: none; /* Pour désactiver le scroll */

    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
}

#slider::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera*/
}

.slide {
    height: 100%;
    width: 100vw;
    flex-shrink: 0;
    scroll-snap-align: center;
    display: flex;
    justify-content: center;
    align-items: center;

    -webkit-user-select: none; /* Chrome, Safari, Opera */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* Internet Explorer/Edge */
    user-select: none;
}

.slide img {
    max-height: 100%;
    max-width: 90vw;
    width: fit-content;
    height: fit-content;

    cursor: zoom-in;
}

.slide[data-fullscreen] {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 20;
}

.slide[data-fullscreen] img {
    max-width: 100vw;
    max-height: 100vh;
    width: auto;
    height: auto;
    object-fit: contain;
    cursor: zoom-out;
}

#controls {
    position: fixed;
    top: 54%;
    display: flex;
    justify-content: space-between;
    width: 80%;
    margin: 0px 10vw;
    pointer-events: none;
}

#controls div {
    border: none;
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: opacity 0.3s;

    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: auto;
}

#controls div::before {
    content:  '';
    background-color: #ffffff75;
    width: 100%;
    height: 100%;
    display: block;
    z-index: -1;
    position: relative;
    border-radius: 50%;
}

#controls div.disabled {
    pointer-events: none;
}

#prev {
    background-image: url(./img/prev-button.svg);
}

#next {
    background-image: url(./img/next-button.svg);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5); /* gris transparent */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

#user-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: fixed;
    top: 50vh;
    left: 50vw;
    transform: translate(-50%, -50%);
    z-index: 20;

    background-color: #FFFFFF;
    padding: 20px;
    border: 1px solid aliceblue;
    border-radius: 8px;
    box-shadow: 1px -1px 20px 0px #e7e7e7;
}

#l-username {
    font-weight: 700;
    margin-bottom: 8px;
}

#username {
    border: 1px solid #CCCCCC;
    border-radius: 4px;
    padding: 5px;
    margin: 2px 0px;

    transition: border 0.4s, margin 0.4s;
}

#username:focus {
    outline: none;
    border: 3px solid #13dd99;
    margin: 0;

    transition: border 0.1s, margin 0.1s;
}

#user-button {
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 15px;
    cursor: pointer;
    margin-top: 12px;
}

#action-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-weight: bold;
    position: fixed;
    bottom: 10px;
}

#action-box * {
    cursor: pointer;
}

#action-box p {
    margin-bottom: 0px;
}

#heart {
    -webkit-mask: url(./img/add-to-wish.svg) no-repeat center;
    -webkit-mask-size: contain;
    mask: url(./img/add-to-wish.svg) no-repeat center;
    mask-size: contain;

    display: block;
    width: 50px;
    height: 50px;

    background-color: #1f1f1f;
    transition: background-color 0.3s;
}

input[type="checkbox"]:checked + label #heart {
    -webkit-mask: url(./img/added-in-list.svg) no-repeat center;
    -webkit-mask-size: contain;
    mask: url(./img/added-in-list.svg) no-repeat center;
    mask-size: contain;

    background-color: #cd2c2c;
}

input[type="checkbox"]:checked + label #heart:hover {
    -webkit-mask: url(./img/remove-from-wish.svg) no-repeat center;
    -webkit-mask-size: contain;
    mask: url(./img/remove-from-wish.svg) no-repeat center;
    mask-size: contain;

    background-color: #bd1919;
}

#sortable-list {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
}

.sortable-item {
    border: 2px solid #000000;
    margin: -1px 0px;
    padding: 2px;
    border-radius: 1px;
    cursor: move;
    border-left: none;
    border-right: none;
    width: 50%;
}

.sortable-item span {
    cursor: pointer;
}

.sortable-item span img {
    height: 0px;
}

.sortable-item span.show-img img {
    position: relative;
    width: 80%;
    display: block;
    height: auto;
    margin: 5px 10%;
}

.sortable-ghost {
    color: transparent;
    border: 3px solid #d3d3d3;
    border-left: none;
    border-right: none;
    margin: 5px 0px;
    animation: sortable-ghost-anim 0.7s infinite linear;
}

@keyframes sortable-ghost-anim {
    0% {
        padding: 2px;
        margin: 5px 0px;
    }
    33% {
        padding: 5px;
        margin: 2px 0px;
    }
    100% {
        padding: 2px;
        margin: 5px 0px;
    }
}

#sortListButton {
    bottom: 10px;
    right: 5vw;
    position: fixed;
    font-weight: normal;
    display: flex;
    align-items: center;
}

#sortListButton span {
    font-size: 1.5em;
    font-weight: bold;
    color: #7188ba;
    margin-top: 2px;
}