body {
    color: #000; /* Optionnel : couleur du texte pour contraste */
    display: flex;
    flex-direction: column;
    align-items: stretch;
    font-family: "Saira Stencil One", sans-serif;
    font-weight: 400;
    font-style: normal;
    overflow-x: hidden;
    max-width: 100vw; /* largeur de fenetre */
    width: 100vw;
    user-select: none;
    margin: 0px;
    padding: 0px;
}
p {
    margin: 0px;
    padding: 0px;
}

h1, h2,h3 {
  all: unset;
  font-size: 1.5em;

}

h2 {
  font-size: 1.3em;
}
h3 {
  font-size: 1.1em;
}


button {
  border-radius: 5px;
  font-family: "Saira Stencil One", sans-serif;
  font-weight: 400;
  font-style: normal;
  cursor: pointer;

  text-align: center;
  margin:10px;
  padding:5px;
  border:1px solid #ccc;
  border-radius:10px;
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  box-shadow: 1px 1px 2px #aaa;
}

input[type=number] {
    width: 3ch;           /* assez pour 1 chiffre + un peu de marge */
    padding: 2px 5px;
    text-align: center;   /* centre la saisie */
    font-size: 1em;
}

progress {
    width: 50px;
}

progress.progress-complete::-webkit-progress-value {
    background-color: limegreen;
}
progress.progress-complete::-moz-progress-bar {
    background-color: limegreen;
}
progress.progress-complete {
    accent-color: limegreen; /* pour navigateurs modernes */
}

summary {
  cursor: pointer;
}


#backgroundLayer {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background-image: url('fond2.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -1;
}





.cadre {
  text-align: center;
  margin:10px;
  padding:5px;
  border:1px solid #ccc;
  border-radius:10px;
  background-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  box-shadow: 1px 1px 2px #aaa;
}

.alignCenter {
    display: flex;
    flex-direction: column;
    /* align-content: center; */
    align-items: center;
}




#divMain {
  overflow-x: hidden;
  width: 100vw;
  min-width: 100vw;
  max-width: 100vw;
  margin: 0px;
  padding: 0px;
}

#divComment {
  height: 50px;
  margin-top: 100px;
  text-align: center;
}






/*****************************************/
/***************** TITLE *****************/
/*****************************************/

#mask
{
  display: block;
  position:relative;

  top:10px;
  margin:0px;
  width:300px;
  height:300px;
 
  font-family: "Saira Stencil One", sans-serif;
  font-weight: 700;
  font-style: normal;
  font-size: 80px;
  line-height: 70px;
  text-align:center;
  text-shadow: 0px 2px 2px  rgba(0,0,0,0.2), 0px 2px 0px rgba(255,255,255,0.3);
  background-image:-webkit-radial-gradient(center 10px,80px 500px, #111111 50%, #0099ff 51%);   
  background-size:30px 1000px;
  -webkit-background-clip: text; 
  -webkit-text-fill-color: transparent; 
  -webkit-animation-name: wave-animation;
  -webkit-animation-duration: 4s;  
  /*-webkit-animation-iteration-count:infinite;*/
  -webkit-animation-timing-function: linear ; 
}

@-webkit-keyframes 'wave-animation' { 
 0% {background-position:50px 0px;}
 25% {background-position:-50px -75px;}
 50% {background-position:50px -150px;}
 75% {background-position:-50px -225px;}
 100% {background-position:50px -300px;;}
}

#box{
  margin: 0px;
  width: 300px;
  height:300px;
  border-radius:10px;
  border:1px solid #111111;
  opacity:0.95;  
}


/*****************************************/
/***************** FIOLES ****************/
/*****************************************/

.classFioleContainer{
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  gap: 0px;
  margin-top: 50px;
  overflow: hidden;
}

.classFiole {
    display: flex;
    justify-content: flex-end;
    flex-direction: column;
    overflow: hidden;

    transition: opacity 0.3s ease-in-out;

    cursor: pointer;
    width: 50px;
    height: 210px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    border-left: 3px solid rgba(255, 255, 255, 0.3);
    border-right: 3px solid rgba(255, 255, 255, 0.3);
    border-bottom: 3px solid rgba(255, 255, 255, 0.3);
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;

    --glas-gradient: linear-gradient(to right, rgb(0 0 0 / .1), transparent 10% 15%, rgb(255 255 255 / .5) 20%, transparent 50% 90%, rgb(0 0 0 / .1));
    background-image: var(--glas-gradient);

    /*background: rgba(255, 255, 255, 0.05);    */
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(2px);
      -webkit-backdrop-filter: blur(2px);
}

