/* Reset de base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.admin-bar {
  padding-top: 32px; /* pour éviter que la barre admin cache du contenu */
}

body {
  overflow: hidden;
}

/* Fond */
#combat-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Conteneur de scène */
#combat-scene {
  position: relative;
  width: 100%;
  height: 500px;
  margin-top: 40px;
  overflow: hidden;
}

/* Personnages */
.angel,
.devil {
  position: absolute;
  bottom: 300px;
  width: 180px;
  height: auto;
  z-index: 2;
}

.angel {
  left: 80px;
}

.devil {
  right: 80px;
}

/* Images internes */
.angel img,
.devil img {
  width: 180px;
  height: auto;
  position: absolute;
}

/* Bras avec épée intégré dans l'image */
.angel .arm,
.devil .arm,
.devil .fork {
  width: 80px; /* ajuste selon l'image */
  top: 60px;
  left: 75px; /* ← décalé un peu plus à droite */
  transform-origin: top left;
  z-index: 1; /* Derrière le corps */
}

/* Corps au-dessus du bras */
.angel .body,
.devil .body {
  z-index: 2;
}

/* Bouton d'action */
#combat-buttons {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

#combat-buttons button {
  font-size: 18px;
  padding: 10px 20px;
  cursor: pointer;
}

/* Log d'action */
#combat-log {
  position: absolute;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 18px;
  font-weight: bold;
  color: black;
  background-color: rgba(255,255,255,0.9);
  padding: 6px 12px;
  border-radius: 6px;
  z-index: 10;
  text-align: center;
}

/* Animation d'attaque */
.swing .arm,
.swing .sword {
  animation: swingArm 0.4s ease-in-out;
}

@keyframes swingArm {
  0% { transform: rotate(0deg); }
  50% { transform: rotate(-45deg); }
  100% { transform: rotate(0deg); }
}

/* Animation de secousse */
.shake .devil {
  animation: shake 0.4s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}
