/* PF Concept pour WooCommerce – configurateur de marquage.
   Hérite de la typographie et des couleurs du thème ; personnalisable via les variables ci-dessous. */

.pfc-configurator {
	--pfc-line: rgba(0, 0, 0, 0.14);
	--pfc-soft: rgba(0, 0, 0, 0.035);
	--pfc-accent: currentColor;
	--pfc-radius: 6px;
	margin: 0 0 1.5em;
	clear: both;
}

@supports (color: color-mix(in srgb, red, blue)) {
	.pfc-configurator {
		--pfc-line: color-mix(in srgb, currentColor 16%, transparent);
		--pfc-soft: color-mix(in srgb, currentColor 4%, transparent);
	}
}

.pfc-configurator table {
	width: 100%;
	border-collapse: collapse;
	margin: 0;
	border: 0;
}

.pfc-configurator th,
.pfc-configurator td {
	padding: 0.45em 0;
	border: 0;
	border-bottom: 1px solid var(--pfc-line);
	background: none;
	text-align: left;
	vertical-align: top;
	font-weight: normal;
}

.pfc-configurator td:last-child {
	text-align: right;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

/* Grille de prix dégressifs */
.pfc-tier-table {
	margin-bottom: 1.25em !important;
	font-size: 0.92em;
}

.pfc-tier-table thead th {
	font-weight: 600;
	border-bottom-width: 2px;
}

.pfc-tier-table thead th:last-child {
	text-align: right;
}

.pfc-stock-note {
	margin: 0 0 1em;
	font-size: 0.9em;
}

/* Options de marquage */
.pfc-marking {
	margin: 0 0 1em;
	padding: 0;
	border: 0;
	min-width: 0;
}

.pfc-marking legend {
	padding: 0;
	margin-bottom: 0.6em;
	font-weight: 600;
	font-size: 1.05em;
}

.pfc-options {
	display: grid;
	gap: 0.5em;
}

.pfc-option {
	display: grid;
	grid-template-columns: auto 1fr;
	align-items: center;
	gap: 0.5em 0.75em;
	padding: 0.6em 0.75em;
	border: 1px solid var(--pfc-line);
	border-radius: var(--pfc-radius);
	transition: border-color 0.15s, background-color 0.15s;
}

.pfc-option.is-selected {
	border-color: var(--pfc-accent);
	background: var(--pfc-soft);
	box-shadow: inset 0 0 0 1px var(--pfc-accent);
}

.pfc-option-check {
	margin: 0;
	width: 1.1em;
	height: 1.1em;
	accent-color: var(--pfc-accent);
}

.pfc-option-label {
	display: flex;
	align-items: center;
	gap: 0.75em;
	margin: 0;
	cursor: pointer;
	font-weight: normal;
}

.pfc-option-img {
	flex: none;
	width: 72px;
	height: 72px;
	object-fit: contain;
	background: #fff;
	border: 1px solid var(--pfc-line);
	border-radius: calc(var(--pfc-radius) - 2px);
}

/* Vignette de l'emplacement : loupe pour voir la zone de marquage en grand */
.pfc-option-media {
	position: relative;
	flex: none;
	display: block;
	line-height: 0;
}

.pfc-configurator .pfc-option-zoom {
	position: absolute;
	right: -6px;
	bottom: -6px;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	min-width: 0;
	height: 26px;
	margin: 0;
	padding: 0;
	border: 1px solid rgba(0, 0, 0, 0.18);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.95);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
	color: #1d1d1f;
	line-height: 1;
	cursor: zoom-in;
}

.pfc-configurator .pfc-option-zoom:hover,
.pfc-configurator .pfc-option-zoom:focus-visible {
	background: #fff;
	color: #000;
	border-color: rgba(0, 0, 0, 0.4);
	transform: scale(1.08);
}

.pfc-configurator .pfc-option-zoom:focus-visible {
	outline: 2px solid var(--pfc-accent);
	outline-offset: 2px;
}

.pfc-configurator .pfc-option-zoom svg {
	display: block;
	flex: none;
}

