/* ==========================================================================
   FlashFit — page d'accueil
   Sections propres à l'accueil ; le socle vient de /assets/commun/commun.css
   Animations : entrée de la bannière, bandeau défilant, apparitions en
   cascade (.stagger), produit phare flottant, ligne des étapes. Elles sont
   coupées si le visiteur a demandé moins d'animations (prefers-reduced-motion).
   ========================================================================== */

/* ==========================================================================
   0 — OUTILS D'ANIMATION
   ========================================================================== */
@keyframes rise     { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes line-up  { from { transform: translateY(110%); } to { transform: none; } }
@keyframes zoom-out { from { transform: scale(1.14); } to { transform: scale(1); } }
@keyframes float    { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes glow     { from { opacity: .5; transform: scale(.9); } to { opacity: 1; transform: scale(1.06); } }
@keyframes marquee  { to { transform: translateX(-50%); } }

/* Cascade : la liste .stagger.reveal reste en place, ses éléments
   apparaissent un par un quand elle entre à l'écran (ou sont recréés). */
.js .stagger.reveal { opacity: 1; transform: none; }
.js .stagger:not(.is-in) > * { opacity: 0; }
.js .stagger.is-in > * { animation: rise .7s var(--ease) calc(var(--i, 0) * 90ms) both; }
.stagger > :nth-child(2) { --i: 1; }
.stagger > :nth-child(3) { --i: 2; }
.stagger > :nth-child(4) { --i: 3; }
.stagger > :nth-child(5) { --i: 4; }
.stagger > :nth-child(6) { --i: 5; }
.stagger > :nth-child(7) { --i: 6; }
.stagger > :nth-child(8) { --i: 7; }

/* Flèche qui glisse au survol des boutons */
.btn-arrow svg {
  width: 16px; height: 16px;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .2s var(--ease);
}
.btn-arrow:hover svg { transform: translateX(4px); }

/* En-têtes de section */
.sec-head { margin-bottom: 32px; }
.sec-head--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 24px;
}
.sec-head--center { text-align: center; }

/* ==========================================================================
   1 — BANNIÈRE
   ========================================================================== */
.hero {
  position: relative;
  min-height: clamp(560px, 88vh, 780px);
  display: grid;
  place-items: center;
  text-align: center;
  background: var(--ink);
  isolation: isolate;
  overflow: hidden;
}

.hero__img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
  animation: zoom-out 14s cubic-bezier(.16, 1, .3, 1) both;
}

.hero::before {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(70% 60% at 50% 45%, rgba(8,16,28,.25), rgba(8,16,28,.6)),
    linear-gradient(180deg, rgba(8,16,28,.55) 0%, rgba(8,16,28,.35) 45%, rgba(8,16,28,.8) 100%);
}

.hero__inner { padding-block: clamp(64px, 9vw, 112px); max-width: 1040px; }

.hero__eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255,255,255,.88);
  margin: 0 0 20px;
  animation: rise .8s var(--ease) .1s both;
}

.hero__title {
  font-family: 'Sora', system-ui, sans-serif;
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -.035em;
  color: #fff;
  margin: 0 0 20px;
  text-shadow: 0 2px 30px rgba(0,0,0,.25);
}
/* Chaque ligne glisse vers le haut depuis un cache */
.hero__line { display: block; overflow: hidden; padding-bottom: .08em; }
.hero__line > span { display: inline-block; text-wrap: balance; animation: line-up .9s var(--ease) both; }
.hero__line:nth-child(1) > span { animation-delay: .15s; }
.hero__line:nth-child(2) > span { animation-delay: .3s; color: var(--blue-light); }

.hero__lede {
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.7;
  color: rgba(255,255,255,.9);
  max-width: 50ch;
  margin: 0 auto 32px;
  animation: rise .8s var(--ease) .5s both;
}

.hero__actions {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 12px;
  animation: rise .8s var(--ease) .65s both;
}
.hero__actions .ff-btn { padding: 15px 30px; font-size: 14px; }

/* Bouton secondaire sur fond photo */
.hero__ghost { background: transparent; border-color: rgba(255,255,255,.7); }
.hero__ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; box-shadow: none; }

/* Garanties sous les boutons */
.hero__proof {
  list-style: none;
  margin: 28px 0 0; padding: 0;
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 8px 22px;
  font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,.92);
  animation: rise .8s var(--ease) .8s both;
}
.hero__proof li { display: inline-flex; align-items: center; gap: 7px; }
.hero__proof svg {
  width: 16px; height: 16px;
  stroke: var(--blue-light); fill: none;
  stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
}

@media (max-width: 767px) {
  /* L'en-tête transparent se pose sur la photo (voir navbar.css) : la
     bannière remonte tout en haut et réserve la hauteur du header */
  body.has-hero { padding-top: 0 !important; }
  body.has-hero .hero {
    min-height: 640px;
    padding-top: var(--site-header-height);
  }
  .hero__actions .ff-btn { width: 100%; }
}

