/* ============================================================
   GLOBAL ESSOR — ANIMATION 3D DU HERO (page d'accueil)
   Visuel orbital "ge-scene" : 5 cartes (Croissance, Site web,
   SEO local, Automatisation IA, Performance) qui flottent en
   orbite autour d'un noyau lumineux, reliées par des lignes
   animées.
============================================================ */

/* OVERFLOW & BACKGROUND */
.hero,
.hero-inner,
.hero-text,
.hero-visual,
.ge-scene,
.ge-stage,
.ge-orbit {
  overflow: visible;
}

/* ============================================================
   HERO — scroll reveal séquencé (rejouable à chaque passage)
============================================================ */
@media (prefers-reduced-motion: no-preference) {

  .hero .hero-label-pill,
  .hero-text h1,
  .hero .hero-sub,
  .hero-btns .btn-hero-primary,
  .hero-btns .btn-hero-note,
  .hero-visual {
    opacity: 0;
    transform: translateY(28px);
    filter: blur(8px);
    transition:
      opacity   0.85s cubic-bezier(0.16, 1, 0.3, 1),
      transform 0.95s cubic-bezier(0.16, 1, 0.3, 1),
      filter    0.85s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform, filter;
  }

  /* Titre : translation + micro-scale pour plus de présence */
  .hero-text h1 {
    transform: translateY(36px) scale(0.98);
    transform-origin: 0% 50%;
  }

  /* CTA : pop-in avec léger scale pour un effet "settling" */
  .hero-btns .btn-hero-primary,
  .hero-btns .btn-hero-note {
    transform: translateY(20px) scale(0.96);
  }

  /* Colonne droite : entrée latérale subtile */
  .hero-visual {
    transform: translateX(32px);
  }

  /* État révélé — déclenché par .hero.is-revealed (ajouté en JS) */
  .hero.is-revealed .hero-label-pill,
  .hero.is-revealed .hero-text h1,
  .hero.is-revealed .hero-sub,
  .hero.is-revealed .hero-btns .btn-hero-primary,
  .hero.is-revealed .hero-btns .btn-hero-note,
  .hero.is-revealed .hero-visual {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }

  /* Stagger — ordre d'apparition cinématique */
  .hero.is-revealed .hero-label-pill                   { transition-delay: 0.05s; }
  .hero.is-revealed .hero-visual                       { transition-delay: 0.20s; }
  .hero.is-revealed .hero-text h1                      { transition-delay: 0.18s; }
  .hero.is-revealed .hero-sub                          { transition-delay: 0.40s; }
  .hero.is-revealed .hero-btns .btn-hero-primary       { transition-delay: 0.58s; }
  .hero.is-revealed .hero-btns .btn-hero-note          { transition-delay: 0.70s; }
}

/* ── LAYOUT 2 COLONNES (desktop) ── */
@media (min-width: 821px) {
  .hero-inner {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    column-gap: 40px;
    align-items: center;
  }
  .hero-visual {
    height: auto;
    padding-left: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
  }
  .hero-text {
    position: relative;
    z-index: 2;
    top: -32px;
  }
}

/* ── MOBILE : visuel en pleine largeur sous le texte ── */
@media (max-width: 820px) {
  .hero-visual {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    height: auto;
    display: flex;
    justify-content: center;
  }
  .ge-scene {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
  }
  .ge-stage { aspect-ratio: 1.9 / 1; }
  .ge-card {
    width: 118px;
    height: 82px;
    margin-left: -59px;
    margin-top: -41px;
  }
  .ge-card__surface { padding: 7px 9px; gap: 2.5px; border-radius: 13px; }
  .ge-card__title { font-size: 10.5px; }
  .ge-card__label { font-size: 6.5px; letter-spacing: 0.1em; }
  .ge-code { font-size: 6.5px; gap: 1.5px; line-height: 1.35; }
}

@media (max-width: 480px) {
  .ge-stage { aspect-ratio: 1.7 / 1; }
  .ge-card {
    width: 106px;
    height: 74px;
    margin-left: -53px;
    margin-top: -37px;
  }
  .ge-card__surface { padding: 6px 8px; gap: 2px; }
  .ge-card__title { font-size: 9.5px; }
  .ge-card__label { font-size: 6px; }
  .ge-code { font-size: 6px; }
}

/* ============================================================
   VISUEL 3D — base
============================================================ */
.ge-scene *,
.ge-scene *::before,
.ge-scene *::after { box-sizing: border-box; }

.ge-scene {
  --blue:        var(--color-blue);
  --blue-deep:   #0B1B2B;
  --blue-bright: var(--color-blue-bright);
  position: relative;
  width: 100%;
  height: auto;
  display: block;
  isolation: isolate;
  font-family: "DM Sans", "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.ge-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1.4 / 1;
  perspective: 1400px;
  perspective-origin: 50% 50%;
  z-index: 1;
}

