@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap");

:root {
  --primary-blue: #1415e0;
  --primary-yellow: #f9f20a;
}

body {
  font-family: "Inter", sans-serif;
  background: linear-gradient(
    135deg,
    #f0f4ff 0%,
    #ffffff 50%,
    #e8ecff 100%
  );
  min-height: 100vh;
  overflow-x: hidden;
}

/* Animations principales */
@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(5deg);
  }
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(20, 21, 224, 0.3);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 40px rgba(20, 21, 224, 0.6);
    transform: scale(1.05);
  }
}

@keyframes bounce-subtle {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-5deg);
  }
  75% {
    transform: rotate(5deg);
  }
}

@keyframes wave {
  0% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(-10px);
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes countdown-pulse {
  0%,
  100% {
    transform: scale(1);
    background: linear-gradient(135deg, #1415e0, #0a0db0);
  }
  50% {
    transform: scale(1.02);
    background: linear-gradient(135deg, #0a0db0, #1415e0);
  }
}

@keyframes number-change {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* Classes d'animation */
.float-animation {
  animation: float 6s ease-in-out infinite;
}

.pulse-glow {
  animation: pulse-glow 3s ease-in-out infinite;
}

.bounce-subtle {
  animation: bounce-subtle 4s ease-in-out infinite;
}

.shake-animation {
  animation: shake 3s ease-in-out infinite;
}

.wave-animation {
  animation: wave 2s ease-in-out infinite;
}

.countdown-pulse {
  animation: countdown-pulse 2s ease-in-out infinite;
}

.number-changing {
  animation: number-change 0.3s ease-in-out;
}

.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }

/* Effets de carte avec support Safari */
.glass-card {
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(20, 21, 224, 0.1);
}

/* Support pour les anciennes versions de Safari */
@supports not (backdrop-filter: blur(12px)) {
  .glass-card {
    background: rgba(255, 255, 255, 0.95);
  }
}

/* Particules animées en arrière-plan */
.particles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.particle {
  position: absolute;
  background: var(--primary-blue);
  border-radius: 50%;
  opacity: 0.1;
}

.particle:nth-child(odd) {
  background: var(--primary-yellow);
}

/* Style de secours pour le logo */
.logo-fallback {
  width: 96px;
  height: 96px;
  background: linear-gradient(135deg, #1415e0, #0a0db0);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  font-weight: bold;
  box-shadow: 0 8px 32px rgba(20, 21, 224, 0.3);
}

/* Sélecteur de langue fixe en bas à droite */
.language-selector-fixed {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

.custom-select-wrapper {
  position: relative;
  display: inline-block;
}

.select-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 140px;
  font-size: 14px;
  color: #374151;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.select-trigger:hover {
  border-color: #1415e0;
  box-shadow: 0 0 0 3px rgba(20, 21, 224, 0.1);
}

.select-trigger:focus {
  outline: none;
  border-color: #1415e0;
  box-shadow: 0 0 0 3px rgba(20, 21, 224, 0.2);
}

.flag-icon {
  width: 20px;
  height: 15px;
  border-radius: 2px;
}

/* Menu dropup */
.dropup-menu {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.15);
  margin-bottom: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s ease;
  z-index: 1001;
}

.dropup-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropup-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 14px;
}

.dropup-option:hover {
  background-color: #f3f4f6;
}

.dropup-option:first-child {
  border-radius: 8px 8px 0 0;
}

.dropup-option:last-child {
  border-radius: 0 0 8px 8px;
}

.fa-chevron-up {
  font-size: 12px;
  color: #6b7280;
  margin-left: auto;
  transition: transform 0.2s;
}

.select-trigger.active .fa-chevron-up {
  transform: rotate(180deg);
}

/* Responsive */
@media (max-width: 640px) {
  .language-selector-fixed {
    bottom: 15px;
    right: 15px;
  }
  
  .select-trigger {
    min-width: 120px;
    font-size: 12px;
    padding: 6px 10px;
  }
  
  .flag-icon {
    width: 16px;
    height: 12px;
  }
}