/* ==========================================================================
   2 — BANDEAU DE RÉASSURANCE DÉFILANT
   ========================================================================== */
.marquee {
  position: relative;
  background: var(--ink);
  color: #fff;
  border-top: 1px solid rgba(255,255,255,.08);
  overflow: hidden;
}

.marquee__track { display: flex; width: max-content; }
.js .marquee__track { animation: marquee 38s linear infinite; }
.marquee:hover .marquee__track,
.marquee:focus-within .marquee__track,
.marquee.is-paused .marquee__track { animation-play-state: paused; }

.marquee__list {
  list-style: none;
  margin: 0;
  padding: 16px 48px 16px 0;
  display: flex; align-items: center; gap: 48px;
}
.marquee__list li {
  display: inline-flex; align-items: center; gap: 10px;
  white-space: nowrap;
  font-size: 13.5px; font-weight: 500;
}
.marquee__list svg {
  width: 19px; height: 19px;
  stroke: var(--blue-light); fill: none;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}

/* Bouton pause / lecture */
.marquee__toggle {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 56px;
  display: grid; place-items: center;
  padding: 0 0 0 14px;
  background: linear-gradient(90deg, rgba(10,22,40,0), var(--ink) 45%);
  border: 0;
  color: rgba(255,255,255,.85);
  cursor: pointer;
}
.marquee__toggle:hover { color: #fff; }
.marquee__toggle svg { width: 14px; height: 14px; fill: currentColor; }
.marquee__toggle .i-play,
.marquee.is-paused .i-pause { display: none; }
.marquee.is-paused .i-play { display: block; }

/* ==========================================================================
   3 — CATÉGORIES (tuiles photo)
   ========================================================================== */
.cats {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (min-width: 1024px) { .cats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }

.cat {
  position: relative;
  display: flex;
  align-items: flex-end;
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  overflow: hidden;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  isolation: isolate;
}
@media (min-width: 1024px) { .cat { aspect-ratio: 3 / 4; } }

.cat__img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.cat::before {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(8,16,28,0) 30%, rgba(8,16,28,.88) 100%);
}
.cat:hover .cat__img,
.cat:focus-visible .cat__img { transform: scale(1.07); }

.cat__body { display: grid; gap: 4px; width: 100%; padding: clamp(14px, 2vw, 22px); }
.cat__goal {
  font-size: 10.5px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.88);
}
.cat__name {
  font-family: 'Sora', system-ui, sans-serif;
  font-size: clamp(17px, 2vw, 23px);
  font-weight: 700;
  letter-spacing: -.02em;
  color: #fff;
  margin: 0;
}
.cat__meta {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 6px;
  font-size: 12.5px; font-weight: 600;
}
.cat__meta svg {
  width: 15px; height: 15px;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .25s var(--ease);
}
.cat:hover .cat__meta svg { transform: translateX(5px); }

/* ==========================================================================
   4 — PRODUIT PHARE (fond sombre)
   ========================================================================== */
.spot {
  position: relative;
  padding-block: var(--section-y);
  background:
    radial-gradient(55% 65% at 22% 50%, rgba(29,78,216,.42), rgba(29,78,216,0) 70%),
    var(--ink);
  color: rgba(255,255,255,.84);
  overflow: hidden;
}

.spot__inner { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) {
  .spot__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(48px, 6vw, 96px); }
}

/* Visuel : halo lumineux qui respire + cadre qui flotte */
.spot__media { position: relative; width: 100%; max-width: 500px; margin-inline: auto; }
.spot__media::before {
  content: '';
  position: absolute; inset: 6%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(96,165,250,.6), rgba(96,165,250,0) 70%);
  filter: blur(28px);
  animation: glow 4s ease-in-out infinite alternate;
}
.spot__frame {
  position: relative;
  display: block;
  aspect-ratio: 1;
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.7);
  animation: float 6s ease-in-out infinite;
}
.spot__frame img { width: 100%; height: 100%; object-fit: contain; }
.spot__sk { position: relative; aspect-ratio: 1; border-radius: 20px; background: rgba(255,255,255,.08); animation: ff-sk 1.2s infinite; }

.spot__kicker {
  font-size: 11px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--blue-light);
  margin: 0 0 12px;
}
.spot__name {
  font-family: 'Sora', system-ui, sans-serif;
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.03em;
  color: #fff;
  margin: 0 0 18px;
  text-wrap: balance;
}
.spot__desc { font-size: 15px; line-height: 1.75; max-width: 54ch; margin: 0 0 22px; }

