/* ==========================================================================
   Réalisations [vt_realisations]
   ========================================================================== */

.vt-realisations {
	/* Réglages */
	--vt-real-cols: 3;
	--vt-real-gap-x: 40px;
	--vt-real-gap-y: 40px;
	--vt-real-ratio: 16 / 10;
	--vt-real-radius: 12px;
	--vt-real-mark-width: 90px;
	--vt-real-mark-right: 10px;
	--vt-real-title-size: 17px;
	--vt-real-title-color: inherit;
	--vt-real-mark-1: #bbd6e9;
	--vt-real-mark-2: #004c99;
	--vt-real-placeholder: #eef3f8;   /* fond si pas d'image */
	--vt-real-interval: 3s;           /* surchargé par le réglage de l'élément */

	display: grid;
	grid-template-columns: repeat(var(--vt-real-cols), minmax(0, 1fr));
	gap: var(--vt-real-gap-y) var(--vt-real-gap-x);
	margin-bottom: 30px;
}

@media (max-width: 999px) {
	.vt-realisations {
		--vt-real-cols: 2;
	}
}

@media (max-width: 690px) {
	.vt-realisations {
		--vt-real-cols: 1;
	}
}

.vt-realisation {
	margin: 0;
}

/* Visuel */
.vt-realisation__media {
	position: relative;
	aspect-ratio: var(--vt-real-ratio);
	border-radius: var(--vt-real-radius);
	overflow: hidden;
	background: var(--vt-real-placeholder);
}

.vt-realisation__media img.vt-realisation__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
}

/* Marque décorative */
.vt-realisation__mark {
	position: absolute;
	top: 0;
	right: var(--vt-real-mark-right);
	z-index: 2;
	width: var(--vt-real-mark-width);
	height: auto;
	overflow: hidden;
	pointer-events: none;
}

.vt-realisation__mark-1 { fill: var(--vt-real-mark-1); }
.vt-realisation__mark-2 { fill: var(--vt-real-mark-2); }

/* Alternance avant / après (CSS pur, cycle = 2 × durée d'affichage) */
.vt-realisation--has-after .vt-realisation__img--after {
	z-index: 1;
	opacity: 0;
	animation: vt-real-swap calc(var(--vt-real-interval) * 2) ease-in-out infinite;
}

@keyframes vt-real-swap {
	0%, 40%   { opacity: 0; }
	50%, 90%  { opacity: 1; }
	100%      { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.vt-realisation--has-after .vt-realisation__img--after {
		animation: none;
	}
}

/* Titre */
.vt-realisation__title {
	margin: 20px 0 0;
	padding: 0 10px;
	text-align: center;
	font-size: var(--vt-real-title-size);
	line-height: 1.5;
	color: var(--vt-real-title-color);
}
