/*
 * GrowLED Hero Slider — Front CSS
 * Core Web Vitals : aspect-ratio pour CLS=0, content-visibility pour LCP,
 * prefers-reduced-motion pour l'accessibilité motrice.
 */

.growled-hero {
	--gh-cyan: #00adef;
	--gh-yellow: #fbe500;
	--gh-dark: #0a1a2f;
	--gh-dark-soft: #132642;
	--gh-white: #ffffff;
	--gh-gray: #6b7a90;
	--gh-text: #0a1a2f;
	--gh-radius: 16px;
	--gh-max: 1440px;
	--gh-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.35);

	position: relative;
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
	overflow: hidden;
	background: var(--gh-dark);
	font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	isolation: isolate;
}

/* Format wide hero :
 *   Desktop : 1600 × 330 (ratio ~4.85:1)
 *   Mobile  : 9:16 (story portrait, max 80vh pour laisser voir le menu)
 * Image fill via object-fit: cover. CLS = 0 (aspect-ratio fixé).
 *
 * !important sur les contraintes critiques pour blinder contre les overrides
 * de thème PrestaShop qui font souvent `img { height: auto !important }`.
 */
.growled-hero {
	width: 100%;
}
.growled-hero__track {
	position: relative;
	width: 100%;
	overflow: hidden;
}

/* Slides empilées, fondu enchaîné.
 * Active = relative (en flux, dicte la hauteur du track).
 * Inactives = absolute (empilées par-dessus). */
.growled-hero__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 700ms ease-in-out, visibility 0s linear 700ms;
	will-change: opacity;
}

.growled-hero__slide.is-active {
	position: relative;
	opacity: 1;
	visibility: visible;
	transition: opacity 700ms ease-in-out, visibility 0s linear 0s;
	z-index: 2;
}

/* Media (picture) : pleine largeur écran, ratio natif préservé. */
.growled-hero__media {
	position: relative;
	z-index: 1;
	display: block;
	width: 100%;
	margin: 0 auto;
	height: auto;
}

.growled-hero__img {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
	object-fit: cover;
}

/* Overlay et content empilés au-dessus de tout */
.growled-hero__overlay { z-index: 2; }

/* Image-link : couvre toute l'image (cover layout), cliquable vers la fiche produit */
.growled-hero__image-link {
	position: absolute;
	inset: 0;
	z-index: 4;
	display: block;
	cursor: pointer;
	background: transparent;
	text-decoration: none;
}
/* Content + CTAs au-dessus du lien-image (pour que CTA spécifique soit cliquable) */
.growled-hero__content { z-index: 5; position: absolute; inset: 0; }
.growled-hero__product-card { z-index: 6; }

/* Variant split : le lien ne couvre QUE la zone image (pas le texte) */
.growled-hero__product-wrap { position: relative; }
.growled-hero__image-link--product {
	z-index: 1;
}

.growled-hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		100deg,
		rgba(10, 26, 47, 0.78) 0%,
		rgba(10, 26, 47, 0.55) 45%,
		rgba(10, 26, 47, 0.15) 100%
	);
	z-index: 1;
}

/* Content overlay sur l'image */
.growled-hero__content {
	position: relative;
	z-index: 2;
	height: 100%;
	display: flex;
	align-items: center;
	padding: 0 8%;
}

.growled-hero__inner {
	max-width: 640px;
	color: var(--gh-white);
}

/* Badge */
.growled-hero__badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 14px;
	background: rgba(255, 255, 255, 0.12);
	backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.3px;
	text-transform: uppercase;
	margin-bottom: 20px;
	color: #fff;
}

.growled-hero__badge-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--gh-cyan);
	box-shadow: 0 0 0 4px rgba(0, 173, 239, 0.25);
	animation: gh-pulse 2s ease-in-out infinite;
}

