/**
 * Macteck Typing Effect — natif Divi 5 (front + VB via @import).
 * Préfixes : .mds-d5-te, .mds_native_typing_effect
 */

.mds_native_typing_effect .mds-d5-te {
	--mds-te-fg: #1a1a1a;
	--mds-te-accent: #0891b2;
	--mds-te-cursor: #0891b2;
	--mds-te-align: left;
	--mds-te-weight: 700;
	--mds-te-ls: 0px;
	font-family:    inherit;
	line-height:    1.35;
	margin:         0 0 clamp(0.65rem, 1.8vw, 1.25rem);
	display:        block;
	min-height:     1.45em;
	text-align:     var(--mds-te-align);
	font-weight:    var(--mds-te-weight);
	letter-spacing: var(--mds-te-ls);
	color:          var(--mds-te-fg);
	overflow-wrap:  anywhere;
	word-break:     break-word;

	/* Toujours neutre — pas de boîte visuelle sur le texte animé */
	background: transparent;
	box-shadow: none;
	border:     none;
}

/* ─── styleTarget : cible des styles Macteck ─────────────────── */
/* element (défaut) : styles de couleur/typo sur .mds-d5-te — comportement standard */

/* container : si besoin de décorer le wrapper via les contrôles Macteck */
.mds_native_typing_effect .mds-d5-te--style-target-container {
	color: var(--mds-te-fg);
}

/* both : même chose, comportement identique à element pour TypingEffect */

/* Espace sous le bloc titre (séparation visuelle avant CTA dans un hero). */
.mds_native_typing_effect > .et_pb_module_inner {
	padding-bottom: 0.15rem;
}

.mds_native_typing_effect .mds-d5-te--size-small {
	font-size: clamp(0.95rem, 2.5vw, 1.1rem);
}

.mds_native_typing_effect .mds-d5-te--size-medium {
	font-size: clamp(1.1rem, 3vw, 1.5rem);
}

.mds_native_typing_effect .mds-d5-te--size-large {
	font-size: clamp(1.35rem, 3.5vw, 2rem);
}

.mds_native_typing_effect .mds-d5-te--size-xlarge,
.mds_native_typing_effect .mds-d5-te--size-xl {
	font-size: clamp(1.6rem, 4vw, 2.75rem);
}

.mds_native_typing_effect .mds-d5-te--align-left {
	--mds-te-align: left;
}

.mds_native_typing_effect .mds-d5-te--align-center {
	--mds-te-align: center;
}

.mds_native_typing_effect .mds-d5-te--align-right {
	--mds-te-align: right;
}

.mds_native_typing_effect .mds-d5-te--align-justify {
	--mds-te-align: justify;
}

.mds_native_typing_effect .mds-d5-te__before,
.mds_native_typing_effect .mds-d5-te__after {
	color: var(--mds-te-fg);
}

.mds_native_typing_effect .mds-d5-te__slot {
	display: inline;
	white-space: normal;
	vertical-align: baseline;
}

.mds_native_typing_effect .mds-d5-te__animated {
	display: inline;
	color: var(--mds-te-accent);
}

/* ─── Variables CSS curseur (valeurs par défaut) ─────────────────── */
.mds_native_typing_effect .mds-d5-te {
	--mds-te-cursor-width:       2px;
	--mds-te-cursor-height:      1em;
	--mds-te-cursor-thickness:   3px;
	--mds-te-cursor-offset-y:    0px;
	--mds-te-cursor-gap:         4px;
	--mds-te-cursor-radius:      4px;
	--mds-te-cursor-opacity:     100;
	--mds-te-cursor-blink-speed: 900ms;
}

/* ─── Conteneur curseur ──────────────────────────────────────────── */
.mds_native_typing_effect .mds-d5-te__cursor {
	display:        inline-block;
	color:          var(--mds-te-cursor);
	vertical-align: baseline;
	margin-left:    var(--mds-te-cursor-gap, 4px);
}

.mds_native_typing_effect .mds-d5-te--cursor-off .mds-d5-te__cursor {
	display: none;
}

/* ─── Barre ─────────────────────────────────────────────────────── */
.mds_native_typing_effect .mds-d5-te--cursor-style-bar .mds-d5-te__cursor-inner {
	display:    inline-block;
	width:      var(--mds-te-cursor-width, 2px);
	height:     var(--mds-te-cursor-height, 1em);
	background: currentColor;
	transform:  translateY(var(--mds-te-cursor-offset-y, 0px));
}

