/*GENERAL*/
/*CONEXION INSCRIPTION*/
/*DASHBOARD*/

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

:root {
    --bgcolor: #1b002b;
    --cardcolor : #310759;
    --intcolor: #210442;
    --fgcolor: #9c6cd3;
    --greencolor: #6dd191;
    --redcolor: #d16d6d;
    --yellowcolor: #e0ab36;
}

body {
    font-family: "Noto Sans KR", sans-serif;
    font-weight: 500;
    font-size: 18px;
    background-color: var(--bgcolor);
    color: var(--fgcolor);
}

.card {
    background: var(--cardcolor);
    border-radius: 10px;
    margin: 40px auto;
    position: relative;
}

h2 {
    text-align: center;
    font-size: 30px;
    font-weight: 800;
}

#player-left-card h2 {
    font-size: clamp(0px, 3vw, 30px);
}

h3{
    text-align: center;
    font-size: 25px;
    font-weight: 600;
}

.game-button > h3{
  margin-top : 8px;
}

label {
    display: block;
    margin-top: 15px;
}

#loginForm > button,
#registerForm > button ,
#logoutform > button,
#quit_gameform > button,
#ready-button
{
    display: block;
    margin: 20px auto;
    width: 65%;
    padding: 15px;
    border-radius: 8px;
    border: 0;
    background: var(--fgcolor);
    color: white;
    font-weight: 700;
    font-size: 18px;
    cursor: pointer;
}

.gamebutton{
    display: block;
    margin: 20px auto;
    width: 100%;
    padding: 15px;
    border-radius: 8px;
    border: 0;
    background: var(--fgcolor);
    color: white;
    font-weight: 700;
    font-size: 18px;
    cursor: pointer;
}

header {
    background-color: var(--cardcolor);
    width: 100%;
    height: 60px;
}

.logo-header {
    background: url(gameinweb/logo-gameinweb.svg) center / contain no-repeat;
    width: 80px;
    height: 80px;
    margin: auto;
}

/*CONEXION INSCRIPTION*/

#logo-form {
    background: url(gameinweb/logo-gameinweb.svg) center / contain no-repeat;
    width: 150px;
    height: 150px;
    margin: 20px auto;
}

#form-card {
  width:95%;
  max-width: 450px;
  margin-top: 50px;
  padding: 40px 40px 20px 40px;
}

#form-card > form {
    margin: 25px auto;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    height: 50px;
    padding: 10px;
    margin-top: 2px;
    border-radius: 6px;
    color: var(--fgcolor);
    border: 0.5px solid var(--fgcolor);
    font-family: "Noto Sans KR", sans-serif;
    font-weight: 400;
    font-size: 16px;
    background-color: #210442;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    outline: 1px solid white;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder {
    color: hsla(268, 54%, 63%, 0.6);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0px 1000px #16012f inset;
    -webkit-text-fill-color: var(--fgcolor);
    transition: background-color 5000s ease-in-out 0s;
}

.inline-remember {
    display: flex;
    gap: 8px;
    align-items: center;
}

.login-footer {
    text-align: center;
    margin: 20px 0 10px 0;
}

.login-footer a {
    color: var(--fgcolor);
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s;
}

.login-footer a:hover {
    color: #fff;
}

.checkbox-container input[type="checkbox"] {
    display: none;
}

.checkbox-container label {
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    user-select: none;
}

.checkbox-container label::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid var(--fgcolor);
    border-radius: 4px;
    background-color: var(--fgcolor);
    transition: background-color 0.2s, border-color 0.2s;
}

.checkbox-container input[type="checkbox"]:checked + label::after {
    content: "✔";
    position: absolute;
    left: 5px;
    top: 45%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--intcolor);
}

.checkbox-container label:hover::before {
    border-color: var(--fgcolor);
}

.error {
    color: var(--redcolor);
    font-weight: 400;
    font-size: 16px;
    margin-top: 30px;
}

@keyframes disparition_error {
    0% {
        opacity: 1;
        display:block;
    }
    74% {
        opacity: 1;
        display:block;
    }
    99%{
        opacity : 0;
        display:block;

    }
    100%{
        opacity : 0;
        display:none;
    }
}

#game-right-zone > .error {
    position : absolute;
    top : calc(100% - 80px);
}

.success {
    color: var(--greencolor);
    margin-bottom: 8px;
}

#loginForm > .toggle-password,
#registerForm > .toggle-password{
    position: absolute;
    right: 50px;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    color: var(--fgcolor);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#toggle-connexion-password { top: 225px; }
#toggle-first-password { top: 315px; }
#toggle-second-password { top: 513px; }

