/*
 * Écran hors connexion (app/features/offline.js) : plein écran, au-dessus de tout.
 */

.offline-screen {
	position: fixed;
	inset: 0;
	width: 100%;
	max-width: none;
	height: 100dvh;
	max-height: none;
	padding: 1.5rem;
	border: none;
	box-sizing: border-box;
	background-color: var(--ColorBackground);
	color: var(--ColorText);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.offline-screen[open] {
	display: flex;
	justify-content: center;
}

.offline-screen.open {
	opacity: 1;
}

.offline-screen::backdrop {
	background: transparent;
}

.offline-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	width: 100%;
	max-width: 24rem;
	height: 100%;
	text-align: center;
}

.offline-icon {
	display: grid;
	place-items: center;
	width: 5rem;
	height: 5rem;
	border-radius: 50%;
	background-color: var(--ColorContainer);
	color: var(--ColorPrimary);
	font-size: 2rem;
}

.offline-content h1 {
	font-size: 1.25rem;
	font-family: var(--FontFocus);
	color: var(--ColorPrimary);
	text-align: center;
}

.offline-content .shake {
	animation: offlineShake 0.4s ease;
}

@keyframes offlineShake {
	20%, 60% { transform: translateX(-0.4rem); }
	40%, 80% { transform: translateX(0.4rem); }
}

@media (prefers-reduced-motion: reduce) {
	.offline-screen {
		transition: none;
	}

	.offline-content .shake {
		animation: none;
	}
}
