
.product-grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
}
.product-card .card__body { padding: var(--space-4) var(--space-5) var(--space-5); }
.product-card .card__meta { margin-bottom: var(--space-3); }
.product-card__tags { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-2); }
.product-card__price { margin: auto 0 0; padding-top: var(--space-3); border-top: 1px dashed var(--color-border); color: var(--color-text-soft); }
.product-card__price strong { font-family: var(--font-display); font-size: var(--step-1); color: var(--color-text); }
.badge--new { background: var(--color-accent); color: var(--color-text); }

.swatch {
  display: inline-block;
  width: 0.9em; height: 0.9em;
  margin-right: 0.3em;
  vertical-align: -0.1em;
  border-radius: 50%;
  background: var(--swatch, var(--color-border));
  box-shadow: inset 0 0 0 1px rgb(46 38 32 / 0.25);
}

.loading { color: var(--color-text-soft); font-style: italic; }

.catalogue { display: grid; gap: var(--space-6); align-items: start; }
@media (min-width: 60em) {
  .catalogue { grid-template-columns: 16rem 1fr; gap: var(--space-7); }
}

.filters {
  padding: var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}
@media (min-width: 60em) {
  .filters { position: sticky; top: 6rem; }
}
.filters__toggle { display: none; }
.filters__title { font-size: var(--step-1); margin: 0; }
.filters__body { display: grid; gap: var(--space-5); margin-top: var(--space-4); }
.filters fieldset legend { margin-bottom: var(--space-2); font-weight: 700; }
.filters .check { padding: var(--space-1) 0; }
.filters__count { font-size: var(--step--1); color: var(--color-text-soft); }

@media (max-width: 59.99em) {
  .js .filters__toggle {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: 0;
    border: 0;
    background: none;
    font-family: var(--font-display);
    font-size: var(--step-1);
    font-weight: 600;
    text-align: left;
  }
  .js .filters__toggle::after { content: "+"; font-family: var(--font-body); font-size: 1.5rem; line-height: 1; color: var(--color-primary); }
  .js .filters__toggle[aria-expanded="true"]::after { content: "−"; }
  .js .filters__title { display: none; }
  .js .filters__body[hidden] { display: none; }
}

.results-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.results-bar p { margin: 0; font-weight: 700; }
.results-bar .field { display: flex; align-items: center; gap: var(--space-3); }
.results-bar .select { width: auto; min-height: 2.75rem; padding-block: var(--space-2); }

.empty-state {
  padding: var(--space-7) var(--space-5);
  text-align: center;
  border: 1.5px dashed var(--color-border-strong);
  border-radius: var(--radius-lg);
}
.empty-state p { margin-inline: auto; }

.product { display: grid; gap: var(--space-6); align-items: start; }
@media (min-width: 52em) {
  .product { grid-template-columns: 1.05fr 1fr; gap: var(--space-8); }
  .product__media { position: sticky; top: 6rem; }
}
.product__media img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.product__price { margin-bottom: var(--space-5); font-size: var(--step-1); color: var(--color-text-soft); }
.product__price strong { font-family: var(--font-display); font-size: var(--step-3); color: var(--color-text); }

.specs { display: grid; grid-template-columns: auto 1fr; gap: var(--space-2) var(--space-5); margin: var(--space-5) 0; padding: var(--space-4) 0; border-block: 1px dashed var(--color-border); }
.specs dt { font-weight: 700; }
.specs dd { margin: 0; color: var(--color-text-soft); }