.password-wrapper svg {
    width: 24px;
    height: 24px;
}

/*DASHBOARD*/

.grande-card{
    width:95%;
    max-width: 1200px;
    height: 400px;
    display: grid;
    position:relative;
    padding: 30px 30px 30px 30px;
}

#player-card{
    grid-template-columns: 250px 1fr 150px;
}

#photo-profil {
  position: relative;
  width: 200px;
  height: 230px;
  background-color: var(--bgcolor);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  display:flex;
  justify-content:center;
  align-items:center;
  border: 0.5px solid var(--fgcolor);
}

#photo-preview {
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  display: block;
  opacity: 1;
  transition: opacity 0.1s ease-in-out;
}

#photo-profil::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url(gameinweb/photo.svg) no-repeat center/cover;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
  outline:none;
}
#photo-profil:hover::after {
  opacity: 1;
  cursor: pointer;

}

#photo-profil input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
  border: 0.5px solid var(--fgcolor);
  outline:none;
}

#photo-profil input[type="file"],
#photo-profil input[type="file"]::after,
#photo-profil input[type="file"]::before {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

#photo-profil::after {
  border: none !important;
  outline: none !important;
}

#user-informations{
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap :15px;
}

#central-zone{
  display:flex;
  justify-content:center;
  align-items:center;
}

#display-centrale{
width : 95%;
height : 340px;
background-color: var(--intcolor);
border-radius:10px;
margin:0px auto;

  display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#parametre-zone{
  display:flex;
  align-items:center;
  justify-content:start;
  flex-direction:column;
}

#parametre-roue{
  width: 100px;
  height : 100px;
  margin-top:25px;
  background: url(gameinweb/roue.svg) no-repeat center/ contain;
  cursor:pointer;
  transition : 0.6s ease-in-out;
}

#parametre-roue:hover{
  transform:rotate(60deg);
}

#parametre-central{
  width : 100px;
  height:60px;
  margin-top : 25px;
  background-color : var(--fgcolor);
  display:none;
  border-radius:10px;
  cursor:pointer;
}

#game-selection {
    display: flex;
    justify-content: center;
    flex-wrap:wrap;
    gap : 5%;
    margin-top :30px;
}

#makeitmeme,
#morpion,
#morpion_geant {
    width: 300px;
    height: 300px;
    background-color: var(--cardcolor);
    border-radius: 10px;
    display: block;
    margin: 25px 0px;
    padding: 0;
    border: 0;
    color: var(--fgcolor)3;
    cursor: pointer;
}

#makeitmeme-image,
#morpion-image,
#morpion_geant-image {
    width: 280px;
    height: 235px;
    margin: 0px auto 0;
    border-radius: 10px;
}

#makeitmeme-image{
    background:url(makeitmeme/makeitmeme-img.svg) no-repeat center / 75%
    var(--intcolor);
}
#morpion-image{
    background:url(morpion/morpion-img.svg) no-repeat center / 70%
    var(--intcolor);
}
#morpion_geant-image{
    background:url(morpion/morpiongeant-img.svg) no-repeat center / 70%
    var(--intcolor);
}

/*JEUX - MAKEITMEME*/

.scoreboard{
    width : 80%;
    margin-right:30px;
}

.score-images{
    width :100%;
    padding : 15px;
}

.player-card{
       width :fit-content;
        margin: 20px auto;
    display:block;
    width : 800px;
    max-width:90%;
}

.player-img{
    width : 100%;
}

.scroll-nav{
  overflow-y:scroll;
  scrollbar-width: thin;
  scrollbar-color: var(--fgcolor) var(--intcolor);
}

#upload-card{
  grid-template-columns: 30% 70%;
}

.player {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.player-presence {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    margin-right: 10px;
}

#photos-makeitmeme{
  display:flex;
  flex-wrap:wrap;
  gap : 15px;
margin : 20px auto;
justify-content:center;

}



.user-photo{
width:166px;
height:94px;
overflow:hidden;
display:flex;
justify-content:center;
align-items:center;
position:relative;
}

.user-photo img{
max-width:100%;
height:100%;
border-radius:6px;
cursor:pointer;
}

.user-photo.inactive img {
    opacity: 0.5;
    
}
.user-photo::after {
    content:"";
    width:25px;
    height:25px;
        background:url(makeitmeme/v.svg) no-repeat center / 80%
    var(--fgcolor);
    position:absolute;
    top:calc(100% - 30px);
    left:calc(100% - 30px);
    border-radius : 2px;
    cursor:pointer;
}

.inactive::after {
background:var(--intcolor);
border : 0.5px solid var(--fgcolor);
box-sizing: border-box;
}