.growled-hero__badge--cyan .growled-hero__badge-dot { background: var(--gh-cyan); box-shadow: 0 0 0 4px rgba(0, 173, 239, 0.25); }
.growled-hero__badge--yellow .growled-hero__badge-dot { background: var(--gh-yellow); box-shadow: 0 0 0 4px rgba(251, 229, 0, 0.25); }
.growled-hero__badge--red .growled-hero__badge-dot { background: #ef4444; box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.25); }
.growled-hero__badge--green .growled-hero__badge-dot { background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.25); }

@keyframes gh-pulse {
	0%, 100% { transform: scale(1); opacity: 1; }
	50% { transform: scale(1.3); opacity: 0.7; }
}

/* Eyebrow */
.growled-hero__eyebrow {
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 4px;
	text-transform: uppercase;
	color: var(--gh-cyan);
	margin: 0 0 14px 0;
}

/* Title (Russo One si installé sur le theme, sinon fallback) */
.growled-hero__title {
	font-family: 'Russo One', 'Poppins', sans-serif;
	font-size: clamp(30px, 5.5vw, 64px);
	line-height: 1.05;
	font-weight: 900;
	margin: 0 0 18px 0;
	letter-spacing: -0.5px;
	color: #fff;
	text-wrap: balance;
}

/* Subtitle */
.growled-hero__subtitle {
	font-size: clamp(15px, 1.4vw, 18px);
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.88);
	margin-bottom: 28px;
	max-width: 520px;
}

.growled-hero__subtitle p { margin: 0 0 8px 0; }
.growled-hero__subtitle strong { color: var(--gh-yellow); font-weight: 700; }

/* Stats */
.growled-hero__stats {
	list-style: none;
	padding: 0;
	margin: 0 0 30px 0;
	display: flex;
	gap: 28px;
	flex-wrap: wrap;
}

.growled-hero__stat { display: flex; flex-direction: column; gap: 2px; }

.growled-hero__stat-value {
	font-family: 'Russo One', 'Poppins', sans-serif;
	font-size: clamp(22px, 2.4vw, 30px);
	color: var(--gh-cyan);
	font-weight: 900;
	line-height: 1;
}

.growled-hero__stat-label {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: rgba(255, 255, 255, 0.7);
}

/* CTAs */
.growled-hero__ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.growled-hero__cta {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 15px 30px;
	border-radius: 999px;
	font-weight: 700;
	font-size: 15px;
	text-decoration: none;
	transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease;
	border: 2px solid transparent;
	cursor: pointer;
	white-space: nowrap;
}

.growled-hero__cta:hover,
.growled-hero__cta:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 10px 25px -8px rgba(0, 0, 0, 0.4);
	text-decoration: none;
}

.growled-hero__cta:focus-visible {
	outline: 3px solid var(--gh-cyan);
	outline-offset: 3px;
}

.growled-hero__cta-arrow { transition: transform 180ms ease; }
.growled-hero__cta:hover .growled-hero__cta-arrow { transform: translateX(4px); }

