/**
 * STYLES POUR LE NOUVEAU SYSTÈME DE QUÊTES
 *
 * À ajouter à dashboard.css ou importer séparément
 */

/* ============================================
 * SECTIONS DE MODULE
 * ============================================ */

.module-section {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.module-section:last-child {
  border-bottom: none;
}

.module-section-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-gold, #FFD700);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.quest-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ============================================
 * QUÊTES AUTOMATIQUES (business_auto)
 * ============================================ */

.auto-quest {
  background: linear-gradient(135deg, rgba(187, 134, 252, 0.1) 0%, rgba(255, 107, 53, 0.1) 100%);
  border-left: 4px solid var(--accent-purple, #BB86FC);
  position: relative;
}

.auto-quest::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(187, 134, 252, 0.05), transparent);
  pointer-events: none;
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

.quest-auto-indicator {
  width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auto-badge {
  background: linear-gradient(135deg, var(--accent-purple, #BB86FC) 0%, var(--accent-orange, #FF6B35) 100%);
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(187, 134, 252, 0.4);
}

.auto-tag {
  display: inline-block;
  background: rgba(187, 134, 252, 0.2);
  color: var(--accent-purple, #BB86FC);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* ============================================
 * QUÊTES VERROUILLÉES (prérequis non validés)
 * ============================================ */

.quest-item.locked {
  opacity: 0.6;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  pointer-events: none;
  position: relative;
}

.quest-item.locked::after {
  content: '🔒 Complète la quête précédente';
  position: absolute;
  bottom: 0.5rem;
  right: 1rem;
  font-size: 0.75rem;
  color: var(--accent-orange, #FF6B35);
  font-weight: 600;
}

.quest-lock-icon {
  width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  filter: grayscale(1);
}

.locked-tag {
  display: inline-block;
  background: rgba(255, 107, 53, 0.2);
  color: var(--accent-orange, #FF6B35);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* ============================================
 * BARRE DE PROGRESSION
 * ============================================ */

.quest-progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 0.75rem;
}

.quest-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-green, #00FF7F) 0%, var(--accent-gold, #FFD700) 100%);
  border-radius: 4px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(0, 255, 127, 0.5);
}

.quest-progress-text {
  font-size: 0.85rem;
  color: var(--gray-light, #c9d1d9);
  margin-top: 4px;
}

/* ============================================
 * NOTIFICATIONS DE QUÊTE
 * ============================================ */

.quest-notification {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 10000;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.quest-notification.show {
  opacity: 1;
  transform: translateX(0);
}

.quest-notification-content {
  background: linear-gradient(135deg, var(--bg-darker, #010409) 0%, var(--bg-dark, #0D1117) 100%);
  border: 2px solid var(--accent-gold, #FFD700);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 10px 40px rgba(255, 215, 0, 0.3);
  min-width: 300px;
}

.quest-notification-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
  animation: bounce 0.6s ease-in-out;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.quest-notification-text {
  flex: 1;
}

.quest-notification-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-gold, #FFD700);
  margin-bottom: 0.25rem;
}

.quest-notification-subtitle {
  font-size: 0.9rem;
  color: var(--text-light, #E6EDF3);
  margin-bottom: 0.5rem;
}

.quest-notification-xp {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent-green, #00FF7F);
  text-shadow: 0 0 10px rgba(0, 255, 127, 0.5);
}

/* ============================================
 * RESPONSIVE
 * ============================================ */

@media (max-width: 768px) {
  .module-section-title {
    font-size: 1.1rem;
  }

  .quest-notification {
    top: 1rem;
    right: 1rem;
    left: 1rem;
  }

  .quest-notification-content {
    min-width: unset;
    width: 100%;
  }

  .quest-item.locked::after {
    position: static;
    display: block;
    margin-top: 0.5rem;
    text-align: center;
  }
}

/* ============================================
 * AMÉLIORATION DES QUEST-ITEM EXISTANTES
 * ============================================ */

.quest-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s ease;
}

.quest-item:hover:not(.locked) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(5px);
}

.quest-item.completed {
  background: rgba(0, 255, 127, 0.1);
  border-color: var(--accent-green, #00FF7F);
  opacity: 0.7;
}

.quest-item.completed .quest-title {
  text-decoration: line-through;
  color: var(--accent-green, #00FF7F);
}

/* Checkbox container */
.quest-checkbox-container {
  width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.quest-checkbox-input {
  display: none;
}

.quest-checkbox-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 2px solid var(--accent-gold, #FFD700);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(255, 215, 0, 0.05);
}

.quest-checkbox-label:hover {
  background: rgba(255, 215, 0, 0.15);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.quest-checkbox-input:checked + .quest-checkbox-label {
  background: var(--accent-gold, #FFD700);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
}

.quest-checkbox-input:disabled + .quest-checkbox-label {
  cursor: not-allowed;
  opacity: 0.8;
}

.checkmark {
  color: #000;
  font-weight: 900;
  font-size: 1.2rem;
}

/* Icon */
.quest-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

/* Details */
.quest-details {
  flex: 1;
  min-width: 0;
}

.quest-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-light, #E6EDF3);
  margin-bottom: 0.5rem;
}

.quest-description {
  font-size: 0.9rem;
  color: var(--gray-light, #c9d1d9);
  line-height: 1.5;
}

/* Reward */
.quest-reward {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 8px;
  flex-shrink: 0;
}

.quest-reward span:first-child {
  font-size: 1.5rem;
}

.quest-reward span:last-child {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-gold, #FFD700);
}
/* ============================================
 * STYLES POUR BOUTONS DE QUÊTES (MODULE)
 * ============================================
 * À ajouter à dashboard-quetes-styles.css
 */

/* Container du bouton */
.quest-button-container {
  width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-height: 50px;
}

/* Bouton d'action */
.quest-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.2rem;
  background: linear-gradient(135deg, var(--accent-purple, #BB86FC) 0%, var(--accent-orange, #FF6B35) 100%);
  color: white;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(187, 134, 252, 0.4);
  white-space: nowrap;
  min-width: 140px;
}

.quest-action-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(187, 134, 252, 0.6);
  filter: brightness(1.1);
}

.quest-action-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(187, 134, 252, 0.4);
}

/* Badge "Terminé" */
.quest-completed-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 1rem;
  background: rgba(76, 175, 80, 0.2);
  color: #4CAF50;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 6px;
  border: 2px solid #4CAF50;
}

/* Quête avec bouton */
.quest-with-button {
  background: linear-gradient(135deg, rgba(187, 134, 252, 0.05) 0%, rgba(255, 107, 53, 0.05) 100%);
  border-left: 4px solid var(--accent-purple, #BB86FC);
}

.quest-with-button.completed {
  background: rgba(76, 175, 80, 0.1);
  border-left-color: #4CAF50;
}

/* Responsive */
@media (max-width: 768px) {
  .quest-button-container {
    width: 100%;
    margin-bottom: 1rem;
  }

  .quest-action-button {
    width: 100%;
    min-width: unset;
  }
}
/* ============================================
 * TOGGLE POUR MASQUER LES QUÊTES TERMINÉES
 * ============================================ */

/* Barre de filtre */
.quest-filter-bar {
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* Container du toggle */
.quest-toggle-container {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  cursor: pointer;
  user-select: none;
  transition: all 0.3s ease;
}

.quest-toggle-container:hover {
  transform: translateX(-2px);
}

/* Input checkbox caché */
.quest-toggle-input {
  display: none;
}

/* Label du toggle */
.quest-toggle-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #ddd;
  transition: all 0.3s ease;
}

/* Icône checkbox personnalisée */
.toggle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.9rem;
  color: transparent;
  transition: all 0.3s ease;
}

/* État coché */
.quest-toggle-input:checked + .quest-toggle-label .toggle-icon {
  background: linear-gradient(135deg, var(--accent-purple, #BB86FC) 0%, var(--accent-orange, #FF6B35) 100%);
  border-color: var(--accent-purple, #BB86FC);
  color: white;
  box-shadow: 0 0 12px rgba(187, 134, 252, 0.6);
}

.quest-toggle-input:checked + .quest-toggle-label {
  color: var(--accent-purple, #BB86FC);
}

/* Animation de l'icône */
.quest-toggle-input:checked + .quest-toggle-label .toggle-icon {
  animation: checkBounce 0.4s ease;
}

@keyframes checkBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* Hover sur le label */
.quest-toggle-container:hover .quest-toggle-label {
  color: var(--accent-gold, #FFD700);
}

.quest-toggle-container:hover .toggle-icon {
  border-color: rgba(255, 215, 0, 0.5);
  background: rgba(255, 215, 0, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
  .quest-filter-bar {
    padding: 0.8rem 1rem;
    justify-content: center;
  }

  .quest-toggle-label {
    font-size: 0.85rem;
  }

  .toggle-icon {
    width: 20px;
    height: 20px;
    font-size: 0.8rem;
  }
}
/* ============================================
 * STYLES POUR LES CATÉGORIES DE QUÊTES
 * ============================================
 * Sous-sections dans Quotidien/Hebdo/Mensuel
 */

/* Section de catégorie */
.quest-category-section {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.quest-category-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Titre de catégorie */
.quest-category-title {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-gold, #FFD700);
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid rgba(255, 215, 0, 0.2);
}

.category-icon {
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

/* Liste des quêtes dans une catégorie */
.quest-category-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ============================================
 * SECTION QUÊTES IMPORTANTES
 * ============================================ */

.quest-category-important {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.03) 0%, rgba(255, 215, 0, 0.01) 100%);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 215, 0, 0.15);
}

.quest-category-important .quest-category-title {
  color: var(--accent-gold, #FFD700);
  font-size: 1.3rem;
}

.quest-category-important .quest-item {
  border-left: 4px solid var(--accent-gold, #FFD700);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.08) 0%, rgba(255, 215, 0, 0.02) 100%);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.1);
}

.quest-category-important .quest-item:hover {
  box-shadow: 0 6px 25px rgba(255, 215, 0, 0.25);
  transform: translateY(-2px);
}

.quest-category-important .quest-item .quest-reward {
  color: var(--accent-gold, #FFD700);
  font-weight: 800;
}

/* Badge "Important" (optionnel) */
.quest-important-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  background: linear-gradient(135deg, var(--accent-gold, #FFD700) 0%, #FFA500 100%);
  color: #000;
  font-size: 0.7rem;
  font-weight: 800;
  border-radius: 6px;
  margin-left: 0.5rem;
  vertical-align: middle;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

/* ============================================
 * RESPONSIVE
 * ============================================ */

@media (max-width: 768px) {
  .quest-category-section {
    margin-bottom: 2rem;
    padding-bottom: 1.2rem;
  }

  .quest-category-title {
    font-size: 1.1rem;
    gap: 0.6rem;
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
  }

  .category-icon {
    font-size: 1.2rem;
    width: 28px;
    height: 28px;
  }

  .quest-category-important {
    padding: 1.2rem;
  }

  .quest-category-important .quest-category-title {
    font-size: 1.15rem;
  }
}

/* ============================================
 * ANIMATIONS
 * ============================================ */

.quest-category-section {
  animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animation par catégorie avec délai */
.quest-category-section:nth-child(1) {
  animation-delay: 0s;
}

.quest-category-section:nth-child(2) {
  animation-delay: 0.1s;
}

.quest-category-section:nth-child(3) {
  animation-delay: 0.2s;
}

.quest-category-section:nth-child(4) {
  animation-delay: 0.3s;
}

.quest-category-section:nth-child(5) {
  animation-delay: 0.4s;
}

.quest-category-section:nth-child(6) {
  animation-delay: 0.5s;
}
/* ============================================
 * FIX: CHECKBOX CLIQUABLE
 * ============================================
 * S'assurer que les checkboxes sont bien cliquables
 */

/* Container de checkbox - permettre les événements */
.quest-checkbox-container {
  width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

/* Input checkbox caché mais toujours accessible */
.quest-checkbox-input {
  position: absolute;
  opacity: 0;
  width: 28px;
  height: 28px;
  cursor: pointer;
  z-index: 12;
  pointer-events: auto;
}

/* Label cliquable */
.quest-checkbox-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 2px solid var(--accent-gold, #FFD700);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(255, 215, 0, 0.05);
  position: relative;
  z-index: 11;
  pointer-events: auto;
}

/* Quest item - ne pas bloquer les clics */
.quest-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s ease;
  position: relative;
  pointer-events: auto;
}

/* S'assurer que les éléments enfants ne bloquent pas */
.quest-icon,
.quest-details,
.quest-reward {
  pointer-events: none;
}

/* Permettre les clics sur les liens dans les détails */
.quest-details a {
  pointer-events: auto;
}

/* Hover sur le label */
.quest-checkbox-label:hover {
  background: rgba(255, 215, 0, 0.15);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
  transform: scale(1.05);
}

/* État coché */
.quest-checkbox-input:checked + .quest-checkbox-label {
  background: var(--accent-gold, #FFD700);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
}

/* État désactivé */
.quest-checkbox-input:disabled + .quest-checkbox-label {
  cursor: not-allowed;
  opacity: 0.8;
  pointer-events: none;
}

/* Checkmark */
.checkmark {
  color: #000;
  font-weight: 900;
  font-size: 1.2rem;
  pointer-events: none;
}

/* Fix spécifique: s'assurer que rien ne bloque */
.quest-item:not(.locked) .quest-checkbox-container {
  cursor: pointer;
}

.quest-item.locked .quest-checkbox-container {
  cursor: not-allowed;
  pointer-events: none;
}
/* ============================================
 * FILTRES DE SOUS-CATÉGORIES
 * ============================================ */

.quest-subcategory-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Bouton de filtre */
.subcategory-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #ddd;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.subcategory-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 215, 0, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.2);
}

/* Bouton actif */
.subcategory-btn.active {
  background: linear-gradient(135deg, var(--accent-purple, #BB86FC) 0%, var(--accent-orange, #FF6B35) 100%);
  border-color: var(--accent-purple, #BB86FC);
  color: white;
  box-shadow: 0 4px 15px rgba(187, 134, 252, 0.4);
}

.subcategory-btn.active:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(187, 134, 252, 0.6);
}

/* Icône du filtre */
.filter-icon {
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Animation d'activation */
.subcategory-btn.active {
  animation: btnActivate 0.3s ease;
}

@keyframes btnActivate {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Responsive */
@media (max-width: 768px) {
  .quest-subcategory-filters {
    padding: 0.8rem 1rem;
    gap: 0.6rem;
  }

  .subcategory-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  .filter-icon {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .quest-subcategory-filters {
    gap: 0.5rem;
  }

  .subcategory-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }

  .subcategory-btn span:not(.filter-icon) {
    display: none;
  }

  .filter-icon {
    font-size: 1.2rem;
  }
}

/* ============================================
 * CATÉGORIES FILTRÉES (cachées)
 * ============================================ */

/* Cacher les sections non sélectionnées */
.quest-category-section.filtered-hidden {
  display: none;
}

/* Animation d'apparition */
.quest-category-section.filtered-visible {
  animation: fadeInCategory 0.4s ease;
}

@keyframes fadeInCategory {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
