:root {
  color-scheme: dark;
  --ink: #f8f9ff;
  --muted: #b7bfd9;
  --blue: #169dff;
  --violet: #8658ff;
  --pink: #f216a9;
  --bg: #03071c;
  --liquid-glass-shadow:
  0 0 8px rgba(0, 0, 0, .03),
  0 2px 6px rgba(0, 0, 0, .08),
  inset 3px 3px .5px -3.5px rgba(255, 255, 255, .09),
  inset -3px -3px .5px -3.5px rgba(255, 255, 255, .85),
  inset 1px 1px 1px -.5px rgba(255, 255, 255, .6),
  inset -1px -1px 1px -.5px rgba(255, 255, 255, .6),
  inset 0 0 6px 6px rgba(255, 255, 255, .12),
  inset 0 0 2px 2px rgba(255, 255, 255, .06),
  0 0 12px rgba(0, 0, 0, .15);
  --liquid-glass-shadow-compact:
  0 2px 6px rgba(0, 0, 0, .09),
  inset 2px 2px .5px -2.5px rgba(255, 255, 255, .18),
  inset -2px -2px .5px -2.5px rgba(255, 255, 255, .72),
  inset 1px 1px 1px -.5px rgba(255, 255, 255, .44),
  inset -1px -1px 1px -.5px rgba(255, 255, 255, .38),
  inset 0 0 5px 4px rgba(255, 255, 255, .09),
  0 0 12px rgba(0, 0, 0, .13);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background:
  radial-gradient(circle at 20% 20%, rgba(0,150,255,0.3), transparent 50%),
  radial-gradient(circle at 80% 80%, rgba(140,0,255,0.25), transparent 50%),
  #0b0e1f;
  background-attachment: fixed;
  font-family: "DM Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.logo {
  display: block;
  height: 30px;
  width: auto;
  max-height: 25px;
  flex-shrink: 0;
}

.site-header {
  position: fixed;
  z-index: 10000;
  top: var(--header-top, clamp(14px, 2.6vh, 26px));
  left: 50%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  width: var(--header-width, min(88%, 1400px));
  min-height: var(--header-height, 78px);
  align-items: center;
  padding: var(--header-pad-y, 8px) var(--header-pad-r, 18px) var(--header-pad-y, 8px) var(--header-pad-l, 25px);
  border: 1px solid rgba(224, 239, 255, 0.72);
  border-radius: 999px;
  background:
  radial-gradient(circle at 7% -35%, rgba(41, 174, 255, .28), transparent 35%),
  radial-gradient(circle at 94% 135%, rgba(239, 45, 210, .24), transparent 38%),
  linear-gradient(110deg, rgba(14, 47, 91, .68), rgba(8, 18, 60, .52) 47%, rgba(49, 9, 76, .64)),
  rgba(4, 13, 40, .56);
  box-shadow:
  var(--liquid-glass-shadow),
  0 20px 62px rgba(0, 0, 26, .42),
  -12px 0 38px rgba(24, 156, 255, .12),
  14px 0 42px rgba(237, 40, 213, .13),
  inset 12px 0 32px rgba(27, 133, 255, .08),
  inset -12px 0 32px rgba(234, 41, 210, .08);
  transform: translateX(-50%);
  backdrop-filter: blur(30px) saturate(155%) brightness(1.04);
  -webkit-backdrop-filter: blur(30px) saturate(155%) brightness(1.04);
  animation: header-in 900ms 80ms cubic-bezier(.2,.9,.2,1) both;
  will-change: transform, min-height, padding, width, top;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(90deg, #e8f9ff, rgba(82, 151, 255, .3) 40%, rgba(177, 90, 255, .52) 67%, #ff79ea);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: .84;
  filter: drop-shadow(0 0 7px rgba(105, 163, 255, .32));
}

.site-header::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 7%;
  left: 7%;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(238, 249, 255, .78) 28%, rgba(171, 198, 255, .28) 58%, rgba(255, 163, 241, .72), transparent);
  box-shadow: 0 8px 28px rgba(103, 150, 255, .16);
  opacity: .8;
  pointer-events: none;
}

@keyframes header-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-18px) scale(.98); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

.brand { display: inline-flex; width: max-content; align-items: center; gap: 9px; }

.brand__mark {
  width: var(--brand-mark-w, 49px);
  height: var(--brand-mark-h, 41px);
  filter: drop-shadow(0 0 13px rgba(118, 68, 255, 0.45));
}

.brand__word {
  display: flex;
  align-items: baseline;
  font: 700 var(--brand-word-size, clamp(21px, 1.72vw, 30px))/1 "Manrope", sans-serif;
  letter-spacing: -0.055em;
}