.pfc-option-text {
	display: flex;
	flex-direction: column;
	line-height: 1.35;
}

.pfc-option-title {
	font-weight: 600;
}

.pfc-option-meta {
	font-size: 0.85em;
	opacity: 0.72;
}

.pfc-option-controls {
	grid-column: 2;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em 1em;
}

.pfc-option:not(.is-selected) .pfc-option-controls {
	display: none;
}

.pfc-control {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	margin: 0;
	font-size: 0.9em;
	font-weight: normal;
}

.pfc-control select {
	width: auto;
	min-width: 4.5em;
	margin: 0;
}

/*
 * Nombre de couleurs : compteur « − 1 + ». La liste d'origine reste dans la page, masquée,
 * ainsi que tout ce qu'un thème aurait pu greffer à côté (listes déroulantes « améliorées »).
 */
.pfc-configurator .pfc-control-colours > :not(.pfc-control-name):not(.pfc-stepper) {
	display: none !important;
}

.pfc-configurator .pfc-stepper {
	display: inline-flex;
	align-items: stretch;
	border: 1px solid var(--pfc-line);
	border-radius: var(--pfc-radius);
	background: #fff;
	color: #1d1d1f;
	overflow: hidden;
	line-height: 1;
}

.pfc-configurator .pfc-stepper .pfc-step {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.1em;
	min-width: 0;
	height: 2.1em;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: inherit;
	font: inherit;
	line-height: 1;
	text-indent: 0;
	cursor: pointer;
}

.pfc-configurator .pfc-stepper .pfc-step:hover:not(:disabled) {
	background: rgba(0, 0, 0, 0.06);
}

.pfc-configurator .pfc-stepper .pfc-step:focus-visible {
	outline: 2px solid var(--pfc-accent);
	outline-offset: -2px;
}

.pfc-configurator .pfc-stepper .pfc-step:disabled {
	opacity: 0.3;
	cursor: default;
}

.pfc-configurator .pfc-stepper .pfc-step svg {
	display: block;
	flex: none;
}

