/**
 * FLP Hero Slider 1.1.0 - styles front.
 * Marque : vert #597c31, rouge #c61e1d.
 * Navigation isolee (flp-hero__*), police heritee du theme.
 */

/* ============ SOCLE (conserve) ============ */
.flp-hero {
	position: relative;
	overflow: hidden;
	width: 100%;
	--flp-hero-h: 82vh;
	--flp-hero-h: 82svh; /* svh = ne varie pas quand la barre d'adresse mobile se masque/réapparaît (stoppe le "refresh" au scroll sur mobile). Fallback vh au-dessus. */
	--flp-green: #597c31;
	--flp-green-d: #46621f;
	--flp-red: #c61e1d;
	--flp-font: 'Titillium Web', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
	font-family: var(--flp-font);
}
.flp-hero * { box-sizing: border-box; }

.flp-hero__swiper {
	position: relative;
	width: 100%;
	height: var(--flp-hero-h);
	overflow: hidden;
	/* Isole le slider : ses changements (transition de slide, Ken Burns) ne
	   déclenchent plus de repaint du reste de la page → stoppe le "refresh"
	   global perçu sur mobile au changement de slide. */
	contain: layout paint;
	transform: translateZ(0);
}
.flp-hero__swiper > .swiper-wrapper { height: 100%; }

.flp-hero__slide {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
	height: var(--flp-hero-h);
	overflow: hidden;
	transform: translateZ(0); /* chaque slide sur sa propre couche de composition */
	backface-visibility: hidden;
}
.flp-hero__swiper:not(.swiper-initialized) .flp-hero__slide { display: none; }
.flp-hero__swiper:not(.swiper-initialized) .flp-hero__slide:first-child { display: flex; }

.flp-hero__bg {
	position: absolute; inset: 0;
	background-size: cover; background-position: center; background-repeat: no-repeat;
	z-index: 1;
	transform: translateZ(0); backface-visibility: hidden;
}
/* will-change activé UNIQUEMENT sur la slide animée (évite un repaint global permanent au scroll) */
.flp-hero--kenburns .swiper-slide-active .flp-hero__bg { will-change: transform; }
.flp-hero--kenburns .swiper-slide-active .flp-hero__bg,
.flp-hero--kenburns .flp-hero__swiper:not(.swiper-initialized) .flp-hero__slide:first-child .flp-hero__bg {
	animation: flp-kenburns 8s ease-out forwards;
}
@keyframes flp-kenburns { from { transform: scale(1); } to { transform: scale(1.08); } }

.flp-hero__overlay { position: absolute; inset: 0; z-index: 2; background: rgba(0,0,0,0.5); pointer-events: none; }

.flp-hero__inner {
	position: relative; z-index: 3;
	width: 100%; max-width: 1200px; margin: 0 auto;
	pointer-events: none; /* laisse passer le swipe tactile vers Swiper */
}
/* Mais les elements interactifs restent cliquables/touchables */
.flp-hero__inner a,
.flp-hero__inner button,
.flp-hero__btn,
.flp-hero__buttons { pointer-events: auto; }
.flp-hero__content {
	display: flex; flex-direction: column; align-items: flex-start;
	width: 100%;
	--flp-content-mw: 680px;
}
/* Le max-width bride le TEXTE, pas le bloc de boutons (qui peut etre plus large). */
.flp-hero__content > .flp-hero__overtitle,
.flp-hero__content > .flp-hero__title,
.flp-hero__content > .flp-hero__desc {
	max-width: var(--flp-content-mw);
}

.flp-hero .flp-hero__overtitle {
	display: inline-block; margin: 0 0 14px 0;
	font-family: var(--flp-font) !important;
	text-transform: uppercase; letter-spacing: 2px; font-weight: 700;
	font-size: 15px; color: var(--flp-red);
}
.flp-hero .flp-hero__title {
	margin: 0 0 22px 0;
	font-family: var(--flp-font) !important;
	text-transform: none; /* neutralise le "capitalize" du theme Garda, mais surchargeable via Elementor */
	line-height: 1.1;
	font-size: clamp(32px, 5vw, 60px); font-weight: 800; color: #fff;
}
.flp-hero .flp-hero__desc {
	margin: 0 0 34px 0;
	font-family: var(--flp-font) !important;
	text-transform: none;
	line-height: 1.6;
	font-size: 17px; color: rgba(255,255,255,0.92);
}

/* ============ GROUPE DE BOUTONS + DISPOSITIONS ============ */
.flp-hero__buttons {
	display: flex; flex-wrap: wrap; align-items: stretch; gap: 14px;
	max-width: 100%;
}
/* Disposition : selon le texte -> le bloc s'ajuste a son contenu et se centre avec le titre */
.flp-btnlayout-auto .flp-hero__buttons { width: auto; }
.flp-btnlayout-auto .flp-hero__buttons > .flp-hero__btn { flex: 0 0 auto !important; }
/* Disposition : largeur egale -> les 3 boutons prennent la largeur du plus large,
   groupes et centres (pas etires sur toute la zone). */
