html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden; /* évite les scrollbars parasites */
  position: relative;
  background-color: #2b2b2b;
  font: 400 14px / 20px "Roboto", sans-serif;
}
#global-container{
  position: absolute;
  width: 1214px;  
  top: 50%;
  left:50%;
}
canvas{
  border: 0;  
}
.letter-canvas{
  display: block;
  margin: 4px 0;
}
button{
  border-radius: 20px;
}
button {
  cursor: pointer;
}
button[disabled] {
  cursor: context-menu;
}
#clavier{
  width:8000px;
}
.letter, .eff, .ok{   
  height: 116px; 
  font-size: 50px;
  background-color: #555;
  color: #fff;
  border: solid 6px #aaa;
  margin-bottom: 3px;
  margin-right: 6px;
  background: linear-gradient(#3b3b3b, 80%, #666);
}
.letter{
  width: 116px;    
}
.eff, .ok{
  width: 236px;   
}
.letter[disabled], .eff[disabled], .ok[disabled]{
  border-color: #666;
  color: #888;
}
.letter:hover, .eff:hover, .ok:hover{
  background: linear-gradient(#4b4b4b, 80%, #777);
}
.letter[disabled]:hover, .eff[disabled]:hover, .ok[disabled]:hover{  
   background: linear-gradient(#3b3b3b, 80%, #666);
}
#container-legende{
  display: flex;
  height: 40px;  
  color: #fff; 
  background-color: #004b8b;
  width: 1214px;  
  font-size: 30px;
  padding-top: 20px;
  border-radius: 20px 20px 0 0;
}
#container-legende div.sous-menu{
 width: 33.33%;
 text-align: center;  
}
#container-menu{
  display: flex;
  height: 130px;
  line-height: 130px;
  color: #fff; 
  background-color: #999;
  width: 1214px;  
  font-size: 40px;
}
#container-menu div.sous-menu{
 width: 33.33%;  
}
.score {
  font-size: 50px;    
  transition: transform 0.3s ease;
  text-align: center; 
}
.score.rebond {
  transform: scale(1.5);
}
#container-score { 
  overflow: hidden;
  background-image: url("../img/fondScore.jpg");
}
#container-credits, #container-niveau{
  line-height: 100px;
  background-image: url("../img/fondScore.jpg");
  border: solid 12px #004b8b;
}
.container-message{
  height: 100px;
  line-height: 90px;
  color: #fff; 
  background-color: transparent;
  width: 1214px;  
  font-size: 40px;
  text-align: center;
}
#container-logo {    
  font: 400 14px / 30px "Bauhaus 93", sans-serif;
  color: #1181be;
}
.titre {
  width: 1214px;
  font-size: 80px;
  height: 50px;
  text-align: center;
}
.sous-titre {
  width: 1214px;
  font-size: 38px;
  height: 50px;
  text-align: center;
}
#container-bt-game{
  position: relative;
  width: 1214px; 
  height: 52px;
  background-color: transparent;
  text-align: center;
  margin: 20px auto;
}
#bt-jouer, #bt-mot-suivant, #bt-valid-score, #bt-ok-score{
  background-color: #066db2;
  color: #fff;
  font-size: 50px;
  padding: 20px 40px;
  text-transform: uppercase;
  border: solid 3px #fff;  
}
#bt-valid-score[disabled]{
  color: #52b0e3;
}
#bounceMessage{
  position: absolute; 
  top:600px;  
}
#bt-regles, #bt-meilleurs-scores{
  background-color: transparent;
  color: #1181be;
  border: 0;
  position: absolute; 
  top:0;  
  width: 100px; 
  height: 100px;
}
#bt-regles{ 
  left: 30px;    
}
#bt-meilleurs-scores{
  right: 30px;  
}
.regles, .meilleurs-scores{
  font-size: 80px;
  width: 116px;
}

/*Animation des points*/
@keyframes myAnim {
  0% {
    opacity: 0;
    transform: translateY(80%);
  }
  20% {
    opacity: 1;
  }
  50% {
    opacity: 0;
    transform: translateY(0%);
  }
  100% {
    opacity: 0;
    transform: translateY(0%);
  }
}
.box {
  /*width: 500px;*/
  width: 100%;
  height: 100px;  
  opacity: 0;
  font-size: 140px;
  font-weight: bold;
  position: absolute;  
  z-index: 520;
  margin-top: 100px;
  margin-left: 10px;
  text-align: center;
  color: #fff;
  text-shadow: 4px 4px 8px #000;  
}
.changing {
  animation: myAnim 3s;
}

.gStar {
  position: absolute;
  z-index: 510;
  opacity: 0;
  pointer-events: none;
}

