/*
 * Laurany Apps — ajustements mobiles du site vitrine (1.6.5).
 *
 * Chargé sur toutes les pages publiques. Ne touche qu'aux petits écrans :
 * l'affichage ordinateur reste celui du thème.
 */

/* Icône et texte des boutons ne se collent plus. */
.lv2-button { gap: 8px; }

@media (max-width: 760px) {

  /* ----------------------------------------------------- Accueil : héro */

  .lv2-hero-overlay-card {
    padding-left: 22px !important;
    padding-right: 22px !important;
  }

  .lv2-hero .lv2-button {
    width: 100%;
    justify-content: center;
    white-space: nowrap;
    font-size: 13.5px !important;
    letter-spacing: .04em !important;
    padding: 15px 18px !important;
  }

  /* Note Google + années d'expérience : sur deux lignes si besoin, jamais coupés. */
  .lv2-hero-trust-strip {
    flex-wrap: wrap !important;
    justify-content: center;
    row-gap: 8px !important;
    overflow: visible !important;
  }

  /* Liens « Voir toutes les prestations », « Voir la boutique » : une seule ligne. */
  .lv2-section-link {
    white-space: nowrap;
    font-size: 12px !important;
    padding: 12px 16px !important;
    gap: 10px !important;
  }
  .lv2-section-link span { max-width: none !important; white-space: nowrap !important; }
  .lv2-section-link svg { width: 18px !important; height: 18px !important; }

  /* ---------------------------- Accueil : prestations en carrousel glissé */

  .lv2-services-grid,
  .lv2-products-grid {
    display: grid !important;
    grid-auto-flow: column !important;
    grid-template-columns: none !important;
    grid-auto-columns: 84% !important;
    gap: 12px !important;
    overflow-x: auto !important;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 2px;
    padding: 2px 2px 14px !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .lv2-services-grid::-webkit-scrollbar,
  .lv2-products-grid::-webkit-scrollbar { display: none; }

  .lv2-services-grid > *,
  .lv2-products-grid > * {
    scroll-snap-align: start;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: none !important;
  }

  .lv2-products-slider { overflow: visible !important; }

  /* Boutique : un seul bouton suffit sur mobile. */
  .lv2-shop-rail-head { display: none !important; }

  /* ------------------------------------------------------ Pied de page */

  .lv2-footer-links ul,
  .lv2-footer nav ul {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
  }

  /* ---------------------------------------------- Espace client / pro */

  /* Le menu occupait tout le premier écran : il devient une rangée de
     pastilles qui défile, et le contenu arrive tout de suite. */
  .lv2-dashboard {
    display: flex !important;
    flex-direction: column !important;
  }
  .lv2-dashboard-sidebar { display: contents !important; }
  .lv2-dashboard-brand { display: none !important; }

  .lv2-dashboard-menu {
    order: 1;
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    overflow-x: auto;
    padding: 12px 16px !important;
    margin: 0 !important;
    background: #111111;
    border-bottom: 1px solid rgba(232, 199, 102, .18);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .lv2-dashboard-menu::-webkit-scrollbar { display: none; }
  .lv2-dashboard-menu .lv2-dashboard-nav-heading { display: none !important; }
  .lv2-dashboard-menu > a {
    flex: 0 0 auto !important;
    width: auto !important;
    min-height: 0 !important;
    padding: 9px 14px !important;
    border: 1px solid rgba(255, 255, 255, .14) !important;
    border-radius: 999px !important;
    font-size: 13.5px !important;
    white-space: nowrap !important;
  }
  .lv2-dashboard-menu > a::before { display: none !important; }
  .lv2-dashboard-menu > a.is-active {
    border-color: #D89B43 !important;
    background: rgba(216, 155, 67, .18) !important;
  }
  .lv2-dashboard-menu > a svg { width: 16px !important; height: 16px !important; }

  .lv2-dashboard-main { order: 2; }

  /* Chiffres clés : deux par ligne au lieu d'une longue colonne. */
  .lv2-dashboard-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
  .lv2-dashboard-stat-card {
    grid-template-columns: minmax(0, 1fr) !important;
    align-content: start;
    gap: 8px !important;
    padding: 14px !important;
    min-height: 0 !important;
  }
  .lv2-dashboard-stat-card > :first-child { width: 38px !important; height: 38px !important; border-radius: 12px !important; }
  .lv2-dashboard-stat-card strong { font-size: 24px !important; line-height: 1.1 !important; }
  .lv2-dashboard-stat-card small { font-size: 12px !important; }
  .lv2-dashboard-stat-card a { font-size: 12.5px !important; }
  .lv2-dashboard-main h2 { font-size: clamp(24px, 7vw, 30px) !important; line-height: 1.15 !important; }
  .lv2-dashboard-main h3 { font-size: 21px !important; line-height: 1.2 !important; }
  .lv2-dashboard-promo-card { order: 3; margin: 8px 16px 0 !important; }
  .lv2-dashboard-logout { order: 4; margin: 8px 16px 24px !important; }
}

@media (max-width: 380px) {
  .lv2-services-grid,
  .lv2-products-grid { grid-auto-columns: 88% !important; }
}

/* --------------------------------------- Bouton « Revenir en haut » (1.6.6) */

.lpwa-totop {
  position: fixed;
  right: 18px;
  bottom: 22px;
  z-index: 9990;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid #EEE3D3;
  border-radius: 50%;
  background: rgba(255, 255, 255, .96);
  color: #B8862E;
  box-shadow: 0 10px 26px rgba(17, 17, 17, .14);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(.9);
  transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s, background-color .2s ease, color .2s ease;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.lpwa-totop svg { width: 20px; height: 20px; }
.lpwa-totop.is-on {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .25s ease, transform .25s ease, visibility 0s, background-color .2s ease, color .2s ease;
}
.lpwa-totop:hover { background: #111111; color: #E8C766; border-color: #111111; }
.lpwa-totop:focus-visible { outline: 3px solid rgba(201, 162, 39, .45); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .lpwa-totop { transition: none; transform: none; }
}

@media print {
  .lpwa-totop { display: none !important; }
}
