/* ============================================================
   GLOBAL ESSOR — HERO IDENTITÉ DE MARQUE (animation 3D orbitale)
   5 cartes orbitales : Croquis → Vectorisation → Logo → Palette → Typographie
   ============================================================ */

/* =========================================================================
   LAYOUT GLOBAL — overflow visible pour laisser déborder les cartes
   ========================================================================= */
.bb-hero,
.bb-hero__inner,
.bb-hero__left,
.bb-hero__right,
.ge-scene,
.ge-stage,
.ge-orbit {
  overflow: visible;
  background: transparent;
}

/* === Mot accentué dans le titre === */
.bb-hero__title-accent {
  position: relative;
  display: inline-block;
  color: var(--color-blue);
  white-space: nowrap;
}
.bb-hero__title-accent::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 0;
  right: 0;
  height: 10px;
  background: linear-gradient(90deg, rgba(47, 123, 255, 0.22), rgba(var(--color-blue-rgb), 0.22));
  border-radius: 999px;
  z-index: -1;
}

/* === Micro-rassurance sous les CTAs === */
.bb-hero__micro {
  width: 100%;
  flex-basis: 100%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 0 0;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: rgba(11, 27, 43, 0.55);
  letter-spacing: -0.005em;
}
.bb-hero__microDot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
  flex-shrink: 0;
}

/* =========================================================================
   DESKTOP (≥ 821px) — Grid 2 colonnes × 2 lignes
   ========================================================================= */
@media (min-width: 821px) {
  body section.bb-hero .bb-hero__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    column-gap: 0;
    row-gap: 32px;
    align-items: start;
    width: 100%;
  }
  body section.bb-hero .bb-hero__left {
    grid-column: 1;
    grid-row: 1;
    max-width: 600px;
    align-self: start;
    z-index: 2;
    position: relative;
  }
  body section.bb-hero .bb-hero__right {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    padding-left: 140px;
    z-index: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  body section.bb-hero .bb-hero__ctaRow {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
  }
}

/* =========================================================================
   MOBILE (≤ 820px) — flex column, visuel full-bleed
   ========================================================================= */
@media (max-width: 820px) {
  body section.bb-hero .bb-hero__inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0;
  }
  body section.bb-hero .bb-hero__left,
  body section.bb-hero .bb-hero__right,
  body section.bb-hero .bb-hero__ctaRow {
    width: 100%;
    max-width: 100%;
    flex: none;
  }
  body section.bb-hero .bb-hero__left {
    margin: 0;
    padding: 0;
  }
  body section.bb-hero .bb-kicker {
    font-size: 11px;
    line-height: 1.4;
    letter-spacing: 0.1em;
    margin: 0 0 14px 0;
  }
  body section.bb-hero h1.bb-hero__title,
  body section.bb-hero .bb-hero__title {
    font-size: 30px;
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin: 0 0 14px 0;
    font-weight: 800;
  }
  body section.bb-hero .bb-hero__subtitle {
    font-size: 14.5px;
    line-height: 1.55;
    margin: 0;
    color: #4a5568;
  }
  body section.bb-hero .bb-hero__right {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-top: 24px;
    margin-bottom: 24px;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transform: none;
    filter: none;
  }
  body section.bb-hero .ge-scene {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    display: block;
  }
  body section.bb-hero .ge-stage {
    aspect-ratio: 1.9 / 1;
    width: 100%;
    margin: 0 auto;
  }
  body section.bb-hero .ge-card {
    width: 118px;
    height: 82px;
    margin-left: -59px;
    margin-top: -41px;
  }
  body section.bb-hero .ge-card__surface {
    padding: 7px 9px;
    gap: 2.5px;
    border-radius: 13px;
  }
  body section.bb-hero .ge-card__title { font-size: 10.5px; }
  body section.bb-hero .ge-card__label { font-size: 6.5px; letter-spacing: 0.1em; }
  body section.bb-hero .bb-hero__ctaRow {
    margin: 0;
    padding: 0;
    gap: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }
  body section.bb-hero .bb-hero__micro {
    font-size: 12px;
    margin-top: 4px;
  }
}

