/* Chrome unique — toute <dialog> qui contient un form HubSpot */
:is(
	dialog.wpcursor-hs-popin,
	dialog:has(.hbspt-form),
	dialog:has(.hs-form),
	dialog:has(.hs-form-frame),
	dialog:has(iframe.hs-form-iframe)
) {
	--hs-navy: #06113a;
	--hs-gold: #f2cd78;
	--hs-red: #a63437;
	border: 2px solid var(--hs-gold) !important;
	border-radius: 18px !important;
	padding: 0 !important;
	max-width: min(560px, calc(100vw - 1.25rem)) !important;
	width: 100% !important;
	max-height: min(90vh, 860px) !important;
	overflow: hidden !important;
	background: #fff !important;
	color: var(--hs-navy) !important;
	box-shadow: 0 28px 64px rgba(6, 17, 58, 0.38) !important;
	z-index: 100000;
}

:is(
	dialog.wpcursor-hs-popin,
	dialog:has(.hbspt-form),
	dialog:has(.hs-form),
	dialog:has(.hs-form-frame),
	dialog:has(iframe.hs-form-iframe)
)::backdrop {
	background: rgba(6, 17, 58, 0.62) !important;
	backdrop-filter: blur(3px);
}

:is(
	dialog.wpcursor-hs-popin,
	dialog:has(.hbspt-form),
	dialog:has(.hs-form),
	dialog:has(.hs-form-frame),
	dialog:has(iframe.hs-form-iframe)
) [class*="__dialog-inner"] {
	display: flex;
	flex-direction: column;
	max-height: min(90vh, 860px);
}

:is(
	dialog.wpcursor-hs-popin,
	dialog:has(.hbspt-form),
	dialog:has(.hs-form),
	dialog:has(.hs-form-frame),
	dialog:has(iframe.hs-form-iframe)
) [class*="__dialog-head"] {
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	gap: 0.85rem;
	flex-shrink: 0;
	padding: 1.05rem 1.15rem !important;
	margin: 0;
	background: #06113a !important;
	color: #fff !important;
	position: relative;
	border: 0 !important;
}

:is(
	dialog.wpcursor-hs-popin,
	dialog:has(.hbspt-form),
	dialog:has(.hs-form),
	dialog:has(.hs-form-frame),
	dialog:has(iframe.hs-form-iframe)
) [class*="__dialog-head"]::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 3px;
	background: linear-gradient(90deg, #f2cd78 0%, #f7e2a8 50%, #f2cd78 100%);
}

:is(
	dialog.wpcursor-hs-popin,
	dialog:has(.hbspt-form),
	dialog:has(.hs-form),
	dialog:has(.hs-form-frame),
	dialog:has(iframe.hs-form-iframe)
) [class*="__dialog-title"],
:is(
	dialog.wpcursor-hs-popin,
	dialog:has(.hbspt-form),
	dialog:has(.hs-form),
	dialog:has(.hs-form-frame),
	dialog:has(iframe.hs-form-iframe)
) .wpcursor-hs-popin__title {
	display: block !important;
	margin: 0 !important;
	font-size: clamp(1.05rem, 2.4vw, 1.25rem) !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
	color: #fff !important;
}

