/* Animation du drone qui irrigue un champ agricole */
@keyframes droneFloat {
  0% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(5px, -5px);
  }
  50% {
    transform: translate(0, 0);
  }
  75% {
    transform: translate(-5px, -5px);
  }
  100% {
    transform: translate(0, 0);
  }
}

@keyframes droneIrrigation {
  0% {
    opacity: 0;
    height: 0;
  }
  20% {
    opacity: 0.8;
    height: 10px;
  }
  80% {
    opacity: 0.8;
    height: 40px;
  }
  100% {
    opacity: 0;
    height: 0;
  }
}

@keyframes plantGrow {
  0% {
    transform: scaleY(0.8);
  }
  100% {
    transform: scaleY(1.05);
  }
}

.drone-animation-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeOut 1s ease-in-out 5s forwards;
  opacity: 1;
  visibility: visible;
}

.drone-animation-scene {
  position: relative;
  width: 300px;
  height: 300px;
}

.drone {
  position: absolute;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 20px;
  background-color: #333;
  border-radius: 10px;
  animation: droneFloat 2s ease-in-out infinite;
}

.drone::before,
.drone::after {
  content: "";
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: #225500;
}

.drone::before {
  top: -5px;
  left: -15px;
}

.drone::after {
  top: -5px;
  right: -15px;
}

.drone-body {
  position: absolute;
  top: 5px;
  left: 20px;
  width: 40px;
  height: 10px;
  background-color: #66BB00;
  border-radius: 5px;
}

.drone-camera {
  position: absolute;
  bottom: -5px;
  left: 35px;
  width: 10px;
  height: 10px;
  background-color: #33AAFF;
  border-radius: 50%;
}

.irrigation {
  position: absolute;
  top: 25px;
  left: 38px;
  width: 4px;
  height: 0;
  background-color: #33AAFF;
  opacity: 0;
  animation: droneIrrigation 2s ease-in-out infinite;
}

.field {
  position: absolute;
  bottom: 20px;
  left: 0;
  width: 100%;
  height: 40px;
  background-color: #225500;
  border-radius: 50%;
}

.plant {
  position: absolute;
  bottom: 40px;
  width: 20px;
  height: 60px;
  animation: plantGrow 2s ease-in-out infinite alternate;
  transform-origin: bottom center;
}

.plant-1 {
  left: 60px;
}

.plant-2 {
  left: 140px;
}

.plant-3 {
  left: 220px;
}

.plant-stem {
  position: absolute;
  bottom: 0;
  left: 9px;
  width: 2px;
  height: 60px;
  background-color: #66BB00;
}

.plant-leaf {
  position: absolute;
  width: 20px;
  height: 10px;
  background-color: #66BB00;
  border-radius: 10px 0;
}

.plant-leaf-1 {
  top: 10px;
  left: 0;
  transform: rotate(-30deg);
}

.plant-leaf-2 {
  top: 10px;
  right: 0;
  transform: rotate(30deg);
}

.plant-leaf-3 {
  top: 25px;
  left: 0;
  transform: rotate(-30deg);
}

.plant-leaf-4 {
  top: 25px;
  right: 0;
  transform: rotate(30deg);
}

.plant-leaf-5 {
  top: 40px;
  left: 0;
  transform: rotate(-30deg);
}

.plant-leaf-6 {
  top: 40px;
  right: 0;
  transform: rotate(30deg);
}

@keyframes fadeOut {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    visibility: hidden;
  }
}

/* Animation pour faire apparaître le contenu du site après l'animation */
@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.site-content {
  opacity: 0;
  animation: fadeIn 1s ease-in-out 5s forwards;
}
