@import url("var.css");
@import url(https://fonts.googleapis.com/css?family=Lato:400,700);
/* @import url("timer.css"); */
@import url('https://fonts.googleapis.com/css2?family=Bungee&family=Poppins:wght@100;300&display=swap');

* {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* mettre le fond en vert */
.index {
    display: flex;
    align-items: center;
    background: rgb(46, 119, 74);
    background: radial-gradient(circle, rgba(46, 119, 74, 1) 29%, rgba(59, 165, 100, 1) 57%, rgba(59, 165, 100, 1) 79%, rgba(34, 185, 167, 1) 100%);
    overflow: hidden;
    height: 100%;
    font-weight: 700;
    font-size: 30px;
    text-transform: uppercase;
}

body {
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.zoom-image {
    max-width: 100%;
    max-height: 100%;
}

.game-container {
    position: fixed;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

#viewport {
    position: absolute;
    border: 2px solid #fff;
    box-sizing: border-box;
    pointer-events: none;
}


/* mettre le h1 en title*/
.indextitle {
    font-size: 100%;
    text-align: center;
    margin: 0 auto;
    width: 60vw;
    height: 10vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #000;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}


/* mettre le form au center et blanc */
#form {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    width: 60vw;
    height: 50vh;
    background-color: #fff;
    border: 2px solid #ccc;
    gap: 2vh;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 35px;
}

input[type=texte] {
    padding: 20px;
}

/* changer les inputs... */
#form input,
#form button,
#form select,
#form textarea {
    width: 60%;
    height: 7vh;
    background-color: #eee;
    border: none;
    font-size: 1.5rem;
    transition: background-color 0.3s ease;
    border-radius: 20px;
}

#form input:focus {
    outline: none;
    background-color: #fff;
    border: #000 1px solid;
}

#form button {
    background-color: #000;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-radius: 20px;
}

#form p {
    font-size: 1.5rem;
    margin: 0;
    border: 1px solid red;
    width: 60%;
    text-align: center;
    padding: 1vh 0;
}

#form input:hover {
    background-color: #eee;
}

#form button:hover {
    background-color: #fff;
    color: #000;
    border: #000 1px solid;
}

#form .maps {
    width: 60%;
    display: flex;
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    overflow-x: visible;
}

#form .maps button {
    width: 30%;
    background-color: #ccc;
}

#form .preview {
    width: 60%;
    height: 30vh;
    background-color: #eee;
    border: 1px solid #ccc;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#form .map {
    width: 90%;
}

#form.content {
    height: auto;
    padding: 2vh 0;
}

#btnFullscreen {
    position: fixed;
    top: 2vh;
    right: 2vw;
    border: 1px solid #000;
    font-size: 1.5rem;
    text-align: center;
    padding: 0.5vh 1vw;
    cursor: pointer;
    text-decoration: none;
    color: #000;
    border: none;
    background-color: transparent;
    transition: background-color 0.3s ease;
    z-index: 999;

}

/* le btn admin en bas a droite */
.adminbtn,
.indexbtn {
    position: fixed;
    bottom: 2vh;
    right: 2vw;
    border: 1px solid #000;
    font-size: 1.5rem;
    text-align: center;
    padding: 0.5vh 1vw;
    cursor: pointer;
    text-decoration: none;
    color: #000;
    background-color: #fff;
    transition: background-color 0.3s ease;
    border-radius: 20px;
    z-index: 999;
}

.adminbtn:hover,
.indexbtn:hover,
#btnFullscreen:hover {
    background-color: #000;
    color: #fff;
}





/* l'ecran de transition */
.ending {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    opacity: 0;
    display: none;
    transition: opacity 0.3s ease;
    z-index: 999;
}

.ending-animate {
    display: block;
    animation: fadein 1s ease-out;
    animation-fill-mode: forwards;
}

.ending-force {
    display: block;
    opacity: 1;
}

.fadein {
    animation: fadein 1s ease-out;
    animation-fill-mode: forwards;
}

.fadeout {
    animation: fadeout 1s ease-out;
    animation-fill-mode: forwards;
}

