/* Configurateur PanoPlus — design système PanoPlus v1.0 (23/10/2026). */

.ppcfg {
	--pp-brand: #F28C00;
	--pp-brand-dark: #C46F00;
	--pp-text: #1E1E1E;
	--pp-muted: #6F6F6F;
	--pp-surface: #F5F5F5;
	--pp-background: #FFFFFF;
	--pp-cream: #F9F0C8;
	--pp-line: #E2E2E2;
	--pp-error: #B3261E;
	--pp-success: #1E6B3A;
	--pp-radius-card: 12px;
	--pp-radius-field: 6px;
	--pp-radius-button: 24px;
	--pp-content-width: 1200px;
	--pp-font-body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--pp-font-title: Montserrat, Inter, system-ui, sans-serif;

	max-width: var(--pp-content-width);
	margin: 0 auto;
	padding: 0 20px 96px;
	color: var(--pp-text);
	background: var(--pp-background);
	font-family: var(--pp-font-body);
	font-size: 16px;
	line-height: 26px;
	box-sizing: border-box;
}
.ppcfg *, .ppcfg *::before, .ppcfg *::after { box-sizing: border-box; }
.ppcfg-defs { position: absolute; }

.ppcfg h2, .ppcfg h3 { font-family: var(--pp-font-title); color: var(--pp-text); margin: 0; }
.ppcfg h2 { font-size: 36px; line-height: 44px; font-weight: 700; }
.ppcfg h3 { font-size: 24px; line-height: 32px; font-weight: 600; }
.ppcfg p { margin: 0; }
.ppcfg a { color: var(--pp-text); text-decoration: underline; text-underline-offset: 3px; }
.ppcfg a:hover { color: var(--pp-brand-dark); }
.ppcfg-aide { font-size: 14px; line-height: 20px; color: var(--pp-muted); }
.ppcfg-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ppcfg :focus-visible { outline: 2px solid var(--pp-text); outline-offset: 3px; }

/* Progression */
.ppcfg-progression { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 32px 0 0; padding: 0; }
.ppcfg-progression a { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: var(--pp-radius-button); background: var(--pp-surface); font-size: 14px; line-height: 20px; font-weight: 600; text-decoration: none; }
.ppcfg-progression span { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--pp-background); }
.ppcfg-progression a.est-fait span { background: var(--pp-brand); }

/* Étapes */
.ppcfg-etape { padding: 64px 0 0; }
.ppcfg-etape__tete { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 24px; }
.ppcfg-etape__tete .ppcfg-aide { margin-top: 8px; max-width: 760px; }
.ppcfg-etape__num { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--pp-brand); color: var(--pp-text); font-family: var(--pp-font-title); font-weight: 700; font-size: 20px; }
.ppcfg-vide { padding: 24px; border: 1px dashed var(--pp-line); border-radius: var(--pp-radius-card); color: var(--pp-muted); text-align: center; }

/* Boutons : 48 px, rayon 24 px, marges 24 px, Inter 600 */
.ppcfg-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; padding: 0 24px; border-radius: var(--pp-radius-button);
	border: 2px solid transparent; font: 600 16px/1.2 var(--pp-font-body);
	text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s;
}
.ppcfg .ppcfg-btn { text-decoration: none; }
.ppcfg-btn--primaire { background: var(--pp-brand); color: var(--pp-text); }
.ppcfg-btn--primaire:hover { background: var(--pp-brand-dark); color: var(--pp-text); }
.ppcfg-btn--secondaire { background: var(--pp-background); color: var(--pp-text); border-color: var(--pp-text); }
.ppcfg-btn--secondaire:hover { background: var(--pp-surface); color: var(--pp-text); }
.ppcfg-btn--lien { min-height: 40px; padding: 0 12px; background: none; color: var(--pp-text); text-decoration: underline; text-underline-offset: 3px; }
.ppcfg-btn--petit { min-height: 40px; padding: 0 16px; font-size: 14px; white-space: nowrap; }
.ppcfg-groupe__tete .ppcfg-btn--lien { flex: none; white-space: nowrap; }
.ppcfg-btn--plein { width: 100%; }
.ppcfg-btn:disabled, .ppcfg-btn[aria-disabled="true"] { background: var(--pp-surface); border-color: var(--pp-line); color: var(--pp-muted); cursor: not-allowed; }

