/* Overlay plein écran */
.success-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.84);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.success-overlay.show {
  opacity: 1;
}

/* Boîte centrale animée */
.success-box {
  background: #ffffff;
  padding: 45px 60px;
  border-radius: 18px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  transform: scale(0.6);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
  min-width: 380px;
}

.success-box.show {
  transform: scale(1);
  opacity: 1;
}

/* Icône animée */
.success-icon {
  font-size: 80px;
  color: #0d6efd;
  margin-bottom: 20px;
  animation: pop 0.6s ease forwards;
}

@keyframes pop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  60% {
    transform: scale(1.3);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}

.subtitle {
  font-size: 18px;
  color: #555;
  margin-top: 10px;
}

.result-card {
  background: #ffffff10;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.result-value {
  font-size: 2rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 12px;
  display: inline-block;
  background: linear-gradient(135deg, #007bff, #00c6ff);
  color: white;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
  letter-spacing: 1px;
  animation: fadeInScale 0.6s ease-out;
}

@keyframes fadeInScale {
  0% {
    transform: scale(0.7);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.error-box {
  display: none; /* caché par défaut */
  background: #ffe6e6; /* rouge très léger */
  border-left: 4px solid #e60000; /* trait rouge */
  color: #b30000; /* texte rouge foncé */
  padding: 12px 15px;
  margin-bottom: 15px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
  animation: fadeIn 0.3s ease-in-out;
  display: flex;
  align-items: center;
  gap: 10px;
}

.error-box i {
  font-size: 18px;
  color: #e60000;
}

/* Petite animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
