/* Optimisations de performance */
/* Fonts moved to HTML for better performance */

/* GPU acceleration pour les animations */
.animate-fade-in-up,
.animate-float,
.animate-pulse-glow,
.card-hover,
.btn-primary,
.glow-effect,
.references-track {
  will-change: transform, opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

* {
  font-family: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.logo-icon {
  width: 32px;
  height: 32px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-shape {
  position: absolute;
  background: #00C997;
  border-radius: 2px;
  will-change: transform;
  transform: translateZ(0);
}

.logo-shape-1 {
  width: 20px;
  height: 4px;
  /* Reverted to default green */
  transform: rotate(-8deg) translateY(-8px);
  opacity: 0.9;
}

.logo-shape-2 {
  width: 24px;
  height: 4px;
  /* Updated to blue */
  background: #3B82F6;
  transform: rotate(2deg);
  opacity: 1;
}

.logo-shape-3 {
  width: 20px;
  height: 4px;
  /* Updated to blue */
  background: #3B82F6;
  transform: rotate(8deg) translateY(8px);
  opacity: 0.85;
}

/* Logo style pour les numéros de la section "Comment ça marche" */
.number-logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto 1.5rem;
  position: relative;
}

.number-logo-text {
  font-size: 3.5rem;
  font-weight: 700;
  color: #3b82f6;
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1;
  margin-bottom: 0.75rem;
}

.number-logo-icon {
  width: 60px;
  height: 30px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.number-logo-shape {
  position: absolute;
  background: #00C997;
  border-radius: 3px;
}

.number-logo-shape-1 {
  width: 40px;
  height: 6px;
  transform: rotate(-8deg) translateY(-13px);
  opacity: 0.9;
}

.number-logo-shape-2 {
  width: 50px;
  height: 6px;
  /* Updated to blue */
  background: #3B82F6;
  transform: rotate(2deg);
  opacity: 1;
}

.number-logo-shape-3 {
  width: 40px;
  height: 6px;
  /* Updated to blue */
  background: #3B82F6;
  transform: rotate(8deg) translateY(13px);
  opacity: 0.85;
}

/* Augmentation de 3px pour toutes les tailles de texte */
.text-xs {
  font-size: 15px !important;
  /* 12px + 3px */
}

.text-sm {
  font-size: 17px !important;
  /* 14px + 3px */
}

.text-base {
  font-size: 19px !important;
  /* 16px + 3px */
}

.text-lg {
  font-size: 21px !important;
  /* 18px + 3px */
}

.text-xl {
  font-size: 23px !important;
  /* 20px + 3px */
}

.text-2xl {
  font-size: 27px !important;
  /* 24px + 3px */
}

.text-3xl {
  font-size: 33px !important;
  /* 30px + 3px */
}

.text-4xl {
  font-size: 39px !important;
  /* 36px + 3px */
}

.text-5xl {
  font-size: 51px !important;
  /* 48px + 3px */
}

.text-6xl {
  font-size: 63px !important;
  /* 60px + 3px */
}

@media (min-width: 640px) {
  .sm\:text-4xl {
    font-size: 42px !important;
    /* 39px + 3px */
  }

  .sm\:text-5xl {
    font-size: 54px !important;
    /* 51px + 3px */
  }

  .sm\:text-xl {
    font-size: 26px !important;
    /* 23px + 3px */
  }
}

@media (min-width: 1024px) {
  .lg\:text-5xl {
    font-size: 54px !important;
    /* 51px + 3px */
  }

  .lg\:text-6xl {
    font-size: 66px !important;
    /* 63px + 3px */
  }
}

body {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

/* Optimisation: Réduire les animations si l'utilisateur préfère */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes float {

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

  50% {
    transform: translate3d(0, -10px, 0);
  }
}

@keyframes pulse-glow {

  0%,
  100% {
    opacity: 0.3;
    transform: scale3d(1, 1, 1);
  }

  50% {
    opacity: 0.6;
    transform: scale3d(1.02, 1.02, 1);
  }
}

@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }

  100% {
    background-position: 1000px 0;
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
  opacity: 0;
}

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

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

.gradient-bg {
  background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 50%, #6366f1 100%);
  background-size: 200% 200%;
  animation: gradient-shift 5s ease infinite;
}

.gradient-text {
  background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 50%, #6366f1 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 5s ease infinite;
}

.card-hover {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.card-hover::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.3), rgba(59, 130, 246, 0.3), rgba(99, 102, 241, 0.3));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s;
}

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

.card-hover:hover {
  transform: translate3d(0, -12px, 0) scale3d(1.02, 1.02, 1);
  box-shadow: 0 25px 50px -12px rgba(14, 165, 233, 0.15), 0 0 0 1px rgba(14, 165, 233, 0.05);
}

.btn-primary {
  background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 50%, #6366f1 100%);
  background-size: 200% 200%;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translate3d(0, -3px, 0);
  box-shadow: 0 15px 35px rgba(14, 165, 233, 0.3);
  animation: gradient-shift 2s ease infinite;
}

.logo-gradient {
  background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 50%, #6366f1 100%);
  background-size: 200% 200%;
  animation: gradient-shift 5s ease infinite;
  position: relative;
}

.logo-gradient::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, #0ea5e9, #3b82f6, #6366f1);
  filter: blur(6px);
  opacity: 0.3;
  z-index: -1;
}

.glass-effect {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(51, 65, 85, 0.3);
  will-change: backdrop-filter;
}

