/* Mobile UX shared by the standalone VTC Normandie pages. */
:root {
  --mobile-gutter: clamp(16px, 5vw, 22px);
  --mobile-section: clamp(56px, 12vw, 76px);
}

html { scroll-padding-top: 92px; }
body { overflow-x: hidden; }
img { max-width: 100%; }
h1, h2 { text-wrap: balance; }
p, li { overflow-wrap: break-word; }
a, button, input, textarea, summary { -webkit-tap-highlight-color: transparent; }

.brand-mark {
  display: block;
  width: 48px !important;
  height: 48px !important;
  flex: 0 0 48px;
  object-fit: contain;
}
footer .brand-mark {
  width: 54px !important;
  height: 54px !important;
  flex-basis: 54px;
}

:where(a, button, input, textarea, summary):focus-visible {
  outline: 3px solid var(--gold-light, #e7cc9f);
  outline-offset: 3px;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 48px;
  flex: 0 0 48px;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #fff;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 2px;
  background: transparent;
  cursor: pointer;
}
.nav-toggle-box {
  position: relative;
  width: 19px;
  height: 14px;
}
.nav-toggle-box::before,
.nav-toggle-box::after,
.nav-toggle-box span {
  position: absolute;
  left: 0;
  width: 19px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  content: "";
  transition: transform .25s ease, opacity .2s ease, top .25s ease;
}
.nav-toggle-box::before { top: 0; }
.nav-toggle-box span { top: 6px; }
.nav-toggle-box::after { top: 12px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-box::before { top: 6px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-box span { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-box::after { top: 6px; transform: rotate(-45deg); }

.mobile-nav {
  position: fixed;
  z-index: 1000;
  inset: var(--mobile-nav-top, 111px) 0 auto;
  display: grid;
  max-height: calc(100svh - var(--mobile-nav-top, 111px));
  padding: 12px var(--mobile-gutter) 20px;
  overflow-y: auto;
  color: #fff;
  background: #11252d;
  border-top: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 22px 45px rgba(5,15,19,.3);
  transform: translateY(-12px);
  opacity: 0;
  visibility: hidden;
  transition: transform .22s ease, opacity .22s ease, visibility .22s;
}
.mobile-nav.is-open { transform: none; opacity: 1; visibility: visible; }
.mobile-nav a {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  color: rgba(255,255,255,.86);
  border-bottom: 1px solid rgba(255,255,255,.11);
  font-size: 14px;
  font-weight: 600;
}
.mobile-nav a::after { color: #e7cc9f; content: "→"; }
.mobile-nav a.active,
.mobile-nav a[aria-current="page"] { color: #e7cc9f; }
.mobile-nav-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}
.mobile-nav .mobile-nav-action {
  min-height: 50px;
  justify-content: center;
  padding: 0 10px;
  color: #11252d;
  border: 0;
  background: #e7cc9f;
  text-align: center;
}
.mobile-nav .mobile-nav-action:last-child { color: #fff; border: 1px solid rgba(255,255,255,.35); background: transparent; }
.mobile-nav .mobile-nav-action::after { display: none; }
body.menu-open { overflow: hidden; }

@media (max-width: 850px) {
  .container { width: min(calc(100% - (var(--mobile-gutter) * 2)), 640px) !important; }
  .topbar { min-height: 35px; }
  .topbar .container,
  .topbar-inner { min-height: 35px; align-items: center; padding-block: 7px !important; text-align: center; }

  .nav {
    position: relative !important;
    z-index: 1001 !important;
    top: auto !important;
    color: #fff;
    background: #11252d;
  }
  .nav-inner,
  .nav > .container {
    display: flex !important;
    min-height: 74px !important;
    align-items: center;
    gap: 10px !important;
  }
  .brand { min-width: 0; margin-right: auto; }
  .brand-text,
  .brand { white-space: nowrap; }
  .nav-toggle { display: inline-flex; }
  .nav-call,
  .phone { display: none !important; }

  /* Service heroes: content controls the height; image focal point is page-specific. */
  .hero {
    min-height: auto !important;
    background-position: var(--hero-mobile-position, center) !important;
  }
  .hero::before {
    background: linear-gradient(180deg, rgba(8,22,28,.42) 0%, rgba(8,22,28,.78) 38%, rgba(8,22,28,.97) 100%) !important;
  }
  .hero > .container,
  .hero .container {
    display: block;
    min-height: auto !important;
    padding-top: clamp(62px, 12vw, 84px) !important;
    padding-bottom: 76px !important;
  }
  .breadcrumb {
    position: static !important;
    margin-bottom: 42px !important;
    line-height: 1.45;
  }
  .hero h1 {
    max-width: 15ch;
    margin: 13px 0 17px !important;
    font-size: clamp(2.35rem, 10.5vw, 3.35rem) !important;
    line-height: 1.035 !important;
    letter-spacing: -.047em;
  }
  .hero p { max-width: 38rem; font-size: 15px !important; line-height: 1.62; }
  .hero-actions { margin-top: 26px !important; }
  .hero-actions .btn { min-height: 52px; }
  .proof { gap: 10px 18px; margin-top: 30px; line-height: 1.4; }

  /* Keep the first screen focused: one message, short proof, then one form. */
  .home-page .hero-copy > p { max-width: 36rem; }
  .home-page .hero-proof { gap: 12px 18px; }
  .home-page .booking { margin-top: 30px; }
  .home-page .booking h2 { font-size: 1.45rem; }
  .home-page .booking > p { line-height: 1.45; }
  .home-page .booking-note { line-height: 1.45; }
  .home-page .booking-tabs button { min-height: 48px; }
  .home-page .field input { min-height: 48px; height: 48px; }
  .home-page .service-grid { gap: 12px; }
  .home-page .service-card { min-height: 0; }

  .intro-bar { margin-top: -28px !important; }
  .intro-item { padding: 18px 21px !important; }
  .intro-item strong { font-size: 16px; }

  .section,
  section:not(.hero):not(.cta):not(.map-section):not(.territory-section) {
    padding-top: var(--mobile-section);
    padding-bottom: var(--mobile-section);
  }
  .section-head { margin-bottom: 32px !important; }
  .section-head h2,
  .split-copy h2,
  .copy h2,
  .territory-layout h2,
  .practical h2,
  .title {
    max-width: 18ch;
    font-size: clamp(2rem, 8.6vw, 2.65rem) !important;
    line-height: 1.08 !important;
  }
  .section-head > p { max-width: 40rem; font-size: 14px; line-height: 1.65; }
  .cards { gap: 14px !important; }
  .card { min-height: 0 !important; }
  .card h3 { margin-top: 22px !important; }
  .split-image {
    min-height: 0 !important;
    height: auto;
    aspect-ratio: 4 / 3;
    background-position: var(--image-mobile-position, center) !important;
  }
  .split-copy > p { line-height: 1.65; }
  .check-list li { line-height: 1.55; }
  .steps { gap: 26px !important; }
  .step { padding: 52px 0 3px; }
  .points { gap: 20px; }
  .cta { padding: 65px 0 !important; background-position: var(--cta-mobile-position, center) !important; }
  .cta h2 { font-size: clamp(2rem, 8.8vw, 2.7rem) !important; line-height: 1.08; }
  .footer-links a { min-height: 34px; margin: 0 !important; display: flex; align-items: center; }
}

@media (max-width: 480px) {
  .eyebrow { gap: 8px; font-size: 10px; line-height: 1.45; letter-spacing: .13em; }
  .eyebrow::before, .eyebrow:before { width: 20px; flex: 0 0 20px; }
  .brand-mark { width: 40px !important; height: 40px !important; flex: 0 0 40px; }
  footer .brand-mark { width: 46px !important; height: 46px !important; flex-basis: 46px; }
  .brand-text strong { font-size: 12px !important; letter-spacing: .075em !important; }
  .brand-text small { font-size: 6px !important; letter-spacing: .13em !important; }
  .nav > .container,
  .nav-inner { min-height: 70px !important; }
  .mobile-nav { --mobile-nav-top: 105px; }

  .hero > .container,
  .hero .container { padding-top: 54px !important; padding-bottom: 66px !important; }
  .breadcrumb { margin-bottom: 34px !important; }
  .hero h1 { font-size: clamp(2.12rem, 10.8vw, 2.65rem) !important; }
  .hero-actions { display: grid !important; grid-template-columns: 1fr; }
  .hero-actions .btn,
  .split-copy > .btn,
  .cta .btn { width: 100%; }
  .btn { min-height: 48px; }
  .proof { display: grid !important; grid-template-columns: 1fr; gap: 10px !important; }
  .proof span { display: flex; gap: 9px; align-items: center; }

  .section-head h2,
  .split-copy h2,
  .copy h2,
  .territory-layout h2,
  .practical h2,
  .title { font-size: clamp(1.9rem, 9vw, 2.3rem) !important; }
  .card { padding: 23px 21px !important; }
  .split-image { aspect-ratio: 1 / 1; }
  .points { grid-template-columns: 1fr !important; }
  .faq summary { gap: 18px; min-height: 52px; align-items: center; font-size: 15px; line-height: 1.4; }
  .faq summary::after { flex: 0 0 auto; }
  .footer-links { display: grid !important; grid-template-columns: 1fr; gap: 25px !important; }
  .mobile-nav-actions { grid-template-columns: 1fr; }
  .home-page .section-head { margin-bottom: 26px !important; }
  .home-page .service-card { padding: 20px; }
  .home-page .service-card h3 { margin: 10px 0 6px; font-size: 20px; }
  .home-page .service-card p { font-size: 11px; line-height: 1.45; }
  .home-page .service-link { min-height: 48px; align-items: center; margin-top: 8px; }
  .home-page .fleet-shot span {
    right: 10px;
    bottom: 10px;
    left: 10px;
    padding: 8px 10px;
    font-size: 13px;
  }
  /* La première vue est déjà présentée dans le bloc flotte : éviter le doublon sur mobile. */
  .home-page .fleet-gallery .fleet-shot:first-child { display: none; }
}

@media (max-width: 350px) {
  .brand-mark { width: 36px !important; height: 36px !important; flex-basis: 36px; }
  .hero h1 { font-size: 2rem !important; }
}

@media (max-height: 520px) and (orientation: landscape) and (max-width: 850px) {
  .mobile-nav { top: 70px; max-height: calc(100svh - 70px); }
  .topbar { display: none; }
  .hero > .container,
  .hero .container { padding-block: 45px 52px !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
