/* ============================================================
   pages/home.css — Studio Balesi · Accueil
   Le hero "horizon" est la signature de la marque :
   couches parallaxes qui se rapprochent au scroll.
   ============================================================ */

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
  background: var(--navy-950);
  overflow: hidden;
  isolation: isolate;
}

/* --- Le décor : toutes les couches parallaxes --- */
/* --p (brut) et --e (adouci) sont posés par le JS sur .hero,
   pour que le décor ET l'indicateur de scroll en héritent. */
.horizon {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

/* Wrapper qui reçoit la parallaxe souris (desktop) + le fondu de sortie */
.horizon__scene {
  position: absolute;
  inset: -4%;
  opacity: var(--fade, 1);
  transform: translate3d(
    calc(var(--mx, 0) * 14px),
    calc(var(--my, 0) * 10px),
    0
  );
  transition: transform 0.9s var(--ease-out);
}

/* Ciel : dégradé nuit → aube bleue vers l'horizon */
.horizon__sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 80% at 50% 96%, rgba(46, 155, 255, 0.30) 0%, transparent 58%),
    radial-gradient(90% 60% at 50% 100%, rgba(99, 180, 255, 0.22) 0%, transparent 55%),
    linear-gradient(180deg, #04070F 0%, #060B18 32%, #0A1226 62%, #101E3E 100%);
}

/* Étoiles — deux couches SVG tuilées, tailles différentes = profondeur */
.horizon__stars {
  position: absolute;
  inset: -10%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='700' height='700'%3E%3Cg fill='%23ffffff'%3E%3Ccircle cx='58' cy='92' r='1.1' opacity='.9'/%3E%3Ccircle cx='214' cy='46' r='.8' opacity='.6'/%3E%3Ccircle cx='362' cy='128' r='1.3' opacity='.85'/%3E%3Ccircle cx='508' cy='72' r='.9' opacity='.55'/%3E%3Ccircle cx='648' cy='158' r='1' opacity='.75'/%3E%3Ccircle cx='96' cy='268' r='.8' opacity='.5'/%3E%3Ccircle cx='276' cy='222' r='1.2' opacity='.8'/%3E%3Ccircle cx='432' cy='306' r='.85' opacity='.6'/%3E%3Ccircle cx='592' cy='248' r='1.1' opacity='.7'/%3E%3Ccircle cx='142' cy='412' r='1' opacity='.65'/%3E%3Ccircle cx='330' cy='464' r='.8' opacity='.45'/%3E%3Ccircle cx='486' cy='398' r='1.15' opacity='.75'/%3E%3Ccircle cx='664' cy='452' r='.9' opacity='.55'/%3E%3Ccircle cx='40' cy='560' r='1.05' opacity='.6'/%3E%3Ccircle cx='232' cy='604' r='.85' opacity='.5'/%3E%3Ccircle cx='398' cy='548' r='1' opacity='.7'/%3E%3Ccircle cx='560' cy='632' r='.8' opacity='.45'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 700px 700px;
  opacity: 0.85;
}
.horizon__stars--far {
  background-size: 420px 420px;
  opacity: 0.4;
  filter: blur(0.4px);
}

/* Le soleil / halo qui se lève à l'horizon */
.horizon__sun {
  position: absolute;
  left: 50%;
  bottom: 16%;
  width: min(52vw, 620px);
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(168, 211, 255, 0.55) 0%,
    rgba(46, 155, 255, 0.32) 34%,
    rgba(30, 127, 224, 0.12) 56%,
    transparent 70%
  );
  filter: blur(6px);
}

