/* Styles partagés nécessaires à cette page */

:root {
	--gap: 1rem;
	--grand-gap: 2rem;
}

body {
	box-sizing: border-box;
	min-height: 100vh;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	background-color: var(--md-sys-color-surface, #fff);
	color: var(--md-sys-color-on-surface, #000);
	font-family: "Noto Sans", sans-serif;
	font-weight: 400;
	font-style: normal;
	font-variation-settings: "wdth" 100;
}

main {
	flex: 1;
}

a {
	color: inherit;
}

[hidden],
.hidden {
	display: none !important;
}

button {
	cursor: pointer;
	width: fit-content;
	border: none;
	background: transparent;
	color: inherit;
}

.btn {
	align-self: center;
	padding: 0.8rem 2rem;
	border-radius: 100rem;
	font-size: 1rem;
	transition: 0.2s;
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.btn:hover {
	transform: translateY(-0.2rem);
}

input:focus,
textarea:focus {
	outline: none;
}

.material-symbols-outlined {
	font-family: "Material Symbols Outlined";
	font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 1.5rem;
	display: inline-block;
	line-height: 1;
	vertical-align: middle;
	font-size: 1.5rem;
	color: inherit;
}
#open-menu,
.form-input {
	display: flex;
	align-items: center;
	gap: 0.8rem;
	background: var(--md-sys-color-primary-container);
	color: var(--md-sys-color-on-primary-container);
	padding: 0.9rem 1.2rem;
	border-radius: 1.65rem;
	font-size: 1rem;
	font-family: inherit;
	height: 1.5rem;
}

.form-input .material-symbols-outlined {
	font-size: 1.4rem;
	opacity: 0.8;
}

.form-input input {
	width: 100%;
	border: none;
	background: var(--md-sys-color-primary-container);
	outline: none;
	font-size: 1rem;
	color: var(--md-sys-color-on-primary-container);
	border-radius: 0.2rem;
	font-family: inherit;
}

.form-input input::placeholder {
	color: var(--md-sys-color-on-primary-container);
	opacity: 0.5;
}

/* ------------------------------------------------------------
	 Page Livre d'or
------------------------------------------------------------- */

.cherry-bomb-one-regular {
	font-family: "Cherry Bomb One", system-ui;
	font-weight: 400;
	font-style: normal;
}

.parisienne-regular {
	font-family: "Parisienne", cursive;
	font-weight: 400;
	font-style: normal;
}

#guest-book-title {
	font-weight: 400;
	font-style: normal;
	font-size: 3rem;
	margin: auto;
	color: var(--md-sys-color-secondary);
}

.guest-book-container {
	display: flex;
	flex-direction: column;
	font-family: Arial, sans-serif;
	max-width: 50rem;
	margin: 0 auto;
	padding: 2rem;
	gap: 1rem;
}

.guest-book-container p {
	padding: 0;
	text-align: justify;
	line-height: 1.2;
}

#guest-book-add-message {
	background: var(--md-sys-color-secondary);
	color: var(--md-sys-color-on-secondary);
	position: fixed;
	left: 50%;
	bottom: 2rem;
	z-index: 2;
	transform: translateX(-50%);
	transform-origin: center center;
	overflow: hidden;
	isolation: isolate;
	rotate: 0deg;
	transition: width 0.36s ease-in-out, padding 0.36s ease-in-out, gap 0.36s ease-in-out, border-radius 0.36s ease-in-out, transform 0.6s ease-in-out, rotate 0.3s ease-in-out, background-color 0.5s ease, --guest-book-spot-progress 1.5s ease, --guest-book-spot-color 1.5s ease;
}

@property --guest-book-spot-progress {
	syntax: "<number>";
	inherits: true;
	initial-value: 0;
}

@property --guest-book-spot-color {
	syntax: "<color>";
	inherits: false;
	initial-value: #4c626a;
}

#guest-book-add-message.is-auto-returning {
	transition-duration: 0.6s, 0.36s, 0.36s, 0.36s, 0.6s, 0.3s, 0.5s, 1.5s, 1.5s;
}

