/* H-TIC Devis — modale. Tout est préfixé .htic-dv pour ne pas entrer en conflit avec le thème. */

.htic-dv {
	--htic-primary: #0f1b4c;
	--htic-accent: #f7c92c;
	--htic-accent-soft: rgba(247, 201, 44, 0.14);
	--htic-border: #e3e5ec;
	--htic-muted: #8b8fa3;
}

html.htic-dv-lock { overflow: hidden; }

.htic-dv, .htic-dv * { box-sizing: border-box; }

.htic-dv-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(8, 12, 36, 0.62);
	backdrop-filter: blur(3px);
	font-family: inherit;
	line-height: 1.4;
}
.htic-dv-overlay[hidden] { display: none; }

.htic-dv-dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 680px;
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	overflow: hidden;
	background: #fff;
	color: var(--htic-primary);
	border-radius: 24px;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
	outline: none;
	animation: htic-dv-in 0.22s ease-out;
}
@keyframes htic-dv-in { from { opacity: 0; transform: translateY(14px) scale(0.985); } to { opacity: 1; transform: none; } }

/* En-tête */
.htic-dv-head { position: relative; flex: none; padding: 22px 88px 0 28px; background: var(--htic-primary); }
.htic-dv-headrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; }
.htic-dv-eyebrow { color: var(--htic-accent); font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.htic-dv-time { color: rgba(255, 255, 255, 0.6); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; white-space: nowrap; }
.htic-dv-progress { margin: 0 -88px 0 -28px; height: 5px; background: rgba(255, 255, 255, 0.14); }
.htic-dv-bar { display: block; height: 100%; width: 6%; background: var(--htic-accent); border-radius: 0 3px 3px 0; transition: width 0.35s ease; }

.htic-dv-close {
	position: absolute;
	top: 14px;
	right: 18px;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--htic-accent);
	color: var(--htic-primary);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	transition: transform 0.15s;
}
.htic-dv-close:hover { transform: scale(1.08); }

/* Corps */
.htic-dv-body { flex: 1 1 auto; overflow-y: auto; padding: 32px 32px 24px; }
.htic-dv-q { margin: 0 0 6px; color: var(--htic-primary); font-size: 22px; font-weight: 800; line-height: 1.25; }
.htic-dv-help { margin: 0 0 20px; color: var(--htic-muted); font-size: 14px; }
.htic-dv-q + .htic-dv-grid, .htic-dv-q + .htic-dv-input { margin-top: 22px; }

