@keyframes float {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(2deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes glow {
  0% { filter: drop-shadow(0 0 3px rgba(108, 99, 255, 0.3)); }
  50% { filter: drop-shadow(0 0 8px rgba(108, 99, 255, 0.5)); }
  100% { filter: drop-shadow(0 0 3px rgba(108, 99, 255, 0.3)); }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

body {
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #ffffff;
  color: #111;
  overflow-x: hidden;
}

header {
  background: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  box-shadow: 0 4px 15px rgba(38, 37, 83, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  animation: slideIn 0.5s ease-out;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
}

header img {
  height: 40px;
  transition: transform 0.3s ease;
}

header img:hover {
  transform: scale(1.1);
}

nav {
  display: flex;
  gap: 1.5rem;
}

nav a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  position: relative;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #262553;
  transition: width 0.3s ease;
}

nav a:hover {
  color: #6c63ff;
}

nav a:hover::after {
  width: 100%;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.hamburger div {
  width: 25px;
  height: 3px;
  background: #333;
  border-radius: 2px;
}

.hero {
  padding: 6rem 1rem 4rem;
  text-align: center;
  background: linear-gradient(-45deg, #f5f5ff, #f0f2ff, #e6e9ff, #f5f5ff);
  background-size: 400% 400%;
  animation: gradientFlow 15s ease infinite;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(108, 99, 255, 0.1) 0%, transparent 50%);
  animation: float 6s ease-in-out infinite;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #1a1a2e;
  animation: fadeIn 1s ease-out;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.hero p {
  font-size: 1.1rem;
  color: #555;
  max-width: 700px;
  margin: 0 auto 2rem;
  animation: fadeIn 1s ease-out 0.3s backwards;
}

.btn-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  animation: fadeIn 1s ease-out 0.6s backwards;
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn::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: 0.5s;
}

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

.btn-joueurs,
.btn-commercants {
  background-color: #262553;
  color: white;
  box-shadow: 0 4px 15px rgba(38, 37, 83, 0.2);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(38, 37, 83, 0.3);
}

/* Center the tutorial buttons group */
.how-it-works-actions {
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
  gap: 1rem;
}

@media (min-width: 769px) {
  /* Desktop: keep buttons on one line with natural width */
  .how-it-works-actions {
    justify-content: center;
    align-items: center;
  }

  .how-it-works-actions .btn {
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: manual !important;
    flex: 1 1 0 !important; /* equal widths */
  }
}

section {
  padding: 3rem 1rem;
  text-align: center;
  animation: fadeIn 1s ease-out;
  position: relative;
  overflow: hidden;
}

section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(108, 99, 255, 0.3), transparent);
}

.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 3rem;
}

.card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  max-width: 300px;
  flex: 1;
  text-align: left;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeInUp 0.6s ease-out backwards;
  position: relative;
  overflow: hidden;
}

.card:nth-child(1) { animation-delay: 0.2s; }
.card:nth-child(2) { animation-delay: 0.4s; }
.card:nth-child(3) { animation-delay: 0.6s; }

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #6c63ff, #262553);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 40px rgba(38, 37, 83, 0.15);
}

.card:hover::before {
  transform: scaleX(1);
}

.card .icon {
  font-size: 2.5rem;
  color: #6c63ff;
  margin-bottom: 1rem;
  transition: transform 0.3s ease;
}

.card:hover .icon {
  transform: scale(1.1);
}

.badge {
  background: #262553;
  color: #FFFFFF;
  padding: 0.5rem 1.5rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
}

.badge::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
  transform: rotate(45deg);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% { transform: translateX(-100%) rotate(45deg); }
  100% { transform: translateX(100%) rotate(45deg); }
}

footer {
  background-color: #262553;
  color: white;
  text-align: center;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
  animation: float 6s ease-in-out infinite;
}

form {
  animation: fadeInUp 0.6s ease-out;
}

form input,
form textarea {
  transition: all 0.3s ease;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 0.8rem;
  background: #f5f7ff;
}

form input:focus,
form textarea:focus {
  border-color: #6c63ff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.2);
}

form button {
  transition: all 0.3s ease;
}

form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(38, 37, 83, 0.3);
}

.floating-logo {
  position: fixed;
  right: 40px;
  bottom: 40px;
  width: 70px;
  height: 70px;
  z-index: 999;
  opacity: 0.7;
  animation: float 6s ease-in-out infinite, glow 4s ease-in-out infinite;
  mix-blend-mode: multiply;
}

.floating-logo-link {
  position: fixed;
  right: 40px;
  bottom: 40px;
  z-index: 999;
  cursor: pointer;
  display: block;
  width: 70px;
  height: 70px;
}

.floating-logo-link:hover .floating-logo {
  opacity: 1;
  animation: float 6s ease-in-out infinite, glow 4s ease-in-out infinite;
}

.parallax-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  will-change: transform;
  z-index: -1;
}

.scroll-top {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 50px;
  height: 50px;
  background: #262553;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(38, 37, 83, 0.2);
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
  animation: slideUp 0.3s ease-out;
}

.scroll-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(38, 37, 83, 0.3);
}

.scroll-top::before {
  content: '↑';
  font-size: 24px;
  font-weight: bold;
}

@media (max-width: 768px) {
  nav {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 0;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease-out;
  }

  nav.show {
    display: flex;
  }

  .hamburger {
    display: flex;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .cards {
    flex-direction: column;
    align-items: center;
  }

  /* Add responsive styles for Comment ça marche section */
  .how-it-works-container {
    flex-direction: column !important;
    gap: 2rem !important;
  }

  .how-it-works-image {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
  }

  .how-it-works-content {
    flex: 0 0 100% !important;
    padding: 0 1rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  /* Responsive actions buttons in Comment ça marche */
  .how-it-works-actions {
    width: 100% !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
    max-width: 480px !important;
    margin: 0 auto !important;
    justify-content: center !important;
    align-items: center !important;
  }

  .how-it-works-actions .btn {
    width: auto !important;
    min-width: 260px !important;
    max-width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    hyphens: auto !important;
    line-height: 1.4 !important;
    font-size: 1rem !important;
    padding: 0.9rem 1rem !important;
    text-align: center !important;
    flex: none !important;
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Lightbox styles */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  cursor: pointer;
}

.lightbox img {
  max-width: 90%;
  max-height: 90vh;
  margin: auto;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.lightbox.active {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

.clickable-image {
  cursor: pointer;
  transition: transform 0.3s ease;
}

.clickable-image:hover {
  transform: scale(1.02);
} 