/* HubSpot forms inline — chartre navy / or / rouge, hors popin.
   Les <dialog> (prépa médecine, réunions…) gardent leur propre style. */

body .hbspt-form:not(:where(dialog *)),
body .hs-form-html:not(:where(dialog *)) {
	--hs-navy: #06113a;
	--hs-gold: #f2cd78;
	--hs-red: #c0392b;
	--hs-field-bg: #f7f8fb;
	--hs-border: rgba(6, 17, 58, 0.18);
	font-family: "Nunito Sans", Arial, sans-serif;
	color: var(--hs-navy);
}

body .hbspt-form:not(:where(dialog *)) .hs-form,
body .hbspt-form:not(:where(dialog *)) .hs-form *,
body .hbspt-form:not(:where(dialog *)) .hs-form *::before,
body .hbspt-form:not(:where(dialog *)) .hs-form *::after {
	box-sizing: border-box;
}

body .hbspt-form:not(:where(dialog *)) .hs-form {
	display: block;
	width: 100%;
	max-width: 100%;
	font-family: "Nunito Sans", Arial, sans-serif !important;
	color: var(--hs-navy) !important;
}

/* Titres / intro HubSpot (richtext) */
body .hbspt-form:not(:where(dialog *)) .hs-richtext,
body .hbspt-form:not(:where(dialog *)) .hs-richtext h1,
body .hbspt-form:not(:where(dialog *)) .hs-richtext h2,
body .hbspt-form:not(:where(dialog *)) .hs-richtext h3,
body .hbspt-form:not(:where(dialog *)) .hs-richtext p {
	color: var(--hs-navy) !important;
	font-family: inherit !important;
}

body .hbspt-form:not(:where(dialog *)) .hs-richtext h1,
body .hbspt-form:not(:where(dialog *)) .hs-richtext h2 {
	margin: 0 0 0.4rem;
	font-size: clamp(1.35rem, 2.2vw, 1.65rem) !important;
	font-weight: 700 !important;
	line-height: 1.25;
}

body .hbspt-form:not(:where(dialog *)) .hs-richtext h3 {
	margin: 0 0 1rem;
	font-size: 1.05rem !important;
	font-weight: 700 !important;
	line-height: 1.35;
}

body .hbspt-form:not(:where(dialog *)) .hs-richtext p {
	margin: 0 0 1rem;
	font-size: 0.95rem;
	line-height: 1.5;
}

body .hbspt-form:not(:where(dialog *)) .legal-consent-container,
body .hbspt-form:not(:where(dialog *)) .legal-consent-container .hs-richtext,
body .hbspt-form:not(:where(dialog *)) .legal-consent-container p,
body .hbspt-form:not(:where(dialog *)) .hs-richtext em {
	font-size: 0.8125rem !important;
	font-style: italic;
	line-height: 1.5;
	color: rgba(6, 17, 58, 0.72) !important;
}

body .hbspt-form:not(:where(dialog *)) .legal-consent-container a,
body .hbspt-form:not(:where(dialog *)) .hs-richtext a {
	color: var(--hs-navy) !important;
	text-decoration: underline;
}

/* Champs */
body .hbspt-form:not(:where(dialog *)) fieldset {
	max-width: 100% !important;
	margin: 0 0 0.15rem !important;
	padding: 0 !important;
	border: 0 !important;
}

body .hbspt-form:not(:where(dialog *)) .hs-form-field,
body .hbspt-form:not(:where(dialog *)) .hs-form .field {
	margin: 0 0 1rem !important;
	padding: 0 !important;
	float: none !important;
}

body .hbspt-form:not(:where(dialog *)) .form-columns-2 {
	display: flex !important;
	flex-wrap: wrap;
	gap: 0 1rem;
	max-width: 100% !important;
}

body .hbspt-form:not(:where(dialog *)) .form-columns-2 .hs-form-field,
body .hbspt-form:not(:where(dialog *)) .form-columns-2 .field {
	flex: 1 1 calc(50% - 0.5rem);
	width: calc(50% - 0.5rem) !important;
	max-width: calc(50% - 0.5rem) !important;
}

