/* A-941 : navigation mobile commune (épicerie et La Cave). Barre du bas : géométrie de chaque site (tabbar.css, cave.css),
   ici l'onglet « Rayons » (bouton), l'accent doré de « Coffrets » et l'état actif lisible sans la couleur. Menu plein écran. */

/* Onglet « Rayons » : un bouton habillé comme les liens de la barre */
.nm-bar button.nm-tab { appearance: none; -webkit-appearance: none; border: 0; background: none; margin: 0; font-family: inherit; line-height: inherit; cursor: pointer; }
.of-tabbar.nm-bar button.of-tab.is-active, .of-tabbar.nm-bar button.of-tab.is-open { background: var(--of-olive, #4f5d2f); color: #fff; }
.nm-bar .nm-tab { -webkit-tap-highlight-color: transparent; }

/* Épicerie (barre olive foncé en pilule) */
.of-tabbar.nm-bar .of-tab { min-width: 0; }
.of-tabbar.nm-bar .of-tab-label { white-space: nowrap; }
.of-tabbar.nm-bar .nm-tab--accent .of-tab-icon { width: 36px; height: 36px; margin-top: -2px; border-radius: 50%; align-items: center; justify-content: center; background: var(--of-ocre, #e2a54a); color: var(--of-text, #26301a); }
.of-tabbar.nm-bar .nm-tab--accent { color: #f3d9a6; }
.of-tabbar.nm-bar .nm-tab--accent.is-active { background: transparent; color: #fff; }
.of-tabbar.nm-bar .nm-tab--accent.is-active .of-tab-icon { box-shadow: 0 0 0 2px #fff; }
.of-tabbar.nm-bar .of-tab.is-active .of-tab-label { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }
.of-tabbar.nm-bar .of-tab-badge[hidden] { display: none; }

/* La Cave (barre claire pleine largeur) */
.cv-tabbar.nm-bar .cv-tab { min-width: 0; }
.cv-tabbar.nm-bar .cv-tab > span:not(.cv-tab-badge):not(.nm-ico) { white-space: nowrap; }
.cv-tabbar.nm-bar .nm-ico { display: flex; }
.cv-tabbar.nm-bar .cv-tab.is-on::before { content: ""; position: absolute; top: -8px; left: 50%; width: 28px; height: 3px; margin-left: -14px; border-radius: 0 0 3px 3px; background: currentColor; }
.cv-tabbar.nm-bar .cv-tab.is-on { font-weight: 700; }
.cv-tabbar.nm-bar .nm-tab--accent { color: #8A6A1F; }
.cv-tabbar.nm-bar .nm-tab--accent .nm-ico { width: 38px; height: 38px; margin-top: -6px; border-radius: 50%; align-items: center; justify-content: center; background: #C9A65E; color: #3E0F1B; box-shadow: 0 4px 10px rgba(62, 15, 27, .18); }
.cv-tabbar.nm-bar .nm-tab--accent .nm-ico svg { width: 22px; height: 22px; }
.cv-tabbar.nm-bar .nm-tab--accent.is-on::before { top: -8px; }
/* Le panier est dans la barre du bas : pas de doublon dans l'en-tête mobile (il reste sur ordinateur). */
@media (max-width: 899px) { body.cv-has-tabbar .cv-topbar .cv-cartbtn { display: none; } }

/* Menu plein écran */
.nm-menu[hidden] { display: none; }
.nm-menu { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; background: #FBF8F1; color: #26301A; font-family: inherit; }
.nm-menu--cave { background: #FBF6F0; color: #2B1A1D; }
.nm-menu-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(10px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); border-bottom: 1px solid rgba(38, 48, 26, .12); }
.nm-menu-title { margin: 0; font-size: 1.125rem; font-weight: 700; }
.nm-close { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(38, 48, 26, .08); color: inherit; cursor: pointer; }
.nm-menu-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 12px max(16px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.nm-search { position: relative; display: flex; align-items: center; margin-bottom: 8px; }
.nm-search svg { position: absolute; left: 14px; color: #7B8270; pointer-events: none; }
.nm-search input { width: 100%; min-height: 48px; padding: 0 14px 0 42px; border: 1px solid rgba(38, 48, 26, .18); border-radius: 14px; background: #fff; font: inherit; font-size: 16px; color: inherit; }
.nm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nm-list, .nm-sub { list-style: none; margin: 0; padding: 0; }
.nm-list > li { border-bottom: 1px solid rgba(38, 48, 26, .1); }
.nm-sec-btn { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 52px; padding: 0 4px; border: 0; background: none; font: inherit; font-size: 1.0625rem; font-weight: 700; color: inherit; text-align: left; cursor: pointer; }
.nm-chev { flex: none; transition: transform .2s; }
.nm-sec-btn[aria-expanded="true"] .nm-chev { transform: rotate(180deg); }
.nm-sub { padding: 0 0 10px; }
.nm-link { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px; color: inherit; text-decoration: none; font-size: 1rem; }
.nm-link:hover, .nm-link:focus-visible { background: rgba(38, 48, 26, .06); }
.nm-link--top { min-height: 52px; padding: 0 4px; font-weight: 700; font-size: 1.0625rem; }
.nm-link--gift { margin: 2px 0 6px; padding: 0 14px; background: #E2A54A; color: #26301A; font-weight: 700; }
.nm-menu--cave .nm-link--gift { background: #C9A65E; color: #3E0F1B; }
.nm-link--gift:hover, .nm-link--gift:focus-visible { background: #D9973A; }
.nm-menu :focus-visible { outline: 2px solid #4F5D2F; outline-offset: 2px; }
.nm-menu--cave :focus-visible { outline-color: #8E3445; }
@media (prefers-reduced-motion: reduce) { .nm-chev { transition: none; } }
/* Page arrière bloquée pendant l'ouverture (position restaurée à la fermeture par nav-mobile.js) */
html.nm-lock, html.nm-lock body { overflow: hidden; }

/* Fiche produit (épicerie) : la barre du bas reste (Coffrets en 1 clic) ; la barre d'achat se pose juste au-dessus, sans chevauchement. */
@media (max-width: 1023px) {
  .of-product .of-tabbar.nm-bar { display: flex; }
  .of-product .of-sticky { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); left: 12px; right: 12px; padding-bottom: 12px; border: 1px solid var(--of-line, #e4e0d2); border-radius: 18px; }
  .of-product.shop-body--app { padding-bottom: calc(170px + env(safe-area-inset-bottom, 0px)); }
}

/* Fiche vin (La Cave) : barre d'achat posée sur la barre du bas, sans chevauchement. */
@media (max-width: 899px) {
  body.cv-page-wine.cv-has-tabbar .cv-buybar { bottom: calc(var(--cv-tabbar-h, 64px) + var(--cv-safe-b, 0px)); padding-bottom: 12px; border-bottom: 1px solid var(--cv-line); }
  body.cv-page-wine.cv-has-tabbar .cv-w2-buy { padding-bottom: 0; }
  body.cv-page-wine.cv-has-tabbar .cv-footer { padding-bottom: 170px; }
  body.cv-page-wine.cv-has-tabbar .cv-toast { bottom: calc(var(--cv-tabbar-h, 64px) + 150px + var(--cv-safe-b, 0px)); }
}