.pfc-configurator .pfc-step-value {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2em;
	padding: 0 0.25em;
	border-left: 1px solid var(--pfc-line);
	border-right: 1px solid var(--pfc-line);
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

/*
 * Listes Couleurs / Taille : certains thèmes leur donnent une largeur fixe et posent leur flèche
 * par-dessus le chiffre. On réserve ici la place de la flèche, avec une spécificité suffisante
 * pour passer devant les règles du thème (« .woocommerce div.product form.cart select »…).
 */
.pfc-configurator .pfc-options .pfc-option .pfc-option-controls .pfc-control select {
	box-sizing: border-box;
	width: auto;
	min-width: 5.5em;
	max-width: 100%;
	height: auto;
	min-height: 2.2em;
	padding: 0.35em 2.4em 0.35em 0.75em;
	line-height: 1.3;
	text-align: left;
	text-indent: 0;
	background-position: right 0.7em center;
	background-size: 0.75em auto;
	background-repeat: no-repeat;
}

.pfc-hint {
	margin: 0;
	font-size: 0.9em;
	opacity: 0.75;
}

.pfc-missing .pfc-mandatory {
	opacity: 1;
	font-weight: 600;
}

/* Estimation */
.pfc-summary {
	font-size: 0.92em;
	transition: opacity 0.15s;
}

.pfc-summary.is-loading {
	opacity: 0.5;
}

.pfc-summary-table tfoot th,
.pfc-summary-table tfoot td {
	padding-top: 0.6em;
	border-bottom: 0;
	font-weight: 600;
	font-size: 1.08em;
}

.pfc-per {
	font-size: 0.85em;
	opacity: 0.7;
}

.pfc-option-check:focus-visible,
.pfc-control select:focus-visible {
	outline: 2px solid var(--pfc-accent);
	outline-offset: 2px;
}

@media (max-width: 480px) {
	.pfc-option-img {
		width: 56px;
		height: 56px;
	}

	.pfc-option-controls {
		grid-column: 1 / -1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pfc-option,
	.pfc-summary {
		transition: none;
	}
}

/* Logo du client */
.pfc-logo [hidden] {
	display: none !important;
}

.pfc-logo {
	grid-column: 1 / -1;
	margin-top: 0.75em;
	padding-top: 0.75em;
	border-top: 1px dashed var(--pfc-line);
}

.pfc-logo[hidden] {
	display: none;
}

.pfc-logo-pick {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5em 0.75em;
}

.pfc-logo-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	padding: 0.45em 0.9em;
	border: 1px solid currentColor;
	border-radius: var(--pfc-radius);
	cursor: pointer;
	font-size: 0.92em;
	line-height: 1.3;
}

.pfc-logo-btn:focus-within {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.pfc-logo-btn input[type="file"] {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	overflow: hidden;
}

.pfc-logo-hint,
.pfc-logo-status,
.pfc-logo-notice {
	font-size: 0.85em;
	opacity: 0.8;
}

.pfc-logo-file {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4em 0.75em;
	font-size: 0.92em;
}

.pfc-logo-file[hidden],
.pfc-logo-alt[hidden],
.pfc-logo-view[hidden] {
	display: none;
}

.pfc-logo-name {
	font-weight: 600;
	word-break: break-all;
}

.pfc-logo-remove {
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	text-decoration: underline;
	cursor: pointer;
	font-size: 0.9em;
}

.pfc-logo-status.is-error {
	opacity: 1;
	color: #b32d2e;
}

.pfc-logo-alt {
	margin-top: 0.5em;
	font-size: 0.9em;
}

.pfc-logo-view {
	margin-top: 0.75em;
}

.pfc-logo-view .pfc-mk {
	border: 1px solid var(--pfc-line);
}

.pfc-logo-size {
	display: flex;
	align-items: center;
	gap: 0.6em;
	max-width: 420px;
	margin-top: 0.5em;
	font-size: 0.9em;
}

.pfc-logo-size input[type="range"] {
	flex: 1;
}

.pfc-logo-notice {
	margin: 0.4em 0 0;
}

.pfc-configurator.is-uploading .single_add_to_cart_button,
form.cart.pfc-uploading .single_add_to_cart_button {
	opacity: 0.6;
	pointer-events: none;
}

.pfc-logo-rot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4em 0.6em;
	max-width: 420px;
	margin-top: 0.5em;
	font-size: 0.9em;
}

.pfc-logo-rot-slider {
	display: flex;
	flex: 1 1 14em;
	align-items: center;
	gap: 0.6em;
}

.pfc-logo-rot-slider input[type="range"] {
	flex: 1;
}

.pfc-logo-rot-value {
	min-width: 3.2em;
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.pfc-rot-btns {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 0.35em;
}

.pfc-rot-btn {
	padding: 0.3em 0.65em;
	border: 1px solid var(--pfc-line);
	border-radius: var(--pfc-radius);
	background: none;
	color: inherit;
	font-size: 0.95em;
	line-height: 1.3;
	cursor: pointer;
}

.pfc-rot-btn:hover:not(:disabled) {
	border-color: currentColor;
}

.pfc-rot-btn:disabled {
	opacity: 0.45;
	cursor: default;
}

.pfc-logo-colours {
	margin: 0.6em 0 0;
	font-size: 0.9em;
}

.pfc-logo-colours.is-warning {
	color: #8a4b00;
}

.pfc-swatches {
	display: inline-flex;
	gap: 3px;
	vertical-align: middle;
}

.pfc-swatch {
	display: inline-block;
	width: 1em;
	height: 1em;
	border-radius: 50%;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.pfc-control-wide {
	flex: 1 1 16em;
}

.pfc-control-wide .pfc-location {
	width: 100%;
	min-width: 10em;
}

/* Techniques de marquage : une carte par technique, les emplacements en dessous */
.pfc-techniques {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 14.5em), 1fr));
	gap: 0.6em;
	margin-bottom: 1em;
}

