
/* 
style.css */
#bodyHome {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    /* background-image: url(./decors.gif); */
    background-color: #2b4162;
    background-image: linear-gradient(315deg, #2b4162 0%, #12100e 74%);
  background-size:  100vw 100vh;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
  }

#headerHome{
  display: flex;
  justify-content: center;
}

  img{
    width: 60%;
  }

  
  input {
    width: 92%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
  }
  
  input:focus {
    border-color: #6c63ff;
  }
  
  #boutonValide {
    width: 100%;
    padding: 12px;
    background: #3b5986;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
  }
  
#boutonValide:hover {
    background: #e19325;
  }
  
  #boutonValide:active {
    transform: scale(0.98);
  }


  /* Page HeroChoice */

/* Style général */
#bodyChoixHero {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  /* background-image: url(./decors.gif); */
  background-color: #2b4162;
  background-image: linear-gradient(315deg, #2b4162 0%, #12100e 74%);
background-size:  100vw 100vh;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;}

/* Titre */
h1 {
  font-size: 24px;
  margin-bottom: 20px;
}

/* Grille des héros */
.heroes-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

/* Carte du héros */
.hero-card {
  background-color: #333;
  border-radius: 10px;
  padding: 15px;
  width: 180px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 2px solid transparent;
}

.hero-card:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
  border: 2px solid #ffffff;
}

/* Image du héros */
.hero-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid #ffffff;
}

/* Bouton de sélection */
.hero-button {
  margin-top: 10px;
  background-color: #ffffff;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 5px;
  cursor: pointer;
  width: 100%;
  font-size: 16px;
  font-weight: bold;
  transition: background-color 0.3s, transform 0.2s;
}

.hero-button:hover {
  background-color: #ffffff;
  transform: scale(1.05);
}

/* 
page fight */



/* Importer une police style arcade */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

/* 🌌 Fond général du combat */
#bodyFight {
    font-family: 'Press Start 2P', cursive;
    background: url('../assets/decors.gif') no-repeat center center/cover;
    color: white;
    text-align: center;
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

/* 📺 Conteneur principal */
.combat-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}



/* 🎮 Zone de combat */
.fighters {
    width: 100%;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    position: absolute;
    bottom: 20%;
}

/* 👊 Style des personnages */
.fighter {
    width: 300px;
    text-align: center;
    position: relative;
}

/* ✅ Rendre les noms et HP visibles */
.fighter h2, .fighter p {
    position: absolute;
    top: -60px; /* Remonter au-dessus du perso */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7); /* Fond sombre pour contraste */
    padding: 5px 10px;
    border-radius: 5px;
    color: white;
    font-size: 14px;
    width: max-content;
}

/* ✅ Espacement entre les stats */
.fighter p {
    top: -30px; /* Descendre légèrement les HP */
}

.fighter img {
    width: 300px;
    height: auto;
    image-rendering: pixelated;
}

/* 🆚 Style du "VS" */
.vs-container {
    font-size: 4em;
    font-weight: bold;
    color: #2b4162;
    text-shadow: 3px 3px 10px rgba(251, 251, 251, 0.8);
    animation: blinkVs 0.8s infinite alternate;
}

/* Effet clignotant sur "VS" */
@keyframes blinkVs {
    0% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* 🔴 Bouton Attaquer */
.formFight {
  position: absolute;
  bottom: 5%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}



input[type="submit"] {
    background-color: #2b4162;
    border: none;
    padding: 20px 40px;
    font-size: 1.5em;
    cursor: pointer;
    transition: background 0.3s ease-in-out, transform 0.1s;
    border-radius: 10px;
    font-family: 'Press Start 2P', cursive;
    color: white;
}

input[type="submit"]:hover {
    background-color: rgb(255, 255, 255);
    color: black;
    transform: scale(1.1);
}

/* 🎭 Animation de secousse quand un coup est donné */
@keyframes shake {
    0% { transform: translate(0, 0); }
    25% { transform: translate(-5px, 0); }
    50% { transform: translate(5px, 0); }
    75% { transform: translate(-5px, 0); }
    100% { transform: translate(0, 0); }
}

.fighter.hit {
    animation: shake 0.2s ease-in-out;
}


/* test */


.fight-result {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  font-size: 2em;
  padding: 20px;
  border-radius: 10px;
  font-family: 'Press Start 2P', cursive;
  z-index: 9999; 
}

.fight-result.win {
  color: green;
  background: rgba(0, 255, 0, 0.8);
  border: 3px solid darkgreen;
}

.fight-result.lose {
  color: rgb(68, 1, 1);
  background: rgba(255, 0, 0, 0.8);
  border: 3px solid darkred;
}



.btn-home {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 20px;
  font-size: 1.2em;
  text-decoration: none;
  color: white;
  background: black;
  border-radius: 5px;
  border: 2px solid darkred;
  transition: 0.3s ease-in-out;
  z-index: 10000;
}

.btn-home:hover {
  background: darkred;
  transform: scale(1.1);
}


#h1Time{
  font-size: 50px;
}