:where(:root) {
	/* Canonical design tokens shared by themes and Hopopup plugins. */
	--hopopup-color-ink: #17212b;
	--hopopup-color-muted: #5d6a76;
	--hopopup-color-surface: #ffffff;
	--hopopup-color-surface-soft: #f5f7f6;
	--hopopup-color-border: #d8dfdd;
	--hopopup-color-primary: #FD4B00;
	--hopopup-color-primary-dark: #004d45;
	--hopopup-color-primary-contrast: #ffffff;
	--hopopup-color-accent: #b84a39;
	--hopopup-color-focus: #1f7ae0;
	--hopopup-color-success: #147a2e;
	--hopopup-color-error: #b32d2e;
	--hopopup-color-warning: #a15c00;

	--hopopup-font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--hopopup-font-heading: var(--hopopup-font-body);

	--hopopup-radius-sm: 4px;
	--hopopup-radius-md: 8px;
	--hopopup-radius-lg: 14px;
	--hopopup-radius-pill: 999px;

	--hopopup-shadow-soft: 0 16px 42px rgba(23, 33, 43, .08);
	--hopopup-shell: min(1120px, calc(100vw - 32px));

	--hopopup-space-xs: .5rem;
	--hopopup-space-sm: .75rem;
	--hopopup-space-md: 1rem;
	--hopopup-space-lg: 1.5rem;
	--hopopup-space-xl: 2rem;
	--hopopup-space-2xl: 3rem;

	/* Component tokens. Override these only when a site needs a specific component variant. */
	--hopopup-link-color: var(--hopopup-color-primary);
	--hopopup-link-hover-color: var(--hopopup-color-primary-dark);

	--hopopup-button-bg: transparent;
	--hopopup-button-color: var(--hopopup-color-primary);
	--hopopup-button-border: var(--hopopup-color-primary);
	--hopopup-button-hover-bg: var(--hopopup-color-surface-soft);
	--hopopup-button-hover-color: var(--hopopup-color-primary-dark);
	--hopopup-button-hover-border: var(--hopopup-color-primary-dark);
	--hopopup-button-primary-bg: var(--hopopup-color-primary);
	--hopopup-button-primary-color: var(--hopopup-color-primary-contrast);
	--hopopup-button-primary-border: var(--hopopup-color-primary);
	--hopopup-button-primary-hover-bg: var(--hopopup-color-primary-dark);
	--hopopup-button-primary-hover-border: var(--hopopup-color-primary-dark);
	--hopopup-button-secondary-bg: var(--hopopup-color-surface-soft);
	--hopopup-button-secondary-color: var(--hopopup-color-ink);
	--hopopup-button-secondary-border: var(--hopopup-color-border);
	--hopopup-button-padding: .75rem 1rem;
	--hopopup-button-radius: var(--hopopup-radius-sm);

	--hopopup-card-bg: var(--hopopup-color-surface);
	--hopopup-card-border: var(--hopopup-color-border);
	--hopopup-card-radius: var(--hopopup-radius-md);
	--hopopup-card-shadow: none;
	--hopopup-card-padding: var(--hopopup-space-md);

	--hopopup-form-field-bg: var(--hopopup-color-surface);
	--hopopup-form-field-color: var(--hopopup-color-ink);
	--hopopup-form-field-border: var(--hopopup-color-border);
	--hopopup-form-field-focus: var(--hopopup-color-focus);
	--hopopup-form-field-radius: var(--hopopup-radius-sm);
	--hopopup-form-field-padding: .65rem .75rem;

	/* Backward-compatible aliases used by earlier private plugins. */
	--hopopup-primary: var(--hopopup-color-primary);
	--hopopup-primary-contrast: var(--hopopup-color-primary-contrast);
	--hopopup-secondary: var(--hopopup-color-surface-soft);
	--hopopup-text: var(--hopopup-color-ink);
	--hopopup-muted: var(--hopopup-color-muted);
	--hopopup-border: var(--hopopup-color-border);
	--hopopup-surface: var(--hopopup-color-surface);
	--hopopup-success: var(--hopopup-color-success);
	--hopopup-error: var(--hopopup-color-error);
	--hopopup-radius: var(--hopopup-radius-md);
	--hopopup-gap: var(--hopopup-space-md);
	--hopopup-shadow: var(--hopopup-shadow-soft);
}

.hopopup-card,
.hopopup-panel,
.hopopup-message,
.hopopup-kpi,
.hopopup-calendar,
.hopopup-form-section {
	background: var(--hopopup-card-bg);
	border: 1px solid var(--hopopup-card-border);
	border-radius: var(--hopopup-card-radius);
	box-shadow: var(--hopopup-card-shadow);
	color: var(--hopopup-color-ink);
}

.hopopup-card,
.hopopup-panel,
.hopopup-form-section,
.hopopup-message,
.hopopup-kpi {
	padding: var(--hopopup-card-padding);
}