#guest-book-add-message.is-auto-cancelled,
#guest-book-add-message.is-auto-cancelled .guest-book-add-icons,
#guest-book-add-message.is-auto-cancelled .guest-book-add-label {
	transition: none !important;
}

.guest-book-add-icons {
	display: inline-flex;
	flex: 0 0 auto;
	transform-origin: 50% 50%;
	rotate: 0deg;
	transition: transform 0.36s ease-in-out, rotate 0.3s ease-in-out;
}

.guest-book-add-label {
	display: inline-block;
	white-space: nowrap;
	clip-path: inset(0);
	transition: clip-path 0.24s ease-in-out;
}

#guest-book-add-message.is-auto-animating .guest-book-add-label {
	clip-path: inset(0 0 0 100%);
}

#guest-book-add-message.is-auto-circle {
	gap: 0;
	border-radius: 50%;
}

#guest-book-add-message.is-auto-zoomed {
	transform: translateX(-50%) translateY(var(--guest-book-circle-lift, 0px)) scale(var(--guest-book-zoom-scale, 1.5));
}

#guest-book-add-message.is-auto-rotated .guest-book-add-icons {
	rotate: 90deg;
}

#guest-book-add-message.is-auto-reset-rotation .guest-book-add-icons {
	transition: none !important;
}

#guest-book-add-message:hover {
	background: var(--md-sys-color-secondary-container);
	color: var(--md-sys-color-on-secondary-container);
}

#guest-book-add-message::after {
	position: absolute;
	inset: 0;
	border-radius: inherit;
	content: "";
	pointer-events: none;
	opacity: 0;
	transition: opacity 1.5s ease;
}

#guest-book-add-message.has-pointer-spot {
	--guest-book-spot-color: var(--md-sys-color-secondary-container);
	background-color: transparent;
	background-image: radial-gradient(
		ellipse 44px 72px at var(--guest-book-pointer-x, 50%) var(--guest-book-pointer-y, 50%),
		transparent 0 calc(30px * var(--guest-book-spot-progress)),
		var(--guest-book-spot-color) calc(72px * var(--guest-book-spot-progress))
	);
}

#guest-book-add-message.is-pointer-spot-leaving {
	--guest-book-spot-progress: 0;
	--guest-book-spot-color: var(--md-sys-color-secondary);
	background-color: var(--md-sys-color-secondary);
	transition-duration: 0.36s, 0.36s, 0.36s, 0.36s, 0.6s, 0.3s, 0.8s, 0.8s, 0.8s;
}

#guest-book-add-message.is-pointer-spot-leaving::after {
	opacity: 0;
	transition-duration: 0.8s;
}

#guest-book-add-message::after {
	z-index: 1;
	background:
		radial-gradient(ellipse 20px 34px at var(--guest-book-pointer-x, 50%) var(--guest-book-pointer-y, 50%), rgba(255, 255, 255, 0.2), transparent 100%),
		radial-gradient(ellipse 15px 28px at calc(var(--guest-book-pointer-x, 50%) + 12px) calc(var(--guest-book-pointer-y, 50%) - 18px), rgba(255, 255, 255, 0.07), transparent 100%),
		rgba(255, 255, 255, 0.035);
	-webkit-backdrop-filter: blur(4px) saturate(1.1);
	backdrop-filter: blur(4px) saturate(1.1);
	-webkit-mask-image: radial-gradient(
		ellipse 44px 72px at var(--guest-book-pointer-x, 50%) var(--guest-book-pointer-y, 50%),
		#000 0 calc(30px * var(--guest-book-spot-progress, 0)),
		transparent calc(72px * var(--guest-book-spot-progress, 0))
	);
	mask-image: radial-gradient(
		ellipse 44px 72px at var(--guest-book-pointer-x, 50%) var(--guest-book-pointer-y, 50%),
		#000 0 calc(30px * var(--guest-book-spot-progress, 0)),
		transparent calc(72px * var(--guest-book-spot-progress, 0))
	);
}

