/* =====================================================================
   Finesty — « Les étapes de création » (etapes.css), page Création d'entreprise. Bloc .fy-proc (appliquer-etapes.py).
   Par défaut (tablette, mobile, sans JS, mouvement réduit) : frise verticale à rail doré.
   Ordinateur avec etapes.js (.fy-proc--h) : section épinglée, les étapes défilent horizontalement au rythme du
   défilement (GSAP ScrollTrigger), compteur et progression à points, carte active mise en avant.
   ===================================================================== */

/* fond de la section : bleu nuit profond + lueur or discrète + grain */
.fy-proc-section.elementor-element:is(#fyp, .fy-proc-section) {
  background: radial-gradient(70% 60% at 90% 0%, rgba(218, 174, 81, 0.12) 0%, rgba(218, 174, 81, 0) 60%),
              radial-gradient(60% 70% at 0% 100%, rgba(47, 87, 101, 0.55) 0%, rgba(47, 87, 101, 0) 70%),
              linear-gradient(180deg, #1B3740 0%, #142C34 100%) !important;
  position: relative; overflow: clip;
}
.fy-proc-section > .e-con-inner > .elementor-shape { display: none !important; }   /* biseaux Elementor : retirés */
.fy-proc-section > .e-con-inner { position: relative; z-index: 1; }

.fy-proc { --gold: #DAAE51; --gold-hi: #F4C01A; position: relative; color: rgba(255, 255, 255, 0.82); font-family: "Roboto", Arial, sans-serif; }

/* ---------- en-tête ---------- */
.fy-proc__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; margin: 0 0 44px; }
.fy-proc__intro { max-width: 720px; }
.fy-proc__eyebrow {
  display: inline-block; margin: 0 0 14px; font: 600 13px/1 "Kanit", sans-serif; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold);
}
.fy-proc__h2 { margin: 0 0 20px; font: 700 clamp(28px, 3.2vw, 44px)/1.12 "Kanit", sans-serif; color: #FFFFFF; letter-spacing: -.01em; }
.fy-proc__h2 em { font-style: normal; color: var(--gold); }
.fy-proc .fy-bar { margin: 0 !important; }

.fy-proc__meter { flex: 0 0 auto; min-width: 280px; display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.fy-proc__count { font: 700 56px/1 "Kanit", sans-serif; color: #FFFFFF; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.fy-proc__sep, .fy-proc__tot { color: rgba(255, 255, 255, 0.35); font-size: 24px; font-weight: 500; margin-left: 6px; }
.fy-proc__bar { position: relative; width: 280px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, 0.16); display: flex; justify-content: space-between; align-items: center; }
.fy-proc__fill { position: absolute; left: 0; top: 0; height: 100%; width: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--gold), var(--gold-hi)); transform-origin: left center; transform: scaleX(0); }
.fy-proc__dot { position: relative; z-index: 1; width: 10px; height: 10px; border-radius: 50%; background: #1B3740; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.30); transition: box-shadow .35s ease, background-color .35s ease, transform .35s ease; }
.fy-proc__dot > span { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); font: 500 12px/1 "Kanit", sans-serif; letter-spacing: .06em; color: rgba(255, 255, 255, 0.40); transition: color .35s ease; }
.fy-proc__dot.is-done { background: var(--gold); box-shadow: none; }
.fy-proc__dot.is-current { background: var(--gold); box-shadow: 0 0 0 5px rgba(218, 174, 81, 0.22); transform: scale(1.15); }
.fy-proc__dot.is-current > span, .fy-proc__dot.is-done > span { color: var(--gold); }
.fy-proc__hint { display: none; margin-top: 18px; font: 500 12px/1 "Kanit", sans-serif; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, 0.45); }
.fy-proc__hint i { margin-right: 6px; color: var(--gold); }

/* ---------- liste des étapes (frise verticale par défaut) ---------- */
.fy-proc__viewport { position: relative; }
.fy-proc__track { list-style: none; margin: 0; padding: 0 0 0 64px; display: flex; flex-direction: column; gap: 22px; position: relative; }
.fy-proc__rail { position: absolute; left: 23px; top: 26px; bottom: 26px; width: 2px; border-radius: 2px; background: rgba(255, 255, 255, 0.14); }
.fy-proc__rail-fill { position: absolute; inset: 0; border-radius: 2px; background: linear-gradient(180deg, var(--gold), var(--gold-hi)); transform-origin: top center; transform: scaleY(1); }
.fy-proc__step { position: relative; margin: 0; }
.fy-proc__step::before {    /* point sur le rail */
  content: ""; position: absolute; left: -48px; top: 30px; width: 16px; height: 16px; border-radius: 50%; background: #142C34;
  box-shadow: inset 0 0 0 2px var(--gold); transition: background-color .35s ease, box-shadow .35s ease, transform .35s ease;
}
.fy-proc__step.is-active::before { background: var(--gold); box-shadow: 0 0 0 6px rgba(218, 174, 81, 0.20); transform: scale(1.1); }

