/* Améliorations visuelles pour mindz.guru */

/* Variables CSS améliorées */
:root {
  /* Palette de couleurs principale - Subtle & Sophisticated */
  --dark-bg: #0f1419;
  --primary: #4a9eff;
  --secondary: #7c6aef;
  --tertiary: #e85d75;
  --text: #e1e4e8;
  --card-bg: rgba(30, 35, 45, 0.85);
  
  /* Nouvelles variables pour les améliorations - Reduced intensity */
  --primary-glow: rgba(74, 158, 255, 0.15);
  --secondary-glow: rgba(124, 106, 239, 0.15);
  --tertiary-glow: rgba(232, 93, 117, 0.15);
  --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  --card-hover-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Arrière-plan animé - More subtle */
body {
  background-color: var(--dark-bg);
  color: var(--text);
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(124, 106, 239, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(74, 158, 255, 0.05) 0%, transparent 40%);
  background-size: 200% 200%;
  animation: gradientBackground 20s ease infinite;
  position: relative;
  overflow-x: hidden;
}

@keyframes gradientBackground {
  0% { background-position: 0% 0%; }
  25% { background-position: 50% 0%; }
  50% { background-position: 100% 100%; }
  75% { background-position: 0% 100%; }
  100% { background-position: 0% 0%; }
}

/* Effet de particules flottantes - More subtle */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background-image: 
    radial-gradient(circle at 50% 50%, var(--primary-glow) 0%, transparent 0.5%),
    radial-gradient(circle at 80% 20%, var(--secondary-glow) 0%, transparent 0.5%),
    radial-gradient(circle at 20% 80%, var(--tertiary-glow) 0%, transparent 0.5%);
  background-size: 120px 120px;
  background-repeat: repeat;
  animation: particleFloat 60s linear infinite;
  opacity: 0.15;
}

@keyframes particleFloat {
  0% { background-position: 0 0; }
  100% { background-position: 120px 120px; }
}

/* Animations d'entrée pour les cartes */
.cards-grid {
  perspective: 1000px;
}

.card {
  background: var(--card-bg);
  border-radius: 15px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition-smooth);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transform: translateY(30px);
  opacity: 0;
  animation: cardAppear 0.6s forwards;
  animation-delay: calc(var(--card-index, 0) * 0.1s);
  box-shadow: var(--card-shadow);
  transform-style: preserve-3d;
}

@keyframes cardAppear {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Effet 3D au survol des cartes - More subtle */
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-hover-shadow);
  border-color: rgba(124, 106, 239, 0.15);
}

/* Bordures lumineuses selon la catégorie - More subtle */
.social-tip {
  box-shadow: 0 2px 8px rgba(74, 158, 255, 0.08);
}

.social-tip:hover {
  box-shadow: 0 8px 24px rgba(74, 158, 255, 0.12);
  border-color: rgba(74, 158, 255, 0.15);
}

.experiment {
  box-shadow: 0 2px 8px rgba(124, 106, 239, 0.08);
}

.experiment:hover {
  box-shadow: 0 8px 24px rgba(124, 106, 239, 0.12);
  border-color: rgba(124, 106, 239, 0.15);
}

.bias {
  box-shadow: 0 2px 8px rgba(232, 93, 117, 0.08);
}

.bias:hover {
  box-shadow: 0 8px 24px rgba(232, 93, 117, 0.12);
  border-color: rgba(232, 93, 117, 0.15);
}

/* Amélioration des boutons de catégorie */
.category-btn {
  padding: 0.7rem 1.5rem;
  border-radius: 50px;
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  cursor: pointer;
  transition: var(--transition-bounce);
  font-weight: 500;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.category-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s ease;
}

.category-btn:hover::before,
.category-btn.active::before {
  opacity: 1;
}

.category-btn:hover,
.category-btn.active {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(124, 106, 239, 0.2);
  border-color: transparent;
}

/* Animation améliorée pour les modales */
.modal-content {
  background: var(--card-bg);
  border-radius: 15px;
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  transform: translateY(30px) scale(0.95);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.5s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal.active .modal-content {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Mode immersif pour les modales */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s;
  padding: 2rem;
}

.modal.active {
  opacity: 1;
  pointer-events: all;
}

/* Amélioration des boutons de carte */
.card-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  color: var(--text);
  cursor: pointer;
  transition: var(--transition-bounce);
  position: relative;
  overflow: hidden;
}

.card-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.card-btn:hover::before {
  opacity: 1;
}

.card-btn i {
  position: relative;
  z-index: 1;
}

.card-btn:hover {
  transform: scale(1.2) rotate(10deg);
  box-shadow: 0 5px 15px rgba(0, 246, 255, 0.3);
}

/* Animation des citations */
.quote-text, .quote-author {
  transition: opacity 1.5s ease, transform 1.5s ease;
}

.fade-out {
  opacity: 0;
  transform: translateY(20px);
}

.quote-container {
  position: relative;
}

.quote-text {
  position: relative;
  font-size: 1.6rem;
  line-height: 1.6;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  opacity: 1;
  transition: opacity 1.5s ease-in-out, transform 1.5s ease-in-out;
  font-family: 'Georgia', serif;
  font-weight: 700;
  font-style: italic;
  background: linear-gradient(135deg, var(--text), rgba(184, 184, 255, 0.8));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Logo animé */
.logo {
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

.logo-icon {
  font-size: 2rem;
  animation: pulseIcon 3s infinite alternate;
}

@keyframes pulseIcon {
  0% {
    transform: scale(1);
    text-shadow: 0 0 8px rgba(74, 158, 255, 0.3);
  }
  100% {
    transform: scale(1.05);
    text-shadow: 0 0 12px rgba(74, 158, 255, 0.5), 0 0 16px rgba(124, 106, 239, 0.4);
  }
}

/* Amélioration du mode clair */
body[data-theme='light'] {
  background-color: #f8f9fa;
  color: #2d3748;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(124, 106, 239, 0.02) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(74, 158, 255, 0.02) 0%, transparent 40%);
  animation: gradientBackground 20s ease infinite;
}

body[data-theme='light'] .card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);
}

body[data-theme='light'] .card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.05);
}

/* Responsive design amélioré */
@media (max-width: 768px) {
  .card {
    transform-style: flat;
  }
  
  .card:hover {
    transform: translateY(-5px);
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .quote-text {
    font-size: 1.2rem;
  }
  
  .modal-content {
    max-width: 95%;
  }
}

/* Animation de chargement */
#loading-indicator {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
}

#loading-indicator::after {
  content: '';
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--primary);
  animation: spin 1s infinite linear;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
