/* ═══════════════════════════════════════════════════════════════════════
   Moto · site public — couche ergonomie (mobile d'abord), sept. 2026.
   Chargée après styles.css sur toutes les pages. Constats d'audit :
   comprendre Moto en 5 s (hero), deux actions évidentes, barre d'actions
   mobile, contact en un geste, cibles ≥ 44 px, texte courant ≥ 16 px sur
   mobile, contrastes AA, focus visible, page mobile plus courte.
   ═══════════════════════════════════════════════════════════════════════ */

/* ───────────── Accessibilité : focus visible, clavier ───────────── */
:focus-visible {
  outline: 3px solid #ff5f4d;
  outline-offset: 3px;
  border-radius: 6px;
}

.header :focus-visible,
.driver-section :focus-visible,
.dl-panel :focus-visible,
.footer :focus-visible {
  outline-color: #fff;
}

/* ───────────── Hero : comprendre Moto en 5 s ───────────── */
.hero h1 {
  font-size: clamp(2.35rem, 5.4vw, 4.1rem);
  line-height: 1.04;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.7rem 0 0.9rem;
}

.hero-cta {
  min-height: 54px;
  padding: 0.9rem 1.55rem;
  font-size: 1.02rem;
  gap: 0.6rem;
}

.hero-cta-ico {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.hero-cta--ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.34);
  box-shadow: none;
}

.hero-cta--ghost:hover {
  background: rgba(255, 255, 255, 0.16);
}

.store-note {
  margin: 0;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.8);
}

.store-note--light {
  margin-top: 0.75rem;
  color: rgba(255, 255, 255, 0.78);
}

/* Garanties du hero : quatre repères (prix, espèces, chauffeurs et
   passagers identifiés) en grille 2 × 2 — points dégradés alignés, mêmes
   espacements sur chaque ligne, quelle que soit la largeur. */
.hero-proofs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, max-content));
  column-gap: 2rem;
  row-gap: 0.7rem;
  margin-top: 1.6rem;
  font-size: 0.9375rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.78);
}

.hero-proofs li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  white-space: nowrap;
}

.hero-proofs li::before {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  box-shadow: 0 0 0 3px rgba(240, 45, 125, 0.16);
}

/* Menu : lisible sur fond nuit (AA) */
.header .nav-links a:not(.btn) {
  opacity: 1;
  color: rgba(255, 255, 255, 0.92);
}

/* ───────────── Devenir chauffeur : étapes, conditions, un bouton ───────────── */
.driver-join {
  margin-top: 1.9rem;
  padding: 1.35rem 1.35rem 1.45rem;
  border-radius: var(--radius-lg, 22px);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.driver-join-title {
  margin: 0 0 0.9rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}

.driver-steps {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  counter-reset: etape;
  display: grid;
  gap: 0.65rem;
}

.driver-steps li {
  position: relative;
  padding-left: 2.5rem;
  min-height: 2rem;
  font-size: 1rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.82);
}

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

.driver-steps li::before {
  counter-increment: etape;
  content: counter(etape);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.85rem;
  height: 1.85rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
}

.driver-conditions {
  margin: 0 0 1.15rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.8);
}

.driver-join-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.driver-join-cta {
  min-height: 54px;
  width: 100%;
  gap: 0.6rem;
  font-size: 1.02rem;
}

.driver-join-cta--ghost {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  box-shadow: none;
}

.driver-join-cta--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

@media (min-width: 641px) {
  .driver-join-cta {
    width: auto;
  }
}

/* ───────────── Contact : un geste ───────────── */
.contact-section {
  padding-top: 0;
}

