/* ========== mascot.css - Quiz ACF SRD ========== */
/* Styles pour la série (Streak) - Attachée à Mr ADM */
.streak-container {
  position: absolute;
  top: -10px;
  right: -15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10005;
  pointer-events: none;
  transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.streak-fire {
  font-size: 2.2em;
  filter: drop-shadow(0 0 8px orange);
  animation: fire-float 2.5s ease-in-out infinite;
}

#streak-count {
  background: var(--secondary);
  color: white;
  padding: 2px 10px;
  border-radius: 15px;
  font-size: 0.8em;
  font-weight: 900;
  margin-top: -8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border: 2px solid white;
}

@keyframes fire-float {

  0%,
  100% {
    transform: translateY(0) scale(1) rotate(-3deg);
    filter: drop-shadow(0 0 10px orange);
  }

  50% {
    transform: translateY(-12px) scale(1.15) rotate(3deg);
    filter: drop-shadow(0 0 20px #ff4500);
  }
}

/* ==================== COMPAGNON MR ADM VALUE ==================== */
#mascot-companion {
  position: fixed;
  /* Rendu indépendant du scroll */
  z-index: 10000;
  cursor: grab;
  user-select: none;
  pointer-events: auto;
  transition: filter 0.3s ease, transform 0.3s ease;
  /* On retire top/left du transition pour éviter les lags avec animatePosition */
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25));
  /* Pour que la bubble se positionne correctement */
  overflow: visible;
}

#mascot-companion.hidden {
  display: none;
}

#mascot-companion canvas {
  display: block;
  pointer-events: auto;
}

/* Bulle de dialogue BD - toujours au-dessus de la mascotte */
.companion-bubble {
  position: absolute;
  /* Relativement au #mascot-companion parent ! */
  transform: translateX(-50%) scale(0);
  transform-origin: bottom center;
  bottom: 85%;
  /* Au-dessus et légèrement à l'intérieur de la div du personnage */
  left: 50%;
  /* Centré horizontalement sur la div parente */
  min-width: 200px;
  max-width: 280px;
  background: #fff;
  color: #333;
  padding: 14px 16px;
  border-radius: 16px;
  font-size: 0.9em;
  font-weight: 600;
  line-height: 1.4;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  white-space: normal;
  word-wrap: break-word;
  border: 2.5px solid var(--adm, #2B3A67);
  text-align: center;
  z-index: 2000001;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Queue de bulle BD - triangle pointant vers le bas (vers la mascotte) */
.companion-bubble::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: var(--triangle-offset, 50%);
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 12px solid #fff;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.1));
}

/* Bordure du triangle */
.companion-bubble::before {
  content: '';
  position: absolute;
  bottom: -15px;
  left: var(--triangle-offset, 50%);
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 14px solid var(--adm, #2B3A67);
}

.companion-bubble.show {
  opacity: 1;
  transform: translateX(-50%) scale(1);
  pointer-events: auto;
  z-index: 2000001;
}

.companion-bubble.waiting {
  animation: bubblePulse 1.5s ease-in-out infinite;
}

@keyframes bubblePulse {

  0%,
  100% {
    transform: translateX(-50%) scale(1);
  }

  50% {
    transform: translateX(-50%) scale(1.03);
  }
}

.companion-bubble .bubble-content {
  margin-bottom: 15px;
  line-height: 1.4;
}

.companion-bubble .bubble-choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.companion-bubble .bubble-btn {
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  min-width: 200px;
  display: block;
  width: 100%;
  margin: 8px 0;
  pointer-events: auto;
  position: relative;
  z-index: 100002;
}

.companion-bubble .bubble-btn:hover {
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.companion-bubble .bubble-btn:active {
  transform: scale(0.98);
}

.companion-bubble.waiting {
  animation: bubblePulse 1.5s ease-in-out infinite;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

/* Icône de rappel de la mascotte */
#mascot-restore-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-size: 24px;
  border: 2px solid white;
}

#mascot-restore-btn:hover {
  transform: scale(1.1) rotate(10deg);
  background: var(--secondary);
}

#mascot-restore-btn.hidden {
  display: none;
}


/* ==================== ANIMATIONS DE FEEDBACK ==================== */
@keyframes shakeWrong {

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

  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-5px);
  }

  20%,
  40%,
  60%,
  80% {
    transform: translateX(5px);
  }
}

