/* ═══ Fruit Ninja — design system jeux.html ═══ */
.jeu-v-wrap { max-width: 520px; margin: 0 auto; }
#game-content { overflow: hidden; }

/* ── Conteneur du jeu ── */
.fn-board {
  position: relative;
  width: 100%;
  height: clamp(300px, 58vh, 540px);
  overflow: hidden;
  background-color: #3b1f0a;
  background-image:
    repeating-linear-gradient(
      92deg,
      transparent 0px,
      transparent 18px,
      rgba(255,255,255,.018) 18px,
      rgba(255,255,255,.018) 20px
    ),
    repeating-linear-gradient(
      180deg,
      transparent 0px,
      transparent 6px,
      rgba(0,0,0,.08) 6px,
      rgba(0,0,0,.08) 7px
    ),
    repeating-linear-gradient(
      88deg,
      rgba(0,0,0,.06) 0px,
      rgba(0,0,0,.06) 2px,
      transparent 2px,
      transparent 34px,
      rgba(255,200,100,.04) 34px,
      rgba(255,200,100,.04) 36px,
      transparent 36px,
      transparent 70px
    ),
    linear-gradient(
      170deg,
      #5c2d0a 0%,
      #3b1a06 25%,
      #6b3512 50%,
      #3a1905 75%,
      #4e2309 100%
    );
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: crosshair;
  display: block;
}

/* Canvas remplit tout le fn-board */
#c {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* ── Score + Vies (dans le strip en-dessous) ── */
.fn-score-val {
  font-family: 'Bangers', cursive, var(--mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--a1);
  line-height: 1;
  transition: transform .1s;
}

.fn-score-val.pop { transform: scale(1.35); }

/* Alias pour le JS qui ajoute .pop directement sur #score */
#score.pop { transform: scale(1.35); }

/* ── Vies ── */
.life {
  font-size: 22px;
  filter: drop-shadow(0 0 6px rgba(255, 50, 50, .8));
  transition: all .3s;
  display: inline-block;
}

.life.lost {
  opacity: .15;
  filter: none;
  transform: scale(.7);
}

/* ── Highscore badge (masqué dans le board, hs-val utilisé par le JS) ── */
#highscore-badge {
  display: none;
}

/* ── Combo (centré sur la zone de jeu) ── */
#combo-display {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Bangers', cursive;
  font-size: 72px;
  color: #ffdd00;
  text-shadow: 0 0 30px rgba(255, 220, 0, .8), 4px 4px 0 #000;
  pointer-events: none;
  z-index: 20;
  opacity: 0;
  letter-spacing: 4px;
  transition: opacity .3s;
}

/* ── Overlays (démarrage / game over) ── */
.fn-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 50;
  background: radial-gradient(ellipse at center, rgba(10, 10, 10, .93) 0%, rgba(0, 0, 0, .98) 100%);
  transition: opacity .4s;
}

.fn-hidden          { opacity: 0; pointer-events: none; }
.fn-overlay.hidden  { opacity: 0; pointer-events: none; }

.fn-overlay-title {
  font-family: 'Bangers', cursive;
  font-size: clamp(44px, 10vw, 80px);
  letter-spacing: 6px;
  line-height: 1;
  margin-bottom: 8px;
}

.fn-title-start {
  background: linear-gradient(135deg, #ff6b35, #f7c948, #8bc34a, #4fc3f7, #ce93d8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 4px 20px rgba(255, 200, 50, .3));
}

.fn-title-gameover {
  color: #ff3333;
  text-shadow: 0 0 40px rgba(255, 50, 50, .6), 5px 5px 0 #000;
}

.fn-overlay-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, .45);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.final-score-label {
  font-family: 'Bangers', cursive;
  font-size: 18px;
  color: rgba(255, 255, 255, .4);
  letter-spacing: 4px;
  text-transform: uppercase;
}

.final-score-val {
  font-family: 'Bangers', cursive;
  font-size: 72px;
  color: #f7c948;
  text-shadow: 0 0 30px rgba(247, 201, 72, .5), 4px 4px 0 #000;
  margin-bottom: 6px;
  line-height: 1;
}

.best-score {
  font-family: 'Bangers', cursive;
  font-size: 20px;
  color: rgba(255, 255, 255, .4);
  letter-spacing: 2px;
  margin-bottom: 28px;
}

.best-score span { color: #8bc34a; }

.fn-btn {
  font-family: 'Bangers', cursive;
  font-size: 24px;
  letter-spacing: 4px;
  padding: 12px 44px;
  border: none;
  border-radius: 60px;
  cursor: pointer;
  background: linear-gradient(135deg, #ff6b35, #f7c948);
  color: #000;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .4), 0 0 30px rgba(255, 140, 0, .4);
  transition: transform .1s, box-shadow .1s;
  text-transform: uppercase;
}

.fn-btn:hover  { transform: translateY(-2px); box-shadow: 0 8px 0 rgba(0,0,0,.4), 0 0 40px rgba(255,140,0,.6); }
.fn-btn:active { transform: translateY(2px);  box-shadow: 0 3px 0 rgba(0,0,0,.4); }

.fruits-deco {
  font-size: 36px;
  letter-spacing: 8px;
  margin-bottom: 20px;
  animation: fnBob 2s ease-in-out infinite;
}

@keyframes fnBob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

/* ── Overlays HTML écrans démarrage / fin ── */
.jvfn-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  background: var(--cd, #fff);
  overflow: hidden;
}
.jvfn-overlay.hidden { display: none; }

.jvfn-overlay > .snk-screen {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.jvfn-overlay .snk-screen {
  justify-content: flex-start;
  align-items: center;
  padding-top: 14px;
  padding-bottom: 14px;
  width: 100%;
  min-height: 100%;
  box-sizing: border-box;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .jeu-v-wrap { max-width: none; }
  .fn-board { height: clamp(260px, 52vh, 440px); }
  .life { font-size: 18px; }
  .fn-score-val { font-size: 18px; }
}