.grid-width { 
    max-width : 100%;
    max-height:100%;
    aspect-ratio: 1 / 1;
    margin-top : 1vh;
}

.grid {
    display: flex;
    border : 8px solid var(--cardcolor);
    border-radius: 10px;
    background-color : var(--cardcolor);
    width : 65vh;
    max-width : 100%;
    max-height : 100%;
    aspect-ratio: 1/1;
    flex-wrap:wrap;

}

.cell{
    width: 33%;
}

.cell form {
    width: 100%;
    height: 100%;
}

.cell button {
    width: 100%;
    height: 100%;
    font-size: 36px;
    cursor: pointer;
    display: block;
    margin: 0;
    padding: 0;
    border: 4px solid var(--cardcolor);
    border-radius : 5px;
    background: var(--intcolor);
    color: var(--fgcolor);
    font-weight: 700;
}

.cell button.cell1{
background: url(morpion/croix.svg) no-repeat center / 60%
var(--intcolor);
}

.cell button.cell0{
background: url(morpion/cercle.svg) no-repeat center / 65%
var(--intcolor);
}

/* MORPION GEANT */
.morpion-geant {
    display: flex;
    flex-wrap:wrap;
    width : 65vh;
    max-width : 100%;
    max-height : 100%;
    aspect-ratio: 1/1;
    border : 8px solid var(--cardcolor);
    border-radius: 10px;
    background-color : var(--cardcolor);
    position:relative;
}

.mini-grid {
    display: flex;
    flex-wrap:wrap;
    background-color : var(--cardcolor);
    border: 8px solid var(--cardcolor);
    width : 33.333%;
    height:33.333%;
}

.cellth {
    display: flex;
    align-items: center;
    justify-content: center;
    position:relative;
    width: 33.3%;
    height: 33.3%;
        border-radius:4px;
    border: 4px solid var(--cardcolor);
}

.cellth form {
    width:100%;
    height:100%;
}

.cellth button {
    width: 100%;
    height: 100%;
    font-size: 0px;
    cursor: pointer;
    border: none;
    background: var(--intcolor);
    color : rgba(0, 0, 0, 0);

}

.jeude0 ,button.jeude0 { background: url(morpion/cercle.svg) no-repeat center / 70%
var(--intcolor); 
padding-block: 0px;
padding-inline: 0px;
display: block;}
.jeude1, button.jeude1 { background: url(morpion/croix.svg) no-repeat center / 60%
var(--intcolor); 
padding-block: 0px;
padding-inline: 0px;
    display: block;}

 .mini-grid.appartenance1::after { 
    content:'';
    position:absolute;
    z-index:2;
    background: url(morpion/croix.svg) no-repeat center / 80%;
    width: calc(33.333% - 16px);
    height:calc(33.333% - 16px);
 }

  .mini-grid.appartenance0::after { 
    content:'';
    position:absolute;
    z-index:2;
    background: url(morpion/cercle.svg) no-repeat center / 90%;
    width: calc(33.333% - 16px);
    height:calc(33.333% - 16px);
 }

 .mini-grid.appartenance0 > .cellth > form > button::after,  .mini-grid.appartenance1 > .cellth > form > button::after{
    content:'';
    position:absolute;
    z-index:1;
    background-color:rgba(33, 4, 66, 0.50);
    width:100%;
    height:100%;
    left:0;
    top:0;
 }


#game-main {
    display: flex;
    flex-shrink: 1;
    align-items: stretch;
    height: calc(100vh - 60px);
    padding: 60px 0;
}

#player-left-card {
    width: 15%;
    background-color: #310759;
    margin: 0 30px;
    border-radius: 10px;
    padding: 1%;
    overflow: auto;
}



#liste_joueurs { margin-top: 10px; }

#game-right-zone {
    width: calc(85% - 60px);
    margin: 0 30px 0 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position : relative;
}

#image-zone {
    height: calc(100% - 260px);
    width: calc(100% - 90px);
    display: flex;
    justify-content: center;
    align-items: end;
    
}

#imageContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    position: relative;
}

#imageContainer img {
    max-height: 100%;
    max-width: 100%;
    border-radius: 10px;
}

#generatedCanvas{
       max-height: 100%;
    max-width: 100%;
    border-radius: 10px; 
}

#download_image {
    width: 50px;
    height: 50px;
    display: block;
    border-radius: 4px;
    border: 0;
    color: white;
    font-weight: 700;
    font-size: 18px;
    cursor: pointer;
    background: var(--fgcolor)
    url(makeitmeme/download.svg) no-repeat center/50%;
    flex-shrink:0;
    position:absolute;
    left:calc( 100% + 10px);
    top : calc(100% - 50px)
}

