/* ================================================================
   DigitPilote — Hero Premium CSS v9.0 — CLEAN
   Centrage garanti logo + orbites + aiguilles
   ================================================================ */

/* ── Fond hero ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  padding-top: 72px;
  background: #F6FAF7;
  position: relative;
  overflow: hidden;
}

/* ── Filigrane logos en fond ── */
.hero-watermark {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero-watermark img {
  position: absolute;
  width: 80px;
  height: 80px;
  object-fit: contain;
  opacity: 0.045;
  filter: grayscale(1);
}

/* Texture grain subtile */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23noise)' opacity='0.025'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ── Layout hero ── */
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: start;
  padding-top: 8px;
  position: relative;
  z-index: 1;
}

/* ── Contenu gauche ── */
.hero-content {
  position: relative;
}

/* ── Orbes de profondeur ── */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.hero-orb-1 {
  width: 320px; height: 320px;
  top: -80px; right: -60px;
  background: radial-gradient(circle, rgba(200,169,107,0.06) 0%, transparent 70%);
  animation: orbDrift 12s ease-in-out infinite alternate;
}
.hero-orb-2 {
  width: 240px; height: 240px;
  bottom: -40px; left: -80px;
  background: radial-gradient(circle, rgba(47,79,62,0.05) 0%, transparent 70%);
  animation: orbDrift 15s ease-in-out 3s infinite alternate-reverse;
}
@keyframes orbDrift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(20px, -15px) scale(1.08); }
}

/* ================================================================
   LOGO STAGE — Conteneur principal 220×220px
   Tout est centré absolument à l'intérieur
   !important pour résister aux résidus du blob CSS
   ================================================================ */
.hero-logo-stage {
  position: relative !important;
  width: 320px !important;
  height: 320px !important;
  margin-bottom: 28px;
  flex-shrink: 0;
  display: block !important;
  /* PAS de flex ni justify-content/align-items — le centrage est via position:absolute */
  /* Pas d'opacity:0 ni animation de fade sur le stage lui-même */
  opacity: 1 !important;
  animation: none !important;
}

/* ── Halo doré derrière le logo ── */
.logo-halo {
  position: absolute;
  top: 50%; left: 50%;
  width: 300px; height: 300px;
  margin-top: -150px; margin-left: -150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,169,107,0.22) 0%, rgba(200,169,107,0.06) 50%, transparent 72%);
  filter: blur(16px);
  z-index: 0;
  animation: haloBreath 4s ease-in-out 1.2s infinite alternate;
}
@keyframes haloBreath {
  from { transform: scale(0.90); opacity: 0.65; }
  to   { transform: scale(1.12); opacity: 1.0; }
}

/* ── Anneaux orbitaux — centrés absolument ── */
.orbit-ring {
  position: absolute;
  top: 50%; left: 50%;
  border-radius: 50%;
  border: 1px solid rgba(200,169,107,0.28);
  z-index: 1;
  opacity: 0;
  /* Points satellites aux pôles */
  background:
    radial-gradient(circle at 50% 1%, rgba(200,169,107,0.7) 0%, transparent 4%),
    radial-gradient(circle at 50% 99%, rgba(200,169,107,0.45) 0%, transparent 4%);
}

/* Premier anneau — 260px */
.orbit-ring:nth-child(2) {
  width: 260px; height: 260px;
  margin-top: -130px; margin-left: -130px;
  animation: ringAppear 1s ease 0.6s forwards, ringRotateFwd 18s linear 1.6s infinite;
}

/* Deuxième anneau — 310px */
.orbit-ring.orbit-ring-2 {
  width: 310px; height: 310px;
  margin-top: -155px; margin-left: -155px;
  border-color: rgba(200,169,107,0.16);
  background:
    radial-gradient(circle at 50% 1%, rgba(200,169,107,0.4) 0%, transparent 4%),
    radial-gradient(circle at 50% 99%, rgba(200,169,107,0.25) 0%, transparent 4%);
  animation: ringAppear 1s ease 1.0s forwards, ringRotateRev 28s linear 2.0s infinite;
}

