/**
 * Formulaire "Demander une démo".
 * Auteur : Didier CERIAC - https://www.ceriacdidier.fr/
 */

.onoff-demo {
	--onoff-demo-accent: #17b978;
	--onoff-demo-accent-dark: #129f65;
	--onoff-demo-border: #d9dee3;
	--onoff-demo-bg: #f4f6f8;
	--onoff-demo-text: #1f2d3d;
	--onoff-demo-muted: #6b7a89;
	--onoff-demo-error: #d63638;
	max-width: 720px;
	margin: 0 auto;
	color: var(--onoff-demo-text);
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.onoff-demo__hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.onoff-demo__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
}

.onoff-demo__field {
	display: flex;
	flex-direction: column;
	margin: 0;
}

.onoff-demo__field--full {
	grid-column: 1 / -1;
}

.onoff-demo__field label {
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 6px;
}

.onoff-demo__field input,
.onoff-demo__field select {
	width: 100%;
	box-sizing: border-box;
	padding: 12px 14px;
	font-size: 15px;
	line-height: 1.3;
	color: var(--onoff-demo-text);
	background: var(--onoff-demo-bg);
	border: 1px solid var(--onoff-demo-border);
	border-radius: 6px;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.onoff-demo__field input:focus,
.onoff-demo__field select:focus {
	outline: none;
	border-color: var(--onoff-demo-accent);
	box-shadow: 0 0 0 3px rgba(34, 192, 105, .15);
}

.onoff-demo__phone-row {
	display: flex;
	gap: 10px;
}

.onoff-demo__phone-row select {
	flex: 0 0 110px;
}

.onoff-demo__field--checkbox label {
	flex-direction: row;
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-weight: 400;
}

.onoff-demo__field--checkbox input {
	width: auto;
	margin-top: 3px;
}

.onoff-demo__field--error input,
.onoff-demo__field--error select {
	border-color: var(--onoff-demo-error);
}

.onoff-demo__error {
	color: var(--onoff-demo-error);
	font-size: 12px;
	margin-top: 4px;
}

.onoff-demo__intro {
	margin: 0 0 18px;
	font-size: 15px;
}

.onoff-demo__legal {
	font-size: 13px;
	line-height: 1.5;
	margin: 18px 0 10px;
}

.onoff-demo__legal--small {
	font-size: 12px;
	opacity: .8;
}

.onoff-demo__feedback {
	background: #fdecea;
	border: 1px solid var(--onoff-demo-error);
	color: var(--onoff-demo-error);
	padding: 12px 14px;
	border-radius: 6px;
	font-size: 14px;
	margin-bottom: 16px;
}

.onoff-demo__actions {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 22px;
}

.onoff-demo__submit {
	appearance: none;
	border: 0;
	cursor: pointer;
	background: var(--onoff-demo-accent);
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	padding: 13px 26px;
	border-radius: 6px;
	transition: filter .15s ease;
}

.onoff-demo__submit:hover {
	filter: brightness(.94);
}

.onoff-demo__submit:disabled {
	opacity: .6;
	cursor: default;
}

.onoff-demo__back {
	appearance: none;
	border: 0;
	background: none;
	cursor: pointer;
	color: var(--onoff-demo-text);
	font-size: 14px;
	text-decoration: underline;
	padding: 8px;
}

.onoff-demo__hsform:not(:empty) {
	margin-bottom: 8px;
}

.onoff-demo__thankyou {
	background: var(--onoff-demo-bg);
	border: 1px solid var(--onoff-demo-border);
	border-radius: 8px;
	padding: 28px;
	text-align: center;
}

.onoff-demo__thankyou h3 {
	margin: 0 0 10px;
}

.onoff-demo__result .meetings-iframe-container {
	min-height: 680px;
}

.onoff-demo__result .meetings-iframe-container iframe {
	display: block;
	width: 100%;
	min-width: 100%;
	min-height: 680px;
	border: 0;
}

@media (max-width: 600px) {
	.onoff-demo__grid {
		grid-template-columns: 1fr;
	}
}

/* --------------------------------------------------------------------- */
/* Mode "hubspot" : habillage du formulaire natif hbspt.forms.create()   */
/* (classes hs-*, hors de notre contrôle direct côté markup).            */
/* --------------------------------------------------------------------- */

.onoff-demo__hsform .hs-form {
	display: block;
}

.onoff-demo__hsform fieldset {
	border: 0;
	margin: 0 0 16px;
	padding: 0;
	max-width: none !important;
}

/* Fieldsets qui n'enveloppent qu'un champ caché (utm_*, hubspotutk, etc.) :
   pas de marge, sinon ça laisse des blocs d'espace vide dans le formulaire. */
.onoff-demo__hsform fieldset:has(> .hs-form-field[style*="display: none"]):not(:has(> .hs-form-field:not([style*="display: none"]))) {
	margin: 0;
}

.onoff-demo__hsform fieldset.form-columns-2 {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
}

.onoff-demo__hsform .hs-form-field {
	margin: 0;
	float: none !important;
	width: auto !important;
}

.onoff-demo__hsform .hs-form-field > label {
	display: block;
	min-height: 0;
}

.onoff-demo__hsform .hs-form-field > label span:not(:empty) {
	font-size: 13px;
	font-weight: 600;
	color: var(--onoff-demo-text);
	margin-bottom: 6px;
	display: inline-block;
}

.onoff-demo__hsform .input {
	margin: 0 !important;
}

.onoff-demo__hsform input.hs-input,
.onoff-demo__hsform select.hs-input,
.onoff-demo__hsform textarea.hs-input {
	width: 100% !important;
	box-sizing: border-box;
	padding: 13px 14px;
	font-size: 15px;
	line-height: 1.3;
	font-family: inherit;
	color: var(--onoff-demo-text);
	background: var(--onoff-demo-bg);
	border: 1px solid var(--onoff-demo-border);
	border-radius: 8px;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.onoff-demo__hsform select.hs-input {
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236b7a89' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	padding-right: 34px;
}

.onoff-demo__hsform select.hs-input.is-placeholder {
	color: var(--onoff-demo-muted);
}

.onoff-demo__hsform input.hs-input:focus,
.onoff-demo__hsform select.hs-input:focus,
.onoff-demo__hsform textarea.hs-input:focus {
	outline: none;
	border-color: var(--onoff-demo-accent);
	box-shadow: 0 0 0 3px rgba(23, 185, 120, .15);
	background: #fff;
}

.onoff-demo__hsform input.hs-input::placeholder {
	color: var(--onoff-demo-muted);
}

/* Champ téléphone : indicatif + numéro dans un même conteneur visuel */
.onoff-demo__hsform .hs-fieldtype-intl-phone {
	display: flex;
	gap: 0;
	padding: 0 !important;
	background: none !important;
	border: 0 !important;
}

.onoff-demo__hsform .hs-fieldtype-intl-phone select {
	flex: 0 0 84px;
	width: 84px !important;
	border-radius: 8px 0 0 8px !important;
	border-right: 0 !important;
	padding-right: 26px;
	text-overflow: ellipsis;
	white-space: nowrap;
	overflow: hidden;
}

.onoff-demo__hsform .hs-fieldtype-intl-phone input[type="tel"] {
	flex: 1 1 auto;
	border-radius: 0 8px 8px 0 !important;
}

.onoff-demo__hsform .hs-fieldtype-intl-phone select:focus + input[type="tel"] {
	border-left-color: var(--onoff-demo-border);
}

/* Cases à cocher légales */
.onoff-demo__hsform .legal-consent-container {
	margin-top: 8px;
}

.onoff-demo__hsform .legal-consent-container .hs-richtext {
	font-size: 12px;
	line-height: 1.5;
	color: var(--onoff-demo-muted);
	margin: 8px 0;
}

.onoff-demo__hsform .inputs-list {
	list-style: none;
	margin: 10px 0 !important;
	padding: 0 !important;
	width: 100% !important;
}

.onoff-demo__hsform .inputs-list li,
.onoff-demo__hsform .hs-form-booleancheckbox {
	float: none !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* Question à choix unique en pilules (ex : "De combien de numéros
   auriez-vous besoin ?") */
.onoff-demo__hsform .hs-fieldtype-radio > label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--onoff-demo-text);
	margin-bottom: 10px;
}

.onoff-demo__hsform .hs-fieldtype-radio > label .hs-form-required {
	color: var(--onoff-demo-error);
	margin-left: 2px;
}

.onoff-demo__hsform .inputs-list.multi-container {
	display: flex !important;
	flex-wrap: wrap;
	gap: 10px;
	width: 100% !important;
}

.onoff-demo__hsform .inputs-list.multi-container li,
.onoff-demo__hsform .hs-form-radio {
	width: auto !important;
	float: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.onoff-demo__hsform .hs-form-radio-display {
	display: inline-flex !important;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	border: 1px solid var(--onoff-demo-border);
	border-radius: 999px;
	background: var(--onoff-demo-bg);
	font-size: 14px;
	line-height: 1.2;
	color: var(--onoff-demo-text);
	cursor: pointer;
	transition: border-color .15s ease, background-color .15s ease;
}

.onoff-demo__hsform .hs-form-radio-display:hover {
	border-color: var(--onoff-demo-accent);
}

.onoff-demo__hsform .hs-form-radio-display input[type="radio"] {
	width: 15px !important;
	height: 15px !important;
	margin: 0 !important;
	flex-shrink: 0;
	accent-color: var(--onoff-demo-accent);
}

.onoff-demo__hsform .hs-form-radio:has(input:checked) .hs-form-radio-display {
	border-color: var(--onoff-demo-accent);
	background: rgba(23, 185, 120, .1);
	font-weight: 600;
}

@media (max-width: 480px) {
	.onoff-demo__hsform .inputs-list.multi-container {
		flex-direction: column;
		flex-wrap: nowrap;
	}

	.onoff-demo__hsform .hs-form-radio-display {
		width: 100%;
		box-sizing: border-box;
	}
}

.onoff-demo__hsform .hs-form-booleancheckbox-display {
	display: flex !important;
	align-items: flex-start !important;
	flex-wrap: nowrap !important;
	gap: 8px;
	width: 100% !important;
	float: none !important;
	font-size: 13px;
	line-height: 1.5;
	color: var(--onoff-demo-text);
	cursor: pointer;
}

.onoff-demo__hsform .hs-form-booleancheckbox-display input {
	width: 16px !important;
	height: 16px !important;
	min-width: 16px;
	margin: 2px 0 0 !important;
	float: none !important;
	accent-color: var(--onoff-demo-accent);
	flex: 0 0 16px;
}

.onoff-demo__hsform .hs-form-booleancheckbox-display span {
	display: block !important;
	float: none !important;
	width: auto !important;
	flex: 1 1 auto;
	margin: 0 !important;
	text-align: left !important;
}

/* Bouton d'envoi */
.onoff-demo__hsform .hs-submit {
	margin-top: 18px;
}

.onoff-demo__hsform .hs-submit .actions {
	display: flex;
}

.onoff-demo__hsform input.hs-button.primary {
	appearance: none;
	border: 0;
	cursor: pointer;
	width: 100%;
	background: var(--onoff-demo-accent);
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	font-family: inherit;
	padding: 14px 26px;
	border-radius: 999px;
	transition: background-color .15s ease, transform .1s ease;
}

.onoff-demo__hsform input.hs-button.primary:hover {
	background: var(--onoff-demo-accent-dark);
}

.onoff-demo__hsform input.hs-button.primary:active {
	transform: translateY(1px);
}

/* Messages d'erreur natifs HubSpot */
.onoff-demo__hsform .hs-error-msgs {
	list-style: none;
	margin: 6px 0 0;
	padding: 0;
}

.onoff-demo__hsform .hs-error-msgs label {
	color: var(--onoff-demo-error) !important;
	font-size: 12px !important;
	font-weight: 400 !important;
}

.onoff-demo__hsform .hs-input.invalid,
.onoff-demo__hsform .hs-input.error {
	border-color: var(--onoff-demo-error);
}

@media (max-width: 600px) {
	.onoff-demo__hsform fieldset.form-columns-2 {
		grid-template-columns: 1fr;
	}
}