/* l'animation de fade in */
@keyframes fadein {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeout {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}


/* alternative au #form */
.adminpanel {
    width: 100vw;
    height: 75vh;
    background-color: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: start;
    gap: 2vh;
    padding: 2vh 0;
    border: 2px solid #ccc;
}

/* les btns du form */
.actions {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: start;
    gap: 2vw;
    padding: 1vw 2vh;
    background-color: #eee;
}

.actions button {
    background-color: #000;
    color: #fff;
    border: none;
    padding: 2vh 2vw;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border: #000 1px solid;
    border-radius: 30px;
}

.actions button:hover {
    background-color: #fff;
    color: #000;
}

.rooms {
    overflow-y: scroll;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: start;
}

.room {
    width: 90%;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    align-items: center;
    justify-content: start;
    gap: 2vw;
    padding: 2vw 2vh;
    background-color: #eee;
    border: 1px solid #ccc;
}

.room:hover h1 {
    text-decoration: underline;
}

.room:first-child {
    border-radius: 30px 30px 0 0;
}

.room:last-child {
    border-radius: 0 0 30px 30px;
}

.room-valid {
    background-color: #d1f7d1;
}

.room-invalid {
    background-color: #f7d1d1;
}

.room.selected {
    background-color: #000;
    color: #fff;
}

/* LOADER ROOM */

.roomloader {
    width: 100%;
    height: 100%;
    background-color: #000;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.3rem;
    flex-direction: column;
}

.loader-line {
    width: 200px;
    height: 3px;
    position: relative;
    overflow: hidden;
    background-color: #ccc;
    margin: 100px auto;
    -webkit-border-radius: 20px;
    -moz-border-radius: 20px;
    border-radius: 20px;
}

.loader-line:before {
    content: "";
    position: absolute;
    left: -50%;
    height: 3px;
    width: 40%;
    background-color: #fff;
    -webkit-animation: lineAnim 1s linear infinite;
    -moz-animation: lineAnim 1s linear infinite;
    animation: lineAnim 1s linear infinite;
    -webkit-border-radius: 20px;
    -moz-border-radius: 20px;
    border-radius: 20px;
}

@keyframes lineAnim {
    0% {
        left: -40%;
    }

    50% {
        left: 20%;
        width: 80%;
    }

    100% {
        left: 100%;
        width: 100%;
    }
}

.scoreboard {
    width: 100vw;
    height: 100vh;
}

.player.p1 {
    background-color: #fff;
    color: #000;
}

.player.p2 {
    background-color: #ccc;
    color: #000;
}

.player.or {
    background-color: gold;
    color: #000;
}

.player.silver {
    background-color: silver;
    color: #000;
}

.player.bronze {
    background-color: #cd7f32;
    color: #000;
}

.player {
    width: 100%;
    height: 10vh;
    display: flex;
    align-items: center;
    justify-content: start;
    gap: 2vw;
    padding: 2vw 2vh;
    border: 1px solid #000;
}

.scoreboard .head {
    background-color: #fff;
    color: #000;
    border: 2px solid #000;
    width: 100%;
    text-align: center;
    padding: 3vh 0;
    font-size: 2rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    position: relative;
}

.scoreboard .startbtn {
    position: absolute;
    top: 50%;
    right: 2vw;
    transform: translate(0, -50%);
    border: 1px solid #000;
    font-size: 1.5rem;
    text-align: center;
    padding: 0.5vh 1vw;
    cursor: pointer;
    text-decoration: none;
    color: #000;
    background-color: #fff;
    transition: background-color 0.3s ease;
    border-radius: 20px;
}

.scoreboard .startbtn.startbtnleft {
    left: 2vw;
    right: auto;
}

.scoreboard .startbtn:hover {
    background-color: #000;
    color: #fff;
}

@media screen {}


@media screen and (max-width: 768px) {
    #form {
        width: 100%;
        border-radius: 0;

        >input {
            padding: 15px;
        }
    }

    .adminpanel {
        width: 100vw;
        height: 100vh;
        top: 0;
        left: 0;
        transform: translate(0, 0);
    }

    .actions {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2vh;
    }

    .actions button {
        width: 60%;
    }

    .scoreboard .head {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 2vh;
    }

    .scoreboard .startbtn {
        position: relative;

    }

    .room {
        grid-template-columns: 1fr;
        gap: 2vh;
        padding: 2vh 2vw;
    }

    .room h1 {
        word-wrap: break-word;
        overflow: hidden;
    }

    .game img {
        /* rotate to pass to landscape mode */
        height: 100vw;
        width: 100vh;
    }

    .endgame a {
        display: none;
    }

    .endgame {
        line-height: 1;
    }

    .endgame h1 img {
        width: 100%;
    }

}




.context {
    width: 100%;
    position: absolute;
    top: 50vh;

}

.context h1 {
    text-align: center;
    color: #fff;
    font-size: 50px;
}


