/* SLATEL Formations -- mecanique non exprimable dans Elementor.
   Contenu : @keyframes, pseudo-elements, chaines de survol descendantes,
   sticky, recherche predictive, menu mobile, fleches du carrousel.
   Tout le reste du style vit dans les classes globales Elementor. */

/* ============ 1. Animations ============ */
@keyframes slatel-ticker  { from { transform: translateX(0); }   to { transform: translateX(-50%); } }
@keyframes slatel-marquee { from { transform: translateX(0); }   to { transform: translateX(-50%); } }
@keyframes slatel-shine   { 0% { left: -60%; } 40% { left: 130%; } 100% { left: 130%; } }
@keyframes slatel-rise    { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes slatel-fade    { from { opacity: 0; } to { opacity: 1; } }

.elementor .ticker-track { animation: slatel-ticker 46s linear infinite; }
.elementor .ticker:hover .ticker-track { animation-play-state: paused; }

.elementor .marquee-track { animation: slatel-marquee 38s linear infinite; }
.elementor .marquee-window:hover .marquee-track { animation-play-state: paused; }

.elementor .button-shine { position: relative; overflow: hidden; }
.elementor .button-shine::after {
	content: ""; display: block; position: absolute; top: 0; bottom: 0; left: -60%; width: 42%;
	background: linear-gradient(100deg, rgba(255,255,255,0), rgba(255,255,255,.5), rgba(255,255,255,0));
	transform: skewX(-18deg); animation: slatel-shine 3.4s ease-in-out infinite; pointer-events: none;
}

/* Entree du contenu du slide actif */
.elementor .hero-frame.e--selected .hero-frame-img { animation: slatel-fade 1.1s ease both; }
.elementor .hero-frame.e--selected .hero-eyebrow { animation: slatel-rise .85s .10s cubic-bezier(.22,.61,.36,1) both; }
.elementor .hero-frame.e--selected .hero-title   { animation: slatel-rise .95s .22s cubic-bezier(.22,.61,.36,1) both; }
.elementor .hero-frame.e--selected .hero-sub     { animation: slatel-rise .95s .38s cubic-bezier(.22,.61,.36,1) both; }
.elementor .hero-frame.e--selected .hero-cta     { animation: slatel-rise .95s .52s cubic-bezier(.22,.61,.36,1) both; }

@media (prefers-reduced-motion: reduce) {
	.elementor .ticker-track,
	.elementor .marquee-track,
	.elementor .button-shine::after,
	.elementor .hero-frame.e--selected > * { animation: none !important; }
}

/* ============ 2. Survols descendants ============ */
.elementor .media-frame-short:hover .media-img,
.elementor .media-frame-wide:hover .media-img,
.elementor .rail-media:hover .media-img,
.elementor .article-media:hover .media-img { transform: scale(1.06); }
.elementor .card-quote:hover .quote-avatar .media-img { transform: scale(1.08); }

/* Poles : effet bleu au survol */
.elementor .pole-tile:hover { background-color: var(--marine-wash); }
.elementor .pole-tile:hover .pole-tile-title { color: var(--marine-deep); }
.elementor .pole-tile:hover .tile-veil-cta { color: var(--marine); }
.elementor .pole-tile .tile-icon svg { width: 34px; height: 34px; transition: transform .35s cubic-bezier(.22,.61,.36,1); }
.elementor .pole-tile:hover .tile-icon svg { transform: scale(1.12) rotate(-3deg); }

/* ============ 3. Header sticky ============ */
/* Le wrapper du modele Elementor doit disparaitre de la mise en page,
   sinon l'element sticky est confine dans une boite de la hauteur du header. */
.slatel-header,
.slatel-header > .elementor { display: contents; }
.slatel-stickyhead { position: sticky; top: 0; z-index: 99; }
.admin-bar .slatel-stickyhead { top: 32px; }
@media (max-width: 782px) { .admin-bar .slatel-stickyhead { top: 46px; } }
.slatel-header .elementor { position: relative; z-index: 99; }

/* ============ 4. Recherche predictive ============ */
.slatel-search { position: relative; display: flex; flex-direction: column; flex: 1 1 150px; min-width: 0; max-width: 260px; }
.slatel-search-field {
	display: flex; align-items: center; gap: 8px; width: 100%; min-height: 42px; padding: 0 16px;
	background: var(--bg-soft); border: 1px solid var(--line-strong); border-radius: 999px;
}
.slatel-search-field:focus-within { border-color: var(--marine); background: var(--white); }
.slatel-search-glass { flex-shrink: 0; width: 14px; height: 14px; border: 1.6px solid var(--ink-mute); border-radius: 999px; }
.slatel-search input {
	width: 100%; min-width: 0; padding: 0; background: transparent; border: none; outline: none;
	color: var(--ink); font-family: var(--font-body); font-size: 14px; text-overflow: ellipsis;
}
.slatel-search-panel {
	display: none; flex-direction: column; position: absolute; top: 52px; right: 0; width: 420px;
	max-width: min(78vw, calc(100vw - 48px)); background: var(--white); border: 1px solid var(--line);
	border-top: 3px solid var(--rouge); border-radius: 8px; box-shadow: 0 22px 56px rgba(0,20,53,.16);
	overflow: hidden; z-index: 120; max-height: 62vh; overflow-y: auto;
}
.slatel-search.is-open .slatel-search-panel { display: flex; }
.slatel-search-head {
	display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px;
	background: var(--bg-soft); border-bottom: 1px solid var(--line);
	font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute);
}
.slatel-search-clear { background: none; border: 0; cursor: pointer; font-family: var(--font-body); font-size: 14px; font-weight: 600; color: var(--rouge); }
.slatel-hit {
	display: flex; flex-direction: column; gap: 2px; padding: 12px 24px; width: 100%; text-align: left;
	background: none; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; text-decoration: none;
}
.slatel-hit:hover, .slatel-hit:focus-visible { background: var(--marine-wash); outline: none; }
.slatel-hit-pole { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; color: var(--rouge); }
.slatel-hit-title { font-family: var(--font-body); font-size: 14px; font-weight: 600; color: var(--marine); }
.slatel-search-empty { padding: 24px; font-size: 14px; color: var(--ink-soft); }