.spot__features { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 11px; }
.spot__features li { display: flex; align-items: flex-start; gap: 11px; font-size: 14px; color: #fff; }
.spot__features li::before {
  content: '';
  flex-shrink: 0;
  width: 19px; height: 19px;
  margin-top: 1px;
  border-radius: 50%;
  background: rgba(96,165,250,.2) center / 11px no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2360A5FA' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}

.spot__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; margin: 0 0 24px; }
.spot__price .now { font-family: 'Sora', system-ui, sans-serif; font-size: 32px; font-weight: 700; color: #fff; letter-spacing: -.02em; }
.spot__price .was { font-size: 16px; color: rgba(255,255,255,.65); text-decoration: line-through; }

.spot__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.spot__actions .ff-btn { padding: 16px 32px; font-size: 14px; }
.spot__buy.is-done { background: #15803D; color: #fff; }
.spot__more { background: transparent; border-color: rgba(255,255,255,.55); }
.spot__more:hover { background: rgba(255,255,255,.1); border-color: #fff; box-shadow: none; }

.spot__ship {
  display: flex; align-items: center; gap: 8px;
  margin: 18px 0 0;
  font-size: 13px; font-weight: 500;
  color: var(--blue-light);
}
.spot__ship svg {
  width: 18px; height: 18px;
  stroke: currentColor; fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

@media (max-width: 559px) { .spot__actions .ff-btn { width: 100%; } }

/* ==========================================================================
   5 — PRODUITS (onglets + achat rapide)
   ========================================================================== */
.tabs {
  display: flex;
  gap: 8px;
  margin: 0 calc(var(--gutter) * -1) 24px;
  padding: 2px var(--gutter);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.prods { list-style: none; margin: 0; padding: 0; }
.prods__item { display: flex; flex-direction: column; gap: 8px; }
.prods__item .ff-pcard { flex: 1; }

.prods__more { text-align: center; margin: 36px 0 0; }

/* ==========================================================================
   6 — COMMANDER EN TOUTE SÉRÉNITÉ (étapes reliées par une ligne)
   ========================================================================== */
.steps {
  position: relative;
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: 28px;
}

/* Ligne de progression : verticale sur mobile, horizontale sur ordinateur.
   Elle se trace quand la liste entre à l'écran. */
.steps::before {
  content: '';
  position: absolute;
  top: 28px; bottom: 28px; left: 27px;
  width: 2px;
  background: linear-gradient(180deg, var(--blue), var(--blue-light));
  transform-origin: top;
  transition: transform 1.4s var(--ease) .2s;
}
.js .steps:not(.is-in)::before { transform: scaleY(0); }

.step { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 0 18px; }

.step__icon {
  position: relative;
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--blue-wash);
  color: var(--blue);
  box-shadow: 0 0 0 6px var(--surface);
}
.step__icon svg {
  width: 24px; height: 24px;
  stroke: currentColor; fill: none;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.step__n {
  position: absolute; top: -4px; right: -4px;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 11px; font-weight: 700;
}

.step h3 { font-size: 16px; color: var(--ink-soft); margin: 4px 0 6px; }
.step p { font-size: 13.5px; line-height: 1.7; color: var(--body); margin: 0; }
.step a { color: var(--blue); text-underline-offset: 2px; }

@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
  .steps::before {
    top: 27px; bottom: auto; left: 28px; right: 28px;
    width: auto; height: 2px;
    background: linear-gradient(90deg, var(--blue), var(--blue-light));
    transform-origin: left;
  }
  .js .steps:not(.is-in)::before { transform: scaleX(0); }
  .step { grid-template-columns: 1fr; gap: 16px; }
}

/* ==========================================================================
   7 — AVIS CLIENTS (cartes .ff-review de commun.css)
   ========================================================================== */
.home-rev__summary { font-size: 14px; font-weight: 600; color: var(--ink-soft); margin: 10px 0 0; }
.home-rev__grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 768px) { .home-rev__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ==========================================================================
   8 — FAQ COURTE
   ========================================================================== */
.home-faq__more { text-align: center; margin: 32px 0 0; }

/* ==========================================================================
   9 — APPEL FINAL
   ========================================================================== */
.final { min-height: clamp(380px, 42vw, 520px); }
.final h2 { font-size: clamp(26px, 3.4vw, 42px); text-wrap: balance; }

/* ==========================================================================
   ANIMATIONS RÉDUITES : tout s'affiche directement, rien ne bouge en boucle
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .hero__img, .hero__eyebrow, .hero__line > span, .hero__lede, .hero__actions, .hero__proof,
  .spot__media::before, .spot__frame { animation: none; }

  .js .marquee__track { animation: none; width: auto; justify-content: center; }
  .marquee__list { flex-wrap: wrap; justify-content: center; gap: 10px 28px; padding: 14px var(--gutter); }
  .marquee__list[aria-hidden="true"], .marquee__toggle { display: none; }
}
