/* =============================================================================
   DemoProjetK - Style "Effet Waouh" inspiré présentation iPhone/Apple
   Basé sur le design de Philippe Mioulet
   ============================================================================= */

:root {
  /* Background colors */
  --bg0: #05060a;
  --bg1: #070a12;

  /* Panel/Glass effects */
  --panel: rgba(255,255,255,.06);
  --panel2: rgba(255,255,255,.09);
  --border: rgba(255,255,255,.12);

  /* Text colors */
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.62);
  --text-dim: rgba(255,255,255,.68);

  /* Shadows */
  --shadow: 0 30px 80px rgba(0,0,0,.55);
  --shadow2: 0 18px 45px rgba(0,0,0,.35);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.4);

  /* Border radius */
  --r: 22px;
  --r2: 28px;
  --r-sm: 14px;
  --r-xs: 8px;

  /* Spacing */
  --pad: clamp(18px, 3vw, 34px);
  --max: 1200px;

  /* Brand colors */
  --primary: linear-gradient(135deg, rgba(120,90,255,1), rgba(0,180,255,1));
  --primary-glow: 0 18px 40px rgba(0,180,255,.18);
  --success: linear-gradient(135deg, rgba(0,255,170,1), rgba(0,180,255,1));
  --accent: rgba(120,90,255,.9);
}

/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

/* iOS and touch optimizations */
* {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

input, textarea, button, select {
  -webkit-user-select: auto;
  user-select: auto;
}

html {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(800px 400px at 20% -5%, rgba(120,90,255,.15), transparent 60%),
    radial-gradient(700px 350px at 85% 0%, rgba(0,180,255,.13), transparent 55%),
    var(--bg0);
  background-attachment: fixed;
  overflow-x: hidden;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle film grain */
body:before {
  content: "";
  position: fixed;
  inset: -40px;
  pointer-events: none;
  opacity: .12;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* NAVIGATION */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(5,6,10,.55);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--pad);
  max-width: var(--max);
  margin: 0 auto;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background:
    radial-gradient(18px 18px at 30% 25%, rgba(255,255,255,.35), transparent 60%),
    linear-gradient(135deg, rgba(120,90,255,.9), rgba(0,180,255,.8));
  box-shadow: 0 10px 25px rgba(0,180,255,.15);
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.15);
  font-size: 1.2rem;
}

.demo-badge {
  background: var(--success);
  color: white;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  gap: 18px;
  align-items: center;
}

.nav-links a {
  opacity: .78;
  font-weight: 600;
  font-size: 14px;
  transition: opacity .2s ease;
}

.nav-links a:hover {
  opacity: 1;
}

/* User Menu */
.user-menu {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  border: 1px solid rgba(255,255,255,.15);
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.2;
}

.user-status {
  font-size: 0.7rem;
  color: rgba(0,255,170,.8);
  font-weight: 600;
  line-height: 1.2;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  font-size: 14px;
  color: rgba(255,255,255,.85);
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  box-shadow: var(--shadow2);
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
  cursor: pointer;
  min-height: 44px;
}

.btn:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.22);
}

.btn.primary {
  border: none;
  background: var(--primary);
  box-shadow: var(--primary-glow);
  color: white;
}

.btn.primary:hover {
  transform: translateY(-1px) scale(1.01);
}

.account-btn {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.account-btn:hover {
  background: rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.22);
}

/* HERO SECTION */
.hero-section {
  padding: clamp(52px, 7vw, 92px) 0 28px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: .85fr 1.15fr; /* Formulaire à gauche, texte à droite */
  gap: clamp(18px, 3vw, 34px);
  align-items: center;
}

/* Premier reveal (texte) : ordre 2 pour aller à droite */
.hero-grid > .reveal:first-child {
  order: 2;
}

/* Deuxième reveal (formulaire) : ordre 1 pour aller à gauche */
.hero-grid > .reveal:last-child {
  order: 1;
}

.kicker {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.78);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .02em;
  margin-bottom: 18px;
}

.k-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(0,255,170,.12);
}

.hero-title {
  font-size: clamp(40px, 5.2vw, 74px);
  line-height: .95;
  letter-spacing: -0.04em;
  margin: 18px 0 12px;
}

.grad {
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(255,255,255,.62));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.5;
  color: var(--muted);
  max-width: 52ch;
  margin-bottom: 22px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: rgba(255,255,255,.68);
  font-size: 13px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
}

/* DEVICE MOCKUP */
.device {
  position: relative;
  border-radius: 34px;
  border: 1px solid rgba(255,255,255,.14);
  background:
    radial-gradient(120% 120% at 20% 0%, rgba(120,90,255,.25), transparent 55%),
    radial-gradient(120% 120% at 90% 10%, rgba(0,180,255,.22), transparent 60%),
    rgba(255,255,255,.05);
  box-shadow: var(--shadow);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  min-height: 420px;
  transform: perspective(900px) rotateY(-10deg) rotateX(6deg);
  transition: transform .35s ease;
}

