/**
 * Coque visuelle type application native.
 * N'agit qu'en dessous de 768 px. Le design laptop reste intact.
 */

.barre-onglets-application {
  display: none;
}

@media (max-width: 767px) {
  :root {
    --hauteur-entete-application: 56px;
    --hauteur-onglets-application: 64px;
  }

  html {
    height: 100%;
    scroll-behavior: smooth;
  }

  html,
  body {
    overscroll-behavior-y: contain;
    -webkit-tap-highlight-color: transparent;
  }

  body {
    min-height: 100dvh;
    padding-top: calc(var(--hauteur-entete-application) + env(safe-area-inset-top, 0px)) !important;
    padding-bottom: calc(var(--hauteur-onglets-application) + env(safe-area-inset-bottom, 0px)) !important;
    background: #f3f6fb;
  }

  body:has(.hero),
  body:has(.services-hero),
  body:has(.contact-main),
  body:has(.tarifs-section) {
    padding-top: 0 !important;
  }

  /* En-tête compact, collé sous l'encoche */
  #navbar {
    background: rgba(3, 35, 74, 0.94) !important;
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    backdrop-filter: saturate(180%) blur(18px);
    box-shadow: 0 8px 24px rgba(3, 35, 74, 0.18) !important;
    padding-top: env(safe-area-inset-top, 0px);
  }

  #navbar .boxed-container {
    padding-left: 16px;
    padding-right: 16px;
  }

  #navbar nav {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }

  #navbar .brand-link {
    gap: 8px !important;
    min-width: 0;
    max-width: calc(100vw - 32px);
    font-size: 17px !important;
    font-weight: 800;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #navbar .brand-link::before {
    width: 22px !important;
    height: 22px !important;
    flex-basis: 22px !important;
  }

  .interrupteur-menu-mobile,
  #mobile-menu-button,
  #mobile-menu {
    display: none !important;
  }

  /* Navigation bas, style iOS / Android */
  .barre-onglets-application {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: end;
    min-height: calc(var(--hauteur-onglets-application) + env(safe-area-inset-bottom, 0px));
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid rgba(8, 31, 66, 0.08);
    box-shadow: 0 -10px 30px rgba(8, 31, 66, 0.08);
    transition: transform 0.22s ease;
  }

  .barre-onglets-application.est-masquee {
    transform: translateY(110%);
  }

  .onglet-application {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
    min-height: 48px;
    padding: 4px 2px 2px;
    color: #6b7a8d;
    text-decoration: none;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.01em;
    line-height: 1;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
  }

  .onglet-application svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.1;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .onglet-application.est-actif {
    color: #0b2a55;
  }

  .onglet-application.est-actif svg {
    stroke-width: 2.4;
  }

  .onglet-application--principal {
    justify-content: flex-end;
  }

  .onglet-application--principal .pictogramme-principal {
    display: inline-flex;
    width: 52px;
    height: 52px;
    margin-top: -22px;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffae19 0%, #f59d08 100%);
    color: #081f42;
    box-shadow: 0 10px 20px rgba(245, 157, 8, 0.38);
  }

  .onglet-application--principal .pictogramme-principal svg {
    width: 24px;
    height: 24px;
  }

  .onglet-application--principal.est-actif .pictogramme-principal {
    box-shadow: 0 10px 22px rgba(245, 157, 8, 0.5), 0 0 0 3px rgba(255, 174, 25, 0.28);
  }

  .onglet-application--principal span:last-child {
    margin-top: 2px;
  }

  /* Pied de page compact, au-dessus de la barre d'onglets */
  .site-footer {
    padding: 22px 0 18px !important;
    margin-bottom: 0;
  }

  .site-footer .boxed-container {
    padding-left: 18px;
    padding-right: 18px;
  }

  .site-footer-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    text-align: center;
  }

  .pied-liens-rapides {
    display: none !important;
  }

  .site-footer-brand {
    justify-content: center;
    font-size: 18px !important;
    margin-bottom: 6px !important;
  }

  .site-footer-contact {
    border-left: 0 !important;
    padding-left: 0 !important;
  }

  .site-footer-contact p {
    font-size: 13px;
  }

  .site-footer-copy {
    margin-top: 16px !important;
    font-size: 12px !important;
  }

  /* Cartes et boutons plus "app" */
  .service-card,
  .step-card,
  .price-card,
  .form-card,
  .contact-card,
  .why-card,
  .included-card,
  .choice-card,
  .booking-card,
  .profile-card,
  .account-overview,
  .empty-bookings {
    border-radius: 20px !important;
  }

  .glass-effect {
    background: #fff !important;
    border: 1px solid #e6edf5 !important;
    border-radius: 22px !important;
    box-shadow: 0 14px 40px rgba(8, 31, 66, 0.1) !important;
    backdrop-filter: none !important;
  }

  input,
  select,
  textarea,
  button {
    touch-action: manipulation;
  }

  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="tel"],
  input[type="date"],
  input[type="time"],
  input[type="number"],
  select,
  textarea {
    min-height: 48px;
    font-size: 16px !important;
    border-radius: 12px;
  }

  button,
  .btn-primary,
  .price-btn,
  .contact-btn,
  .whatsapp-link,
  .account-button--primary {
    min-height: 48px;
    border-radius: 14px !important;
  }

  /* Parcours de réservation : titres et stepper plus denses */
  main.boxed-container.py-12,
  main.boxed-container.py-16 {
    padding-top: 20px !important;
    padding-bottom: 28px !important;
  }

  main.boxed-container h1.text-4xl,
  main.boxed-container h1.text-3xl {
    font-size: 24px !important;
    line-height: 1.2 !important;
    margin-bottom: 18px !important;
    letter-spacing: -0.03em;
  }

  .pac-container {
    z-index: 90;
  }

  .max-w-md.glass-effect,
  .max-w-lg.glass-effect,
  .max-w-2xl.mx-auto.bg-white,
  .max-w-xl.mx-auto {
    padding: 22px 18px !important;
    border-radius: 22px !important;
  }

  .account-button--primary,
  .profile-save,
  .cancel-button {
    min-height: 46px;
  }
}

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  .barre-onglets-application,
  .onglet-application--principal .pictogramme-principal {
    transition: none;
  }
}
