/* ═══════════════════════════════════════════════════════════════════════════
   Tests A/B (inc/ab-tests.php). Rien ne s'applique sans la classe de la version B
   sur <html>, posée par le script de tête de page : la version A est le site actuel.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── BF05 B : haut de catégorie resserré ─────────────────────────────────── */

/* Fil d'Ariane remonté au-dessus du titre (script inline) ; sa bande d'origine disparaît. */
html.uc-ab-bf05-b .shoptimizer-archive .archive-header { display: none; }
html.uc-ab-bf05-b .shoptimizer-category-banner { padding: 12px 0 0; border-bottom: 0; }
html.uc-ab-bf05-b .shoptimizer-category-banner .woocommerce-breadcrumb { padding: 0 0 6px; font-size: 13px; }
html.uc-ab-bf05-b .shoptimizer-category-banner h1 { margin-bottom: 4px; }
/* Texte de catégorie : seule la liste des sous-catégories reste en haut, le reste descend
   dans le cadre du bas (uc-ab.js). Caché dès le premier rendu pour éviter tout décalage. */
html.uc-ab-bf05-b .shoptimizer-category-banner .taxonomy-description > :not(ul) { display: none; }
html.uc-ab-bf05-b .shoptimizer-category-banner .taxonomy-description ul { margin: 8px 0 0; }
html.uc-ab-bf05-b .shoptimizer-category-banner .taxonomy-description li { margin-bottom: 4px; }
html.uc-ab-bf05-b .woocommerce-products-header { margin-bottom: 0 !important; /* marge en ligne du parent */ }

@media (max-width: 767px) {
  html.uc-ab-bf05-b .shoptimizer-sorting:not(.sorting-end) { margin: 8px 0; }
  html.uc-ab-bf05-b .shoptimizer-sorting:not(.sorting-end) .woocommerce-pagination { display: none; }
}
@media (min-width: 768px) {
  html.uc-ab-bf05-b .shoptimizer-category-banner { padding: 20px 0 8px; }
  html.uc-ab-bf05-b .shoptimizer-sorting:not(.sorting-end) { margin-bottom: 16px; }
}

/* ── BF05 B : un seul cadre en bas, replié ───────────────────────────────── */

/* Un seul style de titre (le texte de catégorie avait un H2 maigre en style en ligne). */
html.uc-ab-bf05-b .below-woocommerce-category h2 { font-weight: 600 !important; }
html.uc-ab-bf05-b .below-woocommerce-category h2 strong { font-weight: inherit; }
html.uc-ab-bf05-b .below-woocommerce-category .uc-sep { border: 0; border-top: 1px solid #eee; margin: 24px 0; }
.uc-bloc-cat__contenu { position: relative; }
.uc-bloc-cat.is-ferme .uc-bloc-cat__contenu { max-height: 240px; overflow: hidden; }
.uc-bloc-cat.is-ferme .uc-bloc-cat__contenu::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 90px;
  background: linear-gradient(rgba(255, 255, 255, 0), #fff);
  pointer-events: none;
}
.uc-bloc-cat__plus {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 0;
  border: 0;
  background: none;
  color: #111;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.uc-bloc-cat__plus:focus-visible { outline: 3px solid #1D4FD8; outline-offset: 2px; }

/* ── BF49 B : boutons #3377FF (19 px gras), prix #222 ────────────────────── */

/* 19 px gras = « grand texte » au sens WCAG (≥ 18,66 px gras) : 3:1 suffit, blanc sur
   #3377FF fait 4,02:1. Les !important écrasent ceux du CSS généré par Shoptimizer. */
html.uc-ab-bf49-b .single_add_to_cart_button,
html.uc-ab-bf49-b .button.alt {
  background-color: #3377FF !important;
  border-color: #3377FF !important;
}
html.uc-ab-bf49-b .single_add_to_cart_button:hover,
html.uc-ab-bf49-b .button.alt:hover {
  background-color: #2970FF !important;
  border-color: #2970FF !important;
}
html.uc-ab-bf49-b .uc-satc { --uc-satc-brand: #3377FF; --uc-satc-brand-hover: #2970FF; }
html.uc-ab-bf49-b .single_add_to_cart_button,
html.uc-ab-bf49-b .uc-satc__button {
  font-size: 19px !important;
  font-weight: 700 !important;
}
html.uc-ab-bf49-b p.price,
html.uc-ab-bf49-b p.price .amount,
html.uc-ab-bf49-b .price ins,
html.uc-ab-bf49-b .price ins .amount,
html.uc-ab-bf49-b .uc-satc__price { color: #222 !important; }
