.plv-cadres-configurator {
	--plv-primary: #1a5f7a;
	--plv-primary-dark: #134b61;
	--plv-border: #e2e8f0;
	--plv-bg: #f8fafc;
	--plv-radius: 12px;
	--plv-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
	max-width: 1100px;
	margin: 0 auto;
	font-family: inherit;
}

.plv-config-header {
	margin-bottom: 1.5rem;
}

.plv-config-title {
	margin: 0 0 0.5rem;
	font-size: clamp(1.5rem, 3vw, 2rem);
}

.plv-config-subtitle {
	margin: 0;
	color: #64748b;
}

.plv-config-layout {
	display: grid;
	grid-template-columns: 1fr 320px;
	gap: 1.5rem;
	align-items: start;
}

.plv-section {
	background: #fff;
	border: 1px solid var(--plv-border);
	border-radius: var(--plv-radius);
	padding: 1.25rem;
	margin-bottom: 1rem;
}

.plv-section h3 {
	margin: 0 0 1rem;
	font-size: 1.1rem;
}

.plv-dimensions-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

.plv-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.35rem;
}

.plv-field input[type="number"] {
	width: 100%;
	padding: 0.75rem 0.9rem;
	border: 1px solid var(--plv-border);
	border-radius: 8px;
	font-size: 1rem;
}

.plv-profiles-stack {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	width: 100%;
}

.plv-profile-dropdown {
	position: relative;
	width: 100%;
}

.plv-profile-dropdown-trigger {
	display: flex;
	align-items: stretch;
	gap: 0;
	width: 100%;
	min-height: 112px;
	padding: 0;
	border: 2px solid var(--plv-border);
	border-radius: var(--plv-radius);
	background: #fff;
	cursor: pointer;
	text-align: left;
	overflow: hidden;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.plv-profile-dropdown-trigger:hover,
.plv-profile-dropdown.is-open .plv-profile-dropdown-trigger {
	border-color: var(--plv-primary);
	box-shadow: 0 0 0 3px rgba(26, 95, 122, 0.12);
}

.plv-profile-dropdown-trigger-content {
	display: flex;
	align-items: stretch;
	gap: 0;
	flex: 1;
	min-width: 0;
}

.plv-profile-dropdown-trigger-thumb {
	flex-shrink: 0;
	width: 148px;
	min-height: 112px;
	border-radius: 0;
	overflow: hidden;
	background: var(--plv-bg);
	border: none;
	border-right: 1px solid var(--plv-border);
	display: flex;
	align-items: center;
	justify-content: center;
}

.plv-profile-dropdown-trigger-thumb img {
	width: 100%;
	height: 100%;
	min-height: 112px;
	object-fit: contain;
	display: block;
	padding: 0.5rem;
	box-sizing: border-box;
}

.plv-profile-dropdown-trigger-text {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 0.35rem;
	min-width: 0;
	flex: 1;
	padding: 1rem 1.15rem;
}

.plv-profile-dropdown-trigger-name {
	font-size: 1rem;
	font-weight: 700;
	color: #0f172a;
	line-height: 1.3;
	text-transform: none;
}

.plv-profile-dropdown-trigger-meta {
	font-size: 0.85rem;
	color: #64748b;
}

.plv-profile-dropdown-chevron {
	flex-shrink: 0;
	align-self: center;
	width: 10px;
	height: 10px;
	border-right: 2px solid #64748b;
	border-bottom: 2px solid #64748b;
	transform: rotate(45deg) translateY(-2px);
	transition: transform 0.2s;
	margin: 0 1.15rem 0 0.5rem;
}

.plv-profile-dropdown.is-open .plv-profile-dropdown-chevron {
	transform: rotate(-135deg) translateY(2px);
}

.plv-profile-dropdown-panel {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	z-index: 30;
	max-height: 420px;
	overflow-y: auto;
	padding: 0.5rem;
	background: #fff;
	border: 1px solid var(--plv-border);
	border-radius: var(--plv-radius);
	box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14), 0 4px 12px rgba(15, 23, 42, 0.08);
}

.plv-profile-dropdown-option {
	display: flex;
	align-items: stretch;
	gap: 0;
	padding: 0;
	border-radius: 10px;
	cursor: pointer;
	transition: background 0.15s, box-shadow 0.15s;
	border: 2px solid transparent;
	overflow: hidden;
	min-height: 96px;
}

