/* ==========================================================================
   OINTECH — animations
   Toutes désactivées si l'utilisateur a demandé moins d'animations
   (réglage « réduire les animations » du système) : voir en bas du fichier.
   ========================================================================== */

@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes heroMedia { from { opacity: 0; transform: translateY(30px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes popIn { from { opacity: 0; transform: translateY(16px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes glowDrift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-120px, 80px); } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes shine { from { left: -60%; } to { left: 130%; } }
@keyframes ctaGlow { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .75; transform: scale(1.08); } }

/* Héros : apparition en cascade au chargement --------------------------- */
.hero__content > * { animation: fadeUp .9s var(--ease) both; }
.hero__content > *:nth-child(1) { animation-delay: .05s; }
.hero__content > *:nth-child(2) { animation-delay: .15s; }
.hero__content > *:nth-child(3) { animation-delay: .3s; }
.hero__content > *:nth-child(4) { animation-delay: .45s; }
.hero__content > *:nth-child(5) { animation-delay: .6s; }
.hero__media .media { animation: heroMedia 1.1s .25s var(--ease) both; }
.hero__media .media img { transition: transform 6s var(--ease); }
.hero__media:hover .media img { transform: scale(1.04); }
.hero__float { animation: popIn .8s var(--ease) both, floatY 6s ease-in-out infinite; }
.hero__float--a { animation-delay: .9s, 1.7s; }
.hero__float--b { animation-delay: 1.1s, 2.6s; }
.bg-grid::after { animation: glowDrift 18s ease-in-out infinite; }

/* Titre « OINTECH GROUP » : respiration lente et continue (mouvement uniquement) */
@keyframes titleBreathe {
	0%, 100% { transform: translateY(0) scale(1); }
	50% { transform: translateY(-6px) scale(1.015); }
}
.hero__content > h1 {
	transform-origin: left center;
	animation: fadeUp .9s .15s var(--ease) both, titleBreathe 6s 1.2s ease-in-out infinite;
}

/* Bandeau « Nous accompagnons » : défilement continu --------------------- */
.marquee {
	flex: 1; min-width: 0; overflow: hidden;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee .sectors__list { flex-wrap: nowrap; gap: 0 44px; padding-right: 44px; }
.marquee .sectors__list span { white-space: nowrap; }

/* Images : léger zoom arrière à l'apparition ----------------------------- */
.js .reveal .media img, .js .media.reveal img { transform: scale(1.1); transition: transform 1.6s var(--ease); }
.js .reveal.is-visible .media img, .js .media.reveal.is-visible img { transform: scale(1); }
.js .reveal-group .media img { transform: scale(1.08); transition: transform 1.4s var(--ease); }
.js .reveal-group.is-visible .media img { transform: scale(1); }
.js .reveal-group.is-visible .post-card:hover .media img { transform: scale(1.05); transition-duration: .6s; }

/* Sur-titres : le trait doré se dessine ---------------------------------- */
.eyebrow::before { transition: width .7s .25s var(--ease); }
.js .reveal:not(.is-visible) .eyebrow::before { width: 0; }

/* Méthodologie : la ligne se trace, les étapes apparaissent une à une ---- */
.steps::before { transform: scaleX(0); transform-origin: left; transition: transform 1.8s .2s var(--ease); }
.steps.is-visible::before, html:not(.js) .steps::before { transform: scaleX(1); }
.js .steps > li .step__dot { transform: scale(.5); opacity: 0; transition: transform .6s var(--ease), opacity .6s, background .25s, color .25s; }
.js .steps.is-visible > li .step__dot { transform: scale(1); opacity: 1; }
.js .steps.is-visible > li:nth-child(2) .step__dot { transition-delay: .2s; }
.js .steps.is-visible > li:nth-child(3) .step__dot { transition-delay: .4s; }
.js .steps.is-visible > li:nth-child(4) .step__dot { transition-delay: .6s; }
.js .steps.is-visible > li:nth-child(5) .step__dot { transition-delay: .8s; }
.js .steps.is-visible > li:nth-child(6) .step__dot { transition-delay: 1s; }
.js .steps.is-visible > li:nth-child(7) .step__dot { transition-delay: 1.2s; }
.step:hover .step__dot { background: var(--navy-700); color: #fff; }
.section--dark .step:hover .step__dot { background: var(--gold-500); color: var(--navy-950); }

/* Cartes : barre dorée et icône animée au survol ------------------------- */
.card { overflow: hidden; }
.card::after {
	content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--gold-500);
	transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease);
}
a.card:hover::after { transform: scaleX(1); }
.icon-box { transition: background .25s, color .25s, transform .35s var(--ease); }
.card:hover .icon-box, .value:hover .icon-box { transform: translateY(-3px) rotate(-6deg); }
.value, .pill-card, .tech, .contact-card, .process li { transition: transform .3s var(--ease), box-shadow .3s, border-color .3s, background .3s; }
.value:hover, .tech:hover, .contact-card:hover, .process li:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--navy-100); }
.pill-card:hover { background: var(--navy-50); transform: translateX(4px); }

/* Menu : soulignement animé ---------------------------------------------- */
.nav__link { position: relative; }
.nav__link::after {
	content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px; border-radius: 2px;
	background: var(--gold-500); transform: scaleX(0); transition: transform .3s var(--ease);
}
.nav__link:hover::after, .nav__item.is-current > .nav__link::after { transform: scaleX(1); }

/* Boutons : reflet lumineux au survol ------------------------------------ */
.btn--primary, .btn--accent { position: relative; overflow: hidden; }
.btn--primary::before, .btn--accent::before {
	content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
	background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent); transform: skewX(-20deg);
}
.btn--primary:hover::before, .btn--accent:hover::before { animation: shine .8s ease; }

