/* 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;
}

/* 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);
}

.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;
}

.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;
	}
}