.classFioleColor {
    display: flex;    
    width: 100%;
    height: 40px;
    --skew: .5rem;
    background-image: var(--glas-gradient), linear-gradient(to right, rgb(0 0 0 / .25), transparent 50% 70%, rgb(0 0 0 / .25));

}




#divFakeFiole {
    position: absolute;
    top:0px;
    left:110px;
    transform-origin: top center;
    transform: rotate(0deg);
    transition: transform 0.9s ease-in-out;
    align-items: center;
    display: none;
    z-index: 1000;
    will-change: transform;
}

.fakeColor {
    width:500px;
    transform-origin: top center;
    transform: rotate(0deg);
    transition: transform 0.9s ease-in-out;
    will-change: transform;
}







#parametres {
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}
#parametres label {
    display: flex;
    gap: 5px;
    align-items: center;
}



#progressionGrille {
    text-align: center;
    background-color: rgba(255,255,255,0.4);
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 0 5px #999;
}



/* ===================================================== */
.gelatine {
    animation: gelatineTop 1s ease-in-out infinite;
    transform-origin: bottom center; /* 👈 essentiel */
}
@keyframes gelatineTop {
    0%, 100% { transform: scaleY(1); }
    25% { transform: scaleY(1.02); }
    50% { transform: scaleY(0.98); }
    75% { transform: scaleY(1.02); }
}

@keyframes bounceUp {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.fioleSelected {
    animation: bounceUp 0.4s ease;
}

.pulse {
  animation: pulse 1s infinite ease-in-out alternate;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.2); }
  50% { transform: scale(0.8); }
  75% { transform: scale(1.2); }
}



/****************************************************************************************/

.classPing {
    position: fixed;
    top: 2px;
    right: 2px;
    z-index: 9999; /* au-dessus de presque tout */
    color: white;
    padding: 0px;
    margin: 0px;
  }

#divServerSpin {
    width: 10px;
    padding: 8px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--color-purple);
    --_m: 
      conic-gradient(#0000 10%,#000),
      linear-gradient(#000 0 0) content-box;
    -webkit-mask: var(--_m);
            mask: var(--_m);
    -webkit-mask-composite: source-out;
            mask-composite: subtract;
    animation: l3 1s infinite linear;
  }
  @keyframes l3 {to{transform: rotate(1turn)}}

#divWarningTriangle {
    width: 20px;
    aspect-ratio: 1/cos(30deg);
    clip-path: polygon(50% 0,100% 100%,0 100%);
    background: linear-gradient(45deg,var(--color-red),var(--color-purple));
  }




.groupeParties {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.btnChargerPartie {
  border-radius: 8px;
  font-family: "Saira Stencil One", sans-serif;
  font-weight: 400;
  font-style: normal;

  display:flex;
  flex-direction: column;
  align-items: center;
  width: auto;
  padding: 0px;
  border: 5px solid #ccc;
  border-radius: 8px;
  background-color: #fdfdfd;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.1);

  background-image: url('fond2.webp');  /* ou dynamiquement comme body */
  background-size: 100% 100%;           /* étire dans la vignette */
  background-position: center;
  background-repeat: no-repeat;

}
/*****************************************************************/
#confetti-canvas {
    width: max-width;
    top: 0;
    position: absolute;
}

/*****************************************************************/
.bulle {
  position: fixed;
  z-index: 999;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  font-size: 1em;
  line-height: 1em;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
  margin: 0px;
  height: 16px;

}

#bullePlayer {
  top: 10px;
  left: 10px;
}
#bulleConfig {
  top: 54px;
  left: 10px;
}
#bulleStats {
  top: 98px;
  left: 10px;
}

#bulleProgress {
  top: 10px;
  left: calc(100vw - 270px);
  width: 130px;
}
#bulleNext {
  top: 10px;
  left: calc(100vw - 115px);
  width: 90px;
}
#bullePartie {
  top: 54px;
  left: calc(100vw - 210px);
  width: 80px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;
  padding: 0px;
  height: 28px;
}
#btnRestart {
  top: 54px;
  left: calc(100vw - 115px);
  width: 100px;
  height: 30px;
}

#btnAnnuler {
  top: 98px;
  left: calc(100vw - 115px);
  width: 100px;
  height: 50px;
}


#bulleSoluce {
  bottom: 70px;
  left: 10px;
}

/**************************** CONFIG FOND **********************************/

.modal {
  text-align: center;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.6);
  color: #fff;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  overflow-y: auto;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    max-width: 90%;
}

.fond-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
    justify-content: center;
}

.fond-thumb {
    width: 100px;
    height: 60px;
    object-fit: cover;
    border: 3px solid transparent;
    cursor: pointer;
    border-radius: 6px;
}

.fond-thumb.selected {
    border-color: #0099ff;
}






/*********************************************************************************************************/