.contact-panel {
  display: grid;
  gap: 1.5rem;
  padding: 1.6rem 1.35rem;
  border-radius: var(--radius-lg, 22px);
  background: var(--paper-tint, #faf7fd);
  border: 1px solid var(--line);
}

.contact-panel .section-eyebrow,
.contact-panel .section-title {
  text-align: left;
  margin-left: 0;
}

.contact-panel .section-title {
  margin-bottom: 0.5rem;
  font-size: clamp(1.55rem, 3.4vw, 2.1rem);
}

.contact-lead {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.contact-actions {
  display: grid;
  gap: 0.65rem;
  align-content: start;
}

.contact-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 54px;
  padding: 0.75rem 1.1rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink-strong);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

/* Téléphone / WhatsApp non renseignés : le bouton n'apparaît pas (display: flex écraserait [hidden]) */
.contact-btn[hidden] {
  display: none;
}

.contact-btn:hover {
  box-shadow: var(--shadow);
}

.contact-btn:active {
  transform: scale(0.985);
}

.contact-btn svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.contact-btn--whatsapp {
  background: #1f8f4a;
  border-color: #1f8f4a;
  color: #fff;
}

.contact-btn--phone {
  background: var(--ink-strong);
  border-color: var(--ink-strong);
  color: #fff;
}

@media (min-width: 768px) {
  .contact-panel {
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    padding: 2.2rem 2.4rem;
  }
}

/* ───────────── Pied de page : cibles larges, texte lisible ───────────── */
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.15rem;
  font-size: 0.9375rem;
}

.footer-links {
  gap: 0.15rem 1.15rem;
}

.footer-copy {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.78);
}

/* ───────────── Barre d'actions mobile (masquée sur ordinateur) ───────────── */
.m-dock {
  display: none;
}

/* ───────────── Pages légales ───────────── */
.legal-back,
.legal-topbar-brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
}

.legal-topbar-brand {
  padding: 0 0.4rem;
}

.legal-content p,
.legal-content li {
  font-size: 1rem;
  line-height: 1.65;
}

.legal-link-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.legal-cta {
  min-height: 50px;
}

.legal-foot p {
  font-size: 0.875rem;
  color: var(--ink-soft);
}

/* Les boutons du hero apparaissent avec le reste du texte */
@media (prefers-reduced-motion: no-preference) {
  .hero-actions {
    animation: hero-rise 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.44s both;
  }
}