.device:hover {
  transform: perspective(900px) rotateY(-6deg) rotateX(4deg) translateY(-2px);
}

.device:before {
  content: "";
  position: absolute;
  inset: -2px;
  background: radial-gradient(600px 240px at 30% 0%, rgba(255,255,255,.16), transparent 55%);
  pointer-events: none;
}

.device-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 16px 10px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.device-top .mini {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,.78);
  font-weight: 700;
  font-size: 13px;
}

.chip {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.10);
  color: rgba(255,255,255,.70);
  font-weight: 700;
  font-size: 12px;
}

.device-body {
  padding: 16px;
}

/* TRANSPORT SELECTOR */
.transport-selector {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.transport-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  color: var(--muted);
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all .2s ease;
  position: relative;
}

.transport-option.active {
  background: var(--primary);
  border-color: transparent;
  color: white;
  box-shadow: var(--primary-glow);
}

.transport-option.disabled {
  opacity: .5;
  cursor: not-allowed;
}

.transport-option.disabled:hover {
  opacity: .6;
}

.transport-icon {
  font-size: 15px;
  line-height: 1;
}

.coming-soon-badge {
  position: absolute;
  top: -8px;
  right: -4px;
  background: linear-gradient(135deg, rgba(255,170,0,1), rgba(255,120,0,1));
  color: white;
  font-size: 9px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .5px;
  box-shadow: 0 4px 12px rgba(255,140,0,.3);
}

/* GLASS EFFECT */
.glass {
  border-radius: 18px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: var(--shadow2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* SEARCH CARD */
.search-card {
  padding: 16px;
}

.search-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,.65);
  margin: 0 0 6px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.20);
  color: rgba(255,255,255,.9);
  outline: none;
  font-weight: 600;
  font-size: 14px;
  transition: border-color .2s ease;
}

.form-group input::placeholder {
  color: rgba(255,255,255,.45);
}

.form-group input:focus,
.form-group select:focus {
  border-color: rgba(0,180,255,.6);
  box-shadow: 0 0 0 3px rgba(0,180,255,.1);
}

.search-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  margin-bottom: 16px;
  grid-column: 1 / -1;
}

.search-actions .btn {
  flex: 1;
  padding: 12px 14px;
}

/* Voice Search Button */
.voice-search-btn {
  flex: 0 0 auto !important;
  width: 44px;
  min-width: 44px;
  padding: 12px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  position: relative;
  transition: all 0.3s ease;
}

.voice-search-btn .voice-btn-label {
  display: none;
}

.voice-search-btn:hover {
  background: rgba(0, 180, 255, 0.15);
  border-color: rgba(0, 180, 255, 0.4);
}

.voice-search-btn.listening {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.6);
  animation: pulse-mic 1.5s infinite;
}

.voice-search-btn.listening .mic-icon {
  color: #ef4444;
}

@keyframes pulse-mic {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
}

/* Voice Feedback */
.voice-feedback {
  display: flex;
  align-items: center;
  justify-content: center;
  grid-column: 1 / -1;
  margin-top: 12px;
  padding: 16px;
  background: rgba(0, 180, 255, 0.05);
  border: 1px solid rgba(0, 180, 255, 0.15);
  border-radius: var(--r);
}

.voice-feedback-content {
  text-align: center;
  width: 100%;
}

.voice-status {
  margin: 8px 0 4px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.voice-transcript {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(0, 180, 255, 0.9);
  min-height: 1.4em;
  margin: 4px 0 8px;
}

.voice-cancel {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.6);
  padding: 6px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.voice-cancel:hover {
  border-color: rgba(239, 68, 68, 0.5);
  color: #ef4444;
}

/* Voice Visualizer */
.voice-visualizer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 24px;
}

.voice-visualizer span {
  display: inline-block;
  width: 3px;
  background: rgba(0, 180, 255, 0.8);
  border-radius: 2px;
  animation: voice-bar 0.8s ease-in-out infinite;
}

.voice-visualizer span:nth-child(1) { height: 8px; animation-delay: 0s; }
.voice-visualizer span:nth-child(2) { height: 16px; animation-delay: 0.1s; }
.voice-visualizer span:nth-child(3) { height: 24px; animation-delay: 0.2s; }
.voice-visualizer span:nth-child(4) { height: 16px; animation-delay: 0.3s; }
.voice-visualizer span:nth-child(5) { height: 8px; animation-delay: 0.4s; }

@keyframes voice-bar {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}

/* JOURNEY CARDS - Version Améliorée et Simplifiée */
#journeysList,
.journeys-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 24px;
  width: 100%;
}

