/**
 * Ticket CAT-CRO — Leaf head « Parcourir par section » : carte blanche unifiée (Option A)
 * Scope strict : body.category uniquement (AGENTS.md §5).
 * Desktop only : le bloc reste display:none en <768px (double verrou tpl d-none md:block).
 * Override pills + nav legacy sans toucher category.css (specificité body.category > legacy).
 */

/* ============================================================
   BASE — gap pills (valable desktop ; bloc masqué en mobile)
   ============================================================ */
body.category .category-leaf-anchors__container {
  gap: 10px;
}

/* ============================================================
   MOBILE (<768px) — Option A NON affichée. Verrou principal.
   ============================================================ */
@media (max-width: 767px) {
  body.category .category-leaf-head {
    display: none !important;
  }
}

/* ============================================================
   DESKTOP (>=768px) — Carte blanche unifiée (Option A)
   ============================================================ */
@media (min-width: 768px) {
  /* La carte : conteneur unifié titre + pills */
  body.category .category-leaf-head {
    background: var(--surface-light);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    padding: 20px;
    margin-top: 20px;
    margin-bottom: 20px;
  }

  /* Titre interne — scopé carte, ne touche pas les autres .subcat-lead */
  body.category .category-leaf-head .subcat-lead {
    margin: 0 0 14px;
  }

  /* Neutralisation legacy category.css : nav transparente dans la carte */
  body.category .category-leaf-anchors {
    background: transparent;
    padding-top: 0;
  }

  /* Pills — style conservé (legacy border/radius gardés) */
  body.category .category-leaf-anchors__item {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 16px;
    margin-right: 0;
    margin-top: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0.03em;
    text-align: center;
    text-transform: none;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  }

  body.category .category-leaf-anchors__item:hover {
    background: var(--prozon-black-color);
    color: #fff;
    border-color: var(--prozon-black-color);
  }

  body.category .category-leaf-anchors__item:focus-visible {
    outline: 2px solid var(--prozon-accent-color);
    outline-offset: 2px;
  }

  body.category .category-leaf-anchors__item:active {
    background: var(--prozon-black-color);
    color: var(--prozon-accent-color);
    border-color: var(--prozon-black-color);
  }
}