/*Animation des crédits*/
#credits{
  position: relative;
}
#fond_heart_1, #fond_heart_2, #fond_heart_3, #fond_heart_4, 
#fond_heart_5, #fond_heart_6, #fond_heart_7, #fond_heart_8 {  
  position: absolute;
  top:16px;
  font-size: 30px;
  color: #004b8b;  
  display: inline-block;
  margin-top: 20px;
}
#heart_1, #heart_2, #heart_3, #heart_4, #heart_5, #heart_6, #heart_7, #heart_8 {  
  position: absolute;
  top:16px;
  font-size: 30px;
  color: #fd84fd;
  opacity: 0;
  transform: scale(0);
  display: inline-block;
  margin-top: 20px;
}
#heart_1, #fond_heart_1 { left: 25px; }
#heart_2, #fond_heart_2 { left: 67px; }
#heart_3, #fond_heart_3 { left: 109px; }
#heart_4, #fond_heart_4 { left: 151px; }
#heart_5, #fond_heart_5 { left: 193px; }
#heart_6, #fond_heart_6 { left: 235px; }
#heart_7, #fond_heart_7 { left: 277px; }
#heart_8, #fond_heart_8 { left: 319px; }

/*Animation des niveaux*/
#niveau{ position: relative; }
#fond_niveau_1, #fond_niveau_2, #fond_niveau_3, #fond_niveau_4, 
#fond_niveau_5, #fond_niveau_6{  
  position: absolute;
  top:16px;
  font-size: 30px;
  color: #004b8b;  
  display: inline-block;
  margin-top: 20px;
}
#niveau_1, #niveau_2, #niveau_3, #niveau_4, #niveau_5, #niveau_6 {  
  position: absolute;
  top:16px;
  font-size: 30px;
  color: #e2db17;
  opacity: 0;
  transform: scale(0);
  display: inline-block;
  margin-top: 20px;
}

#niveau_1, #fond_niveau_1 { left: 67px; }
#niveau_2, #fond_niveau_2 { left: 109px; }
#niveau_3, #fond_niveau_3 { left: 151px; }
#niveau_4, #fond_niveau_4 { left: 193px; }
#niveau_5, #fond_niveau_5 { left: 235px; }
#niveau_6, #fond_niveau_6 { left: 277px; }

.invisible{
  opacity: 1;
  animation: descendFade 3s ease-out forwards;
}

@keyframes descendFade {
  0% {
    transform: translateX(0) translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateX(0) translateY(100px);
    opacity: 0;
  }
}

.visible {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.bounce {
  animation: bounceIn 1s ease forwards;
}

@keyframes bounceIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  30% {
    transform: scale(4);
    opacity: 1;
  }
  50% {
    transform: scale(0.95);
  }
  70% {
    transform: scale(1.2);
  }
  85% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
     opacity: 1;
  }
}


/*PORTRAIT*/
@media (max-width: 344px) and (orientation: portrait){
  #global-container{    
    transform: translate3d(-50%, -50%, 0) scale(0.28);
  }
}

@media (min-width: 345px) and (orientation: portrait){
  #global-container{    
    transform: translate3d(-50%, -50%, 0) scale(0.3);
  }
}

@media (min-width: 376px) and (orientation: portrait){
  #global-container{   
    transform: translate3d(-50%, -50%, 0) scale(0.32);
  }
}


@media (min-width: 768px) and (orientation: portrait){
  #global-container{   
    transform: translate3d(-50%, -50%, 0) scale(0.5);
  }
}

@media (min-width: 912px) and (orientation: portrait){
  #global-container{   
    transform: translate3d(-50%, -50%, 0) scale(0.7);
  }
}


/*PAYSAGE*/
@media (max-width: 1023px) and (orientation: landscape){
  #global-container{    
    transform: translate3d(-50%, -50%, 0) scale(0.16);
  }
}

@media (min-width: 1024px) and (max-height: 600px) and (orientation: landscape){
  #global-container{    
    transform: translate3d(-50%, -50%, 0) scale(0.3);
  }
}

@media (min-width: 1024px) and (min-height: 601px) and (orientation: landscape){
  #global-container{    
    transform: translate3d(-50%, -50%, 0) scale(0.4);
  }
}

@media (min-width: 1366px) and (orientation: landscape){
  #global-container{    
    transform: translate3d(-50%, -50%, 0) scale(0.48);
  }
}




@media (prefers-color-scheme: dark) {
  input {
    background-color: #222;
    color: #fff;
    border: 1px solid #555;
  }

  input::placeholder {
    color: #aaa;
  }
}

@media (prefers-color-scheme: light) {
  input {
    background-color: #fff;
    color: #000;
    border: 1px solid #ccc;
  }

  input::placeholder {
    color: #666;
  }
}