/* L'ARC — motif direct du logo, en très grand */
.horizon__arc {
  position: absolute;
  left: 50%;
  bottom: 20%;
  width: min(120vw, 1500px);
  transform: translateX(-50%);
  opacity: 0.85;
}
.horizon__arc path { fill: url(#arcGrad); }

/* Crêtes — 3 plans de profondeur */
.horizon__ridge {
  position: absolute;
  left: -5%;
  bottom: 0;
  width: 110%;
  height: auto;
}
.horizon__ridge--far  { fill: #16213E; opacity: 0.85; bottom: 8%; }
.horizon__ridge--mid  { fill: #101A33; bottom: 3%; }
.horizon__ridge--near { fill: #060B18; bottom: -1%; }

/* Ligne d'horizon lumineuse */
.horizon__line {
  position: absolute;
  left: 0; right: 0;
  bottom: 26%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 180, 255, 0.55) 35%, rgba(168, 211, 255, 0.75) 50%, rgba(99, 180, 255, 0.55) 65%, transparent);
  /* Suit la courbe adoucie : la ligne tient, puis s'efface avec le décor */
  opacity: calc(1 - var(--e, 0) * 1.4);
}

/* Le grain est désormais global (voir design-system.css) : il couvre
   le hero comme le reste de la page, sans disparaître avec le décor. */

/* Fondu vers la page claire en bas du hero */
.horizon__veil {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 22vh;
  background: linear-gradient(180deg, transparent, var(--navy-950) 78%);
}

/* --- Contenu du hero --- */
.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-block: clamp(3rem, 8vh, 7rem);
}
.hero__inner { max-width: 900px; }

.hero h1 { color: var(--white); margin-bottom: 1.75rem; }
.hero h1 .grad {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__sub {
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: rgba(234, 241, 251, 0.72);
  max-width: 56ch;
  margin-bottom: 2.5rem;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 0.875rem; }

/* Le hero est sombre sans porter .is-dark : le bouton secondaire
   reprend ici la variante claire, sinon il disparaît dans le fond. */
.hero .btn--ghost { --btn-fg: var(--on-dark); border-color: var(--on-dark-line); }
.hero .btn--ghost:hover { background: var(--white); color: var(--navy-900); border-color: var(--white); }

/* Bandeau de réassurance sous les CTA */
.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--on-dark-line);
}
.hero__trust-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: var(--fs-sm);
  color: rgba(234, 241, 251, 0.8);
}
.hero__trust-item strong { color: var(--white); font-weight: 600; }
.hero__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--blue-400);
  box-shadow: 0 0 0 4px rgba(46, 155, 255, 0.16);
  flex-shrink: 0;
}

/* Les cartes d'expertise (.expertise-card, --ai, .badge) servent aussi
   aux pages internes : elles vivent dans components.css. */

/* ============================================================
   MÉTHODE — timeline horizontale
   ============================================================ */
.steps { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.steps::before {
  content: '';
  position: absolute;
  top: 26px; left: 0; right: 0;
  height: 1px;
  background: var(--line-2);
}
@media (max-width: 900px) {
  .steps { grid-template-columns: repeat(2, 1fr); gap: 2.5rem 1.5rem; }
  .steps::before { display: none; }
}
@media (max-width: 540px) { .steps { grid-template-columns: 1fr; } }

.step { position: relative; padding-top: 0; }
.step__dot {
  position: relative;
  z-index: 1;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--line-2);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--blue-600);
  margin-bottom: 1.5rem;
  transition: background 0.35s var(--ease-out), color 0.35s, border-color 0.35s, transform 0.35s var(--ease-out);
}
.step:hover .step__dot {
  background: var(--grad-cta);
  color: var(--white);
  border-color: transparent;
  transform: scale(1.08);
}
.step h3 { font-size: 1.125rem; margin-bottom: 0.5rem; }
.step p { font-size: var(--fs-sm); }

/* ============================================================
   RÉALISATIONS
   ============================================================ */
