/* ============================================================
   UbDesigner — Marketing v4 · Refonte premium "AI Design Lab"
   Inspiration Vizcom · identité 3D / fabrication / geste / WebGL.
   Couche chargée EN DERNIER : redéfinit direction visuelle, hiérarchie,
   mise en scène et motion. NE TOUCHE PAS au contenu (texte/ordre).
   ============================================================ */

/* ── Palette v4 (accents bleu électrique / violet IA / cyan WebGL) ── */
:root {
  --v4-blue:   #2B6BFF;
  --v4-blue-d: #1B4FE0;
  --v4-violet: #7B5BFF;
  --v4-cyan:   #22D3EE;
  --v4-green:  #34D399;
  --v4-ink:    #0A0E1A;   /* noir profond bleuté */
  --v4-anthra: #12161F;   /* anthracite */
  --v4-paper:  #F6F7F9;   /* blanc cassé */
  --v4-paper2: #EEF0F4;   /* gris très clair */
  --v4-line:   rgba(11,21,48,.10);
  --v4-line-2: rgba(11,21,48,.06);
  --v4-glow:   rgba(43,107,255,.35);
  --ease-premium: cubic-bezier(.22,.61,.36,1);
  --ease-out-expo: cubic-bezier(.16,1,.3,1);

  /* On recolore l'accent global de la home vers le bleu électrique. */
  --accent: var(--v4-blue);
  --accent-hover: var(--v4-blue-d);
  --accent-soft: rgba(43,107,255,.10);
}

body { background: var(--v4-paper); }

/* Sélection */
::selection { background: rgba(43,107,255,.20); }

/* Labels techniques monospace : plus présents, plus "interface" */
.eyebrow, .section-coords, .caption, .mono, .hero-trust, .demo-chrome, .canvas-axis {
  font-family: var(--font-mono);
}
.eyebrow { letter-spacing: .10em; text-transform: uppercase; font-size: 11.5px; }

/* Titres éditoriaux : plus grands, plus serrés */
h1 { letter-spacing: -.035em; }
h2 { letter-spacing: -.03em; }

/* ============================================================
   1 · Scroll progress (haut) + dots de section (gauche)
   ============================================================ */
