/* lay_buy2.css - Styles spécifiques pour Lay-Buy Ticket */

/* ==================== CORRECTIONS CRITIQUES ==================== */

/*scroll*/

#reserver, 
#reservation, 
section[id] {
  scroll-margin-top: var(--header-height, 80px); /* utilise la même hauteur que ton header */
}


html {
  scroll-behavior: smooth;
}


/* CORRECTION PRINCIPALE : Compenser le header fixe */
body {
  padding-top: var(--header-height) !important;
}

/* HERO SECTION - Compensation du header fixe */
#laybuy.hero {
  margin-top: var(--header-height); /* Correction */
  min-height: 80vh !important; /* Laisse la place au reste */
}

/* Assurer que le contenu principal est visible */
main {
  position: relative;
  z-index: 1;
}

/* ==================== HERO SECTION LAY-BUY ==================== */
#laybuy.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}

#laybuy.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(255, 90, 95, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(0, 53, 128, 0.15) 0%, transparent 50%);
  animation: heroGlow 10s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { opacity: 0.5; }
  100% { opacity: 1; }
}

#laybuy .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 53, 128, 0.8), rgba(118, 75, 162, 0.6));
  backdrop-filter: blur(1px);
  z-index: 0; /* Correction : reste derrière le contenu */
}

#laybuy .hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 80px 0;
}

#laybuy .hero-content {
  color: white;
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) both;
}

#laybuy .hero-title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

#laybuy .hero-sub {
  font-size: 18px;
  margin-bottom: 32px;
  opacity: 0.95;
  font-weight: 400;
}

#laybuy .hero-cta {
  display: inline-flex;
  padding: 16px 32px;
  font-size: 16px;
  background: var(--accent);
  color: white;
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: 600;
  transition: all var(--transition);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

#laybuy .hero-cta:hover {
  background: var(--accent-hover);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
}

/* ==================== ENCADRÉ EXPLICATIF LAY-BUY ==================== */
.search-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  padding: 32px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--glass-border);
  animation: fadeInUp 0.8s 0.2s cubic-bezier(0.4, 0, 0.2, 1) both;
  color: var(--text-primary);
}

.search-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.search-card p {
  margin-bottom: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.search-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.search-card li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.search-card li:last-child {
  border-bottom: none;
}

.search-card strong {
  color: var(--text-primary);
  font-weight: 700;
}

/* ==================== SECTIONS SPÉCIFIQUES ==================== */
#reservation {
  background: #f9fbff; /* Correction : assure visibilité */
  padding: 60px 0;
}

#reservation h2 {
  text-align: center;
  margin-bottom: 32px;
}

/* ==================== FORMULAIRE DE RECHERCHE ==================== */
.search-form {
  background: white;
  padding: 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  max-width: 800px;
  margin: 0 auto;
}

.search-form .field {
  margin-bottom: 20px;
}

.search-form label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.suggest-container {
  position: relative;
}

.search-form input,
.search-form select {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  background: white;
  font-size: 15px;
  font-family: inherit;
  transition: all var(--transition);
  color: var(--text-primary);
}

.search-form input:focus,
.search-form select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 53, 128, 0.1);
}

.search-form input::placeholder {
  color: var(--text-muted);
}

/* suggestions */
.suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 300px;
  overflow-y: auto;
  z-index: 100;
  display: none;
  border: 1px solid var(--border-light);
}

.suggestions.active {
  display: block;
}

.suggestions li {
  padding: 12px 16px;
  cursor: pointer;
  transition: background var(--transition-fast);
  font-size: 14px;
  list-style: none;
}

.suggestions li:hover {
  background: var(--surface-hover);
}

.suggestions li:not(:last-child) {
  border-bottom: 1px solid var(--border-light);
}

/* ==================== COMPTEUR DE PASSAGERS ==================== */
.passengers {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: white;
  border-radius: var(--radius);
  border: 2px solid var(--border);
}

.passenger {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.passenger small {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 13px;
}

.counter {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-hover);
  padding: 4px;
  border-radius: var(--radius-sm);
}

.btn-counter {
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.btn-counter:hover {
  background: var(--primary-light);
  transform: scale(1.05);
}

.btn-counter:active {
  transform: scale(0.95);
}

.counter span {
  min-width: 32px;
  text-align: center;
  font-weight: 700;
  font-size: 16px;
}

/* ==================== ACTIONS DU FORMULAIRE ==================== */
.actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.warning {
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  padding: 8px;
  background: rgba(255, 90, 95, 0.1);
  border-radius: var(--radius-sm);
}

#search-button {
  width: 100%;
  padding: 16px;
  font-size: 16px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  transition: all var(--transition);
  box-shadow: 0 4px 14px rgba(255, 90, 95, 0.3);
}

#search-button:hover {
  background: var(--accent-hover);
  box-shadow: 0 6px 20px rgba(255, 90, 95, 0.4);
  transform: translateY(-2px);
}

/* ==================== LOADER ==================== */
.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.loader-dots {
  display: flex;
  gap: 8px;
}

.loader-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  animation: loaderJump 0.9s infinite;
}

.loader-dot:nth-child(2) { animation-delay: 0.15s; }
.loader-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes loaderJump {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.loader-text {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 14px;
}

/* ==================== SECTION RÉSULTATS ==================== */
.results-grid {
  display: grid;
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.result-card {
  background: white;
  padding: 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  transition: all var(--transition);
  animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.result-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--primary);
}

.result-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 16px;
}

.airline {
  font-weight: 700;
  font-size: 16px;
  color: var(--text-primary);
}

.airline small {
  color: var(--text-muted);
  font-weight: 500;
}

.badge {
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  font-weight: 600;
  font-size: 13px;
  color: var(--primary);
  white-space: nowrap;
}

.price {
  font-weight: 900;
  font-size: 24px;
  color: var(--accent);
  text-align: right;
  line-height: 1.2;
}

.price small {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  display: block;
  margin-top: 4px;
}

.reservation-button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
  display: block;
  width: 100%;
  margin-top: 16px;
}

.reservation-button:hover {
  background: var(--primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.load-more-wrap {
  text-align: center;
  margin-top: 32px;
}

.load-more-button {
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 14px 32px;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  transition: all var(--transition);
}

.load-more-button:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Correction : s'assurer que le contenu est visible même si le JS échoue */
.animate-on-scroll {
  opacity: 1 !important;
  transform: none !important;
}

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




/* ==================== RESPONSIVE ==================== */
@media (max-width: 1320px) {
  #laybuy .hero-inner {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-left: 15px;
    margin-right: 15px;
  }
  
}

@media (max-width: 768px) {
  #laybuy.hero {
    min-height: 80vh;
  }
  
  #laybuy .hero-inner {
    padding: 60px 0;
  }
  
  .search-card {
    padding: 24px;
  }
  
  .search-form {
    padding: 24px;
  }
  
  .row.two-cols {
    grid-template-columns: 1fr;
  }
  
  .passengers {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  #laybuy .hero-title {
    font-size: 32px;
  }
  
  #laybuy .hero-sub {
    font-size: 16px;
  }
  
  .search-card {
    padding: 20px;
  }
  
  .search-form {
    padding: 20px;
  }
  
  .result-card {
    padding: 16px;
  }
  
  .price {
    font-size: 20px;
  }
}