/* ═══════════════════════════════════════════════════════════
   BABG Tech — v2
   Palette d'origine : bleu nuit + or champagne + sauge + ivoire.
   3D three.js (scenes.js). Polices : Clash Display / Satoshi / JetBrains Mono.
   Sans pastille clignotante, sans bandeau marquee.
═══════════════════════════════════════════════════════════ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:        #F7F4ED;   /* ivoire crème */
  --paper:     #FFFFFF;
  --surface:   #EFEAE0;
  --ink:       #0B1220;   /* bleu nuit profond */
  --ink-soft:  #1A2236;
  --navy:      #1E3A5F;   /* accent principal */
  --navy-2:    #2D5A87;
  --gold:      #B8924A;
  --gold-lt:   #D4B375;
  --sage:      #5C7A6E;
  --grey:      #4A5061;
  --grey-soft: #7A8090;
  --line:      #E5DFD2;
  --line-d:    rgba(255,255,255,0.1);

  --display: 'Clash Display', 'Satoshi', sans-serif;
  --body:    'Satoshi', -apple-system, system-ui, sans-serif;
  --mono:    'JetBrains Mono', ui-monospace, monospace;

  --ease: cubic-bezier(.2,.8,.2,1);
  --max:  1280px;

  --noise: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.02 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body);
  background: var(--bg); color: var(--ink);
  font-size: 16px; line-height: 1.65; overflow-x: hidden;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
/* Grain global discret — texture premium */
body::before {
  content: ''; position: fixed; inset: 0; z-index: 300; pointer-events: none;
  background-image: var(--noise); opacity: .55; mix-blend-mode: multiply;
}
::selection { background: var(--navy); color: #fff; }
a { color: inherit; text-decoration: none; }
canvas { display: block; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 clamp(20px, 5vw, 64px); }

/* ─── REVEAL ─── */
.reveal { opacity: 0; transform: translateY(28px);
  transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s);
  will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1 !important; transform: none !important; } }

.ar { display: inline-block; transition: transform .25s var(--ease); }

/* ═══════════ NAV ═══════════ */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background .35s var(--ease), backdrop-filter .35s, border-color .35s; }
.nav.scrolled {
  background: rgba(247,244,237,0.82);
  backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom-color: var(--line);
}
.nav-inner { max-width: var(--max); margin: 0 auto;
  padding: 16px clamp(20px,5vw,64px); display: flex; align-items: center; gap: 32px; }
.logo { display: flex; align-items: center; gap: 11px; }
.logo-mark { width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--navy), var(--gold));
  color: #fff; font-family: var(--display); font-weight: 600; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(30,58,95,.35); }
.logo-word { font-family: var(--display); font-weight: 600; font-size: 18px; letter-spacing: -.01em; color: var(--ink); }
.logo-dot { color: var(--gold); }

.nav-links { display: flex; gap: 30px; margin-left: auto; }
.nav-links a { font-size: 14.5px; color: var(--ink-soft); position: relative; transition: color .2s; }
.nav-links a::after { content: ''; position: absolute; left: 0; bottom: -5px; width: 0; height: 1.5px;
  background: var(--gold); transition: width .28s var(--ease); }
.nav-links a:hover { color: var(--navy); }
.nav-links a:hover::after { width: 100%; }

.nav-cta { font-size: 14px; padding: 10px 20px; border-radius: 100px;
  background: var(--ink); color: #fff; display: inline-flex; align-items: center; gap: 8px;
  transition: background .25s var(--ease), transform .1s; }
.nav-cta:hover { background: var(--navy); transform: translateY(-1px); }
.nav-cta:hover .ar { transform: translateX(3px); }

