/* ============================================================
   PAGE PRÉSENCE DIGITALE — VISUEL 3D DU HERO (ge-scene)
   ============================================================ */

/* LAYOUT — texte + visuel côte à côte (desktop) */
@media (min-width: 821px) {
  .pd-hero-inner {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    align-items: center;
    column-gap: 40px;
  }
  .pd-hero-visual {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    transform: translateX(60px);
  }
}

/* MOBILE — visuel sous le texte */
@media (max-width: 820px) {
  .pd-hero-visual {
    width: 100%;
    max-width: 480px;
    margin: 24px auto 0;
  }
  .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; }
  .ge-gauge__value { font-size: 11px; }
  .ge-gauge__unit  { font-size: 5px; }
}

@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);
  --white:       #FFFFFF;
  --gray-soft:   #F5F8FF;
  position: relative;
  width: 100%;
  height: auto;
  display: block;
  isolation: isolate;
  font-family: "DM Sans", 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.98) 0%,
      rgba(255, 255, 255, 0.92) 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;
}

.ge-curve { width: 100%; height: 100%; overflow: visible; }

.ge-bar {
  fill: rgba(var(--color-blue-rgb), 0.20);
  transform-origin: bottom;
  transform-box: fill-box;
  animation: ge-bar-pulse 2.8s ease-in-out infinite;
}
.ge-bar:nth-of-type(1) { animation-delay: 0.00s; }
.ge-bar:nth-of-type(2) { animation-delay: 0.15s; }
.ge-bar:nth-of-type(3) { animation-delay: 0.30s; }
.ge-bar:nth-of-type(4) { animation-delay: 0.45s; }
.ge-bar:nth-of-type(5) { animation-delay: 0.60s; }
.ge-bar:nth-of-type(6) { animation-delay: 0.75s; }
.ge-bar:nth-of-type(7) { animation-delay: 0.90s; }
.ge-bar--last { fill: rgba(47, 123, 255, 0.45); animation-delay: 1.05s; }

@keyframes ge-bar-pulse {
  0%, 100% { transform: scaleY(0.55); opacity: 0.5; }
  50%      { transform: scaleY(1);    opacity: 1;   }
}

.ge-curve__line {
  fill: none; stroke: var(--blue); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 200;
  animation: ge-line-loop 5.5s cubic-bezier(0.4, 0, 0.4, 1) 1.8s infinite;
}
@keyframes ge-line-loop {
  0%       { stroke-dashoffset: 200; }
  30%, 70% { stroke-dashoffset: 0;   }
  100%     { stroke-dashoffset: -200;}
}

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

.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; }

.ge-pin { width: 100%; height: 100%; overflow: visible; }
.ge-pin__radar {
  fill: none; stroke: var(--blue); stroke-width: 1;
  opacity: 0; transform-origin: center; transform-box: fill-box;
}
.ge-pin__radar--1 { animation: ge-radar-ripple 3s ease-out infinite 0s; }
.ge-pin__radar--2 { animation: ge-radar-ripple 3s ease-out infinite 1s; }
.ge-pin__radar--3 { animation: ge-radar-ripple 3s ease-out infinite 2s; }
@keyframes ge-radar-ripple {
  0%   { opacity: 0.7; transform: scale(0.4); }
  100% { opacity: 0;   transform: scale(1.4); }
}
.ge-pin__icon {
  fill: var(--blue);
  filter: drop-shadow(0 4px 8px rgba(var(--color-blue-rgb), 0.3));
}

/* AI Orb premium */
.ge-ai { width: 100%; height: 100%; overflow: visible; }
.ge-ai__halo {
  transform-origin: 50px 25px;
  animation: ge-ai-halo 3s ease-in-out infinite;
}
@keyframes ge-ai-halo {
  0%, 100% { transform: scale(0.85); opacity: 0.55; }
  50%      { transform: scale(1.15); opacity: 1;    }
}
.ge-ai__core-rotator {
  transform-origin: 50px 25px;
  animation: ge-ai-spin 12s linear infinite;
}
.ge-ai__inner-rotator {
  transform-origin: 50px 25px;
  animation: ge-ai-spin 8s linear infinite reverse;
}
@keyframes ge-ai-spin { to { transform: rotate(360deg); } }
.ge-ai__core { animation: ge-ai-glow 2.5s ease-in-out infinite; }
@keyframes ge-ai-glow {
  0%, 100% { filter: drop-shadow(0 0 2px rgba(47,123,255,0.5));  }
  50%      { filter: drop-shadow(0 0 8px rgba(47,123,255,0.95)); }
}
.ge-ai__electron-orbit { transform-origin: 50px 25px; }
.ge-ai__electron-orbit--1 { animation: ge-ai-spin 5s linear infinite; }
.ge-ai__electron-orbit--2 { animation: ge-ai-spin 7s linear infinite reverse; }
.ge-ai__electron-orbit--3 { animation: ge-ai-spin 6s linear infinite; }

.ge-gauge { width: 70%; height: 70%; overflow: visible; }
.ge-gauge__track {
  fill: none; stroke: rgba(var(--color-blue-rgb), 0.08); stroke-width: 4;
}
.ge-gauge__arc {
  fill: none; stroke: url(#ge-gauge-gradient); stroke-width: 4;
  stroke-linecap: round; stroke-dasharray: 138; stroke-dashoffset: 138;
  animation: ge-gauge-fill 2s cubic-bezier(0.16, 1, 0.3, 1) 2.4s forwards;
}
@keyframes ge-gauge-fill { to { stroke-dashoffset: 30; } }
.ge-gauge__value {
  font-family: "DM Sans", sans-serif; font-size: 14px; font-weight: 800;
  fill: var(--blue-deep);
}
.ge-gauge__unit {
  font-family: "DM Sans", sans-serif; font-size: 6px; font-weight: 700;
  fill: var(--blue); letter-spacing: 0.1em; opacity: 0;
  animation: ge-dot-appear 0.6s ease-out 3.6s forwards;
}

@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-pin__radar, .ge-curve__dot, .ge-code__line {
    animation: none !important;
  }
  .ge-card { opacity: 1 !important; }
  .ge-code__line { width: 100% !important; }
  .ge-curve__line, .ge-gauge__arc { stroke-dashoffset: 0 !important; animation: none !important; }
  .ge-curve__dot, .ge-gauge__value, .ge-gauge__unit { opacity: 1 !important; animation: none !important; }
  .ge-lines { opacity: 1 !important; animation: none !important; }
}
