/* File: assets/css/front-page.css
   Front page only (additional styles)
   Requires: assets/css/variables.css + assets/css/global.css
   IMPORTANT:
   - 100% scoped (.home-*)
   - No overrides of .badge / .card / .btn / .container / .section / .text-muted
*/

/* =========================================================
   HERO — premium app feel (background only)
   ========================================================= */
.home-hero{
  position: relative;
  padding: clamp(36px, 4.6vw, 72px) 0;
  overflow: hidden;
  background: var(--color-ivory);
  isolation: isolate;
}

/* Hero background image 16/9 (global backdrop, not inside blocks) */
.home-hero::after{
  content:"";
  position:absolute;
  inset: 0;
  background-image: url("https://loqualite.arock.fr/wp-content/uploads/2026/02/file_00000000d084724386742a4b16d15548.webp");
  background-size: cover;
  background-position: center;
  opacity: .20;
  filter: saturate(1.06) contrast(1.03);
  pointer-events:none;
  z-index: 0;
}

/* Subtle glows + vignette — ONLY page background */
.home-hero::before{
  content:"";
  position:absolute;
  inset:-45% -25% auto -25%;
  height: 820px;
  background:
    radial-gradient(1000px 380px at 12% 18%,
      color-mix(in srgb, var(--color-accent) 20%, transparent),
      transparent 60%
    ),
    radial-gradient(900px 340px at 86% 26%,
      color-mix(in srgb, var(--color-accent-3) 18%, transparent),
      transparent 62%
    ),
    radial-gradient(900px 420px at 50% 0%,
      rgba(255,255,255,.60),
      transparent 55%
    ),
    linear-gradient(180deg, rgba(11,18,32,.06), transparent 45%);
  pointer-events:none;
  z-index: 0;
}

.home-hero__inner{
  display: grid;
  grid-template-columns: 1.12fr .88fr;
  gap: clamp(18px, 3vw, 34px);
  align-items: center;
  position: relative;
  z-index: 1;
}

.home-hero__content{ min-width: 0; }
.home-hero__badge{ margin-bottom: var(--space-3); }

.home-hero__title{
  margin: 0 0 var(--space-3);
  max-width: 26ch;
}

.home-hero__lead{
  margin: 0 0 var(--space-5);
  max-width: 72ch;
}

.home-hero__actions{
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: var(--space-6);
}

.home-hero__trust{
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  align-items: center;
}

.home-hero__trustItem{
  background: var(--color-surface);
  border: 1px solid var(--color-border-ink);
  border-radius: var(--radius-pill);
  padding: 10px 14px;
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-3);
  box-shadow: var(--shadow-xs);
}

.home-hero__trustNum{
  font-family: var(--font-serif);
  color: var(--color-ink);
  font-weight: var(--fw-bold);
  font-size: 18px;
  line-height: 1;
}

.home-hero__panel{
  display: flex;
  justify-content: flex-end;
}

.home-hero__panelCard{
  width: min(470px, 100%);
  background: var(--color-surface);
  border: 1px solid var(--color-border-ink);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: clamp(14px, 2vw, 18px);
}

.home-hero__panelTop{
  display: flex;
  gap: var(--space-4);
  align-items: center;
}

.home-hero__qr{
  width: 86px;
  height: 86px;
  border-radius: var(--radius-md);
  border: 1px dashed color-mix(in srgb, var(--color-accent) 45%, transparent);
  background:
    linear-gradient(90deg,
      color-mix(in srgb, var(--color-ink) 7%, transparent),
      color-mix(in srgb, var(--color-ink) 2%, transparent)
    ),
    repeating-linear-gradient(
      0deg,
      color-mix(in srgb, var(--color-ink) 8%, transparent),
      color-mix(in srgb, var(--color-ink) 8%, transparent) 4px,
      transparent 4px,
      transparent 8px
    );
}

.home-hero__panelTitle{
  font-weight: var(--fw-semibold);
  color: var(--color-ink);
}

.home-hero__panelList{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-3);
  color: var(--color-text);
}

.home-hero__dot{
  display:inline-block;
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--color-accent) 70%, transparent);
  margin-right: 10px;
  transform: translateY(-1px);
}

.home-hero__panelFoot{
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-line);
}

/* =========================================================
   SECTION HEADERS (only width)
   ========================================================= */
.home-sectionHeader{ max-width: 72ch; }