@media (max-width: 480px) {
  body section.bb-hero .bb-kicker { font-size: 10.5px; margin-bottom: 12px; }
  body section.bb-hero h1.bb-hero__title,
  body section.bb-hero .bb-hero__title { font-size: 26px; line-height: 1.06; margin-bottom: 12px; }
  body section.bb-hero .bb-hero__subtitle { font-size: 13.5px; line-height: 1.5; }
  body section.bb-hero .bb-hero__right { margin-top: 20px; margin-bottom: 20px; }
  body section.bb-hero .ge-stage { aspect-ratio: 1.7 / 1; }
  body section.bb-hero .ge-card { width: 106px; height: 74px; margin-left: -53px; margin-top: -37px; }
  body section.bb-hero .ge-card__surface { padding: 6px 8px; gap: 2px; }
  body section.bb-hero .ge-card__title { font-size: 9.5px; }
  body section.bb-hero .ge-card__label { font-size: 6px; }
}

/* =========================================================================
   SCROLL REVEAL TEXTE (desktop)
   ========================================================================= */
@media (min-width: 821px) and (prefers-reduced-motion: no-preference) {
  .bb-hero .bb-kicker,
  .bb-hero__title,
  .bb-hero__subtitle,
  .bb-hero__ctaRow .bb-btn--primary,
  .bb-hero__ctaRow .bb-btn--link,
  .bb-hero__micro,
  .bb-hero__right {
    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);
  }
  .bb-hero__title { transform: translateY(36px) scale(0.98); transform-origin: 0% 50%; }
  .bb-hero__ctaRow .bb-btn--primary,
  .bb-hero__ctaRow .bb-btn--link { transform: translateY(20px) scale(0.96); }
  .bb-hero__right { transform: translateX(32px); }
  .bb-hero.is-revealed .bb-kicker,
  .bb-hero.is-revealed .bb-hero__title,
  .bb-hero.is-revealed .bb-hero__subtitle,
  .bb-hero.is-revealed .bb-hero__ctaRow .bb-btn--primary,
  .bb-hero.is-revealed .bb-hero__ctaRow .bb-btn--link,
  .bb-hero.is-revealed .bb-hero__micro,
  .bb-hero.is-revealed .bb-hero__right {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
  .bb-hero.is-revealed .bb-kicker                        { transition-delay: 0.05s; }
  .bb-hero.is-revealed .bb-hero__title                   { transition-delay: 0.18s; }
  .bb-hero.is-revealed .bb-hero__subtitle                { transition-delay: 0.40s; }
  .bb-hero.is-revealed .bb-hero__right                   { transition-delay: 0.30s; }
  .bb-hero.is-revealed .bb-hero__ctaRow .bb-btn--primary { transition-delay: 0.58s; }
  .bb-hero.is-revealed .bb-hero__ctaRow .bb-btn--link    { transition-delay: 0.70s; }
  .bb-hero.is-revealed .bb-hero__micro                   { transition-delay: 0.82s; }
}

/* =========================================================================
   VISUEL 3D ORBITAL — 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", 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);
}

/* === Cartes === */
.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;
  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;
  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;
}

/* =========================================================================
   ANIMATIONS PROPRES À CHAQUE CARTE
   ========================================================================= */

/* CARTE 1 — Croquis : strokes pencil qui se redessinent en boucle */
.ge-sketch { width: 100%; height: 100%; overflow: visible; }
.ge-sketch__stroke {
  stroke-dasharray: 90;
  stroke-dashoffset: 90;
  animation: ge-sketch-draw 6s ease-in-out infinite;
}
.ge-sketch__stroke--1 { animation-delay: 0s; }
.ge-sketch__stroke--2 { animation-delay: 0.5s; stroke-dasharray: 70; stroke-dashoffset: 70; }
@keyframes ge-sketch-draw {
  0%, 5%    { stroke-dashoffset: 90; }
  25%, 70%  { stroke-dashoffset: 0; }
  90%, 100% { stroke-dashoffset: -90; }
}
.ge-sketch__tip {
  opacity: 0;
  animation: ge-sketch-tip 6s ease-in-out infinite 0.5s;
  filter: drop-shadow(0 0 4px rgba(47,123,255,0.6));
}
@keyframes ge-sketch-tip {
  0%, 12%   { opacity: 0; }
  25%, 70%  { opacity: 1; }
  90%, 100% { opacity: 0; }
}

