/* Configurateur Delgarde — orange / anthracite / ivoire. */
.dgc, .dgc-choix {
	--dg-orange: #f26a21;
	--dg-orange-fonce: #c44d0c;
	--dg-anthracite: #1e262b;
	--dg-ivoire: #f6f2ea;
	--dg-papier: #fdfbf7;
	--dg-trait: #e2dbcf;
	--dg-gris: #5a6166;
	--dg-alerte: #b3261e;
	color: var(--dg-anthracite);
}
.dgc *, .dgc-choix * { box-sizing: border-box; }
.dgc h1, .dgc h2, .dgc h3, .dgc p, .dgc dl, .dgc dd, .dgc ul, .dgc ol { margin: 0; padding: 0; }
.dgc-masque { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.dgc-masque-visuel { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* En-tête */
.dgc-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-bottom: 20px; }
.dgc-sur { flex-basis: 100%; font-size: .8125rem; letter-spacing: .18em; text-transform: uppercase; color: var(--dg-gris); font-weight: 600; }
.dgc-tete h1 { font-size: clamp(1.9rem, 4.6vw, 3.25rem); line-height: 1.02; font-weight: 800; letter-spacing: -.02em; text-wrap: balance; }
.dgc-tete h1 em { font-style: normal; color: var(--dg-orange); }
.dgc-chapeau { flex-basis: 100%; font-size: 1.125rem; color: #3a4348; max-width: 60ch; }
.dgc-demo { background: #fbd9c4; color: #8a3a06; font-weight: 700; font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase; padding: 6px 10px; border-radius: 3px; }

/* Fil d'étapes */
.dgc-fil { list-style: none; display: flex; gap: 6px; margin-bottom: 18px; overflow-x: auto; }
.dgc-fil li { flex: 1 1 0; min-width: max-content; }
.dgc-fil button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; border-bottom: 3px solid var(--dg-trait); background: none; font: inherit; font-size: .9375rem; color: var(--dg-gris); cursor: pointer; text-align: left; }
.dgc-fil button:disabled { cursor: default; }
.dgc-fil-num { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid currentColor; font-size: .8125rem; font-weight: 700; font-variant-numeric: tabular-nums; flex: none; }
.dgc-fil .est-courant button { color: var(--dg-orange-fonce); border-bottom-color: var(--dg-orange); font-weight: 700; }
.dgc-fil .est-courant .dgc-fil-num, .dgc-fil .est-fait .dgc-fil-num { background: var(--dg-orange); border-color: var(--dg-orange); color: #fff; }
.dgc-fil .est-fait button { color: var(--dg-anthracite); border-bottom-color: var(--dg-orange); }

/* Grille */
.dgc-grille { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.dgc-form, .dgc-carte-bloc { background: var(--dg-papier); border: 1px solid var(--dg-trait); border-radius: 4px; padding: 22px; }
.dgc-zone:focus { outline: none; }
.dgc-etape-titre, .dgc-carte-bloc > h2, .dgc-envoi h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 14px; }
.dgc-recap { display: grid; gap: 16px; }
.dgc-visuel { background: #efeae0; border-radius: 4px; padding: 16px; text-align: center; }
.dgc-photo { width: 100%; height: auto; display: block; border-radius: 3px; aspect-ratio: 4 / 3; object-fit: cover; }
.dgc-photo-vide { background: repeating-linear-gradient(45deg, #e6dfd2 0 12px, #efeae0 12px 24px); }
.dgc-schema svg { width: 100%; height: auto; max-height: 420px; font-family: inherit; }
.dgc-note { font-size: .8125rem; color: var(--dg-gris); margin-top: 10px; }
.dgc-note a { color: inherit; }

/* Champs */
.dgc-champ { margin-bottom: 20px; }
.dgc-champ label, .dgc-libelle { display: block; font-weight: 700; font-size: .9375rem; margin-bottom: 6px; }
.dgc-requis { color: var(--dg-orange-fonce); }
.dgc-aide { font-size: .875rem; color: var(--dg-gris); margin: -2px 0 8px; }
.dgc input[type="text"], .dgc input[type="email"], .dgc input[type="tel"], .dgc select, .dgc textarea {
	width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; font-size: 1rem; color: inherit;
	background: #fff; border: 1px solid #b9b2a5; border-radius: 3px;
}
.dgc textarea { min-height: 84px; resize: vertical; }
.dgc input:focus-visible, .dgc select:focus-visible, .dgc textarea:focus-visible, .dgc button:focus-visible, .dgc a:focus-visible,
.dgc-segments input:focus-visible + label, .dgc-depot:focus-within, .dgc-choix a:focus-visible { outline: 3px solid var(--dg-anthracite); outline-offset: 2px; }
.dgc-avec-unite { position: relative; }
.dgc-avec-unite input { padding-right: 56px; font-variant-numeric: tabular-nums; }
.dgc-unite { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--dg-gris); font-size: .9375rem; pointer-events: none; }
.dgc input[type="range"] { width: 100%; margin: 12px 0 0; accent-color: var(--dg-orange); height: 28px; }
.dgc-bornes { display: flex; justify-content: space-between; font-size: .8125rem; color: var(--dg-gris); font-variant-numeric: tabular-nums; }
.dgc-segments { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.dgc-segments label { display: grid; place-items: center; min-height: 48px; padding: 8px 10px; margin: 0; text-align: center; font-weight: 600; background: #fff; border: 1px solid #b9b2a5; border-radius: 3px; cursor: pointer; }
.dgc-segments input:checked + label { background: var(--dg-orange); border-color: var(--dg-orange); color: #1a1205; }
.dgc-quantite { display: inline-grid; grid-template-columns: 48px 76px 48px; }
.dgc-quantite button { min-height: 48px; border: 1px solid #b9b2a5; background: #fff; font-size: 1.375rem; color: inherit; cursor: pointer; }
.dgc-quantite input.dgc-quantite-valeur { border-left: 0; border-right: 0; border-radius: 0; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.dgc-erreur { color: var(--dg-alerte); font-size: .875rem; font-weight: 600; margin-top: 6px; }
.dgc-erreur:empty, .dgc-hors-bareme:empty { display: none; }
.dgc-champ.est-en-erreur input, .dgc-champ.est-en-erreur select, .dgc-champ.est-en-erreur textarea { border-color: var(--dg-alerte); border-width: 2px; }
.dgc-hors-bareme { margin-top: 8px; padding: 10px 12px; background: #fdeadc; border-left: 4px solid var(--dg-orange); font-size: .875rem; }
.dgc-alerte { padding: 12px 14px; background: #fbe4e2; border-left: 4px solid var(--dg-alerte); font-weight: 600; margin-bottom: 14px; }
.dgc-deux { display: grid; gap: 0 14px; grid-template-columns: minmax(0, 1fr); }

/* Boutons */
.dgc-bouton { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 52px; padding: 12px 24px; border: 2px solid var(--dg-orange); border-radius: 3px; background: var(--dg-orange); color: #1a1205; font: inherit; font-weight: 700; font-size: 1.0625rem; text-decoration: none; cursor: pointer; }
.dgc-bouton:hover { background: #ff7d36; border-color: #ff7d36; }
.dgc-bouton-leger { background: none; border-color: #b9b2a5; color: inherit; }
.dgc-bouton-leger:hover { background: #efeae0; border-color: var(--dg-anthracite); }
.dgc-bouton-plein { width: 100%; }
.dgc-bouton.est-occupe { opacity: .6; cursor: progress; }
.dgc-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }
.dgc-lien { background: none; border: 0; padding: 8px 0; font: inherit; font-weight: 600; color: var(--dg-orange-fonce); text-decoration: underline; cursor: pointer; }

/* Estimation */
.dgc-estim { background: var(--dg-anthracite); color: #fff; border-radius: 4px; padding: 24px; }
.dgc-estim h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 8px; }
.dgc-estim h3 { font-size: .9375rem; font-weight: 700; margin: 20px 0 8px; padding-top: 16px; border-top: 1px solid #3c474e; }
.dgc-prix { font-size: clamp(2.25rem, 5vw, 3.25rem); line-height: 1.05; font-weight: 800; color: var(--dg-orange); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.dgc-prix small { font-size: .5em; }
.dgc-prix-etude { font-size: 1.5rem; line-height: 1.2; }
.dgc-prix-attente { color: #7f8a90; }
.dgc-prix-detail { margin-top: 6px; font-size: .9375rem; font-variant-numeric: tabular-nums; }
.dgc-prix-note { margin-top: 8px; font-size: .875rem; color: #cfd4d6; }
.dgc-motifs { margin: 10px 0 0 18px; font-size: .9375rem; }
.dgc-motifs li + li { margin-top: 6px; }
.dgc.est-en-calcul [data-role="prix"] { opacity: .55; }
.dgc-estim dl > div, .dgc-recap-groupe dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; font-size: .9375rem; }
.dgc-estim dt { color: #cfd4d6; }
.dgc-estim dd, .dgc-recap-groupe dd { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.dgc-estim dl:empty::before { content: "Vos choix apparaîtront ici."; color: #9aa4a9; font-size: .9375rem; }

/* Récapitulatif */
.dgc-recap-groupe + .dgc-recap-groupe { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--dg-trait); }
.dgc-recap-tete { display: flex; justify-content: space-between; align-items: center; }
.dgc-recap-tete h3 { font-size: .8125rem; letter-spacing: .14em; text-transform: uppercase; color: var(--dg-gris); }
.dgc-recap-groupe dl > div { border-bottom: 1px solid #efe9dd; }
.dgc-recap-groupe dt { color: #3a4348; }
.dgc-depot { display: block; padding: 18px; border: 1.5px dashed #9c9486; border-radius: 3px; background: #fff; cursor: pointer; }
.dgc-depot strong, .dgc-depot span { display: block; }
.dgc-depot span { font-size: .875rem; color: var(--dg-gris); font-weight: 400; }
.dgc-fichiers-liste { list-style: none; margin-top: 10px; }
.dgc-fichiers-liste li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 0 4px 12px; border: 1px solid var(--dg-trait); background: #fff; margin-top: 6px; overflow-wrap: anywhere; }
.dgc-fichiers-liste small { color: var(--dg-gris); }
.dgc-fichiers-liste button { flex: none; width: 44px; height: 44px; border: 0; background: none; font-size: 1.375rem; cursor: pointer; color: inherit; }
.dgc-envoi .dgc-note { text-align: center; }
.dgc-merci { background: var(--dg-papier); border: 1px solid var(--dg-trait); border-top: 6px solid var(--dg-orange); padding: 32px 24px; max-width: 640px; }
.dgc-merci h2 { font-size: 1.75rem; margin: 4px 0 12px; }
.dgc-merci p { margin-bottom: 12px; }
.dgc-merci:focus { outline: none; }

/* Barre fixe sur mobile : estimation et action suivante toujours à portée. */
.dgc-barre { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--dg-anthracite); color: #fff; }
.dgc-barre span { display: block; font-size: .8125rem; color: #cfd4d6; }
.dgc-barre strong { font-size: 1.375rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.dgc-barre .dgc-bouton { min-height: 48px; padding: 10px 20px; }
.dgc:not(.est-recap) { padding-bottom: 84px; }
.dgc:not(.est-recap) .dgc-nav .dgc-bouton:not(.dgc-bouton-leger) { display: none; }
.dgc:not(.est-recap) .dgc-estim { order: 3; }

@media (max-width: 639px) {
	.dgc-fil li:not(.est-courant) { flex: 0 0 auto; }
	.dgc-fil li:not(.est-courant) button span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
@media (min-width: 640px) {
	.dgc-deux { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1000px) {
	.dgc-grille { grid-template-columns: minmax(300px, 1fr) minmax(0, 1.25fr) minmax(300px, 1fr); }
	.dgc.est-recap .dgc-grille { grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); }
	.dgc-estim { position: sticky; top: 96px; }
	.dgc-visuel { position: sticky; top: 96px; }
	.dgc-barre { display: none; }
	.dgc:not(.est-recap) { padding-bottom: 0; }
	.dgc:not(.est-recap) .dgc-nav .dgc-bouton:not(.dgc-bouton-leger) { display: inline-flex; }
}

/* Choix du modèle */
.dgc-filtres { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.dgc-filtres a { padding: 10px 16px; min-height: 44px; display: inline-flex; align-items: center; border: 1px solid #b9b2a5; border-radius: 3px; color: inherit; text-decoration: none; font-weight: 600; background: var(--dg-papier); }
.dgc-filtres a[aria-current] { background: var(--dg-anthracite); border-color: var(--dg-anthracite); color: #fff; }
.dgc-famille { margin-bottom: 40px; }
.dgc-famille h2 { font-size: 1.625rem; font-weight: 800; margin: 0 0 14px; padding-top: 12px; border-top: 4px solid var(--dg-orange); display: inline-block; }
.dgc-cartes { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.dgc-carte { display: flex; flex-direction: column; background: var(--dg-papier); border: 1px solid var(--dg-trait); border-radius: 4px; overflow: hidden; color: inherit; text-decoration: none; }
.dgc-carte:hover { border-color: var(--dg-anthracite); }
.dgc-carte img, .dgc-carte-vide { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; height: auto; background: #e6dfd2; }
.dgc-carte-corps { display: flex; flex-direction: column; gap: 8px; padding: 16px; flex: 1; }
.dgc-carte-corps strong { font-size: 1.1875rem; }
.dgc-carte-texte { font-size: .9375rem; color: #3a4348; }
.dgc-carte-lien { margin-top: auto; font-weight: 700; color: var(--dg-orange-fonce); }
.dgc-pastille { align-self: flex-start; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 8px; border-radius: 3px; background: #e6dfd2; color: #3a4348; }
.dgc-pastille.est-chiffre { background: var(--dg-anthracite); color: #fff; }

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

/* Aperçu 3D */
.dgc-apercu { display: grid; gap: 8px; }
.dgc-apercu-scene { position: relative; background: #efeae0; border-radius: 3px; overflow: hidden; aspect-ratio: 4 / 3; }
.dgc-apercu-scene .dgc-photo, .dgc-apercu-scene .dgc-schema { position: absolute; inset: 0; }
.dgc-apercu-scene .dgc-schema { display: grid; place-items: center; padding: 8px; }
.dgc-apercu-scene .dgc-schema svg { max-height: 100%; }
.dgc-vue3d { position: absolute; inset: 0; touch-action: none; }
.dgc-vue3d canvas { display: block; outline-offset: -3px; cursor: grab; }
.dgc-vue3d canvas:active { cursor: grabbing; }
.dgc-apercu-barre { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.dgc-apercu-barre .dgc-note { margin: 0; text-align: left; }
.dgc-apercu-barre .dgc-lien { padding: 4px 0; font-size: .875rem; }
.dgc:not(.est-recap) .dgc-visuel { order: -1; }
.dgc.est-recap .dgc-visuel { background: #efeae0; border-radius: 4px; padding: 12px; }
@media (max-width: 999px) {
	.dgc-apercu-scene { aspect-ratio: 16 / 10; max-height: 320px; }
	.dgc-visuel { padding: 10px; }
}
@media (min-width: 1000px) {
	.dgc:not(.est-recap) .dgc-visuel { order: 0; }
	.dgc.est-recap .dgc-grille { grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); }
	.dgc.est-recap .dgc-visuel { grid-column: 2; grid-row: 1; }
	.dgc.est-recap .dgc-estim { grid-column: 2; grid-row: 2; position: static; }
	.dgc.est-recap .dgc-recap { grid-column: 1; grid-row: 1 / span 2; }
}
