/* Composant : boutique (catalogue, bandeau défilant, filtres), champs communs, panier, commande.
   Utilise les variables de style.css (couleurs, polices, biseau). Angles vifs, aucun arrondi, focus visible,
   animations limitées à transform et opacity et coupées si le visiteur demande moins d'animations.
   La fiche d'un article (produit.html) a sa propre feuille : css/produit.css. */

/* ===== Bandeau défilant « Nouveautés » (haut de la boutique) =====
   Sans JavaScript ou avec « moins d'animations » : le texte est fixe et centré. Avec JavaScript (classe is-anime, posée par shop.js) :
   deux groupes identiques côte à côte qui glissent de 0 à -50 % en boucle ; shop.js règle --duree pour une vitesse constante. */
.bandeau-zone { display: flex; align-items: center; background: var(--yellow); color: var(--on-yellow); }
.bandeau-zone[hidden] { display: none; }
.bandeau { position: relative; display: block; flex: 1 1 auto; min-width: 0; overflow: hidden; background: var(--yellow); color: var(--on-yellow); text-decoration: none; }
.bandeau__piste { display: flex; justify-content: center; }
.bandeau__groupe { display: flex; flex: 0 1 auto; justify-content: center; min-width: 0; }
.bandeau__unite { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 16px; font: 700 1.25rem/1.1 var(--font-title); letter-spacing: .06em; text-align: center; text-transform: uppercase; }
.bandeau__ico { flex: none; font-size: 1.15em; }
.bandeau.is-anime .bandeau__piste { width: max-content; justify-content: flex-start; will-change: transform; animation: bandeau-defile var(--duree, 40s) linear infinite; }
.bandeau.is-anime .bandeau__groupe { flex: none; }
.bandeau.is-anime .bandeau__unite { padding: 0 36px 0 0; white-space: nowrap; }
@keyframes bandeau-defile { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.bandeau:focus-visible { outline: 3px solid var(--navy); outline-offset: -6px; }
.bandeau:focus-visible .bandeau__piste { animation-play-state: paused; }
.bandeau:focus-visible .bandeau__txt, .bandeau:hover .bandeau__txt { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .2em; }
@media (hover: hover) { .bandeau:hover .bandeau__piste { animation-play-state: paused; } }
@media (prefers-reduced-motion: reduce) {
  .bandeau.is-anime .bandeau__piste { width: auto; justify-content: center; will-change: auto; animation: none; transform: none; }
  .bandeau.is-anime .bandeau__groupe { flex: 0 1 auto; }
  .bandeau.is-anime .bandeau__unite { padding: 8px 16px; white-space: normal; }
  .bandeau__groupe + .bandeau__groupe, .bandeau__unite + .bandeau__unite { display: none; }
}

/* ===== Barre des catégories : défilement horizontal sur petit écran, bords estompés s'il reste des onglets hors de vue ===== */
.subnav .wrap { width: 100%; max-width: calc(var(--wrap) + 32px); padding-inline: 16px; }
.subnav ul {
  --fade-g: 0px; --fade-d: 0px;
  margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; overscroll-behavior-x: contain;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--fade-g), #000 calc(100% - var(--fade-d)), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 var(--fade-g), #000 calc(100% - var(--fade-d)), transparent 100%);
}
.subnav[data-bord-g] ul { --fade-g: 32px; }
.subnav[data-bord-d] ul { --fade-d: 32px; }
.subnav button[aria-pressed="true"] { background: var(--navy); border-bottom-color: var(--yellow); color: var(--bg); }
.subnav button:focus-visible { outline: 3px solid var(--navy); outline-offset: -6px; }
.subnav button[aria-pressed="true"]:focus-visible { outline-color: var(--yellow); }

/* ===== Catalogue : titre de la liste, note, grille ===== */
.shop-section { padding-top: clamp(32px, 5vw, 48px); }
.shop-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 20px; margin-bottom: 14px; scroll-margin-top: 56px; }
.shop-head h2 { font-size: clamp(2rem, 4.2vw, 2.75rem); }
.shop-head h2::before { content: ""; display: inline-block; width: 10px; height: .7em; margin: 0 14px 0 5px; background: var(--yellow); transform: skewX(-17deg); }
.shop-head h2:focus { outline: none; }
.shop-head__nb { margin: 0; color: var(--muted); font-weight: 600; }
.shopnote { max-width: 70ch; margin: 0 0 36px; }
.prod-grid { gap: 40px 16px; }
@media (min-width: 760px) { .prod-grid { gap: 52px 24px; } }
.prod-grid__vide { grid-column: 1 / -1; }
.empty .textlink { margin-top: 12px; padding: 0; border: 0; background: none; cursor: pointer; }

