#btn_fonctions {position:fixed;top:5vw;left:5vw;width:48px;height:48px;background:#fff;border-radius:36px;padding:12px;}
#btn_fonctions img {width:100%;height:100%;opacity:0.6}

#fonctions-list {text-align:center;padding:24px;}
.fonction {height:64px;width:64px;display:block;margin:auto;}
.fonction img {height:64px;width:64px;}

.fonction.used {
  opacity: 0.4;
  pointer-events: none;
}

#fonction-detail {
  margin-top: 20px;
}

#fonction-detail.hidden {
  display: none;
}

.kiss-pixel {
  position: absolute;
  width: 120px;
  height: 120px;
  background-color: #fc3b40;
  border-radius: 50%;
  opacity: 0.7;
  animation: kiss-float 7s ease-out forwards;
  pointer-events: none;
}

@keyframes kiss-float {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0.7;
  }
  100% {
    transform: translateY(-50px) scale(0.5);
    opacity: 0;
  }
}

#kiss-container {
  position:fixed;
  background:none;
  width:100vw;
  height:100vh;
  top:0;
  left:0;
  z-index:0;
  transform:scale(1.2);
  transform-origin:right center
}


#modal {
  position: fixed;
  top: 0; 
  left: 0;
  width: 100vw; height: 100dvh;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 12;
}

#modal.show {
  display: flex;
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 16px;
  max-width: 500px;
  max-height: 600px;
  width:calc(100% - 36px);
  height:calc(100dvh - 36px);
  position: relative;
}
.modal-content h2 {
  text-align:center;
  margin:10px 0 0 0;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 16px;
  font-size: 24px;
  cursor: pointer;
}

.ui-button {
	position:relative;
  font-weight: bold;
  cursor: pointer;
  z-index: 11;
}

#new-game {
  position: fixed;
  bottom: 20px;
  right: 20px;
  /*background-color:#fff;*/
  color: #fc3b40;
  padding: 10px 20px;
  font-weight: bold;
  font-size:12px;
  border-radius: 12px;
  cursor: pointer;
  z-index: 10;
  user-select: none;
  transition: background-color 0.2s ease;
}

#new-game:hover {
  text-decoration:underline
}


#kiss img {max-width:200px;}
#kiss-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  background-repeat: no-repeat;
  background-size: 4px 4px;
  pointer-events: none;
}

* {
  box-sizing: border-box;
  touch-action: manipulation;
}

html, body {
  height: 100dvh;
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  background-color: #fff0f5;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  -webkit-touch-callout: none;
}

/* Calque qui capte tous les clics */
#click-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 3;
}

/* Emoji bisou central */
.kiss-button {
  font-size: 8rem;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  transition: transform 0.1s ease;
  -webkit-tap-highlight-color: transparent;
  pointer-events: none; /* désactivé ici car c'est le calque qui capte le clic */
  z-index: 2;
  position: relative;
}

.kiss-button:active,
.kiss-button.active {
  transform: scale(1.2);
}

.kiss-count {
  background-color: #fff;
  border-radius: 36px;
  padding: 8px 12px;
  text-align: center;
  font-size: 22px;
  font-weight: bold;
  color: #fc3b40;
  pointer-events: none;
  z-index: 2;
  position: relative;
  width: auto;
  display: block;
  width: fit-content;
  margin: 20px auto;
  margin:auto;
}


/* Timer en haut à droite */
.timer {
  background-color: #fff;
  border-radius:36px;
  padding:0 20px;
  height:48px;
  line-height:48px;
  position: fixed;
  top:5vw;right:5vw;
  font-size: 22px;
  font-weight: bold;
  color: #fe8a8d;
  display: none;
  pointer-events: none;
  z-index: 2;
}

/* Optionnel : pour désactiver toute sélection dans certains blocs */
.bloc_select {
  touch-action: manipulation;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