#v4-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--v4-blue), var(--v4-violet), var(--v4-cyan));
  z-index: 120; transition: width .1s linear; box-shadow: 0 0 12px var(--v4-glow);
}
#v4-dots {
  position: fixed; left: 20px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 14px; z-index: 60;
}
#v4-dots a {
  width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--v4-line);
  background: transparent; transition: all .3s var(--ease-premium); position: relative;
}
#v4-dots a::after {
  content: attr(data-label); position: absolute; left: 20px; top: 50%; transform: translateY(-50%) translateX(-6px);
  font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-2); white-space: nowrap;
  opacity: 0; pointer-events: none; transition: all .3s var(--ease-premium);
  background: rgba(255,255,255,.9); padding: 3px 8px; border-radius: 6px; box-shadow: var(--shadow-sm);
}
#v4-dots a:hover::after { opacity: 1; transform: translateY(-50%) translateX(0); }
#v4-dots a.is-active { background: var(--v4-blue); border-color: var(--v4-blue); box-shadow: 0 0 10px var(--v4-glow); transform: scale(1.25); }
@media (max-width: 1100px) { #v4-dots { display: none; } }

/* ============================================================
   2 · Header glass premium + état actif
   ============================================================ */
.site-header {
  background: rgba(246,247,249,.55) !important;
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid transparent !important;
  transition: background .4s var(--ease-premium), border-color .4s var(--ease-premium), box-shadow .4s var(--ease-premium);
}
body.v4-scrolled .site-header {
  background: rgba(246,247,249,.82) !important;
  border-bottom-color: var(--v4-line-2) !important;
  box-shadow: 0 6px 30px rgba(11,21,48,.06);
}
.nav-links a::after { background: var(--v4-blue) !important; height: 2px !important; }
.nav-links a.is-active { color: var(--v4-blue); }
.nav-links a.is-active::after { width: 100%; }

/* Boutons : magnétisme géré en JS ; ici le style premium */
.btn { transition: transform .35s var(--ease-premium), box-shadow .35s var(--ease-premium), background .3s var(--ease-premium), border-color .3s var(--ease-premium); }
.btn-primary { background: var(--v4-blue); box-shadow: 0 6px 20px rgba(43,107,255,.28); }
.btn-primary:hover { background: var(--v4-blue-d); box-shadow: 0 10px 30px rgba(43,107,255,.42); }
.btn .arrow { transition: transform .35s var(--ease-premium); display: inline-block; }
.btn:hover .arrow { transform: translateX(4px); }

/* ============================================================
   3 · HERO — re-mise en scène premium
   ============================================================ */
.hero.hero-cine {
  background: var(--v4-ink);
  padding-top: 150px;
}
.hero-cine .hero-bg-scrim {
  background:
    radial-gradient(120% 90% at 80% 25%, rgba(43,107,255,.22), transparent 55%),
    radial-gradient(90% 80% at 10% 95%, rgba(123,91,255,.18), transparent 60%),
    linear-gradient(180deg, rgba(10,14,26,.72) 0%, rgba(10,14,26,.66) 45%, var(--v4-ink) 100%);
}
.hero-cine h1 {
  font-size: clamp(44px, 6vw, 92px);
  line-height: .98;
  font-weight: 700;
}
.hero-cine h1 em { color: var(--v4-cyan); }
.hero-cine h1 em::after { background: var(--v4-cyan); opacity: .22; }
.hero-cine .eyebrow .eb-bar { background: var(--v4-cyan); }
.hero-cine .btn-ghost { border-color: rgba(255,255,255,.28) !important; }
.hero-cine .btn-ghost:hover { border-color: var(--v4-cyan) !important; background: rgba(34,211,238,.08); }
.hero-cine .stars { color: var(--v4-cyan); }

/* Compteurs premium (hero-meta) */
.hero-meta { gap: 30px; }
.hero-meta-item .num {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(30px, 3vw, 42px);
  background: linear-gradient(120deg, #fff, #B9C6FF);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  font-variant-numeric: tabular-nums;
}
.hero-meta-item .lbl { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .04em; }

/* Cadre visuel hero : canvas WebGL-look par-dessus l'image (fallback) */
.hero-visual { border: 1px solid rgba(255,255,255,.10); box-shadow: 0 40px 130px rgba(0,0,0,.6), 0 0 0 1px rgba(43,107,255,.10); }
.hero-visual::before { background: radial-gradient(circle, rgba(43,107,255,.5), transparent 70%); }
.hero-visual .hv-scan { background: linear-gradient(180deg, transparent, rgba(34,211,238,.16), transparent); }
.hero-visual .hv-chip { background: rgba(34,211,238,.14); border-color: rgba(34,211,238,.4); color: #BEEFF7; }
#hero-canvas { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; opacity: 0; transition: opacity 1s var(--ease-premium); pointer-events: none; }
#hero-canvas.on { opacity: 1; }
#hero-canvas.on ~ img { opacity: .16; }

/* Badges techniques flottants */
.hero-badges { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.hero-badges b {
  position: absolute; display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500; color: #E7ECFF;
  background: rgba(10,14,26,.62); border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px; padding: 6px 12px; backdrop-filter: blur(8px);
  animation: v4float 6s var(--ease-premium) infinite;
}
.hero-badges b i { width: 6px; height: 6px; border-radius: 50%; background: var(--v4-cyan); box-shadow: 0 0 8px var(--v4-cyan); font-style: normal; }
.hero-badges b:nth-child(1){ top: 8%; right: 6%; animation-delay: 0s; }
.hero-badges b:nth-child(2){ top: 30%; left: -4%; animation-delay: .8s; }
.hero-badges b:nth-child(3){ bottom: 22%; right: -3%; animation-delay: 1.6s; }
.hero-badges b:nth-child(4){ bottom: 6%; left: 8%; animation-delay: 2.4s; }
.hero-badges b:nth-child(5){ top: 54%; right: 14%; animation-delay: 3.2s; }
@keyframes v4float { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-10px);} }
@media (max-width: 900px){ .hero-badges { display: none; } }

/* ============================================================
   4 · Bandeaux cinétiques (proof + logos) — capsules tech
   ============================================================ */
.proof-strip { background: var(--v4-anthra); }
.logos-strip { background: var(--v4-paper2); border-top: 1px solid var(--v4-line-2); border-bottom: 1px solid var(--v4-line-2); }
.logos-track .logo-item {
  border: 1px solid var(--v4-line); border-radius: 999px; padding: 9px 18px 9px 10px;
  background: #fff; transition: all .35s var(--ease-premium); box-shadow: var(--shadow-sm);
}
.logos-track .logo-item:hover { border-color: var(--v4-blue); box-shadow: 0 8px 24px rgba(43,107,255,.18); transform: translateY(-2px); }
.logos-track .lg-mark {
  background: linear-gradient(135deg, var(--v4-blue), var(--v4-violet)); color: #fff !important;
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 11px;
}

/* ============================================================
   5 · Cartes "module logiciel" (piliers, workflow, ai-modules)
   ============================================================ */
.step-card, .pilier, .price-card, .gal-card, .ai-module, .testimonial, .research-tile {
  transition: transform .5s var(--ease-premium), box-shadow .5s var(--ease-premium), border-color .5s var(--ease-premium);
  will-change: transform;
}
.pilier {
  background: #fff; border: 1px solid var(--v4-line-2); border-radius: 18px;
  position: relative; overflow: hidden;
}
.pilier::before {
  content: ''; position: absolute; inset: 0; border-radius: 18px; padding: 1px;
  background: linear-gradient(135deg, var(--v4-blue), var(--v4-violet), var(--v4-cyan));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .5s var(--ease-premium);
}
.pilier:hover::before { opacity: .9; }
.pilier:hover { transform: translateY(-8px); box-shadow: 0 24px 60px rgba(11,21,48,.14); }
.pilier .p-glyph { color: var(--v4-blue); }
.pilier .p-modules span { transition: all .35s var(--ease-premium); }
.pilier:hover .p-modules span { border-color: var(--v4-blue); color: var(--v4-blue); }

.step-card:hover { transform: translateY(-8px); box-shadow: 0 24px 60px rgba(11,21,48,.14); border-color: var(--v4-blue); }
.step-card .step-media::after { background: linear-gradient(180deg, transparent 40%, rgba(10,14,26,.55)); }
.step-card .sm-n, .step-n { color: var(--v4-blue); }

/* AI Vision immersif */
.ai-vision { background: var(--v4-ink); }
.ai-module { background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08); transition: all .4s var(--ease-premium); }
.ai-module:hover { transform: translateY(-5px); border-color: var(--v4-violet); background: rgba(123,91,255,.08); }
.ai-module .ai-dot { background: var(--v4-cyan); box-shadow: 0 0 10px var(--v4-cyan); }
.ai-module .ai-tech { color: var(--v4-cyan); }
.ai-hero-media { border: 1px solid rgba(255,255,255,.12); box-shadow: 0 30px 90px rgba(0,0,0,.55); }
.ai-hero-media .hv-scan { background: linear-gradient(180deg, transparent, rgba(123,91,255,.18), transparent); }
.ai-hero-copy strong { color: var(--v4-cyan); }
.ai-hero-tags span { color: #CBB6FF; background: rgba(123,91,255,.12); border-color: rgba(123,91,255,.30); }

/* ============================================================
   6 · Galerie masonry premium + overlay hover
   ============================================================ */
.gal-card { border-radius: 16px; }
.gal-card .gal-img.gal-photo::after {
  background: linear-gradient(180deg, transparent 40%, rgba(10,14,26,.66));
  opacity: 0; transition: opacity .45s var(--ease-premium);
}
.gal-card:hover .gal-img.gal-photo::after { opacity: 1; }
.gal-card:hover { transform: translateY(-6px); box-shadow: 0 26px 60px rgba(11,21,48,.20); }
.gal-card .gal-tag { background: rgba(43,107,255,.85); color: #fff; border: 0; backdrop-filter: none; }
.gal-card .gal-meta { transform: translateY(6px); opacity: .96; transition: all .45s var(--ease-premium); }
.gal-card:hover .gal-meta { transform: translateY(0); }
.gal-card .gal-meta .heart { color: var(--v4-cyan); }

/* ============================================================
   7 · Recherche — esthétique laboratoire / timeline
   ============================================================ */
.research-card { border: 1px solid var(--v4-line-2); }
.research-tile { border: 1px solid var(--v4-line-2); border-radius: 12px; position: relative; transition: all .4s var(--ease-premium); }
.research-tile::before { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 2px; background: linear-gradient(var(--v4-blue), var(--v4-violet)); border-radius: 2px; opacity: 0; transition: opacity .4s var(--ease-premium); }
.research-tile:hover { transform: translateX(4px); border-color: var(--v4-blue); }
.research-tile:hover::before { opacity: 1; }
.research-tile .rt-label { color: var(--v4-blue); }

/* ============================================================
   8 · Tarifs premium + halo Pro
   ============================================================ */
.price-card { border: 1px solid var(--v4-line-2); border-radius: 18px; background: #fff; }
.price-card:hover { transform: translateY(-8px); box-shadow: 0 26px 60px rgba(11,21,48,.14); }
.price-card.is-featured { position: relative; border-color: transparent; }
.price-card.is-featured::before {
  content: ''; position: absolute; inset: -1px; border-radius: 19px; padding: 1.5px; z-index: -1;
  background: linear-gradient(135deg, var(--v4-blue), var(--v4-violet), var(--v4-cyan));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.price-card.is-featured { box-shadow: 0 20px 60px rgba(43,107,255,.20); }
.price-card .p-tier .tag { background: var(--v4-blue); color: #fff; }
.price-card .p-price .num { color: var(--fg-1); }
.price-card.is-featured .btn-primary { background: var(--v4-blue); }

/* Témoignages éditoriaux */
.testimonial { border: 1px solid var(--v4-line-2); border-radius: 18px; }
.testimonial:hover { transform: translateY(-6px); box-shadow: 0 24px 60px rgba(11,21,48,.12); }
.testimonial .quote-mark { color: var(--v4-blue); opacity: .18; }

/* Démo : cadre logiciel plus crédible */
.demo-frame { border-radius: 16px; box-shadow: 0 40px 100px rgba(11,21,48,.28); }
.demo-chrome .url { color: var(--v4-cyan); }
.demo-toast .t-dot { background: var(--v4-green); box-shadow: 0 0 8px var(--v4-green); }

/* CTA final : objet abstrait en rotation */
.cta-final { background: var(--v4-ink); position: relative; overflow: hidden; }
#cta-orb { position: absolute; inset: 0; z-index: 0; opacity: .5; pointer-events: none; }
.cta-final .container { position: relative; z-index: 1; }
.cta-final .em-line { color: var(--v4-cyan) !important; }
.cta-final .btn-primary { background: var(--v4-blue); }

/* ============================================================
   9 · Reveal (masque) + tilt — primitives motion
   ============================================================ */
[data-v4-reveal] { opacity: 0; transform: translateY(38px); transition: opacity .9s var(--ease-out-expo), transform .9s var(--ease-out-expo); }
[data-v4-reveal].in { opacity: 1; transform: none; }
[data-v4-reveal].d1 { transition-delay: .08s; } [data-v4-reveal].d2 { transition-delay: .16s; }
[data-v4-reveal].d3 { transition-delay: .24s; } [data-v4-reveal].d4 { transition-delay: .32s; }

.tilt { transform-style: preserve-3d; }

/* ============================================================
   10 · Menu mobile plein écran
   ============================================================ */
#v4-burger { display: none; }
@media (max-width: 820px) {
  #v4-burger {
    display: inline-flex; flex-direction: column; gap: 5px; width: 40px; height: 40px;
    align-items: center; justify-content: center; border: 1px solid var(--v4-line);
    border-radius: 10px; background: #fff; cursor: pointer; margin-left: 8px;
  }
  #v4-burger i { width: 18px; height: 2px; background: var(--fg-1); border-radius: 2px; transition: transform .35s var(--ease-premium), opacity .35s; }
  body.v4-menu #v4-burger i:nth-child(1){ transform: translateY(7px) rotate(45deg); }
  body.v4-menu #v4-burger i:nth-child(2){ opacity: 0; }
  body.v4-menu #v4-burger i:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }
}
#v4-mobile {
  position: fixed; inset: 0; z-index: 110; background: rgba(246,247,249,.98);
  backdrop-filter: blur(20px); display: flex; flex-direction: column; justify-content: center;
  gap: 6px; padding: 40px; opacity: 0; pointer-events: none; transition: opacity .4s var(--ease-premium);
}
body.v4-menu #v4-mobile { opacity: 1; pointer-events: auto; }
#v4-mobile a {
  font-family: var(--font-display); font-size: 30px; font-weight: 600; color: var(--fg-1);
  text-decoration: none; padding: 10px 0; border-bottom: 1px solid var(--v4-line-2);
  opacity: 0; transform: translateY(16px); transition: all .5s var(--ease-out-expo);
}
body.v4-menu #v4-mobile a { opacity: 1; transform: none; }
#v4-mobile a:nth-child(1){ transition-delay: .05s; } #v4-mobile a:nth-child(2){ transition-delay: .10s; }
#v4-mobile a:nth-child(3){ transition-delay: .15s; } #v4-mobile a:nth-child(4){ transition-delay: .20s; }
#v4-mobile a:nth-child(5){ transition-delay: .25s; } #v4-mobile a:nth-child(6){ transition-delay: .30s; }
#v4-mobile a:nth-child(7){ transition-delay: .35s; }

/* ============================================================
   11 · Accessibilité / reduced-motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  [data-v4-reveal] { opacity: 1 !important; transform: none !important; }
  .hero-badges b, #cta-orb, #hero-canvas { animation: none !important; }
  #v4-progress { transition: none; }
}
:focus-visible { outline: 2px solid var(--v4-blue); outline-offset: 3px; border-radius: 4px; }
