/* Animations de tir — Bataille Navale */

/* Splash (raté/eau) */
.cell.eau {
  animation: splash 0.4s ease-out;
}

@keyframes splash {

  0% {
    transform: scale(0.5);
    opacity: 0;
  }

  40% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Explosion (touché) */
.cell.touche {
  animation: hit-explode 0.45s ease-out;
}

@keyframes hit-explode {

  0% {
    transform: scale(0.3);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.8);
  }

  30% {
    transform: scale(1.3);
    box-shadow: 0 0 12px 4px rgba(239, 68, 68, 0.6);
  }

  60% {
    transform: scale(0.95);
  }

  100% {
    transform: scale(1);
    box-shadow: none;
  }
}

/* Naufrage (coulé) */
.cell.coule {
  animation: sunk-flash 0.6s ease-out;
}

.cell.navire-coule {
  animation: sunk-sink 0.5s ease-out;
}

@keyframes sunk-flash {

  0% {
    transform: scale(0.3);
    box-shadow: 0 0 0 0 rgba(153, 27, 27, 0.9);
  }

  25% {
    transform: scale(1.35);
    box-shadow: 0 0 16px 6px rgba(239, 68, 68, 0.7);
  }

  50% {
    transform: scale(1.05);
    box-shadow: 0 0 8px 2px rgba(153, 27, 27, 0.5);
  }

  100% {
    transform: scale(1);
    box-shadow: none;
  }
}

@keyframes sunk-sink {

  0% {
    opacity: 0.4;
    transform: translateY(-3px);
  }

  50% {
    opacity: 1;
    transform: translateY(1px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Tir reçu sur nos navires */
.cell.navire-touche {
  animation: hit-shake 0.35s ease-out;
}

@keyframes hit-shake {

  0% {
    transform: translateX(0);
  }

  15% {
    transform: translateX(-3px);
  }

  30% {
    transform: translateX(3px);
  }

  45% {
    transform: translateX(-2px);
  }

  60% {
    transform: translateX(2px);
  }

  80% {
    transform: translateX(-1px);
  }

  100% {
    transform: translateX(0);
  }
}