.nav-burger { display: none; flex-direction: column; gap: 6px; background: none; border: 0; cursor: pointer; padding: 6px; margin-left: auto; }
.nav-burger span { width: 24px; height: 1.6px; background: var(--ink); transition: transform .3s var(--ease); }
.nav-burger.open span:first-child { transform: translateY(3.8px) rotate(45deg); }
.nav-burger.open span:last-child { transform: translateY(-3.8px) rotate(-45deg); }
.nav-mobile { display: none; flex-direction: column; padding: 4px clamp(20px,5vw,64px) 24px; gap: 2px;
  background: rgba(247,244,237,0.97); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); }
.nav-mobile.open { display: flex; }
.nav-mobile a { font-family: var(--display); font-weight: 500; font-size: 22px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.nav-mobile a:last-child { border-bottom: 0; color: var(--gold); }

/* ═══════════ KICKER (label mono) ═══════════ */
.kicker { display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--grey-soft); margin-bottom: 26px; }
.kicker.light { color: rgba(255,255,255,.5); }
.k-n { color: var(--gold); font-weight: 500;
  border: 1px solid currentColor; border-radius: 5px; padding: 2px 7px; line-height: 1; }

/* ═══════════ HERO ═══════════ */
.hero { min-height: 100svh; display: grid; grid-template-columns: 1.05fr .95fr;
  align-items: center; padding-top: 84px; position: relative; }
.hero-left { padding: 6vh clamp(20px,5vw,64px) 6vh max(6%, 24px); position: relative; z-index: 2; }

h1 { font-family: var(--display); font-weight: 600;
  font-size: clamp(3.2rem, 7.5vw, 7rem); line-height: 0.92; letter-spacing: -.035em; color: var(--ink); }
h1 em { font-style: normal; color: var(--gold);
  background: linear-gradient(120deg, var(--gold), var(--gold-lt)); -webkit-background-clip: text;
  background-clip: text; -webkit-text-fill-color: transparent; }

.hero-desc { font-size: 1.08rem; color: var(--grey); max-width: 460px; margin-top: 1.8rem; line-height: 1.65; }

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 2.2rem; }
.btn-primary { background: var(--ink); color: #fff; padding: 14px 26px; border-radius: 100px;
  font-weight: 500; font-size: 15px; display: inline-flex; align-items: center; gap: 9px;
  box-shadow: 0 10px 28px rgba(11,18,32,.2); transition: background .25s var(--ease), transform .1s, box-shadow .25s; }
.btn-primary:hover { background: var(--navy); transform: translateY(-2px); box-shadow: 0 14px 32px rgba(30,58,95,.4); }
.btn-primary:hover .ar { transform: translateX(4px); }
.btn-ghost { padding: 14px 26px; border-radius: 100px; border: 1px solid var(--line); color: var(--ink);
  font-weight: 500; font-size: 15px; transition: border-color .2s, background .2s; }
.btn-ghost:hover { border-color: var(--ink); background: rgba(255,255,255,.6); }