#guest-book-add-message.has-pointer-spot::after {
	opacity: 1;
}

.guest-book-add-icons,
.guest-book-add-label {
	position: relative;
	z-index: 2;
}

#guest-book-add-message.is-auto-animating:hover {
	transform: translateX(-50%);
}

#guest-book-add-message.is-auto-zoomed:hover {
	transform: translateX(-50%) translateY(var(--guest-book-circle-lift, 0px)) scale(var(--guest-book-zoom-scale, 1.5));
}

#guest-book-add-message.is-auto-rotated:hover .guest-book-add-icons {
	rotate: 90deg;
}

#guest-book-add-message:hover #guest-book-btn-ico-1 {
	display: none;
}

#guest-book-btn-ico-2 {
	display: none;
}

#guest-book-add-message:hover #guest-book-btn-ico-2 {
	display: inline-block;
}

#guest-book-add-message.is-auto-animating #guest-book-btn-ico-1 {
	display: inline-block;
}

#guest-book-add-message.is-auto-animating #guest-book-btn-ico-2 {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	#guest-book-add-message,
	.guest-book-add-icons,
	.guest-book-add-label {
		transition: none;
	}
}

.guest-book-messages {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.last-guest-book-messages {
	display: flex;
	gap: 3rem;
	justify-content: flex-start;
	flex-direction: row;
	align-content: flex-start;
}

@media (max-width: 40rem) {
	.last-guest-book-messages {
		flex-direction: column;
		gap: 1rem;
	}
}

.guest-book-message {
	background-color: var(--md-sys-color-primary-container);
	color: var(--md-sys-color-on-primary-container);
	padding: 1rem;
	border-radius: 1rem;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gb-message-preview {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	max-width: 500px;
	background-color: var(--md-sys-color-secondary);
	color: var(--md-sys-color-on-secondary);
	padding: 1rem 1.2rem;
	border-radius: 1.5rem 1.5rem 0 1.5rem;
}

.gb-message-content {
	font-size: 1rem;
	line-height: 1.5;
	white-space: pre-wrap;
}

.gb-message-meta {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	align-items: flex-end;
}

.gb-message-author {
	display: block;
	font-family: "Parisienne", cursive;
	font-size: 1.2rem;
	text-align: right;
}

.gb-message-date {
	display: block;
	font-family: "Parisienne", cursive;
	text-align: right;
}

.guest-book-message-header {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	margin-bottom: 1rem;
	gap: 0.5rem;
}

.guest-book-message-header div {
	display: flex;
	align-items: center;
	margin-right: 1rem;
	gap: 0.5rem;
}

#guest-book-add-message-content {
	height: auto;
	min-height: 5rem;
	background: var(--md-sys-color-primary-container);
	color: var(--md-sys-color-on-primary-container);
	border: none;
	border-radius: 1.65rem;
	padding: 1rem 1.2rem;
	font-size: 1rem;
	resize: none;
	font-family: inherit;
}

#guest-book-add-message-content::placeholder {
	color: var(--md-sys-color-on-primary-container);
	opacity: 0.5;
}

#guest-book-add-message-container {
	display: none;
	flex-direction: column;
	gap: 1rem;
	margin-top: 1rem;
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: var(--md-sys-color-primary);
	color: var(--md-sys-color-on-primary);
	padding: 1rem;
	border-radius: 1.65rem;
	z-index: 15;
}

#guest-book-add-message-buttons {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

#guest-book-add-message-buttons .btn {
	width: auto;
	background: var(--md-sys-color-primary-container);
	color: var(--md-sys-color-on-primary-container);
	justify-content: center;
}

#guest-book-add-message-buttons .btn:hover {
	background: var(--md-sys-color-primary);
	color: var(--md-sys-color-on-primary);
}

#guest-book-message-form-backdrop {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: 10;
	backdrop-filter: blur(2px);
}