.plv-profile-dropdown-option:hover {
	background: #f8fafc;
}

.plv-profile-dropdown-option.is-selected {
	background: rgba(26, 95, 122, 0.06);
	border-color: rgba(26, 95, 122, 0.2);
}

.plv-profile-dropdown-option input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.plv-profile-dropdown-option-thumb {
	flex-shrink: 0;
	width: 120px;
	min-height: 96px;
	border-radius: 0;
	overflow: hidden;
	background: var(--plv-bg);
	border: none;
	border-right: 1px solid var(--plv-border);
	display: flex;
	align-items: center;
	justify-content: center;
}

.plv-profile-dropdown-option-thumb img {
	width: 100%;
	height: 100%;
	min-height: 96px;
	object-fit: contain;
	display: block;
	padding: 0.45rem;
	box-sizing: border-box;
}

.plv-profile-dropdown-option-placeholder {
	font-size: 0.72rem;
	color: #94a3b8;
}

.plv-profile-dropdown-option-body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 0.3rem;
	flex: 1;
	min-width: 0;
	padding: 0.85rem 1rem;
}

.plv-profile-dropdown-option-name {
	font-size: 0.95rem;
	font-weight: 700;
	color: #0f172a;
	line-height: 1.3;
}

.plv-profile-dropdown-option-meta {
	font-size: 0.82rem;
	color: #64748b;
}

.plv-profile-dropdown-option-check {
	flex-shrink: 0;
	align-self: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	border: 2px solid var(--plv-border);
	background: #fff;
	position: relative;
	opacity: 0.35;
	margin-right: 0.85rem;
}

.plv-profile-dropdown-option.is-selected .plv-profile-dropdown-option-check {
	opacity: 1;
	border-color: var(--plv-primary);
	background: var(--plv-primary);
}

.plv-profile-dropdown-option.is-selected .plv-profile-dropdown-option-check::after {
	content: '';
	position: absolute;
	top: 3px;
	left: 6px;
	width: 5px;
	height: 9px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.plv-profiles-stack .plv-colors-picker {
	margin-top: 0.25rem;
}

.plv-profiles-stack .plv-preview {
	width: 100%;
	margin-top: 0.5rem;
	min-height: 220px;
}

.plv-colors-picker {
	margin-top: 0.85rem;
}

.plv-colors-title {
	margin: 0 0 0.55rem;
	font-size: 0.85rem;
	font-weight: 600;
	color: #334155;
}

.plv-colors-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
}

.plv-color-swatch {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.3rem 0.45rem 0.3rem 0.3rem;
	border: 2px solid var(--plv-border);
	border-radius: 999px;
	cursor: pointer;
	background: #fff;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.plv-color-swatch input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.plv-color-swatch.is-selected {
	border-color: var(--plv-primary);
	box-shadow: 0 0 0 2px rgba(26, 95, 122, 0.12);
}

.plv-color-chip {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 1px solid rgba(15, 23, 42, 0.12);
	flex-shrink: 0;
}

.plv-color-name {
	font-size: 0.72rem;
	color: #475569;
	white-space: nowrap;
}

.plv-profiles-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(96px, 112px));
	gap: 0.55rem;
	justify-content: start;
}

.plv-profile-card {
	display: block;
	max-width: 112px;
	border: 2px solid var(--plv-border);
	border-radius: var(--plv-radius);
	overflow: hidden;
	cursor: pointer;
	transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
	background: #fff;
}

.plv-profile-card input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.plv-profile-card:hover {
	border-color: #94a3b8;
	transform: translateY(-2px);
}

.plv-profile-card.is-selected {
	border-color: var(--plv-primary);
	box-shadow: 0 0 0 3px rgba(26, 95, 122, 0.15);
}

.plv-profile-image {
	aspect-ratio: auto;
	background: var(--plv-bg);
	display: block;
	overflow: hidden;
}

.plv-profile-gallery-main {
	position: relative;
	aspect-ratio: 1 / 1;
	max-height: 72px;
	overflow: hidden;
}

.plv-profile-gallery-current {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.plv-gallery-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 22px;
	height: 22px;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	color: var(--plv-primary-dark);
	font-size: 1.2rem;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	z-index: 2;
}