@keyframes ringAppear {
  to { opacity: 1; }
}
@keyframes ringRotateFwd {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes ringRotateRev {
  from { transform: rotate(0deg); }
  to   { transform: rotate(-360deg); }
}

/* ================================================================
   LOGO COMPASS WRAP — Logo + aiguille SVG
   Centré exactement au milieu du stage (position absolute)
   !important sur position/top/left/margin car le blob CSS corrompu
   pouvait écraser ces valeurs malgré l'encapsulation en commentaire.
   ================================================================ */
.logo-compass-wrap {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 220px !important;
  height: 220px !important;
  margin-top: -110px !important;
  margin-left: -110px !important;
  overflow: visible !important;
  z-index: 3 !important;
  opacity: 0;
  transform: scale(0.65) rotate(-12deg);
  animation: logoReveal 1.0s cubic-bezier(0.34, 1.52, 0.64, 1) 0.3s forwards;
  will-change: transform, opacity;
  display: block !important;
}

@keyframes logoReveal {
  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

/* locked — opacity:1 forcée, jamais de flash ni de disparition */
.logo-compass-wrap.locked {
  opacity: 1 !important;
  animation: logoLock 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
}
@keyframes logoLock {
  0%   { opacity: 1; transform: scale(1) rotate(0deg); filter: none; }
  45%  { opacity: 1; transform: scale(1.14) rotate(0deg); filter: drop-shadow(0 0 14px rgba(200,169,107,0.55)); }
  100% { opacity: 1; transform: scale(1.06) rotate(0deg); filter: drop-shadow(0 0 8px rgba(200,169,107,0.32)); }
}

.logo-compass-wrap img {
  width: 220px; height: 220px;
  object-fit: contain;
  display: block;
  border-radius: 50%;
  position: relative;
  z-index: 2;
}

/* ── SVG aiguille overlay ── */
.needle-svg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 4;
}

/* ================================================================
   NOM DE MARQUE bicolore — Digit + Pilote
   ================================================================ */
.hero-brandname {
  font-size: 3.2rem;
  font-weight: 800;
  color: var(--green-d);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  opacity: 0;
  animation: heroFadeIn 0.6s ease 1.0s forwards;
  text-align: center;
}
.hero-brandname span {
  color: var(--gold-h);
}

/* Ligne décorative animée */
.hero-line {
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), rgba(200,169,107,0.2), transparent);
  border-radius: 2px;
  margin-bottom: 20px;
  animation: lineGrow 0.9s cubic-bezier(0.22,1,0.36,1) 1.3s forwards;
}
@keyframes lineGrow {
  to { width: 64px; }
}

/* ── Badge ── (après titre typewriter) */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(10px);
  animation: heroFadeUp 0.7s ease 4.5s forwards;
}

/* ── Titre typewriter ── (juste sous brandname/hero-line) */
.hero-title {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  line-height: 1.18;
  color: var(--green-d);
  margin-bottom: 20px;
  min-height: 3em;
}
.hero-title em { font-style: italic; color: var(--gold-h); }
.hero-title .char {
  display: inline;
  opacity: 0;
  transition: opacity 0.04s ease;
}
.hero-title .char.visible { opacity: 1; }
.hero-title.typing::after {
  content: '|';
  color: var(--gold);
  animation: blink 0.8s step-end infinite;
  font-weight: 300;
}
.hero-title.done::after { display: none; }
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── Description ── */
.hero-desc {
  font-size: 1.08rem;
  margin-bottom: 36px;
  max-width: 480px;
  opacity: 0;
  transform: translateY(12px);
  animation: heroFadeUp 0.7s ease 4.8s forwards;
}

/* ── CTA ── */
.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  opacity: 0;
  transform: translateY(12px);
  animation: heroFadeUp 0.7s ease 5.1s forwards;
}

/* ── Preuve sociale ── */
.hero-proof {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 56px;   /* ↑ plus d'espace au-dessus */
  padding-top: 0;
  /* border-top supprimé — pas de trait séparateur */
  opacity: 0;
  animation: heroFadeUp 0.7s ease 5.4s forwards;
}
.hero-proof-avatars { display: flex; }
.hero-proof-avatars .avatar {
  width: 36px; height: 36px;
  font-size: 0.75rem;
  border: 2px solid var(--bg);
  margin-left: -8px;
}
.hero-proof-avatars .avatar:first-child { margin-left: 0; }
.hero-proof-text { font-size: 0.85rem; color: var(--text2); line-height: 1.5; }
.hero-proof-text strong { display: block; color: var(--text); font-size: 0.9rem; }

