/* VDM-TP — formulaire de devis, fenêtre modale, bouton devis, ligne transport. Toutes les règles sont préfixées vdm-. */
.vdm-q-form, .vdm-q-modal, .vdm-q-done { --vdm-terra: #B55F44; --vdm-terra-ink: #9A4E37; --vdm-btn: #A65740; --vdm-black: #111; --vdm-line: #E3DEDA; --vdm-soft: #F6F3F1; color: var(--vdm-black); }
.vdm-q-form { max-width: 860px; margin: 0 auto; font-size: 16px; line-height: 1.5; }
.vdm-q-form fieldset { border: 1px solid var(--vdm-line); padding: 20px; margin: 0 0 20px; background: #fff; min-width: 0; }
.vdm-q-form legend { font-weight: 800; text-transform: uppercase; letter-spacing: .06em; font-size: 14px; padding: 0 8px; }
.vdm-q-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.vdm-q-field { margin: 0 0 14px; }
.vdm-q-field label, .vdm-q-search label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.vdm-q-form input[type=text], .vdm-q-form input[type=email], .vdm-q-form input[type=tel], .vdm-q-form input[type=search], .vdm-q-form input[type=number], .vdm-q-form textarea {
	width: 100%; box-sizing: border-box; border: 1px solid #BDB5AF; border-radius: 0; padding: 11px 12px; font-size: 16px; background: #fff; color: var(--vdm-black); }
.vdm-q-form input[type=number] { width: 80px; }
.vdm-q-form input:focus, .vdm-q-form textarea:focus, .vdm-q-form button:focus-visible { outline: 3px solid var(--vdm-terra); outline-offset: 2px; }
.vdm-q-form [aria-invalid=true] { border-color: #B3261E; }
.vdm-q-err { color: #B3261E; font-size: 14px; display: block; min-height: 0; }
.vdm-q-alert { border-left: 4px solid #B3261E; background: #FDF0EE; padding: 12px 16px; margin-bottom: 16px; }
.vdm-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.vdm-q-search { position: relative; margin-bottom: 12px; }
.vdm-q-results { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; margin: 0; padding: 0; list-style: none; background: #fff; border: 1px solid var(--vdm-black); max-height: 320px; overflow: auto; box-shadow: 0 12px 30px rgba(0,0,0,.18); }
.vdm-q-results li { display: flex; gap: 10px; align-items: center; padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--vdm-line); }
.vdm-q-results li span { flex: 1; min-width: 0; }
.vdm-q-results li[aria-selected=true], .vdm-q-results li:hover { background: var(--vdm-soft); box-shadow: inset 4px 0 0 var(--vdm-terra); }
.vdm-q-results img { object-fit: cover; flex: none; }
.vdm-q-lines { list-style: none; margin: 0; padding: 0; }
.vdm-q-lines.is-empty::before { content: attr(data-empty); display: block; color: #555; padding: 12px; background: var(--vdm-soft); }
.vdm-q-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 0; border-bottom: 1px solid var(--vdm-line); }
.vdm-q-name { flex: 1 1 260px; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.vdm-q-name small { font-weight: 400; color: #555; }
.vdm-q-qty { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.vdm-q-remove { background: none; border: 0; color: var(--vdm-terra-ink); text-decoration: underline; cursor: pointer; font-size: 14px; padding: 6px; }
.vdm-q-estimate { margin: 12px 0 0; font-size: 15px; }
.vdm-q-type label, .vdm-q-formule { display: inline-flex; gap: 6px; align-items: center; margin: 0 16px 8px 0; }
.vdm-q-formule { display: flex; }
.vdm-q-consent { font-size: 14px; }
.vdm-q-legal { font-size: 13px; color: #555; }
.vdm-q-status .vdm-q-bad { color: #B3261E; }
.vdm-q-done { border: 2px solid var(--vdm-terra); padding: 24px; background: #fff; }
.vdm-q-done h3 { margin-top: 0; }
.vdm-btn-primary, .vdm-q-submit button { background: var(--vdm-btn); color: #fff; border: 0; padding: 15px 26px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; font-size: 15px; cursor: pointer; }
.vdm-q-submit button:hover { background: var(--vdm-black); }
.vdm-q-submit button[disabled] { opacity: .6; cursor: wait; }

/* Bouton « Demander un devis » sur la fiche produit */
.vdm-btn-devis.button, button.vdm-btn-devis { background: #fff !important; color: #111 !important; border: 2px solid #111 !important; padding: 12px 22px !important; font-weight: 800 !important; text-transform: uppercase; letter-spacing: .05em; margin-left: 10px; border-radius: 0 !important; cursor: pointer; }
/* Fiche produit : le bouton devis passe sur sa propre ligne, sous « Ajouter au panier », sans chevauchement */
.single-product form.cart { flex-wrap: wrap !important; row-gap: 12px; }
.single-product form.cart .vdm-btn-devis { flex: 1 1 100% !important; width: 100% !important; max-width: 100%; margin: 0 !important; min-height: 50px; display: flex !important; align-items: center; justify-content: center; position: static !important; float: none !important; clear: both; box-sizing: border-box; line-height: 1.2 !important; }
.single-product form.cart .vdm-btn-devis::before { content: ""; width: 18px; height: 18px; margin-right: 10px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 2h9l5 5v15H6zM14 3v5h5M9 13h8M9 17h8M9 9h3' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 2h9l5 5v15H6zM14 3v5h5M9 13h8M9 17h8M9 9h3' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") center/contain no-repeat; }
.vdm-devis-wrap .vdm-btn-devis { margin-left: 0 !important; width: 100%; }
.vdm-btn-devis:hover, .vdm-btn-devis:focus-visible { background: #111 !important; color: #fff !important; outline: 3px solid #B55F44; outline-offset: 2px; }
.vdm-devis-wrap { margin: 16px 0; }
.vdm-transport-line { border-left: 4px solid #B55F44; background: #F6F3F1; padding: 10px 14px; font-size: 15px; margin: 12px 0 18px; }
.vdm-transport-missing { border-left-color: #B3261E; }

/* Fenêtre modale */
.vdm-q-modal { width: min(920px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 0; overflow: auto; background: var(--vdm-soft); }
.vdm-q-modal::backdrop { background: rgba(17,17,17,.72); }
.vdm-q-modal-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; background: #111; color: #fff; padding: 14px 20px; }
.vdm-q-modal-head h2 { margin: 0; color: #fff; font-size: 20px; text-transform: uppercase; letter-spacing: .06em; }
.vdm-q-close { background: none; border: 0; color: #fff; font-size: 32px; line-height: 1; cursor: pointer; width: 44px; height: 44px; }
.vdm-q-close:focus-visible { outline: 3px solid #B55F44; }
.vdm-q-modal .vdm-q-form { padding: 20px; }
@media (max-width: 640px) {
	.vdm-q-grid { grid-template-columns: 1fr; }
	.vdm-q-form fieldset { padding: 14px; }
	.vdm-btn-devis.button, button.vdm-btn-devis { margin: 10px 0 0 !important; width: 100%; }
	.vdm-q-modal { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; margin: 0; }
}
