/**
 * CYPURGE — barre fixe mobile et feuille de formulaire.
 */

body.cypurge .c-sticky {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	z-index: 40;
	padding: 0.75rem;
	border-top: 1px solid color-mix(in oklab, var(--c-primary) 40%, transparent);
	background: color-mix(in oklab, var(--c-background) 95%, transparent);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	transition: transform 220ms var(--c-ease), opacity 220ms var(--c-ease);
}

/* Le bloc de contact est à l'écran : la barre descend hors de vue. */
body.cypurge .c-sticky.is-hidden {
	transform: translateY(100%);
	opacity: 0;
	pointer-events: none;
}

@media (min-width: 1024px) {
	body.cypurge .c-sticky {
		display: none;
	}
}

/* ── La feuille ─────────────────────────────────────────────────────
 * Le <dialog> couvre l'écran et porte lui-même le voile : ::backdrop
 * n'hérite pas des variables du corps de page dans tous les navigateurs. */

body.cypurge .c-sheet {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: color-mix(in oklab, var(--c-background) 80%, transparent);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	color: var(--c-foreground);
	overflow: hidden;
}

body.cypurge .c-sheet::backdrop {
	background: transparent;
}

body.cypurge .c-sheet__panel {
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	max-height: 92vh;
	overflow: auto;
	padding: 1.25rem;
	border-top: 1px solid color-mix(in oklab, var(--c-primary) 50%, transparent);
	background: var(--c-card);
	animation: cypurge-sheet-in 260ms var(--c-ease);
}

@keyframes cypurge-sheet-in {
	from {
		transform: translateY(24px);
		opacity: 0;
	}
}

body.cypurge .c-sheet__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1.25rem;
}

body.cypurge .c-sheet__title {
	font-size: 1rem;
	font-weight: 600;
}

/* La page ne défile pas sous la feuille ouverte. */
html:has(.c-sheet[open]) {
	overflow: hidden;
}