/* ─── Bloc ──────────────────────────────────────────────────────── */
.mds_native_typing_effect .mds-d5-te--cursor-style-block .mds-d5-te__cursor-inner {
	display:       inline-block;
	width:         var(--mds-te-cursor-width, 2px);
	min-width:     0.35em;
	height:        var(--mds-te-cursor-height, 1em);
	background:    currentColor;
	border-radius: var(--mds-te-cursor-radius, 4px);
	opacity:       calc(var(--mds-te-cursor-opacity, 100) / 100);
	transform:     translateY(var(--mds-te-cursor-offset-y, 0px));
}

/* ─── Souligné ──────────────────────────────────────────────────── */
.mds_native_typing_effect .mds-d5-te--cursor-style-underline .mds-d5-te__cursor-inner {
	display:             inline-block;
	width:               var(--mds-te-cursor-width, 2px);
	min-width:           0.25em;
	height:              0.1em;
	border-bottom-width: var(--mds-te-cursor-thickness, 3px);
	border-bottom-style: solid;
	border-bottom-color: currentColor;
	vertical-align:      baseline;
	transform:           translateY(var(--mds-te-cursor-offset-y, 0px));
}

/* ─── Clignotement ──────────────────────────────────────────────── */
.mds_native_typing_effect .mds-d5-te__cursor-inner--blink {
	animation: mds-d5-te-cursor-blink var(--mds-te-cursor-blink-speed, 900ms) step-end infinite;
}

@keyframes mds-d5-te-cursor-blink {
	0%,
	100% {
		opacity: 1;
	}
	50% {
		opacity: 0;
	}
}

.mds_native_typing_effect .mds-d5-te--intensity-low {
	--mds-te-anim-scale: 0.98;
}

.mds_native_typing_effect .mds-d5-te--intensity-medium {
	--mds-te-anim-scale: 1;
}

.mds_native_typing_effect .mds-d5-te--intensity-high {
	--mds-te-anim-scale: 1.02;
}

@media (prefers-reduced-motion: reduce) {
	.mds_native_typing_effect .mds-d5-te {
		animation: none !important;
	}

	.mds_native_typing_effect .mds-d5-te__cursor-inner {
		animation: none !important;
	}
}

/* Presets — contrastes volontairement différents (repérage immédiat côte à côte). */
.mds_native_typing_effect .mds-d5-te--preset-macteck-clean {
	--mds-te-fg: #1e293b;
	--mds-te-accent: #ea580c;
	--mds-te-cursor: #0369a1;
}

/* Lisible sur fond clair (VB + pages blanches) : texte foncé, accent visible. */
.mds_native_typing_effect .mds-d5-te--preset-hero-premium {
	--mds-te-fg: #1f2937;
	--mds-te-accent: #0891b2;
	--mds-te-cursor: #0e7490;
}

.mds_native_typing_effect .mds-d5-te--preset-neon-tech {
	--mds-te-fg: #0f172a;
	--mds-te-accent: #22d3ee;
	--mds-te-cursor: #e879f9;
}

.mds_native_typing_effect .mds-d5-te--preset-neon-tech .mds-d5-te__animated {
	text-shadow: 0 0 14px rgba(34, 211, 238, 0.55);
}

.mds_native_typing_effect .mds-d5-te--preset-corporate {
	--mds-te-fg: #1e2a3a;
	--mds-te-accent: #2563eb;
	--mds-te-cursor: #2563eb;
}

.mds_native_typing_effect .mds-d5-te--preset-minimal {
	--mds-te-fg: #374151;
	--mds-te-accent: #0f766e;
	--mds-te-cursor: #115e59;
}

.mds_native_typing_effect .mds-d5-te--preset-orange-impact {
	--mds-te-fg: #1c1917;
	--mds-te-accent: #ea580c;
	--mds-te-cursor: #c2410c;
}

/* Effets (mot / transition) */
.mds_native_typing_effect .mds-d5-te--effect-fade .mds-d5-te__animated {
	transition: opacity 0.35s ease, filter 0.35s ease;
}

.mds_native_typing_effect .mds-d5-te--effect-slide .mds-d5-te__animated {
	display: inline-block;
	transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}

.mds_native_typing_effect .mds-d5-te--effect-rotate .mds-d5-te__animated {
	display: inline-block;
	transform-origin: center left;
	transition: transform 0.45s ease, opacity 0.35s ease;
}

.mds_native_typing_effect .mds-d5-te--effect-rotate.mds-d5-te--intensity-high .mds-d5-te__animated {
	font-weight: 800;
}