.pfc-tech {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.2em;
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	max-width: none;
	height: auto;
	margin: 0;
	padding: 0.8em 0.95em;
	border: 1px solid var(--pfc-line);
	border-radius: var(--pfc-radius);
	background: none;
	color: inherit;
	font: inherit;
	line-height: 1.35;
	text-align: left;
	text-transform: none;
	letter-spacing: normal;
	white-space: normal;
	overflow-wrap: anywhere;
	cursor: pointer;
	transition: border-color 0.15s, background-color 0.15s;
}

.pfc-tech:hover {
	border-color: currentColor;
	background: none;
	color: inherit;
}

.pfc-tech.is-active {
	border-color: var(--pfc-accent);
	background: var(--pfc-soft);
	box-shadow: inset 0 0 0 1px var(--pfc-accent);
}

.pfc-tech:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.pfc-tech-name {
	max-width: 100%;
	font-weight: 600;
	font-size: 1.02em;
	hyphens: auto;
	-webkit-hyphens: auto;
}

.pfc-tech > span {
	max-width: 100%;
}

.pfc-tech-price {
	font-size: 0.95em;
	font-variant-numeric: tabular-nums;
}

.pfc-tech-setup,
.pfc-tech-facts {
	font-size: 0.85em;
	opacity: 0.75;
}

.pfc-tech-price:empty,
.pfc-tech-setup:empty,
.pfc-tech-facts:empty {
	display: none;
}

.pfc-tech-foot {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35em;
	margin-top: 0.35em;
}

.pfc-tech-foot:empty {
	display: none;
}

.pfc-tech-tag,
.pfc-tech-count {
	padding: 0.1em 0.5em;
	border-radius: 999px;
	font-size: 0.78em;
	line-height: 1.5;
}

.pfc-tech-tag {
	border: 1px solid var(--pfc-line);
}

.pfc-tech-count[hidden] {
	display: none;
}

.pfc-tech-count {
	background: var(--pfc-soft);
	box-shadow: inset 0 0 0 1px currentColor;
	font-weight: 600;
}

.pfc-positions {
	display: grid;
	gap: 0.5em;
}

.pfc-positions .pfc-option[hidden] {
	display: none;
}

/* Aperçu du logo : bouton « Agrandir » posé sur l'aperçu */
.pfc-logo-stage-wrap {
	position: relative;
	max-width: 420px;
}

.pfc-logo-thumb {
	cursor: zoom-in;
}

.pfc-configurator .pfc-logo-zoom {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	width: auto;
	min-width: 0;
	height: auto;
	margin: 0;
	padding: 0.35em 0.65em;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.92);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
	color: #1d1d1f;
	font: inherit;
	font-size: 0.8em;
	font-weight: 600;
	line-height: 1.2;
	text-transform: none;
	letter-spacing: normal;
	cursor: zoom-in;
}

.pfc-configurator .pfc-logo-zoom:hover,
.pfc-configurator .pfc-logo-zoom:focus-visible {
	background: #fff;
	color: #000;
	border-color: rgba(0, 0, 0, 0.35);
}

.pfc-configurator .pfc-logo-zoom svg {
	display: block;
	flex: none;
}

/* Aperçu agrandi (fenêtre plein écran) */
html.pfc-zoom-open,
html.pfc-zoom-open body {
	overflow: hidden !important;
}

.pfc-zoom {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	flex-direction: column;
	background: rgba(15, 15, 18, 0.92);
	color: #fff;
	font-size: 15px;
	line-height: 1.4;
}

.pfc-zoom-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1em;
	padding: max(10px, env(safe-area-inset-top, 0px)) 14px 10px;
	flex: none;
}

.pfc-zoom-tools {
	display: flex;
	align-items: center;
	gap: 6px;
}

.pfc-zoom .pfc-zoom-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: auto;
	min-width: 40px;
	height: 40px;
	white-space: nowrap;
	margin: 0;
	padding: 0 10px;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	box-shadow: none;
	color: #fff;
	font: inherit;
	font-size: 18px;
	font-weight: 600;
	line-height: 1;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
}

.pfc-zoom .pfc-zoom-reset {
	font-size: 13px;
}

.pfc-zoom .pfc-zoom-close {
	font-size: 24px;
}

