/* ==========================================================================
   FIL ROUGE - VIMEO FILMS
   ========================================================================== */

:root {
	--frv-red: #b2291a;
	--frv-blue: #3700ff;
}


/* ==========================================================================
   FILMS GRID (Réalisations and Communication pages)
   ========================================================================== */

.frv-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 32px;
	margin: 0 0 40px 0;
}


/* ==========================================================================
   FILM CARD (grid and slider)
   ========================================================================== */

.frv-card {
	display: block;
	text-decoration: none;
	color: inherit;
	border-radius: 8px;
	overflow: hidden;
	background: #111111;
	transition: transform 0.2s ease;
}
.frv-card:hover {
	transform: translateY(-4px);
}

/* Thumbnail: 16:9 ratio, cropped to fill */
.frv-card-thumb {
	aspect-ratio: 16 / 9;
	background: #222222;
	overflow: hidden;
}
.frv-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.frv-card-thumb-placeholder {
	width: 100%;
	height: 100%;
	background: #333333;
}

/* Card text: title, synopsis, duration */
.frv-card-body {
	padding: 14px 16px;
}
.frv-card-title {
	font-size: 1rem;
	font-weight: 700;
	margin: 0 0 6px;
	color: #ffffff;
}
.frv-card-synopsis {
	font-size: 0.95rem;
	color: #bbbbbb;
	margin: 0 0 8px;
	line-height: 1.4;
}
.frv-card-duree {
	font-size: 0.75rem;
	color: var(--frv-red);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}


/* ==========================================================================
   CATEGORY FILTERS (above the grid)
   ========================================================================== */

.frv-filtres {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin-bottom: 40px;
}
.frv-filtre-btn {
	padding: 14px 28px;
	border: 1px solid #444444;
	border-radius: 7%;
	color: #ffffff;
	font-weight: 700;
	font-size: 1rem;
	text-decoration: none;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.frv-filtre-btn:hover {
	border-color: var(--frv-red);
	color: #ffffff;
}
.frv-filtre-btn.is-active {
	background: var(--frv-red);
	border-color: var(--frv-red);
	color: #ffffff;
}


/* ==========================================================================
   PAGINATION (below the grid)
   Generated by paginate_links(): .page-numbers / .current / .dots / .prev / .next
   ========================================================================== */

.frv-pagination {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-top: 8px;
	justify-content: center;
}
.frv-pagination .page-numbers {
	min-width: 48px;
	height: 48px;
	padding: 0 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #444444;
	border-radius: 6px;
	color: #ffffff;
	font-weight: 700;
	font-size: 1.1rem;
	text-decoration: none;
}
.frv-pagination .page-numbers.current {
	background: var(--frv-red);
	border-color: var(--frv-red);
	color: #ffffff;
}
.frv-pagination .page-numbers.dots {
	border: none;
	background: none;
	color: #777777;
	min-width: auto;
	padding: 0 4px;
}


/* ==========================================================================
   SLIDER (home page, Grands projets, Communication)
   Native horizontal scroll with scroll-snap, arrows driven by frv-frontend.js
   ========================================================================== */

.frv-slider-wrapper {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 24px 0;
}
.frv-slider {
	display: flex;
	gap: 28px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	padding-bottom: 8px;
	flex: 1;
	scrollbar-width: none;
}
.frv-slider::-webkit-scrollbar {
	display: none;
}

/* Slider cards: 3 to 4 visible before scrolling is needed */
.frv-slider .frv-card {
	flex: 0 0 calc(27% - 21px);
	min-width: 240px;
	scroll-snap-align: start;
}
.frv-slider .frv-card-title {
	font-size: 1.15rem;
}
.frv-slider .frv-card-synopsis {
	font-size: 0.95rem;
}
.frv-slider .frv-card-duree {
	font-size: 0.85rem;
}

/* Previous / next arrows on each side of the slider */
.frv-slider-arrow {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid #444444;
	background: #111111;
	color: #ffffff;
	font-size: 1.3rem;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s, border-color 0.15s;
}
.frv-slider-arrow:hover {
	background: var(--frv-red);
	border-color: var(--frv-red);
}


/* ==========================================================================
   FILM PAGE (single template; layout is done in the "Film" block template)
   ========================================================================== */

/* Category and duration tags */
.frv-tag-categorie,
.frv-tag-duree {
	display: inline-block;
	padding: 8px 16px;
	border: 1px solid #444444;
	border-radius: 7%;
	color: #ffffff;
	font-weight: 700;
	font-size: 0.9rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}
.frv-tag-categorie {
	border-color: var(--frv-blue);
	color: var(--frv-blue);
}

/* Synopsis text */
.frv-synopsis-text {
	line-height: 1.7;
	color: #dddddd;
}

/* Cover image (jaquette) */
.frv-jaquette {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
}

/* Section titles ("Synopsis", "Teaser") and their hand-drawn underline */
.frv-section-title {
	display: inline-block;
}
.frv-title-underline {
	display: block;
	width: 200px;
	height: auto;
	margin-top: 4px;
}

/* Horizontal separator line */
.frv-separator-line {
	display: block;
	width: 100%;
	max-width: 1024px;
	height: auto;
	margin: 32px 0;
}

/* Vimeo player: centered, 16:9 ratio computed on the wrapper width */
.frv-video-wrapper {
	max-width: 1000px;
	margin: 20px auto;
}
.frv-video-embed {
	position: relative;
	padding-top: 56.25%;
	background: #000000;
}
.frv-video-embed iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}


/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* 1024px and below: grid on 2 columns, slider shows 2 cards */
@media (max-width: 1024px) {
	.frv-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 24px;
	}

	.frv-slider .frv-card {
		flex: 0 0 calc(50% - 14px);
	}
}

/* 640px and below: grid on 1 column, slider shows one card at a time */
@media (max-width: 640px) {

	/* Grid: single column */
	.frv-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	/* Filter buttons: tighter so more fit per row */
	.frv-filtre-btn {
		padding: 10px 18px;
		font-size: 0.875rem;
	}

	/* Pagination: wraps instead of overflowing, smaller buttons */
	.frv-pagination {
		flex-wrap: wrap;
		gap: 8px;
	}
	.frv-pagination .page-numbers {
		min-width: 40px;
		height: 40px;
		font-size: 1rem;
	}

	/* Slider: one card visible at a time, full width, swipe to navigate */
	.frv-slider {
		gap: 16px;
	}
	.frv-slider .frv-card {
		flex: 0 0 100%;
		min-width: 0;
	}

	/* Slider wrapper: used as a size reference to center the arrows on the thumbnail */
	.frv-slider-wrapper {
		container-type: inline-size;
	}

	/* Slider arrows: overlaid on the left and right edges, centered on the thumbnail
	   (thumbnail height = 9/16 of the card width, so its center is 9/32) */
	.frv-slider-arrow {
		position: absolute;
		top: calc(100cqw * 9 / 32);
		transform: translateY(-50%);
		width: 36px;
		height: 36px;
		font-size: 1.1rem;
		background: rgba(0, 0, 0, 0.6);
		border-color: #ffffff;
		z-index: 2;
	}
	.frv-slider-arrow:first-child {
		left: 8px;
	}
	.frv-slider-arrow:last-child {
		right: 8px;
	}

	/* Film page tags: smaller */
	.frv-tag-categorie,
	.frv-tag-duree {
		padding: 6px 12px;
		font-size: 0.8125rem;
	}
}