/* FB Popup d'accueil */
.fbpa[hidden] { display: none !important; }
.fbpa {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}
.fbpa-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	cursor: pointer;
}
.fbpa-dialog {
	position: relative;
	width: 100%;
	max-width: var(--fbpa-width, 560px);
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	background: var(--fbpa-bg, #fff);
	color: var(--fbpa-color, #2B2823);
	border-radius: 14px;
	padding: 36px 32px 28px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	outline: none;
}
.fbpa.is-open .fbpa-overlay { animation: fbpa-fade 0.25s ease-out; }
.fbpa.is-open .fbpa-dialog { animation: fbpa-pop 0.3s ease-out; }

/* Bouton rond de fermeture. Sélecteurs renforcés : les thèmes stylent souvent toutes les <button>.
   La croix est dessinée en CSS (deux traits) pour être parfaitement centrée quelle que soit la police.
   Couleurs inversées par rapport au popup (fond = couleur du texte, croix = couleur du fond) :
   le bouton ressort toujours, que le popup soit clair ou foncé. */
.fbpa .fbpa-dialog .fbpa-close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	display: block;
	width: 40px;
	height: 40px;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--fbpa-color, #2B2823);
	color: var(--fbpa-bg, #fff);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
	font-size: 0;
	line-height: 0;
	letter-spacing: 0;
	text-indent: 0;
	cursor: pointer;
	opacity: 1;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.fbpa .fbpa-dialog .fbpa-close::before,
.fbpa .fbpa-dialog .fbpa-close::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 18px;
	height: 2px;
	margin: -1px 0 0 -9px;
	border-radius: 1px;
	background: currentColor;
	transform: rotate(45deg);
}
.fbpa .fbpa-dialog .fbpa-close::after { transform: rotate(-45deg); }
.fbpa .fbpa-dialog .fbpa-close:hover,
.fbpa .fbpa-dialog .fbpa-close:focus-visible {
	background: var(--fbpa-color, #2B2823);
	color: var(--fbpa-bg, #fff);
	transform: scale(1.08);
	box-shadow: 0 3px 14px rgba(0, 0, 0, 0.35);
}
.fbpa .fbpa-dialog .fbpa-close:focus-visible { outline: 2px solid var(--fbpa-color, #2B2823); outline-offset: 2px; }

/* Contenu rédigé dans l'éditeur */
.fbpa-content > :first-child { margin-top: 0; }
.fbpa-content > :last-child { margin-bottom: 0; }
.fbpa-content h1, .fbpa-content h2, .fbpa-content h3, .fbpa-content h4,
.fbpa-content p, .fbpa-content li { color: inherit; }
.fbpa-content img { max-width: 100%; height: auto; border-radius: 8px; }
.fbpa-content a { color: inherit; text-decoration: underline; }
.fbpa-content .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.fbpa-content .alignleft { float: left; margin: 0 1em 0.5em 0; }
.fbpa-content .alignright { float: right; margin: 0 0 0.5em 1em; }
.fbpa-content::after { content: ''; display: table; clear: both; }
.fbpa-content .wp-caption { max-width: 100%; }

@keyframes fbpa-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fbpa-pop { from { opacity: 0; transform: translateY(12px) scale(0.97); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
	.fbpa.is-open .fbpa-overlay, .fbpa.is-open .fbpa-dialog { animation: none; }
}
@media (max-width: 480px) {
	.fbpa-dialog { padding: 32px 20px 22px; }
}