.journey-card {
  padding: 28px;
  cursor: pointer;
  transition: all .3s ease;
  border-radius: var(--r);
  position: relative;
  overflow: hidden;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  min-height: 150px;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.journey-card:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary);
  opacity: 0;
  transition: opacity .3s ease;
}

.journey-card:hover {
  background: rgba(255,255,255,.10);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(255,255,255,.2);
}

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

.journey-card.selected {
  background: rgba(0,180,255,.15);
  border-color: rgba(0,180,255,.4);
  transform: translateY(-2px);
}

.journey-card.selected:before {
  opacity: 1;
}

/* Header avec route et prix */
.journey-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.journey-route-info {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 32px;
}

.departure-info, .arrival-info {
  text-align: center;
  min-width: 90px;
}

.time-big {
  font-size: 2rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.departure-info .station, .arrival-info .station {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
}

/* Milieu de route avec ligne */
.route-middle {
  flex: 1;
  text-align: center;
  margin: 0 20px;
}

.duration {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 16px;
  padding: 6px 14px;
  display: inline-block;
  margin-bottom: 10px;
}

.route-line {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0,255,170,.8);
  box-shadow: 0 0 0 3px rgba(0,255,170,.2);
}

.dot:last-child {
  background: rgba(0,180,255,.8);
  box-shadow: 0 0 0 3px rgba(0,180,255,.2);
}

.line {
  flex: 1;
  height: 3px;
  background: linear-gradient(90deg, rgba(0,255,170,.6), rgba(0,180,255,.6));
  margin: 0 12px;
  border-radius: 2px;
  position: relative;
}

.line:after {
  content: "🚄";
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 16px;
}

.connections {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
}

/* Prix */
.journey-price {
  text-align: right;
  margin-left: 24px;
}

.price-amount {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(255,255,255,.75));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.price-per-person {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}

/* Détails du train */
.journey-details {
  display: flex;
  gap: 16px;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.1);
}

.journey-details span {
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 12px;
  font-weight: 600;
  border: 1px solid;
}

.journey-operator-logo {
  display: flex;
  align-items: center;
  border: none !important;
  padding: 0 !important;
  background: none !important;
  line-height: 0;
}

.journey-operator-logo svg {
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}

.journey-train {
  background: rgba(0,180,255,.15);
  color: rgba(0,180,255,1);
  border-color: rgba(0,180,255,.3);
}

.journey-comfort {
  background: rgba(0,255,170,.15);
  color: rgba(0,255,170,1);
  border-color: rgba(0,255,170,.3);
}

/* Responsive */
@media (max-width: 768px) {
  .journey-header {
    flex-direction: column;
    gap: 20px;
    align-items: stretch;
  }

  .journey-route-info {
    gap: 16px;
  }

  .route-middle {
    margin: 0 12px;
  }

  .time-big {
    font-size: 1.6rem;
  }

  .price-amount {
    font-size: 1.8rem;
  }

  .journey-price {
    text-align: center;
    margin-left: 0;
  }

  .journey-details {
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* BOOKING CONTENT */
.booking-content {
  padding: var(--pad);
}

.booking-summary {
  margin-bottom: 32px;
  padding: 32px;
  border-radius: var(--r2);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}

.booking-summary:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary);
  opacity: 0.9;
}

/* Selected Journey Content */
.selected-journey-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.journey-header-section {
  text-align: center;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.journey-main-route h3 {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 12px;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(255,255,255,.75));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.journey-date-badge {
  display: inline-block;
  background: rgba(0,180,255,.15);
  border: 1px solid rgba(0,180,255,.3);
  border-radius: 16px;
  padding: 8px 16px;
}

.journey-date-badge span {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(0,180,255,.9);
  text-transform: capitalize;
}

/* Time Display Section */
.journey-time-section {
  margin: 8px 0;
}

.time-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.departure-time, .arrival-time {
  flex: 1;
  text-align: center;
}

.time-display .time-big {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
  margin-bottom: 8px;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(255,255,255,.75));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.time-station {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
}

.journey-duration {
  flex: 2;
  text-align: center;
  padding: 0 20px;
}

.duration-line {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.duration-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0,180,255,.9), rgba(120,90,255,.7));
  box-shadow: 0 0 12px rgba(0,180,255,.4);
}

.duration-bar {
  flex: 1;
  height: 3px;
  margin: 0 12px;
  background: linear-gradient(90deg, rgba(0,180,255,.6), rgba(120,90,255,.4), rgba(0,180,255,.6));
  border-radius: 2px;
}

.duration-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.connection-info {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}