/* CARTE 2 — Vectorisation : anchors qui apparaissent puis path */
.ge-vector { width: 100%; height: 100%; overflow: visible; }
.ge-vector__path {
  stroke-dasharray: 120;
  stroke-dashoffset: 120;
  animation: ge-vector-draw 5.5s ease-in-out infinite 1.4s;
}
@keyframes ge-vector-draw {
  0%, 5%    { stroke-dashoffset: 120; }
  35%, 80%  { stroke-dashoffset: 0; }
  95%, 100% { stroke-dashoffset: -120; }
}
.ge-vector__anchor {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: ge-vector-anchor 5.5s ease-out infinite;
}
.ge-vector__anchor--1 { animation-delay: 0s; }
.ge-vector__anchor--2 { animation-delay: 0.5s; }
.ge-vector__anchor--3 { animation-delay: 1s; }
@keyframes ge-vector-anchor {
  0%, 5%    { opacity: 0; transform: scale(0); }
  15%, 85%  { opacity: 1; transform: scale(1); }
  95%, 100% { opacity: 0; transform: scale(0); }
}
.ge-vector__handle,
.ge-vector__control {
  opacity: 0;
  animation: ge-vector-handle 5.5s ease-out infinite 1.1s;
}
@keyframes ge-vector-handle {
  0%, 15%   { opacity: 0; }
  30%, 80%  { opacity: 0.8; }
  95%, 100% { opacity: 0; }
}

/* CARTE 3 — Logo : gradient mark + shine sweep */
.ge-mark { width: 100%; height: 100%; overflow: visible; }
.ge-mark__rect {
  filter: drop-shadow(0 6px 14px rgba(var(--color-blue-rgb), 0.30));
  transform-box: fill-box;
  transform-origin: center;
  animation: ge-mark-pop 4s ease-in-out infinite;
}
@keyframes ge-mark-pop {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.04); }
}
.ge-mark__icon {
  transform-box: fill-box;
  transform-origin: center;
  animation: ge-mark-pop 4s ease-in-out infinite;
}
.ge-mark__shine {
  opacity: 0;
  transform-origin: 100% 0%;
  animation: ge-mark-shine 4.5s ease-in-out infinite 1.5s;
}
@keyframes ge-mark-shine {
  0%, 20%   { opacity: 0; transform: translateX(-100%); }
  35%       { opacity: 1; }
  55%, 100% { opacity: 0; transform: translateX(100%); }
}

/* CARTE 4 — Palette : dots cascade + breathing */
.ge-palette { width: 100%; height: 100%; overflow: visible; }
.ge-palette__dot {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: ge-palette-pop 5s ease-out infinite;
}
.ge-palette__dot--1 { animation-delay: 0s; }
.ge-palette__dot--2 { animation-delay: 0.18s; }
.ge-palette__dot--3 { animation-delay: 0.36s; }
.ge-palette__dot--4 { animation-delay: 0.54s; }
@keyframes ge-palette-pop {
  0%        { opacity: 0; transform: scale(0); }
  20%       { opacity: 1; transform: scale(1.15); }
  30%, 80%  { opacity: 1; transform: scale(1); }
  95%, 100% { opacity: 0; transform: scale(0); }
}

/* CARTE 5 — Typographie : Aa + nom font qui se révèlent */
.ge-type { width: 100%; height: 100%; overflow: visible; }
.ge-type__big {
  opacity: 0;
  animation: ge-type-in 5s ease-out infinite;
}
.ge-type__divider {
  opacity: 0;
  animation: ge-type-divider 5s ease-out infinite 0.3s;
}
.ge-type__name {
  opacity: 0;
  animation: ge-type-name 5s ease-out infinite 0.5s;
}
.ge-type__sub {
  opacity: 0;
  animation: ge-type-name 5s ease-out infinite 0.7s;
}
@keyframes ge-type-in {
  0%        { opacity: 0; }
  15%, 80%  { opacity: 1; }
  95%, 100% { opacity: 0; }
}
@keyframes ge-type-divider {
  0%        { opacity: 0; }
  15%, 80%  { opacity: 1; }
  95%, 100% { opacity: 0; }
}
@keyframes ge-type-name {
  0%        { opacity: 0; }
  18%, 80%  { opacity: 1; }
  95%, 100% { opacity: 0; }
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .ge-core, .ge-card, .ge-card__surface::after, .ge-lines,
  .ge-sketch__stroke, .ge-sketch__tip,
  .ge-vector__path, .ge-vector__anchor, .ge-vector__handle, .ge-vector__control,
  .ge-mark__rect, .ge-mark__icon, .ge-mark__shine,
  .ge-palette__dot,
  .ge-type__big, .ge-type__divider, .ge-type__name, .ge-type__sub {
    animation: none !important;
  }
  .ge-card, .ge-lines { opacity: 1 !important; }
  .ge-sketch__stroke, .ge-vector__path { stroke-dashoffset: 0 !important; }
  .ge-vector__anchor, .ge-vector__handle, .ge-vector__control,
  .ge-mark__shine, .ge-palette__dot,
  .ge-type__big, .ge-type__divider, .ge-type__name, .ge-type__sub,
  .ge-sketch__tip { opacity: 1 !important; }
}
