/* Landing Pistache — hero plein écran, statique (aucun framework). */

:root {
  --bg: #ffffff;
  --text: #0a0a0a;
  --muted: #1a1a1a;
  --blue: #006cd2;
  --blue-dark: #0053a3;
  --headline-muted: #6b7378;
  --glass: rgba(0, 0, 0, 0.13);
  --glass-blur: 18px;
  --glass-light: rgba(255, 255, 255, 0.28);
  --radius: 0;
  --font: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --pad-x: clamp(20px, 3.52vw, 64px);
  --nav-top: clamp(16px, 2.05vw, 28px);
  --btn-icon: 36px;
  --btn-pad-y: 12px;
  --btn-pad-x: 22px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

button {
  font: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

/* ---------- Shell ---------- */

.page {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: var(--nav-top) var(--pad-x) clamp(28px, 4.9vw, 48px);
}

.bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #ffffff;
  pointer-events: none;
  overflow: hidden;
}

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav,
.hero,
.lede,
.mobile-menu {
  position: relative;
  z-index: 1;
}

/* ---------- Nav ---------- */

.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.nav__links {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: clamp(22px, 2.6vw, 32px);
  padding: 24px 34px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border-radius: var(--radius);
}

.nav__links a {
  position: relative;
  font-size: clamp(13px, 1.37vw, 15px);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #0a0a0a;
  line-height: 1;
  white-space: nowrap;
  padding-bottom: 2px;
  transition: color 0.22s var(--ease-out), transform 0.22s var(--ease-out);
  animation: link-in 0.55s var(--ease-out) backwards;
  animation-delay: var(--d, 0s);
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 3px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s var(--ease-out);
}

.nav__links a:hover {
  color: var(--blue);
  transform: translateY(-2px);
}

.nav__links a:hover::after {
  transform: scaleX(1);
}

/* Logo */

.logo {
  justify-self: center;
  display: inline-flex;
  color: #0a0a0a;
  transition: transform 0.35s var(--ease-out);
}

.logo svg {
  width: clamp(30px, 3.2vw, 38px);
  height: auto;
  fill: currentColor;
  display: block;
}

.logo:hover {
  transform: scale(1.1);
}

.logo polygon {
  transform-box: fill-box;
  transform-origin: left center;
  animation: mark-in 0.5s var(--ease-out) backwards;
}

.logo polygon:nth-child(1) { animation-delay: 0.04s; }
.logo polygon:nth-child(2) { animation-delay: 0.09s; }
.logo polygon:nth-child(3) { animation-delay: 0.14s; }
.logo polygon:nth-child(4) { animation-delay: 0.19s; }
.logo polygon:nth-child(5) { animation-delay: 0.24s; }
.logo polygon:nth-child(6) { animation-delay: 0.29s; }

/* Burger */

.nav__burger {
  display: none;
  justify-self: end;
  width: 36px;
  height: 36px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: transform 0.22s var(--ease-out);
  animation: link-in 0.5s var(--ease-out) 0.16s backwards;
}

.nav__burger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: #0a0a0a;
  transition: width 0.22s var(--ease-out), background 0.22s var(--ease-out);
}

.nav__burger:hover {
  transform: scale(1.08);
}

.nav__burger:hover span {
  background: var(--blue);
}

.nav__burger:hover span:first-child,
.nav__burger:hover span:last-child {
  width: 14px;
}

/* Mobile menu */

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.25rem 0 0.5rem;
}

.mobile-menu > a:not(.btn) {
  padding: 16px 20px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  font-size: 1.05rem;
  font-weight: 500;
}

.mobile-menu[hidden] {
  display: none;
}

/* ---------- Buttons ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 18px;
  height: 58px;
  padding: var(--btn-pad-y) 10px var(--btn-pad-y) var(--btn-pad-x);
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.4s var(--ease-out);
  pointer-events: none;
}

.btn:hover::before {
  transform: scaleX(1);
}

.btn__label,
.btn__icon {
  position: relative;
  z-index: 1;
}

.btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--btn-icon);
  height: var(--btn-icon);
  transition: background 0.4s var(--ease-out), color 0.4s var(--ease-out);
}

.btn__icon svg {
  width: 14px;
  height: 14px;
  display: block;
}

/* Nav — bleu plein */

.btn--nav {
  justify-self: end;
  background: var(--blue);
  color: #ffffff;
  animation: wipe-right 0.65s var(--ease-out) 0.16s backwards;
}

.btn--nav::before {
  background: #004a96;
}

.btn--nav .btn__icon {
  background: var(--blue-dark);
  color: #ffffff;
}

.btn--nav:hover .btn__icon {
  background: #ffffff;
  color: var(--blue);
}

/* Light — blanc / bleu */

.btn--light {
  background: #ffffff;
  color: var(--blue);
}