/* Optimisation backdrop-filter pour les appareils moins performants */
@media (prefers-reduced-motion: reduce) {
  .glass-effect {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
}

.card-dark {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(51, 65, 85, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Réduire le blur sur mobile pour de meilleures performances */
@media (max-width: 768px) {
  .card-dark {
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
  }
}

.input-dark {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(51, 65, 85, 0.5);
  color: white;
  transition: all 0.3s;
}

.input-dark:focus {
  background: rgba(15, 23, 42, 1);
  border-color: rgba(14, 165, 233, 0.6);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.input-dark::placeholder {
  color: rgba(148, 163, 184, 0.6);
}

.glow-effect {
  position: relative;
}

.glow-effect::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(59, 130, 246, 0.15), rgba(99, 102, 241, 0.15));
  filter: blur(15px);
  opacity: 0;
  transition: opacity 0.4s;
  z-index: -1;
}

.glow-effect:hover::after {
  opacity: 0.6;
}

.section-title {
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #0ea5e9, #3b82f6, #6366f1);
  border-radius: 2px;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.3), transparent);
  pointer-events: none;
  will-change: transform;
  transform: translateZ(0);
}

.number-badge {
  position: relative;
  overflow: hidden;
}

.number-badge::before {
  content: '';
  position: absolute;
  inset: -50%;
  background: conic-gradient(from 0deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: rotate 3s linear infinite;
}

@keyframes rotate {
  to {
    transform: rotate3d(0, 0, 1, 360deg);
  }
}

.fade-in {
  opacity: 0;
  transform: translate3d(0, 20px, 0);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: transform, opacity;
}

.fade-in.visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  will-change: auto;
}

.stats-number {
  background: linear-gradient(135deg, #0ea5e9, #3b82f6, #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Animation de défilement pour les références */
@keyframes scroll {
  0% {
    transform: translate3d(0, 0, 0);
  }

  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

.references-scroll {
  display: flex;
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
  position: relative;
  mask-image: linear-gradient(to right,
      transparent 0%,
      black 5%,
      black 95%,
      transparent 100%);
  -webkit-mask-image: linear-gradient(to right,
      transparent 0%,
      black 5%,
      black 95%,
      transparent 100%);
}

.references-track {
  display: inline-flex;
  animation: scroll 40s linear infinite;
  will-change: transform;
  transform: translateZ(0);
}

.references-track:hover {
  animation-play-state: paused;
}

.reference-item {
  flex-shrink: 0;
  margin-right: 2rem;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.reference-item:hover {
  transform: scale3d(1.05, 1.05, 1);
  opacity: 0.9;
}

.reference-item {
  flex-direction: column;
  gap: 0.5rem;
}

.reference-logo {
  max-width: 120px;
  max-height: 50px;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0.9;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.reference-item:hover .reference-logo {
  opacity: 1;
  transform: scale(1.05);
}

.reference-name {
  text-align: center;
  line-height: 1.2;
  display: none;
}

.reference-name[style*="display:block"] {
  display: block !important;
}

/* Styles pour les messages du formulaire */
#form-message {
  animation: fadeInUp 0.3s ease-out;
}

#submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Menu burger mobile */
.burger-line {
  width: 24px;
  height: 2px;
  background-color: #ffffff;
  /* Force white */
  transition: all 0.3s ease;
  transform-origin: center;
  display: block;
}

/* Force button visibility on mobile */
#mobile-menu-button {
  display: none;
  /* Hidden on desktop by default */
  z-index: 60;
  /* Ensure it's on top of everything */
  cursor: pointer;
}

@media (max-width: 768px) {
  #mobile-menu-button {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
}

#mobile-menu-button.active .burger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

#mobile-menu-button.active .burger-line:nth-child(2) {
  opacity: 0;
}

#mobile-menu-button.active .burger-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

#mobile-menu {
  transition: opacity 0.3s ease;
  display: none;
  opacity: 0;
  pointer-events: none;
  /* Prevent clicks when closed/invisible */
  /* DEBUG: Force visible styles when open */
}

/* Class-based open state */
#mobile-menu.is-open {
  display: block !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  /* Enable clicks when open */
  z-index: 40 !important;
  /* Below header (z-50) but above content */
  background-color: rgba(0, 0, 0, 0.95) !important;
  backdrop-filter: blur(10px);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

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

.mobile-menu-link {
  position: relative;
}

.mobile-menu-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #0ea5e9, #3b82f6);
  transition: width 0.3s ease;
}

.mobile-menu-link:hover::after {
  width: 100%;
}

/* TOAST SUCCESS – Centré écran */
#toast-success {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  padding: 14px 22px;
  border-radius: 12px;
  background-color: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.4);
  font-size: 16px;
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

#toast-success.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

#toast-success.hidden {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.95);
  pointer-events: none;
}

/* White Paper Section */
.perspective-container {
  perspective: 1000px;
}

.rotate-y-12 {
  transform: rotateY(-12deg);
}

.white-paper-book {
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

@keyframes float-slow {

  0%,
  100% {
    transform: translateY(0) rotateY(-12deg);
  }

  50% {
    transform: translateY(-15px) rotateY(-12deg);
  }
}

.animate-float-slow {
  animation: float-slow 6s ease-in-out infinite;
}

/* Hover effect on book to straighten it */
.animate-float-slow:hover img {
  transform: rotateY(0deg) scale(1.02);
}