/* Mobile UX — scroll horizontal, barre bas, sans sticky */

@media (max-width: 680px) {
  body:has(.bottom-quick-nav) {
    padding-bottom: calc(98px + env(safe-area-inset-bottom));
  }

  /* ── Dock mobile flottant (bulle crème, icônes + labels) ── */
  .bottom-quick-nav {
    display: flex;
    justify-content: center;
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: var(--z-fab);
    width: 100%;
    max-width: 100%;
    padding: 0 14px;
    background: transparent;
    border: 0;
    box-shadow: none;
    pointer-events: none;
    transition: opacity 0.28s ease, transform 0.28s ease;
  }
  body.menu-open .bottom-quick-nav,
  body.cart-open .bottom-quick-nav {
    opacity: 0;
    transform: translateY(110%);
    pointer-events: none;
  }
  .bottom-nav-bubble {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 2px;
    width: min(100%, 420px);
    padding: 8px 10px;
    border-radius: 28px;
    background: color-mix(in srgb, var(--surface) 92%, #fff);
    border: 1px solid rgba(183, 138, 66, 0.24);
    box-shadow:
      0 20px 54px rgba(82, 60, 40, 0.18),
      0 6px 18px rgba(82, 60, 40, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    pointer-events: auto;
  }
  .bottom-nav-item {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 58px;
    padding: 6px 4px;
    border: 0;
    border-radius: 18px;
    background: transparent;
    color: var(--muted);
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  }
  .bottom-nav-icon {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    color: var(--mocha);
    transition: color 0.2s ease, transform 0.2s ease;
  }
  .bottom-nav-icon svg {
    width: 21px;
    height: 21px;
  }
  .bottom-nav-label {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
    color: var(--muted);
    transition: color 0.2s ease;
  }
  .bottom-nav-item.is-active {
    background: rgba(183, 138, 66, 0.1);
  }
  .bottom-nav-item.is-active .bottom-nav-icon,
  .bottom-nav-item.is-active .bottom-nav-label {
    color: var(--gold);
  }
  .bottom-nav-item:active {
    transform: scale(0.97);
  }
  .bottom-nav-cart .bottom-nav-icon {
    color: var(--gold);
  }
  .bottom-nav-cart .bottom-nav-label {
    color: var(--gold);
  }
  .bottom-nav-cart .cart-count {
    position: absolute;
    top: 2px;
    right: calc(50% - 22px);
    display: inline-grid;
    place-items: center;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--gold);
    color: #1b1510;
    font-size: 9px;
    font-weight: 900;
    line-height: 1;
    border: 2px solid var(--surface);
  }

  .header-marquee {
    padding: 8px 0;
  }
  .marquee-item {
    font-size: 10px;
    padding: 7px 14px;
  }

  /* ── Scroll horizontal produits / catégories ── */
  .products,
  .category-strip {
    display: flex;
    overflow-x: auto;
    gap: 14px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-inline: -12px;
    padding-inline: 12px;
    padding-bottom: 10px;
  }
  .products::-webkit-scrollbar,
  .category-strip::-webkit-scrollbar,
  .collection-grid::-webkit-scrollbar,
  .subcats::-webkit-scrollbar { display: none; }

  .products .product-card {
    flex: 0 0 min(78vw, 290px);
    scroll-snap-align: start;
    overflow: hidden;
  }
  .product-card .p-img--product img {
    transform: scale(1.05);
  }
  .product-card:hover .p-img img {
    transform: scale(1.1);
  }
  .products .product-card .p-body h3,
  .products .product-card .p-body p { min-height: auto; }

  .category-strip .cat-card {
    flex: 0 0 min(72vw, 270px);
    min-height: 210px;
    scroll-snap-align: start;
  }

  .subcats {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 6px;
  }
  .subcats .subcat {
    flex: 0 0 auto;
    scroll-snap-align: start;
    white-space: nowrap;
    padding: 11px 18px;
  }

  .collection-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    margin-inline: -12px;
    padding-inline: 12px;
    padding-bottom: 10px;
    margin-bottom: 20px;
  }
  .collection-tile {
    flex: 0 0 132px;
    scroll-snap-align: start;
    min-height: 88px;
    padding: 14px;
  }
  .collection-tile strong { font-size: 15px; }

  /* ── Hero compact ── */
  .hero-visual { min-height: 420px !important; }
  .visual-main { height: 300px !important; border-radius: 28px; }
  .product-float {
    width: 72% !important;
    bottom: 100px !important;
    border-radius: 24px;
    padding: 14px;
  }
  .product-float img { height: 120px !important; }
  .product-float h3 { font-size: 18px; margin-top: 8px; }
  .mini-stat {
    width: 58% !important;
    right: 0 !important;
    bottom: 0 !important;
    padding: 14px;
    border-radius: 22px;
  }
  .mini-stat strong { font-size: 32px; }

  .section { padding: 36px 0; }
  .page-hero { padding: 24px 0 16px; }
  .page-hero.compact { padding: 20px 0 12px; }
  .soft-panel { padding: 15px; border-radius: 26px; }
  .moment-large { min-height: 280px; border-radius: 26px; }
  .moment-copy { left: 18px; right: 18px; bottom: 18px; }
  .moment-copy h3 { font-size: 26px; }

  .pdp-grid { gap: 20px; }
  .pdp-sticky-block { position: static; top: auto; }
  .pdp-buybox { padding: 18px; border-radius: 24px; }
  .pdp-gallery--lifestyle {
    aspect-ratio: 1 / 1;
    min-height: 0;
    padding: 0;
    overflow: hidden;
  }
  .pdp-gallery--lifestyle img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    object-position: center center;
  }
  .pdp-gallery {
    min-height: 280px;
    padding: 16px;
    border-radius: 24px;
    background: #efe6df;
  }
  .pdp-gallery img { max-height: 240px; }
  .pdp-info h1 { font-size: clamp(28px, 7vw, 40px); }
  .pdp-price { font-size: 24px; margin: 10px 0; }
  .pdp-trust { font-size: 12px; gap: 6px; }
  .migration-tag { display: none; }

  .finder { padding: 15px; border-radius: 26px; }
  .finder h2 { font-size: 32px; }
  .newsletter { padding: 22px; }
  .newsletter h2 { font-size: 30px; }
}

