:root {
    --gridWidth: 40px;
    --gridHeight: 40;
    --puckSize: 50;
    --puckSizePx: 50px;

    --menuColorR: 74;
    --menuColorG: 72;
    --menuColorB: 91;
    --animSpeedPoint: .5s;
    --animSpeedLine: 2s;
}

/* Désactiver la sélection de texte */
* {
    -webkit-touch-callout: none;
    -webkit-user-callout: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    -webkit-user-modify: none;
    -webkit-highlight: none;
    user-select: none;
}

body, html {
    font-family: Arial;
    padding: 0px;
    margin: 0px;
    background-color:  rgb(205, 205, 205);
    
    width: 100%;
    height: 100%;
    overflow: hidden;
}

input[type='number']{
    width: 40px;
} 

#divMain {
    width: 100%;
    height: 100%;
    overflow: hidden;
    padding: 0px;
    margin: 0px;
    background-color:  rgb(199, 199, 199);
    background-image: url("bodyBackground.png");
    background-repeat: repeat;
    /*background-position: center;*/
    perspective: 1000px;
}
/**************************************************/
/***                                            ***/
/***                  GRILLE                    ***/
/***                                            ***/
/**************************************************/
#divPlateau {
    transform: rotateX(30deg), translateX(-50%);
    transform-style: preserve-3d;
    position: absolute;
    top: 0;
    left: 0;
    width: 95%;    
    height: 95%;
    padding: 0px;
    margin: 0px;
    background-image: url("deck.png");
    background-repeat: repeat;
    /*background: radial-gradient(circle at 200px 100px,rgb(214, 238, 0),rgb(214, 189, 0), rgb(157, 139, 0));*/
    user-select: none; /* pas de sélection sur PC */
    overflow: hidden; /* pas de scroll sur mobile */
    border: 10px solid SaddleBrown;
    box-shadow: 
    inset 0 0 0 1px rgba(0, 0, 0, 0.5),
    inset 0 0 0 2px rgba(0, 0, 0, 0.4),
    inset 0 0 0 3px rgba(0, 0, 0, 0.3),
    inset 0 0 0 4px rgba(0, 0, 0, 0.2),
    inset 0 0 0 5px rgba(0, 0, 0, 0.1);
    transition: opacity .5s ease;
}

#divPalet {
    width: var(--puckSizePx);
    height: var(--puckSizePx);
    left: 200px;
    top: 200px;
    padding: 0px;
    margin: 0px;
    /*background-color: #09619d;
    border-radius: 50%;*/
    position: absolute;
    cursor: pointer;
    opacity: 0;
    user-select: none;
    touch-action: none;
    /*border: 3px solid #000;*/
    border-bottom: 3px solid #000;
    transition: opacity .5s ease,scale .5s ease;

      /* this variable will define how big the curve will be */
    --r: 22px;
    background: 
        radial-gradient(50% var(--r) at 50% var(--r), #0003 99.99%, #0000 0),
        radial-gradient(50% var(--r) at 50% calc(100% - var(--r)), #fff3 99.99%, #0000 0),
        rgb(11, 0, 163);
    border-radius: 100% / calc(var(--r) * 2);

}

.classObstacle {
    width: 100px;
    height: 100px;
    left: 200px;
    top: 200px;
    padding: 0px;
    margin: 0px;
    position: absolute;
    user-select: none;
    touch-action: none;
    border-bottom: 3px solid #000;
    transition: opacity .5s ease,scale .5s ease;

      /* this variable will define how big the curve will be */
    --r: 60px;
    background: 
        radial-gradient(50% var(--r) at 50% var(--r), #0003 99.99%, #0000 0),
        radial-gradient(50% var(--r) at 50% calc(100% - var(--r)), #fff3 99.99%, #0000 0),
        rgb(164, 68, 0);
    border-radius: 100% / calc(var(--r) * 2);

}

.classTarget {
    width: 80px;
    height: 80px;
    left: 200px;
    top: 50px;
    padding: 0px;
    margin: 0px;
    background-image: url("woodblack.png");
    background-repeat: repeat;
    background-color: #434100;
    /*box-shadow: inset 0em 1em #282600;*/
    border-radius: 50%;
    position: absolute;
    user-select: none;
    touch-action: none;
    color: white;
    text-align: center;
    line-height: 20px;
    transition: scale .1s ease;
}

.classElastic {
    position: absolute;
    width: 100vw;
    height: 3px;
    left: 0px;
    top: 75vh;
    padding: 0px;
    margin: 0px;
    background-color:  rgb(0, 0, 0);
    transform-origin: 0px 1px;
}

#elasticDivL {
    transform-origin: left 1px;
}
#elasticDivR {
    transform-origin: right 1px;
}

#divDirection {
    position: absolute;
    width: var(--puckSizePx);
    height: 0px;
    left: 100px;
    top: 75vh;
    padding: 0px;
    margin: 0px;
    text-align: center;
    background: linear-gradient(to top, blue, transparent);
    /*background-color:  rgb(134, 69, 69,.5);*/
    transform-origin: center bottom;
}




