* {
    margin: 0;
    padding: 0;
}

body {
    overflow: hidden;
    user-select: none;
    font-family: "Roboto", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100vh;
    width: 100%;
}

#firstPlayer, #secondPlayer {
    background-image: url('img/voiture1.png');
    background-repeat: no-repeat;
    background-size: contain;
    height: 250px;
    width: 250px;
    position: relative;
}

.progress {
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

section div p {
    white-space: nowrap;
    color: white;
    z-index: 1;
    position: relative;
}

#win {
    padding: 25px;
    border-radius: 15px;
    color: white;
}

#div {
    position: absolute;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    inset: 0;
    z-index: 3;
}

#startPartie, #timer {
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    inset: 0;
    z-index: 2;
}

#div button {
    border: none;
}

#startPartie div, #save, #div button {
    background-color: green;
    padding: 15px;
    border-radius: 15px;
    color: white;
    cursor: pointer;
}

#startPartie div:hover, #save:hover, #div button:hover {
    background-color: rgb(0, 71, 0);
}

.absolute {
    position: absolute;
    width: 200%;
    height: 100%;
    left: 0;
    z-index: 0;
    display: flex;
    flex-direction: row;
}

.group {
    display: flex;
    flex-direction: flex;
    width: 100%;
    height: 100%;
}

.relative {
    position: relative;
    z-index: 1;
}

.group img {
    width: 100%;
    height: 100%;
    animation: translate 5s infinite linear;
}

#progressP1, #progressP2 {
    width: calc(100% - 250px);
}

#afficherTimer {
    display: none;
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 15px;
}

.setting {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 999;
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-start;
    gap: 20px;
    z-index: 4;
}

#setting {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.setting svg {
    cursor: pointer;
    fill: white;
}

.setting svg:hover {
    opacity: 0.7;
}

#setting #gear:hover {
    animation: rotate 2s infinite linear;
}

#setting #setting-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

#setting #setting-content div {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#svg-setting {
    display: flex;
    flex-direction: row-reverse;
    gap: 10px;
}

input {
    border: none;
    border-radius: 5px;
    padding: 5px;
    outline: none;
}

input:focus {
    border: 4px solid #6c97e7;
}

#sound-muted {
    display: none;
}

@keyframes translate {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-100%);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}