.buy-box {
  margin: var(--space-6) 0;
  padding: var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.buy-box__total { margin: var(--space-4) 0; font-size: var(--step-1); }
.buy-box__total strong { font-family: var(--font-display); }
.buy-box__feedback { margin-top: var(--space-4); }
.buy-box__feedback:empty { display: none; }

.qty { display: inline-flex; align-items: center; gap: var(--space-2); }
.qty__btn {
  display: grid;
  place-items: center;
  width: 2.75rem; height: 2.75rem;
  border: 1.5px solid var(--color-border-strong);
  border-radius: 50%;
  background: var(--color-surface);
  font-size: 1.3rem;
  line-height: 1;
  transition: background-color var(--duration-fast) ease, border-color var(--duration-fast) ease;
}
.qty__btn:hover:not([disabled]) { background: var(--color-bg-alt); border-color: var(--color-text); }
.qty__btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.qty__input {
  width: 4.5rem;
  min-height: 2.75rem;
  padding: var(--space-2);
  border: 1.5px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  text-align: center;
  font-weight: 700;
  -moz-appearance: textfield;
  appearance: textfield;
}
.qty__input::-webkit-inner-spin-button, .qty__input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.qty__input:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.qty__unit { font-weight: 700; color: var(--color-text-soft); }
.qty--small .qty__btn { width: 2.5rem; height: 2.5rem; font-size: 1.1rem; }
.qty--small .qty__input { width: 3.75rem; min-height: 2.5rem; }


.cart { display: grid; gap: var(--space-6); align-items: start; }
@media (min-width: 60em) {
  .cart { grid-template-columns: 1fr 22rem; }
  .cart__summary { position: sticky; top: 6rem; }
}
.cart-lines { margin: 0; padding: 0; list-style: none; border-top: 1px dashed var(--color-border-strong); }
.cart-line {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: var(--space-3) var(--space-4);
  padding: var(--space-5) 0;
  border-bottom: 1px dashed var(--color-border-strong);
}
.cart-line__media img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-md); }
.cart-line__name { margin: 0 0 var(--space-1); font-size: var(--step-1); }
.cart-line__name a { color: var(--color-text); text-decoration: none; }
.cart-line__name a:hover { text-decoration: underline; }
.cart-line__meta { margin: 0; font-size: var(--step--1); color: var(--color-text-soft); }
.cart-line__controls {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.cart-line__total { font-family: var(--font-display); font-size: var(--step-1); font-weight: 600; }
.btn-remove {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: 2.75rem;
  padding: 0 var(--space-2);
  border: 0;
  background: none;
  color: var(--color-error);
  font-size: var(--step--1);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.btn-remove:hover { color: var(--color-text); }
@media (min-width: 40em) {
  .cart-line { grid-template-columns: 6.5rem 1fr auto; align-items: center; }
  .cart-line__controls { grid-column: auto; flex-direction: column; align-items: flex-end; }
}

.summary {
  padding: var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.summary h2 { font-size: var(--step-2); }
.summary__row { display: flex; justify-content: space-between; gap: var(--space-4); margin: 0 0 var(--space-3); }
.summary__row--total { margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px dashed var(--color-border-strong); font-size: var(--step-1); font-weight: 700; }
.summary__row--total dd { font-family: var(--font-display); }
.summary dl { margin: 0 0 var(--space-5); }
.summary dd { margin: 0; text-align: right; }
.summary .btn + .btn { margin-top: var(--space-3); }
.summary__note { margin-top: var(--space-4); font-size: var(--step--1); color: var(--color-text-soft); }

.steps { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); margin: 0 0 var(--space-6); padding: 0; list-style: none; counter-reset: etape; font-size: var(--step--1); }
.steps li { display: flex; align-items: center; gap: var(--space-2); color: var(--color-text-soft); counter-increment: etape; }
.steps li::before {
  content: counter(etape);
  display: grid; place-items: center;
  width: 1.75rem; height: 1.75rem;
  border: 1.5px dashed var(--color-border-strong);
  border-radius: 50%;
  font-weight: 700;
}
.steps li[aria-current="step"] { color: var(--color-text); font-weight: 700; }
.steps li[aria-current="step"]::before { border: 0; background: var(--color-primary); color: var(--color-on-primary); }
.steps li.is-done::before { content: "✓"; border-style: solid; border-color: var(--color-secondary); color: var(--color-secondary); }

.recap-list { margin: 0 0 var(--space-5); padding: 0; list-style: none; }
.recap-list li { display: flex; justify-content: space-between; gap: var(--space-4); padding: var(--space-3) 0; border-bottom: 1px dashed var(--color-border); }
.recap-list span { color: var(--color-text-soft); }

.options { display: grid; gap: var(--space-3); }
.option {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1.5px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  cursor: pointer;
  transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
}
.option:hover { border-color: var(--color-text); }
.option:has(input:checked) { border-color: var(--color-primary); box-shadow: 0 0 0 1px var(--color-primary); }
.option input { width: 1.25rem; height: 1.25rem; margin: 0.15rem 0 0; accent-color: var(--color-primary); flex-shrink: 0; }
.option strong { display: block; }
.option small { color: var(--color-text-soft); }
.option__price { margin-left: auto; font-weight: 700; white-space: nowrap; }

.confirmation { max-width: 40rem; margin-inline: auto; text-align: center; }
.confirmation__icon {
  display: grid; place-items: center;
  width: 5rem; height: 5rem;
  margin: 0 auto var(--space-5);
  border: 2px dashed var(--color-accent);
  border-radius: 50%;
  color: var(--color-secondary);
}
.confirmation__icon svg { width: 2.5rem; height: 2.5rem; }
.confirmation p { margin-inline: auto; }
.confirmation .notice { text-align: left; margin-block: var(--space-6); }
.order-number { display: inline-block; padding: var(--space-1) var(--space-3); border-radius: var(--radius-sm); background: var(--color-bg-alt); font-family: ui-monospace, "SF Mono", Menlo, monospace; font-weight: 700; }
.confirmation__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); }
.legend-flush { margin-top: 0; }

.product__media:empty { aspect-ratio: 4 / 3; border-radius: var(--radius-lg); background: var(--color-bg-alt); }
.product[aria-busy="true"] [data-champ]:empty {
  display: block;
  min-height: 1.2em;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--color-bg-alt) 0 40%, var(--linen-50) 50%, var(--color-bg-alt) 60% 100%);
  background-size: 300% 100%;
  animation: shimmer 1.4s linear infinite;
}
.product[aria-busy="true"] [data-champ="description"] { min-height: 6em; }
.product[aria-busy="true"] [data-champ="conseils"] { min-height: 7em; }
.product[aria-busy="true"] .buy-box__total strong { display: inline-block; min-width: 8em; }
@keyframes shimmer { to { background-position: -150% 0; } }
@media (prefers-reduced-motion: reduce) { .product[aria-busy="true"] [data-champ]:empty { animation: none; } }
html:not(.js) .product { display: none; }

[data-panier], [data-commande] { min-height: 28rem; }
[data-resultats]:empty { min-height: 40rem; }