/* Train Details Section */
.journey-details-section {
  padding: 16px 0;
  border-top: 1px solid rgba(255,255,255,.1);
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.train-info-badges {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.train-info-badges span {
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: 14px;
  font-weight: 600;
  border: 1px solid;
}

.train-operator,
.journey-operator {
  display: none;
}

.train-type {
  background: rgba(0,180,255,.15);
  color: rgba(0,180,255,1);
  border-color: rgba(0,180,255,.3);
}

.train-comfort {
  background: rgba(0,255,170,.15);
  color: rgba(0,255,170,1);
  border-color: rgba(0,255,170,.3);
}

/* Price Section */
.journey-price-section {
  padding-top: 20px;
}

.price-details {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r);
  padding: 20px;
}

.price-breakdown {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price-label {
  font-size: 1rem;
  color: var(--muted);
  font-weight: 600;
}

.total-price-display {
  text-align: right;
}

.total-amount {
  font-size: 2rem;
  font-weight: 900;
  color: var(--text);
  display: block;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(255,255,255,.75));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  margin-bottom: 4px;
}

.price-currency {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .booking-summary {
    padding: 24px 20px;
    margin-bottom: 24px;
  }

  .journey-main-route h3 {
    font-size: 1.5rem;
  }

  .time-display {
    gap: 12px;
  }

  .time-display .time-big {
    font-size: 2rem;
  }

  .journey-duration {
    padding: 0 12px;
  }

  .train-info-badges {
    gap: 8px;
  }

  .total-amount {
    font-size: 1.8rem;
  }
}

/* CONFIRMATION PAGE */
.confirmation-content {
  text-align: center;
  padding: var(--pad);
  padding-bottom: 120px; /* Espace pour les boutons fixes */
  max-width: 800px;
  margin: 0 auto;
}

.confirmation-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 900;
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(255,255,255,.75));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.confirmation-subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 32px;
  line-height: 1.5;
}

.confirmation-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--r2);
  padding: 32px;
  text-align: left;
  position: relative;
  overflow: hidden;
  margin-bottom: 32px;
}

.confirmation-card:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--success);
  opacity: 0.9;
}

.confirmation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.reservation-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}

.status-badge {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.confirmed {
  background: rgba(0,255,170,.2);
  color: rgba(0,255,170,1);
  border: 1px solid rgba(0,255,170,.4);
}

.status-badge.paid {
  background: rgba(0,180,255,.2);
  color: rgba(0,180,255,1);
  border: 1px solid rgba(0,180,255,.4);
}

.confirmation-section {
  margin-bottom: 32px;
}

.section-header {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
}

.info-label {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
}

.info-value {
  color: var(--text);
  font-weight: 600;
  text-align: right;
}

.passengers-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.passenger-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
}

.passenger-item:last-child {
  border-bottom: none;
}

.passenger-name {
  color: var(--text);
  font-weight: 600;
}

.passenger-email {
  color: var(--muted);
  font-size: 0.9rem;
}

.payment-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: flex-end;
}

.payment-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
}

.payment-label {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
}

.payment-amount {
  color: var(--text);
  font-weight: 800;
  font-size: 1.4rem;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(255,255,255,.75));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.payment-status {
  display: flex;
  align-items: center;
}

.action-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  position: fixed;
  bottom: 20px; /* Plus proche du bas */
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: rgba(5, 6, 10, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 12px 24px;
  border-radius: var(--r2);
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}

.download-button, .secondary-button {
  padding: 16px 32px;
  border-radius: var(--r);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.download-button {
  background: var(--primary);
  color: white;
  box-shadow: var(--primary-glow);
}

.download-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,180,255,.3);
}

.secondary-button {
  background: rgba(255,255,255,.1);
  color: var(--text);
  border: 1px solid rgba(255,255,255,.2);
}

.secondary-button:hover {
  background: rgba(255,255,255,.15);
  transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 768px) {
  .confirmation-card {
    padding: 24px 20px;
  }

  .confirmation-header {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .info-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .info-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .info-value {
    text-align: left;
  }

  .payment-summary {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .action-buttons {
    flex-direction: column;
    gap: 12px;
    bottom: 20px;
    left: 20px;
    right: 20px;
    transform: none;
    width: calc(100% - 40px);
    max-width: 400px;
    margin: 0 auto;
  }

  .download-button, .secondary-button {
    width: 100%;
    justify-content: center;
  }

  .confirmation-content {
    padding-bottom: 180px; /* Plus d'espace sur mobile pour les boutons fixes */
  }
}

/* Connected User Display */
.passenger-connected {
  background: rgba(0,255,170,.08);
  border: 1px solid rgba(0,255,170,.2);
  border-radius: var(--r);
  padding: 20px;
  margin-bottom: 20px;
}

.connected-user-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.connected-avatar {
  width: 50px;
  height: 50px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.15);
}

.connected-details {
  flex: 1;
}

.connected-details h4 {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.connected-details p {
  margin: 0 0 4px 0;
  font-size: 0.95rem;
}

.connected-details .email {
  color: rgba(255,255,255,.7);
  font-size: 0.85rem;
}

.connected-badge {
  background: var(--success);
  color: white;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* PRICE SUMMARY */
.price-summary {
  margin: 32px 0;
  padding: 20px;
  background: rgba(255,255,255,.05);
  border-radius: var(--r);
  border: 1px solid rgba(255,255,255,.1);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.summary-row:last-child {
  margin-bottom: 0;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.1);
  font-weight: 700;
  font-size: 1.1rem;
}

/* TERMS */
.terms-checkbox {
  margin: 32px 0;
}

.terms-checkbox label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  line-height: 1.5;
}

.terms-checkbox input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,.3);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all .2s ease;
}

