/* ============================================
 * Accessibility & UX fixes — heleneriu.fr
 * Centralized overrides (audit WCAG 2.2 AA + UX 2026-05-02)
 * ============================================ */

/* WCAG 1.4.3 — Contraste : remplacer #8B7355 (3.8:1) par #6B5535 (4.5:1+) */
:root {
  --color-accent-text: #6B5535;
  --color-accent-text-on-light: #6B5535;
}

/* WCAG 2.4.7 — Focus visible : restaurer outline sur les champs de recherche */
.search-field:focus,
.mobile-search-field:focus,
input.search-field:focus-visible,
input.mobile-search-field:focus-visible {
  outline: 2px solid #6B5535 !important;
  outline-offset: 2px !important;
}

/* WCAG 2.5.5 — Cibles tactiles 44x44 minimum sur mobile */
@media (max-width: 768px) {
  .stitch-actions a,
  .stitch-actions button,
  .connexion-link,
  .breadcrumb a,
  .breadcrumb-item a,
  header nav a,
  .mobile-nav a {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  /* Touchspin +/- buttons */
  .btn-touchspin,
  .bootstrap-touchspin-up,
  .bootstrap-touchspin-down {
    min-width: 44px !important;
    min-height: 44px !important;
  }
}

/* UX — Trust bar mobile : convertir grille verticale en scroll horizontal compact */
@media (max-width: 768px) {
  .trust-bar,
  .trust-bar-content,
  .trust-signals {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    gap: 16px !important;
    max-height: 44px !important;
    padding: 6px 12px !important;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .trust-bar::-webkit-scrollbar,
  .trust-bar-content::-webkit-scrollbar,
  .trust-signals::-webkit-scrollbar { display: none; }

  .trust-bar > *,
  .trust-bar-content > *,
  .trust-signals > * {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 0.85rem;
  }
}

/* UX — Pinch-to-zoom natif sur photos produit mobile */
@media (max-width: 768px) {
  .product-cover img,
  .product-images img,
  .js-qv-product-cover {
    touch-action: pinch-zoom !important;
    max-width: 100% !important;
    height: auto;
  }
}

/* UX — Newsletter popup : delay via animation pour ne pas bloquer le 1er scroll */
.newsletter-popup,
.popup-newsletter,
[data-popup="newsletter"] {
  animation: heleneNewsletterReveal 0s 30s forwards;
  opacity: 0;
  pointer-events: none;
}
.newsletter-popup.user-triggered { opacity: 1; pointer-events: auto; animation: none; }
@keyframes heleneNewsletterReveal {
  to { opacity: 1; pointer-events: auto; }
}

/* ===== Bloc éditorial catégorie — LLM/GSO crawlers — 2026-05-02 ===== */
.category-editorial {
  max-width: 900px;
  margin: 3rem auto;
  padding: 2rem 2rem 1.5rem;
  background: #FAF8F4;
  border-radius: 8px;
  border-left: 4px solid #c9a96e;
}
.category-editorial h2 {
  color: #6B5535;
  font-size: 1.35rem;
  margin-bottom: 1rem;
  margin-top: 0;
}
.category-editorial-content {
  color: #444;
  line-height: 1.75;
  font-size: 0.97rem;
}
.category-editorial-content p:last-child { margin-bottom: 0; }
.category-editorial--fallback { border-left-color: #d9c9b0; }
@media (max-width: 767px) {
  .category-editorial { margin: 2rem 1rem; padding: 1.25rem; }
}