/* Filtres */
.ppcfg-filtres { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.ppcfg-filtre { min-height: 40px; padding: 0 16px; border-radius: var(--pp-radius-button); border: 1px solid var(--pp-line); background: var(--pp-background); color: var(--pp-text); font: 600 14px/1 var(--pp-font-body); cursor: pointer; }
.ppcfg-filtre[aria-pressed="true"] { background: var(--pp-text); border-color: var(--pp-text); color: var(--pp-background); }

/* Cartes : 4 / 2 / 1 colonnes, rayon 12 px */
.ppcfg-cartes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; list-style: none; margin: 0; padding: 0; }
.ppcfg-carte { display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 1px solid var(--pp-line); border-radius: var(--pp-radius-card); background: var(--pp-background); }
.ppcfg-carte[hidden] { display: none; }
.ppcfg-carte.est-choisie { border-color: var(--pp-brand); box-shadow: 0 0 0 1px var(--pp-brand); }
.ppcfg-carte__visuel { aspect-ratio: 16 / 9; margin-bottom: 8px; border-radius: 8px; overflow: hidden; display: grid; place-items: center; font: 700 14px/1 var(--pp-font-title); letter-spacing: .08em; text-transform: uppercase; color: rgba(30, 30, 30, .55); }
.ppcfg-carte__visuel img { width: 100%; height: 100%; object-fit: cover; }
.ppcfg-matiere--mdf { background: linear-gradient(135deg, #C9A97E, #B8946A); }
.ppcfg-matiere--melamine { background: linear-gradient(135deg, #FFFFFF, #ECECEC); border: 1px solid var(--pp-line); }
.ppcfg-matiere--contreplaque { background: repeating-linear-gradient(90deg, #E2C391 0 9px, #D6B47E 9px 14px, #E8CC9E 14px 26px); }
.ppcfg-carte__titre.ppcfg-carte__titre { font-size: 18px; line-height: 24px; }
.ppcfg-carte__format { font-size: 14px; line-height: 20px; color: var(--pp-muted); }
.ppcfg-carte__prix { font-weight: 700; }
.ppcfg-badges { display: flex; flex-wrap: wrap; gap: 4px; min-height: 8px; margin: 4px 0 8px; }
.ppcfg-badge { padding: 2px 8px; border-radius: 12px; background: var(--pp-surface); font-size: 12px; line-height: 18px; }
.ppcfg-badge--creme { background: var(--pp-cream); }
.ppcfg-carte .ppcfg-btn { margin-top: auto; }

/* Groupe (un tableau de cotes par référence) */
.ppcfg-groupe { margin-bottom: 32px; border: 1px solid var(--pp-line); border-radius: var(--pp-radius-card); overflow: hidden; }
.ppcfg-groupe__tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 16px 24px; background: var(--pp-surface); }
.ppcfg-groupe__tete h3 { font-size: 22px; line-height: 30px; }
.ppcfg-groupe__corps { padding: 16px 24px 24px; }
.ppcfg-groupe__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }

/* Champs : rayon 6 px, libellés permanents */
.ppcfg input[type="text"], .ppcfg input[type="number"], .ppcfg input[type="email"], .ppcfg input[type="tel"], .ppcfg select, .ppcfg textarea {
	width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid #9A9A9A; border-radius: var(--pp-radius-field);
	background: var(--pp-background); color: var(--pp-text); font: 16px/24px var(--pp-font-body); margin: 0;
}
.ppcfg textarea { min-height: 96px; }
.ppcfg input:focus, .ppcfg select:focus, .ppcfg textarea:focus { border-color: var(--pp-text); }
.ppcfg [aria-invalid="true"] { border-color: var(--pp-error); border-width: 2px; }
.ppcfg input[type="checkbox"] { width: 20px; height: 20px; margin: 0; accent-color: var(--pp-brand); flex: none; }

/* Tableau de cotes */
.ppcfg-cotes { width: 100%; border-collapse: collapse; }
.ppcfg-cotes th { padding: 8px 6px; text-align: left; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--pp-muted); border-bottom: 2px solid var(--pp-text); white-space: nowrap; }
.ppcfg-cotes td { padding: 8px 6px; vertical-align: top; border-bottom: 1px solid var(--pp-line); }
.ppcfg-cotes .col-num { width: 36px; font-weight: 700; padding-top: 18px; }
.ppcfg-cotes .col-dim { width: 110px; }
.ppcfg-cotes .col-qte { width: 76px; }
.ppcfg-cotes .col-fil { width: 150px; }
.ppcfg-cotes .col-chants { width: 196px; }
.ppcfg-cotes .col-us { width: 220px; }
.ppcfg-cotes .col-suppr { width: 44px; }
.ppcfg-cotes tr.a-erreur td { border-bottom: 0; }
.ppcfg-cotes tr.ligne-erreur td { padding-top: 0; }
.ppcfg-cotes-cases { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; border: 0; padding: 0; min-width: 0; }
.ppcfg-cotes-cases label { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; line-height: 20px; cursor: pointer; }
.ppcfg-pile { display: grid; gap: 6px; }
.ppcfg-suppr { width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--pp-muted); font-size: 22px; cursor: pointer; }
.ppcfg-suppr:hover { background: var(--pp-surface); color: var(--pp-text); }
.ppcfg-sans-chant { font-size: 14px; line-height: 20px; color: var(--pp-muted); padding-top: 10px; }

.ppcfg-coller { margin-top: 16px; padding: 16px; border-radius: var(--pp-radius-card); background: var(--pp-surface); }
.ppcfg-coller label { display: block; font-weight: 600; margin-bottom: 8px; }
.ppcfg-coller .ppcfg-btn { margin-top: 12px; }

/* Erreurs et messages : sous le champ, jamais portés par la couleur seule */
.ppcfg-erreur { color: var(--pp-error); font-size: 14px; line-height: 20px; }
.ppcfg-erreur:not(:empty)::before, .ppcfg-message--erreur::before { content: "⚠ "; }
.ppcfg-erreur:empty { display: none; }
.ppcfg-erreur .ppcfg-btn--lien { min-height: 32px; padding: 0 0 0 4px; color: var(--pp-error); }
.ppcfg-message { margin-top: 12px; font-size: 14px; line-height: 20px; }
.ppcfg-message:empty { display: none; }
.ppcfg-message--erreur { color: var(--pp-error); }
.ppcfg-message--ok { color: var(--pp-success); }
.ppcfg-encadre { padding: 12px 16px; border-radius: var(--pp-radius-card); background: var(--pp-cream); font-size: 14px; line-height: 20px; }
.ppcfg-encadre + .ppcfg-encadre { margin-top: 8px; }

/* Résultat */
.ppcfg-res { margin-bottom: 48px; }
.ppcfg-res > h3 { margin-bottom: 16px; }
.ppcfg-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0 0 24px; }
.ppcfg-stat { padding: 16px; border-radius: var(--pp-radius-card); background: var(--pp-surface); }
.ppcfg-stat dt { font-size: 14px; line-height: 20px; color: var(--pp-muted); }
.ppcfg-stat dd { margin: 4px 0 0; font: 700 28px/36px var(--pp-font-title); }
.ppcfg-stat dd small { font: 600 14px/20px var(--pp-font-body); color: var(--pp-muted); }
.ppcfg-schemas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.ppcfg-schema { margin: 0; padding: 16px; border: 1px solid var(--pp-line); border-radius: var(--pp-radius-card); }
.ppcfg-schema svg { display: block; width: 100%; height: auto; }
.ppcfg-schema figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin-top: 12px; font-size: 14px; line-height: 20px; }
.ppcfg-schema figcaption strong { font-weight: 600; }
.ppcfg-schema details { margin-top: 8px; font-size: 14px; line-height: 20px; }
.ppcfg-schema summary { cursor: pointer; color: var(--pp-muted); }
.ppcfg-schema ul { margin: 8px 0 0; padding-left: 20px; }
.ppcfg-legende { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0 0 16px; padding: 0; list-style: none; font-size: 14px; line-height: 20px; }
.ppcfg-legende li { display: inline-flex; align-items: center; gap: 8px; }
.ppcfg-legende i { display: inline-block; width: 22px; height: 14px; border-radius: 2px; border: 1px solid var(--pp-text); }
.ppcfg-legende .lg-piece { background: var(--pp-surface); }
.ppcfg-legende .lg-reut { background: var(--pp-cream); border-style: dashed; }
.ppcfg-legende .lg-fact { background: repeating-linear-gradient(45deg, #F5F5F5 0 3px, #BDBDBD 3px 5px); border-color: #9A9A9A; }
.ppcfg-legende .lg-bord { background: repeating-linear-gradient(45deg, #E9E9E9 0 2px, #6F6F6F 2px 4px); }
.ppcfg-legende .lg-chant { height: 4px; border: 0; background: var(--pp-brand); }

.ppcfg-voir-coupes { margin: 0 0 16px; }
.ppcfg-trace-coupes { display: none; }
.ppcfg.voir-coupes .ppcfg-trace-coupes { display: inline; }
.ppcfg-sequence ol { list-style: none; padding-left: 0; }
.ppcfg-sequence li { padding: 4px 0 4px calc(var(--niveau, 0) * 12px); border-bottom: 1px solid var(--pp-line); }
.ppcfg-sequence .ppcfg-aide { margin-top: 8px; }

/* Prix */
.ppcfg-prix-groupe { margin-bottom: 24px; }
.ppcfg-prix-groupe h3 { font-size: 18px; line-height: 24px; margin-bottom: 8px; }
.ppcfg-lignes { width: 100%; border-collapse: collapse; }
.ppcfg-lignes td { padding: 10px 0; border-bottom: 1px solid var(--pp-line); vertical-align: top; }
.ppcfg-lignes td:last-child { text-align: right; white-space: nowrap; padding-left: 16px; font-weight: 600; }
.ppcfg-lignes .ppcfg-aide { display: block; margin-top: 2px; }
.ppcfg-sous-total td { border-bottom: 0; color: var(--pp-muted); font-size: 14px; }
.ppcfg-total { display: grid; grid-template-columns: 1fr auto; gap: 4px 24px; align-items: baseline; margin-top: 8px; padding: 24px; border-radius: var(--pp-radius-card); background: var(--pp-surface); }
.ppcfg-total .ttc-lib { font: 600 18px/24px var(--pp-font-title); }
.ppcfg-total .ttc { font: 700 36px/44px var(--pp-font-title); text-align: right; }
.ppcfg-total .ht, .ppcfg-total .ht-lib { color: var(--pp-muted); font-size: 14px; line-height: 20px; }
.ppcfg-total .ht { text-align: right; }
.ppcfg-calcul { opacity: .55; transition: opacity .15s; }

/* Commande et formulaire */
.ppcfg-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.ppcfg-retractation { margin-top: 16px; }
#ppcfg-etape-5 .ppcfg-aide + .ppcfg-aide { margin-top: 8px; }
.ppcfg-devis { margin-top: 32px; padding: 24px; border: 1px solid var(--pp-line); border-radius: var(--pp-radius-card); max-width: 760px; }
.ppcfg-devis h3 { margin-bottom: 16px; }
.ppcfg-grille-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; margin-bottom: 16px; }
.ppcfg-champ label { display: block; margin-bottom: 4px; font-weight: 600; font-size: 14px; line-height: 20px; }
.ppcfg-champ--large { grid-column: 1 / -1; }
.ppcfg-obl, .ppcfg-opt { font-weight: 400; color: var(--pp-muted); }
.ppcfg-case { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; font-size: 14px; line-height: 20px; cursor: pointer; }
.ppcfg-case input { margin-top: 0; }
.ppcfg-devis .ppcfg-btn { margin-top: 8px; }
.ppcfg-piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Barre de prix collante */
.ppcfg-barre { position: fixed; z-index: 50; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; align-items: center; gap: 16px; padding: 8px 8px 8px 20px; border-radius: 32px; background: var(--pp-text); color: var(--pp-background); box-shadow: 0 8px 24px rgba(0, 0, 0, .18); max-width: calc(100% - 32px); }
.ppcfg-barre[hidden] { display: none; }
.ppcfg-barre__prix { white-space: nowrap; font-size: 14px; }
.ppcfg-barre__prix strong { font: 700 20px/1 var(--pp-font-title); }
.ppcfg-barre__ht { color: #CFCFCF; margin-left: 4px; }

.ppcfg-lien-fiche { margin: 16px 0; font-weight: 600; }

/* Tablette : 768 à 1024 px */
@media (max-width: 1024px) {
	.ppcfg-cartes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ppcfg-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ppcfg-schemas { grid-template-columns: minmax(0, 1fr); }
	.ppcfg-cotes, .ppcfg-cotes tbody, .ppcfg-cotes tr, .ppcfg-cotes td { display: block; }
	.ppcfg-cotes thead { display: none; }
	.ppcfg-cotes tr.ligne { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--pp-line); position: relative; }
	.ppcfg-cotes tr.ligne.a-erreur { border-bottom: 0; padding-bottom: 4px; }
	.ppcfg-cotes td { padding: 0; border: 0; width: auto !important; }
	.ppcfg-cotes td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 4px; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--pp-muted); }
	.ppcfg-cotes .col-num { grid-column: 1 / -1; padding: 0; font-family: var(--pp-font-title); }
	.ppcfg-cotes .col-num::before { display: none !important; }
	.ppcfg-cotes .col-suppr { position: absolute; top: 8px; right: 0; }
	.ppcfg-cotes .col-chants, .ppcfg-cotes .col-us, .ppcfg-cotes .col-com { grid-column: span 2; }
	.ppcfg-cotes .col-fil { grid-column: span 2; }
	.ppcfg-cotes tr.ligne-erreur { padding-bottom: 16px; border-bottom: 1px solid var(--pp-line); }
}

/* Mobile : jusqu'à 767 px */
@media (max-width: 767px) {
	.ppcfg { padding: 0 16px 96px; }
	.ppcfg h2 { font-size: 28px; line-height: 36px; }
	.ppcfg h3 { font-size: 22px; line-height: 30px; }
	.ppcfg-etape { padding-top: 48px; }
	.ppcfg-etape__num { width: 36px; height: 36px; font-size: 17px; }
	.ppcfg-progression { display: none; }
	.ppcfg-cartes { grid-template-columns: minmax(0, 1fr); gap: 16px; }
	.ppcfg-carte { display: grid; grid-template-columns: 96px minmax(0, 1fr); column-gap: 16px; }
	.ppcfg-carte > :not(.ppcfg-carte__visuel) { grid-column: 2; }
	.ppcfg-carte__visuel { grid-row: 1 / span 4; aspect-ratio: 1; margin: 0; font-size: 11px; }
	.ppcfg-carte .ppcfg-btn { grid-column: 1 / -1; margin-top: 8px; }
	.ppcfg-groupe__tete, .ppcfg-groupe__corps { padding-left: 16px; padding-right: 16px; }
	.ppcfg-groupe__tete { flex-direction: column; gap: 4px; }
	.ppcfg-groupe__tete .ppcfg-btn--lien { padding: 0; min-height: 32px; }
	.ppcfg-cotes tr.ligne { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ppcfg-cotes .col-qte { grid-column: span 2; }
	.ppcfg-cotes .col-qte input { max-width: 50%; }
	.ppcfg-stats { gap: 8px; }
	.ppcfg-stat { padding: 12px; }
	.ppcfg-stat dd { font-size: 22px; line-height: 30px; }
	.ppcfg-schema { padding: 8px; }
	.ppcfg-total { padding: 16px; }
	.ppcfg-total .ttc { font-size: 28px; line-height: 36px; }
	.ppcfg-actions .ppcfg-btn, .ppcfg-devis .ppcfg-btn[type="submit"] { width: 100%; }
	.ppcfg-grille-form { grid-template-columns: minmax(0, 1fr); }
	.ppcfg-devis { padding: 16px; }
	.ppcfg-barre { left: 16px; right: 16px; transform: none; justify-content: space-between; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
	.ppcfg * { transition: none !important; scroll-behavior: auto !important; }
}