@media (min-width: 681px) {
  .bottom-quick-nav { display: none !important; }
}

/* ── Menu mobile drawer ── */
@media (max-width: 1040px) {
  .mobile-nav {
    position: fixed;
    inset: 0;
    z-index: var(--z-mobile-menu);
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    visibility: hidden;
    pointer-events: none;
  }
  .mobile-nav.open {
    visibility: visible;
    pointer-events: auto;
  }
  .mobile-nav-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    margin: 0;
    background: rgba(20, 14, 10, 0.52);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.32s ease;
  }
  .mobile-nav.open .mobile-nav-backdrop {
    opacity: 1;
  }
  .mobile-nav-panel {
    position: relative;
    z-index: 1;
    width: min(360px, 92vw);
    max-width: 100%;
    background: var(--surface);
    border-left: 1px solid var(--line);
    box-shadow: -24px 0 80px rgba(25, 18, 12, 0.22);
    display: flex;
    flex-direction: column;
    transform: translateX(104%);
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
    padding-bottom: max(18px, env(safe-area-inset-bottom));
  }
  .mobile-nav.open .mobile-nav-panel {
    transform: translateX(0);
  }
  .mobile-nav-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 18px 16px 14px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--surface) 88%, var(--bg)));
  }
  .mobile-nav-head-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }
  .mobile-theme-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--bg) 88%, var(--surface));
    border: 1px solid var(--line);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  }
  .mobile-theme-btn {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  }
  .mobile-theme-btn svg {
    width: 18px;
    height: 18px;
  }
  .mobile-theme-btn.is-active {
    background: var(--surface);
    color: var(--gold);
    box-shadow: 0 6px 18px rgba(82, 60, 40, 0.12);
  }
  .mobile-theme-btn:active {
    transform: scale(0.96);
  }
  .mobile-nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    text-decoration: none;
    color: inherit;
  }
  .mobile-nav-brand .brand-logo-wrap,
  .mobile-nav-brand .brand-logo {
    height: 40px;
  }
  .mobile-nav-brand strong {
    display: block;
    font-family: Fraunces, serif;
    font-size: 18px;
    line-height: 1.1;
  }
  .mobile-nav-brand small {
    display: block;
    font-size: 11px;
    color: var(--muted);
    font-weight: 700;
    margin-top: 2px;
  }
  .mobile-nav-close {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--ink);
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 18px;
    font-weight: 900;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(74, 54, 37, 0.1);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  }
  .mobile-nav-close:active {
    transform: scale(0.96);
  }
  .mobile-nav-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px 14px 8px;
    -webkit-overflow-scrolling: touch;
  }
  .mobile-nav-group + .mobile-nav-group {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
  }
  .mobile-nav-label {
    display: block;
    padding: 8px 10px 6px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .mobile-nav-link {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px 12px;
    border-radius: 18px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s ease, transform 0.2s ease;
  }
  .mobile-nav-link span {
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
  }
  .mobile-nav-link small {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    line-height: 1.35;
  }
  .mobile-nav-link:active,
  .mobile-nav-link:hover {
    background: rgba(183, 138, 66, 0.1);
  }
  .mobile-nav-foot {
    display: grid;
    gap: 10px;
    padding: 14px 18px 0;
    border-top: 1px solid var(--line);
    background: var(--bg);
  }
  .mobile-nav-foot .btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }
  .mobile-nav-cart-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .mobile-nav-cart-btn .cart-count {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(255, 248, 237, 0.2);
    font-size: 11px;
    font-weight: 900;
  }
}