* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: "jetBrains Mono";
    src: url(font/JetBrainsMono[wght].woff2) format("woff2");
    font-weight: 100 900;
    font-display: swap;
}
@font-face {
    font-family: "Inter";
    src: url(font/inter-latin-400-normal.woff2) format("woff2");
    font-weight: 400;
    font-display: swap;
}

:root {
    --white1: rgb(248, 245, 240);
    --white2: rgb(255, 255, 255);
    --black1: rgb(28, 28, 28);
    --black2: rgb(15, 15, 15);
    --padding-section: clamp(2rem, 3vw, 4rem);
    --padding: clamp(1rem, 2vw, 2rem);
}

body {
    font-family: "jetBrains Mono", "Inter", monospace;
    background-color: var(--black1);
    color: var(--white1);
    cursor:
        url("Curseur/normal-2.svg") 4 4,
        auto;
}

/*Enléve les bar de scroll*/
body::-webkit-scrollbar {
    display: none;
}

a:hover,
ul li:hover {
    cursor:
        url("/Game-Marco/Curseur/hover1.svg") 4 4,
        pointer;
}

a:active {
    cursor:
        url("/Game-Marco/Curseur/click.svg") 4 4,
        auto;
}

/*Taille, Couleur, typo, Graisse des texte*/

h1 {
    font-size: clamp(2.25rem, 5vw, 4rem);
    color: var(--white1);
    text-transform: uppercase;
    font-weight: 700;
}

h2 {
    font-size: clamp(1.375rem, 3vw, 2.5rem);
    color: var(--white1);
    text-transform: uppercase;
    font-weight: 700;
}

h3 {
    font-size: clamp(1.125rem, 2vw, 1.75rem);
    color: var(--white1);
    text-transform: uppercase;
    font-weight: 700;
}

p {
    font-family: "Inter";
    font-size: clamp(0.875rem, 1vw, 1.125rem);
    max-width: 60ch;
    font-weight: 400;
}

a {
    font-size: clamp(1rem, 2vw, 1.25rem);
}

.logo {
    position: absolute;
    left: 2rem;
    top: 1rem;
    height: clamp(2rem, 3vw, 4rem);
}

/*Section de l'interface Mini-jeu*/
header{
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1rem 2rem;
    font-size: clamp(1rem, 3vw, 1.5rem);
}

header .profil{
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: All 0.3s ease-out;
}

header .profil:hover{
    transform: scale(0.9);
    opacity: 0.7;
}


header img{
    width: clamp(2rem, 4vw, 3rem);
    height: auto;
}


.help {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    background-color: var(--white1);
    color: var(--black1);
    border-radius: 10px;
    overflow: hidden;
    width: 3rem;
    height: 3rem;
    z-index: 3000;
    padding: 0.5rem;
    transition:
        width 0.4s ease,
        height 0.4s ease;

    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: start;
}

.help img {
    width: 2rem;
    height: 2rem;
    cursor: pointer;
}

@media(min-width: 1024px){
    .help{
        width: 4rem;
        height: 4rem;
    }
    .help img {
        width: 3rem;
        height: 3rem;
    }
}


.help .container {
    display: none;
    font-size: clamp(0.75rem, 2vw, 1rem);
    overflow: hidden;
    color: var(--black1);
}

.help .container ul li {
    padding: 0.25rem 0;
}

.help .container p {
    text-align: center;
}

.help .container span {
    text-decoration: underline;
    cursor: pointer;
}

.help .container .helpTitle {
    text-decoration: none;
    display: block;
    cursor: auto;
    text-align: center;
    text-transform: uppercase;
    font-size: 1.5rem;
    font-weight: bold;
}

.help .container a {
    color: var(--black1);
}




#heroGame {
    padding: var(--padding-section);
}

#heroGame h1{
    text-align: center;
}

#heroGame p {
    padding: var(--padding);
    text-align: center;
    margin: 0 auto;
    max-width: 65ch;
}

#heroGame h1 span {
    text-transform: none;
}

#heroGame .game {
    height: 70vh;
    width: 100%;
    background-color: var(--black2);
    position: relative;
    border: 2px solid var(--white1);

    position: relative;
}

#heroGame .game .settings svg {
    fill: var(--white1);
    height: 2rem;
    width: 2rem;
    position: fixed;
    right: 1rem;
    top: 1rem;
    transition: transform 0.4s ease-out;
    z-index: 2002;
    display: none;
}

#heroGame .game .settings svg:hover {
    transform: scale(0.9) rotate(90deg);
}

#heroGame .game .score {
    display: none;
    position: fixed;
    left: 50%;
    bottom: 2rem;
    font-size: 2rem;
    z-index: 2002;
    transform: translate(-50%, -50%);
}

