/* product_popup.css — POPUP PRODUIT CANONIQUE (option A, verdict Walid 19/10/2026)
   Cadre unique .bsf-prod-modal (ex social/assets/css/space.css, LOT 8-A : surface BLANCHE invariante = schéma
   marché, R-100/R-104, identité cross-canal de la fiche R-195) + règles du fragment market.product_detail
   (ex market.css, scopées sous .bsf-prod-modal__body avec repli de variables pour les hôtes sans market.css).
   Couleur d'accent = --space-c1/--space-c2 (brand space) sinon --brand (palette boutique market) sinon bleu BSF. */
body.bsf-prod-modal-open{overflow:hidden}
.bsf-prod-modal{position:fixed;inset:0;z-index:99980;display:none}
.bsf-prod-modal.is-open{display:block}
.bsf-prod-modal__backdrop{position:absolute;inset:0;background:rgba(6,12,22,.62);backdrop-filter:blur(4px)}
.bsf-prod-modal__dialog{position:relative;margin:4vh auto;width:min(960px,calc(100% - 24px));max-height:92vh;display:flex;flex-direction:column;background:#fff;color:#0f172a;border-radius:16px;box-shadow:0 28px 80px rgba(0,0,0,.28);overflow:hidden}
.bsf-prod-modal__head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-bottom:1px solid #e5e7eb}
.bsf-prod-modal__title{margin:0;font-size:16px;font-weight:700;line-height:1.3;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#0f172a}
.bsf-prod-modal__close{border:0;background:transparent;font-size:26px;line-height:1;cursor:pointer;color:#334155;padding:2px 8px;border-radius:8px}
.bsf-prod-modal__close:hover{background:#f1f5f9}
.bsf-prod-modal__body{overflow:auto;padding:16px 20px;-webkit-overflow-scrolling:touch;color:#0f172a;background:#fff}
.bsf-prod-modal__body img{max-width:100%;height:auto}
.bsf-prod-modal__loading{padding:40px;text-align:center;color:#6b7280;font-weight:700}
.bsf-prod-modal__foot{display:flex;gap:8px;justify-content:flex-end;padding:12px 16px;border-top:1px solid #e5e7eb}
.bsf-prod-modal__foot .bsf-btn{display:inline-flex;align-items:center;padding:8px 14px;border-radius:10px;border:1px solid #d1d5db;background:#fff;color:#0f172a;text-decoration:none;cursor:pointer;font:inherit;font-size:14px;font-weight:600;line-height:1.3}
.bsf-prod-modal__foot button.bsf-prod-modal__share{color:#0f172a!important;background:#fff!important;border:1px solid #d1d5db!important}
.bsf-prod-modal__foot .bsf-prod-modal__open{background:var(--space-c1,var(--brand,#0C304C));color:var(--space-c2,#fff);border-color:transparent}
.bsf-prod-modal__share.is-done{outline:2px solid var(--space-c1,var(--brand,#0C304C))}

/* ── fragment market.product_detail, scopé ───────────────────────────────────────────────────────── */
.bsf-prod-modal__body .mkt-container{width:100%;max-width:none;margin:0;padding:0}
.bsf-prod-modal__body .mkt-breadcrumb,.bsf-prod-modal__body .mkt-product-breadcrumb{display:none}
.bsf-prod-modal__body .mkt-product-layout{display:grid;grid-template-columns:1fr 1fr;gap:24px;align-items:start}
.bsf-prod-modal__body .mkt-product-gallery,.bsf-prod-modal__body .mkt-product-info{min-width:0;position:static}
.bsf-prod-modal__body .mkt-gallery-main{position:relative;aspect-ratio:1;border-radius:14px;overflow:hidden;margin-bottom:12px;background:#f3f4f6}
.bsf-prod-modal__body .mkt-gallery-main img{width:100%;height:100%;object-fit:contain;display:block}
.bsf-prod-modal__body .mkt-gallery-thumbs{display:flex;gap:8px;flex-wrap:wrap}
.bsf-prod-modal__body .mkt-gallery-thumb{width:64px;height:64px;border-radius:10px;overflow:hidden;border:2px solid #e5e7eb;cursor:pointer;padding:0;background:#fff;transition:border-color .18s ease}
.bsf-prod-modal__body .mkt-gallery-thumb:hover,.bsf-prod-modal__body .mkt-gallery-thumb.active{border-color:var(--space-c1,var(--accent,#1B70AA))}
.bsf-prod-modal__body .mkt-gallery-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.bsf-prod-modal__body .mkt-product-title{font-size:clamp(1.25rem,2vw,1.7rem);font-weight:800;line-height:1.25;margin:0 0 12px;color:#0f172a}
.bsf-prod-modal__body .mkt-product-pricing{margin:12px 0;display:flex;align-items:baseline;gap:12px;flex-wrap:wrap}
.bsf-prod-modal__body .mkt-product-price{font-size:1.75rem;font-weight:900;color:var(--space-c1,var(--accent,#1B70AA))}
.bsf-prod-modal__body .mkt-qty-row{display:flex;align-items:center;gap:12px;margin:16px 0;flex-wrap:wrap}
.bsf-prod-modal__body .mkt-qty-ctrl{display:flex;align-items:center;border:1.5px solid #e5e7eb;border-radius:10px;overflow:hidden;background:#fff}
.bsf-prod-modal__body .mkt-qty-ctrl>button,.bsf-prod-modal__body .mkt-qty-btn{width:38px;height:38px;display:flex;align-items:center;justify-content:center;font-size:1.2rem;border:0;background:transparent;color:#0f172a;cursor:pointer;font-family:inherit}
.bsf-prod-modal__body .mkt-qty-ctrl>button:hover,.bsf-prod-modal__body .mkt-qty-btn:hover{background:#f3f4f6}
.bsf-prod-modal__body .mkt-qty-ctrl>input,.bsf-prod-modal__body .mkt-qty-input{width:52px;text-align:center;border:0;border-left:1px solid #e5e7eb;border-right:1px solid #e5e7eb;padding:8px 0;font-size:.95rem;font-weight:600;background:#fff;color:#0f172a;outline:none}
.bsf-prod-modal__body .mkt-add-cart-btn{flex:1;padding:12px 14px;font-size:1rem;font-weight:700;background:var(--space-c1,var(--accent,#1B70AA));color:var(--space-c2,#fff);border:0;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;font-family:inherit;transition:filter .18s ease}
.bsf-prod-modal__body .mkt-add-cart-btn:hover{filter:brightness(1.08)}
.bsf-prod-modal__body .mkt-buy-now-btn{padding:12px 14px;font-size:.95rem;font-weight:700;background:#0f172a;color:#fff;border:0;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;font-family:inherit}
.bsf-prod-modal__body .mkt-buy-now-btn:hover{background:#1e293b}
.bsf-prod-modal__body .mkt-add-cart-btn[disabled],.bsf-prod-modal__body .mkt-buy-now-btn[disabled]{opacity:.6;cursor:wait}
.bsf-prod-modal__body .mkt-add-cart-btn i,.bsf-prod-modal__body .mkt-buy-now-btn i,.bsf-prod-modal__body .mkt-tab-btn i{width:18px;height:18px}
.bsf-prod-modal__body .mkt-shop-mini{margin-top:20px;padding:12px 14px;border-radius:14px;background:#f8fafc;border:1px solid #e5e7eb;display:flex;gap:12px;align-items:center}
.bsf-prod-modal__body .mkt-shop-mini-main{flex:1;min-width:0}
.bsf-prod-modal__body .mkt-shop-mini-main a{font-weight:700;color:inherit;text-decoration:none}
.bsf-prod-modal__body .mkt-detail-tabs{margin-top:20px;display:flex;gap:8px;flex-wrap:wrap}
.bsf-prod-modal__body .mkt-tab-btn{display:inline-flex;align-items:center;gap:8px;padding:9px 14px;border-radius:999px;border:1px solid #d1d5db;background:#fff;color:#475569;font-size:.88rem;font-weight:700;cursor:pointer;font-family:inherit;transition:background .18s ease,color .18s ease}
.bsf-prod-modal__body .mkt-tab-btn:hover,.bsf-prod-modal__body .mkt-tab-btn.active{background:var(--space-c1,var(--brand,#0C304C));color:var(--space-c2,#fff);border-color:transparent}
.bsf-prod-modal__body .mkt-tab-panel{margin-top:14px;line-height:1.55}
.bsf-prod-modal__body .mkt-tab-panel[hidden]{display:none}
.bsf-prod-modal__body .mkt-section-title{font-size:1.05rem;font-weight:800;margin:20px 0 10px}
.bsf-prod-modal__body .mkt-products-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}
.bsf-prod-modal__body .mkt-card{border:1px solid #e5e7eb;border-radius:12px;overflow:hidden;background:#fff;color:#0f172a;position:relative}
.bsf-prod-modal__body .mkt-card-img-wrap{aspect-ratio:1;background:#f3f4f6;overflow:hidden}
.bsf-prod-modal__body .mkt-card-img-wrap img{width:100%;height:100%;object-fit:contain;display:block}
.bsf-prod-modal__body .mkt-card-body{padding:10px}
.bsf-prod-modal__body .mkt-card-title{font-size:.9rem;font-weight:700;margin:0 0 6px;line-height:1.3}
.bsf-prod-modal__body .mkt-card-title a{color:inherit;text-decoration:none}
.bsf-prod-modal__body .mkt-price-main{font-size:1rem;font-weight:800;color:var(--space-c1,var(--accent,#1B70AA))}
.bsf-prod-modal__body .mkt-products-grid .mkt-btn-cart{display:none}
.bsf-prod-modal__body .stars{color:#f59e0b;letter-spacing:1px}
.bsf-prod-modal__body .star-empty{opacity:.35}

/* ── toast (ajout au panier) ─────────────────────────────────────────────────────────────────────── */
.bsf-prod-toast{position:fixed;left:50%;bottom:28px;transform:translate(-50%,20px);opacity:0;z-index:99990;padding:10px 16px;border-radius:10px;background:#0f172a;color:#fff;font-size:14px;box-shadow:0 10px 30px rgba(0,0,0,.25);transition:opacity .25s ease,transform .25s ease;pointer-events:none;max-width:calc(100% - 32px)}
.bsf-prod-toast.is-visible{opacity:1;transform:translate(-50%,0)}
.bsf-prod-toast.is-error{background:#b91c1c}

@media (max-width:767px){
  .bsf-prod-modal__dialog{margin:0;width:100%;height:100%;max-height:100vh;max-height:100dvh;border-radius:0}
  .bsf-prod-modal__body{padding:12px 14px}
  .bsf-prod-modal__body .mkt-product-layout{grid-template-columns:1fr;gap:16px}
  .bsf-prod-modal__body .mkt-gallery-main{aspect-ratio:4/3}
  .bsf-prod-modal__body .mkt-qty-row{align-items:stretch}
}