/* Variantes CTA */
.growled-hero__cta--primary { background: var(--gh-cyan); color: #fff; }
.growled-hero__cta--primary:hover { background: #0096d1; color: #fff; }

.growled-hero__cta--yellow { background: var(--gh-yellow); color: var(--gh-dark); }
.growled-hero__cta--yellow:hover { background: #e4cf00; color: var(--gh-dark); }

.growled-hero__cta--dark { background: var(--gh-dark); color: #fff; }
.growled-hero__cta--dark:hover { background: #000; color: #fff; }

.growled-hero__cta--secondary {
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	border-color: rgba(255, 255, 255, 0.3);
	backdrop-filter: blur(8px);
}
.growled-hero__cta--secondary:hover { background: rgba(255, 255, 255, 0.2); color: #fff; }

.growled-hero__cta--ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.growled-hero__cta--ghost:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

.growled-hero__cta--cyan { background: var(--gh-cyan); color: #fff; }
.growled-hero__cta--cyan:hover { background: #0096d1; }

/* Thèmes */
.growled-hero__slide[data-theme="light"] .growled-hero__overlay {
	background: linear-gradient(100deg, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0.6) 45%, rgba(255, 255, 255, 0.15) 100%);
}
.growled-hero__slide[data-theme="light"] .growled-hero__title,
.growled-hero__slide[data-theme="light"] .growled-hero__subtitle { color: var(--gh-dark); }
.growled-hero__slide[data-theme="light"] .growled-hero__subtitle { color: #35465c; }
.growled-hero__slide[data-theme="light"] .growled-hero__eyebrow { color: #0096d1; }
.growled-hero__slide[data-theme="light"] .growled-hero__badge {
	background: rgba(10, 26, 47, 0.08);
	color: var(--gh-dark);
	border-color: rgba(10, 26, 47, 0.12);
}
.growled-hero__slide[data-theme="light"] .growled-hero__stat-label { color: #6b7a90; }

.growled-hero__slide[data-theme="cyan"] .growled-hero__overlay {
	background: linear-gradient(100deg, rgba(0, 173, 239, 0.82) 0%, rgba(0, 173, 239, 0.5) 60%, rgba(0, 173, 239, 0.1) 100%);
}
.growled-hero__slide[data-theme="cyan"] .growled-hero__eyebrow { color: var(--gh-yellow); }
.growled-hero__slide[data-theme="cyan"] .growled-hero__stat-value { color: var(--gh-yellow); }

.growled-hero__slide[data-theme="yellow"] .growled-hero__overlay {
	background: linear-gradient(100deg, rgba(251, 229, 0, 0.85) 0%, rgba(251, 229, 0, 0.5) 60%, rgba(251, 229, 0, 0.1) 100%);
}
.growled-hero__slide[data-theme="yellow"] .growled-hero__title,
.growled-hero__slide[data-theme="yellow"] .growled-hero__subtitle { color: var(--gh-dark); }
.growled-hero__slide[data-theme="yellow"] .growled-hero__subtitle { color: #35465c; }
.growled-hero__slide[data-theme="yellow"] .growled-hero__eyebrow { color: var(--gh-dark); }
.growled-hero__slide[data-theme="yellow"] .growled-hero__stat-value { color: var(--gh-dark); }
.growled-hero__slide[data-theme="yellow"] .growled-hero__stat-label { color: #35465c; }

.growled-hero__slide[data-theme="dark-cyan"] .growled-hero__overlay {
	background: linear-gradient(100deg, rgba(10, 26, 47, 0.9) 0%, rgba(0, 173, 239, 0.6) 100%);
}

/* Flèches nav */
.growled-hero__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
	backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.25);
	color: #fff;
	cursor: pointer;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 180ms ease, transform 180ms ease;
}

.growled-hero__nav:hover,
.growled-hero__nav:focus-visible {
	background: var(--gh-cyan);
	border-color: var(--gh-cyan);
	transform: translateY(-50%) scale(1.08);
}
.growled-hero__nav:focus-visible { outline: 3px solid var(--gh-yellow); outline-offset: 2px; }

.growled-hero__nav--prev { left: 24px; }
.growled-hero__nav--next { right: 24px; }

@media (max-width: 767px) {
	.growled-hero__nav { width: 40px; height: 40px; }
	.growled-hero__nav--prev { left: 12px; }
	.growled-hero__nav--next { right: 12px; }
}

/* Dots */
.growled-hero__dots {
	position: absolute;
	bottom: 28px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 10px;
	z-index: 10;
	padding: 8px 14px;
	background: rgba(10, 26, 47, 0.3);
	backdrop-filter: blur(10px);
	border-radius: 999px;
}

.growled-hero__dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.4);
	border: none;
	cursor: pointer;
	padding: 0;
	transition: background 180ms ease, width 220ms ease;
}

.growled-hero__dot:hover { background: rgba(255, 255, 255, 0.7); }
.growled-hero__dot.is-active {
	background: var(--gh-cyan);
	width: 30px;
	border-radius: 6px;
}
.growled-hero__dot:focus-visible { outline: 2px solid var(--gh-yellow); outline-offset: 2px; }

/* Progress bar (autoplay) */
.growled-hero__progress {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: rgba(255, 255, 255, 0.1);
	z-index: 10;
}
.growled-hero__progress-bar {
	display: block;
	height: 100%;
	width: 0%;
	background: var(--gh-cyan);
	transition: width 100ms linear;
}

/* Mobile content */
@media (max-width: 767px) {
	.growled-hero__content { padding: 0 20px; align-items: flex-end; padding-bottom: 70px; }
	.growled-hero__inner { max-width: 100%; }
	.growled-hero__title { font-size: clamp(26px, 7vw, 40px); }
	.growled-hero__subtitle { font-size: 15px; margin-bottom: 20px; }
	.growled-hero__stats { gap: 16px; margin-bottom: 20px; }
	.growled-hero__ctas { flex-direction: column; align-items: stretch; }
	.growled-hero__cta { justify-content: center; padding: 14px 24px; font-size: 14px; }
	.growled-hero__overlay {
		background: linear-gradient(
			180deg,
			rgba(10, 26, 47, 0.3) 0%,
			rgba(10, 26, 47, 0.65) 55%,
			rgba(10, 26, 47, 0.92) 100%
		);
	}
	.growled-hero__dots { bottom: 16px; }
}

/* Respecte la préférence utilisateur */
@media (prefers-reduced-motion: reduce) {
	.growled-hero__slide { transition: none; }
	.growled-hero__badge-dot { animation: none; }
	.growled-hero__cta,
	.growled-hero__nav,
	.growled-hero__dot { transition: none !important; }
	.growled-hero__progress-bar { display: none; }
}

/* Skip-paint off-screen */
.growled-hero__slide:not(.is-active) {
	content-visibility: auto;
	contain-intrinsic-size: 900px;
}

/* ==========================================
 * Carte produit flottante (variante 1 — glassmorphism)
 * ========================================== */
.growled-hero__product-wrap {
	position: relative;
	flex: 1 1 45%;
	max-width: 45%;
	display: flex;
	align-items: center;
	justify-content: center;
}
.growled-hero__product-wrap .growled-hero__media--product {
	flex: 1;
	width: 100%;
}
.growled-hero__product-card {
	position: absolute;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	width: calc(100% - 30px);
	max-width: 360px;
	background: rgba(10, 14, 26, 0.7);
	backdrop-filter: blur(20px) saturate(1.2);
	-webkit-backdrop-filter: blur(20px) saturate(1.2);
	border: 1px solid rgba(168, 85, 247, 0.3);
	border-radius: 16px;
	padding: 14px 18px;
	z-index: 5;
	box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.5);
	text-decoration: none;
	color: inherit;
	display: block;
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.growled-hero__product-card:hover {
	transform: translateX(-50%) translateY(-2px);
	border-color: rgba(168, 85, 247, 0.5);
	box-shadow: 0 24px 70px -10px rgba(168, 85, 247, 0.3);
}
.growled-hero__pc-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 6px;
}
.growled-hero__pc-name {
	font-size: 13px;
	font-weight: 700;
	color: #ffffff;
	letter-spacing: -0.01em;
	line-height: 1.2;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
.growled-hero__pc-badge {
	background: linear-gradient(135deg, #ff3b3b, #ff6b3b);
	color: #fff;
	font-size: 11px;
	font-weight: 800;
	padding: 3px 10px;
	border-radius: 6px;
	letter-spacing: 0.5px;
	white-space: nowrap;
	box-shadow: 0 4px 12px rgba(255, 59, 59, 0.3);
	flex-shrink: 0;
}
.growled-hero__pc-prices {
	display: flex;
	align-items: baseline;
	gap: 10px;
	flex-wrap: wrap;
}
.growled-hero__pc-price-old {
	color: #8fa0b8;
	font-size: 13px;
	text-decoration: line-through;
	text-decoration-color: rgba(255, 150, 150, 0.7);
	text-decoration-thickness: 2px;
}
.growled-hero__pc-price {
	color: #00adef;
	font-size: 22px;
	font-weight: 900;
	letter-spacing: -0.02em;
	line-height: 1;
}
.growled-hero__pc-save {
	color: #4ade80;
	font-size: 12px;
	font-weight: 600;
	margin-top: 6px;
}

/* Mobile : carte pleine largeur sous l'image */
@media (max-width: 767px) {
	.growled-hero__product-wrap {
		flex: 1 1 auto;
		max-width: 100%;
		width: 100%;
	}
	.growled-hero__product-card {
		max-width: 100%;
		width: 100%;
		left: 0;
		transform: none;
		position: relative;
		bottom: auto;
		margin-top: 12px;
	}
	.growled-hero__product-card:hover {
		transform: none;
	}
	.growled-hero__pc-price {
		font-size: 20px;
	}
}

/* ==========================================
 * Layout SPLIT (texte d'un côté, image produit de l'autre)
 * Ratio : content 55% / image 45%. Responsive : stack vertical sous 768px.
 * ========================================== */
.growled-hero__slide--split-right,
.growled-hero__slide--split-left {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: clamp(20px, 4vw, 60px);
	padding: clamp(30px, 6vw, 80px) clamp(20px, 5vw, 80px);
	position: absolute;
	inset: 0;
}
.growled-hero__slide--split-left {
	flex-direction: row-reverse;
}
.growled-hero__slide--split-right .growled-hero__content,
.growled-hero__slide--split-left .growled-hero__content {
	position: static;
	flex: 1 1 55%;
	max-width: 55%;
	padding: 0;
	background: none;
}
.growled-hero__slide--split-right .growled-hero__inner,
.growled-hero__slide--split-left .growled-hero__inner {
	max-width: 100%;
	padding: 0;
}
.growled-hero__media--product {
	flex: 1 1 45%;
	max-width: 45%;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
}
.growled-hero__img--product {
	width: 100%;
	height: auto;
	max-height: 85%;
	object-fit: contain;
	filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.4));
}

/* Mobile : stack vertical */
@media (max-width: 767px) {
	.growled-hero__slide--split-right,
	.growled-hero__slide--split-left {
		flex-direction: column;
		gap: 20px;
		padding: 30px 20px;
	}
	.growled-hero__slide--split-right .growled-hero__content,
	.growled-hero__slide--split-left .growled-hero__content,
	.growled-hero__media--product {
		flex: 1 1 auto;
		max-width: 100%;
		width: 100%;
	}
	.growled-hero__img--product {
		max-height: 250px;
	}
}

/* ==========================================
 * Variant : fond transparent
 * La slide laisse passer le fond du site (pas d'image, pas d'overlay, pas de shadow).
 * On rend la section racine transparente et on remet un fond dark uniquement
 * sur les slides NON-transparentes (celles avec image).
 * ========================================== */
.growled-hero {
	background: transparent;
}
.growled-hero:not(:has(.growled-hero__slide--transparent.is-active)) {
	box-shadow: var(--gh-shadow);
}
.growled-hero__slide:not(.growled-hero__slide--transparent) {
	background: var(--gh-dark);
}
.growled-hero__slide--transparent {
	background: transparent;
}
.growled-hero__slide--transparent .growled-hero__content {
	color: inherit;
}
.growled-hero__slide--transparent .growled-hero__title,
.growled-hero__slide--transparent .growled-hero__subtitle,
.growled-hero__slide--transparent .growled-hero__eyebrow,
.growled-hero__slide--transparent .growled-hero__stat-value,
.growled-hero__slide--transparent .growled-hero__stat-label {
	color: inherit;
	text-shadow: none;
}
