/*
 * Facebook Posts Kit — styles.
 *
 * Toutes les valeurs par défaut sont des replis dans var() : Elementor écrit
 * les réglages du widget sur son conteneur extérieur, d'où ils sont hérités.
 * Les redéclarer sur .fbp-posts masquerait la valeur héritée.
 *
 * Les sélecteurs d'éléments qu'un thème habille volontiers — liens, boutons,
 * images, SVG — sont montés en spécificité et remettent à zéro ce qui
 * pourrait leur être imposé.
 */

.fbp-posts {
	display: grid;
	grid-template-columns: repeat(var(--fbp-cols, 3), minmax(0, 1fr));
	align-items: var(--fbp-card-align, center);
	gap: var(--fbp-gap, 22px);
}

/* Première publication mise en avant : une colonne plus large, et une carte
   qui dépasse un peu en hauteur, comme dans la maquette. */
.fbp-posts--featured {
	grid-template-columns: 1.35fr repeat(calc(var(--fbp-cols, 3) - 1), minmax(0, 1fr));
}

.fbp-posts--featured .fbp-card--first {
	--fbp-media-height: calc(var(--fbp-media-height-first, 340px));
}

@media (max-width: 1024px) {
	.fbp-posts,
	.fbp-posts--featured {
		grid-template-columns: repeat(var(--fbp-cols, 2), minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.fbp-posts,
	.fbp-posts--featured {
		grid-template-columns: minmax(0, 1fr);
	}
}

.fbp-card {
	display: flex;
	flex-direction: column;
	/* Par défaut chaque carte s'arrête à son contenu et l'ensemble est centré,
	   comme dans la maquette. Étirées, les cartes courtes creusaient un grand
	   blanc entre le texte et les compteurs. */
	align-self: var(--fbp-card-align, center);
	padding: var(--fbp-card-padding, 16px);
	border-radius: var(--fbp-card-radius, 20px);
	background: var(--fbp-card-bg, #ffffff);
}

/* ---------------------------------------------------------------------
 * En-tête de carte
 * ------------------------------------------------------------------ */

.fbp-card__head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 12px;
}

.fbp-posts .fbp-card__avatar {
	display: block;
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	max-width: none;
	border-radius: 50%;
	object-fit: cover;
	background: rgba(0, 0, 0, 0.06);
}

.fbp-card__identity {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
	gap: 2px;
}

.fbp-card__page {
	color: var(--fbp-name-color, #171717);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.25;
	overflow-wrap: anywhere;
}

.fbp-card__meta {
	display: flex;
	align-items: center;
	gap: 5px;
	color: var(--fbp-meta-color, #6d645f);
	font-size: 12.5px;
	line-height: 1.3;
}

.fbp-posts .fbp-card__globe {
	display: block;
	flex: 0 0 auto;
	width: 11px;
	height: 11px;
	max-width: none;
	opacity: 0.75;
}

.fbp-card__dots {
	flex: 0 0 auto;
	align-self: flex-start;
	color: var(--fbp-meta-color, #6d645f);
	font-size: 18px;
	line-height: 1;
	letter-spacing: 1px;
}

/* ---------------------------------------------------------------------
 * Visuel
 * ------------------------------------------------------------------ */

.fbp-posts .fbp-card__media {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: calc(var(--fbp-card-radius, 20px) - 8px);
	background: rgba(0, 0, 0, 0.05);
	text-decoration: none;
}

.fbp-posts .fbp-card__media img {
	display: block;
	width: 100%;
	max-width: none;
	height: var(--fbp-media-height, 300px);
	object-fit: cover;
}

.fbp-card__play {
	position: absolute;
	top: 50%;
	left: 50%;
	display: grid;
	place-items: center;
	width: 62px;
	height: 62px;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	color: #e02424;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
	transition: transform 0.2s ease;
}

.fbp-posts .fbp-card__play svg {
	display: block;
	width: 26px;
	height: 26px;
	max-width: none;
	margin-left: 3px;
}

.fbp-posts .fbp-card__media:hover .fbp-card__play {
	transform: translate(-50%, -50%) scale(1.06);
}

.fbp-card__duration {
	position: absolute;
	bottom: 10px;
	left: 12px;
	padding: 3px 8px;
	border-radius: 6px;
	background: rgba(0, 0, 0, 0.62);
	color: #ffffff;
	font-size: 12px;
	font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------------
 * Corps
 * ------------------------------------------------------------------ */

.fbp-card__body {
	flex: 1 1 auto;
	padding: 14px 2px 0;
}

.fbp-card__title {
	margin: 0 0 4px;
	color: var(--fbp-title-color, #171717);
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
}

.fbp-card__text {
	margin: 0;
	color: var(--fbp-text-color, #6d645f);
	font-size: 14px;
	line-height: 1.5;
}

/* ---------------------------------------------------------------------
 * Compteurs
 * ------------------------------------------------------------------ */

.fbp-card__stats {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: 14px;
	padding: 12px 2px;
	border-top: 1px solid var(--fbp-divider, rgba(0, 0, 0, 0.08));
	border-bottom: 1px solid var(--fbp-divider, rgba(0, 0, 0, 0.08));
	color: var(--fbp-stats-color, #4a4340);
	font-size: 13px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.fbp-stat {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	white-space: nowrap;
}

.fbp-posts .fbp-stat__icon {
	display: block;
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	max-width: none;
	opacity: 0.8;
}

.fbp-reactions {
	display: inline-flex;
	align-items: center;
}

.fbp-reaction {
	display: grid;
	place-items: center;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 1.5px solid var(--fbp-card-bg, #ffffff);
	color: #ffffff;
}

.fbp-reaction + .fbp-reaction {
	margin-left: -6px;
}

.fbp-posts .fbp-reaction svg {
	display: block;
	width: 11px;
	height: 11px;
	max-width: none;
}

.fbp-reaction--like { background: #1877f2; }
.fbp-reaction--love { background: #e8365d; }
.fbp-reaction--haha { background: #f7b125; }

/* ---------------------------------------------------------------------
 * Bouton
 * ------------------------------------------------------------------ */

.fbp-posts .fbp-card__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	margin-top: 14px;
	padding: 13px 18px;
	border: 0;
	border-radius: var(--fbp-cta-radius, 999px);
	background: var(--fbp-cta-bg, #b40000);
	color: var(--fbp-cta-color, #ffffff);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	transition: background-color 0.2s ease;
}

.fbp-posts .fbp-card__cta:hover,
.fbp-posts .fbp-card__cta:focus-visible {
	background: var(--fbp-cta-hover-bg, #870000);
	color: var(--fbp-cta-color, #ffffff);
	text-decoration: none;
}

.fbp-posts .fbp-card__cta:focus-visible {
	outline: 2px solid var(--fbp-cta-bg, #b40000);
	outline-offset: 3px;
}

.fbp-posts .fbp-card__cta-icon {
	display: block;
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	max-width: none;
}

.fbp-card__cta-arrow {
	font-size: 16px;
	line-height: 1;
}

/* ---------------------------------------------------------------------
 * Note manuscrite décorative, à poser en classe CSS sur un widget Titre
 * ------------------------------------------------------------------ */

.fbp-note .elementor-heading-title {
	font-family: "Caveat", "Segoe Script", cursive;
	font-weight: 600;
	line-height: 1.25;
}

@media (prefers-reduced-motion: reduce) {
	.fbp-card__play,
	.fbp-posts .fbp-card__cta {
		transition: none;
	}

	.fbp-posts .fbp-card__media:hover .fbp-card__play {
		transform: translate(-50%, -50%);
	}
}
