/* ============================================================
   WYVO — site vitrine
   Style sobre & élégant, accent vert, nav glassmorphisme en bas
   ============================================================ */

:root {
  --green: #35d461;
  --green-soft: #e8f9ee;
  --green-dark: #0f7a35;
  --ink: #101312;
  --ink-soft: #525855;
  --bg: #ffffff;
  --bg-alt: #f5f7f6;
  --line: #e6e9e7;
  --radius: 20px;
  --font-display: "Montserrat", sans-serif;
  --font-body: "Inter", sans-serif;
  --nav-h: 68px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--nav-h) + 28px);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--green); color: #fff; }

/* ============ TOP BAR ============ */
.topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px clamp(20px, 5vw, 64px);
}

.brand {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.7rem;
  letter-spacing: -0.03em;
  color: #fff;
}

.brand-dot { color: var(--green); }

.topbar-link {
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 20px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 100px;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.25s, border-color 0.25s;
}

.topbar-link:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.6);
}

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; }

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  animation: heroZoom 18s ease-out forwards;
}

@keyframes heroZoom {
  from { transform: scale(1.08); }
  to   { transform: scale(1); }
}

.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 12, 10, 0.35) 0%, rgba(8, 12, 10, 0.15) 45%, rgba(8, 12, 10, 0.55) 100%),
    linear-gradient(100deg, rgba(8, 12, 10, 0.45) 0%, transparent 60%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 clamp(20px, 6vw, 90px);
  width: 100%;
  min-width: 0;
  max-width: 1200px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3rem, 9vw, 7.5rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
}

.line-white { color: #fff; }

.line-green {
  color: var(--green);
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
  transform-origin: left bottom;
  transition: transform 0.9s cubic-bezier(0.65, 0, 0.25, 1);
}

/* clone invisible servant à mesurer la largeur du texte */
.line-measure {
  position: absolute;
  visibility: hidden;
  pointer-events: none;
  white-space: nowrap;
  left: 0;
  top: 0;
}

.flip-letter {
  display: inline-block;
  transform-origin: 50% 80%;
}

.flip-letter.flipping { animation: letterFlip 0.55s ease both; }

@keyframes letterFlip {
  0%   { transform: rotateX(0);      opacity: 1; }
  45%  { transform: rotateX(90deg);  opacity: 0; }
  55%  { transform: rotateX(-90deg); opacity: 0; }
  100% { transform: rotateX(0);      opacity: 1; }
}

.destination {
  display: inline-block;
  margin-left: 0.35em;
  color: #fff;
  overflow: hidden;
  white-space: nowrap;
  flex-shrink: 0; /* jamais rogné par le flex : c'est le scale de la ligne qui gère le débordement */
  max-width: 0;
  opacity: 0;
  transition: max-width 0.9s cubic-bezier(0.65, 0, 0.25, 1), opacity 0.5s ease 0.15s;
}

.destination.open {
  max-width: 20em;
  opacity: 1;
}

.hero-sub {
  margin-top: 28px;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  font-weight: 500;
  max-width: 34em;
}

.hero-cta {
  margin-top: 36px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ============ BOUTONS ============ */
.btn {
  display: inline-block;
  padding: 15px 32px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 1rem;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--green);
  color: #063317;
  box-shadow: 0 8px 24px rgba(53, 212, 97, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(53, 212, 97, 0.45);
}

.btn-ghost {
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(6px);
}

.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }

.btn-outline {
  color: var(--ink);
  border: 1.5px solid var(--ink);
}

.btn-outline:hover { background: var(--ink); color: #fff; }

/* ============ SCROLL HINT ============ */
.hero-scroll {
  position: absolute;
  bottom: 110px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 26px;
  height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
}

.hero-scroll span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 4px;
  background: #fff;
  animation: scrollHint 1.8s ease-in-out infinite;
}

@keyframes scrollHint {
  0%, 100% { transform: translateY(0);   opacity: 1; }
  60%      { transform: translateY(14px); opacity: 0; }
}

/* ============ STATS ============ */
.stats {
  padding: clamp(56px, 8vw, 96px) clamp(20px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
}

.stats-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
}

.stat { text-align: center; }

.stat-value {
  display: block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  letter-spacing: -0.02em;
  color: var(--ink);
}

.stat-value::after {
  content: "";
  display: block;
  width: 36px;
  height: 4px;
  border-radius: 4px;
  background: var(--green);
  margin: 12px auto 14px;
}

.stat-label {
  color: var(--ink-soft);
  font-size: 0.95rem;
  max-width: 24em;
  margin: 0 auto;
  display: block;
}

/* ============ SECTIONS ============ */
.section {
  padding: clamp(72px, 10vw, 130px) clamp(20px, 5vw, 64px);
}

.section-alt { background: var(--bg-alt); }

.section-head {
  max-width: 780px;
  margin: 0 auto clamp(48px, 6vw, 72px);
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-dark);
  background: var(--green-soft);
  padding: 7px 16px;
  border-radius: 100px;
  margin-bottom: 20px;
}