#heroGame .game .timer {
    display: none;
    position: fixed;
    left: 1rem;
    top: 1rem;
    font-size: 2rem;
    z-index: 2002;
}

.info{
    text-align: center;
    margin: 0 auto;
}

.gameResult{
    text-align: center;
    width: 100%;
    color: green;
    padding-bottom: var(--padding) 0;
}

.gameResult p{
    text-align: center;
    margin: 0 auto;
    font-size: clamp(1.125rem, 2vw, 1.75rem);
}

.btn {
    background-color: var(--white1);
    text-transform: uppercase;
    font-size: clamp(1rem, 4vw, 1.5rem);
    display: inline-block;
    color: var(--black1);
    padding: 1rem 3rem;
    border-radius: 10px;
    border: 2px solid var(--white1);
    transition:
        transform 0.3s linear,
        background-color 0.3s,
        color 0.3s,
        border-color 0.3s;
    position: absolute;
    transform: translate(-50%, -50%);
    top: 90%;
    left: 50%;
    z-index: 2002;
}

.btn:hover {
    background-color: var(--black2);
    color: var(--white2);
    border-color: var(--white2);
    transition: 0.3s linear;
    transform: translate(-50%, -50%) scale(1.1);
}


#heroGame .game .map {
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-user-drag: none;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: var(--black2);
    overflow: hidden;
    cursor: url(/Game-Marco/Curseur/crosshaire.svg) 4 4, auto;
}

#heroGame .game .map:active {
    cursor: url(/Game-Marco/Curseur/crosshairMiss.svg) 18 18, auto;
}


#heroGame .game .map img {
    height: clamp(4rem, 4vw, 6rem);
    width: clamp(4em, 4vw, 6rem);
    position: absolute;
    user-select: none;
    -webkit-user-drag: none;
    will-change: transform;
    transform: translate(-50%, -50%);
}

#heroGame .game .map img:active {
    cursor: url(/Game-Marco/Curseur/crosshairKill.svg) 18 18, auto;
}

#heroGame .game .map img.kill {
    pointer-events: none;
    animation: kill 1s ease-out;
}


@keyframes kill {
    from {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    to {
        opacity: 0;
        transform: scale(0) rotate(360deg);
    }
}


.gameStart {
    position: fixed;
    height: 100%;
    width: 100%;
    background-color: var(--black2);
    opacity: 0.95;
    top: 0;
    left: 0;
    z-index: 2003;
    display: none;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    font-size: clamp(2.25rem, 6vw, 4rem);
    animation: fontSizeAnim 1s ease-out infinite;
}

.gamePause {
    display: none;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    position: fixed;
    opacity: 0.95;
    height: 100%;
    width: 100%;
    top: 0;
    left: 0;
    background-color: var(--black2);
    font-size: clamp(1rem, 4vw, 1.5rem);
    z-index: 2003;
}

.gamePause div {
    padding: 0.5rem;
    transition:
        transform 0.3s ease-out,
        opacity 0.3s ease-out;
}

.gamePause div:hover {
    transform: scale(0.9);
    opacity: 0.5;
}

.endGame {
    display: none;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    position: fixed;
    height: 100%;
    width: 100%;
    top: 0;
    left: 0;
    background-color: var(--black2);
    font-size: clamp(1rem, 4vw, 1.5rem);
    z-index: 2003;
}

.endGame div {
    padding: 1rem;
}

.endGame .container {
    display: flex;
    justify-content: center;
    gap: 1rem;

}

.endGame .container .btn {
    position: static;
    transform: none;
}

@keyframes fontSizeAnim {
    from {
        font-size: calc(clamp(2.25rem, 6vw, 4rem) * 0.5);
    }
    to {
        font-size: calc(clamp(2.25rem, 6vw, 4rem) * 2);
    }
}

/*LES Boutton des classement & historique*/
#lead {
    padding: var(--padding-section) 0;
}

.containerBtn {
    width: 90%;
    margin: 0 auto;
    display: flex;
    border: 1px solid var(--white1);
    padding: clamp(0.125rem, 3vw, 0.25rem);
    gap: clamp(0.125rem, 3vw, 0.25rem);
}

.boutton1,
.boutton2 {
    width: 50%;
    text-align: center;
    padding: clamp(1rem, 3vw, 2rem);
}

.boutton1:hover,
.boutton2:hover {
    opacity: 0.7;
    background-color: var(--black2);
}