.plv-gallery-prev {
	left: 8px;
}

.plv-gallery-next {
	right: 8px;
}

.plv-gallery-counter {
	position: absolute;
	right: 8px;
	bottom: 8px;
	background: rgba(15, 23, 42, 0.72);
	color: #fff;
	font-size: 0.75rem;
	padding: 0.2rem 0.45rem;
	border-radius: 4px;
	z-index: 2;
}

.plv-profile-gallery-thumbs {
	display: flex;
	gap: 0.25rem;
	padding: 0.35rem;
	overflow-x: auto;
	background: #fff;
	border-top: 1px solid var(--plv-border);
}

.plv-gallery-thumb {
	flex: 0 0 24px;
	width: 24px;
	height: 24px;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 6px;
	overflow: hidden;
	cursor: pointer;
	background: #fff;
}

.plv-gallery-thumb.is-active {
	border-color: var(--plv-primary);
}

.plv-gallery-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.plv-profile-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.plv-profile-placeholder {
	color: #94a3b8;
	font-size: 0.9rem;
}

.plv-profile-body {
	padding: 0.4rem 0.45rem 0.5rem;
}

.plv-profile-name {
	display: block;
	margin-bottom: 0.1rem;
	font-size: 0.72rem;
	line-height: 1.2;
}

.plv-profile-depth {
	display: block;
	font-size: 0.65rem;
	color: #64748b;
	line-height: 1.25;
}

.plv-profile-price-hint {
	display: none;
}

.plv-profile-desc {
	display: none;
}

.plv-config-sidebar {
	position: sticky;
	top: 1rem;
}

.plv-preview {
	background: var(--plv-bg);
	border: 1px solid var(--plv-border);
	border-radius: var(--plv-radius);
	padding: 0.85rem 1rem 1rem;
	margin-bottom: 1rem;
	overflow: visible;
}

.plv-preview-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.35rem;
}

.plv-preview-badge {
	display: inline-block;
	font-size: 0.68rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #64748b;
	background: #fff;
	border: 1px solid var(--plv-border);
	border-radius: 999px;
	padding: 0.2rem 0.55rem;
}

.plv-preview-notice {
	margin: 0 0 0.65rem;
	font-size: 0.72rem;
	color: #94a3b8;
	line-height: 1.35;
}

.plv-preview .plv-preview-mode-toggle {
	display: inline-flex;
	flex-direction: row;
	align-items: center;
	padding: 2px;
	border-radius: 6px;
	background: #e8edf2;
	flex-shrink: 0;
	gap: 1px;
}

.plv-preview .plv-preview-mode-btn {
	display: inline-flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	min-width: 0;
	padding: 3px 9px;
	border: none !important;
	border-radius: 4px;
	background: transparent !important;
	color: #64748b !important;
	font-size: 0.68rem;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
	-webkit-tap-highlight-color: transparent;
	box-shadow: none !important;
}

.plv-preview .plv-preview-mode-btn:hover {
	color: #334155 !important;
}

.plv-preview .plv-preview-mode-btn.is-active {
	background: var(--plv-primary) !important;
	color: #fff !important;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12) !important;
}

.plv-preview .plv-preview-mode-btn:focus-visible {
	outline: 2px solid var(--plv-primary);
	outline-offset: 1px;
}

.plv-preview-stage {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 200px;
	padding: 1.25rem 0.75rem 1.5rem;
	background: radial-gradient(ellipse at center, #ffffff 0%, #eef2f7 72%);
	border-radius: 10px;
	margin-top: 0.35rem;
}

.plv-preview-scene {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 220px;
	padding: 1rem 1.5rem 1.25rem;
}

.plv-preview-view {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
}

.plv-preview-view-3d {
	perspective: 1100px;
	perspective-origin: 42% 38%;
	padding: 0.5rem 2rem 1.5rem 0.5rem;
}

.plv-preview-frame {
	position: relative;
	border: 5px solid var(--plv-primary);
	background: rgba(26, 95, 122, 0.08);
	min-width: 60px;
	min-height: 60px;
	border-radius: 0;
	transition: width 0.25s, height 0.25s, border-color 0.25s, background 0.25s, box-shadow 0.35s;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16), 0 3px 8px rgba(15, 23, 42, 0.1);
}