.terms-checkbox input[type="checkbox"]:checked + .checkmark {
  background: var(--primary);
  border-color: transparent;
  color: white;
}

.terms-checkbox input[type="checkbox"]:checked + .checkmark::after {
  content: '✓';
  font-size: 14px;
  font-weight: 700;
}

/* PAYMENT BUTTON */
.payment-button {
  width: 100%;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 999px;
  padding: 16px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s ease;
  box-shadow: var(--primary-glow);
}

.payment-button:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 25px 50px rgba(0,180,255,.25);
}

/* CONFIRMATION */
.confirmation-content {
  text-align: center;
  max-width: 600px;
  margin: 64px auto;
  padding: 0 var(--pad);
}

.confirmation-title {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.confirmation-subtitle {
  color: var(--muted);
  font-size: 1.1rem;
  margin-bottom: 32px;
}

.action-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.download-button {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 999px;
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all .2s ease;
  box-shadow: var(--primary-glow);
}

.download-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 25px 50px rgba(0,180,255,.25);
}

.secondary-button {
  background: rgba(255,255,255,.06);
  color: var(--text);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
}

.secondary-button:hover {
  background: rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.22);
}

/* LOADING SPINNER */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5,6,10,.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255,255,255,.2);
  border-top: 3px solid rgba(0,180,255,.8);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* SCROLL REVEAL */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity .7s ease, transform .7s ease;
}

.reveal.on {
  opacity: 1 !important;
  transform: none !important;
}

/* PAGES */
.page {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
  display: none;
}

.page.active {
  opacity: 1;
  transform: translateY(0);
  display: block;
}

/* SECTIONS & UTILITIES */
.section-title {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
  text-align: center;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(255,255,255,.75));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* PAGE DE RÉSULTATS */
#resultsPage {
  padding: 32px 0 64px;
  min-height: 100vh;
}

#resultsPage .wrap {
  max-width: 900px;
}

/* Header de résultats */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding: 24px;
  background: rgba(255,255,255,.05);
  border-radius: var(--r);
  border: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.search-summary h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.modify-search {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
}

.modify-search:hover {
  background: rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.22);
}

.results-controls select {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.results-controls select:focus {
  border-color: rgba(0,180,255,.6);
  box-shadow: 0 0 0 3px rgba(0,180,255,.1);
}

/* Responsive results header pour mobile */
@media (max-width: 768px) {
  .results-header {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
    padding: 16px;
    margin-bottom: 20px;
  }

  .search-summary {
    text-align: center;
  }

  .search-summary h2 {
    font-size: 1.2rem;
    margin-bottom: 12px;
  }

  .modify-search {
    font-size: 0.85rem;
    padding: 10px 16px;
    border-radius: 16px;
    width: fit-content;
    margin: 0 auto;
  }

  .results-controls {
    width: 100%;
  }

  .results-controls select {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.9rem;
    border-radius: 16px;
    text-align: center;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.8)' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
  }
}

@media (max-width: 430px) {
  .results-header {
    padding: 12px;
    gap: 12px;
  }

  .search-summary h2 {
    font-size: 1.1rem;
  }

  .modify-search {
    font-size: 0.8rem;
    padding: 8px 14px;
  }

  .results-controls select {
    padding: 10px 14px;
    font-size: 0.85rem;
  }
}