/* ───────────── Mobile ───────────── */
@media (max-width: 860px) {
  /* Pas d'animation d'entrée de la scène sur téléphone : l'affiche du hero
     (élément le plus grand) se peint 0,8 s plus tôt sur une connexion lente. */
  .hero-stage,
  .hero-chip--offer,
  .hero-chip--radar {
    animation-delay: 0s;
  }

  .hero-stage,
  .hero-eyebrow,
  .hero h1,
  .hero-sub,
  .hero-actions,
  .hero-proofs {
    animation: none;
  }

  body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }

  .m-dock {
    position: fixed;
    z-index: 40;
    left: 0.7rem;
    right: 0.7rem;
    bottom: calc(0.55rem + env(safe-area-inset-bottom, 0px));
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 0.45rem;
    padding: 0.4rem;
    border-radius: 18px;
    background: rgba(18, 8, 31, 0.94);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: 0 12px 32px rgba(18, 8, 31, 0.35);
    transition: transform 0.25s ease, opacity 0.2s ease;
  }

  .m-dock.is-hidden {
    transform: translateY(120%);
    opacity: 0;
    pointer-events: none;
  }

  .m-dock__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0.4rem 0.6rem;
    border-radius: 14px;
    color: #fff;
    font-size: 0.98rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
  }

  .m-dock__btn--primary {
    background: var(--grad);
  }

  .m-dock__btn:not(.m-dock__btn--primary) {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
  }

  .page-legal {
    padding-bottom: 0;
  }

  /* Hero compact : les actions arrivent sans défiler */
  .hero-inner {
    gap: 1.5rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-cta {
    width: 100%;
  }

  .hero-stage {
    min-height: 380px;
  }

  .phone--front {
    width: 184px;
  }

  .phone--back {
    width: 144px;
  }

  /* Téléphones de démonstration et de la section chauffeur : plus compacts */
  .demo-grid.m-carousel .demo-frame,
  .showcase-phone.phone {
    width: 220px;
    max-width: 220px;
  }

  .demo-phone figcaption {
    margin-top: 0.9rem;
  }

  .life-card--accent {
    display: none;
  }

  .hero {
    padding-top: calc(var(--header-h) + 2rem);
    padding-bottom: 2.4rem;
  }

  .hero-proofs {
    margin-top: 1.35rem;
  }

  .flow-shot {
    width: min(170px, 56%);
  }

  .life-grid {
    grid-auto-rows: 230px;
  }

  .life-card--tall {
    min-height: 280px;
  }

  .demo-grid.m-carousel .demo-frame {
    width: 200px;
    max-width: 200px;
  }

  /* Section chauffeur : sur mobile, les étapes et le bouton remplacent la
     grande capture (déjà montrée dans les démos) */
  .driver-section .showcase-phone {
    display: none;
  }

  .dl-col .store-badges {
    grid-template-columns: 1fr;
  }

  .contact-panel {
    gap: 1.1rem;
    padding: 1.35rem 1.15rem;
  }

  /* Texte courant ≥ 16 px */
  .feature-card p,
  .flow-step p,
  .section-lead,
  .faq details p,
  .check-list li,
  .hero-sub,
  .dl-panel > p {
    font-size: 1rem;
  }

  .trust-item > span:last-child {
    font-size: 0.9375rem;
  }

  /* Sections resserrées : la page mobile perd ~1 200 px */
  .section {
    padding: 3.2rem 0;
  }

  .section-title {
    margin-bottom: 0.7rem;
  }

  .showcase,
  .showcase--reverse {
    gap: 1.8rem;
  }

  .demo-section .section-lead {
    margin-bottom: 1.2rem;
  }

  /* Deux démos : une seule à la fois (carrousel). justify-content: center
     rendrait le début de la piste inatteignable. */
  .m-carousel {
    justify-content: flex-start;
  }

  .demo-grid.m-carousel {
    margin-top: 1.4rem;
  }

  .demo-grid.m-carousel > .demo-phone {
    flex: 0 0 min(78vw, 300px);
  }

  .demo-grid.m-carousel .demo-frame {
    max-width: 100%;
  }

  .life-grid {
    grid-auto-rows: 260px;
  }

  .life-card--tall {
    min-height: 320px;
  }

  /* Menu ouvert : liens larges, fermeture évidente */
  .nav-links.is-open a:not(.btn) {
    display: flex;
    align-items: center;
    min-height: 48px;
  }

  .nav-links.is-open .btn-nav {
    min-height: 48px;
    justify-content: center;
  }

  .nav-toggle {
    min-width: 44px;
    min-height: 44px;
  }
}

/* Garanties sur téléphone : une colonne, points alignés sur le bord du
   texte du hero, jamais de débordement horizontal. */
@media (max-width: 640px) {
  .hero-proofs {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0.55rem;
    font-size: 1rem;
  }

  .hero-proofs li {
    white-space: normal;
  }
}

@media (max-width: 380px) {
  .m-dock {
    grid-template-columns: 1fr;
  }

  .m-dock__btn:not(.m-dock__btn--primary) {
    display: none;
  }
}

/* ───────────── Tablette : mise en page à deux colonnes plutôt que mobile empilé ───────────── */
@media (min-width: 641px) and (max-width: 980px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: none;
  }

  .flow {
    grid-template-columns: repeat(3, 1fr);
    max-width: none;
  }

  .flow-step,
  .feature-card {
    max-width: none;
  }
}

/* <picture> (WebP + JPEG) transparent pour la mise en page */
picture {
  display: contents;
}

/* Liens dans le texte des pages légales : zone de toucher confortable */
.legal-content p a,
.legal-content li a {
  display: inline-block;
  padding: 0.55rem 0;
  margin: -0.55rem 0;
  font-weight: 700;
}

.footer-copy,
.footer-tagline {
  font-size: 0.9375rem;
}

@media (max-width: 860px) {
  .footer-links a {
    min-width: 44px;
    justify-content: center;
  }
}