.hero-stats { display: flex; gap: clamp(22px,4vw,46px); margin-top: 3.2rem; padding-top: 1.8rem; border-top: 1px solid var(--line); }
.hero-stats b { display: block; font-family: var(--display); font-weight: 600; font-size: 2rem; letter-spacing: -.03em;
  background: linear-gradient(135deg, var(--navy), var(--gold)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-stats span { font-size: 12.5px; color: var(--grey-soft); }

/* Panneau 3D */
.hero-right { position: relative; min-height: 520px; height: 100%; overflow: hidden;
  display: flex; align-items: center; justify-content: center; }
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; }
.hero-glow { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(45% 45% at 60% 42%, rgba(30,58,95,.28), transparent 70%),
    radial-gradient(40% 40% at 38% 64%, rgba(184,146,74,.20), transparent 70%); }
.hero-grid { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image: linear-gradient(rgba(30,58,95,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30,58,95,.05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse at center, #000 25%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 25%, transparent 75%); }

.glass-card { position: absolute; right: clamp(12px,4vw,40px); bottom: clamp(24px,6vh,56px); z-index: 3;
  width: min(280px, 78%); background: rgba(11,18,32,.55); border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px; padding: 16px 18px; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px -20px rgba(0,0,0,.5); }
.gc-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--sage); margin-bottom: 7px; }
.gc-title { font-family: var(--display); font-weight: 600; color: #fff; font-size: 1.05rem; margin-bottom: 12px; }
.gc-row { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.gc-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 10px var(--sage); flex-shrink: 0; }
.gc-text { font-size: 13px; color: rgba(255,255,255,.6); flex: 1; }
.gc-amt { font-weight: 600; color: #fff; font-size: 14px; }
.gc-code { font-family: var(--mono); font-size: 11.5px; line-height: 1.8; color: rgba(255,255,255,.45);
  border-top: 1px solid rgba(255,255,255,.1); padding-top: 11px; }
.gc-code .cmt { color: rgba(255,255,255,.3); } .gc-code .kw { color: var(--gold-lt); } .gc-code .str { color: var(--sage); }

/* ═══════════ BLOCS ═══════════ */
.block { padding: clamp(80px, 12vh, 150px) 0; position: relative; overflow: hidden; }
.block.dark { background: var(--ink); color: #fff; }
.block + .block:not(.dark) { border-top: 1px solid var(--line); }
.sec-glow { position: absolute; border-radius: 50%; pointer-events: none; z-index: 0; filter: blur(10px); }
.g-navy { top: -20%; right: -10%; width: 560px; height: 560px; background: radial-gradient(circle, rgba(45,90,135,.22), transparent 70%); }
.g-gold { bottom: -25%; left: -8%; width: 560px; height: 560px; background: radial-gradient(circle, rgba(184,146,74,.18), transparent 70%); }
.g-sage { top: -15%; left: -10%; width: 520px; height: 520px; background: radial-gradient(circle, rgba(92,122,110,.20), transparent 70%); }
.block .wrap { position: relative; z-index: 1; }

h2 { font-family: var(--display); font-weight: 600; font-size: clamp(2.3rem, 5.2vw, 4.4rem);
  line-height: .98; letter-spacing: -.03em; color: var(--ink); }
.dark h2 { color: #fff; }
h2 em { font-style: normal; background: linear-gradient(120deg, var(--gold), var(--gold-lt));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.lead { font-size: clamp(1rem, 1.6vw, 1.18rem); color: var(--grey); max-width: 560px; line-height: 1.7; margin-top: 22px; }
.lead.light { color: rgba(255,255,255,.6); }
.hint { font-family: var(--mono); font-size: 12px; color: rgba(255,255,255,.4); margin-top: 26px; }

/* ─── PRODUITS ─── */
.prod-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 18px; margin-top: clamp(50px,7vh,80px); }
.prod { border-radius: 22px; padding: clamp(26px,2.6vw,38px); min-height: 360px;
  display: flex; flex-direction: column; position: relative; overflow: hidden;
  transition: transform .4s var(--ease), box-shadow .4s; }
.prod:hover { transform: translateY(-6px); }
.prod-hero { grid-row: span 1; background: linear-gradient(155deg, #0B1220, #0F1A2E 55%, #0A1422);
  color: #fff; text-decoration: none; box-shadow: 0 24px 60px rgba(11,18,32,.28); }
.prod-aura { position: absolute; top: -90px; right: -90px; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(30,58,95,.5), transparent 70%); pointer-events: none; }
.prod-soon { background: var(--paper); border: 1px solid var(--line); }
.prod-soon:hover { box-shadow: 0 22px 50px rgba(11,18,32,.1); }

.prod-head { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.prod-idx { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; opacity: .4; }
.prod-hero .prod-idx { color: #fff; }
.prod-state { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--grey-soft); }
.prod-state.live { color: var(--gold-lt); }
.prod-body { margin-top: auto; position: relative; z-index: 1; }
.prod h3 { font-family: var(--display); font-weight: 600; font-size: clamp(1.7rem,2.6vw,2.3rem); letter-spacing: -.02em; margin-bottom: 12px; }
.prod-hero h3 { color: #fff; } .prod-soon h3 { color: var(--ink); }
.prod p { font-size: 14px; line-height: 1.65; color: var(--grey); }
.prod-hero p { color: rgba(255,255,255,.55); }

.prod-vis { display: flex; flex-direction: column; gap: 8px; margin: 22px 0 4px; position: relative; z-index: 1; }
.pv-row { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: rgba(255,255,255,.6);
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 11px; padding: 9px 12px; }
.pv-row b { margin-left: auto; color: #fff; letter-spacing: 1px; }
.pd { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.dot-sage { background: var(--sage); box-shadow: 0 0 7px var(--sage); }
.dot-gold { background: var(--gold-lt); box-shadow: 0 0 7px var(--gold-lt); }

.prod-go { font-family: var(--mono); font-size: 12.5px; color: var(--gold-lt); margin-top: 20px;
  position: relative; z-index: 1; transition: letter-spacing .25s var(--ease); }
.prod-hero:hover .prod-go { letter-spacing: .03em; }

/* ─── MÉTHODE ─── */
.rows { margin-top: clamp(50px,7vh,80px); }
.row { display: flex; gap: clamp(20px,4vw,56px); align-items: flex-start;
  padding: clamp(28px,4vh,42px) 0; border-top: 1px solid var(--line-d); }
.row:last-child { border-bottom: 1px solid var(--line-d); }
.row-n { font-family: var(--display); font-weight: 600; font-size: 1.7rem; color: var(--gold-lt);
  flex-shrink: 0; width: 44px; line-height: 1; }
.row-c h4 { font-family: var(--display); font-weight: 500; font-size: clamp(1.2rem,2.2vw,1.7rem); color: #fff; margin-bottom: 10px; letter-spacing: -.01em; }
.row-c p { font-size: 15px; color: rgba(255,255,255,.55); max-width: 620px; line-height: 1.7; }

/* ─── PRINCIPES ─── */
.grid4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; margin-top: clamp(50px,7vh,80px); }
.val { background: var(--paper); border: 1px solid var(--line); border-radius: 20px;
  padding: clamp(26px,2.4vw,34px); min-height: 260px; display: flex; flex-direction: column;
  position: relative; overflow: hidden; transition: transform .4s var(--ease), box-shadow .4s; }
.val:hover { transform: translateY(-5px); box-shadow: 0 22px 48px rgba(11,18,32,.1); }
.val::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.v1::before { background: linear-gradient(90deg, var(--navy), var(--navy-2)); }
.v2::before { background: linear-gradient(90deg, var(--gold), var(--gold-lt)); }
.v3::before { background: linear-gradient(90deg, var(--sage), var(--navy-2)); }
.v4::before { background: linear-gradient(90deg, var(--gold-lt), var(--sage)); }
.val-n { font-family: var(--mono); font-size: 12px; color: var(--gold); letter-spacing: .08em; margin-bottom: auto; }
.val h4 { font-family: var(--display); font-weight: 500; font-size: 1.3rem; letter-spacing: -.01em; margin: 30px 0 10px; }
.val p { font-size: 13.5px; color: var(--grey); line-height: 1.65; }

/* ─── VISION ─── */
.vision-inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px,6vw,80px); align-items: center; }
.globe-wrap { aspect-ratio: 1; width: min(460px, 86%); margin: 0 auto; }
#globe-canvas { width: 100%; height: 100%; cursor: grab; }
#globe-canvas:active { cursor: grabbing; }
.stats { display: flex; gap: clamp(22px,4vw,46px); margin-top: 34px; }

/* ─── CONTACT ─── */
.contact-inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px,6vw,80px); align-items: start; }
.cinfo { margin-top: 38px; }
.cinfo-row { display: flex; justify-content: space-between; gap: 20px; padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,.1); font-size: 14px; color: rgba(255,255,255,.8); }
.cinfo-l { color: var(--sage); font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.cinfo-row a { color: var(--gold-lt); border-bottom: 1px solid transparent; transition: border-color .2s; }
.cinfo-row a:hover { border-bottom-color: var(--gold-lt); }

.cform { display: flex; flex-direction: column; gap: 15px; }
.fl { display: flex; flex-direction: column; gap: 7px; }
.fl span { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.4); }
.fl input, .fl textarea { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14); border-radius: 12px;
  padding: 13px 16px; font-family: var(--body); font-size: 15px; color: #fff; outline: none; width: 100%;
  transition: border-color .2s, box-shadow .2s, background .2s; }
.fl input::placeholder, .fl textarea::placeholder { color: rgba(255,255,255,.3); }
.fl input:focus, .fl textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(184,146,74,.18); background: rgba(255,255,255,.07); }
.fl textarea { resize: vertical; min-height: 130px; }
.hp { position: absolute; left: -9999px; opacity: 0; }
.btn-send { margin-top: 4px; align-self: flex-start; background: linear-gradient(135deg, var(--navy), var(--gold));
  color: #fff; border: 0; border-radius: 100px; padding: 15px 30px; cursor: pointer;
  font-family: var(--display); font-weight: 500; font-size: 15px; display: inline-flex; align-items: center; gap: 10px;
  box-shadow: 0 12px 30px rgba(30,58,95,.4); transition: transform .12s, box-shadow .25s; }
.btn-send:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(30,58,95,.5); }
.btn-send:hover .ar { transform: translateX(4px); }
.btn-send:disabled { opacity: .6; cursor: not-allowed; }
.form-msg { font-size: 13.5px; padding: 2px; display: none; }
.form-msg.show { display: block; animation: fadeUp .4s var(--ease); }
.form-msg.ok { color: var(--sage); } .form-msg.err { color: var(--gold-lt); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ─── LÉGAL ─── */
.legal { background: var(--surface); }
.legal .kicker { color: var(--grey-soft); margin-bottom: 36px; }
.legal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 34px 56px; }
.lb h5 { font-family: var(--mono); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--gold); margin-bottom: 10px; }
.lb p { font-size: 13.5px; color: var(--grey); line-height: 1.8; }
.lb p b { color: var(--ink); font-weight: 600; }
.lb a { color: var(--gold); border-bottom: 1px solid rgba(184,146,74,.3); }

/* ─── FOOTER ─── */
.footer { background: #070A14; color: #fff; padding: 54px 0 30px; }
.footer-inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding-bottom: 28px; border-bottom: 1px solid var(--line-d); }
.footer-logo { font-family: var(--display); font-weight: 600; font-size: 20px; }
.footer-logo span { color: var(--gold); }
.footer-tag { color: rgba(255,255,255,.5); font-size: 15px; }
.footer-links { display: flex; gap: 26px; margin-left: auto; }
.footer-links a { font-size: 13.5px; color: rgba(255,255,255,.55); transition: color .2s; }
.footer-links a:hover { color: var(--gold-lt); }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 22px; font-size: 12px; color: rgba(255,255,255,.3); }

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 960px) {
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: flex; }
  .hero { grid-template-columns: 1fr; padding-top: 96px; }
  .hero-right { min-height: 440px; order: 2; }
  .hero-left { order: 1; padding-bottom: 2vh; }
  .prod-grid { grid-template-columns: 1fr; }
  .grid4 { grid-template-columns: 1fr 1fr; }
  .vision-inner, .contact-inner { grid-template-columns: 1fr; }
  .legal-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-links { width: 100%; margin-left: 0; }
}
@media (max-width: 540px) {
  .grid4 { grid-template-columns: 1fr; }
  .val, .prod { min-height: auto; }
  .hero-stats { flex-wrap: wrap; gap: 20px 30px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}