.pfc-zoom .pfc-zoom-btn:hover:not(:disabled),
.pfc-zoom .pfc-zoom-btn:focus-visible {
	background: rgba(255, 255, 255, 0.2);
	color: #fff;
}

.pfc-zoom .pfc-zoom-btn:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.pfc-zoom .pfc-zoom-btn:disabled {
	opacity: 0.35;
	cursor: default;
}

.pfc-zoom-level {
	min-width: 4.2em;
	text-align: center;
	font-variant-numeric: tabular-nums;
	font-size: 14px;
}

.pfc-zoom-viewport {
	position: relative;
	flex: 1;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	touch-action: none;
	cursor: zoom-in;
	user-select: none;
	-webkit-user-select: none;
}

.pfc-zoom.is-zoomed .pfc-zoom-viewport {
	cursor: grab;
}

.pfc-zoom.is-zoomed .pfc-zoom-viewport:active {
	cursor: grabbing;
}

.pfc-zoom-canvas {
	flex: none;
	transform-origin: 50% 50%;
	will-change: transform;
}

.pfc-zoom-stage {
	display: block;
	line-height: 0;
}

.pfc-zoom .pfc-mk {
	max-width: none;
	border-radius: 8px;
	box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
}

.pfc-zoom-stage.is-logo {
	padding: 16px;
	box-sizing: border-box;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
}

.pfc-zoom .pfc-zoom-logo {
	display: block;
	width: 100%;
	max-width: none;
	height: auto;
	margin: 0;
	pointer-events: none;
}

.pfc-zoom-help {
	flex: none;
	margin: 0;
	padding: 8px 14px max(12px, env(safe-area-inset-bottom, 0px));
	text-align: center;
	font-size: 13px;
	opacity: 0.75;
}

@media (max-width: 480px) {
	.pfc-zoom .pfc-zoom-reset {
		display: none;
	}
}

/* Aperçu agrandi de l'emplacement (avant l'envoi du logo) : zone de marquage mise en évidence */
.pfc-zoom {
	--pfc-zone: #0a84ff;
}

.pfc-zoom-stage.pfc-mk.is-area:not(.no-zone):not(.zone-guess) .pfc-mk-outline {
	display: block;
}

.pfc-zoom-stage.pfc-mk.is-area .pfc-mk-outline polygon {
	fill: rgba(10, 132, 255, 0.14);
	fill: color-mix(in srgb, var(--pfc-zone) 14%, transparent);
	stroke: var(--pfc-zone);
	stroke-width: 2;
	stroke-dasharray: 6 4;
}

.pfc-zoom-caption {
	flex: none;
	margin: 0;
	padding: 10px 14px 0;
	text-align: center;
	font-size: 15px;
	font-weight: 600;
}

/* Référence PF sous le titre de la fiche */
.pfc-reference {
	margin: 0 0 0.8em;
	font-size: 0.9em;
	opacity: 0.8;
}

.pfc-reference[hidden] {
	display: none;
}

.pfc-reference-value {
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

/* Référence dans le formulaire d'achat, au-dessus de la personnalisation */
.pfc-reference.pfc-reference-form {
	margin: 0.4em 0 0.8em;
}

/* Quantité sous le minimum de marquage imposé */
.pfc-min-notice {
	margin: 0.6em 0 0;
	padding: 0.6em 0.8em;
	border-left: 3px solid #d63638;
	border-radius: 4px;
	background: #fcf0f1;
	color: #8a2424;
	font-size: 0.92em;
}

.pfc-configurator .pfc-min-notice .pfc-set-min {
	display: inline-block;
	width: auto;
	min-width: 0;
	height: auto;
	margin: 0.3em 0 0;
	padding: 0.3em 0.8em;
	border: 1px solid currentColor;
	border-radius: 999px;
	background: #fff;
	color: inherit;
	font: inherit;
	font-weight: 600;
	line-height: 1.3;
	text-transform: none;
	cursor: pointer;
}

.pfc-configurator .pfc-min-notice .pfc-set-min:hover {
	background: #8a2424;
	color: #fff;
}