.eyebrow-light {
  color: var(--green);
  background: rgba(53, 212, 97, 0.12);
}

.section-head h2,
.driver-text h2,
.final-cta h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.section-head h2 em,
.driver-text h2 em {
  font-style: normal;
  color: var(--green);
}

.section-head p {
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 1.08rem;
}

/* ============ CARDS SERVICE ============ */
.cards {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}

.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  border-color: rgba(53, 212, 97, 0.5);
  box-shadow: 0 18px 44px rgba(16, 19, 18, 0.08);
}

.card-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  background: var(--green-soft);
  color: var(--green-dark);
  border-radius: 16px;
  margin-bottom: 20px;
  transition: background 0.35s ease, color 0.35s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card-icon svg {
  width: 26px;
  height: 26px;
}

.card:hover .card-icon {
  background: var(--green);
  color: #fff;
  transform: scale(1.08) rotate(-5deg);
}

/* tracé animé des icônes à l'apparition de la section */
.cards .card-icon svg * {
  stroke-dasharray: 90;
  stroke-dashoffset: 90;
}

.cards.visible .card-icon svg * {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.2s ease 0.4s;
}

/* apparition en cascade des cartes */
.cards.reveal { opacity: 1; transform: none; }

.cards.reveal .card { opacity: 0; }

.cards.reveal.visible .card {
  opacity: 1;
  animation: cardIn 0.7s ease backwards;
}

.cards.reveal.visible .card:nth-child(1) { animation-delay: 0.05s; }
.cards.reveal.visible .card:nth-child(2) { animation-delay: 0.15s; }
.cards.reveal.visible .card:nth-child(3) { animation-delay: 0.25s; }
.cards.reveal.visible .card:nth-child(4) { animation-delay: 0.35s; }
.cards.reveal.visible .card:nth-child(5) { animation-delay: 0.45s; }
.cards.reveal.visible .card:nth-child(6) { animation-delay: 0.55s; }

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

.card h3 {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.card p { color: var(--ink-soft); font-size: 0.97rem; }

/* ============ ÉTAPES ============ */
.steps {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  list-style: none;
  counter-reset: step;
}

.step {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 34px 28px;
  border: 1px solid var(--line);
  position: relative;
}

.step-num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2.4rem;
  color: var(--green);
  display: block;
  margin-bottom: 14px;
  line-height: 1;
}

.step h3 {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.step p { color: var(--ink-soft); font-size: 0.95rem; }

/* ============ CHAUFFEUR (dark) ============ */
.section-dark {
  background: #0d1210;
  color: #fff;
}

.driver-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
}