.area {
    background: #464ddb;
    background: -webkit-linear-gradient(to left, #8f94fb, #4e54c8);
    width: 100%;
    height: 100vh;
}

.area-2 {
    background: #d83232;
    background: -webkit-linear-gradient(to left, #8f94fb, #4e54c8);
    width: 100%;
    height: 100vh;
}

.area-3 {
    background: #8832d8;
    background: -webkit-linear-gradient(to left, #8f94fb, #4e54c8);
    width: 100%;
    height: 100vh;
}

.circles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.circles li {
    position: absolute;
    display: block;
    list-style: none;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    animation: animate 25s linear infinite;
    bottom: -150px;

}

.circles li:nth-child(1) {
    left: 25%;
    width: 80px;
    height: 80px;
    animation-delay: 0s;
}


.circles li:nth-child(2) {
    left: 10%;
    width: 20px;
    height: 20px;
    animation-delay: 2s;
    animation-duration: 12s;
}

.circles li:nth-child(3) {
    left: 70%;
    width: 20px;
    height: 20px;
    animation-delay: 4s;
}

.circles li:nth-child(4) {
    left: 40%;
    width: 60px;
    height: 60px;
    animation-delay: 0s;
    animation-duration: 18s;
}

.circles li:nth-child(5) {
    left: 65%;
    width: 20px;
    height: 20px;
    animation-delay: 0s;
}

.circles li:nth-child(6) {
    left: 75%;
    width: 110px;
    height: 110px;
    animation-delay: 3s;
}

.circles li:nth-child(7) {
    left: 35%;
    width: 150px;
    height: 150px;
    animation-delay: 7s;
}

.circles li:nth-child(8) {
    left: 50%;
    width: 25px;
    height: 25px;
    animation-delay: 15s;
    animation-duration: 45s;
}

.circles li:nth-child(9) {
    left: 20%;
    width: 15px;
    height: 15px;
    animation-delay: 2s;
    animation-duration: 35s;
}

.circles li:nth-child(10) {
    left: 85%;
    width: 150px;
    height: 150px;
    animation-delay: 0s;
    animation-duration: 11s;
}



@keyframes animate {

    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
        border-radius: 0;
    }

    100% {
        transform: translateY(-1000px) rotate(720deg);
        opacity: 0;
        border-radius: 50%;
    }

}

footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    color: #333;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    padding: 1vh 0;
}

.game {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    background-color: #000;
    color: #fff;
    position: relative;
}

.game .action {
    /* background-color: #fff; */
    color: #000;
    position: fixed;
    bottom: 2vh;
    left: 50%;
    transform: translate(-50%, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2vw;
    padding: 1vw 2vh;
    width: 70%;
}

.game .action button {
    background-color: #000;
    color: #fff;
    border: none;
    padding: 2vh 2vw;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border: #fff 1px solid;
    border-radius: 30px;
    width: 100%;
}

.game .action button:hover {
    background-color: #fff;
    color: #000;
}

.game .action .timer {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    padding: 1vh 2vw;
    width: 70%;
    text-align: center;
}

.index2 {
    display: flex;
    height: 100vh;
    justify-content: center;
    align-content: center;
    background-color: #8832d8;

}

.endgame {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.endgame h1 {
    font-size: 3rem;
    text-align: center;
    color: #fff;
    font-family: freeware, Non-Commercial;
    margin: 4vh 0;
}

.endgame h2 {
    font-size: 2rem;
    text-align: center;
    color: #fff;
    margin: 4vh 0;
}

.endgame h2 span {
    color: gold;
    font-weight: 100;
}

.endgame a {
    text-decoration: none;
    color: #fff;
    font-size: 1.5rem;
    border: 1px solid #fff;
    padding: 1vh 2vw;
    border-radius: 30px;
    position: absolute;
    bottom: 7%;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

@media (orientation: landscape) {
    .game #imgmap {
        height: 100vh;
    }

    .game-container {
        display: flex;
        justify-content: center;
    }

    .game .action {
        position: absolute;
        display: flex;
        width: 15%;
        flex-direction: column;
        right: 20px;
        transform: translate(210%, 0);
        align-items: normal;
    }

    .endgame h1 img {
        width: 50%;
    }

    .endgame a {
        display: none;
    }
}

@media (orientation: portrait) {

    .game .action {
        bottom: 2vh;
        left: 50%;
        transform: translate(-50%, 0);
        width: 70%;
    }

    .game .action button {
        width: 100%;
    }

    .game .action .timer {
        width: 100%;
    }

    .game #imgmap {
        width: 100%;
    }
}