/* ── OVERFLOW-X SAFETY NET ── */
html { overflow-x: hidden; }

/* ── SKIP LINK ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 9999;
  padding: 10px 18px;
  background: var(--dark-brown, #3A2A1E);
  color: #fff;
  font-family: 'Jost', sans-serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: top 0.15s;
}
.skip-link:focus { top: 0; }

/* ── KEYBOARD NAV DROPDOWNS ── */
.nav-dropdown--open > .dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  transition: opacity 0.2s, transform 0.2s;
}
.nav-dropdown--open > a > .nav-dropdown-arrow {
  transform: rotate(180deg);
}

/* ── LOGO TAGLINE ── */
.logo-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
}
.logo-tagline {
  display: block;
  font-family: 'Jost', sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted, #74665B);
  margin-top: 3px;
  white-space: nowrap;
  line-height: 1;
}
/* ── TICKER : uniformise font-size (certaines pages l'omettent dans le style inline) ── */
.ticker-item { font-size: 11px; letter-spacing: 0.13em; color: #fff; }

/* ── BARRE TAGLINE SOUS LE HEADER (mobile uniquement) ── */
.mobile-brand-tagline { display: none; }

@media (max-width: 768px) {
  .logo-tagline { display: none; }
  .mobile-brand-tagline {
    display: block;
    text-align: center;
    font-family: 'Jost', sans-serif;
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted, #74665B);
    padding: 5px 20px 6px;
    border-bottom: 1px solid var(--border, rgba(107,79,58,0.15));
    background: var(--warm-white, #FAF8F5);
  }
}

/* ── SÉLECTEUR DE LANGUE / LANGUAGE SWITCH ── */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'Jost', sans-serif;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 400;
  white-space: nowrap;
}
.lang-switch > .lang-current {
  color: var(--dark-brown, #3A2A1E);
}
.lang-switch > .lang-sep {
  color: var(--border, rgba(107,79,58,0.15));
  font-size: 10px;
}
.lang-switch > a {
  color: var(--muted, #8A7B6F);
  text-decoration: none;
  transition: color 0.2s;
}
@media (hover: hover) {
  .lang-switch > a:hover {
    color: var(--terracotta, #8B4A3A);
  }
}

.nav-close-btn { display: none; }

/* ── HAMBURGER : masqué sur desktop, visible uniquement en mobile ── */
@media (min-width: 769px) {
  .header-btn[aria-label="Menu"],
  .header-btn[aria-label="Open menu"] { display: none; }
}

/* ── DÉSACTIVER LES EFFETS HOVER SUR APPAREILS TACTILES ── */
/* mobile.css est chargé après le <style> inline → même spécificité, source plus tardive = victoire */
@media (hover: none) {
  /* Dropdown : masqué jusqu'à ce que JS ajoute .nav-dropdown--open
     On utilise :not() pour que l'état ouvert (.nav-dropdown--open > .dropdown-menu)
     ne soit jamais annulé par cette règle (sélecteurs mutuellement exclusifs). */
  .nav-dropdown:not(.nav-dropdown--open) > .dropdown-menu {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(-6px);
  }
  /* Transforms image produit */
  .product-card:hover .product-img img,
  .product-card:hover .product-card-img img { transform: none; }
  .product-card:hover .product-name { transform: none; }
  .product-card:hover .product-overlay { transform: translateY(100%); }
  /* Galerie produit */
  .gallery-main img:hover,
  .gallery-main img.active:hover,
  .gallery-main:hover img.active { transform: none; }
  /* Swatches */
  .color-swatch:hover { transform: none; }
  .swatch:hover { transform: none; }
  /* Upsell */
  .upsell-card:hover .upsell-img img { transform: none; }
  /* Editorial / split */
  .editorial:hover .editorial-media img { transform: none; }
  .split-image:hover img { transform: none; }
}

@media (max-width: 768px) {

  /* ── HAMBURGER : zone tactile ≥44px ── */
  .header-btn[aria-label="Menu"] {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
  }

  /* ── NAVIGATION HAMBURGER ── */
  .site-nav {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--warm-white, #FAF8F5);
    z-index: 9998;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 28px;
    padding: 80px 40px 40px;
    overflow-y: auto;
  }
  .site-nav.nav-open { display: flex; }
  .site-nav a { font-size: 17px; letter-spacing: .12em; }
  .nav-dropdown { position: static; width: 100%; text-align: center; }
  .nav-dropdown > a { justify-content: center; }
  .nav-dropdown-arrow { display: none; }
  .dropdown-menu {
    position: static !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
    min-width: unset;
    text-align: center;
  }
  .dropdown-menu a {
    border-bottom: none !important;
    padding: 8px 0 !important;
    font-size: 13px !important;
    color: var(--muted, #8A7B6F) !important;
  }
  .nav-close-btn {
    display: block;
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: var(--dark-brown, #3A2A1E);
    line-height: 1;
    padding: 8px;
  }

  /* ── COOKIE BANNER ── */
  .cookie-banner,
  #cookie-banner { z-index: 9999 !important; }
  .cookie-banner {
    flex-direction: column !important;
    padding: 20px !important;
    gap: 14px !important;
  }
  .cookie-actions { width: 100%; display: flex; gap: 10px; }

  /* ── GRILLES → 1 COLONNE ── */
  .products-grid,
  .sf-grid,
  .comparatif-grid,
  .footer-grid,
  .upsell-grid { grid-template-columns: 1fr !important; }
  .editorial-inner { grid-template-columns: 1fr !important; }
  .reassurance-inner { grid-template-columns: 1fr !important; }
  .reassurance-item {
    border-right: none !important;
    border-bottom: 1px solid var(--border, rgba(107,79,58,0.15));
    padding: 20px !important;
  }
  .reassurance-item:last-child { border-bottom: none; }
  .comparatif-grid { gap: 1px !important; }

  /* ── GALERIE PRODUIT — miniatures horizontales ── */
  .gallery {
    display: flex !important;
    flex-direction: column !important;
    position: static !important;
    gap: 12px !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  .gallery-thumbs {
    order: 2;
    flex-direction: row !important;
    overflow-x: auto !important;
    gap: 8px !important;
    padding-bottom: 4px;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  .gallery-main { order: 1; width: 100%; max-height: 60vh; }
  .gallery-thumb {
    min-width: 64px !important;
    width: 64px !important;
    flex-shrink: 0 !important;
  }

  /* ── PADDINGS RÉDUITS ── */
  .header-inner { padding: 8px 20px !important; }
  .logo { font-size: 17px !important; }
  .site-nav-wrapper { padding: 0; }
  .collection,
  .savoir-faire,
  .newsletter { padding: 48px 20px !important; }
  .comparatif { padding: 48px 20px !important; }
  .products-section { padding: 32px 20px 60px !important; }
  .page-hero { padding: 40px 20px 32px !important; }
  .filters-bar { padding: 16px 20px !important; }
  .breadcrumb { padding: 14px 20px !important; }
  .product-layout {
    padding: 0 20px 60px !important;
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  .product-info { position: static !important; }
  .site-footer { padding: 48px 20px 28px !important; }
  .footer-grid { gap: 28px !important; }
  .upsell { padding: 48px 20px !important; }
  .editorial-content { padding: 40px 20px !important; }
  .editorial-media { aspect-ratio: 4/3; }
  .editorial-media img { width: 100%; height: 100%; object-fit: cover; }

  /* ── BOUTONS MIN 48px ── */
  .btn-add,
  .btn-wishlist,
  .filter-btn,
  .cookie-btn,
  .cookie-btn-accept,
  .cookie-btn-decline,
  .newsletter-form button { min-height: 48px !important; }
  .size-btn { min-height: 48px !important; padding: 12px 14px !important; }
  .newsletter-form { flex-direction: column !important; }
  .newsletter-form input,
  .newsletter-form button { width: 100%; }

  /* ── DIVERS ── */
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
  .hero-content { left: 20px !important; bottom: 30px !important; }
  .sf-grid { gap: 1px !important; }
  .sf-num { font-size: 32px !important; }
  .page-hero-inner { flex-direction: column; gap: 12px; align-items: flex-start; }

  /* ── VIEWPORT PINCH-TO-ZOOM : éviter les débordements horizontaux ── */
  .site-header { overflow: visible; }
  .dropdown-menu { max-width: calc(100vw - 40px); }
}