.flp-btnlayout-equal .flp-hero__buttons {
	width: auto;
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 1fr;
}
.flp-btnlayout-equal .flp-hero__buttons > .flp-hero__btn { flex: 0 0 auto !important; width: auto !important; min-width: 0 !important; }
/* Disposition : empiles */
.flp-btnlayout-stack .flp-hero__buttons { flex-direction: column; width: 100%; }
.flp-btnlayout-stack .flp-hero__buttons > .flp-hero__btn { flex: 0 0 auto !important; width: 100% !important; }

/* ============ BASE BOUTON ============ */
.flp-hero__btn {
	display: inline-flex; align-items: center; justify-content: center;
	padding: 18px 32px;
	border: 2px solid transparent; border-radius: 6px;
	font-family: var(--flp-font); font-size: 16px; font-weight: 700;
	text-decoration: none; line-height: 1; cursor: pointer; white-space: nowrap;
	position: relative; overflow: hidden;
	transition: background-color .3s ease, color .3s ease, border-color .3s ease, transform .2s ease, box-shadow .3s ease;
}
.flp-hero__btn:hover { transform: translateY(-2px); }

/* Icone : taille de la police (1em), boite carree pour un espacement regulier. */
.flp-hero__btn .flp-hero__btn-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.1em;
	height: 1.1em;
	font-size: 1.1em;
	line-height: 1;
	flex: 0 0 auto;
}
.flp-hero__btn .flp-hero__btn-icon svg { width: 1em; height: 1em; fill: currentColor; display: block; }
.flp-hero__btn .flp-hero__btn-icon i { font-size: inherit; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.flp-hero__btn .flp-hero__btn-label { display: inline-flex; align-items: center; line-height: 1; }
/* Espacement icone/texte : marge sur le label, incassable par le theme. */
.flp-hero__btn .flp-hero__btn-icon + .flp-hero__btn-label { margin-left: 12px; }

/* =========================================================================
 * PRESETS DE STYLE (choisis via le selecteur "Style predefini")
 * classe appliquee sur .flp-hero via prefix_class => flp-btnstyle-XXX
 * ========================================================================= */

/* ---- DUO : Devis plein vert / Tel contour blanc ---- */
.flp-btnstyle-duo .flp-hero__btn--primary { background: var(--flp-green); border-color: var(--flp-green); color: #fff; }
.flp-btnstyle-duo .flp-hero__btn--primary:hover { background: var(--flp-red); border-color: var(--flp-red); }
.flp-btnstyle-duo .flp-hero__btn--phone { background: transparent; border-color: #fff; color: #fff; }
.flp-btnstyle-duo .flp-hero__btn--phone:hover { background: var(--flp-green); border-color: var(--flp-green); }

/* ---- SOLID : les 3 pleins verts ---- */
.flp-btnstyle-solid .flp-hero__btn { background: var(--flp-green); border-color: var(--flp-green); color: #fff; }
.flp-btnstyle-solid .flp-hero__btn:hover { background: var(--flp-red); border-color: var(--flp-red); }

/* ---- CONTRAST : Devis rouge / Tel vert ---- */
.flp-btnstyle-contrast .flp-hero__btn--primary { background: var(--flp-red); border-color: var(--flp-red); color: #fff; }
.flp-btnstyle-contrast .flp-hero__btn--primary:hover { background: #a4110f; border-color: #a4110f; }
.flp-btnstyle-contrast .flp-hero__btn--phone { background: var(--flp-green); border-color: var(--flp-green); color: #fff; }
.flp-btnstyle-contrast .flp-hero__btn--phone:hover { background: var(--flp-green-d); border-color: var(--flp-green-d); }

/* ---- GLASS : verre translucide floute ---- */
.flp-btnstyle-glass .flp-hero__btn {
	background: rgba(255,255,255,0.14);
	border-color: rgba(255,255,255,0.35);
	color: #fff;
	-webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.flp-btnstyle-glass .flp-hero__btn--primary {
	background: rgba(89,124,49,0.55); border-color: rgba(255,255,255,0.4);
}
.flp-btnstyle-glass .flp-hero__btn:hover { background: rgba(255,255,255,0.26); }
.flp-btnstyle-glass .flp-hero__btn--primary:hover { background: rgba(89,124,49,0.85); }

/* ---- SOFT : pilule arrondie + ombre douce ---- */
.flp-btnstyle-soft .flp-hero__btn { border-radius: 50px; box-shadow: 0 10px 24px rgba(0,0,0,0.22); }
.flp-btnstyle-soft .flp-hero__btn--primary { background: var(--flp-green); border-color: var(--flp-green); color: #fff; }
.flp-btnstyle-soft .flp-hero__btn--primary:hover { background: var(--flp-red); border-color: var(--flp-red); box-shadow: 0 14px 30px rgba(198,30,29,0.35); }
.flp-btnstyle-soft .flp-hero__btn--phone { background: #fff; border-color: #fff; color: var(--flp-green); }
.flp-btnstyle-soft .flp-hero__btn--phone:hover { background: var(--flp-green); border-color: var(--flp-green); color: #fff; }

/* ---- MINIMAL : contour fin epure ---- */
.flp-btnstyle-minimal .flp-hero__btn { border-width: 1px; border-radius: 2px; background: transparent; color: #fff; border-color: rgba(255,255,255,0.55); }
.flp-btnstyle-minimal .flp-hero__btn--primary { border-color: var(--flp-green); }
.flp-btnstyle-minimal .flp-hero__btn:hover { background: rgba(255,255,255,0.08); }
.flp-btnstyle-minimal .flp-hero__btn--primary:hover { background: var(--flp-green); border-color: var(--flp-green); }

/* ---- GHOST : texte + soulignement anime ---- */
.flp-btnstyle-ghost .flp-hero__btn {
	background: transparent; border-color: transparent; color: #fff;
	padding-left: 6px; padding-right: 6px; border-radius: 0;
}
.flp-btnstyle-ghost .flp-hero__btn--primary { color: #fff; }
.flp-btnstyle-ghost .flp-hero__btn-label { position: relative; }
.flp-btnstyle-ghost .flp-hero__btn-label::after {
	content: ''; position: absolute; left: 0; bottom: -4px; height: 2px; width: 100%;
	background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .3s ease;
}
.flp-btnstyle-ghost .flp-hero__btn--primary .flp-hero__btn-label::after { background: var(--flp-green); }
.flp-btnstyle-ghost .flp-hero__btn:hover { transform: none; }
.flp-btnstyle-ghost .flp-hero__btn:hover .flp-hero__btn-label::after { transform: scaleX(1); }

/* ============ FLECHES (conserve) ============ */
.flp-hero .flp-hero__arrow {
	position: absolute; top: 50%; transform: translateY(-50%);
	z-index: 20; display: flex; align-items: center; justify-content: center;
	width: 52px; height: 52px; margin: 0; padding: 0; border: none; border-radius: 50%;
	background: rgba(89,124,49,0.85); color: #fff; cursor: pointer; box-shadow: none;
	transition: background-color .3s ease, transform .2s ease, opacity .3s ease;
}
.flp-hero .flp-hero__arrow::after,
.flp-hero .flp-hero__arrow::before { content: none !important; display: none !important; }
.flp-hero .flp-hero__arrow svg { display: block; width: 22px; height: 22px; pointer-events: none; }
.flp-hero .flp-hero__arrow:hover { background: var(--flp-red); }
.flp-hero .flp-hero__arrow--prev { left: 24px; right: auto; }
.flp-hero .flp-hero__arrow--next { right: 24px; left: auto; }
.flp-hero .flp-hero__arrow:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.flp-hero .flp-hero__arrow--disabled { opacity: .35; cursor: default; }

/* ============ PUCES (conserve) ============ */
.flp-hero .flp-hero__pagination {
	position: absolute; bottom: 26px; left: 0; right: 0; width: 100%;
	z-index: 20; display: flex; align-items: center; justify-content: center;
	gap: 8px; line-height: 1; padding: 0; margin: 0;
}
.flp-hero .flp-hero__bullet {
	display: inline-block; width: 11px; height: 11px; margin: 0; padding: 0; border: none;
	border-radius: 50%; background: rgba(255,255,255,0.5); opacity: 1; cursor: pointer;
	transition: background-color .3s ease, width .3s ease, border-radius .3s ease;
}
.flp-hero .flp-hero__bullet--active { width: 28px; border-radius: 6px; background: var(--flp-red); }

/* ============ RESPONSIVE ============ */
@media (max-width: 767px) {
	/* Fleches masquees sur mobile : le glissement au doigt suffit et elles genaient le texte. */
	.flp-hero .flp-hero__arrow { display: none !important; }
	.flp-hero__desc { font-size: 15px; }

	/* Tous les boutons s'empilent en pleine largeur sur mobile, quelle que soit la disposition. */
	.flp-hero__buttons,
	.flp-btnlayout-auto .flp-hero__buttons,
	.flp-btnlayout-equal .flp-hero__buttons,
	.flp-btnlayout-stack .flp-hero__buttons {
		display: flex !important;
		flex-direction: column !important;
		width: 100% !important;
		max-width: 340px;
	}
	.flp-hero__buttons > .flp-hero__btn {
		width: 100% !important;
		flex: 0 0 auto !important;
	}
	/* Marge basse pour ne pas coller aux puces */
	.flp-hero__buttons { margin-bottom: 10px; }

	/* Mobile : on coupe l'animation Ken Burns (scale continu) qui provoquait un
	   repaint permanent → c'est LA cause du "rafraîchissement" ressenti au
	   changement de slide sur mobile. Le fond reste net et fixe. */
	.flp-hero--kenburns .flp-hero__bg { animation: none !important; will-change: auto !important; transform: translateZ(0); }
}

/* Tablette : reduit un peu les fleches */
@media (max-width: 1024px) and (min-width: 768px) {
	.flp-hero .flp-hero__arrow { width: 46px; height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
	.flp-hero--kenburns .flp-hero__bg { animation: none !important; }
	.flp-hero__btn, .flp-hero .flp-hero__arrow, .flp-hero .flp-hero__bullet,
	.flp-btnstyle-ghost .flp-hero__btn-label::after { transition: none; }
}
