/**
 * Notification des nouvelles publications.
 */

/* ==========================================================
   CARTE PRINCIPALE
   ========================================================== */

.elafont-content-notification {
	position: fixed;
	z-index: 9998;
	top: 110px;
	right: 28px;

	display: grid;
	grid-template-columns: 110px minmax(0, 1fr);
	gap: 16px;
	align-items: center;

	box-sizing: border-box;
	width: min(430px, calc(100vw - 40px));
	min-height: 154px;
	padding: 14px 48px 14px 14px;

	color: #3f4542;

	/*
	 * Fond opaque utilisé par défaut.
	 */
	background: #fffdfa;

	border: 1px solid rgba(255, 255, 255, 0.72);
	border-radius: 16px;

	box-shadow:
		0 14px 38px rgba(47, 55, 50, 0.14),
		0 3px 10px rgba(47, 55, 50, 0.08),
		inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

/*
 * L’effet translucide n’est appliqué que lorsque
 * le navigateur prend en charge le flou d’arrière-plan.
 */
@supports (
	(-webkit-backdrop-filter: blur(1px)) or
	(backdrop-filter: blur(1px))
) {

	.elafont-content-notification {
		background: rgba(255, 253, 249, 0.70);

		-webkit-backdrop-filter:
			blur(22px)
			saturate(125%);

		backdrop-filter:
			blur(22px)
			saturate(125%);
	}
}

.elafont-content-notification[hidden] {
	display: none !important;
}

.elafont-content-notification.is-visible {
	animation: elafont-notification-entry 420ms ease-out both;
}


/* ==========================================================
   IMAGE
   ========================================================== */

.elafont-content-notification__visual {
	display: block;
	width: 110px;
	height: 110px;
	overflow: hidden;

	border-radius: 12px;
	background: #edf0eb;
}

.elafont-content-notification__visual img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;

	object-fit: cover;
	border: 0;
	transition: transform 300ms ease;
}

.elafont-content-notification__visual:hover img {
	transform: scale(1.035);
}


/* ==========================================================
   CONTENU
   ========================================================== */

.elafont-content-notification__content {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
}

.elafont-content-notification__label {
	margin: 0 0 6px;
	padding: 0;

	color: #7e9d84;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.elafont-content-notification__title-link {
	display: block;
	margin: 0;
	padding: 0;

	color: #343936;
	text-decoration: none;
}

.elafont-content-notification__title {
	display: -webkit-box;
	overflow: hidden;
	margin: 0;

	font-family: Georgia, "Times New Roman", serif;
	font-size: 23px;
	font-weight: 400;
	line-height: 1.18;

	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.elafont-content-notification__title-link:hover {
	color: #6f8d76;
}

.elafont-content-notification__action {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	gap: 9px;

	margin-top: 10px;
	padding: 0;

	color: #75947c;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
}

.elafont-content-notification__action:hover {
	color: #4f7058;
}


/* ==========================================================
   BOUTON DE LECTURE
   ========================================================== */

.elafont-content-notification__play {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 32px;

	box-sizing: border-box;
	width: 32px;
	height: 32px;
	padding-left: 2px;

	color: #ffffff;
	background: #78967e;
	border-radius: 50%;

	font-family: Arial, sans-serif;
	font-size: 12px;
	line-height: 1;

	transition:
		background-color 200ms ease,
		transform 200ms ease;
}

.elafont-content-notification__action:hover
.elafont-content-notification__play {
	background: #587460;
	transform: scale(1.05);
}


/* ==========================================================
   BOUTON DE FERMETURE
   ========================================================== */

.elafont-content-notification__close {
	position: absolute;
	top: 10px;
	right: 10px;

	display: flex;
	align-items: center;
	justify-content: center;

	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;

	color: #343936;
	background: transparent;
	border: 0;
	border-radius: 50%;
	cursor: pointer;

	font-family: Arial, sans-serif;
	font-size: 26px;
	font-weight: 300;
	line-height: 1;

	transition:
		background-color 200ms ease,
		color 200ms ease;
}

.elafont-content-notification__close:hover,
.elafont-content-notification__close:focus-visible {
	color: #587460;
	background: rgba(117, 148, 124, 0.11);
	outline: none;
}


/* ==========================================================
   PUBLICATION SANS IMAGE
   ========================================================== */

.elafont-content-notification--without-image {
	grid-template-columns: minmax(0, 1fr);
}


/* ==========================================================
   ADMINISTRATION WORDPRESS
   ========================================================== */

body.admin-bar .elafont-content-notification {
	top: 142px;
}


/* ==========================================================
   TABLETTE ET MOBILE
   ========================================================== */

@media (max-width: 980px) {

	.elafont-content-notification {
		top: 96px;
		right: 16px;

		width: min(410px, calc(100vw - 32px));
	}

	body.admin-bar .elafont-content-notification {
		top: 142px;
	}
}

@media
	(max-width: 767px) and
	(hover: none) and
	(pointer: coarse) {

	.elafont-content-notification {
		top: 88px;
		right: 12px;
		left: 12px;

		grid-template-columns: 82px minmax(0, 1fr);
		gap: 12px;

		width: auto;
		min-height: 116px;
		padding: 11px 42px 11px 11px;

		border-radius: 14px;
	}

	.elafont-content-notification__visual {
		width: 82px;
		height: 82px;
		border-radius: 10px;
	}

	.elafont-content-notification__label {
		margin-bottom: 4px;
		font-size: 10px;
	}

	.elafont-content-notification__title {
		font-size: 19px;
		line-height: 1.15;
	}

	.elafont-content-notification__action {
		gap: 7px;
		margin-top: 7px;
		font-size: 14px;
	}

	.elafont-content-notification__play {
		flex-basis: 27px;
		width: 27px;
		height: 27px;
		font-size: 10px;
	}

	.elafont-content-notification__close {
		top: 6px;
		right: 6px;
		width: 32px;
		height: 32px;
		font-size: 23px;
	}

	body.admin-bar .elafont-content-notification {
		top: 134px;
	}
}
@media (max-width: 767px) {

	@supports (
		(-webkit-backdrop-filter: blur(1px)) or
		(backdrop-filter: blur(1px))
	) {

		.elafont-content-notification {
			background: rgba(255, 253, 249, 0.76);

			-webkit-backdrop-filter:
				blur(18px)
				saturate(118%);

			backdrop-filter:
				blur(18px)
				saturate(118%);
		}
	}
}

/* ==========================================================
   ANIMATION
   ========================================================== */

@keyframes elafont-notification-entry {

	from {
		opacity: 0;
		transform: translate3d(24px, -5px, 0);
	}

	to {
		opacity: 1;
		transform: translate3d(0, 0, 0);
	}
}

@media (prefers-reduced-motion: reduce) {

	.elafont-content-notification.is-visible {
		animation: none;
	}

	.elafont-content-notification__visual img,
	.elafont-content-notification__play {
		transition: none;
	}
}
.elafont-content-notification.is-closing {
	pointer-events: none;
	animation: elafont-notification-exit 240ms ease-in both;
}

@keyframes elafont-notification-exit {

	from {
		opacity: 1;
		transform: translate3d(0, 0, 0);
	}

	to {
		opacity: 0;
		transform: translate3d(18px, -4px, 0);
	}
}

@media (prefers-reduced-motion: reduce) {

	.elafont-content-notification.is-closing {
		animation: none;
	}
}
@media (prefers-reduced-transparency: reduce) {

	.elafont-content-notification {
		background: #fffdfa;

		-webkit-backdrop-filter: none;
		backdrop-filter: none;
	}
}