﻿/**
 * Single product page â€” v3 theme (Jost / Montserrat, Clairefontaine blues).
 * Retunes the generic WooCommerce product layout in woocommerce.css and styles
 * the "OÃ¹ acheter" section (online retailers + points of sale).
 */

body.cf-product-v3 .sp {
  /* Remap the legacy warm/gold palette used by woocommerce.css to v3 tokens. */
  --cf-pdp-blue: #374296;
  --cf-pdp-dark: #1F1462;
  --cf-pdp-line: #e4e8f2;
  --cf-pdp-soft: #f7f8fc;
  --cf-pdp-text: #1a1a1a;
  --cf-pdp-muted: #666;

  --color-accent: var(--cf-pdp-blue);
  --color-accent-dark: var(--cf-pdp-dark);
  --color-primary: var(--cf-pdp-blue);
  --color-primary-dark: var(--cf-pdp-dark);
  --color-warm-900: var(--cf-pdp-dark);
  --color-warm-800: #2b2b2b;
  --color-warm-700: #444;
  --color-warm-600: #555;
  --color-warm-500: #777;
  --color-warm-400: #9aa1b5;
  --color-warm-300: #c9cfdf;
  --color-warm-200: var(--cf-pdp-line);
  --font-heading: 'Montserrat', sans-serif;
  --font-sans: 'Jost', sans-serif;
  --radius-lg: 6px;
  --radius-md: 4px;
  --radius-sm: 4px;

  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 40px 80px;
  font-family: 'Jost', sans-serif;
  color: var(--cf-pdp-text);
}

/* â”€â”€ Gallery (custom cf-pdp-gallery, no FlexSlider) â”€â”€ */

body.cf-product-v3 .sp .sp-gallery__main .cf-pdp-gallery {
	width: 100%;
	opacity: 1;
	visibility: visible;
}

body.cf-product-v3 .sp .sp-gallery__main .cf-pdp-gallery__stage {
	position: relative;
	width: 100%;
	min-height: clamp(340px, 44vw, 540px);
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

body.cf-product-v3 .sp .sp-gallery__main .cf-pdp-gallery__slide {
	display: none;
	width: 100%;
	margin: 0;
	padding: clamp(16px, 3vw, 32px);
	text-align: center;
}

body.cf-product-v3 .sp .sp-gallery__main .cf-pdp-gallery__slide.is-active {
	display: flex;
	align-items: center;
	justify-content: center;
}

body.cf-product-v3 .sp .sp-gallery__main .cf-pdp-gallery__zoom {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	line-height: 0;
	position: relative;
	cursor: zoom-in;
}

body.cf-product-v3 .sp .sp-gallery__main .cf-pdp-gallery__zoom::after {
	content: '';
	position: absolute;
	top: 12px;
	right: 12px;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23374296' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3Cline x1='11' y1='8' x2='11' y2='14'/%3E%3Cline x1='8' y1='11' x2='14' y2='11'/%3E%3C/svg%3E") center / 18px no-repeat;
	box-shadow: 0 2px 8px rgba(31, 20, 98, 0.12);
	pointer-events: none;
}

body.cf-product-v3 .sp .sp-gallery__main .cf-pdp-gallery__img {
	max-width: 100%;
	max-height: clamp(300px, 40vw, 500px);
	width: auto;
	height: auto;
	object-fit: contain;
	margin: 0 auto;
	display: block;
}

body.cf-product-v3 .sp .sp-gallery__main .cf-pdp-gallery__thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	list-style: none;
	margin: 20px 0 0;
	padding: 0 4px 4px;
}

body.cf-product-v3 .sp .sp-gallery__main .cf-pdp-gallery__thumb {
	border: 2px solid var(--cf-pdp-line);
	border-radius: 4px;
	padding: 0;
	background: #fff;
	cursor: pointer;
	width: 80px;
	height: 80px;
	overflow: hidden;
	flex-shrink: 0;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.cf-product-v3 .sp .sp-gallery__main .cf-pdp-gallery__thumb.is-active {
	border-color: var(--cf-pdp-blue);
	box-shadow: 0 0 0 1px var(--cf-pdp-blue);
}

body.cf-product-v3 .sp .sp-gallery__main .cf-pdp-gallery__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

body.cf-pdp-lightbox-open {
	overflow: hidden;
}

.cf-pdp-lightbox {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 72px 24px 24px;
}

.cf-pdp-lightbox.is-open {
	display: flex;
}

.cf-pdp-lightbox[hidden] {
	display: none !important;
}

.cf-pdp-lightbox__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(20, 16, 48, 0.9);
	cursor: zoom-out;
}