/* Loading skeleton */
.loading-skeleton {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.skeleton-card {
  height: 120px;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,.05) 25%,
    rgba(255,255,255,.1) 50%,
    rgba(255,255,255,.05) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
  border-radius: var(--r);
  border: 1px solid rgba(255,255,255,.1);
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* États vides */
.no-results {
  text-align: center;
  padding: 64px 24px;
  background: rgba(255,255,255,.05);
  border-radius: var(--r);
  border: 1px solid rgba(255,255,255,.1);
}

.no-results p {
  color: var(--muted);
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.no-results p:last-child {
  margin-bottom: 0;
  opacity: .8;
}

/* RESPONSIVE DESIGN */
@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* Sur mobile, s'assurer que le formulaire reste en haut */
  .hero-grid > .reveal:first-child {
    order: 2; /* Texte en bas */
  }

  .hero-grid > .reveal:last-child {
    order: 1; /* Formulaire en haut */
  }

  .device {
    transform: none;
    aspect-ratio: auto;
    overflow: visible;
  }

  .nav-links {
    display: none;
  }

  .user-menu {
    gap: 10px; /* Réduire l'espace sur mobile */
  }

  .user-profile {
    gap: 8px; /* Réduire l'espace entre avatar et status */
  }

  .user-info {
    display: flex;
    flex-direction: row; /* Horizontal sur mobile pour gagner de l'espace */
    gap: 6px;
    align-items: center;
  }

  .user-name {
    display: none; /* Cacher le nom sur mobile pour économiser l'espace */
  }

  .user-status {
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: 12px;
    background: rgba(0,255,170,.15);
    border: 1px solid rgba(0,255,170,.3);
    color: rgba(0,255,170,.9);
    white-space: nowrap;
  }

  .account-btn {
    display: none;
  }
}

@media (max-width: 430px) {
  .user-status {
    font-size: 0.6rem !important;
    padding: 2px 6px !important;
    border-radius: 10px !important;
  }

  .user-avatar {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.8rem !important;
  }

  .nav-container {
    padding: 12px var(--pad);
  }

  .hero-section {
    padding: 32px 0 20px;
    min-height: 90vh;
  }

  .hero-title {
    font-size: 32px;
  }

  .device {
    min-height: auto;
    margin-bottom: 40px;
  }

  .device-body {
    padding: 16px 16px 24px 16px; /* Plus de padding en bas */
  }

  .search-form {
    grid-template-columns: 1fr;
    gap: 8px; /* Réduit l'espacement entre les champs */
  }

  .form-group input,
  .form-group select {
    padding: 10px 12px; /* Réduit la hauteur des inputs */
  }

  .form-group label {
    margin-bottom: 4px; /* Réduit l'espace sous les labels */
  }

  .search-actions {
    flex-direction: column;
    margin-top: 12px; /* Réduit l'espace au-dessus des boutons */
    margin-bottom: 16px; /* Marge sous le bouton rechercher */
    gap: 8px; /* Réduit l'espace entre les boutons pour qu'ils rentrent */
  }

  .search-actions .btn {
    padding: 14px 16px; /* Padding plus généreux pour mobile */
  }

  /* Supprime le liseré bleu de fond sur mobile uniquement */
  .price-summary.glass {
    background: transparent !important; /* Supprime complètement le fond bleu */
    border: 1px solid rgba(255,255,255,.05) !important; /* Bordure plus discrète */
  }

  .connected-user-info {
    gap: 12px;
  }

  .connected-avatar {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }

  .action-buttons {
    flex-direction: column;
    gap: 12px;
  }

  .meta {
    flex-direction: column;
    gap: 12px;
  }
}

@media (max-width: 360px) {
  .hero-title {
    font-size: 28px;
  }

  .device {
    min-height: auto;
  }
}

/* Badge responsive pour les cartes passager connecté */
.badge-desktop {
  display: inline;
}

.badge-mobile {
  display: none;
}

@media (max-width: 768px) {
  .badge-desktop {
    display: none;
  }

  .badge-mobile {
    display: inline;
  }
}

/* =============================================================================
   LOYALTY / FIDÉLITÉ
   ============================================================================= */

/* Header indicator */
.loyalty-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: linear-gradient(135deg, rgba(255,215,0,.15), rgba(255,215,0,.05));
  border: 1px solid rgba(255,215,0,.25);
  border-radius: 20px;
  cursor: pointer;
  transition: all .2s;
  color: #ffd700;
}

.loyalty-indicator:hover {
  background: linear-gradient(135deg, rgba(255,215,0,.25), rgba(255,215,0,.1));
  border-color: rgba(255,215,0,.4);
  transform: translateY(-1px);
}

.loyalty-icon {
  flex-shrink: 0;
}

.loyalty-balance {
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* Loyalty Payment Block */
.loyalty-payment-block {
  margin: 24px 0;
  padding: 20px;
  border: 1px solid rgba(255,215,0,.2);
  border-radius: var(--r-sm);
  background: rgba(255,215,0,.04);
}

.loyalty-payment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.loyalty-payment-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #ffd700;
}

.loyalty-payment-balance {
  font-size: 0.9rem;
  color: var(--muted);
}

.loyalty-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.loyalty-toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.loyalty-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,255,255,.1);
  border-radius: 26px;
  transition: .3s;
}

.toggle-slider:before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: .3s;
}

.loyalty-toggle input:checked + .toggle-slider {
  background: linear-gradient(135deg, rgba(255,215,0,.6), rgba(255,180,0,.8));
}