/* ── Animations globales ── */
@keyframes heroFadeUp {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes heroFadeIn {
  to { opacity: 1; }
}

/* ── Visuel droite ── */
.hero-visual {
  position: relative;
  opacity: 0;
  transform: translateX(24px);
  animation: heroSlideIn 1s cubic-bezier(0.22,1,0.36,1) 3.0s forwards;
}
@keyframes heroSlideIn {
  to { opacity: 1; transform: translateX(0); }
}

/* ── Scroll indicator ── */
.hero-scroll {
  position: absolute;
  bottom: -28px;  /* dépassé sous la section hero */
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0;
  animation: heroFadeIn 1s ease 5s forwards;
  cursor: pointer;
  z-index: 2;
}
.hero-scroll span {
  font-size: 0.72rem;
  color: var(--text2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hero-scroll-dot {
  width: 24px; height: 38px;
  border: 1.5px solid rgba(47,79,62,0.25);
  border-radius: 12px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 5px;
}
.hero-scroll-dot::before {
  content: '';
  width: 4px; height: 8px;
  background: var(--gold);
  border-radius: 2px;
  animation: scrollBob 2s ease-in-out infinite;
}
@keyframes scrollBob {
  0%, 100% { transform: translateY(0); opacity: 1; }
  60%       { transform: translateY(10px); opacity: 0.3; }
}

/* ── Hover CTA ── */
.btn-gold {
  position: relative;
  overflow: hidden;
}
.btn-gold::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.btn-gold:hover::after { opacity: 1; }

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ── Module cards hover ── */
.module-card {
  transition: transform 0.32s cubic-bezier(0.34,1.2,0.64,1), box-shadow 0.32s ease, border-color 0.25s ease;
}
.module-card:hover {
  transform: translateY(-8px) scale(1.012);
  box-shadow: 0 20px 52px rgba(47,79,62,0.14);
}

/* ── prefers-reduced-motion ── */
@media (prefers-reduced-motion: reduce) {
  .hero-badge, .hero-desc, .hero-ctas, .hero-proof,
  .hero-visual, .hero-logo-stage, .hero-brandname,
  .hero-line, .hero-scroll, .logo-compass-wrap,
  .orbit-ring, .logo-halo, .float-card-1, .float-card-2 {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  .logo-compass-wrap {
    top: 50% !important; left: 50% !important;
    margin-top: -60px !important; margin-left: -60px !important;
    position: absolute !important;
  }
  .hero-title .char { opacity: 1 !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ── Responsive desktop ── */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }
  .hero-visual { display: none; }
  .hero-logo-stage {
    margin: 0 auto 28px;
  }
  .hero-ctas {
    justify-content: center;
  }
  .hero-proof {
    justify-content: center;
  }
}

/* ── Responsive mobile ── */
@media (max-width: 600px) {
  /* Fix overflow global */
  .hero { overflow-x: hidden; }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 0;
    text-align: left;
  }
  .hero-visual { display: none; }
  .hero-content { width: 100%; overflow: hidden; box-sizing: border-box; }

  /* Logo centré seul au-dessus */
  .hero-logo-stage {
    float: none;
    margin: 0 auto 16px;
    width: 130px !important;
    height: 130px !important;
    display: block !important;
  }
  .logo-compass-wrap {
    width: 110px !important;
    height: 110px !important;
    margin-top: -55px !important;
    margin-left: -55px !important;
  }
  .logo-compass-wrap img {
    width: 110px !important;
    height: 110px !important;
  }
  /* Anneaux orbitaux plus petits sur mobile */
  .orbit-ring:nth-child(2) { width: 140px !important; height: 140px !important; margin-top: -70px !important; margin-left: -70px !important; }
  .orbit-ring.orbit-ring-2 { width: 170px !important; height: 170px !important; margin-top: -85px !important; margin-left: -85px !important; }

  /* Nom de marque — centré, taille maîtrisée */
  .hero-brandname {
    font-size: 1.7rem !important;
    text-align: center !important;
    line-height: 1.15;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  /* Trait décoratif — centré */
  .hero-line { margin: 0 auto 16px; }

  /* Badge — centré */
  .hero-badge { display: flex; justify-content: center; }

  /* Titre principal — pleine largeur, pas de débordement */
  .hero-title {
    font-size: 1.45rem !important;
    line-height: 1.25 !important;
    clear: both;
    word-break: break-word;
    overflow-wrap: break-word;
    min-height: unset;
    text-align: left;
  }

  /* Description */
  .hero-desc {
    font-size: 0.93rem;
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  /* CTA — pleine largeur, empilés */
  .hero-ctas {
    flex-direction: column;
    gap: 10px;
    width: 100%;
    align-items: stretch;
  }
  .hero-ctas a {
    width: 100% !important;
    min-width: unset !important;
    text-align: center;
    box-sizing: border-box;
    justify-content: center;
    display: flex;
  }

  /* Proof sociale */
  .hero-proof {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px;
  }
  .hero-proof-text { font-size: 0.82rem; }

  /* Clearfix pour le float éventuel */
  .hero-logo-stage::after {
    content: '';
    display: table;
    clear: both;
  }
}

/* ── Très petit mobile (< 380px) ── */
@media (max-width: 380px) {
  .hero-brandname { font-size: 1.45rem !important; }
  .hero-title { font-size: 1.25rem !important; }
  .hero-desc { font-size: 0.88rem; }
  .hero-logo-stage {
    width: 100px !important;
    height: 100px !important;
  }
  .logo-compass-wrap {
    width: 84px !important;
    height: 84px !important;
    margin-top: -42px !important;
    margin-left: -42px !important;
  }
  .logo-compass-wrap img { width: 84px !important; height: 84px !important; }
  .orbit-ring:nth-child(2) { width: 108px !important; height: 108px !important; margin-top: -54px !important; margin-left: -54px !important; }
  .orbit-ring.orbit-ring-2 { width: 130px !important; height: 130px !important; margin-top: -65px !important; margin-left: -65px !important; }
}