.cf-pdp-lightbox__img {
	position: relative;
	z-index: 1;
	max-width: min(96vw, 1200px);
	max-height: calc(100vh - 120px);
	width: auto;
	height: auto;
	object-fit: contain;
	pointer-events: none;
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.cf-pdp-lightbox__close {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 8px 16px 8px 12px;
	border: 0;
	border-radius: 999px;
	background: #fff;
	color: #1f1462;
	font-family: 'Montserrat', sans-serif;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
}

.cf-pdp-lightbox__close-x {
	font-size: 28px;
	line-height: 0.8;
}

.cf-pdp-lightbox__close:hover,
.cf-pdp-lightbox__close:focus-visible {
	background: #374296;
	color: #fff;
	outline: none;
}

body.cf-product-v3 .sp .sp-gallery__main {
  border: 1px solid var(--cf-pdp-line);
  border-radius: 6px;
  box-shadow: none;
}

body.cf-product-v3 .sp .sp-gallery__main .woocommerce-product-gallery .flex-control-thumbs li:has(img.flex-active) {
  border-color: var(--cf-pdp-blue);
  box-shadow: 0 0 0 1px var(--cf-pdp-blue);
}

/* Legacy WC gallery fallback (if ever rendered) */
body.cf-product-v3 .sp .sp-gallery__main .woocommerce-product-gallery {
	opacity: 1 !important;
	visibility: visible !important;
}

body.cf-product-v3 .sp .sp-badge {
  border-radius: 3px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
}

body.cf-product-v3 .sp .sp-badge--sale {
  background: #A72338;
}

body.cf-product-v3 .sp .sp-badge--featured {
  background: var(--cf-pdp-blue);
}

/* â”€â”€ Summary â”€â”€ */

body.cf-product-v3 .sp .sp-summary__cats {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.cf-product-v3 .sp .sp-summary__cats a {
  color: var(--cf-pdp-blue);
}

body.cf-product-v3 .sp .sp-summary__cats a:hover {
  color: var(--cf-pdp-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.cf-product-v3 .sp .sp-summary__title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--cf-pdp-dark);
  margin: 10px 0 0;
}

body.cf-product-v3 .sp .sp-summary__color-name {
  margin: 8px 0 0;
  font-family: 'Jost', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #666;
}

body.cf-product-v3 .sp .sp-summary__color-name[hidden],
body.cf-product-v3 .sp .sp-summary__ref-code[hidden] {
  display: none !important;
}

body.cf-product-v3 .sp .sp-summary__ref-code {
  margin: 6px 0 0;
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--primary-blue, #2f5f9f);
}

body.cf-product-v3 .sp .sp-divider {
  background: var(--cf-pdp-line);
  margin: 22px 0;
}

body.cf-product-v3 .sp .sp-summary__excerpt,
body.cf-product-v3 .sp .sp-summary__basic-desc {
  font-family: 'Jost', sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: #555;
  margin: 0 0 14px;
  max-width: 36em;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

body.cf-product-v3 .sp .sp-summary__price {
  font-family: 'Montserrat', sans-serif;
  color: var(--cf-pdp-dark);
}

/* â”€â”€ "OÃ¹ acheter" â€” single centered block below gallery + summary â”€â”€ */

/* Où acheter CTA in product summary */

body.cf-product-v3 .sp .sp-summary__suppliers {
  margin: 6px 0 4px;
}

body.cf-product-v3 .sp .cf-wtb-cta {
  display: inline-block;
  padding: 14px 34px;
  background: var(--cf-pdp-blue);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  appearance: none;
  transition: background-color 0.3s ease;
}

body.cf-product-v3 .sp .cf-wtb-cta:hover,
body.cf-product-v3 .sp .cf-wtb-cta:focus-visible {
  background: var(--cf-pdp-dark);
  color: #fff;
}

body.cf-product-v3 .sp .cf-wtb-cta__ref {
  font-family: 'Jost', sans-serif;
  font-size: 14px;
  color: #777;
  margin: 12px 0 0;
}

body.cf-product-v3 .sp .cf-wtb-cta__ref span {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cf-pdp-dark);
  margin-right: 6px;
}

/* â”€â”€ Product meta & trust row â”€â”€ */

body.cf-product-v3 .sp .sp-meta-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cf-pdp-dark);
}

body.cf-product-v3 .sp .sp-meta-value,
body.cf-product-v3 .sp .sp-meta-value a {
  font-family: 'Jost', sans-serif;
  font-size: 15px;
  color: #555;
}

body.cf-product-v3 .sp .sp-meta-value a:hover {
  color: var(--cf-pdp-blue);
}

body.cf-product-v3 .sp .sp-trust {
  background: var(--cf-pdp-soft);
  border: 1px solid var(--cf-pdp-line);
  border-radius: 6px;
}

body.cf-product-v3 .sp .sp-trust__item svg {
  color: var(--cf-pdp-blue);
}

body.cf-product-v3 .sp .sp-trust__item strong {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--cf-pdp-dark);
}

