/**
 * Nouyouin Hero Slider — styles front.
 * Présentation héros cohérente quelle que soit la taille des images.
 */

.nyhs {
	--nyhs-green: #184d47;
	--nyhs-orange: #c14426;
	--nyhs-yellow: #d4a019;
	--nyhs-brown: #3a2d1c;
	position: relative;
	width: 100%;
	border-radius: 18px;
	overflow: hidden;
	background: #0d0d0d;
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
	font-family: inherit;
}

.nyhs *,
.nyhs *::before,
.nyhs *::after {
	box-sizing: border-box;
}

.nyhs-viewport {
	overflow: hidden;
	width: 100%;
}

.nyhs-track {
	display: flex;
	width: 100%;
	transition: transform 0.65s cubic-bezier(0.22, 0.61, 0.36, 1);
	will-change: transform;
}

.nyhs-slide {
	position: relative;
	flex: 0 0 100%;
	width: 100%;
	aspect-ratio: 16 / 7;
	min-height: 360px;
	max-height: 600px;
	overflow: hidden;
}

/* ---- Média ---- */
.nyhs-media {
	position: absolute;
	inset: 0;
	display: block;
	text-decoration: none;
}

.nyhs-bg {
	position: absolute;
	inset: -8%;
	background-size: cover;
	background-position: center;
	filter: blur(28px) brightness(0.55);
	transform: scale(1.1);
	z-index: 1;
}

.nyhs-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
	z-index: 2;
}

/* Léger zoom sur la diapositive active (désactivé si mouvement réduit). */
.nyhs-slide.is-active .nyhs-img {
	animation: nyhs-zoom 7s ease-out forwards;
}

@keyframes nyhs-zoom {
	from { transform: scale(1); }
	to   { transform: scale(1.07); }
}

.nyhs-scrim {
	position: absolute;
	inset: 0;
	z-index: 3;
	background:
		linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.35) 38%, rgba(0, 0, 0, 0) 68%),
		linear-gradient(to right, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 55%);
}

.nyhs-play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 4;
	width: 78px;
	height: 78px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55);
	border: 2px solid rgba(255, 255, 255, 0.85);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	transition: transform 0.2s ease, background 0.2s ease;
}

.nyhs-slide:hover .nyhs-play {
	transform: translate(-50%, -50%) scale(1.08);
	background: var(--nyhs-orange);
}

.nyhs-play svg {
	width: 34px;
	height: 34px;
	margin-left: 4px;
}

/* ---- Contenu ---- */
.nyhs-body {
	position: absolute;
	left: 0;
	bottom: 0;
	z-index: 5;
	width: 100%;
	max-width: 760px;
	padding: clamp(20px, 4vw, 46px);
	/* Décalage à gauche pour ne jamais passer sous la flèche précédente. */
	padding-left: clamp(74px, 7vw, 104px);
	color: #fff;
}

.nyhs-badge {
	display: inline-block;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 6px 13px;
	border-radius: 999px;
	margin-bottom: 14px;
	color: #fff;
	background: var(--nyhs-green);
	line-height: 1;
}

.nyhs-badge-post { background: var(--nyhs-green); color: #fff; }
.nyhs-badge-youtube { background: #ff0000; color: #fff; }
.nyhs-badge-podcast { background: var(--nyhs-yellow); color: #1a1407; }
.nyhs-badge-tiktok { background: #111; color: #fff; }

.nyhs-title {
	margin: 0 0 12px;
	font-size: clamp(22px, 3.4vw, 40px);
	line-height: 1.12;
	font-weight: 800;
	letter-spacing: -0.01em;
	text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.nyhs-title a {
	color: #fff;
	text-decoration: none;
}

.nyhs-title a:hover {
	color: #f3ede0;
}

.nyhs-desc {
	margin: 0 0 20px;
	font-size: clamp(14px, 1.4vw, 17px);
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.92);
	max-width: 620px;
	text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.nyhs-cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 22px;
	border-radius: 10px;
	background: var(--nyhs-green);
	color: #fff;
	font-weight: 700;
	font-size: 15px;
	text-decoration: none;
	transition: background 0.18s ease, transform 0.18s ease;
}

.nyhs-cta span {
	transition: transform 0.18s ease;
}

.nyhs-cta:hover,
.nyhs-cta:focus-visible {
	background: var(--nyhs-orange);
	color: #fff;
}

.nyhs-cta:hover span {
	transform: translateX(3px);
}

/* ---- Flèches ---- */
.nyhs-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 6;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	border: none;
	cursor: pointer;
	background: rgba(0, 0, 0, 0.4);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	backdrop-filter: blur(2px);
	transition: background 0.18s ease;
}

.nyhs-arrow:hover,
.nyhs-arrow:focus-visible {
	background: var(--nyhs-orange);
	outline: none;
}

.nyhs-arrow svg {
	width: 24px;
	height: 24px;
}

.nyhs-prev { left: 16px; }
.nyhs-next { right: 16px; }

/* ---- Pagination ---- */
.nyhs-dots {
	position: absolute;
	z-index: 6;
	right: clamp(20px, 4vw, 46px);
	bottom: clamp(20px, 4vw, 46px);
	display: flex;
	gap: 8px;
}

.nyhs-dot {
	width: 9px;
	height: 9px;
	padding: 0;
	border: none;
	cursor: pointer;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.45);
	transition: background 0.2s ease, width 0.2s ease;
}

.nyhs-dot:hover { background: rgba(255, 255, 255, 0.8); }

.nyhs-dot.is-active {
	width: 26px;
	background: #fff;
}

/* ---- Responsive ---- */
@media (max-width: 782px) {
	.nyhs {
		border-radius: 14px;
	}
	.nyhs-slide {
		aspect-ratio: 4 / 5;
		min-height: 440px;
		max-height: none;
	}
	.nyhs-dots {
		left: 0;
		right: 0;
		justify-content: center;
		bottom: 14px;
	}
	.nyhs-body {
		padding-bottom: 42px;
		/* Sur mobile la flèche est plus petite : on dégage juste ce qu'il faut. */
		padding-left: 60px;
	}
	.nyhs-arrow {
		width: 38px;
		height: 38px;
	}
	.nyhs-prev { left: 10px; }
	.nyhs-next { right: 10px; }
}

@media (prefers-reduced-motion: reduce) {
	.nyhs-track { transition: none; }
	.nyhs-slide.is-active .nyhs-img { animation: none; }
	.nyhs-cta span { transition: none; }
}