.lab {
    position: fixed;
    margin: 0px;
    width: 100%;
    height: 100%;    
}

.lab i {
    z-index: 2;
    position: absolute;
    height: 15px;
    width: 15px;
    border-radius: 30px;
    opacity: 0;
    animation: bubble1 linear 3s infinite;
}

.lab i:nth-child(1) {
    animation-name: bubble1;
}
.lab i:nth-child(2) {
    animation-delay: .7s;
    animation-name: bubble2;
}
.lab i:nth-child(3) {
    animation-delay: 1.5s;
    animation-name: bubble1;
}
.lab i:nth-child(4) {
    animation-delay: 2.3s;
    animation-name: bubble2;
}
.lab i:nth-child(5) {
    animation-delay: 3s;
    animation-name: bubble1;
}
.lab i:nth-child(6) {
    animation-delay: 3.5s;
    animation-name: bubble2;
}
.lab i:nth-child(7) {
    animation-delay: 4.2s;
    animation-name: bubble1;
}
.lab i:nth-child(8) {
    animation-delay: 5s;
    animation-name: bubble2;
}

@keyframes bubble1 {
    0%   { bottom: 1px;   left: 21px; transform: scale(.1); opacity: 1; background: #fff; }
    10%  { bottom: 25px;  left: 17px; transform: scale(.2); opacity: 1; background: #fff; }
    20%  { bottom: 49px;  left: 21px; transform: scale(.2); opacity: 1; background: #fff; }
    30%  { bottom: 73px;  left: 15px; transform: scale(.3); opacity: 1; background: #fff; }
    40%  { bottom: 97px;  left: 21px; transform: scale(.4); opacity: 1; background: #fff; }
    49%  { bottom: 121px; left: 17px; transform: scale(.4); opacity: 1; background: #fff; }
    50%  { bottom: 123px; left: 17px; transform: scale(.5); opacity: 1; background: #fff; }
    60%  { bottom: 147px; left: 21px; transform: scale(.6); }
    70%  { bottom: 170px; left: 16px; transform: scale(.7); }
    80%  { bottom: 185px; left: 21px; transform: scale(.8); }
    90%  { bottom: 195px; left: 17px; transform: scale(1); }
    99%  { bottom: 199px; left: 21px; transform: scale(.1); opacity: .5; }
    100% { bottom: 200px; left: 21px; transform: scale(0); opacity: 0; background: #fff; }
}

@keyframes bubble2 {
    0%   { bottom: 1px;   left: 13px; transform: scale(.1); opacity: 1; background: #fff; }
    10%  { bottom: 25px;  left: 18px; transform: scale(.2); opacity: 1; background: #fff; }
    20%  { bottom: 49px;  left: 13px; transform: scale(.2); opacity: 1; background: #fff; }
    30%  { bottom: 73px;  left: 18px; transform: scale(.3); opacity: 1; background: #fff; }
    40%  { bottom: 97px;  left: 13px; transform: scale(.4); opacity: 1; background: #fff; }
    49%  { bottom: 121px; left: 18px; transform: scale(.4); opacity: 1; background: #fff; }
    50%  { bottom: 123px; left: 18px; transform: scale(.5); opacity: 1; background: #fff; }
    60%  { bottom: 147px; left: 13px; transform: scale(.6); }
    70%  { bottom: 171px; left: 18px; transform: scale(.7); }
    80%  { bottom: 185px; left: 13px; transform: scale(.8); }
    90%  { bottom: 195px; left: 18px; transform: scale(1); }
    99%  { bottom: 199px; left: 13px; transform: scale(.1); opacity: .5; }
    100% { bottom: 200px; left: 13px; transform: scale(0); opacity: 0; background: #fff; }
}




















.camembert {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: conic-gradient(green 0%, red 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;    
    box-shadow: 0 0 5px #999 inset;
}

.camembertTexte {
    width: 20px;
    height: 20px;
    position: absolute;
    text-align: center;
    z-index: 2;
    background-color: white;
    border-radius: 50%;
    font-size: 1em;
    line-height: 1.2em;
}






.classFlex {
    display: flex;
    flex-direction: row;
    gap: 0px;
    /*padding: 5px;*/
    /*border: 1px solid #ccc;*/
    border-radius: 10px;
    /*background: rgba(255, 255, 255, 0.1);*/
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-evenly;
}


.hithere {
  animation: hithere 1s ease infinite;
}
@keyframes hithere {
  30% { transform: scale(1.2); }
  40%, 60% { transform: rotate(-20deg) scale(1.2); }
  50% { transform: rotate(20deg) scale(1.2); }
  70% { transform: rotate(0deg) scale(1.2); }
  100% { transform: scale(1); }
}