/* ============ 5. Menu mobile ============ */
.slatel-mobile-nav { display: none; }
.slatel-header.is-nav-open .slatel-mobile-nav { display: flex; }

@media (max-width: 1024px) {
	.elementor .nav { display: none; }
	.elementor .burger { display: flex; }
	.slatel-search { max-width: 220px; }
}
@media (max-width: 767px) {
	.slatel-search { display: none; }
	.slatel-header.is-nav-open .slatel-mobile-nav .slatel-search { display: flex; max-width: none; }
}
@media (min-width: 1025px) {
	.elementor .burger { display: none; }
}

/* ============ 6. Fleches du carrousel ============ */
.elementor .rail { scrollbar-width: thin; scroll-behavior: smooth; }
.elementor .rail::-webkit-scrollbar { height: 6px; }
.elementor .rail::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; }
.elementor .rail-btn[disabled] { opacity: .35; cursor: default; }
.elementor .rail-btn[disabled]:hover { background: var(--white); color: var(--marine); border-color: var(--line-strong); transform: none; }

/* ---------- Menu mobile / tablette : defilement interne ---------- */
@media (max-width: 1024px) {
	.elementor .slatel-mobile-nav {
		max-height: calc(100vh - 170px);
		max-height: calc(100dvh - 170px);
		overflow-y: auto;
		overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;
	}
	.elementor .slatel-mobile-nav::-webkit-scrollbar { width: 4px; }
	.elementor .slatel-mobile-nav::-webkit-scrollbar-thumb {
		background: rgba(255, 255, 255, .35);
		border-radius: 4px;
	}
	.slatel-header.is-nav-open { overscroll-behavior: contain; }
}

/* ---------- Formation ciblee depuis la recherche predictive ---------- */
.elementor .course-item.is-target {
	background: rgba(196, 18, 48, .08);
	box-shadow: inset 3px 0 0 0 var(--rouge);
	border-radius: 8px;
	padding-left: 12px;
	padding-right: 12px;
	animation: slatel-fade .7s ease both;
}
.elementor .course-item.is-target .course-name {
	color: var(--rouge);
	font-weight: 700;
}