/* ===== Catalogue : carte d'un article (toute la carte est le lien vers produit.html?id=…) ===== */
.prod { position: relative; padding-bottom: 18px; border-bottom: 2px solid var(--line); }
.prod::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 4px; background: var(--yellow); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); pointer-events: none; }
.prod:hover::after { transform: scaleX(1); }
.prod:has(.prod__lien:focus-visible)::after { transform: scaleX(1); }
.prod__img img { width: 100%; height: 100%; object-fit: cover; }
/* Pas de photo : pictogramme du produit sur un fond brume, avec le biseau du club */
.prod__ph { position: relative; display: grid; align-content: center; justify-items: center; gap: 12px; width: 100%; height: 100%; overflow: hidden; }
.prod__ph::before { content: ""; position: absolute; top: 0; bottom: 0; left: 27%; width: 46%; background: color-mix(in srgb, var(--bg) 62%, transparent); transform: skewX(-17deg); }
.prod__ph .ph { position: relative; font-size: 3.5rem; }
.prod__img .prod__ph small { position: relative; left: auto; bottom: auto; color: var(--muted); font: 700 .75rem/1.2 var(--font-body); letter-spacing: .08em; text-transform: uppercase; }
.prod__body { gap: 6px; padding-top: 16px; }
.prod__name { font: 700 1.375rem/1.05 var(--font-title); letter-spacing: .01em; text-transform: uppercase; }
.prod__lien { color: var(--text); text-decoration: none; }
.prod__lien::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.prod__lien:focus-visible { outline: none; }
.prod__lien:focus-visible::after { outline: 3px solid var(--navy); outline-offset: 3px; }
.prod:hover .prod__lien { color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.prod__tags { position: absolute; top: 12px; left: 0; z-index: 2; display: grid; justify-items: start; gap: 6px; pointer-events: none; }
.prod__tag { padding: 6px 17px 6px 12px; font: 700 .875rem/1 var(--font-title); letter-spacing: .08em; text-transform: uppercase; clip-path: polygon(0 0, 100% 0, calc(100% - 7px) 100%, 0 100%); }
.prod__tag--new { background: var(--yellow); color: var(--on-yellow); }
.prod__tag--soon { background: var(--navy); color: var(--bg); }
.prod__price { display: flex; align-items: center; min-height: 26px; }
.prod .sizes { margin: 2px 0 4px; }
@media (max-width: 759px) {
  .prod .sizes { gap: 4px; }
  .prod .sizes li { min-width: 28px; height: 26px; padding: 0 4px; font-size: .75rem; }
}
.prod__perso { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--muted); font-size: .875rem; font-weight: 600; }
.prod__perso .ph { color: var(--navy); }
.prod__cta { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px; color: var(--text); font: 700 1.0625rem/1 var(--font-title); letter-spacing: .06em; text-transform: uppercase; }
.prod__cta .ph { transition: transform .3s var(--ease); }
.prod:hover .prod__cta .ph { transform: translateX(4px); }
/* Zoom doux de la photo (survol, focus clavier), le texte ne bouge pas */
@media (prefers-reduced-motion: no-preference) {
  .prod__img > img, .prod__ph { transition: transform .7s var(--ease); }
  .prod:has(.prod__lien:focus-visible) .prod__img > img, .prod:has(.prod__lien:focus-visible) .prod__ph { transform: scale(1.06); }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .prod:hover .prod__img > img, .prod:hover .prod__ph { transform: scale(1.06); }
}