.btn--light::before {
  background: #e8f2fb;
}

.btn--light .btn__icon {
  background: var(--blue);
  color: #ffffff;
}

/* Ghost — verre clair, sans icône */

.btn--ghost {
  padding: var(--btn-pad-y) 26px;
  color: #0a0a0a;
  background: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

.btn--ghost::before {
  background: rgba(255, 255, 255, 0.78);
  z-index: 0;
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

/* ---------- Hero ---------- */

.hero {
  margin-top: clamp(52px, 10.15vh, 92px);
  max-width: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: clamp(34px, 3.6vw, 42px);
  padding: 0 18px 0 14px;
  background: var(--glass-light);
  border: 1px solid rgba(0, 108, 210, 0.2);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  color: var(--muted);
  font-size: clamp(13px, 1.35vw, 15px);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.badge__square {
  width: 14px;
  height: 14px;
  background: #ffffff;
  border: 2px solid var(--blue);
  flex-shrink: 0;
}

.headline {
  margin-top: clamp(22px, 2.8vw, 36px);
  font-size: calc(clamp(2.9rem, 5.9vw, 5rem) + 3px);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.038em;
  color: #0a0a0a;
}

.headline__mask {
  display: block;
  overflow: hidden;
}

.headline__rise {
  display: block;
  animation: type-rise 0.85s var(--ease-out) backwards;
  animation-delay: var(--d, 0s);
}

.headline__line {
  white-space: nowrap;
}

.headline__muted {
  color: var(--headline-muted);
  font-weight: 600;
}

/* Accent — peinture en deux passes (bleu pâle puis bleu marque) */

.headline__accent {
  position: relative;
  display: inline-block;
  color: var(--headline-muted);
}

.headline__accent::before,
.headline__accent::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  white-space: nowrap;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 72px), transparent 100%);
  mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 72px), transparent 100%);
  -webkit-mask-size: 0% 100%;
  mask-size: 0% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  animation: accent-fill 1.05s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.headline__accent::before {
  color: #7eb6ee;
  animation-delay: 0.7s;
}

.headline__accent::after {
  color: var(--blue);
  animation-delay: 1.08s;
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: clamp(28px, 3.4vw, 42px);
}

.wipe {
  animation: wipe-left 0.7s var(--ease-out) backwards;
  animation-delay: var(--d, 0s);
}

/* ---------- Lede ---------- */

.lede {
  margin-top: auto;
  max-width: 700px;
  overflow: hidden;
  color: #ffffff;
  font-size: clamp(17px, 1.8vw, 20px);
  font-weight: 300;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.lede__rise {
  display: block;
  animation: type-rise 0.9s var(--ease-out) backwards;
  animation-delay: var(--d, 0s);
}

/* ---------- Keyframes ---------- */

@keyframes link-in {
  from {
    opacity: 0;
    transform: translate3d(-16px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes mark-in {
  from {
    opacity: 0;
    transform: translate3d(-12px, 8px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes wipe-right {
  from {
    clip-path: inset(0 0 0 100%);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes wipe-left {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes type-rise {
  from {
    transform: translate3d(0, 118%, 0);
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes accent-fill {
  from {
    -webkit-mask-size: 0% 100%;
    mask-size: 0% 100%;
  }
  to {
    -webkit-mask-size: calc(100% + 72px) 100%;
    mask-size: calc(100% + 72px) 100%;
  }
}

/* ---------- Mouvement réduit ---------- */

@media (prefers-reduced-motion: reduce) {
  .nav__links a,
  .nav__burger,
  .logo polygon,
  .btn--nav,
  .wipe,
  .headline__rise,
  .lede__rise {
    animation: none !important;
    opacity: 1;
    transform: none;
    clip-path: none;
  }

  .headline__accent {
    color: var(--blue);
  }

  .headline__accent::before,
  .headline__accent::after {
    content: none;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 820px) {
  html,
  body {
    overflow: auto;
  }

  .page {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .nav {
    grid-template-columns: auto 1fr auto;
  }

  .nav__links,
  .nav > .btn--nav {
    display: none;
  }

  .logo {
    justify-self: start;
  }

  .nav__burger {
    display: flex;
  }

  .mobile-menu {
    display: flex;
  }

  .mobile-menu[hidden] {
    display: none;
  }

  .hero {
    margin-top: 48px;
  }

  .headline {
    font-size: calc(clamp(2.75rem, 10vw, 3.85rem) + 3px);
  }

  .actions {
    flex-wrap: wrap;
  }

  .lede {
    width: 100%;
    max-width: 700px;
    margin-top: 64px;
  }
}

@media (max-height: 700px) and (min-width: 821px) {
  .hero {
    margin-top: 36px;
  }

  .headline {
    font-size: calc(clamp(2.75rem, 7.2vh, 4.15rem) + 3px);
  }
}
