/* Module boutique du CMS Oxilog : styles autonomes, couleurs reprises du site via les variables --shop-*. */
.shop {
  --sa: var(--shop-accent, #111827);
  --sa-ink: var(--shop-accent-ink, #fff);
  --st: var(--shop-text, #1f2937);
  --sm: var(--shop-muted, #6b7280);
  --sb: var(--shop-border, #e5e7eb);
  --ss: var(--shop-soft, #f6f7f9);
  --sr: var(--shop-radius, 12px);
  --sale: var(--shop-sale, #dc2626);
  color: var(--st);
}
.shop *, .shop *::before, .shop *::after { box-sizing: border-box; }
.shop-wrap { width: min(1200px, 100% - 32px); margin: 0 auto; }
.shop .sr, .shop .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.shop .muted { color: var(--sm); }
.shop [hidden] { display: none !important; }

.shop-head { background: var(--ss); padding: 36px 0 28px; margin-bottom: 28px; }
.shop-head h1, .shop-product h1, .shop-cart h1, .shop-checkout h1 { margin: 6px 0 8px; font-size: clamp(26px, 4vw, 38px); line-height: 1.15; }
.shop-lead { color: var(--sm); max-width: 720px; margin: 0; }
.shop-crumbs { font-size: 14px; color: var(--sm); }
.shop-crumbs a { color: inherit; text-decoration: none; }
.shop-crumbs a:hover { color: var(--sa); text-decoration: underline; }
.shop-crumbs span { margin: 0 4px; opacity: .6; }

.shop-toolbar { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.shop-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.shop-cats a { padding: 7px 14px; border: 1px solid var(--sb); border-radius: 999px; color: var(--st); text-decoration: none; font-size: 14px; background: #fff; }
.shop-cats a:hover { border-color: var(--sa); }
.shop-cats a[aria-current] { background: var(--sa); border-color: var(--sa); color: var(--sa-ink); }
.shop-sort select { margin-left: 8px; padding: 7px 10px; border: 1px solid var(--sb); border-radius: 8px; font: inherit; background: #fff; }

.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px; }
@media (max-width: 560px) { .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } }
.shop-card a { display: block; color: inherit; text-decoration: none; }
.shop-card-img { position: relative; aspect-ratio: 1; background: var(--ss); border-radius: var(--sr); overflow: hidden; }
.shop-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.shop-card a:hover .shop-card-img img { transform: scale(1.04); }
.shop-card h3 { font-size: 15px; font-weight: 600; margin: 12px 0 4px; line-height: 1.35; }
.shop-card p { margin: 0; }
.shop-card.is-out .shop-card-img img { opacity: .55; }
.shop-tag { position: absolute; top: 10px; left: 10px; background: #111; color: #fff; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; }
.shop-tag-sale { background: var(--sale); }
.shop-noimg { display: block; width: 100%; height: 100%; min-height: 80px; background: linear-gradient(135deg, var(--ss), var(--sb)); }

.shop-price { font-weight: 700; }
.shop-compare { color: var(--sm); font-size: .9em; }
.shop-badge { color: var(--sale); font-weight: 700; font-size: .85em; }

.shop-product { padding: 24px 0 56px; }
.shop-product-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; margin-top: 18px; }
@media (max-width: 860px) { .shop-product-grid { grid-template-columns: 1fr; gap: 24px; } }
.shop-gallery-main { aspect-ratio: 1; background: var(--ss); border-radius: var(--sr); overflow: hidden; }
.shop-gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.shop-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; }
.shop-thumbs button { flex: 0 0 72px; height: 72px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: var(--ss); cursor: pointer; }
.shop-thumbs button[aria-current] { border-color: var(--sa); }
.shop-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.shop-buy-price { font-size: 26px; margin: 4px 0 14px; }
.shop-summary { color: var(--sm); line-height: 1.65; }
.shop-options { border: 0; padding: 0; margin: 18px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.shop-options legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.shop-option input { position: absolute; opacity: 0; }
.shop-option span { display: inline-block; padding: 9px 14px; border: 1.5px solid var(--sb); border-radius: 10px; cursor: pointer; font-size: 14px; background: #fff; }
.shop-option input:checked + span { border-color: var(--sa); box-shadow: 0 0 0 1px var(--sa); font-weight: 600; }
.shop-option input:focus-visible + span { outline: 2px solid var(--sa); outline-offset: 2px; }
.shop-option.is-out span { opacity: .45; text-decoration: line-through; cursor: not-allowed; }
.shop-qty-row { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; margin: 8px 0 10px; }
.shop-qty { display: inline-flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--sm); }
.shop-qty input { width: 76px; padding: 11px 10px; border: 1px solid var(--sb); border-radius: 10px; font: inherit; font-size: 16px; }
.shop-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 24px; border: 0; border-radius: 10px; background: var(--sa); color: var(--sa-ink); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; transition: filter .2s; }
.shop-btn:hover { filter: brightness(1.12); color: var(--sa-ink); }
.shop-btn:disabled { opacity: .6; cursor: wait; }
.shop-qty-row .shop-btn { flex: 1; }
.shop-btn-alt { width: 100%; background: #fff; color: var(--sa); box-shadow: inset 0 0 0 1.5px var(--sa); }
.shop-btn-alt:hover { color: var(--sa); background: var(--ss); }
.shop-btn-ghost { background: transparent; color: var(--st); box-shadow: inset 0 0 0 1px var(--sb); margin-top: 14px; }
.shop-btn-ghost:hover { color: var(--st); }
.shop-btn-block { width: 100%; margin-top: 16px; }
.shop-out { color: var(--sale); font-weight: 700; }
.shop-low { color: #b45309; font-size: 14px; margin: 8px 0 0; }
.shop-trust { list-style: none; padding: 16px 0 0; margin: 20px 0 0; border-top: 1px solid var(--sb); font-size: 14px; color: var(--sm); display: grid; gap: 8px; }
.shop-trust li::before { content: "✓"; color: var(--sa); font-weight: 700; margin-right: 8px; }
.shop-desc { margin-top: 44px; max-width: 820px; line-height: 1.7; }
.shop-related { margin-top: 48px; }
.shop-related h2, .shop-desc h2 { font-size: 22px; margin-bottom: 16px; }

.shop-notice { padding: 12px 16px; border-radius: 10px; margin: 0 0 18px; font-size: 15px; }
.shop-notice-ok { background: #ecfdf5; color: #065f46; }
.shop-notice-err { background: #fef2f2; color: #991b1b; }
.shop-empty { color: var(--sm); padding: 30px 0; }

.shop-cart, .shop-checkout { padding: 28px 0 60px; }
.shop-cart-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; margin-top: 18px; }
@media (max-width: 900px) { .shop-cart-grid { grid-template-columns: 1fr; } }
.shop-line { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto auto 32px; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--sb); }
@media (max-width: 560px) { .shop-line { grid-template-columns: 64px minmax(0, 1fr) auto; } .shop-line-total { grid-column: 2; } .shop-remove { grid-column: 3; grid-row: 1; } }
.shop-line-img { display: block; width: 76px; height: 76px; border-radius: 10px; overflow: hidden; background: var(--ss); }
.shop-line-img img { width: 100%; height: 100%; object-fit: cover; }
.shop-line-info { display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.shop-line-info a { color: inherit; text-decoration: none; }
.shop-line-info small { color: var(--sm); }
.shop-remove { width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--ss); font-size: 20px; line-height: 1; cursor: pointer; color: var(--sm); }
.shop-remove:hover { background: #fee2e2; color: var(--sale); }
.shop-summary-box { background: var(--ss); border-radius: var(--sr); padding: 22px; position: sticky; top: 90px; }
.shop-summary-box h2 { font-size: 19px; margin: 0 0 14px; }
.shop-summary-box dl { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 0; }
.shop-summary-box dd { margin: 0; text-align: right; }
.shop-summary-box .total { font-weight: 800; font-size: 18px; border-top: 1px solid var(--sb); padding-top: 10px; }
.shop-hint { font-size: 13px; color: var(--sm); margin: 10px 0 0; }
.shop-link { display: inline-block; margin-top: 14px; font-size: 14px; color: var(--sm); }
.shop-mini { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; font-size: 14px; }
.shop-mini li { display: flex; justify-content: space-between; gap: 12px; }
.shop-mini small { color: var(--sm); }

.shop-form h2 { font-size: 19px; margin: 8px 0 14px; }
.shop-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 24px; }
@media (max-width: 560px) { .shop-fields { grid-template-columns: 1fr; } }
.shop-fields label { display: flex; flex-direction: column; gap: 5px; font-size: 14px; font-weight: 600; }
.shop-fields .wide { grid-column: 1 / -1; }
.shop-fields input, .shop-fields select, .shop-fields textarea { padding: 12px; border: 1px solid var(--sb); border-radius: 10px; font: inherit; font-size: 16px; font-weight: 400; background: #fff; width: 100%; }
.shop-fields input:focus, .shop-fields select:focus, .shop-fields textarea:focus { outline: 2px solid var(--sa); outline-offset: 0; border-color: transparent; }
.shop-fields .has-error input, .shop-fields .has-error select { border-color: var(--sale); }
.shop-err { color: var(--sale); font-weight: 400; font-size: 13px; }
.shop-pay { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1.5px solid var(--sa); border-radius: 10px; font-size: 15px; }
.shop-pay small { color: var(--sm); }

.shop-thanks { padding: 48px 0 70px; }
.shop-thanks-box { max-width: 620px; margin: 0 auto; text-align: center; }
.shop-thanks-box .shop-mini { text-align: left; background: var(--ss); padding: 16px; border-radius: var(--sr); margin: 20px 0; }
.shop-check { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; background: #10b981; color: #fff; font-size: 34px; line-height: 64px; }

.shop-cart-link { position: relative; display: inline-flex; align-items: center; color: inherit; }
.shop-cart-count { position: absolute; top: -6px; right: -9px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--shop-accent, #111827); color: var(--shop-accent-ink, #fff); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }

/* Cartes : 2e photo au survol, ajout rapide */
.shop-card { position: relative; display: flex; flex-direction: column; }
.shop-card-alt { position: absolute; inset: 0; opacity: 0; transition: opacity .35s; }
.shop-card.has-alt a:hover .shop-card-alt { opacity: 1; }
.shop-from { font-size: .8em; color: var(--sm); font-weight: 400; }
.shop-quick-form { margin: 0; }
.shop-quick { display: block; width: 100%; margin-top: 10px; padding: 9px 10px; border: 1.5px solid var(--sa); border-radius: 999px; background: transparent; color: var(--sa); font: inherit; font-size: 14px; font-weight: 600; text-align: center; text-decoration: none; cursor: pointer; transition: background .2s, color .2s; }
.shop-quick:hover { background: var(--sa); color: var(--sa-ink); }

/* Carrousel de produits */
.shop-carousel { margin: 8px 0; }
.shop-carousel-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.shop-carousel-head h2 { margin: 0; }
.shop-carousel-nav { display: flex; align-items: center; gap: 8px; }
.shop-carousel-nav a { margin-right: 8px; font-weight: 600; font-size: 14px; }
.shop-carousel-nav button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--sb); background: #fff; font-size: 22px; line-height: 1; cursor: pointer; color: var(--st); }
.shop-carousel-nav button:hover { border-color: var(--sa); color: var(--sa); }
.shop-carousel-nav button:disabled { opacity: .35; cursor: default; }
.shop-carousel-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 22px) / 4); gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; padding-bottom: 6px; }
.shop-carousel-track::-webkit-scrollbar { display: none; }
.shop-carousel-track > * { scroll-snap-align: start; min-width: 0; }
@media (max-width: 1000px) { .shop-carousel-track { grid-auto-columns: calc((100% - 2 * 18px) / 3); gap: 18px; } }
@media (max-width: 640px) { .shop-carousel-track { grid-auto-columns: 62%; gap: 14px; } .shop-carousel-nav button { display: none; } }

/* Notification d'ajout au panier */
.shop-toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 90; display: flex; align-items: center; gap: 14px; background: #111827; color: #fff; padding: 12px 16px 12px 6px; border-radius: 14px; box-shadow: 0 12px 30px rgba(0,0,0,.25); max-width: calc(100% - 24px); animation: shopToast .3s ease-out; }
.shop-toast .shop-notice { background: none; color: #fff; margin: 0; padding: 0 0 0 10px; }
.shop-toast a { color: #fff; font-weight: 700; white-space: nowrap; }
.shop-toast.is-hidden { opacity: 0; transition: opacity .4s; pointer-events: none; }
@keyframes shopToast { from { opacity: 0; transform: translate(-50%, 16px); } }

/* Barre d'achat fixe sur mobile (fiche produit) */
.shop-sticky { display: none; }
@media (max-width: 860px) {
  .shop-sticky { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--sb); box-shadow: 0 -6px 20px rgba(0,0,0,.08); transform: translateY(110%); transition: transform .25s; }
  .shop-sticky.is-on { transform: none; }
  .shop-sticky span { display: flex; flex-direction: column; font-size: 14px; line-height: 1.3; min-width: 0; }
  .shop-sticky b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .shop-sticky .shop-btn { padding: 12px 18px; white-space: nowrap; }
}

/* Comptes clients */
.shop-account-link { position: relative; display: inline-flex; color: inherit; padding: 6px; }
.shop-account-dot { position: absolute; top: 4px; right: 3px; width: 8px; height: 8px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 2px #fff; }
.shop-account-auth, .shop-account { padding: 28px 0 60px; }
.shop-auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; margin-top: 18px; }
@media (max-width: 800px) { .shop-auth-grid { grid-template-columns: 1fr; } }
.shop-auth-box { background: #fff; border: 1px solid var(--sb); border-radius: var(--sr); padding: 26px; }
.shop-auth-box.is-main { box-shadow: 0 10px 30px rgba(0, 0, 0, .06); border-color: var(--sa); }
.shop-auth-box h2 { margin: 0 0 12px; font-size: 21px; }
.shop-fields.one { grid-template-columns: 1fr; margin-bottom: 14px; }
.shop-checkbox { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: 10px 0; cursor: pointer; }
.shop-checkbox input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--sa); }
.shop-account-note { background: var(--ss); border-radius: 10px; padding: 12px 16px; font-size: 14px; }
.shop-create { border: 1px dashed var(--sb); border-radius: 12px; padding: 6px 16px 2px; margin: 0 0 22px; }
.shop-create .shop-fields { margin: 8px 0 12px; }
.shop-account-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.shop-account-head .shop-btn { margin: 0; }
.shop-orders { display: grid; gap: 10px; }
.shop-order-row { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; padding: 14px 18px; border: 1px solid var(--sb); border-radius: 12px; color: inherit; text-decoration: none; background: #fff; }
.shop-order-row:hover { border-color: var(--sa); }
.shop-order-row span:first-child { display: flex; flex-direction: column; }
.shop-order-row small { color: var(--sm); }
.shop-status { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--ss); white-space: nowrap; }
.shop-status-delivered { background: #d1fae5; color: #065f46; }
.shop-status-cancelled, .shop-status-returned { background: #fee2e2; color: #991b1b; }
.shop-status-shipped { background: #dbeafe; color: #1e40af; }
@media (max-width: 560px) { .shop-order-row { grid-template-columns: 1fr auto; } .shop-order-row .shop-status { grid-row: 2; } }
.shop-steps { list-style: none; padding: 0; margin: 22px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; counter-reset: s; }
.shop-steps li { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; color: var(--sm); text-align: center; position: relative; }
.shop-steps li span { width: 34px; height: 34px; border-radius: 50%; background: var(--ss); display: grid; place-items: center; font-weight: 700; }
.shop-steps li.is-done { color: var(--st); font-weight: 600; }
.shop-steps li.is-done span { background: var(--sa); color: var(--sa-ink); }

/* Code promo */
.shop-discount { color: #047857; }
.shop-discount small { color: inherit; opacity: .8; }
.shop-coupon { margin-top: 14px; border-top: 1px dashed var(--sb); padding-top: 12px; }
.shop-coupon summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--sa); list-style: none; }
.shop-coupon summary::-webkit-details-marker { display: none; }
.shop-coupon summary::before { content: "＋ "; }
.shop-coupon[open] summary::before { content: "－ "; }
.shop-coupon form { display: flex; gap: 8px; margin-top: 10px; }
.shop-coupon input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--sb); border-radius: 10px; font: inherit; text-transform: uppercase; background: #fff; }
.shop-coupon button, .shop-coupon-applied button { padding: 10px 14px; border: 0; border-radius: 10px; background: var(--sa); color: var(--sa-ink); font: inherit; font-weight: 700; cursor: pointer; }
.shop-coupon-applied { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #ecfdf5; color: #065f46; font-size: 14px; }
.shop-coupon-applied button { background: transparent; color: #065f46; text-decoration: underline; padding: 0; font-weight: 600; }
@media (max-width: 900px) { .shop-checkout .shop-cart-grid > aside { order: -1; position: static; } }