.active {
    background-color: var(--white1);
    color: var(--black1);
    text-transform: uppercase;
    font-weight: bold;
    width: 50%;
    text-align: center;
    padding: clamp(1rem, 3vw, 2rem);
}
/*CONTENT*/
.main {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.main h2 {
    text-align: center;
    padding: clamp(0.5rem, 3vw, 1rem);
}

.legende{
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 95%;
    margin: 0 auto;
    padding: 1rem 0;
    border-bottom: 1px solid var(--white1);
    margin-bottom: 0.5rem;
}

.legende span{
    display: flex;
    justify-content: center;
    align-items: center;
}

.legende .rang{
    width: 10%;
}

.statLead{
    width: 30%;
}


.contentMain {
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
    overflow: hidden;
    overflow-y: scroll;
    height: 450px;
    width: 95%;
    margin: 0 auto;
    scrollbar-color: var(--white1) var(--black1);
    scrollbar-width: 5px;
}

@media(max-width: 768px){
    .contentMain {
        scrollbar-width: none;
    }

    .contentMain::-webkit-scrollbar {
        display: none;
    }
}


.nothings {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.block {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    margin: 0 auto;
    background-color: var(--black2);
    padding: 1rem 0;
    border-radius: 0.25rem;
}

.stat {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 30%;
    gap: 0.25rem;
    flex-wrap: wrap;
    font-size: clamp(0.75rem, 2vw, 1rem);
}

.statR {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 10%;
    gap: 0.25rem;
    flex-wrap: wrap;

}

.block .stat img {
    height: clamp(24px, 3vw, 32px);
    width: clamp(24px, 3vw, 32px);
}


/*Page Login*/

body#login{
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100vh;
    background-color: var(--black1);
}



#pseudo {
    background-color: var(--black1);
    margin: 0 auto;
    height: 400px;
    width: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    outline: 3px solid var(--white1);
    outline-offset: -4px;
    border-radius: 15px;
}

#pseudo h1 {
    text-align: center;
    font-size: 2rem;
    color: var(--white1);
}

.input {
  width: 250px;
  padding: 0.875rem;
  font-size: 1rem;
  border: 2px solid var(--white1);
  box-shadow: 3px 4px 0 var(--white1);
  border-radius: 10px;
  outline: none;
  transition: all 0.2s ease-out;
  background-color: var(--black1);
  color: var(--white1);
}

.input:focus {
    box-shadow: 0 0 0 var(--white1);
    transform: translate(3px, 4px);
}


#pseudo .validate{
    animation: validAnime 0.5s ease-out;
    height: 8rem;
    width: 8rem;
}

@keyframes validAnime {
    from{
        transform: rotate(180deg) scale(0.5);
    }to{
        transform: rotate(720deg) scale(1);
    }
}

@keyframes error {
    0% {
        transform: translateX(0);
    }
    20% {
        transform: translateX(2px);
    }
    40% {
        transform: translateX(-2px);
    }
    60% {
        transform: translateX(2px);
    }
    80% {
        transform: translateX(-2px);
    }
    100% {
        transform: translateX(0);
    }
}

#pseudo span {
    font-size: clamp(1.5rem, 3vw, 2rem);
    text-transform: uppercase;
}

.error {
    display: none;
    text-align: center;
    color: red;
    padding: 0;
}

.error p {
    padding: 0;
}

.btnPseudo {
    width: 250px;
    padding: 0.875rem;
    font-size: 1rem;
    border: 2px solid var(--white1);
    box-shadow: 3px 4px 0 var(--white1);
    outline: none;
    border-radius: 10px;
    transition: all 0.2s ease-out;
    background-color: var(--black1);
    font-weight: 700;
    color: var(--white1);
}

.btnPseudo:hover {
    box-shadow: 0 0 0 var(--white1);
    transform: translate(3px, 4px);
}

.btnPseudo:active {
    transform: translate(3px, 4px) scale(0.9) ;
}

/*Page mentions*/
#mentions{
    padding: var(--padding-section);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
#mentions div{
    padding: var(--padding) 0;
}

.mentionBtn{
    padding: var(--padding);
    margin-right: auto;
    width: fit-content;
    transition: all 0.3s ease-out;
}

.mentionBtn:hover{
    opacity: 0.7;
    transform: scale(0.9);
}


footer{
    padding: var(--padding);
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: 1rem;
}

footer a{
    text-decoration: none;
    color: var(--white1);
    transition: all 0.3s ease-out;
}

footer a:hover{
    transform: scale(0.9);
    opacity: 0.7s;
}

@media (min-width: 1024px) {
    #heroGame .game {
        height: 80vh;
        width: 90%;
        margin: 0 auto;

    }
    .contentMain {
        width: 50%;
    }
    .containerBtn {
        width: 50%;
    }
    .legende{
        width: 50%;
    }
}

@media (min-width: 768px) {
    .mentionBtn{
        position: fixed;
    }

    .legende{
        padding: 1rem 1rem 1rem 0;
    }

}