@keyframes bounceCorrect {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes celebratePulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
  }

  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 20px rgba(46, 204, 113, 0);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
  }
}

.shake-animation {
  animation: shakeWrong 0.5s ease-in-out;
}

.bounce-animation {
  animation: bounceCorrect 0.4s ease-in-out;
}

.celebrate-animation {
  animation: celebratePulse 0.6s ease-out;
}

.option.correct-selected {
  background: linear-gradient(135deg, #2ecc71, #27ae60) !important;
  border-color: #27ae60 !important;
  color: white !important;
  animation: celebratePulse 0.6s ease-out;
}

.option.incorrect-selected {
  background: linear-gradient(135deg, #e74c3c, #c0392b) !important;
  border-color: #c0392b !important;
  color: white !important;
  animation: shakeWrong 0.5s ease-in-out;
}

/* Confettis améliorés */
.confetti-piece {
  position: fixed;
  width: 10px;
  height: 10px;
  z-index: 10000;
  pointer-events: none;
}

@keyframes confettiFall {
  0% {
    transform: translateY(-100vh) rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* ==================== MR ADM ENHANCED ==================== */

/* Notification Mr ADM - DÉSACTIVÉE (Mr ADM utilise maintenant l'overlay narratif) */
.adm-notification {
  display: none !important;
}

.adm-notification-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.adm-notification-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5em;
}

.adm-notification-title {
  font-weight: bold;
  color: var(--primary);
  font-size: 1.1em;
}

.adm-notification-mood {
  font-size: 1.2em;
}

.adm-notification-content {
  font-size: 1em;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 15px;
}

.adm-notification-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.adm-notification-btn {
  flex: 1;
  min-width: 100px;
  padding: 10px 15px;
  border-radius: 15px;
  border: none;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
}

.adm-notification-btn:hover {
  transform: translateY(-2px);
}

.adm-notification-btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
}

.adm-notification-btn.secondary {
  background: #f0f0f0;
  color: var(--text);
}

/* Mr ADM mood indicators */
.adm-mood-happy {
  color: #2ecc71;
}

.adm-mood-neutral {
  color: #3498db;
}

.adm-mood-sad {
  color: #e74c3c;
}

/* Auto-hide animation */
.adm-fade-out {
  animation: admFadeOut 0.5s ease-out forwards;
}

/* Splash screen fade out */
.fade-out {
  animation: fadeOut 0.8s ease-out forwards;
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

@keyframes admFadeOut {
  to {
    opacity: 0;
    transform: translateY(20px);
  }
}

/* Boutique Mr ADM */
.adm-shop-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.adm-shop-content {
  background: white;
  border-radius: 25px;
  padding: 30px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.adm-shop-title {
  text-align: center;
  font-size: 1.5em;
  font-weight: bold;
  color: var(--primary);
  margin-bottom: 20px;
}

.adm-shop-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  margin-bottom: 10px;
  background: var(--surface);
  border-radius: 15px;
  border: 2px solid var(--border-color);
  transition: all 0.3s ease;
}

.adm-shop-item:hover {
  border-color: var(--primary);
  transform: translateX(5px);
}

.adm-shop-icon {
  font-size: 2.5em;
  min-width: 60px;
  text-align: center;
}

.adm-shop-info {
  flex: 1;
}

.adm-shop-name {
  font-weight: bold;
  color: var(--text);
  margin-bottom: 3px;
}

.adm-shop-desc {
  font-size: 0.85em;
  color: var(--text-light);
}

.adm-shop-price {
  font-weight: bold;
  color: var(--primary);
  font-size: 1.1em;
  white-space: nowrap;
}

/* Mr ADM Easter eggs counter */
.adm-click-counter {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 0.9em;
  z-index: 99998;
  display: none;
}

/* Message quotidien toast - DÉSACTIVÉ (Mr ADM utilise overlay) */
.adm-daily-message {
  display: none;
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translate(-50%, -50px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