.loyalty-toggle input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

.loyalty-toggle-label {
  font-size: 0.9rem;
  color: var(--text);
}

.loyalty-discount-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.loyalty-discount-amount {
  color: #00ffaa;
  font-weight: 700;
}

/* Insurance block */
.insurance-block {
  margin: 24px 0;
  padding: 20px;
  border: 1px solid rgba(0,180,255,.2);
  border-radius: var(--r-sm);
  background: rgba(0,180,255,.04);
}

.insurance-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.insurance-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: rgba(0,180,255,.9);
}

.insurance-optional {
  font-size: 0.8rem;
  color: var(--muted);
  background: rgba(255,255,255,.06);
  padding: 4px 10px;
  border-radius: 12px;
}

.insurance-option {
  padding: 16px;
  margin-bottom: 10px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all .2s;
}

.insurance-option:hover {
  border-color: rgba(0,180,255,.3);
  background: rgba(0,180,255,.04);
}

.insurance-option.selected {
  border-color: rgba(0,180,255,.5);
  background: rgba(0,180,255,.08);
}

.insurance-option.no-insurance {
  opacity: .7;
}

.insurance-option.no-insurance.selected {
  opacity: 1;
  border-color: rgba(255,255,255,.15);
  background: rgba(255,255,255,.04);
}

.insurance-option-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.insurance-radio {
  display: flex;
  align-items: center;
  gap: 10px;
}

.insurance-radio input[type="radio"] {
  accent-color: rgba(0,180,255,.8);
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.insurance-radio label {
  cursor: pointer;
  font-size: 0.95rem;
}

.insurance-price {
  font-weight: 700;
  color: rgba(0,180,255,.9);
  font-size: 1rem;
}

.insurance-description {
  margin: 8px 0 8px 28px;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
}

.insurance-coverages {
  margin: 0 0 0 28px;
  padding: 0;
  list-style: none;
}

.insurance-coverages li {
  font-size: 0.8rem;
  color: var(--muted);
  padding: 2px 0;
}

.insurance-coverages li::before {
  content: "✓ ";
  color: rgba(0,255,170,.7);
  font-weight: 700;
}

.insurance-item .payment-amount {
  color: rgba(0,180,255,.8);
}

/* Cashback earned (confirmation) */
.cashback-earned {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  margin: 24px auto;
  max-width: 500px;
  background: linear-gradient(135deg, rgba(0,255,170,.08), rgba(0,180,255,.05));
  border: 1px solid rgba(0,255,170,.25);
  border-radius: var(--r-sm);
}

.cashback-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.cashback-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.cashback-amount {
  font-size: 1.3rem;
  font-weight: 800;
  color: #00ffaa;
}

.cashback-label {
  font-size: 0.85rem;
  color: var(--muted);
}

.cashback-new-balance {
  font-size: 0.85rem;
  color: var(--text-dim);
  white-space: nowrap;
}

/* Confirmation loyalty used */
.payment-item.loyalty-used .payment-amount.discount {
  color: #00ffaa;
}

/* ===== FEATURES SECTION ===== */
.features-section {
  padding: 80px 0 60px;
  position: relative;
}

.features-heading {
  text-align: center;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 48px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.feature-card {
  padding: 28px;
  border-radius: var(--r);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 180, 255, 0.2);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(0, 180, 255, 0.1);
  color: rgba(0, 180, 255, 0.8);
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}

.feature-card p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
}

/* ===== NAV ACTIVE STATE ===== */
.nav-link.active {
  color: rgba(0, 180, 255, 1);
  border-bottom: 2px solid rgba(0, 180, 255, 0.8);
  padding-bottom: 2px;
}

/* ===== PAGE HEADER (shared) ===== */
.page-header {
  margin-bottom: 32px;
  padding-top: var(--pad);
}

/* ===== BOOKINGS HISTORY PAGE ===== */
.bookings-history-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 750px;
  margin: 0 auto;
  padding-bottom: 40px;
}

.booking-history-card {
  padding: 24px;
  border-radius: var(--r);
  position: relative;
}