.work-card { padding: 0; overflow: hidden; }
.work-card__thumb {
  aspect-ratio: 4 / 3;
  background: var(--paper-2);
  display: grid;
  place-items: center;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  transition: background 0.45s var(--ease-out);
}
.work-card:hover .work-card__thumb { background: var(--blue-050); }
.work-card__thumb img {
  max-width: 72%;
  max-height: 72%;
  width: auto; height: auto;
  object-fit: contain;
  transition: transform 0.55s var(--ease-out);
}
.work-card:hover .work-card__thumb img { transform: scale(1.05); }
.work-card__body { padding: 1.75rem 1.75rem 2rem; }
.work-card__tags {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-600);
  margin-bottom: 0.75rem;
}
.work-card h3 { font-size: 1.375rem; margin-bottom: 0.6rem; }
.work-card p { font-size: var(--fs-sm); }

/* La bande de chiffres (.stats-band, .stats, .stat) sert aussi aux
   pages Réalisations et L'agence : elle vit dans components.css. */

/* Des preuves plus proches, un décor stable et des visuels réels. */
.hero { min-height: min(850px, 100svh); }
.hero h1 { font-size: clamp(2.35rem, 5.5vw, 4.5rem); }
.horizon__stars--far, .horizon__ridge--far, .horizon__ridge--mid { display: none; }
.horizon__scene { transform: none; transition: none; }
.work-card__thumb--capture { position: relative; padding: 0; aspect-ratio: 16 / 10; overflow: hidden; }
.work-card__thumb--capture img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; object-position: top; }
.horizon__arc { bottom: 9%; opacity: .35; }
.horizon__sun { bottom: 0; opacity: .45; }
.work-card:hover .work-card__thumb img { transform: none; }
.step:hover .step__dot { transform: none; }
@media (max-width: 540px) {
  .hero { min-height: auto; }
  .hero__content { padding-block: 3rem 4rem; }
  .hero__trust { gap: .75rem; }
  .steps { gap: 1.75rem; }
  .step { padding-left: 4rem; }
  .step__dot { position: absolute; left: 0; top: 0; width: 42px; height: 42px; }
  .steps::before { display: block; left: 21px; top: 0; bottom: 0; width: 1px; height: auto; right: auto; }
}

/* ============================================================
   MOUVEMENT — deux animations sobres (audit du 20/11/2026)
   Le texte ne dépend jamais d'elles. Avec prefers-reduced-motion,
   la règle globale de components.css les coupe : on voit alors
   directement l'état final.
   ============================================================ */

/* M1 — l'arc de l'horizon se lève une fois, au chargement */
.horizon__arc {
  transform-origin: center bottom;
  animation: arc-rise 0.9s var(--ease-out) both;
}
@keyframes arc-rise {
  from { opacity: 0; transform: translateX(-50%) translateY(24px) scaleY(0.82); }
}

/* M2 — la ligne de la méthode se trace à l'entrée dans la fenêtre.
   Sans JavaScript, la ligne est pleine et les pastilles allumées. */
.steps::after {
  content: '';
  position: absolute;
  top: 25px; left: 0; right: 0;
  height: 2px;
  background: var(--grad-arc);
  transform-origin: left center;
}
.step__dot { border-color: var(--blue-400); }
.steps.is-armed::after { transform: scaleX(0); }
.steps.is-armed .step__dot { border-color: var(--line-2); }
.steps.is-armed.is-inview::after { transform: scaleX(1); transition: transform 1.6s var(--ease-out); }
.steps.is-armed.is-inview .step__dot { border-color: var(--blue-400); }
.steps.is-armed.is-inview .step:nth-child(2) .step__dot { transition-delay: 0.4s; }
.steps.is-armed.is-inview .step:nth-child(3) .step__dot { transition-delay: 0.8s; }
.steps.is-armed.is-inview .step:nth-child(4) .step__dot { transition-delay: 1.2s; }
@media (max-width: 900px) { .steps::after { display: none; } }
/* Sous 540 px la méthode est verticale : la ligne se trace de haut en bas */
@media (max-width: 540px) {
  .steps::after { display: block; left: 20.5px; top: 0; bottom: 0; right: auto; width: 2px; height: auto; transform-origin: center top; }
  .steps.is-armed::after { transform: scaleY(0); }
  .steps.is-armed.is-inview::after { transform: scaleY(1); }
}
