/**
 * Bloc « hero » accueil — aligné maquette Figma (node 114:110).
 * Vidéo : conteneur strict 16/9 (aligné lecteur YouTube, limite les bandes noires).
 * Cartes : images plus panoramiques pour équilibrer la hauteur avec la vidéo.
 *
 * Décalage haut : le header Bridge est en position fixed (z-index élevé) ; avec la barre
 * jaune r100 + rangée logo/menu, la hauteur dépasse souvent le margin-top global du thème.
 * Surclasser avec :root { --r100-home-video-padding-top: 0px; } si doublon avec une Row WPBakery.
 */

.r100f-home-video-posts {
	width: 100%;
	box-sizing: border-box;
	position: relative;
	z-index: 1;
	/* Espace sous le header fixe (complète .content.content_top_margin { margin-top: 100px } si besoin) */
	padding-top: var(--r100-home-video-padding-top, clamp(64px, 2vh, 120px));
}

/* Bridge « move content up » : marge déjà appliquée sur .content — complément plus faible */
body.content_top_margin .r100f-home-video-posts {
	padding-top: var(--r100-home-video-padding-top, clamp(64px, 2vh, 120px));
}

.r100f-home-video-posts__inner {
	max-width: 1260px;
	margin-left: auto;
	margin-right: auto;
	padding: 24px;
	box-sizing: border-box;
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
	align-items: start;
}

@media (min-width: 992px) {
	.r100f-home-video-posts__inner {
		grid-template-columns: minmax(0, 1fr) minmax(280px, 441px);
		column-gap: 26px;
		row-gap: 0;
		align-items: stretch;
	}
}

/* Vidéo : 16/9 = ratio du player YouTube (évite bandes dues à un cadre trop haut) */
.r100f-home-video-posts__col--video {
	min-width: 0;
}

.r100f-home-video-posts__embed {
	position: relative;
	width: 100%;
	overflow: hidden;
	background: #111;
	border-radius: 12px;
	box-shadow: 0 4px 24px rgba(53, 53, 53, 0.08);
	aspect-ratio: 16 / 9;
}

.r100f-home-video-posts__embed iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.r100f-home-video-posts__hint {
	margin: 0;
	padding: 1rem;
	background: #f5f5f5;
	color: #353535;
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 0.9rem;
	border-radius: 12px;
	border-left: 4px solid #9acc00;
}

/* Colonne articles : même hauteur que la vidéo (grille stretch) */
.r100f-home-video-posts__col--posts {
	display: flex;
	flex-direction: column;
	min-height: 0;
	min-width: 0;
}

@media (min-width: 992px) {
	.r100f-home-video-posts__col--posts {
		height: 100%;
	}
}

/* Colonne droite : liste en flex pour répartir la hauteur entre les vignettes */
.r100f-home-video-posts__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
	gap: clamp(20px, 2.5vw, 28px);
}

@media (min-width: 992px) {
	.r100f-home-video-posts__list {
		height: 100%;
	}
}

.r100f-home-video-posts__card {
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 4px 24px rgba(53, 53, 53, 0.08);
	min-height: 0;
}

@media (min-width: 992px) {
	.r100f-home-video-posts__card {
		flex: 1 1 0;
		display: flex;
		flex-direction: column;
		min-height: 0;
	}
}

/* Lien pleine carte : image + overlay titre/catégorie */
.r100f-home-video-posts__card-link {
	display: block;
	text-decoration: none;
	color: inherit;
	border-radius: 12px;
	overflow: hidden;
	outline: none;
}

@media (min-width: 992px) {
	.r100f-home-video-posts__card-link {
		flex: 1 1 auto;
		display: flex;
		flex-direction: column;
		min-height: 0;
		height: 100%;
	}
}

.r100f-home-video-posts__card-link:focus-visible {
	box-shadow: 0 0 0 3px rgba(154, 204, 0, 0.65);
}

/**
 * Ratio panoramique (mobile / tablette) ; desktop : hauteur partagée avec la vidéo.
 */
.r100f-home-video-posts__card-media {
	display: block;
	position: relative;
	width: 100%;
	aspect-ratio: 2.2 / 1;
	overflow: hidden;
	background: #e8e4dc;
}

@media (min-width: 992px) {
	.r100f-home-video-posts__card-media {
		flex: 1 1 auto;
		min-height: 0;
		height: 100%;
		aspect-ratio: unset;
	}
}

.r100f-home-video-posts__card-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
}

.r100f-home-video-posts__card-img--placeholder {
	background: linear-gradient(135deg, #e8e4dc 0%, #d4cfc4 100%);
	min-height: 100%;
}

/* Titre + catégorie : overlay bas, visible au survol (souvent toujours visible au tactile) */
.r100f-home-video-posts__card-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 0;
	background: linear-gradient(to top, rgba(53, 53, 53, 0.88) 0%, rgba(53, 53, 53, 0.35) 45%, transparent 100%);
	opacity: 0;
	transition: opacity 0.28s ease;
	pointer-events: none;
}

.r100f-home-video-posts__card-overlay-inner {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px 16px;
}

.r100f-home-video-posts__card-link:hover .r100f-home-video-posts__card-overlay,
.r100f-home-video-posts__card-link:focus-visible .r100f-home-video-posts__card-overlay {
	opacity: 1;
}

@media (hover: none) {
	.r100f-home-video-posts__card-overlay {
		opacity: 1;
	}
}

.r100f-home-video-posts__title {
	margin: 0;
	flex: 1 1 auto;
	min-width: 0;
	font-size: 15px;
	font-weight: 500;
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	line-height: 1.3;
	letter-spacing: 0.02em;
	color: #fff;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.r100f-home-video-posts__tag {
	flex-shrink: 0;
	align-self: center;
	padding: 0.35rem 0.7rem;
	border-radius: 999px;
	background: #ffe8ad;
	color: #353535;
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 11px;
	font-weight: 500;
	line-height: 1.2;
	max-width: 42%;
	text-align: center;
}

.r100f-home-video-posts__empty {
	margin: 0;
	font-size: 0.9rem;
	color: #666;
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

@media (max-width: 991px) {
	.r100f-home-video-posts {
		padding-top: 24px;
	}

	.r100f-home-video-posts__card-overlay-inner {
		display: flex;
		align-items: flex-start;
		justify-content: flex-end;
		gap: 12px;
		padding: 14px 16px 16px;
		flex-direction: column-reverse;
	}

	.r100f-home-video-posts__card-media {
		min-height: 120px;
	}

	.r100f-home-video-posts__list {
		display: flex;
		flex-direction: row;
		gap: 12px;
	}

	.r100f-home-video-posts__inner {
		padding: 12px;
		gap: 12px;
	}
}