body .hbspt-form:not(:where(dialog *)) .form-columns-1 .hs-form-field,
body .hbspt-form:not(:where(dialog *)) .form-columns-1 .field {
	width: 100% !important;
	max-width: 100% !important;
}

body .hbspt-form:not(:where(dialog *)) .hs-form-field > label,
body .hbspt-form:not(:where(dialog *)) .hs-form-field label span,
body .hbspt-form:not(:where(dialog *)) .hs-form .hs-form-field > label {
	display: block;
	margin: 0 0 0.35rem !important;
	color: var(--hs-navy) !important;
	font-size: 0.9rem !important;
	font-weight: 600 !important;
	line-height: 1.3;
}

body .hbspt-form:not(:where(dialog *)) .hs-form-required {
	color: var(--hs-red) !important;
	margin-left: 0.15em;
}

body .hbspt-form:not(:where(dialog *)) .input {
	margin: 0 !important;
}

body .hbspt-form:not(:where(dialog *)) .hs-input[type="text"],
body .hbspt-form:not(:where(dialog *)) .hs-input[type="email"],
body .hbspt-form:not(:where(dialog *)) .hs-input[type="tel"],
body .hbspt-form:not(:where(dialog *)) .hs-input[type="number"],
body .hbspt-form:not(:where(dialog *)) .hs-input[type="date"],
body .hbspt-form:not(:where(dialog *)) input.hs-input[type="text"],
body .hbspt-form:not(:where(dialog *)) input.hs-input[type="email"],
body .hbspt-form:not(:where(dialog *)) input.hs-input[type="tel"],
body .hbspt-form:not(:where(dialog *)) input.hs-input[type="number"],
body .hbspt-form:not(:where(dialog *)) select.hs-input,
body .hbspt-form:not(:where(dialog *)) textarea.hs-input {
	width: 100% !important;
	max-width: 100% !important;
	height: 48px !important;
	margin: 0 !important;
	padding: 0 1rem !important;
	border: 1px solid var(--hs-border) !important;
	border-radius: 10px !important;
	background-color: var(--hs-field-bg) !important;
	color: var(--hs-navy) !important;
	font-family: "Nunito Sans", Arial, sans-serif !important;
	font-size: 1rem !important;
	line-height: 1.4 !important;
	box-shadow: none !important;
	outline: none !important;
	appearance: none;
	-webkit-appearance: none;
}

body .hbspt-form:not(:where(dialog *)) textarea.hs-input {
	height: auto !important;
	min-height: 110px !important;
	padding: 0.85rem 1rem !important;
	resize: vertical;
}

body .hbspt-form:not(:where(dialog *)) select.hs-input {
	padding-right: 2.6rem !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%2306113a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right 14px center !important;
	background-size: 16px 16px !important;
	cursor: pointer;
}

body .hbspt-form:not(:where(dialog *)) .hs-input[type="text"]:focus,
body .hbspt-form:not(:where(dialog *)) .hs-input[type="email"]:focus,
body .hbspt-form:not(:where(dialog *)) .hs-input[type="tel"]:focus,
body .hbspt-form:not(:where(dialog *)) .hs-input[type="number"]:focus,
body .hbspt-form:not(:where(dialog *)) .hs-input[type="date"]:focus,
body .hbspt-form:not(:where(dialog *)) input.hs-input:focus,
body .hbspt-form:not(:where(dialog *)) select.hs-input:focus,
body .hbspt-form:not(:where(dialog *)) textarea.hs-input:focus {
	border-color: var(--hs-gold) !important;
	box-shadow: 0 0 0 3px rgba(242, 205, 120, 0.35) !important;
	outline: none !important;
}

body .hbspt-form:not(:where(dialog *)) .hs-input.invalid,
body .hbspt-form:not(:where(dialog *)) .hs-input.error,
body .hbspt-form:not(:where(dialog *)) .hs-input[aria-invalid="true"] {
	border-color: var(--hs-red) !important;
}