.gelatine {
    animation: gelatine 0.5s ease;
  }
  @keyframes gelatine {
    from, to { transform: scale(1, 1); }
    25% { transform: scale(0.9, 1.1); }
    50% { transform: scale(1.1, 0.9); }
    75% { transform: scale(0.95, 1.05); }
}

.elastic-spin {
    animation: elastic-spin 1s infinite ease;
  }
  @keyframes elastic-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(720deg); }
  }

  .shakeing {
    animation: shakeing .1s infinite ease;
  }
  @keyframes shakeing {
    0% { transform: translateY(0) }
    25% { transform: translateY(5px) }
    50% { transform: translateY(-5px) }
    75% { transform: translateY(5px) }
    100% { transform: translateY(0) }
  }



.bounce-out {
    animation: bounce-out .5s ease;
  }
  @keyframes bounce-out {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    25% {
        opacity: .7;    
        transform: scale(1.05);
    }
    100% {
        opacity: 0;
        transform: scale(.1);
    } 
  }

.borderBlink {
    animation: borderBlink 1s ease;
    animation-iteration-count: 2;
}
@keyframes borderBlink {
    0% {
        border: 10px DarkSlateBlue solid;
    }
    25% {
        border: 10px white solid;
    }
    50% {
        border: 10px DarkSlateBlue solid;
    }
    75% {
        border: 10px black solid;
    }
    100% {
        border: 10px DarkSlateBlue solid;
    } 
}

.alerts-border {
    border: 10px DarkSlateBlue solid;
    
    animation: blink 1s;
    animation-iteration-count: 5;
}
@keyframes blink { 50% { border-color:#fff ; }  }



.classRangeWide {
    width: 100%;
}


/***********************************************************/
.classContainer {
    font-size: 12px;
    text-align: center;
    color: white; 
    position: fixed;
    top: -2px;
    right : 15px;
    padding: 2px;
    width: 40px;
    height: auto;
    
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    user-select: none;
    z-index: 5;    
    background-color: rgba(113, 113, 113,.5);
    border: 1px solid #ffffff;
}

#divBoardContainer {
    right : 165px;
}
#divThrowsContainer {
    right : 115px;
}
#divTargetContainer {
    right : 65px;
}
#divScoreContainer {
    right : 15px;
}
.classScore {
    font-size: 14px;
}
.classColor {
    color:#000;
    border-radius: 10px;
}
/***********************************************************
                         SNACKBAR
************************************************************/

#snackbar {
    visibility: hidden;
    transform: translateX(-50%);
    min-width: 300px;
    height: 30px;
    line-height: 30px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 5px;
    padding: 16px;
    position: fixed;
    z-index: 9999999;
    left: 50%;
    top: 30px;
    font-size: 17px;
    opacity: .8;
  }
  
  #snackbar.show {
    visibility: visible;
    -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
  }
  
  @-webkit-keyframes fadein {
    from {bottom: 0; opacity: 0;} 
    to {bottom: 30px; opacity: 1;}
  }
  
  @keyframes fadein {
    from {bottom: 0; opacity: 0;}
    to {bottom: 30px; opacity: 1;}
  }
  
  @-webkit-keyframes fadeout {
    from {bottom: 30px; opacity: 1;} 
    to {bottom: 0; opacity: 0;}
  }
  
  @keyframes fadeout {
    from {bottom: 30px; opacity: 1;}
    to {bottom: 0; opacity: 0;}
  }
  
/**************************************************/

/* ===============  ============= */


.classNumber {
    border-radius: 50%;
    background-color: white;
    color: black;
    width: 10px;
    height: 10px;
    line-height: 10px;
    text-align: center;
    font-weight: 500;
    margin: 0px;
    padding: 2px;
}


/*************************************************************************************/



#divMenuContainer {
    position: fixed;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: center;
    overflow-y: auto;
    top: -1600px;
    left: 50%;
    width: 90%;
    transform: translateX(-50%);
    height:auto;
    max-height: 80%;
    background-image: url("wood0.png");
    background-repeat: repeat;
    /*background-color: rgb(var(--menuColorR), var(--menuColorG), var(--menuColorB));*/
    color:white;
    border-radius: 10px;
    padding: 0px;
    margin: 0px;
    font-size: 14px;
    user-select: none;
    z-index: 999;
    transition: top 1s ease;
}

#divRankingContainer {
    position: fixed;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: center;
    overflow-y: auto;
    top: -1600px;
    left: 50%;
    width: 90%;
    transform: translateX(-50%);
    height:auto;
    max-height: 80%;
    background-color: rgb(var(--menuColorR), var(--menuColorG), var(--menuColorB));
    color:white;
    border-radius: 10px;
    padding: 0px;
    margin: 0px;
    font-size: 14px;
    user-select: none;
    z-index: 999;
    transition: top 1s ease;
}

#divHistoRanking {
    font-size: 12px;
    height: 100px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
}