.driver-text h2 { color: #fff; }

.driver-list {
  list-style: none;
  margin: 32px 0 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.driver-list li {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.02rem;
  padding-left: 34px;
  position: relative;
}

.driver-list li strong { color: #fff; }

.driver-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(53, 212, 97, 0.15);
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* -- Ticket exemple -- */
.receipt {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 36px 32px;
  backdrop-filter: blur(10px);
}

.receipt-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 24px;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
}

.receipt-amount {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
}

.receipt-minus .receipt-amount { color: rgba(255, 255, 255, 0.5); }

.receipt-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  margin: 12px 0;
}

.receipt-total { font-size: 1.1rem; color: #fff; }

.receipt-total .receipt-amount {
  color: var(--green);
  font-size: 1.9rem;
  font-weight: 900;
}

.receipt-note {
  margin-top: 20px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.5;
}

.driver-note {
  margin-top: 18px;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ============ COMMUNES ============ */
.communes {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.commune {
  padding: 12px 24px;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.97rem;
  color: var(--ink-soft);
  background: var(--bg);
  transition: border-color 0.25s, color 0.25s, transform 0.25s;
}

.commune:hover {
  border-color: var(--green);
  color: var(--ink);
  transform: translateY(-2px);
}

.commune-main {
  background: var(--green);
  border-color: var(--green);
  color: #063317;
  font-weight: 700;
}

.commune-more {
  border-style: dashed;
  color: var(--green-dark);
}

/* ============ CTA FINAL ============ */
.final-cta {
  text-align: center;
  padding: clamp(80px, 10vw, 140px) clamp(20px, 5vw, 64px);
  background:
    radial-gradient(ellipse 70% 90% at 50% 110%, rgba(53, 212, 97, 0.16), transparent);
}

.final-cta .accent { color: var(--green); }

.final-cta p {
  margin-top: 16px;
  color: var(--ink-soft);
  font-size: 1.08rem;
}

.final-cta .hero-cta { justify-content: center; }

/* ============ FOOTER ============ */
.footer {
  border-top: 1px solid var(--line);
  padding: clamp(48px, 6vw, 80px) clamp(20px, 5vw, 64px) 40px;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand .brand { color: var(--ink); font-size: 1.4rem; }

.footer-brand p {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  color: var(--ink-soft);
  font-size: 0.95rem;
  padding: 5px 0;
  transition: color 0.2s;
}

.footer-col a:hover { color: var(--green-dark); }

.footer-bottom {
  max-width: 1200px;
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

/* ============ NAV GLASSMORPHISME (BAS) ============ */
.glass-nav {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    0 12px 40px rgba(16, 19, 18, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: background 0.45s ease, border-color 0.45s ease, box-shadow 0.45s ease;
}

/* variante « verre sombre » quand la nav passe sur un fond clair */
.glass-nav.on-light {
  background: rgba(16, 19, 18, 0.62);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow:
    0 12px 40px rgba(16, 19, 18, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.glass-nav.on-light .glass-link { color: rgba(255, 255, 255, 0.65); }
.glass-nav.on-light .glass-link:hover { color: #fff; }

.glass-nav.on-light .glass-link.active {
  color: var(--green);
  background: rgba(53, 212, 97, 0.2);
}

.glass-nav.on-light .glass-cta {
  background: #fff;
  color: var(--ink);
}

.glass-nav.on-light .glass-cta:hover {
  background: var(--green);
  color: #063317;
}

.glass-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 9px 18px;
  border-radius: 100px;
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: color 0.25s, background 0.25s;
}

.glass-link svg {
  width: 20px;
  height: 20px;
}

.glass-link:hover { color: var(--ink); }

.glass-link.active {
  color: var(--green-dark);
  background: rgba(53, 212, 97, 0.16);
}

.glass-cta {
  margin-left: 6px;
  padding: 13px 24px;
  border-radius: 100px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  white-space: nowrap;
  transition: background 0.25s, color 0.25s, transform 0.2s;
}

.glass-cta:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
}

/* ============ REVEAL AU SCROLL ============ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .driver-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .glass-nav {
    bottom: 12px;
    width: calc(100% - 24px);
    justify-content: space-between;
    padding: 6px;
  }

  .glass-link { padding: 8px 10px; }
  .glass-link span { font-size: 0.62rem; }
  .glass-cta { padding: 11px 16px; font-size: 0.8rem; }

  .topbar-link { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-scroll { display: none; }

  .hero-title { font-size: clamp(2.4rem, 12vw, 3.4rem); }
}

@media (max-width: 480px) {
  .glass-link span { display: none; }
  .glass-link { padding: 12px; }
  .glass-cta { margin-left: 2px; padding: 12px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-bg img { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .cards.reveal .card { opacity: 1; animation: none; }
  .cards .card-icon svg * { stroke-dasharray: none; stroke-dashoffset: 0; transition: none; }
}