body .hbspt-form:not(:where(dialog *)) .hs-error-msgs,
body .hbspt-form:not(:where(dialog *)) ul.no-list.hs-error-msgs {
	margin: 0.35rem 0 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

body .hbspt-form:not(:where(dialog *)) .hs-error-msgs label,
body .hbspt-form:not(:where(dialog *)) .hs-error-msg,
body .hbspt-form:not(:where(dialog *)) .hs_error_rollup label {
	color: var(--hs-red) !important;
	font-size: 0.8125rem !important;
	font-weight: 600 !important;
}

body .hbspt-form:not(:where(dialog *)) .hs_error_rollup {
	margin: 0 0 0.85rem;
}

/* Checkbox / radio : ne pas appliquer le chrome des champs texte */
body .hbspt-form:not(:where(dialog *)) input.hs-input[type="checkbox"],
body .hbspt-form:not(:where(dialog *)) input.hs-input[type="radio"] {
	width: 1.05rem !important;
	height: 1.05rem !important;
	margin: 0 0.45rem 0 0 !important;
	padding: 0 !important;
	border-radius: 3px !important;
	accent-color: var(--hs-navy);
}

body .hbspt-form:not(:where(dialog *)) .inputs-list,
body .hbspt-form:not(:where(dialog *)) ul.inputs-list {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

body .hbspt-form:not(:where(dialog *)) .inputs-list label,
body .hbspt-form:not(:where(dialog *)) .hs-form-booleancheckbox-display {
	display: flex;
	align-items: flex-start;
	font-weight: 400 !important;
	color: var(--hs-navy) !important;
}

/* Bouton */
body .hbspt-form:not(:where(dialog *)) .hs-submit {
	margin: 0.35rem 0 0 !important;
}

body .hbspt-form:not(:where(dialog *)) .hs-submit .actions {
	margin: 0 !important;
	text-align: left;
}

body .hbspt-form:not(:where(dialog *)) .hs-button,
body .hbspt-form:not(:where(dialog *)) input.hs-button,
body .hbspt-form:not(:where(dialog *)) .hs-button.primary,
body .hbspt-form:not(:where(dialog *)) .hs-submit .actions input[type="submit"] {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: auto !important;
	min-height: 48px !important;
	margin: 0 !important;
	padding: 0.7rem 1.6rem !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: var(--hs-red) !important;
	background-image: none !important;
	color: #fff !important;
	font-family: "Nunito Sans", Arial, sans-serif !important;
	font-size: 1rem !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
	box-shadow: none !important;
	cursor: pointer;
	transition: filter 0.15s ease, transform 0.15s ease;
}

body .hbspt-form:not(:where(dialog *)) .hs-button:hover,
body .hbspt-form:not(:where(dialog *)) input.hs-button:hover,
body .hbspt-form:not(:where(dialog *)) .hs-submit .actions input[type="submit"]:hover {
	filter: brightness(0.95);
	background: var(--hs-red) !important;
}

body .hbspt-form:not(:where(dialog *)) .hs-button:focus-visible,
body .hbspt-form:not(:where(dialog *)) input.hs-button:focus-visible {
	outline: 2px solid var(--hs-gold);
	outline-offset: 3px;
}

body .hbspt-form:not(:where(dialog *)) .submitted-message,
body .hbspt-form:not(:where(dialog *)) .submitted-message p {
	color: var(--hs-navy) !important;
	font-size: 1.05rem;
	line-height: 1.5;
}

@media (max-width: 600px) {
	body .hbspt-form:not(:where(dialog *)) .form-columns-2 {
		display: block !important;
	}

	body .hbspt-form:not(:where(dialog *)) .form-columns-2 .hs-form-field,
	body .hbspt-form:not(:where(dialog *)) .form-columns-2 .field {
		width: 100% !important;
		max-width: 100% !important;
	}

	body .hbspt-form:not(:where(dialog *)) .hs-button,
	body .hbspt-form:not(:where(dialog *)) input.hs-button,
	body .hbspt-form:not(:where(dialog *)) .hs-submit .actions input[type="submit"] {
		width: 100% !important;
	}
}
