/* =======================
   Lauxane — Boutique (Shop)
   Pagination + Toolbar (résultats/tri)
   ======================= */

/* ---------- Variables globales ---------- */
:root{
  /* Couleurs / tokens */
  --lx-gold: var(--doré-naturel, #a8743b);
  --lx-ivory: #fff;
  --lx-shadow: 0 1px 2px rgba(0,0,0,.04);

  /* Gabarit bannière / page */
  --lh-page-max: 1180px;

  /* Bord externe de la bannière (gauche/droite) */
  --lh-edge-panel: max(0px, calc((100% - var(--lh-page-max)) / 2));

  /* Ajustement fin de l’alignement (négatif = pousse plus à gauche) */
  --lh-align-nudge: -20px;

  /* Pagination (non actifs) */
  --lh-pagi-bg: color-mix(in srgb, var(--champagne, #FBF7F2) 60%, #fff 40%);
  --lh-pagi-text: var(--cta-stroke, var(--gold, #a8743b));
  --lh-pagi-border: color-mix(in srgb, var(--lh-pagi-text) 50%, #E9DFD4);
}

/* =========================================================
   CHARGEMENT PROGRESSIF — Boutique LauXane
   La pagination WooCommerce reste dans le DOM pour fournir
   l'URL de la page suivante, mais elle n'est plus affichée.
   ========================================================= */

.woocommerce nav.woocommerce-pagination{
  display:none !important;
}

.lh-shop-loadmore{
  width:min(100%, 520px);
  margin:clamp(34px, 5vw, 54px) auto clamp(42px, 6vw, 70px);
  padding:0 18px;
  text-align:center;
}

.lh-shop-loadmore__status{
  margin:0 0 12px;
  font-family:var(--body-font, "Spectral", Georgia, serif);
  font-size:.92rem;
  font-weight:400;
  line-height:1.45;
  color:color-mix(in srgb, var(--muted, #68615B) 88%, var(--gold, #9C6B2F) 12%);
}

.lh-shop-loadmore__progress{
  position:relative;
  width:min(100%, 300px);
  height:2px;
  margin:0 auto 18px;
  overflow:hidden;
  border-radius:999px;
  background:color-mix(in srgb, var(--line, #EADFD2) 78%, transparent);
}

.lh-shop-loadmore__progress-bar{
  display:block;
  width:0;
  height:100%;
  border-radius:inherit;
  background:var(--gold, #9C6B2F);
  transition:width .28s ease;
}

.lh-shop-loadmore__button{
  appearance:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  min-width:210px;
  min-height:44px;
  padding:11px 24px;
  border:1px solid rgba(156,107,47,.34);
  border-radius:999px;
  background:rgba(255,253,249,.72);
  color:var(--gold-strong, #805424);
  font-family:var(--ui-font, Inter, system-ui, sans-serif);
  font-size:.88rem;
  font-weight:600;
  line-height:1;
  letter-spacing:.01em;
  text-transform:none;
  cursor:pointer;
  box-shadow:none;
  transition:
    background-color .18s ease,
    border-color .18s ease,
    color .18s ease,
    transform .18s ease;
}

.lh-shop-loadmore__button:hover{
  background:var(--champagne, #FBF7F2);
  border-color:rgba(156,107,47,.54);
  color:var(--gold-strong, #805424);
  transform:translateY(-1px);
}

.lh-shop-loadmore__button:focus-visible{
  outline:2px solid var(--ring, rgba(198,161,91,.28));
  outline-offset:3px;
}

.lh-shop-loadmore__button[disabled]{
  cursor:wait;
  opacity:.62;
  transform:none;
}

.lh-shop-loadmore__arrow{
  display:inline-block;
  font-size:1rem;
  line-height:1;
  transition:transform .18s ease;
}

.lh-shop-loadmore__button:hover .lh-shop-loadmore__arrow{
  transform:translateY(2px);
}

.lh-shop-loadmore.is-complete .lh-shop-loadmore__button{
  display:none;
}

.lh-shop-loadmore.is-complete .lh-shop-loadmore__progress{
  margin-bottom:0;
}

.lh-shop-loadmore.is-complete .lh-shop-loadmore__status{
  color:color-mix(in srgb, var(--muted, #68615B) 78%, var(--gold, #9C6B2F) 22%);
  font-style:italic;
}

.woocommerce ul.products > li.product.lh-product-enter{
  animation:lhProductEnter .32s ease both;
}

@keyframes lhProductEnter{
  from{opacity:0;transform:translateY(8px);}
  to{opacity:1;transform:translateY(0);}
}

@media (prefers-reduced-motion: reduce){
  .lh-shop-loadmore__progress-bar,
  .lh-shop-loadmore__button,
  .woocommerce ul.products > li.product.lh-product-enter{
    transition:none !important;
    animation:none !important;
  }
}

@media (max-width:520px){
  .lh-shop-loadmore{
    margin-top:30px;
    margin-bottom:44px;
    padding-inline:14px;
  }

  .lh-shop-loadmore__status{font-size:.88rem;}

  .lh-shop-loadmore__button{
    min-width:190px;
    min-height:42px;
    padding:10px 20px;
    font-size:.86rem;
  }
}

/* =========================================================
   TOOLBAR (Résultats à gauche / Tri à droite, alignés sur la bannière)
   ========================================================= */

/* Résultats collés au bord GAUCHE de la bannière (+ nudge) */
:is(body.woocommerce.archive,
    body.post-type-archive-product,
    body.tax-product_cat,
    body.tax-product_tag) .woocommerce-result-count{
  float: left !important;
  display: block !important; width: max-content !important;
  margin-left: calc(var(--lh-edge-panel) + var(--lh-align-nudge)) !important;
  margin-right: 0 !important; text-align: left !important;
  line-height: 42px;               /* alignement vertical avec le select */
  color: rgba(0,0,0,.62);
}

/* Tri collé au bord DROIT de la bannière (+ nudge) */
:is(body.woocommerce.archive,
    body.post-type-archive-product,
    body.tax-product_cat,
    body.tax-product_tag) .woocommerce-ordering{
  float: right !important; display: block !important; width: max-content !important;
  margin-right: calc(var(--lh-edge-panel) + var(--lh-align-nudge)) !important;
  margin-left: 0 !important; position: relative;
  border: 0 !important; box-shadow: none !important; background: transparent !important;
  padding: 0 !important;
}

/* Empêche la grille de remonter autour des floats */
:is(body.woocommerce.archive,
    body.post-type-archive-product,
    body.tax-product_cat,
    body.tax-product_tag) ul.products{ clear: both; }

/* ----- Select de tri : capsule + pastille flèche ----- */
:is(body.woocommerce.archive,
    body.post-type-archive-product,
    body.tax-product_cat,
    body.tax-product_tag) .woocommerce-ordering .orderby{
  appearance: none !important; -webkit-appearance: none !important; -moz-appearance: none !important;
  background: #fff !important;
  border: 1px solid color-mix(in srgb, var(--lx-gold) 56%, #E9DFD4) !important;
  border-radius: 999px !important;
  height: 42px !important; line-height: 42px !important;
  padding: 0 56px 0 16px !important;
  font: 600 14px/1 ui-sans-serif, system-ui, Inter, Helvetica, Arial !important;
  color: var(--lx-gold) !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 0 0 1px rgba(255,255,255,.7) inset !important;
  cursor: pointer; background-image: none !important;
}
:is(body.woocommerce.archive,
    body.post-type-archive-product,
    body.tax-product_cat,
    body.tax-product_tag) .woocommerce-ordering .orderby:hover{
  border-color: var(--lx-gold) !important;
}

/* Pastille flèche (cercle) */
:is(body.woocommerce.archive,
    body.post-type-archive-product,
    body.tax-product_cat,
    body.tax-product_tag) .woocommerce-ordering::after{
  content: "";
  position: absolute; top: 50%; right: 10px; transform: translateY(-50%);
  width: 22px; height: 22px; border-radius: 999px; background: #fff;
  border: 1px solid color-mix(in srgb, var(--lx-gold) 56%, #E9DFD4);
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  background-image: url('data:image/svg+xml;utf8,\
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23a8743b" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\
  <path d="M6 9l6 6 6-6"/></svg>');
  background-repeat: no-repeat; background-position: center; background-size: 11px 11px;
  pointer-events: none; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
:is(body.woocommerce.archive,
    body.post-type-archive-product,
    body.tax-product_cat,
    body.tax-product_tag) .woocommerce-ordering:hover::after{
  transform: translateY(calc(-50% - 1px));
  box-shadow: 0 6px 12px rgba(156,107,47,.12);
  border-color: var(--lx-gold);
}

/* ----- Mobile : empilement + compaction ----- */
@media (max-width: 880px){
  :is(body.woocommerce.archive,
      body.post-type-archive-product,
      body.tax-product_cat,
      body.tax-product_tag) .woocommerce-result-count,
  :is(body.woocommerce.archive,
      body.post-type-archive-product,
      body.tax-product_cat,
      body.tax-product_tag) .woocommerce-ordering{
    float: none !important; display: block !important;
    margin-left: clamp(16px, 4vw, 48px) !important;
    margin-right: clamp(16px, 4vw, 48px) !important;
    line-height: normal;
  }
  :is(body.woocommerce.archive,
      body.post-type-archive-product,
      body.tax-product_cat,
      body.tax-product_tag) .woocommerce-ordering .orderby{
    height: 40px !important; line-height: 40px !important;
    padding-right: 48px !important; font-size: 13px !important;
  }
  :is(body.woocommerce.archive,
      body.post-type-archive-product,
      body.tax-product_cat,
      body.tax-product_tag) .woocommerce-ordering::after{
    right: 8px; width: 20px; height: 20px; background-size: 10px 10px;
  }
}

/* =========================================================
   Cas spécifique : wrapper orange “alignement-lauxane”
   (on colle juste le texte à GAUCHE dans son conteneur)
   ========================================================= */
.alignement-lauxane .woocommerce-result-count,
.alignement-lauxane p.woocommerce-result-count[role="alert"]{
  margin-left: 0 !important; margin-right: 0 !important;
  padding-left: 8px !important; text-align: left !important;
  line-height: 42px;
}
.alignement-lauxane .woocommerce-ordering{ margin-left: auto; } /* tri reste à droite */

/* =========================================================
   Finitions
   ========================================================= */
/* Focus visible sur tous les liens de pagination */
.woocommerce nav.woocommerce-pagination a.page-numbers:focus-visible{
  outline: 2px solid color-mix(in srgb, var(--lh-pagi-text) 40%, transparent) !important;
  outline-offset: 3px;
}
