/* WB – Titres Animés — v1.2.1
 * Palette par défaut : Solarva (#4AAB3D / #072032 / #ffa800).
 * Gardes anti-thème : letter-spacing négatif des titres Solarva, marges h/p,
 * text-transform, .elementor img{height:auto}. Racine confinée par overflow-x: clip.
 */

/* Police manuscrite embarquée (OFL) — auto-hébergée, aucun appel externe. */
@font-face {
	font-family: 'Dancing Script WB';
	font-weight: 600;
	font-style: normal;
	font-display: swap;
	src: url('../fonts/dancing-script-600.woff2') format('woff2');
}
@font-face {
	font-family: 'Dancing Script WB';
	font-weight: 700;
	font-style: normal;
	font-display: swap;
	src: url('../fonts/dancing-script-700.woff2') format('woff2');
}

.wb-ta {
	--wb-ta-eyebrow: #4AAB3D;
	--wb-ta-title: #072032;
	--wb-ta-accent-a: #4AAB3D;
	--wb-ta-accent-b: #2e7d24;
	--wb-ta-subtitle: #5c6972;
	--wb-ta-decor: #4AAB3D;
	--wb-ta-gold: #ffa800;
	--wb-ta-badge-bg: #e4f3e2;
	--wb-ta-align: center;
	--wb-pad-x: 0px;
	--wb-ta-dur: .8s;

	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 14px;
	padding-left: var(--wb-pad-x);
	padding-right: var(--wb-pad-x);
	overflow-x: clip;
	max-width: 100%;
}
.wb-ta--speed-slow { --wb-ta-dur: 1.25s; }
.wb-ta--speed-fast { --wb-ta-dur: .5s; }

/* Alignement par défaut — le contrôle Elementor écrase text-align + align-items,
 * et les rangées en inline-flex suivent naturellement align-items. */
.wb-ta { text-align: center; align-items: center; }
.wb-ta__decor-row { display: inline-flex; }

/* Gardes anti-thème en :where() — (0,1,0), ne bloque pas Elementor. */
.wb-ta :where(h1, h2, h3, h4, h5, h6, p) {
	margin: 0;
	padding: 0;
	letter-spacing: normal;
	text-transform: none;
	clear: none;
}
.wb-ta :where(*) { min-width: 0; }
.wb-ta [hidden] { display: none !important; }

/* ---------- Décor : branche W. Bottier ---------- */
.wb-ta__decor {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--wb-ta-decor);
	line-height: 1;
	flex: 0 0 auto;
}
.wb-ta .wb-ta__decor .wb-ta__branch { width: 44px; height: 24px; display: block; }
.wb-ta .wb-ta__decor .wb-ta__icon,
.wb-ta .wb-ta__decor i { font-size: 26px; line-height: 1 !important; vertical-align: middle; }
.wb-ta .wb-ta__decor svg:not(.wb-ta__branch) { width: 26px; height: 26px; }
.wb-ta .wb-ta__decor .wb-ta__img { width: 44px; height: auto; max-width: 44px; display: block; }

.wb-ta--decor-both .wb-ta__decor:last-child .wb-ta__branch { transform: scaleX(-1); }

/* ---------- Sur-titre ---------- */
.wb-ta__eyebrow-row {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	max-width: 100%;
	flex-wrap: wrap;
}
/* Espacement décor/texte par margin, jamais par gap (règle anti-thème). */
.wb-ta__eyebrow-row .wb-ta__decor { margin-right: 10px !important; }
.wb-ta--decor-both .wb-ta__eyebrow-row .wb-ta__decor:last-child { margin-right: 0 !important; margin-left: 10px !important; }