.plv-preview-frame.is-light-color {
	background: #ffffff !important;
	box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(100, 116, 139, 0.5) !important;
}

/* Aperçu 3D — cadre alu droit (tasseaux) */
.plv-frame-3d {
	position: relative;
}

.plv-frame-3d-body {
	--frame-color: #94a3b8;
	--frame-dark: #64748b;
	--frame-darker: #475569;
	--ft: 11px;
	--fd: 14px;
	position: relative;
	transform-style: preserve-3d;
	transform: rotateY(-38deg) rotateX(7deg);
	filter: drop-shadow(10px 14px 18px rgba(15, 23, 42, 0.22));
}

.plv-frame-opening {
	position: absolute;
	inset: var(--ft);
	background: #fff;
	z-index: 0;
}

.plv-frame-bar {
	position: absolute;
	background: var(--frame-color);
	z-index: 1;
}

.plv-frame-bar-top {
	top: 0;
	left: 0;
	width: 100%;
	height: var(--ft);
}

.plv-frame-bar-bottom {
	bottom: 0;
	left: 0;
	width: 100%;
	height: var(--ft);
}

.plv-frame-bar-left {
	top: var(--ft);
	left: 0;
	width: var(--ft);
	height: calc(100% - (var(--ft) * 2));
}

.plv-frame-bar-right {
	top: var(--ft);
	right: 0;
	width: var(--ft);
	height: calc(100% - (var(--ft) * 2));
}

.plv-frame-face {
	position: absolute;
	background: var(--frame-dark);
	z-index: 0;
}

.plv-frame-face-right {
	top: 0;
	left: 100%;
	width: var(--fd);
	height: 100%;
	transform-origin: left center;
	transform: rotateY(90deg);
}

.plv-frame-face-bottom {
	top: 100%;
	left: 0;
	width: 100%;
	height: var(--fd);
	transform-origin: top center;
	transform: rotateX(-90deg);
	background: var(--frame-darker);
}

.plv-frame-3d-body.is-light-color .plv-frame-bar {
	box-shadow: inset 0 0 0 1px rgba(100, 116, 139, 0.35);
}

.plv-frame-3d-body.is-light-color .plv-frame-face-right,
.plv-frame-3d-body.is-light-color .plv-frame-face-bottom {
	opacity: 1;
}

.plv-frame-3d .plv-preview-label {
	z-index: 5;
}

.plv-preview-label {
	position: absolute;
	font-size: 0.75rem;
	background: var(--plv-primary);
	color: #fff;
	padding: 0.15rem 0.4rem;
	border-radius: 4px;
	white-space: nowrap;
}

.plv-preview-label-width {
	bottom: -1.6rem;
	left: 50%;
	transform: translateX(-50%);
}

.plv-preview-label-height {
	right: -0.5rem;
	top: 50%;
	transform: translate(100%, -50%);
}

.plv-summary {
	background: #fff;
	border: 1px solid var(--plv-border);
	border-radius: var(--plv-radius);
	padding: 1.25rem;
	box-shadow: var(--plv-shadow);
}

.plv-summary h3 {
	margin: 0 0 1rem;
}

.plv-summary-list {
	margin: 0 0 1rem;
}

.plv-summary-row {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.35rem 0;
	border-bottom: 1px dashed var(--plv-border);
}

.plv-summary-row dt {
	margin: 0;
	color: #64748b;
}

.plv-summary-row dd {
	margin: 0;
	font-weight: 600;
	text-align: right;
}

.plv-options {
	margin: 0 0 1rem;
	padding: 0.85rem 0;
	border-top: 1px solid var(--plv-border);
	border-bottom: 1px solid var(--plv-border);
}

.plv-option-checkbox {
	display: flex;
	align-items: flex-start;
	gap: 0.65rem;
	cursor: pointer;
	font-size: 0.95rem;
	line-height: 1.4;
}

.plv-option-checkbox input[type="checkbox"] {
	margin: 0.15rem 0 0;
	width: 1.05rem;
	height: 1.05rem;
	flex-shrink: 0;
	accent-color: var(--plv-primary);
}

.plv-option-label {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.5rem;
}

.plv-option-price {
	color: var(--plv-primary-dark);
	font-weight: 700;
}

.plv-breakdown {
	display: none;
	list-style: none;
	margin: 0 0 1rem;
	padding: 0;
	font-size: 0.9rem;
	color: #475569;
}