/* ---------- carte ---------- */
.fy-proc__card {
  position: relative; height: 100%; box-sizing: border-box; padding: 10px 10px 26px; border-radius: 20px; overflow: hidden;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.085) 0%, rgba(255, 255, 255, 0.03) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.11);
  transition: background .5s ease, box-shadow .5s ease, transform .5s cubic-bezier(.22, .61, .36, 1);
}
.fy-proc__card::before {   /* liseré or qui se dessine sur la carte active */
  content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--gold), var(--gold-hi));
  transform: scaleX(0); transform-origin: left center; transition: transform .6s cubic-bezier(.65, 0, .35, 1);
}
.fy-proc__card::after {    /* halo or dans le coin */
  content: ""; position: absolute; right: -80px; top: -80px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(218, 174, 81, 0.22) 0%, rgba(218, 174, 81, 0) 70%); opacity: 0; transition: opacity .6s ease; pointer-events: none;
}
/* image en tête de carte (même composition que « Notre manière de travailler ») */
.fy-proc__media { position: relative; margin: 0; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 14px; background: #16313A; }
.fy-proc__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(19, 43, 51, 0) 45%, rgba(19, 43, 51, .55) 100%); }
.fy-proc__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* le picto en pastille or chevauche le bas de l'image */
.fy-proc__top { position: relative; z-index: 1; display: flex; align-items: flex-end; margin: -30px 16px 14px; }
.fy-proc__ico {
  flex: 0 0 54px; width: 54px; height: 54px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold); color: #16313A; font-size: 21px; box-shadow: 0 14px 26px -12px rgba(0, 0, 0, .6);
  transition: background-color .45s ease, color .45s ease, transform .45s cubic-bezier(.34, 1.56, .64, 1);
}
.fy-proc__title { margin: 0 16px 12px; font: 600 22px/1.25 "Kanit", sans-serif; color: #FFFFFF; }
.fy-proc__owners { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 16px 16px; }
.fy-proc__label { width: 100%; margin-bottom: 2px; font: 500 12px/1 "Kanit", sans-serif; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.45); }
.fy-proc__who {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 8px; border-radius: 50px; font: 500 13px/1 "Kanit", sans-serif;
  background: rgba(255, 255, 255, 0.08); color: #FFFFFF; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.10);
}
.fy-proc__who i, .fy-proc__who svg { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; flex: 0 0 20px; }
.fy-proc__who--client i { background: #5E8FA0; color: #FFFFFF; }
.fy-proc__who--finesty svg { color: var(--gold-hi); background: transparent; padding: 0; }
.fy-proc__who--partner i { background: rgba(255, 255, 255, 0.16); color: #FFFFFF; }
.fy-proc__plus { color: rgba(255, 255, 255, 0.35); font: 500 13px/1 "Kanit", sans-serif; }
.fy-proc__text { margin: 0 16px; font-size: 15.5px; line-height: 1.65; color: rgba(255, 255, 255, 0.78); }

/* carte active */
.fy-proc__step.is-active .fy-proc__card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.05) 100%);
  box-shadow: inset 0 0 0 1px rgba(218, 174, 81, 0.45), 0 24px 50px rgba(0, 0, 0, 0.28);
}
.fy-proc__step.is-active .fy-proc__card::before { transform: scaleX(1); }
.fy-proc__step.is-active .fy-proc__card::after { opacity: 1; }
.fy-proc__step.is-active .fy-proc__ico { transform: rotate(-6deg) scale(1.06); box-shadow: 0 18px 30px -12px rgba(0, 0, 0, .7); }
.fy-proc__step.is-active .fy-proc__media::after { background: linear-gradient(180deg, rgba(19, 43, 51, 0) 38%, rgba(19, 43, 51, .5) 100%); }