a > #download_image{
    position:static;
}

#interaction-zone {
    width: 95%;
    max-width: 800px;
    height: 200px;
    margin: 30px;
    background-color: #310759;
    border-radius: 10px;
    padding: 10px;
    overflow-y: scroll;
  scrollbar-width: thin;
  scrollbar-color: var(--fgcolor) var(--cardcolor);
}


.text-zone{
    margin-top : 16px;
    display:grid;
    grid-template-columns: 1fr 234px;
}

.deplacer{
    width : 50px;
    height:50px;
    background:url(makeitmeme/deplacement.svg) no-repeat center / 75%;
    border-radius: 6px;
    border: 0.5px solid var(--fgcolor);
    background-color : var(--intcolor);
    cursor:pointer;
    margin-top: 2px;
    margin-left: 8px;
}

.deplacer:active{
    cursor:move;
}

#addTextBtn{
        width : 50px;
    height:50px;
    background:url(makeitmeme/plus.svg) no-repeat center / 75%;
    border-radius: 6px;
    border: 0.5px solid var(--fgcolor);
    background-color : var(--intcolor);
    cursor:pointer;
    margin-top: 6px;
}



.texte{
    width : 50px;
    height:50px;
    background:url(makeitmeme/texte.svg) no-repeat center / 75%;
    border-radius: 6px;
    border: 0.5px solid var(--fgcolor);
    background-color : var(--intcolor);
    cursor:pointer;
    margin-top: 2px;
    margin-left: 8px;
}

.fond{
    width : 50px;
    height:50px;
    background:url(makeitmeme/fond.svg) no-repeat center / 75%;
    border-radius: 6px;
    border: 0.5px solid var(--fgcolor);
    background-color : var(--intcolor);
    cursor:pointer;
    margin-top: 2px;
    margin-left: 8px;
}

.supprimer{
        width : 50px;
    height:50px;
    background:url(makeitmeme/croixmake.svg) no-repeat center / 75%;
    border-radius: 6px;
    border: 0.5px solid var(--fgcolor);
    background-color : var(--intcolor);
    cursor:pointer;
    margin-top: 2px;
    margin-left: 8px;
}

.popover {
    padding: 8px;
    background: #222;
    border: 1px solid #444;
    border-radius: 6px;
    z-index: 10;
}
.hidden {
    display: none;
}


#voteButtons {
    display: flex;
    justify-content: center;
    margin-top : 40px;
}
.makeitbuttons{
    width : 300px;
    max-width : 80%;
    margin:auto;
    padding:20px;
}

#voteButtons > form {
    margin: 20px 15px;
}

#votepos {
    background: url(makeitmeme/fleche_verte.svg) no-repeat center/35%;
    background-color: #9c6cd3;
    width: 120px;
    height: 60px;
    margin: -10px auto;
    border : 0px;
    border-radius : 8px;
    cursor : pointer;
}

#voteneg {
    background: url(makeitmeme/fleche_rouge.svg) no-repeat center/35%;
    background-color: #9c6cd3;
    width: 120px;
    height: 60px;
    margin: -10px auto;
        border : 0px;
    border-radius : 8px;
    cursor : pointer;
}

#memebud {
    background: url(makeitmeme/memebud.svg) no-repeat center/35%;
    background-color: #9c6cd3;
    width: 120px;
    height: 60px;
    margin: -10px auto;
        border : 0px;
    border-radius : 8px;
    cursor : pointer;
}

#imageText {
    background-color: #1b002b;
    display: block;
    max-width: 80%;
    min-width: 80%;
    margin: 25px auto;
    font-size: 25px;
    color: #9c6cd3;
    min-height: 50px;
    max-height: 50px;
    text-align: center;
    border: 0.5px solid #9c6cd3;
    padding: 8px;
    border-radius: 10px;
}



#title_interaction {
    display: flex;
    justify-content:center;
}

#chrono{
    background-color:var(--intcolor);
    width : 50px;
    height : 50px;
    border-radius : 4px;
    margin-left :10px;
    display:flex;
    justify-content:center;
    align-items:center;
        font-size: 32px;
    font-weight: 800;
}








@media (max-width: 700px) {
 #player-card > #central-zone{
  /* position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  width:100%;
  height:100%;
  display:none; */
 }

  #player-card{
    grid-template-columns: 100%;
    height : fit-content;
  }
  #display-centrale{

}

#upload-card{
  display:flex;
  flex-direction:column;
  height:fit-content;
}

.text-zone{
    margin-top : 16px;
    display:grid;
    grid-template-columns: 100%;
}
.deplacer{
    margin-left : 0px;
}
  }