/* Cartes de réponse */
.htic-dv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.htic-dv-card {
	display: flex;
	align-items: center;
	gap: 14px;
	min-height: 60px;
	padding: 14px 18px;
	border: 1.5px solid var(--htic-border);
	border-radius: 14px;
	background: #fff;
	color: var(--htic-primary);
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.htic-dv-card:hover { border-color: var(--htic-primary); }
.htic-dv-card:active { transform: scale(0.99); }
.htic-dv-card:focus-visible, .htic-dv-btn:focus-visible, .htic-dv-input:focus-visible,
.htic-dv-back:focus-visible, .htic-dv-close:focus-visible { outline: 3px solid var(--htic-accent); outline-offset: 2px; }
.htic-dv-card.is-selected { border-color: var(--htic-primary); background: var(--htic-accent-soft); box-shadow: 0 0 0 1px var(--htic-primary); }

.htic-dv-mark {
	position: relative;
	flex: none;
	width: 22px;
	height: 22px;
	border: 2px solid #c4c7d4;
	border-radius: 50%;
	background: #fff;
	transition: all 0.15s;
}
.htic-dv-mark.is-check { border-radius: 6px; }
.is-selected .htic-dv-mark { border-color: var(--htic-primary); background: var(--htic-accent); }
.is-selected .htic-dv-mark::after {
	content: '';
	position: absolute;
	left: 6px;
	top: 2px;
	width: 5px;
	height: 10px;
	border: solid var(--htic-primary);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

/* Champs */
.htic-dv-input {
	display: block;
	width: 100%;
	padding: 14px 16px;
	border: 1.5px solid var(--htic-border);
	border-radius: 12px;
	background: #fff;
	color: var(--htic-primary);
	font: inherit;
	font-size: 15px;
	box-shadow: none;
}
.htic-dv-input:focus { border-color: var(--htic-primary); outline: none; }
textarea.htic-dv-input { resize: vertical; min-height: 110px; }

.htic-dv-form { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.htic-dv-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.htic-dv-field { display: flex; flex-direction: column; gap: 6px; }
.htic-dv-label { color: var(--htic-primary); font-size: 13px; font-weight: 700; }
.htic-dv-consent { display: flex; align-items: flex-start; gap: 10px; color: #5b5f75; font-size: 12.5px; line-height: 1.45; cursor: pointer; }
.htic-dv-consent input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--htic-primary); }
.htic-dv-trap { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.htic-dv-error { margin: 0; padding: 10px 14px; border-radius: 10px; background: #fdecec; color: #a12525; font-size: 13.5px; font-weight: 600; }
.htic-dv-error[hidden] { display: none; }

/* Boutons / pied */
.htic-dv-actions { display: flex; justify-content: flex-end; margin-top: 22px; }
.htic-dv-btn {
	min-height: 48px;
	padding: 12px 28px;
	border: 0;
	border-radius: 999px;
	background: var(--htic-accent);
	color: var(--htic-primary);
	font: inherit;
	font-size: 15px;
	font-weight: 800;
	cursor: pointer;
	transition: transform 0.12s, opacity 0.15s;
}
.htic-dv-btn:hover:not(:disabled) { transform: translateY(-1px); }
.htic-dv-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.htic-dv-form .htic-dv-btn, .htic-dv-thanks + .htic-dv-actions .htic-dv-btn { width: 100%; }

.htic-dv-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 26px; min-height: 22px; }
.htic-dv-back { padding: 4px 0; border: 0; background: none; color: var(--htic-muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.htic-dv-back:hover { color: var(--htic-primary); }
.htic-dv-status { margin-left: auto; color: var(--htic-muted); font-size: 13px; text-align: right; }
.htic-dv-reassure { margin: 18px 0 0; color: #b4b7c6; font-size: 11.5px; text-align: center; }

/* Remerciement */
.htic-dv-thanks { padding: 12px 0 0; text-align: center; }
.htic-dv-bigcheck {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	margin-bottom: 16px;
	border-radius: 50%;
	background: var(--htic-accent);
	color: var(--htic-primary);
	font-size: 36px;
	font-weight: 800;
}
.htic-dv-products { margin: 8px 0 0; padding: 16px 20px 16px 36px; border-radius: 14px; background: var(--htic-accent-soft); font-size: 14px; }
.htic-dv-products li { margin: 4px 0; }
.htic-dv-products a, .htic-dv-products strong { color: var(--htic-primary); }
.htic-dv-price { color: #5b5f75; }

/* Bouton du shortcode */
.htic-devis-btn {
	display: inline-block;
	padding: 14px 30px;
	border: 0;
	border-radius: 999px;
	background: #f7c92c;
	color: #0f1b4c;
	font: inherit;
	font-weight: 800;
	cursor: pointer;
}

@media (max-width: 600px) {
	.htic-dv-overlay { padding: 8px; align-items: flex-end; }
	.htic-dv-dialog { max-height: calc(100dvh - 16px); border-radius: 20px; }
	.htic-dv-head { padding-left: 20px; padding-right: 76px; }
	.htic-dv-progress { margin-left: -20px; margin-right: -76px; }
	.htic-dv-close { top: 10px; right: 12px; width: 40px; height: 40px; }
	.htic-dv-body { padding: 24px 20px 18px; }
	.htic-dv-q { font-size: 19px; }
	.htic-dv-grid, .htic-dv-row { grid-template-columns: 1fr; }
	.htic-dv-card { min-height: 54px; }
}

@media (prefers-reduced-motion: reduce) {
	.htic-dv-dialog { animation: none; }
	.htic-dv-bar, .htic-dv-card, .htic-dv-btn { transition: none; }
}