.wb-ta .wb-ta__eyebrow {
	color: var(--wb-ta-eyebrow);
	font-weight: 600;
	line-height: 1.3;
	overflow-wrap: break-word;
}
/* Style manuscrit — Dancing Script embarquée (demande client, 01/08/2026). */
.wb-ta--eyebrow-script .wb-ta__eyebrow {
	font-family: 'Dancing Script WB', 'Dancing Script', 'Segoe Script', cursive;
	font-size: 32px;
	font-weight: 600;
}
/* Pastille arrondie. */
.wb-ta--eyebrow-badge .wb-ta__eyebrow {
	background: var(--wb-ta-badge-bg);
	border-radius: 999px;
	padding: 7px 18px;
	font-size: 14px;
	letter-spacing: .12em;
	text-transform: uppercase;
}
/* Filets dorés latéraux. */
.wb-ta--eyebrow-lines .wb-ta__eyebrow {
	font-size: 15px;
	letter-spacing: .14em;
	text-transform: uppercase;
	position: relative;
	display: inline-flex;
	align-items: center;
}
.wb-ta--eyebrow-lines .wb-ta__eyebrow::before,
.wb-ta--eyebrow-lines .wb-ta__eyebrow::after {
	content: '';
	display: inline-block;
	width: 34px;
	height: 2px;
	border-radius: 2px;
	background: linear-gradient(90deg, var(--wb-ta-gold), #ffc95e);
	flex: 0 0 auto;
}
.wb-ta--eyebrow-lines .wb-ta__eyebrow::before { margin-right: 12px; }
.wb-ta--eyebrow-lines .wb-ta__eyebrow::after  { margin-left: 12px; }
/* Simple. */
.wb-ta--eyebrow-plain .wb-ta__eyebrow {
	font-size: 14px;
	letter-spacing: .18em;
	text-transform: uppercase;
}

/* ---------- Titre ---------- */
/* Tailles par défaut responsives (le h2 Solarva fait 54px, trop grand en mobile) ;
 * la typographie Elementor du widget reprend la main si renseignée. */
.wb-ta .wb-ta__title {
	color: var(--wb-ta-title);
	font-weight: 700;
	font-size: 42px;
	line-height: 1.15;
	max-width: 100%;
	overflow-wrap: anywhere; /* dernier recours : un mot plus large que l'écran se coupe */
}
.wb-ta .wb-ta__title .wb-ta__plain,
.wb-ta .wb-ta__title .wb-ta__accent { overflow-wrap: anywhere; }
/* Les mots découpés par le JS restent des inline-block : on borne leur largeur
 * et on autorise la coupure interne en tout dernier recours. */
.wb-ta .wb-ta__w { max-width: 100%; overflow-wrap: anywhere; }
@media (max-width: 1024px) { .wb-ta .wb-ta__title { font-size: 34px; } }
@media (max-width: 767px)  { .wb-ta .wb-ta__title { font-size: 28px; } }

/* Accent — dégradé vert. */
.wb-ta--accent-gradient .wb-ta__accent {
	background: linear-gradient(100deg, var(--wb-ta-accent-a), var(--wb-ta-accent-b));
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: var(--wb-ta-accent-a); /* repli si background-clip non géré */
}
/* PIÈGE SAFARI iOS : background-clip:text ne se peint pas à travers des enfants
 * inline-block (mots/lettres découpés par le JS) — le titre accentué devenait
 * invisible sur iPhone. Quand l'accent est fragmenté (classe posée par le JS),
 * le conteneur repasse en peinture normale et CHAQUE fragment porte son propre
 * dégradé, en vertical (180deg) pour un rendu identique d'un fragment à l'autre. */
.wb-ta--accent-gradient .wb-ta__accent.wb-ta__accent--frag {
	background: none;
	-webkit-text-fill-color: currentColor;
	color: var(--wb-ta-accent-a);
}
.wb-ta--accent-gradient .wb-ta__accent--frag .wb-ta__w,
.wb-ta--accent-gradient .wb-ta__accent--frag .wb-ta__l {
	background-image: linear-gradient(180deg, var(--wb-ta-accent-a), var(--wb-ta-accent-b));
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: var(--wb-ta-accent-a);
}
/* Dans la cascade de lettres, le mot enveloppe des lettres inline-block : c'est
 * la lettre qui peint, le mot reste neutre. */
.wb-ta--accent-gradient .wb-ta__accent--frag .wb-ta__w .wb-ta__l { -webkit-text-fill-color: transparent; }
/* Accent — couleur unie. */
.wb-ta--accent-solid .wb-ta__accent { color: var(--wb-ta-accent-a); }
/* Accent — surligneur. */
.wb-ta--accent-highlight .wb-ta__accent {
	color: inherit;
	background: linear-gradient(0deg, var(--wb-ta-badge-bg) 38%, transparent 38%);
	border-radius: 4px;
	padding: 0 .12em;
	box-decoration-break: clone;
	-webkit-box-decoration-break: clone;
}
/* Accent — souligné qui se trace. */
.wb-ta--accent-draw .wb-ta__accent {
	color: var(--wb-ta-accent-a);
	background-image: linear-gradient(90deg, var(--wb-ta-accent-a), var(--wb-ta-accent-b));
	background-repeat: no-repeat;
	background-size: 100% 3px;
	background-position: 0 96%;
	padding-bottom: .08em;
	box-decoration-break: clone;
	-webkit-box-decoration-break: clone;
}
.wb-ta--accent-draw.wb-ta--js .wb-ta__accent { background-size: 0% 3px; transition: background-size calc(var(--wb-ta-dur) * 1.2) ease .35s; }
.wb-ta--accent-draw.wb-ta--js.is-in .wb-ta__accent { background-size: 100% 3px; }

/* ---------- Sous-titre ---------- */
.wb-ta .wb-ta__subtitle {
	color: var(--wb-ta-subtitle);
	font-size: 17px;
	line-height: 1.65;
	overflow-wrap: break-word;
}

/* ---------- Animations (amélioration progressive : rien de masqué sans JS) ---------- */
@media (prefers-reduced-motion: reduce) {
	.wb-ta * { animation: none !important; transition: none !important; }
}

/* Apparition douce du bloc. */
.wb-ta--js.wb-ta--anim-fade-up > * { opacity: 0; transform: translateY(18px); transition: opacity var(--wb-ta-dur) ease, transform var(--wb-ta-dur) ease; }
.wb-ta--js.wb-ta--anim-fade-up.is-in > * { opacity: 1; transform: none; }
.wb-ta--js.wb-ta--anim-fade-up.is-in > .wb-ta__title { transition-delay: .12s; }
.wb-ta--js.wb-ta--anim-fade-up.is-in > .wb-ta__subtitle { transition-delay: .24s; }

/* Montée mot à mot — le JS découpe en .wb-ta__w. */
.wb-ta .wb-ta__w { display: inline-block; }
.wb-ta--js.wb-ta--anim-rise-words .wb-ta__w {
	opacity: 0; transform: translateY(.65em);
	transition: opacity calc(var(--wb-ta-dur) * .75) ease var(--wb-d, 0s), transform calc(var(--wb-ta-dur) * .75) cubic-bezier(.2,.7,.3,1) var(--wb-d, 0s);
}
.wb-ta--js.wb-ta--anim-rise-words.is-in .wb-ta__w { opacity: 1; transform: none; }

/* Cascade de lettres 3D — le JS découpe en .wb-ta__l. */
.wb-ta--anim-letters-3d .wb-ta__title { perspective: 640px; }
.wb-ta .wb-ta__l { display: inline-block; }
.wb-ta--js.wb-ta--anim-letters-3d .wb-ta__l {
	opacity: 0; transform: rotateX(-88deg) translateY(.3em); transform-origin: 50% 100%;
	transition: opacity .5s ease var(--wb-d, 0s), transform calc(var(--wb-ta-dur) * .8) cubic-bezier(.2,.7,.25,1.1) var(--wb-d, 0s);
}
.wb-ta--js.wb-ta--anim-letters-3d.is-in .wb-ta__l { opacity: 1; transform: none; }

/* Machine à écrire — curseur. */
.wb-ta--js.wb-ta--anim-typewriter.is-in .wb-ta__title::after {
	content: '';
	display: inline-block;
	width: 2px;
	height: .9em;
	margin-left: 3px;
	background: var(--wb-ta-accent-a);
	vertical-align: -.08em;
	animation: wb-ta-caret 1s steps(1) infinite;
}
.wb-ta--js.wb-ta--anim-typewriter.is-done .wb-ta__title::after { display: none; }
@keyframes wb-ta-caret { 50% { opacity: 0; } }

/* Rideau vert balayant. */
.wb-ta--js.wb-ta--anim-curtain .wb-ta__title { position: relative; }
.wb-ta--js.wb-ta--anim-curtain .wb-ta__plain,
.wb-ta--js.wb-ta--anim-curtain .wb-ta__accent { opacity: 0; transition: opacity .01s linear calc(var(--wb-ta-dur) * .45); }
.wb-ta--js.wb-ta--anim-curtain.is-in .wb-ta__plain,
.wb-ta--js.wb-ta--anim-curtain.is-in .wb-ta__accent { opacity: 1; }
.wb-ta--js.wb-ta--anim-curtain .wb-ta__title::before {
	content: '';
	position: absolute;
	inset: -4px -6px;
	background: linear-gradient(100deg, var(--wb-ta-accent-a), var(--wb-ta-accent-b));
	border-radius: 6px;
	transform: scaleX(0);
	transform-origin: 0 50%;
	pointer-events: none;
}
.wb-ta--js.wb-ta--anim-curtain.is-in .wb-ta__title::before { animation: wb-ta-curtain var(--wb-ta-dur) cubic-bezier(.65,0,.35,1) forwards; }
@keyframes wb-ta-curtain {
	0%   { transform: scaleX(0); transform-origin: 0 50%; }
	48%  { transform: scaleX(1); transform-origin: 0 50%; }
	52%  { transform: scaleX(1); transform-origin: 100% 50%; }
	100% { transform: scaleX(0); transform-origin: 100% 50%; }
}

/* Mise au point flou → net. */
.wb-ta--js.wb-ta--anim-blur-focus .wb-ta__title { opacity: 0; filter: blur(10px); transform: scale(1.02); transition: opacity var(--wb-ta-dur) ease, filter var(--wb-ta-dur) ease, transform var(--wb-ta-dur) ease; }
.wb-ta--js.wb-ta--anim-blur-focus.is-in .wb-ta__title { opacity: 1; filter: blur(0); transform: none; }

/* Rotation de mots — le JS remplace le contenu du 1er accent. */
.wb-ta--anim-rotate .wb-ta__accent-inner { display: inline-block; }
.wb-ta--js.wb-ta--anim-rotate .wb-ta__accent-inner.wb-ta--swap-out { opacity: 0; transform: translateY(-.5em); transition: opacity .28s ease, transform .28s ease; }
.wb-ta--js.wb-ta--anim-rotate .wb-ta__accent-inner.wb-ta--swap-in  { opacity: 0; transform: translateY(.5em); transition: none; }
.wb-ta--js.wb-ta--anim-rotate .wb-ta__accent-inner { opacity: 1; transform: none; transition: opacity .28s ease, transform .28s ease; }

/* ---------- Garde image Elementor ---------- */
.wb-ta .wb-ta__decor .wb-ta__img { height: auto; }

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
	.wb-ta { gap: 10px; }
	.wb-ta--eyebrow-script .wb-ta__eyebrow { font-size: 25px; }
	.wb-ta .wb-ta__subtitle { font-size: 15.5px; }
	.wb-ta--eyebrow-lines .wb-ta__eyebrow::before,
	.wb-ta--eyebrow-lines .wb-ta__eyebrow::after { width: 22px; }
}