.ge-orbit {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.ge-core {
  position: absolute;
  top: 50%; left: 50%;
  width: 28%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle,
      rgba(47, 123, 255, 0.35) 0%,
      rgba(var(--color-blue-rgb), 0.18) 30%,
      transparent 70%);
  filter: blur(24px);
  z-index: 0;
  pointer-events: none;
  animation: ge-core-pulse 7s ease-in-out infinite;
}

.ge-core::after {
  content: "";
  position: absolute;
  inset: 30%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 123, 255, 0.5) 0%, transparent 70%);
  filter: blur(8px);
  animation: ge-core-pulse 5s ease-in-out infinite reverse;
}

@keyframes ge-core-pulse {
  0%, 100% { opacity: 0.7; transform: translate(-50%, -50%) scale(1);    }
  50%      { opacity: 1;   transform: translate(-50%, -50%) scale(1.15); }
}

.ge-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  animation: ge-lines-fade 1.6s ease-out 1.4s forwards;
  overflow: visible;
}

@keyframes ge-lines-fade { to { opacity: 1; } }

.ge-lines path {
  fill: none;
  stroke: url(#ge-line-gradient);
  stroke-width: 1;
  stroke-linecap: round;
  filter: url(#ge-line-glow);
}

.ge-card {
  position: absolute;
  top: 50%; left: 50%;
  width: 188px;
  height: 132px;
  margin-left: -94px;
  margin-top: -66px;
  transform-style: preserve-3d;
  pointer-events: none;
  opacity: 0;
  will-change: transform, opacity;
}

.ge-card.is-revealed {
  animation: ge-card-fade 1.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes ge-card-fade { to { opacity: 1; } }

.ge-card__surface {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  overflow: hidden;
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background:
    linear-gradient(135deg,
      rgba(255, 255, 255, 0.92) 0%,
      rgba(255, 255, 255, 0.78) 100%);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 30px 60px -20px rgba(var(--color-blue-rgb), 0.20),
    0 12px 24px -8px rgba(11, 27, 43, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 0 rgba(var(--color-blue-rgb), 0.06);
}

.ge-card__surface::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 60%;
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

.ge-card__surface::after {
  content: "";
  position: absolute;
  top: -50%; left: -100%;
  width: 60%; height: 200%;
  background: linear-gradient(115deg,
    transparent 0%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 100%);
  pointer-events: none;
  animation: ge-shimmer 11s ease-in-out infinite;
}

.ge-card:nth-child(2) .ge-card__surface::after { animation-delay: 2s; }
.ge-card:nth-child(3) .ge-card__surface::after { animation-delay: 4s; }
.ge-card:nth-child(4) .ge-card__surface::after { animation-delay: 6s; }
.ge-card:nth-child(5) .ge-card__surface::after { animation-delay: 8s; }

@keyframes ge-shimmer {
  0%, 80%, 100% { transform: translateX(0);    opacity: 0; }
  87%           { opacity: 0.7; }
  93%           { transform: translateX(420%); opacity: 0; }
}

.ge-card__label {
  position: relative;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  z-index: 1;
  margin: 0;
  line-height: 1;
}

.ge-card__title {
  position: relative;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--blue-deep);
  z-index: 1;
  margin: 0;
  line-height: 1.1;
  margin-top: 2px;
}

.ge-card__visual {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  overflow: hidden;
  min-height: 0;
}

/* === CROISSANCE === */
.ge-curve { width: 100%; height: 100%; overflow: visible; }

.ge-curve__line {
  fill: none;
  stroke: var(--blue);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: ge-line-draw 1.8s cubic-bezier(0.16, 1, 0.3, 1) 2s forwards;
}

@keyframes ge-line-draw { to { stroke-dashoffset: 0; } }

.ge-curve__dot {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation:
    ge-dot-appear 0.4s ease-out 3.2s forwards,
    ge-dot-pulse 2.4s ease-in-out 4s infinite;
}
@keyframes ge-dot-appear { to { opacity: 1; } }
@keyframes ge-dot-pulse {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(47, 123, 255, 0));   transform: scale(1);    }
  50%      { filter: drop-shadow(0 0 6px rgba(47, 123, 255, 0.9)); transform: scale(1.25); }
}

/* === SITE WEB === */
.ge-code {
  width: 100%; display: flex; flex-direction: column; gap: 3px;
  font-family: "SF Mono", "JetBrains Mono", "Menlo", "Courier New", monospace;
  font-size: 8.5px; line-height: 1.55; letter-spacing: -0.01em;
}
.ge-code__line {
  display: block; white-space: nowrap; overflow: hidden;
  width: 0; color: rgba(11, 27, 43, 0.7);
  animation: ge-type 7s ease-in-out infinite;
}
.ge-code__line:nth-child(1) { animation-delay: 0s;   }
.ge-code__line:nth-child(2) { animation-delay: 0.5s; }
.ge-code__line:nth-child(3) { animation-delay: 1s;   }
@keyframes ge-type {
  0%, 100% { width: 0; }
  15%      { width: 100%; }
  85%      { width: 100%; }
}
.ge-code__kw  { color: var(--blue);       font-weight: 700; }
.ge-code__fn  { color: var(--blue-bright); font-weight: 700; }
.ge-code__var { color: var(--blue-deep);  font-weight: 600; }
.ge-code__str { color: #0B98E0;            font-weight: 600; }

/* === SEO LOCAL === */
.ge-pin { width: 100%; height: 100%; overflow: visible; }

.ge-pin__radar {
  fill: none;
  stroke: var(--blue-bright);
  stroke-width: 1.5;
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  animation: ge-radar-ripple 2.4s ease-out infinite;
}
.ge-pin__radar--1 { animation-delay: 2.0s; }
.ge-pin__radar--2 { animation-delay: 2.8s; }
.ge-pin__radar--3 { animation-delay: 3.6s; }

@keyframes ge-radar-ripple {
  0%   { opacity: 0.6; transform: scale(0.3); }
  100% { opacity: 0;   transform: scale(1.8); }
}

.ge-pin__icon {
  opacity: 0;
  transform: scale(0) translateY(-6px);
  transform-box: fill-box;
  transform-origin: center;
  animation: ge-pin-drop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 1.6s forwards;
  filter: drop-shadow(0 2px 4px rgba(var(--color-blue-rgb), 0.3));
}
@keyframes ge-pin-drop {
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* === AUTOMATISATION IA === */
.ge-nodes { width: 100%; height: 100%; overflow: visible; }

.ge-nodes__edge {
  fill: none;
  stroke: var(--blue);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: ge-line-draw 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.ge-nodes__edge:nth-of-type(1) { animation-delay: 1.6s; }
.ge-nodes__edge:nth-of-type(2) { animation-delay: 1.9s; }
.ge-nodes__edge:nth-of-type(3) { animation-delay: 2.2s; }

.ge-nodes__node {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}
.ge-nodes__node--1 { animation: ge-dot-appear 0.4s ease-out 2.0s forwards; }
.ge-nodes__node--2 { animation: ge-dot-appear 0.4s ease-out 2.3s forwards; }
.ge-nodes__node--3 { animation: ge-dot-appear 0.4s ease-out 2.6s forwards; }
.ge-nodes__node--4 { animation: ge-dot-appear 0.4s ease-out 2.9s forwards; }

.ge-nodes__pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: ge-node-pulse 2.5s ease-in-out 3.2s infinite;
}
@keyframes ge-node-pulse {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50%      { opacity: 1;   transform: scale(1.3); }
}

/* === PERFORMANCE === */
.ge-gauge { width: 100%; height: 100%; overflow: visible; }

.ge-gauge__track {
  fill: none;
  stroke: rgba(var(--color-blue-rgb), 0.12);
  stroke-width: 6;
  stroke-linecap: round;
}

.ge-gauge__arc {
  fill: none;
  stroke: var(--blue);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 130;
  stroke-dashoffset: 130;
  animation: ge-gauge-fill 1.8s cubic-bezier(0.16, 1, 0.3, 1) 1.8s forwards;
}
@keyframes ge-gauge-fill { to { stroke-dashoffset: 30; } }

.ge-gauge__value,
.ge-gauge__unit {
  opacity: 0;
  animation: ge-dot-appear 0.5s ease-out 3.2s forwards;
}
.ge-gauge__unit { animation-delay: 3.4s; }

@media (max-width: 1100px) and (min-width: 821px) {
  .ge-card { width: 168px; height: 122px; margin-left: -84px; margin-top: -61px; }
}

@media (prefers-reduced-motion: reduce) {
  .ge-core, .ge-card, .ge-card__surface::after,
  .ge-code__line, .ge-pin__radar, .ge-nodes__pulse {
    animation: none !important;
  }
  .ge-card { opacity: 1 !important; }
  .ge-code__line { width: 100% !important; }
  .ge-curve__line, .ge-nodes__edge {
    stroke-dashoffset: 0 !important;
    animation: none !important;
  }
  .ge-gauge__arc {
    stroke-dashoffset: 30 !important;
    animation: none !important;
  }
  .ge-curve__dot, .ge-gauge__value, .ge-gauge__unit, .ge-nodes__node, .ge-pin__icon {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  .ge-pin__radar { opacity: 0 !important; }
  .ge-lines { opacity: 1 !important; animation: none !important; }
}