.booking-history-status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.status-completed {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.status-upcoming {
  background: rgba(0, 180, 255, 0.15);
  color: rgba(0, 180, 255, 0.9);
}

.status-cancelled {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.booking-history-route {
  margin-bottom: 16px;
}

.booking-history-stations {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.route-arrow {
  color: rgba(0, 180, 255, 0.6);
  font-size: 1.1rem;
}

.booking-history-meta {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

.booking-history-meta .separator {
  margin: 0 6px;
}

.booking-history-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.detail-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-value {
  font-size: 0.95rem;
  font-weight: 600;
}

.booking-pnr {
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
  color: rgba(0, 180, 255, 0.9);
}

.booking-history-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.booking-price {
  font-size: 1.3rem;
  font-weight: 800;
}

.cancelled-price {
  text-decoration: line-through;
  color: rgba(255, 255, 255, 0.3);
}

.refund-note {
  font-size: 0.85rem;
  color: #10b981;
  font-weight: 500;
}

.booking-actions-group {
  display: flex;
  gap: 8px;
}

.btn-small {
  padding: 8px 16px !important;
  font-size: 0.85rem !important;
}

/* ===== SUPPORT PAGE ===== */
.support-content {
  max-width: 750px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-bottom: 40px;
}

.support-card {
  padding: 28px;
  border-radius: var(--r);
}

.support-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.support-description {
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 24px;
  line-height: 1.6;
}

.support-channels {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.support-channel {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: all 0.2s ease;
}

.support-channel:hover {
  background: rgba(0, 180, 255, 0.05);
  border-color: rgba(0, 180, 255, 0.15);
}

.channel-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(0, 180, 255, 0.1);
  color: rgba(0, 180, 255, 0.8);
  flex-shrink: 0;
}

.channel-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.channel-name {
  font-weight: 700;
  font-size: 1rem;
}

.channel-detail {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.channel-hours {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  overflow: hidden;
}

.faq-item summary {
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s ease;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.2rem;
  color: rgba(0, 180, 255, 0.6);
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item summary:hover {
  background: rgba(255, 255, 255, 0.03);
}

.faq-item p {
  padding: 0 18px 16px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.7;
  font-size: 0.9rem;
}

/* ===== LOYALTY PAGE ===== */
.loyalty-page-content {
  padding: var(--pad);
  max-width: 700px;
  margin: 0 auto;
}

.loyalty-page-header {
  margin-bottom: 32px;
}

.back-btn {
  background: none;
  border: none;
  color: rgba(0,180,255,.8);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0;
  margin-bottom: 12px;
  display: block;
}

.back-btn:hover {
  color: rgba(0,180,255,1);
}

/* Loyalty Card */
.loyalty-card {
  padding: 28px;
  border-radius: var(--r);
  margin-bottom: 24px;
  border: 1px solid rgba(255,215,0,.15);
  background: linear-gradient(135deg, rgba(255,215,0,.06), rgba(255,215,0,.02));
}

.loyalty-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.loyalty-tier-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255,215,0,.1);
  border: 1px solid rgba(255,215,0,.2);
  border-radius: 20px;
}

.tier-icon {
  font-size: 1.2rem;
}

.tier-name {
  font-weight: 700;
  color: #ffd700;
}

.loyalty-cashback-rate {
  font-size: 0.9rem;
  color: var(--muted);
}

.loyalty-balance-big {
  text-align: center;
  margin-bottom: 24px;
}

.balance-label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.balance-value {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ffd700, #ffaa00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Progress bar */
.loyalty-progress {
  margin-top: 16px;
}

.progress-bar {
  height: 8px;
  background: rgba(255,255,255,.08);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffd700, #ffaa00);
  border-radius: 4px;
  transition: width .5s ease;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted);
}

/* Tiers grid */
.loyalty-tiers {
  padding: 24px;
  border-radius: var(--r);
  margin-bottom: 24px;
}

.loyalty-tiers h3 {
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.tiers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.tier-item {
  text-align: center;
  padding: 16px 8px;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  transition: all .2s;
}

.tier-item.active {
  background: rgba(255,215,0,.08);
  border-color: rgba(255,215,0,.25);
}

.tier-medal {
  display: block;
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.tier-title {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.tier-threshold {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.tier-rate {
  display: block;
  font-size: 0.8rem;
  color: #00ffaa;
  font-weight: 600;
}

/* History */
.loyalty-history {
  padding: 24px;
  border-radius: var(--r);
}

.loyalty-history h3 {
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.history-item:last-child {
  border-bottom: none;
}

.history-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.history-label {
  font-size: 0.9rem;
  font-weight: 500;
}

.history-date {
  font-size: 0.75rem;
  color: var(--muted);
}

.history-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.history-amount {
  font-weight: 700;
  font-size: 0.95rem;
}

.history-amount.positive {
  color: #00ffaa;
}

.history-amount.negative {
  color: #ff6b6b;
}

.history-balance {
  font-size: 0.7rem;
  color: var(--muted);
}

/* Mobile responsive loyalty */
@media (max-width: 768px) {
  .loyalty-indicator {
    padding: 4px 8px;
    gap: 4px;
  }

  .loyalty-balance {
    font-size: 0.75rem;
  }

  .cashback-earned {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  .tiers-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .tier-item {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    padding: 12px 16px;
  }

  .tier-medal {
    margin-bottom: 0;
    font-size: 1.4rem;
  }

  .balance-value {
    font-size: 2rem;
  }

  .loyalty-payment-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}