.classCadre {
    border-radius: 10px;
    font-size: 14px;
    user-select: none;
    width: auto;
    text-align: center;
    color: black;
    background-color:  rgb(205, 205, 205);

    padding: 5px;
    margin: 10px;

}
.classSousCadre {
    border-radius: 10px;
    padding: 5px;
    margin: 5px;
    user-select: none;
    width: auto;
    border: 1px solid rgb(var(--menuColorR), var(--menuColorG), var(--menuColorB));
    text-align: left;    
}
.classHoriz {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
}
.classBouton {
    background-image: url("wood0.png");
    background-repeat: repeat;
    /*background-color: rgb(var(--menuColorR), var(--menuColorG), var(--menuColorB));*/
    color: #fff;
    cursor: pointer;
    text-align: center;
    border-radius: 10px;
    padding: 5px;
    margin: 5px;
    font-size: 18px;
    user-select: none;
}
.classBoutonCfg {
    font-size: 14px;
}



/******************************************************/

datalist {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    /*writing-mode: vertical-lr;*/
    width: 100%;
  }
  
  option {
    padding: 0;
  }
  

.rangeParams {
    width: 150px;
}
.rangePlayers {
    width: 100%;
}

/******************************************/


/**************************************************/
/***                                            ***/
/***             Boutons Flottants              ***/
/***                                            ***/
/**************************************************/
.overBtn {
    cursor: pointer;
    font-size: 20px;
    text-align: center;
    border-radius: 50%;
    border: 4px solid white;
    background-color: lightgray;
    position: fixed;
    left: 10px;
    width: 30px;
    height: 30px;
    line-height: 30px;
    user-select: none;
}

.underBtn {
    cursor: pointer;
    font-size: 20px;
    text-align: center;
    border-radius: 50%;
    border: 4px solid white;
    background-color: lightgray;
    width: 30px;
    height: 30px;
    line-height: 30px;
    user-select: none;
}

#divMenuBtn {
    top: 10px;
    border-radius: 25%;
    font-size: 14px;
    font-weight: bold;
    user-select: none;
    width: auto;
    text-align: center;
    background-color: rgb(205, 205, 205);
    padding-left: 5px;
    padding-right: 5px;
    margin: 0px;
}

#divFullScreen {
    top: 60px;
}

#divSound {
    top: 110px;
}



#svgFond {
    padding: 0px;
    margin: 0px;
    z-index: 2;
}











/*==========================================*/

/* Définir l'animation de clignotement */
@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}
.blinking {
    animation: blink 1s infinite; /* 1s est la durée de l'animation, infinite signifie qu'elle se répète indéfiniment */
}


/**************************************************/
/***                                            ***/
/***                  LOADING                   ***/
/***                                            ***/
/**************************************************/

/* Couvrir tout l'écran */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    /*background-color: rgba(var(--menuColorR), var(--menuColorG), var(--menuColorB));*/
    color: white;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    
    z-index: 9999; /* Au-dessus de tout */
}
/* Spinner de chargement simple */
.loading-spinner {
    border: 8px solid #f3f3f3; /* Couleur de fond */
    border-top: 8px solid rgb(var(--menuColorR), var(--menuColorG), var(--menuColorB)); /* Couleur de l'animation */
    border-radius: 50%;
    margin: 20px;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}
/* Animation pour le spinner */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}



/**************************************************/
/***                                            ***/
/***                  RIBBON                    ***/
/***                                            ***/
/**************************************************/


/* HTML: <div class="ribbon">Your text content</div> */
.ribbon {
    position: fixed; /* Positionnement fixe par rapport à la fenêtre */
    top: 10px;
    left: 50%; /* Positionne l'élément au centre de la fenêtre */
    transform: translateX(-50%);
    opacity: 0;
    font-size: 14px;
    user-select: none;
    text-align: center;
    color: #fff;
    transition: opacity 1s ease;

    --s: 1.8em; /* the ribbon size */
    --d: .8em;  /* the depth */
    --c: .8em;  /* the cutout part */
    
    padding: var(--d) calc(var(--s) + .5em) 0;
    line-height: 1.8;
    background:
      conic-gradient(from  45deg at left  var(--s) top var(--d),
       #0008 12.5%,#0000 0 37.5%,#0004 0) 0   /50% 100% no-repeat,
      conic-gradient(from -45deg at right var(--s) top var(--d),
       #0004 62.5%,#0000 0 87.5%,#0008 0) 100%/50% 100% no-repeat;
    clip-path: polygon(0 0,calc(var(--s) + var(--d)) 0,calc(var(--s) + var(--d)) var(--d),calc(100% - var(--s) - var(--d)) var(--d),calc(100% - var(--s) - var(--d)) 0,100% 0, calc(100% - var(--c)) calc(50% - var(--d)/2),100% calc(100% - var(--d)),calc(100% - var(--s)) calc(100% - var(--d)),calc(100% - var(--s)) 100%,var(--s) 100%,var(--s) calc(100% - var(--d)),0 calc(100% - var(--d)),var(--c) calc(50% - var(--d)/2));
    background-color: #D95B43; /* the main color */
    width: fit-content;
  }