:is(
	dialog.wpcursor-hs-popin,
	dialog:has(.hbspt-form),
	dialog:has(.hs-form),
	dialog:has(.hs-form-frame),
	dialog:has(iframe.hs-form-iframe)
) [class*="__dialog-close"] {
	appearance: none;
	flex-shrink: 0;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 2.15rem !important;
	height: 2.15rem !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 1.5px solid #f2cd78 !important;
	border-radius: 50% !important;
	background: #f2cd78 !important;
	font-size: 1.4rem !important;
	line-height: 1 !important;
	cursor: pointer;
	color: #06113a !important;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

:is(
	dialog.wpcursor-hs-popin,
	dialog:has(.hbspt-form),
	dialog:has(.hs-form),
	dialog:has(.hs-form-frame),
	dialog:has(iframe.hs-form-iframe)
) [class*="__dialog-close"]:hover,
:is(
	dialog.wpcursor-hs-popin,
	dialog:has(.hbspt-form),
	dialog:has(.hs-form),
	dialog:has(.hs-form-frame),
	dialog:has(iframe.hs-form-iframe)
) [class*="__dialog-close"]:focus-visible {
	background: #fff !important;
	border-color: #fff !important;
	color: #06113a !important;
	outline: none;
}

:is(
	dialog.wpcursor-hs-popin,
	dialog:has(.hbspt-form),
	dialog:has(.hs-form),
	dialog:has(.hs-form-frame),
	dialog:has(iframe.hs-form-iframe)
) [class*="__dialog-body"] {
	padding: 1.15rem 1.25rem 1.4rem;
	overflow: auto;
	-webkit-overflow-scrolling: touch;
	background: #fff;
}

:is(
	dialog.wpcursor-hs-popin,
	dialog:has(.hbspt-form),
	dialog:has(.hs-form),
	dialog:has(.hs-form-frame),
	dialog:has(iframe.hs-form-iframe)
) h1.gform_title,
:is(
	dialog.wpcursor-hs-popin,
	dialog:has(.hbspt-form),
	dialog:has(.hs-form),
	dialog:has(.hs-form-frame),
	dialog:has(iframe.hs-form-iframe)
) .wpcursor-hs-moved-title {
	display: none !important;
}

/* Fallback si le form n’est pas en iframe */
:is(
	dialog.wpcursor-hs-popin,
	dialog:has(.hbspt-form),
	dialog:has(.hs-form),
	dialog:has(.hs-form-frame),
	dialog:has(iframe.hs-form-iframe)
) .hs-form,
:is(
	dialog.wpcursor-hs-popin,
	dialog:has(.hbspt-form),
	dialog:has(.hs-form),
	dialog:has(.hs-form-frame),
	dialog:has(iframe.hs-form-iframe)
) .hbspt-form {
	max-width: 100%;
	font-family: inherit;
	color: #06113a;
}

:is(
	dialog.wpcursor-hs-popin,
	dialog:has(.hbspt-form),
	dialog:has(.hs-form),
	dialog:has(.hs-form-frame),
	dialog:has(iframe.hs-form-iframe)
) .hs-richtext,
:is(
	dialog.wpcursor-hs-popin,
	dialog:has(.hbspt-form),
	dialog:has(.hs-form),
	dialog:has(.hs-form-frame),
	dialog:has(iframe.hs-form-iframe)
) .hs-richtext h2,
:is(
	dialog.wpcursor-hs-popin,
	dialog:has(.hbspt-form),
	dialog:has(.hs-form),
	dialog:has(.hs-form-frame),
	dialog:has(iframe.hs-form-iframe)
) .hs-richtext h3,
:is(
	dialog.wpcursor-hs-popin,
	dialog:has(.hbspt-form),
	dialog:has(.hs-form),
	dialog:has(.hs-form-frame),
	dialog:has(iframe.hs-form-iframe)
) .hs-richtext p {
	color: #06113a !important;
}

:is(
	dialog.wpcursor-hs-popin,
	dialog:has(.hbspt-form),
	dialog:has(.hs-form),
	dialog:has(.hs-form-frame),
	dialog:has(iframe.hs-form-iframe)
) .hs-form-field > label {
	color: #06113a !important;
	font-weight: 600;
}

:is(
	dialog.wpcursor-hs-popin,
	dialog:has(.hbspt-form),
	dialog:has(.hs-form),
	dialog:has(.hs-form-frame),
	dialog:has(iframe.hs-form-iframe)
) .hs-form-required {
	color: #a63437 !important;
}

:is(
	dialog.wpcursor-hs-popin,
	dialog:has(.hbspt-form),
	dialog:has(.hs-form),
	dialog:has(.hs-form-frame),
	dialog:has(iframe.hs-form-iframe)
) .hs-input,
:is(
	dialog.wpcursor-hs-popin,
	dialog:has(.hbspt-form),
	dialog:has(.hs-form),
	dialog:has(.hs-form-frame),
	dialog:has(iframe.hs-form-iframe)
) input.hs-input,
:is(
	dialog.wpcursor-hs-popin,
	dialog:has(.hbspt-form),
	dialog:has(.hs-form),
	dialog:has(.hs-form-frame),
	dialog:has(iframe.hs-form-iframe)
) select.hs-input,
:is(
	dialog.wpcursor-hs-popin,
	dialog:has(.hbspt-form),
	dialog:has(.hs-form),
	dialog:has(.hs-form-frame),
	dialog:has(iframe.hs-form-iframe)
) textarea.hs-input {
	border: 1px solid rgba(6, 17, 58, 0.18) !important;
	border-radius: 10px !important;
	background: #f7f8fb !important;
	color: #06113a !important;
	box-shadow: none !important;
}

:is(
	dialog.wpcursor-hs-popin,
	dialog:has(.hbspt-form),
	dialog:has(.hs-form),
	dialog:has(.hs-form-frame),
	dialog:has(iframe.hs-form-iframe)
) .hs-input:focus,
:is(
	dialog.wpcursor-hs-popin,
	dialog:has(.hbspt-form),
	dialog:has(.hs-form),
	dialog:has(.hs-form-frame),
	dialog:has(iframe.hs-form-iframe)
) input.hs-input:focus,
:is(
	dialog.wpcursor-hs-popin,
	dialog:has(.hbspt-form),
	dialog:has(.hs-form),
	dialog:has(.hs-form-frame),
	dialog:has(iframe.hs-form-iframe)
) select.hs-input:focus,
:is(
	dialog.wpcursor-hs-popin,
	dialog:has(.hbspt-form),
	dialog:has(.hs-form),
	dialog:has(.hs-form-frame),
	dialog:has(iframe.hs-form-iframe)
) textarea.hs-input:focus {
	border-color: #f2cd78 !important;
	outline: none !important;
	box-shadow: 0 0 0 3px rgba(242, 205, 120, 0.35) !important;
}

:is(
	dialog.wpcursor-hs-popin,
	dialog:has(.hbspt-form),
	dialog:has(.hs-form),
	dialog:has(.hs-form-frame),
	dialog:has(iframe.hs-form-iframe)
) .hs-button,
:is(
	dialog.wpcursor-hs-popin,
	dialog:has(.hbspt-form),
	dialog:has(.hs-form),
	dialog:has(.hs-form-frame),
	dialog:has(iframe.hs-form-iframe)
) input.hs-button,
:is(
	dialog.wpcursor-hs-popin,
	dialog:has(.hbspt-form),
	dialog:has(.hs-form),
	dialog:has(.hs-form-frame),
	dialog:has(iframe.hs-form-iframe)
) .hs-submit .actions input[type="submit"] {
	background: #a63437 !important;
	border: 0 !important;
	border-radius: 12px !important;
	color: #fff !important;
	font-weight: 700 !important;
	box-shadow: none !important;
}

:is(
	dialog.wpcursor-hs-popin,
	dialog:has(.hbspt-form),
	dialog:has(.hs-form),
	dialog:has(.hs-form-frame),
	dialog:has(iframe.hs-form-iframe)
) .hs-button:hover,
:is(
	dialog.wpcursor-hs-popin,
	dialog:has(.hbspt-form),
	dialog:has(.hs-form),
	dialog:has(.hs-form-frame),
	dialog:has(iframe.hs-form-iframe)
) input.hs-button:hover,
:is(
	dialog.wpcursor-hs-popin,
	dialog:has(.hbspt-form),
	dialog:has(.hs-form),
	dialog:has(.hs-form-frame),
	dialog:has(iframe.hs-form-iframe)
) .hs-submit .actions input[type="submit"]:hover {
	filter: brightness(0.95);
}