/* =========================================================
   HOW / STEPS (classic grid ONLY if not timeline)
   ========================================================= */
.home-steps:not(.home-steps--timeline){
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

.home-step__kicker{
  font-size: var(--fs-0);
  color: color-mix(in srgb, var(--color-ink) 70%, transparent);
  font-weight: var(--fw-semibold);
  letter-spacing: .2px;
  margin-bottom: 6px;
}

.home-step__title{ margin-bottom: 8px; }

/* CTA block */
.home-how__cta{
  border: 1px solid var(--color-border-sage);
  box-shadow: var(--shadow-sm);
  background: var(--color-surface);
}

.home-how__ctaInner{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.home-how__ctaTitle{ margin: 0 0 6px; }

.home-how__ctaList{
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0 0;
  display: grid;
  gap: var(--space-3);
}

.home-how__ctaActions{
  display:flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  align-items:center;
}

/* =========================================================
   HOST / PRO
   ========================================================= */
.home-sides__grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  align-items: stretch;
}

.home-side__media{
  aspect-ratio: 16 / 9;
  overflow: hidden;
  margin-bottom: var(--space-4);
  border-radius: calc(var(--radius-md) - 2px);
}

.home-side__img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-side__title{ margin-bottom: 8px; }

.home-side__list{
  margin: var(--space-4) 0 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: var(--space-3);
}

.home-side__actions{
  margin-top: var(--space-5);
  display:flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.home-side__note{
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-line);
}

/* =========================================================
   ACCESS CTA
   ========================================================= */
.home-contact__card{
  border: 1px solid var(--color-border-sage);
  box-shadow: var(--shadow-sm);
  background: var(--color-surface);
}

.home-contact__cta{
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: var(--space-5);
  align-items: start;
}

.home-contact__ctaTitle{ margin: 0 0 8px; }

.home-contact__bullets{
  margin: var(--space-4) 0 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: var(--space-3);
}

.home-contact__note{ margin-top: var(--space-3); }

.home-contact .btn--block,
.home-contact__card .btn--block{
  width: 100%;
  justify-content: center;
}

/* =========================================================
   Responsive (global sections)
   ========================================================= */
@media (max-width: 980px){
  .home-hero__inner{ grid-template-columns: 1fr; }
  .home-hero__panel{ justify-content: flex-start; }
  .home-steps:not(.home-steps--timeline){ grid-template-columns: 1fr; }
  .home-sides__grid{ grid-template-columns: 1fr; }
  .home-contact__cta{ grid-template-columns: 1fr; }
}

/* =========================================================
   HOME – HOW / Timeline Steps (SaaS-like) — FIXED MOBILE
   Scope: .home-steps--timeline only
   ========================================================= */

.home-steps--timeline{
  --node: 58px;
  --gap: 22px;

  position: relative;
  display: grid;
  grid-template-columns: 1fr 120px 1fr 120px 1fr; /* step + arrow + step + arrow + step */
  gap: var(--gap);
  align-items: start;
  margin-top: 34px;
}

/* Ligne de fond + progress (desktop) */
.home-steps--timeline::before,
.home-steps--timeline::after{
  content:"";
  position:absolute;
  top: 30px;
  left: 4%;
  right: 4%;
  height: 2px;
  border-radius: 999px;
  pointer-events:none;
}

.home-steps--timeline::before{
  background: rgba(0,0,0,.08);
  z-index: 0;
}

.home-steps--timeline::after{
  background: rgba(0,0,0,.18);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 900ms cubic-bezier(.2,.8,.2,1);
  z-index: 0;
}

.home-steps--timeline.is-inview::after{
  transform: scaleX(1);
}

/* Step cards (desktop) */
.home-steps--timeline .home-step{
  position: relative;
  text-align: center;
  padding-top: 64px;
  overflow: visible;

  transform: translateY(14px);
  opacity: 0;
  transition:
    transform 700ms cubic-bezier(.2,.8,.2,1),
    opacity 700ms ease;
  will-change: transform, opacity;
}

.home-steps--timeline .home-step.is-visible{
  transform: translateY(0);
  opacity: 1;
}

/* Node (rond + halo) */
.home-steps--timeline .home-step__node{
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: var(--node);
  height: var(--node);
  border-radius: 999px;
  background: var(--color-primary, #111827);
  display: grid;
  place-items: center;
  z-index: 2;
  box-shadow: 0 10px 22px rgba(0,0,0,.10);
}

.home-steps--timeline .home-step__node::after{
  content:"";
  position:absolute;
  inset:-7px;
  border-radius:999px;
  background:#fff;
  z-index:-1;
}

.home-steps--timeline .home-step__num{
  color:#fff;
  font-weight: 900;
  font-size: 20px;
  line-height: 1;
}

/* Arrow SVG */
.home-steps--timeline .home-step__arrow{
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 14px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 600ms ease, transform 600ms cubic-bezier(.2,.8,.2,1);
  will-change: transform, opacity;
}

.home-steps--timeline .home-step__arrow svg{
  width: 120px;
  height: 24px;
  display: block;
}

.home-steps--timeline.is-inview .home-step__arrow{
  opacity: 1;
  transform: translateY(0);
}

.home-steps--timeline .home-step p{
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

/* =========================================================
   Tablet: 2 colonnes -> pas de ligne / pas de flèches
   ========================================================= */
@media (max-width: 980px){
  .home-steps--timeline{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-steps--timeline::before,
  .home-steps--timeline::after{
    display: none;
  }

  .home-steps--timeline .home-step__arrow{
    display: none;
  }

  .home-steps--timeline .home-step{
    text-align: left;
    padding-top: 64px;
  }
}

/* =========================================================
   Mobile: 1 colonne -> layout GRID (node | content) FIX
   ========================================================= */
@media (max-width: 640px){
  .home-steps--timeline{
    --node: 52px;
    --rail-x: 30px; /* centre de la colonne node */

    grid-template-columns: 1fr;
    gap: 16px;

    /* IMPORTANT: on réserve une vraie colonne node */
    padding-left: 0;
  }

  /* Rail vertical (fond + progress) */
  .home-steps--timeline::before,
  .home-steps--timeline::after{
    display: block;
    top: 10px;
    left: var(--rail-x);
    right: auto;
    width: 2px;
    height: calc(100% - 10px);
    border-radius: 999px;
  }

  .home-steps--timeline::after{
    transform-origin: top center;
    transform: scaleY(0);
  }

  .home-steps--timeline.is-inview::after{
    transform: scaleY(1);
  }

  /* On supprime flèches horizontales */
  .home-steps--timeline .home-step__arrow{ display: none; }

  /* Step devient un grid : node | contenu */
  .home-steps--timeline .home-step{
    display: grid;
    grid-template-columns: 64px 1fr; /* node col + content col */
    column-gap: 14px;

    text-align: left;
    padding-top: 14px; /* plus besoin de 64px */
    padding-left: 0;
  }

  /* Node repasse en flow (plus d’absolute => plus de débordement) */
  .home-steps--timeline .home-step__node{
    position: relative;
    top: auto;
    left: auto;
    transform: none;

    width: var(--node);
    height: var(--node);
    margin-left: calc(var(--rail-x) - (var(--node) / 2));
  }

  /* Halo réduit légèrement pour éviter tout overflow sur petits écrans */
  .home-steps--timeline .home-step__node::after{
    inset: -6px;
  }

  /* Contenu dans la 2e colonne */
  .home-steps--timeline .home-step__kicker,
  .home-steps--timeline .home-step__title,
  .home-steps--timeline .home-step p{
    grid-column: 2;
  }

  .home-steps--timeline .home-step p{
    max-width: 100%;
    margin: 0;
  }

  /* Petite flèche bas entre steps (alignée sur le rail) */
  .home-steps--timeline .home-step:not(:last-of-type)::after{
    content:"";
    position:absolute;
    left: var(--rail-x);
    top: calc(14px + var(--node) + 10px);
    width: 12px;
    height: 12px;
    transform: translateX(-50%) rotate(45deg);
    border-right: 2px solid rgba(0,0,0,.14);
    border-bottom: 2px solid rgba(0,0,0,.14);
    opacity: 0;
    transition: opacity 600ms ease;
  }

  .home-steps--timeline.is-inview .home-step:not(:last-of-type)::after{
    opacity: 1;
  }
}

/* Accessibilité: réduit les animations si demandé */
@media (prefers-reduced-motion: reduce){
  .home-steps--timeline::after,
  .home-steps--timeline .home-step,
  .home-steps--timeline .home-step__arrow{
    transition: none !important;
  }
}


