/*
 * flipper.css — Version 2.6 — 2025-06-24 04:12 (Europe/Brussels)
 * 🎨 Feuille de style principale du plugin "Ça Flippe - Jeu de Flipper"
 * Auteur : Christophe La Taupe GPT 🧙‍♂️
 *
 * 💼 Rôle :
 * - Gère l'apparence responsive du plateau de jeu
 * - Positionne les éléments interactifs (billes, bumpers, flippers, etc.)
 * - Assure la visibilité correcte des hitboxes
 */

/* 🧱 Conteneur principal */
#flipper-wrapper {
  position: relative;
  aspect-ratio: 9/16;
  height: 90vh;
  max-height: 1000px;
  margin: 0 auto;
  background-image: url('../images/bg_flipper.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
  touch-action: none;
}

/* 🎱 Bille */
.pinball-ball {
  position: fixed;
  width: 65px;
  height: 65px;
  border-radius: 50%;
  transition: transform 0.05s linear;
  z-index: 10; /* ✅ Derrière le lanceur (z-index: 15) */
  pointer-events: none;
}

/* 💥 Bumpers, flippers, élestacs, etc. */
.bumper,
.elestac,
#flipper-left,
#flipper-right,
.trou {
  position: absolute;
  z-index: 10;
  width: auto;
  height: auto;
}

/* ✅ Toutes les images du jeu */
.bumper img,
.elestac img,
.trou img {
  width: 80px;
  height: auto;
  pointer-events: none;
  display: block;
}

/* ✅ Flippers plus larges (ajustement visuel) */
#flipper-left img,
#flipper-right img {
  width: 140px;
  height: auto;
  pointer-events: none;
  display: block;
}

/* 🦶 Lanceur */
.BtLanceur {
  position: absolute;
  width: 80px;
  height: 80px;
  right: 10px;
  bottom: 10px;
  background-size: cover;
  background-repeat: no-repeat;
  cursor: pointer;
  z-index: 15;
}

/* 🧩 Zone de collision BillGates */
.zone-collision {
  position: absolute;
  z-index: 5;
  pointer-events: none;
}

/* 🔴 Hitboxes */
.hitbox {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 30;
  pointer-events: none;
  border: none;
}

/* Mode debug : visualisation des hitboxes */
body.debug .hitbox {
  border: 1px dashed red;
  pointer-events: all;
}

/* 🎯 Positionnement des flippers */
#flipper-left {
  bottom: 5%;
  left: 15%;
}

#flipper-right {
  bottom: 5%;
  right: 15%;
}

#flipper-left,
#flipper-right {
  position: absolute;
  transform-origin: 90% 20%;
}

/* ⚫ Positionnement du trou centré sous les flippers */
.trou {
  bottom: 3%;
  left: 50%;
  transform: translateX(-50%);
}