.brand__word b { color: #fff; font-weight: 700; }

.brand__word em {
  color: transparent;
  background: linear-gradient(90deg, #9566ff, #4ebcff);
  -webkit-background-clip: text;
  background-clip: text;
  font-style: normal;
}

.main-nav,
.auth-nav { display: flex; align-items: center; }

.main-nav { gap: clamp(32px, 5vw, 78px); }
.auth-nav { justify-content: flex-end; gap: clamp(18px, 2.6vw, 38px); }

.main-nav a,
.login-link {
  color: rgba(248, 250, 255, 0.94);
  font-size: var(--nav-font-size, clamp(13px, 1.14vw, 17px));
  font-weight: 500;
  text-shadow: 0 2px 18px rgba(0, 0, 18, 0.8);
  transition: color 180ms ease, transform 180ms ease;
}

.main-nav a:hover,
.login-link:hover { color: #9ed8ff; transform: translateY(-1px); }

.login-link {
  display: inline-flex;
  min-height: calc(var(--signup-height, 47px) - 4px);
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid rgba(229, 241, 255, .54);
  border-radius: 999px;
  background: linear-gradient(145deg, rgba(255,255,255,.1), rgba(255,255,255,.02));
  box-shadow: var(--liquid-glass-shadow-compact);
  backdrop-filter: blur(14px) saturate(145%);
  -webkit-backdrop-filter: blur(14px) saturate(145%);
}

.signup-link {
  display: inline-flex;
  min-height: var(--signup-height, 47px);
  align-items: center;
  justify-content: center;
  padding: 0 var(--signup-pad-x, 25px);
  border: 1px solid rgba(238, 248, 255, .86);
  border-radius: 999px;
  background:
  linear-gradient(180deg, rgba(255,255,255,.15), transparent 42%),
  radial-gradient(circle at 16% 20%, rgba(27, 156, 255, .25), transparent 42%),
  radial-gradient(circle at 86% 82%, rgba(232, 42, 205, .24), transparent 44%),
  rgba(25, 27, 82, .44);
  box-shadow:
  var(--liquid-glass-shadow),
  0 0 17px rgba(35, 180, 255, .62),
  0 0 27px rgba(244, 26, 191, .45),
  inset 0 -7px 18px rgba(88, 23, 144, .22);
  font-size: var(--nav-font-size, clamp(13px, 1.14vw, 17px));
  font-weight: 600;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.signup-link:hover {
  transform: translateY(-2px);
  box-shadow:
  var(--liquid-glass-shadow),
  0 0 25px rgba(35, 180, 255, .7),
  0 0 34px rgba(244, 26, 191, .48);
}

.signup-link:active { transform: translateY(0) scale(.98); }

/* ===================== */
/* ===== RESPONSIVE ===== */
/* ===================== */

@media (max-width: 960px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .main-nav {
    display: none;
  }
}

/* ------------------------------------------------------------------ */
/* MOBILE — la barre doit afficher : logo + Connexion + S'inscrire.    */
/* La nav principale reste masquée (pas de place). Le mot « ViralPics »*/
/* disparaît uniquement sous 400px, quand la largeur ne suffit plus.   */
/* ------------------------------------------------------------------ */
@media (max-width: 600px) {
  .site-header {
    top: var(--header-top, 10px);
    padding: var(--header-pad-y, 6px) var(--header-pad-r, 8px) var(--header-pad-y, 6px) var(--header-pad-l, 12px);
    grid-template-columns: 1fr auto;
    gap: 8px;
    max-width: calc(100vw - 20px);
  }

  .brand {
    min-width: 0;
    gap: 8px;
    overflow: hidden;
  }

  .brand__word {
    font-size: var(--brand-word-size, 15px);
  }

  .main-nav {
    display: none;
  }

  .auth-nav {
    min-width: 0;
    gap: 6px;
  }

  /* Réaffiché : le bouton Connexion était en display:none. */
  .login-link {
    display: inline-flex;
    min-height: calc(var(--signup-height, 36px) - 2px);
    padding: 0 11px;
    font-size: 12px;
    white-space: nowrap;
  }

  .signup-link {
    padding: 0 var(--signup-pad-x, 13px);
    font-size: 12px;
    white-space: nowrap;
  }
}

/* Très petits écrans (iPhone SE, 320–399px) : on sacrifie le mot. */
@media (max-width: 399px) {
  .site-header {
    padding: var(--header-pad-y, 6px) var(--header-pad-r, 7px) var(--header-pad-y, 6px) var(--header-pad-l, 10px);
  }

  .brand__word {
    display: none;
  }

  .login-link {
    padding: 0 9px;
    font-size: 11.5px;
  }

  .signup-link {
    padding: 0 11px;
    font-size: 11.5px;
  }
}

/* ======================== */
/* ===== BRAND SHOWCASE === */
/* ======================== */

.brand-showcase {
  position: relative;
  z-index: 2;
  height: 280vh;
  min-height: 2100px;
  margin-top: -100svh;
  border: 0;
  background: transparent;
}

@media (max-width: 768px) {
  .brand-showcase {
    height: 220vh;
    min-height: 1650px;
  }
}

/*
 * MOBILE — 180vh (contre 140vh) : la timeline interne va de 0 à 1 sur cette
 * distance, elle était donc traversée en un glissement et demi.
 */
@media (max-width: 600px) {
  .brand-showcase {
    height: 180vh;
    min-height: 1250px;
  }
}

.brand-showcase__sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 650px;
  overflow: hidden;
  isolation: isolate;
  border: 0;
  background: transparent;
}

@media (max-width: 600px) {
  .brand-showcase__sticky {
    height: 100svh;
    min-height: 450px;
  }
}

.brand-showcase__inner {
  position: relative;
  width: min(1480px, calc(100% - 72px));
  height: 100%;
  margin: 0 auto;
  perspective: 1400px;
  transform-style: preserve-3d;
}

@media (max-width: 600px) {
  .brand-showcase__inner {
    width: calc(100% - 32px);
  }
}

.brand-showcase__copy {
  position: absolute;
  z-index: 4;
  top: 33%;
  left: 1.8%;
  width: 48%;
  transform: none;
  transform-style: preserve-3d;
  will-change: opacity, transform, filter;
}

@media (max-width: 768px) {
  .brand-showcase__copy {
    top: 28%;
    width: 55%;
  }
}

/*
 * MOBILE — texte et images empilés verticalement, plus côte à côte.
 * Le titre (2 lignes, ~90px) + le paragraphe (3 lignes, ~60px) + la marge
 * occupent la bande 11%→40%. Le cluster démarre donc à 46% : plus aucun
 * recouvrement. AVANT : le texte à 18% et le cluster à 32% se croisaient.
 */
@media (max-width: 600px) {
  .brand-showcase__copy {
    top: 11%;
    left: 4%;
    width: 92%;
  }
}

.brand-showcase__copy--creative {
  opacity: 0;
  filter: blur(9px);
  pointer-events: none;
}

.brand-showcase__copy h2 {
  margin: 0;
  min-height: 2lh;
  color: #fff;
  font-family: "Manrope", sans-serif;
  font-size: clamp(40px, 3.6vw, 62px);
  font-weight: 750;
  line-height: 1.02;
  letter-spacing: -.052em;
  text-wrap: balance;
  text-shadow: 0 12px 42px rgba(0,0,24,.28);
}

@media (max-width: 600px) {
  .brand-showcase__copy h2 {
    font-size: clamp(25px, 6.2vw, 36px);
  }
}

.brand-showcase__copy p {
  margin: clamp(54px, 8vh, 86px) 0 0;
  color: rgba(231,236,252,.82);
  font-size: clamp(16px, 1.28vw, 21px);
  font-weight: 550;
  line-height: 1.22;
  letter-spacing: -.025em;
}

@media (max-width: 600px) {
  .brand-showcase__copy p {
    margin-top: 14px;
    font-size: 13.5px;
    line-height: 1.32;
  }
}

.premium-reveal {
  opacity: 0;
  filter: blur(8px);
  transform: translate3d(0,30px,0);
  will-change: opacity, transform, filter;
}

.product-image-cluster,
.creative-image-cluster {
  position: absolute;
  z-index: 3;
  top: 21%;
  right: 0;
  width: 48%;
  height: 61%;
  pointer-events: none;
  transform-style: preserve-3d;
  will-change: opacity, transform, filter;
}

@media (max-width: 768px) {
  .product-image-cluster,
  .creative-image-cluster {
    top: 20%;
    width: 52%;
    height: 65%;
  }
}

/*
 * MOBILE — le cluster démarre sous le texte (46%) et occupe la moitié basse.
 * `aspect-ratio: 1.05` plutôt qu'un carré strict : ça laisse ~4% de garde
 * en bas sur un iPhone SE (667px de haut).
 */
@media (max-width: 600px) {
  .product-image-cluster,
  .creative-image-cluster {
    position: absolute;
    top: 46%;
    right: auto;
    left: 4%;
    width: 92%;
    height: auto;
    aspect-ratio: 1.05;
  }
}

.creative-image-cluster {
  opacity: 0;
  filter: blur(10px);
}

.product-showcase-card,
.creative-showcase-card {
  position: absolute;
  overflow: hidden;
  margin: 0;
  pointer-events: auto;
  cursor: pointer;
  border-radius: clamp(17px, 1.45vw, 24px);
  background: rgba(4,9,31,.88);
  box-shadow:
  0 24px 50px rgba(0,0,27,.32),
  0 4px 14px rgba(0,0,20,.22),
  inset 0 0 0 1px rgba(255,255,255,.08);
  transform-origin: center;
  transition:
  box-shadow .38s cubic-bezier(.16,1,.3,1),
  filter .38s cubic-bezier(.16,1,.3,1);
  will-change: left, top, width, height, transform;
}

.product-showcase-card img,
.creative-showcase-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: none;
}

.creative-showcase-card--1 { z-index: 4; left: 24%; top: 17%; width: 58%; height: 50%; }
.creative-showcase-card--2 { z-index: 3; left: 84%; top: 22%; width: 31%; height: 32%; }
.creative-showcase-card--3 { z-index: 2; left: 30%; top: 66%; width: 48%; height: 30%; }
.creative-showcase-card--4 { z-index: 1; left: 83%; top: 66%; width: 44%; height: 30%; }

@media (max-width: 600px) {
  .product-showcase-card--1 { z-index: 4; left: 8%; top: 8%; width: 38%; height: 38%; }
  .product-showcase-card--2 { z-index: 3; left: 54%; top: 12%; width: 34%; height: 34%; }
  .product-showcase-card--3 { z-index: 2; left: 10%; top: 54%; width: 38%; height: 38%; }
  .product-showcase-card--4 { z-index: 1; left: 52%; top: 54%; width: 38%; height: 38%; }

  .creative-showcase-card--1 { z-index: 4; left: 8%; top: 10%; width: 40%; height: 40%; }
  .creative-showcase-card--2 { z-index: 3; left: 54%; top: 12%; width: 36%; height: 36%; }
  .creative-showcase-card--3 { z-index: 2; left: 10%; top: 56%; width: 38%; height: 36%; }
  .creative-showcase-card--4 { z-index: 1; left: 52%; top: 56%; width: 36%; height: 36%; }
}

@media (hover: hover) and (pointer: fine) {
  .product-showcase-card:hover {
    z-index: 12;
    filter: brightness(1.045) saturate(1.04);
    box-shadow:
    0 30px 68px rgba(0,0,32,.42),
    0 8px 24px rgba(88,77,255,.22),
    inset 0 0 0 1px rgba(255,255,255,.18);
  }
}

.product-showcase-card--1 { z-index: 4; left: 26%; top: 19%; width: 44%; height: 40%; transform: rotate(-4deg) scale(.82); }
.product-showcase-card--2 { z-index: 3; left: 61%; top: 29%; width: 27%; height: 28%; transform: rotate(5deg) scale(.82); }
.product-showcase-card--3 { z-index: 2; left: 28%; top: 56%; width: 36%; height: 27%; transform: rotate(3deg) scale(.82); }
.product-showcase-card--4 { z-index: 1; left: 58%; top: 58%; width: 32%; height: 26%; transform: rotate(-3deg) scale(.82); }

@media (max-width: 600px) {
  .product-showcase-card--1 { transform: rotate(-2deg) scale(0.8); }
  .product-showcase-card--2 { transform: rotate(2deg) scale(0.8); }
  .product-showcase-card--3 { transform: rotate(1deg) scale(0.8); }
  .product-showcase-card--4 { transform: rotate(-1deg) scale(0.8); }
}

.showcase-motion-path {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.35) 8%,
    #000 20%,
    #000 80%,
    rgba(0, 0, 0, 0.4) 93%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.35) 8%,
    #000 20%,
    #000 80%,
    rgba(0, 0, 0, 0.4) 93%,
    transparent 100%
  );
}

.showcase-motion-path path {
  fill: none;
  stroke-linecap: round;
  stroke-width: 3;
}

.showcase-motion-path__base {
  stroke: transparent;
  stroke-dasharray: 8 12;
  filter: none;
}

.showcase-motion-path__progress {
  stroke: url(#showcasePathGradient);
  stroke-dasharray: 8 12;
  clip-path: inset(var(--showcase-path-clip, 100%) 0 0 0);
  filter: drop-shadow(0 0 7px rgba(205, 52, 226, 0.32));
  animation: showcase-path-flow 1.9s linear infinite;
}

@keyframes showcase-path-flow {
  to {
    stroke-dashoffset: -40;
  }
}

/* Le tracé décoratif encombre plus qu'il n'apporte sur un écran étroit. */
@media (max-width: 600px) {
  .showcase-motion-path {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .showcase-motion-path__progress {
    animation: none;
  }
}

.noscript {
  position: fixed;
  z-index: 99;
  right: 20px;
  bottom: 20px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #1b2140;
}