/* ============================================
   STYLES DU PENDULE DIVINATOIRE
   ============================================ */

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #0a0118;
}

.pendule-wrapper {
  max-width: 450px;
  margin: 0 auto;
  padding: 20px;
  text-align: center;
}

.pendule-wrapper #pendule3d {
  margin-top: 60px !important;
  display: block !important;
}

#pendule3d {
  width: 100%;
  height: 480px;
  border-radius: 24px;
  background: radial-gradient(
    ellipse at center top,
    #1a0f3e 0%,
    #0d0520 40%,
    #000 100%
  );
  box-shadow: 0 0 80px rgba(139, 92, 246, 0.3), 0 25px 50px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  margin-top: 60px !important;
  margin-bottom: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding: 0 !important;
  display: block !important;
  box-sizing: border-box !important;
}

/* ============================================
   STYLES CHAMP DE QUESTION
   ============================================ */

.pendule-question-container {
  margin-top: 15px;
  margin-bottom: 0;
}

.pendule-spacer {
  height: 60px;
  display: block !important;
}

.pendule-question-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid rgba(139, 92, 246, 0.3);
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.08);
  color: #e9d5ff;
  font-size: 1rem;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

.pendule-question-input::placeholder {
  color: rgba(167, 139, 250, 0.6);
}

.pendule-question-input:focus {
  outline: none;
  border-color: rgba(139, 92, 246, 0.6);
  background: rgba(139, 92, 246, 0.12);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}

.pendule-error-message {
  color: #ef4444;
  font-size: 0.9rem;
  margin-top: 8px;
  min-height: 20px;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pendule-error-message.show {
  opacity: 1;
}

.pendule-btn {
  margin-top: 20px;
  padding: 14px 32px;
  border-radius: 50px;
  border: 2px solid rgba(139, 92, 246, 0.5);
  background: linear-gradient(135deg, #7c3aed 0%, #4c1d95 100%);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  transition: 0.3s;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4);
}

.pendule-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(124, 58, 237, 0.6);
  border-color: rgba(139, 92, 246, 0.8);
}

.pendule-btn:active {
  transform: translateY(0);
}

.pendule-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

#reponse-pendule {
  margin-top: 24px;
  font-size: 1.1rem;
  color: #a78bfa;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.5s;
}

.consulting {
  color: #a78bfa;
  animation: pulse 1.5s ease-in-out infinite;
}

/* ============================================
   STYLES POPUP
   ============================================ */

.popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-out;
}

.popup-overlay.show {
  display: flex;
}

.popup-box {
  background: linear-gradient(135deg, #1a0f3e 0%, #0d0520 100%);
  border: 2px solid rgba(139, 92, 246, 0.4);
  border-radius: 24px;
  padding: 40px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 0 60px rgba(139, 92, 246, 0.6), 0 20px 40px rgba(0, 0, 0, 0.8);
  text-align: center;
  position: relative;
  animation: popIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #a78bfa;
  font-size: 1.4rem;
  font-weight: bold;
  transition: 0.3s;
}

.popup-close:hover {
  background: rgba(139, 92, 246, 0.4);
  transform: rotate(90deg);
}

.popup-icon {
  font-size: 4rem;
  margin-bottom: 20px;
}

.popup-titre {
  font-size: 1.5rem;
  color: #e9d5ff;
  margin-bottom: 12px;
  font-weight: 800;
}

.popup-reponse {
  font-size: 2.8rem;
  font-weight: 900;
  margin: 20px 0;
}

.popup-description {
  font-size: 1rem;
  color: #a78bfa;
  opacity: 0.85;
  line-height: 1.6;
}

/* ============================================
   EFFETS DE GLOW
   ============================================ */

.glow-oui {
  color: #10b981;
  text-shadow: 0 0 20px rgba(16, 185, 129, 0.8),
    0 0 40px rgba(16, 185, 129, 0.5), 0 0 60px rgba(16, 185, 129, 0.3);
  animation: glowOui 1.5s ease-in-out infinite;
}

.glow-non {
  color: #ef4444;
  text-shadow: 0 0 20px rgba(239, 68, 68, 0.8), 0 0 40px rgba(239, 68, 68, 0.5),
    0 0 60px rgba(239, 68, 68, 0.3);
  animation: glowNon 1.5s ease-in-out infinite;
}

.glow-neutre {
  color: #fbbf24;
  text-shadow: 0 0 20px rgba(251, 191, 36, 0.8),
    0 0 40px rgba(251, 191, 36, 0.5);
  animation: glowOui 1.5s ease-in-out infinite;
}

/* ============================================
   ANIMATIONS KEYFRAMES
   ============================================ */

@keyframes glowOui {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

@keyframes glowNon {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ============================================
   TYPOGRAPHIE
   ============================================ */

.titre {
  color: #e9d5ff;
  font-size: 1.8rem;
  margin-bottom: 12px;
  font-weight: 800;
  text-shadow: 0 2px 10px rgba(233, 213, 255, 0.3);
}

.sous-titre {
  color: #a78bfa;
  font-size: 0.95rem;
  margin-bottom: 20px;
  opacity: 0.9;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .pendule-wrapper {
    max-width: 100%;
    padding: 15px;
  }

  #pendule3d {
    height: 350px;
  }

  .popup-box {
    padding: 30px 20px;
    max-width: 90%;
  }

  .popup-reponse {
    font-size: 2rem;
  }

  .titre {
    font-size: 1.4rem;
  }
}