/* ===== Champs communs : libellé, aide, erreur en ligne ===== */
.field__lib { display: block; color: var(--text); font-size: .9375rem; font-weight: 700; }
.field__lib em, .opt__txt em { color: var(--muted); font-style: normal; font-weight: 600; }
.perso__fac { color: var(--muted); font-weight: 600; }
.field .field__err, .field__err { margin: 0; color: var(--ko); font-size: .9375rem; font-weight: 600; }
.field__err:empty { display: none; }
.field__err::before { content: "Erreur : "; }
.field [aria-invalid="true"]:not([type="radio"]):not([type="checkbox"]) { border-bottom-color: var(--ko); background: color-mix(in srgb, var(--ko) 8%, var(--mist)); }
.chips input[aria-invalid="true"] + span { border-color: var(--ko); }
.opt__check input[aria-invalid="true"] { outline: 3px solid var(--ko); outline-offset: 2px; }
.field input.maj { text-transform: uppercase; letter-spacing: .04em; }
.field input.maj::placeholder { text-transform: none; }
.opt__check { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; }
.opt__check input { flex: none; width: 24px; height: 24px; margin: 0; accent-color: var(--navy); cursor: pointer; }
.opt__check:has(input:focus-visible) { outline: 3px solid var(--navy); outline-offset: 2px; }
.opt__txt { display: grid; gap: 2px; }
.opt__txt small { color: var(--muted); font-weight: 400; }

/* ===== Panier (tiroir) ===== */
.drawer__list .cl__main { display: grid; grid-column: 1; gap: 2px; min-width: 0; }
.drawer__list .cl__det { color: var(--muted); font-size: .9375rem; overflow-wrap: anywhere; }
.drawer__list .cl__err { color: var(--ko); font-size: .9375rem; font-weight: 600; }
.drawer__list .cl__prix { display: grid; grid-column: 2; align-content: start; justify-items: end; text-align: right; }
.drawer__list .cl__unit { color: var(--muted); font-size: .875rem; white-space: nowrap; }
.drawer__list .cl__act { display: flex; grid-column: 1 / -1; align-items: center; justify-content: space-between; gap: 12px; }
.qty { display: inline-flex; align-items: center; }
.drawer__list .qty button { display: grid; place-items: center; width: 44px; min-height: 44px; padding: 0; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 1.1rem; text-decoration: none; }
.drawer__list .qty button:hover:not([disabled]) { background: var(--navy); border-color: var(--navy); color: var(--bg); }
.drawer__list .qty button[disabled] { opacity: .4; cursor: not-allowed; }
.qty__n { min-width: 44px; text-align: center; font-weight: 700; }
.drawer__list .cl--vide { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }

/* ===== Page de commande ===== */
.cmd { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: start; }
@media (min-width: 960px) { .cmd { grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); gap: 56px; } }
.cmd__form { display: grid; gap: 32px; min-width: 0; }
.cmd__annule { display: flex; align-items: flex-start; gap: 12px; max-width: none; margin: 0 0 28px; padding: 14px 18px; background: var(--yellow-soft); border-left: 4px solid var(--yellow); color: var(--navy); font-weight: 600; }
.cmd__annule[hidden] { display: none; }
.cmd__mode { display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; background: var(--mist); border-left: 4px solid var(--yellow); }
.cmd__mode .ph { flex: none; margin-top: 2px; color: var(--navy); font-size: 1.5rem; }
.cmd__mode p { margin: 0; }
fieldset.cmd__bloc { display: grid; gap: 18px; min-width: 0; margin: 0; padding: 20px 0 0; border: 0; border-top: 2px solid var(--line); }
.cmd__bloc legend { display: flex; align-items: center; gap: 12px; padding: 0 12px 0 0; font: 700 clamp(1.5rem, 4vw, 1.875rem)/1 var(--font-title); letter-spacing: .01em; text-transform: uppercase; }
.cmd__num { display: grid; place-items: center; width: 36px; height: 32px; padding-right: 6px; background: var(--yellow); color: var(--on-yellow); font-size: 1.25rem; clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%); }
.cmd__grid { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 18px; }
@media (min-width: 600px) { .cmd__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cmd__large { grid-column: 1 / -1; } }
.choix { display: grid; gap: 12px; }
.choix__o { position: relative; display: block; cursor: pointer; }
.choix__o input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.choix__c { display: grid; gap: 4px; padding: 14px 16px; border: 2px solid var(--line); }
.choix__o:hover .choix__c { border-color: var(--navy); }
.choix__o input:checked + .choix__c { border-color: var(--navy); background: var(--mist); box-shadow: inset 6px 0 0 var(--yellow); padding-left: 22px; }
.choix__o input:focus-visible + .choix__c { outline: 3px solid var(--navy); outline-offset: 2px; }
.choix__o input[aria-invalid="true"] + .choix__c { border-color: var(--ko); }
.choix__t { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.choix__t em { font-style: normal; font-weight: 700; white-space: nowrap; }
.choix__d { color: var(--muted); font-size: .9375rem; }
.cmd__cgv { padding: 16px 18px; background: var(--mist); }
.cmd__cgv .opt__txt { display: block; }
.cmd__cgv .field__err { display: block; margin-top: 6px; }
.cmd__cgv .field__err:empty { display: none; }
.cmd__erreur { padding: 14px 18px; border-left: 4px solid var(--ko); background: color-mix(in srgb, var(--ko) 8%, var(--bg)); color: var(--ko); font-weight: 600; }
.cmd__erreur:empty { display: none; }
.cmd__actions { display: grid; gap: 12px; justify-items: start; }
.cmd__actions p { margin: 0; }
.cmd__total { font-size: 1.0625rem; }
.cmd__total b { font: 700 1.75rem/1 var(--font-title); letter-spacing: .02em; }
.cmd__total:empty { display: none; }
.cmd__envoi { min-height: 56px; max-width: 100%; white-space: normal; text-align: center; line-height: 1.15; padding-block: 8px; }
@media (max-width: 559px) { .cmd__envoi { width: 100%; } }
@media (prefers-reduced-motion: no-preference) { .cmd__spin { animation: cmd-tourne 1s linear infinite; } }
@keyframes cmd-tourne { to { transform: rotate(360deg); } }
.cmd__repli { display: grid; gap: 16px; padding: 24px; background: var(--mist); border-left: 4px solid var(--yellow); }
.cmd__repli[hidden] { display: none; }
.cmd__repli h2 { font-size: clamp(1.75rem, 5vw, 2.25rem); }
.cmd__repli p { margin: 0; }
.cmd__repli textarea { min-height: 220px; background: var(--bg); font-size: .875rem; line-height: 1.5; }
.cmd__repli-act { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }

/* ===== Récapitulatif ===== */
.cmd__recap { min-width: 0; padding: 24px; border: 1px solid var(--line); border-top: 4px solid var(--yellow); background: var(--surface); }
@media (min-width: 960px) { .cmd__recap { position: sticky; top: calc(var(--header-h) + 16px); } }
.cmd__recap h2 { margin-bottom: 8px; font-size: 2rem; }
.recap__lignes { margin: 0; padding: 0; list-style: none; }
.recap__lignes li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.recap__main { display: grid; gap: 2px; min-width: 0; }
.recap__det { color: var(--muted); font-size: .9375rem; overflow-wrap: anywhere; }
.recap__err { color: var(--ko); font-size: .9375rem; font-weight: 600; }
.recap__prix { font-weight: 700; white-space: nowrap; }
.recap__totaux { margin: 12px 0 0; }
.recap__totaux div { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; }
.recap__totaux dt { color: var(--muted); }
.recap__totaux dd { margin: 0; font-weight: 600; text-align: right; }
.recap__totaux .recap__total { margin-top: 8px; padding-top: 12px; border-top: 2px solid var(--navy); font-size: 1.25rem; }
.recap__totaux .recap__total dt { color: var(--text); font-weight: 700; }
.recap__totaux .recap__total dd { font-weight: 700; }
.recap__note { margin: 4px 0 12px; color: var(--muted); font-size: .9375rem; }
.recap__note:empty { display: none; }
.cmd__recap .textlink { margin-top: 8px; border: 0; background: none; padding: 0; cursor: pointer; }
.cmd__recap #recapErr { margin: 8px 0 0; }

/* ===== Confirmation ===== */
.confirm__liens { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 24px; }
.confirm .btn { margin: 0; }

/* Carte : pastilles des couleurs disponibles */
.prod__coloris { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 4px; padding: 0; list-style: none; }
.prod__coloris .pastille { width: 20px; height: 20px; }