.hopopup-link,
a.hopopup-link {
	color: var(--hopopup-link-color);
}

.hopopup-link:hover,
a.hopopup-link:hover {
	color: var(--hopopup-link-hover-color);
}

.hopopup-button,
a.hopopup-button,
button.hopopup-button {
	align-items: center;
	background: var(--hopopup-button-bg);
	border: 1px solid var(--hopopup-button-border);
	border-radius: var(--hopopup-button-radius);
	color: var(--hopopup-button-color);
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	gap: .35rem;
	line-height: 1.2;
	padding: var(--hopopup-button-padding);
	text-decoration: none;
	transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.hopopup-button:hover,
a.hopopup-button:hover,
button.hopopup-button:hover {
	background: var(--hopopup-button-hover-bg);
	border-color: var(--hopopup-button-hover-border);
	color: var(--hopopup-button-hover-color);
	text-decoration: none;
}

.hopopup-button:focus-visible,
a.hopopup-button:focus-visible,
button.hopopup-button:focus-visible,
.hopopup-form input:focus-visible,
.hopopup-form select:focus-visible,
.hopopup-form textarea:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--hopopup-color-focus) 40%, transparent);
	outline-offset: 2px;
}

.hopopup-button--primary,
a.hopopup-button--primary,
button.hopopup-button--primary {
	background: var(--hopopup-button-primary-bg);
	border-color: var(--hopopup-button-primary-border);
	color: var(--hopopup-button-primary-color);
	font-weight: 700;
}

.hopopup-button--primary:hover,
a.hopopup-button--primary:hover,
button.hopopup-button--primary:hover {
	background: var(--hopopup-button-primary-hover-bg);
	border-color: var(--hopopup-button-primary-hover-border);
	color: var(--hopopup-button-primary-color);
}

.hopopup-button--secondary,
a.hopopup-button--secondary,
button.hopopup-button--secondary {
	background: var(--hopopup-button-secondary-bg);
	border-color: var(--hopopup-button-secondary-border);
	color: var(--hopopup-button-secondary-color);
}

.hopopup-message--success {
	border-color: var(--hopopup-color-success);
	color: var(--hopopup-color-success);
}

.hopopup-message--error,
.hopopup-error {
	border-color: var(--hopopup-color-error);
	color: var(--hopopup-color-error);
}

.hopopup-grid {
	display: grid;
	gap: var(--hopopup-space-md);
}

.hopopup-kpis {
	display: grid;
	gap: var(--hopopup-space-sm);
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.hopopup-kpi strong {
	display: block;
	font-size: clamp(1.5rem, 2.5vw, 2rem);
	line-height: 1.1;
}

.hopopup-kpi span,
.hopopup-muted {
	color: var(--hopopup-color-muted);
}

.hopopup-calendar {
	overflow: hidden;
}

.hopopup-form input,
.hopopup-form select,
.hopopup-form textarea {
	background: var(--hopopup-form-field-bg);
	border: 1px solid var(--hopopup-form-field-border);
	border-radius: var(--hopopup-form-field-radius);
	color: var(--hopopup-form-field-color);
	font: inherit;
	padding: var(--hopopup-form-field-padding);
	width: 100%;
}

.hopopup-form label {
	display: grid;
	gap: var(--hopopup-space-xs);
}

.hopopup-flow [hidden],
.hopopup-lead-flow [hidden] {
	display: none !important;
}

.hopopup-shell {
	margin-inline: auto;
	max-width: var(--hopopup-shell);
	width: 100%;
}

.hopopup-template {
	padding-block: var(--hopopup-space-2xl);
}

/* Fil d’Ariane commun. Le séparateur est dans le HTML pour laisser le réglage PHP piloter l’affichage et le JSON-LD. */
.hopopup-breadcrumb {
	font-size: .95rem;
	color: var(--hopopup-color-muted, #5d6a76);
	margin-block: 0 var(--hopopup-space-lg, 1.5rem);
}

.hopopup-breadcrumb__list {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: var(--hopopup-space-xs, .5rem);
	list-style: none;
	margin: 0;
	padding: 0;
}

.hopopup-breadcrumb__item {
	align-items: center;
	display: inline-flex;
	gap: var(--hopopup-space-xs, .5rem);
}

.hopopup-breadcrumb__link {
	color: var(--hopopup-link-color, var(--hopopup-color-primary, #FD4B00));
	text-decoration: none;
}

.hopopup-breadcrumb__link:hover,
.hopopup-breadcrumb__link:focus {
	color: var(--hopopup-link-hover-color, var(--hopopup-color-primary-dark, #004d45));
	text-decoration: underline;
}

.hopopup-breadcrumb__current {
	color: var(--hopopup-color-ink, #17212b);
	font-weight: 600;
}

.hopopup-breadcrumb__separator {
	color: var(--hopopup-color-muted, #5d6a76);
}