/* Bloc d'appel à l'action : halo qui respire ------------------------------ */
.cta-band::before { animation: ctaGlow 7s ease-in-out infinite; }

/* Barre de progression de lecture + bouton « haut de page » (créés en JS) */
.scroll-progress {
	position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 300; pointer-events: none;
	background: linear-gradient(90deg, var(--gold-500), #FFD27A); transform: scaleX(0); transform-origin: left;
}
@media (max-width: 1024px) {
	.nav__link::after { display: none; }
	.marquee { width: 100%; flex: none; }
}

@media (prefers-reduced-motion: reduce) {
	.hero__content > *, .hero__media .media, .hero__float, .bg-grid::after, .cta-band::before { animation: none !important; }
	.marquee__track { animation: none; width: auto; }
	.marquee .sectors__list[aria-hidden] { display: none; }
	.marquee .sectors__list { flex-wrap: wrap; gap: 10px 28px; }
	.js .reveal .media img, .js .media.reveal img, .js .reveal-group .media img { transform: none; }
	.steps::before { transform: scaleX(1); }
	.js .steps > li .step__dot { transform: none; opacity: 1; }
	.btn--primary:hover::before, .btn--accent:hover::before { animation: none; }
	.scroll-progress { transition: none; }
}

/* ==========================================================================
   Logo Ointech blanc (cadre de l'accueil)
   1. Entrée au chargement : le symbole se dessine, les antennes sortent, le nom apparaît.
   2. Ensuite (assets/js/main.js) : moments calmes de durée variable, puis un geste
      choisi au hasard — classes .fx-antennas, .fx-spin, .fx-reboot, .fx-bounce, .fx-wave, .fx-tilt.
   ========================================================================== */
@keyframes logoDraw { to { stroke-dashoffset: 0; } }
@keyframes logoPop { 0% { transform: scale(0); opacity: 0; } 70% { transform: scale(1.25); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes logoText { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* --- Entrée --- */
.hero-logo-frame .logo__ring { stroke-dasharray: 100; stroke-dashoffset: 100; animation: logoDraw 1.1s .5s cubic-bezier(.65, 0, .35, 1) forwards; }
.hero-logo-frame .logo__ring + .logo__ring { animation-delay: 1.2s; animation-duration: .5s; }
.hero-logo-frame .logo__nodes path { stroke-dasharray: 20; stroke-dashoffset: 20; animation: logoDraw .35s ease-out forwards; }
.hero-logo-frame .logo__nodes path:nth-of-type(1) { animation-delay: 1.6s; }
.hero-logo-frame .logo__nodes path:nth-of-type(2) { animation-delay: 1.8s; }
.hero-logo-frame .logo__nodes path:nth-of-type(3) { animation-delay: 2s; }
.hero-logo-frame .logo__nodes circle { transform-box: fill-box; transform-origin: center; opacity: 0; fill: transparent; animation: logoPop .4s ease-out forwards; }
.hero-logo-frame .logo__nodes circle:nth-of-type(1) { animation-delay: 1.85s; }
.hero-logo-frame .logo__nodes circle:nth-of-type(2) { animation-delay: 2.05s; }
.hero-logo-frame .logo__nodes circle:nth-of-type(3) { animation-delay: 2.25s; }
.hero-logo-frame .logo__text { opacity: 0; animation: logoText .8s 2.4s var(--ease) forwards; }
.hero-logo-frame .logo__mark { transform-origin: 43% 55%; }

/* --- Après l'entrée : état stable, prêt pour les gestes --- */
.hero-logo-frame.is-ready .logo__ring,
.hero-logo-frame.is-ready .logo__nodes path { stroke-dashoffset: 0; animation: none; }
.hero-logo-frame.is-ready .logo__nodes circle,
.hero-logo-frame.is-ready .logo__text { opacity: 1; animation: none; }

/* Geste 1 : les antennes rentrent puis ressortent, l'une après l'autre */
@keyframes antLine { 0%, 100% { stroke-dashoffset: 0; } 35%, 60% { stroke-dashoffset: 20; } }
@keyframes antIn1 { 0%, 100% { transform: none; } 35%, 60% { transform: translate(-9.1px, 9.1px) scale(0); } }
@keyframes antIn2 { 0%, 100% { transform: none; } 35%, 60% { transform: translate(-10px, 0) scale(0); } }
@keyframes antIn3 { 0%, 100% { transform: none; } 35%, 60% { transform: translate(-9.1px, -9.1px) scale(0); } }
.hero-logo-frame.is-ready.fx-antennas .logo__nodes path:nth-of-type(1) { animation: antLine 1s 0s ease-in-out; }
.hero-logo-frame.is-ready.fx-antennas .logo__nodes path:nth-of-type(2) { animation: antLine 1s .7s ease-in-out; }
.hero-logo-frame.is-ready.fx-antennas .logo__nodes path:nth-of-type(3) { animation: antLine 1s 1.4s ease-in-out; }
.hero-logo-frame.is-ready.fx-antennas .logo__nodes circle:nth-of-type(1) { animation: antIn1 1s 0s ease-in-out; }
.hero-logo-frame.is-ready.fx-antennas .logo__nodes circle:nth-of-type(2) { animation: antIn2 1s .7s ease-in-out; }
.hero-logo-frame.is-ready.fx-antennas .logo__nodes circle:nth-of-type(3) { animation: antIn3 1s 1.4s ease-in-out; }

/* Geste 2 : le symbole fait un tour complet */
@keyframes logoSpin { 0% { transform: rotate(0); } 75% { transform: rotate(370deg); } 100% { transform: rotate(360deg); } }
.hero-logo-frame.is-ready.fx-spin .logo__mark { animation: logoSpin 1.6s cubic-bezier(.6, 0, .25, 1); }

/* Geste 3 : redémarrage — le cercle s'efface puis se redessine */
@keyframes logoReboot { 0% { stroke-dashoffset: 0; } 40% { stroke-dashoffset: -100; } 41% { stroke-dashoffset: 100; } 100% { stroke-dashoffset: 0; } }
.hero-logo-frame.is-ready.fx-reboot .logo__ring:first-child { animation: logoReboot 1.8s cubic-bezier(.65, 0, .35, 1); }

/* Geste 4 : la barre d'alimentation s'abaisse puis rebondit */
@keyframes logoPress { 0%, 100% { transform: none; } 30% { transform: translateY(7px); } 55% { transform: translateY(-3px); } 75% { transform: translateY(1px); } }
.hero-logo-frame.is-ready.fx-bounce .logo__ring + .logo__ring { animation: logoPress 1.1s ease-out; }

/* Geste 5 : les trois antennes se rétractent ensemble puis jaillissent */
@keyframes antOut1 { 0%, 100% { transform: none; } 40% { transform: translate(-9.1px, 9.1px) scale(0); } 75% { transform: translate(2px, -2px) scale(1.3); } }
@keyframes antOut2 { 0%, 100% { transform: none; } 40% { transform: translate(-10px, 0) scale(0); } 75% { transform: translate(3px, 0) scale(1.3); } }
@keyframes antOut3 { 0%, 100% { transform: none; } 40% { transform: translate(-9.1px, -9.1px) scale(0); } 75% { transform: translate(2px, 2px) scale(1.3); } }
@keyframes antLineQuick { 0%, 100% { stroke-dashoffset: 0; } 40% { stroke-dashoffset: 20; } 75% { stroke-dashoffset: 0; } }
.hero-logo-frame.is-ready.fx-wave .logo__nodes path { animation: antLineQuick 1.1s ease-in-out; }
.hero-logo-frame.is-ready.fx-wave .logo__nodes circle:nth-of-type(1) { animation: antOut1 1.1s ease-in-out; }
.hero-logo-frame.is-ready.fx-wave .logo__nodes circle:nth-of-type(2) { animation: antOut2 1.1s ease-in-out; }
.hero-logo-frame.is-ready.fx-wave .logo__nodes circle:nth-of-type(3) { animation: antOut3 1.1s ease-in-out; }

/* Geste 6 : hésitation — le symbole penche d'un côté puis de l'autre */
@keyframes logoTilt { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-12deg); } 45% { transform: rotate(9deg); } 65% { transform: rotate(-4deg); } 85% { transform: rotate(2deg); } }
.hero-logo-frame.is-ready.fx-tilt .logo__mark { animation: logoTilt 1.4s ease-in-out; }

@media (prefers-reduced-motion: reduce) {
	.hero-logo-frame .logo__ring, .hero-logo-frame .logo__nodes path { stroke-dashoffset: 0; animation: none; }
	.hero-logo-frame .logo__nodes circle, .hero-logo-frame .logo__text { opacity: 1; animation: none; }
}
