/* Fenêtre d'annonce Ligneo : en bas à droite, sur le modèle de la fenêtre « portes ouvertes » de maubert.qoma.fr.
   Couleurs par défaut : celles du thème Ligneo (--primary, --secondary, --dark). Pour les changer, redéfinir les variables
   sur .ligneo-popup dans le CSS du thème. */

.ligneo-popup {
	--ligneo-popup-accent: #EB602A;
	--ligneo-popup-accent-fonce: #D14D1A;
	--ligneo-popup-accent-ombre: rgba(235, 96, 42, .55);
	--ligneo-popup-titre: #204B41;
	--ligneo-popup-texte: #606060;
	--ligneo-popup-fond: #FFFFFF;
	--ligneo-popup-voile: rgba(32, 75, 65, .55);
	--ligneo-popup-ombre: 0 30px 70px -20px rgba(32, 75, 65, .45);
	--ligneo-popup-rayon: 22px;
	--ligneo-popup-largeur: 340px;
	--ligneo-popup-hauteur-visuel: 150px;

	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 9990;
	box-sizing: border-box;
	width: var(--ligneo-popup-largeur);
	max-width: calc(100vw - 40px);
	max-height: calc(100vh - 48px);
	overflow-x: hidden;
	overflow-y: auto;
	margin: 0;
	background: var(--ligneo-popup-fond);
	border-radius: var(--ligneo-popup-rayon);
	box-shadow: var(--ligneo-popup-ombre);
	font-family: inherit;
	text-align: left;
	transform: translateY(140%) scale(.96);
	opacity: 0;
	pointer-events: none;
	transition: transform .55s cubic-bezier(.2, .9, .25, 1), opacity .45s;
}

.ligneo-popup[hidden] {
	display: none;
}

.ligneo-popup.est-visible {
	transform: none;
	opacity: 1;
	pointer-events: auto;
}

.ligneo-popup *,
.ligneo-popup *::before,
.ligneo-popup *::after {
	box-sizing: border-box;
}

/* Bouton de fermeture, posé sur le visuel */
.ligneo-popup .ligneo-popup__fermer {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--ligneo-popup-voile);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	color: #fff;
	line-height: 1;
	cursor: pointer;
	transition: background-color .2s, color .2s, transform .2s;
}

.ligneo-popup .ligneo-popup__fermer:hover,
.ligneo-popup .ligneo-popup__fermer:focus-visible {
	background: var(--ligneo-popup-accent);
	color: #fff;
	transform: rotate(90deg);
}

.ligneo-popup .ligneo-popup__fermer:focus-visible {
	outline: 3px solid var(--ligneo-popup-fond);
	outline-offset: 2px;
	box-shadow: 0 0 0 5px var(--ligneo-popup-accent);
}

.ligneo-popup .ligneo-popup__fermer svg {
	width: 17px;
	height: 17px;
}

/* Visuel */
.ligneo-popup__visuel {
	position: relative;
	height: var(--ligneo-popup-hauteur-visuel);
	overflow: hidden;
	background: var(--ligneo-popup-titre);
}

.ligneo-popup .ligneo-popup__visuel img {
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	margin: 0;
	border-radius: 0;
	object-fit: cover;
}

.ligneo-popup__visuel::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 40%, rgba(32, 75, 65, .35));
}

/* Contenu */
.ligneo-popup__corps {
	padding: 20px 22px 22px;
}

.ligneo-popup .ligneo-popup__titre {
	margin: 0 0 9px;
	padding: 0;
	color: var(--ligneo-popup-titre);
	font-family: inherit;
	font-size: 21px;
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: 0;
	text-transform: none;
}

.ligneo-popup .ligneo-popup__texte {
	margin: 0 0 18px;
	color: var(--ligneo-popup-texte);
	font-size: 14px;
	line-height: 1.55;
}

.ligneo-popup .ligneo-popup__texte p {
	margin: 0 0 .6em;
	padding: 0;
	font-size: inherit;
	line-height: inherit;
}

.ligneo-popup .ligneo-popup__texte > :last-child,
.ligneo-popup .ligneo-popup__corps > :last-child {
	margin-bottom: 0;
}

.ligneo-popup .ligneo-popup__texte a {
	color: var(--ligneo-popup-accent-fonce);
}

/* Boutons */
.ligneo-popup__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.ligneo-popup .ligneo-popup__bouton {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 11px 20px;
	border-radius: 12px;
	background: var(--ligneo-popup-accent);
	box-shadow: 0 10px 22px -10px var(--ligneo-popup-accent-ombre);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color .25s, transform .25s;
}

.ligneo-popup .ligneo-popup__bouton:hover,
.ligneo-popup .ligneo-popup__bouton:focus-visible {
	background: var(--ligneo-popup-accent-fonce);
	color: #fff;
	text-decoration: none;
	transform: translateY(-2px);
}

.ligneo-popup .ligneo-popup__bouton svg {
	width: 16px;
	height: 16px;
	flex: none;
	transition: transform .25s;
}

.ligneo-popup .ligneo-popup__bouton:hover svg {
	transform: translateX(3px);
}

.ligneo-popup .ligneo-popup__lien {
	padding: 11px 6px;
	border-bottom: 2px solid transparent;
	color: var(--ligneo-popup-titre);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	transition: color .2s, border-color .2s;
}

.ligneo-popup .ligneo-popup__lien:hover,
.ligneo-popup .ligneo-popup__lien:focus-visible {
	border-color: var(--ligneo-popup-accent);
	color: var(--ligneo-popup-accent-fonce);
	text-decoration: none;
}

.ligneo-popup .ligneo-popup__bouton:focus-visible,
.ligneo-popup .ligneo-popup__lien:focus-visible {
	outline: 2px solid var(--ligneo-popup-titre);
	outline-offset: 3px;
}

/* Sans visuel : la croix se pose sur le fond blanc, le titre lui laisse la place */
.ligneo-popup--sans-visuel .ligneo-popup__fermer {
	background: transparent;
	color: var(--ligneo-popup-titre);
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}

.ligneo-popup--sans-visuel .ligneo-popup__corps {
	padding-top: 22px;
	padding-right: 56px;
}

@media (min-width: 768px) {
	.ligneo-popup {
		right: 104px;
	}
}

/* Mobile : toute la largeur, marges de 12 px */
@media (max-width: 520px) {
	.ligneo-popup {
		right: 12px;
		bottom: 12px;
		left: 12px;
		width: auto;
		max-width: none;
		max-height: calc(100vh - 24px);
		--ligneo-popup-hauteur-visuel: 120px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ligneo-popup {
		transform: none;
		transition: opacity .2s;
	}

	.ligneo-popup .ligneo-popup__fermer,
	.ligneo-popup .ligneo-popup__bouton,
	.ligneo-popup .ligneo-popup__bouton svg {
		transition: none;
		transform: none !important;
	}
}

@media print {
	.ligneo-popup {
		display: none !important;
	}
}