/* tablette et mobile : défilement HORIZONTAL tactile à aimantation (la carte la mieux centrée est mise en avant) */
@media (max-width: 1024px) {
  /* plus d'air pour les éléments HORS cartes (titre, compteur 04/06, « faites défiler », timeline) */
  .fy-proc__head { flex-direction: column; align-items: flex-start; gap: 30px; margin-bottom: 40px; }
  .fy-proc__intro { max-width: 100%; }
  .fy-proc__h2 { margin-bottom: 4px; }
  /* compteur d'étapes conservé sur mobile (sinon, une carte à la fois, on ne voit plus la progression 01/06) */
  .fy-proc__meter { display: flex; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 22px 16px; min-width: 0; width: 100%; }
  .fy-proc__count { font-size: 34px; }
  .fy-proc__sep, .fy-proc__tot { font-size: 18px; }
  .fy-proc__bar { order: 3; flex: 1 1 100%; width: 100%; margin: 2px 0 26px; }
  .fy-proc__hint { display: inline-flex; margin: 0; margin-left: auto; }
  /* le bloc reste borné à la largeur du conteneur (sinon il grandit à la taille du rail et la page déborde) */
  html body .fy-proc { width: 100%; max-width: 100%; min-width: 0; }
  .fy-proc__viewport { max-width: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .fy-proc__viewport::-webkit-scrollbar { display: none; }
  /* padding latéral = de quoi centrer la 1re et la dernière carte ; aimantation carte par carte */
  html body .fy-proc__track { flex-direction: row; width: max-content; gap: 16px; padding: 6px calc((100% - min(84vw, 380px)) / 2) 14px; }
  .fy-proc__step { flex: 0 0 min(84vw, 380px); scroll-snap-align: center; scroll-snap-stop: always; }
  .fy-proc__rail { display: none; }
  .fy-proc__step::before { display: none; }
  /* ombre portée sombre retirée sur mobile (elle paraissait bizarre derrière les cartes) : seul le liseré or reste */
  .fy-proc__step .fy-proc__card { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.10); }
  .fy-proc__step.is-active .fy-proc__card { box-shadow: inset 0 0 0 1px rgba(218, 174, 81, 0.5); }
  .fy-proc__card::after { display: none; }
}
@media (max-width: 767px) {
  .fy-proc__step { flex-basis: 86vw; }
  .fy-proc__card { padding: 8px 8px 22px; border-radius: 16px; }
  .fy-proc__top { margin: -26px 14px 12px; }
  .fy-proc__ico { flex-basis: 46px; width: 46px; height: 46px; border-radius: 14px; font-size: 18px; }
  .fy-proc__title { font-size: 19px; margin-left: 14px; margin-right: 14px; }
  .fy-proc__owners { margin-left: 14px; margin-right: 14px; }
  .fy-proc__text { font-size: 15px; margin-left: 14px; margin-right: 14px; }
}

/* ---------------------------------------------------------------------
   Ordinateur (≥ 1025 px) + etapes.js : section épinglée, défilement horizontal
   --------------------------------------------------------------------- */
.fy-proc.fy-proc--h {
  width: 100vw; margin-left: calc(50% - 50vw); height: 100vh; min-height: 640px; box-sizing: border-box;
  padding: 90px 0 0; display: flex; flex-direction: column; justify-content: center; overflow: hidden;
}
.fy-proc--h .fy-proc__head { width: 100%; max-width: 1200px; margin: 0 auto 48px; padding: 0 20px; box-sizing: border-box; }
.fy-proc--h .fy-proc__hint { display: inline-flex; }
.fy-proc--h .fy-proc__viewport { width: 100%; }
.fy-proc--h .fy-proc__track {
  flex-direction: row; align-items: stretch; gap: 28px; padding: 6px calc(50vw - 205px) 30px; width: max-content;   /* marges d'une demi-largeur d'écran : la carte active est centrée */
  will-change: transform;
}
.fy-proc--h .fy-proc__step { flex: 0 0 410px; }
.fy-proc--h .fy-proc__step::before { display: none; }
.fy-proc--h .fy-proc__rail { display: none; }
.fy-proc--h .fy-proc__step .fy-proc__card { transform: scale(.96); opacity: .72; }
.fy-proc--h .fy-proc__step.is-active .fy-proc__card { transform: translateY(-8px) scale(1); opacity: 1; }
.fy-proc--h .fy-proc__card { transition: background .5s ease, box-shadow .5s ease, transform .6s cubic-bezier(.22, .61, .36, 1), opacity .5s ease; }
@media (max-height: 760px) {
  .fy-proc--h .fy-proc__head { margin-bottom: 28px; }
  .fy-proc--h .fy-proc__count { font-size: 44px; }
  .fy-proc--h .fy-proc__card { padding: 8px 8px 22px; }
  .fy-proc--h .fy-proc__media { aspect-ratio: 16 / 7; }
  .fy-proc--h .fy-proc__top { margin: -26px 16px 12px; }
}

/* mouvement réduit : pas d'épinglage (etapes.js ne l'active pas), aucune transition */
@media (prefers-reduced-motion: reduce) {
  .fy-proc__card, .fy-proc__card::before, .fy-proc__card::after, .fy-proc__ico, .fy-proc__dot, .fy-proc__step::before { transition: none !important; }
}