body.cf-product-v3 .sp .sp-trust__item small {
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  color: #666;
}

body.cf-product-v3 .cf-cc-proxy,
body.cf-product-v3 .cf-cc-bootstrap,
body.cf-product-v3 #cf-cc-bootstrap {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
}

body.cf-product-v3 .cf-wtb-modal__cc-slot {
  min-height: 120px;
}

body.cf-product-v3 .cf-wtb-modal__cc-slot .cf-cc-widget--modal {
  min-height: 0;
  background: transparent !important;
  border: 0 !important;
}

body.cf-product-v3 .cf-wtb-modal__cc-slot [class*="cc-Popup-module-channels"],
body.cf-product-v3 .cf-wtb-modal__cc-slot .cf-cc-mount {
  position: static !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 80px !important;
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
  transform: none !important;
  inset: auto !important;
  box-shadow: none !important;
  background: transparent !important;
}

body.cf-product-v3 .cf-wtb-modal__cc-slot a[href] {
  pointer-events: auto !important;
}

/* Kill any orphan Commerce Connector UI on product pages (no cc.js on PDP). */
body.cf-product-v3 [class*="ccStickyBtn"],
body.cf-product-v3 [class*="cc-Popup"],
body.cf-product-v3 [class*="cc-Popup-module"],
body.single-product [class*="ccStickyBtn"],
body.single-product [class*="cc-Popup"],
body.single-product [class*="cc-Popup-module"] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* â”€â”€ OÃ¹ acheter popup â”€â”€ */

body.cf-wtb-modal-open {
  overflow: hidden;
}

.cf-wtb-modal {
  position: fixed;
  inset: 0;
  z-index: 100050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.cf-wtb-modal[hidden] {
  display: none !important;
}

.cf-wtb-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31, 20, 98, 0.45);
}

.cf-wtb-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: min(86vh, 760px);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(31, 20, 98, 0.28);
  padding: 28px 24px 24px;
}

.cf-wtb-modal__dialog::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.cf-wtb-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #f3f4fb;
  color: var(--cf-pdp-dark, #1f1462);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.cf-wtb-modal__title {
  margin: 0 40px 8px 0;
  font-family: 'Montserrat', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--cf-pdp-dark, #1f1462);
}

.cf-wtb-modal__lead {
  margin: 0 0 18px;
  font-family: 'Jost', sans-serif;
  font-size: 15px;
  color: #555;
}

.cf-wtb-modal__empty {
  margin: 0 0 12px;
  font-family: 'Jost', sans-serif;
  color: #555;
}

.cf-wtb-modal__contact {
  display: inline-block;
  margin-bottom: 8px;
  font-family: 'Jost', sans-serif;
  font-weight: 600;
  color: var(--cf-pdp-blue, #374296);
}

.cf-wtb-modal__wayvia {
  min-height: 0;
  margin: 0;
  padding: 0;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  overflow: visible;
}

/* Commerce Connector map slot must not leave an empty gray box in the popup. */
.cf-wtb-modal .cf-cc-widget.cf-wtb-modal__wayvia,
.cf-wtb-modal .cf-wtb-modal__wayvia.cf-cc-widget {
  min-height: 0 !important;
  max-height: none;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
}

.cf-wtb-modal .cf-cc-widget--modal .cf-cc-mount {
  min-height: 120px;
}

.cf-wtb-modal__loading {
  margin: 0 0 12px;
  font-family: 'Jost', sans-serif;
  font-size: 14px;
  color: #666;
}

.cf-wtb-modal__stores {
  margin: 18px 0 0;
  font-family: 'Jost', sans-serif;
  font-weight: 600;
}

.cf-wtb-modal__stores a {
  color: var(--cf-pdp-blue, #374296);
}

.cf-wtb-retailers {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cf-wtb-retailer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #ececf4;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(31, 20, 98, 0.08);
}

.cf-wtb-retailer.is-featured,
.cf-wtb-retailer:first-child {
  border-left: 4px solid var(--cf-pdp-blue, #374296);
}

.cf-wtb-retailer__id {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.cf-wtb-retailer__logo-wrap {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e6e6ef;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cf-wtb-retailer__logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cf-wtb-retailer__fallback {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 18px;
  color: var(--cf-pdp-blue, #374296);
}

.cf-wtb-retailer__name {
  min-width: 0;
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: #1a1a1a;
}

.cf-wtb-retailer__buy {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--cf-pdp-blue, #374296);
  color: #fff !important;
  font-family: 'Jost', sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none !important;
}

.cf-wtb-retailer__buy:hover {
  background: var(--cf-pdp-dark, #1f1462);
}

@media (max-width: 520px) {
  .cf-wtb-retailer {
    flex-wrap: wrap;
  }

  .cf-wtb-retailer__buy {
    width: 100%;
  }
}