.plv-breakdown li {
	display: flex;
	justify-content: space-between;
	padding: 0.2rem 0;
}

.plv-total {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.75rem 0;
	border-top: 2px solid var(--plv-border);
	margin-bottom: 1rem;
}

.plv-total-price {
	font-size: 1.5rem;
	color: var(--plv-primary-dark);
}

.plv-message {
	color: #b91c1c;
	font-size: 0.9rem;
	margin: 0 0 0.75rem;
}

.plv-message.is-success {
	color: #15803d;
}

.plv-btn-add-cart {
	width: 100%;
	padding: 0.9rem 1rem !important;
	background: var(--plv-primary) !important;
	border-color: var(--plv-primary) !important;
	font-size: 1rem !important;
}

.plv-btn-add-cart:hover {
	background: var(--plv-primary-dark) !important;
	border-color: var(--plv-primary-dark) !important;
}

.plv-btn-add-cart:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.plv-notice {
	padding: 1rem;
	background: #fff7ed;
	border: 1px solid #fdba74;
	border-radius: 8px;
}

.plv-cadres-alu-product .plv-cadres-configurator {
	margin: 1.5rem 0 0;
	width: 100%;
}

.plv-cadres-alu-product .plv-config-layout {
	grid-template-columns: 1fr;
}

.plv-cadres-alu-product .plv-config-sidebar {
	position: static;
}

.plv-product-header-bar {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.75rem 1rem;
	margin: 0 0 0.75rem;
}

.plv-product-live-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.65rem;
}

.plv-live-price-chip,
.plv-live-format-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.55rem 0.95rem;
	border-radius: 12px;
	line-height: 1.2;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.plv-live-price-chip {
	background: linear-gradient(135deg, #ecfeff 0%, #e0f2fe 100%);
	border: 1px solid #7dd3fc;
	color: #0c4a6e;
}

.plv-live-format-chip {
	background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
	border: 1px solid #cbd5e1;
	color: #334155;
}

.plv-live-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.35rem;
	height: 1.35rem;
	flex-shrink: 0;
	opacity: 0.9;
}

.plv-live-icon svg {
	width: 100%;
	height: 100%;
	display: block;
}

.plv-live-icon-price {
	color: #0369a1;
}

.plv-live-icon-format {
	color: #475569;
}

.plv-product-live-price {
	font-size: 1.55rem !important;
	font-weight: 800 !important;
	letter-spacing: -0.02em;
	line-height: 1;
	white-space: nowrap;
}

.plv-product-live-format {
	font-size: 1.05rem;
	font-weight: 700;
	color: #334155;
	white-space: nowrap;
}

.plv-scroll-to-configurator {
	display: inline-flex !important;
	align-items: center;
	padding: 0.55rem 1rem !important;
	font-size: 0.82rem !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	background: var(--plv-primary, #1a5f7a) !important;
	border-color: var(--plv-primary, #1a5f7a) !important;
	color: #fff !important;
	border-radius: 10px !important;
	text-decoration: none !important;
	white-space: nowrap;
	box-shadow: 0 2px 8px rgba(26, 95, 122, 0.25);
}

.plv-scroll-to-configurator:hover {
	background: var(--plv-primary-dark, #134b61) !important;
	border-color: var(--plv-primary-dark, #134b61) !important;
	color: #fff !important;
}

@media (max-width: 900px) {
	.plv-config-layout {
		grid-template-columns: 1fr;
	}

	.plv-config-sidebar {
		position: static;
	}

	.plv-dimensions-grid {
		grid-template-columns: 1fr;
	}

	.plv-profile-dropdown-trigger-thumb {
		width: 112px;
		min-height: 96px;
	}

	.plv-profile-dropdown-trigger-thumb img {
		min-height: 96px;
	}

	.plv-profile-dropdown-trigger-name {
		font-size: 0.9rem;
	}

	.plv-profile-dropdown-option-thumb {
		width: 96px;
		min-height: 84px;
	}

	.plv-profile-dropdown-option-thumb img {
		min-height: 84px;
	}

	.plv-profiles-stack .plv-preview {
		min-height: 180px;
	}
}

.plv-loop-price-label {
	display: inline-block;
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--plv-primary, #1a5f7a);
	letter-spacing: 0.01em;
}
