/* Flux — direction « Ethereal Glass » : OLED noir, orbes de mesh, cartes double-bezel */

:root {
  --bg: #050505;
  --surface: #0b0b0d;
  --text: #f4f4f6;
  --muted: rgba(244, 244, 246, 0.7);
  --hair: rgba(255, 255, 255, 0.1);
  --accent: #8b7bff;
  --accent-2: #22d3ee;
  --accent-3: #ff4fd8;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --radius-xl: 2rem;
  --radius-inner: calc(2rem - 0.375rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* Le contenu glisse par-dessus le footer, qui reste fixé en bas (effet rideau) */
main {
  position: relative;
  z-index: 1;
  background: var(--bg);
  margin-bottom: 0;
  will-change: transform;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 500; letter-spacing: -0.03em; }
em { font-style: normal; color: var(--muted); }
h2 em, h1 em .w > span {
  color: transparent;
  background: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 55%, var(--accent-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  white-space: nowrap;
}
ul { list-style: none; margin: 0; padding: 0; }

.container { width: min(1120px, 100% - 2rem); margin-inline: auto; }
.narrow { width: min(720px, 100% - 2rem); }

/* ---------- Fond : orbes et grain (fixes, pointer-events none) ---------- */
.orbs { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.orb {
  position: absolute;
  width: 46vmax; height: 46vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  will-change: transform;
  animation: drift 26s var(--ease) infinite alternate;
}
.orb-a { background: radial-gradient(circle, #6d5bff, transparent 65%); top: -12vmax; left: -10vmax; }
.orb-b { background: radial-gradient(circle, #22d3ee, transparent 65%); bottom: -16vmax; right: -12vmax; animation-duration: 32s; }
.orb-c { background: radial-gradient(circle, #ff4fd8, transparent 65%); top: 40%; left: 40%; opacity: 0.14; animation-duration: 38s; }

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(6vw, 4vh, 0) scale(1.08); }
}

.grain {
  position: fixed; inset: 0; z-index: 50;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Navigation : pilule flottante ---------- */
.nav-wrap {
  position: fixed; top: calc(1.5rem + env(safe-area-inset-top, 0px)); left: 0; right: 0;
  z-index: 40;
  display: flex; justify-content: center;
  pointer-events: none;
}
.nav-pill {
  pointer-events: auto;
  display: flex; align-items: center; gap: 2rem;
  padding: 0.5rem 0.5rem 0.5rem 1.25rem;
  width: min(680px, calc(100% - 2rem));
  justify-content: space-between;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--hair);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
.brand { font-weight: 600; letter-spacing: -0.02em; font-size: 1.05rem; }
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a { font-size: 0.9rem; color: var(--muted); transition: color 500ms var(--ease); }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 0.5rem; }

.menu-toggle {
  position: relative;
  width: 2.75rem; height: 2.75rem;
  border-radius: 999px;
  border: 1px solid var(--hair);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: transform 700ms var(--ease);
}
.menu-toggle:active { transform: scale(0.98); }
.menu-toggle span {
  position: absolute; left: 50%; top: 50%;
  width: 1.05rem; height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 700ms var(--ease);
}
.menu-toggle span:first-child { transform: translate(-50%, -3px); }
.menu-toggle span:last-child  { transform: translate(-50%, 3px); }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translate(-50%, -50%) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child  { transform: translate(-50%, -50%) rotate(-45deg); }

/* ---------- Menu plein écran ---------- */
.menu {
  position: fixed; inset: 0; z-index: 45;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5, 5, 5, 0.82);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 700ms var(--ease), visibility 700ms;
}
.menu.is-open { opacity: 1; visibility: visible; }
.menu ul { display: grid; gap: 1.25rem; }
.menu a {
  display: flex; align-items: baseline; gap: 1rem;
  font-size: clamp(2.25rem, 8vw, 4.5rem);
  font-weight: 500; letter-spacing: -0.04em;
  transform: translateY(3rem);
  opacity: 0;
  transition: transform 800ms var(--ease), opacity 800ms var(--ease), color 500ms var(--ease);
}
.menu a span { font-size: 0.8rem; color: var(--muted); letter-spacing: 0.2em; }
.menu a:hover { color: var(--accent); }
.menu.is-open a { transform: translateY(0); opacity: 1; }
.menu.is-open li:nth-child(1) a { transition-delay: 100ms; }
.menu.is-open li:nth-child(2) a { transition-delay: 150ms; }
.menu.is-open li:nth-child(3) a { transition-delay: 200ms; }
.menu.is-open li:nth-child(4) a { transition-delay: 250ms; }

/* ---------- Boutons : pilule, bouton-dans-bouton ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-size: 0.95rem; font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 700ms var(--ease), background 700ms var(--ease), border-color 700ms var(--ease), color 700ms var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn:hover .btn-icon { transform: translate(4px, -1px) scale(1.05); }
.btn-primary { background: var(--text); color: #0a0a0a; }
.btn-primary:hover { background: #fff; }
.btn-ghost { background: rgba(255, 255, 255, 0.05); border-color: var(--hair); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.btn-block { width: 100%; justify-content: center; }

.btn-icon {
  display: inline-grid; place-items: center;
  width: 2rem; height: 2rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  transition: transform 700ms var(--ease);
}

/* ---------- Double-bezel : coque + cœur ---------- */
.double-bezel {
  padding: 0.375rem;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--hair);
}
.double-bezel-core {
  height: 100%;
  padding: 2rem;
  border-radius: var(--radius-inner);
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.12);
}
.double-bezel h2, .double-bezel h3 { font-size: 1.35rem; margin-bottom: 0.5rem; }
.double-bezel p { color: var(--muted); line-height: 1.6; }
.is-featured { border-color: rgba(139, 123, 255, 0.4); }

/* ---------- Typographie & rythme ---------- */
.eyebrow {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--hair);
  background: rgba(255, 255, 255, 0.04);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 1.5rem;
}
.label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--muted); margin-bottom: 1rem; }
.muted { color: var(--muted); }

.section { padding-block: clamp(6rem, 14vw, 10rem); }
.section-head { margin-bottom: 4rem; max-width: 640px; }
.section-head h2, .cta h2 { font-size: clamp(2.25rem, 5vw, 3.75rem); line-height: 1.02; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; min-height: 100dvh; display: flex; align-items: center; padding-top: 8rem; padding-bottom: 6rem; }
.hero .container { position: relative; z-index: 1; }
.space {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
  mask-image: linear-gradient(to bottom, #000 55%, transparent);
}
.page-hero { min-height: auto; padding-top: 10rem; padding-bottom: 4rem; }

/* ---------- Page d'authentification ---------- */
.auth { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 9rem 0 5rem; }
.auth-card { width: min(440px, 100% - 2rem); }
.auth-card .double-bezel-core { padding: 2.5rem 2rem; }
.auth-card h1 { font-size: clamp(2rem, 5vw, 2.5rem); line-height: 1.05; margin-bottom: 0.5rem; }
.auth-card .lead { color: var(--muted); font-size: 0.95rem; margin-bottom: 2rem; line-height: 1.5; }
.social { display: grid; gap: 0.75rem; }
.social .btn { width: 100%; justify-content: center; position: relative; }
.social .btn i {
  position: absolute; left: 1.25rem;
  display: inline-grid; place-items: center;
  width: 1.5rem; height: 1.5rem; border-radius: 999px;
  background: rgba(255,255,255,0.08);
  font-style: normal; font-size: 0.8rem; font-weight: 600;
}
.divider { display: flex; align-items: center; gap: 1rem; margin: 1.75rem 0; color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.15em; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--hair); }
.field { display: grid; gap: 0.5rem; margin-bottom: 1rem; }
.field label { font-size: 0.85rem; color: var(--muted); }
.field input {
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--hair);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 700ms var(--ease), background 700ms var(--ease);
}
.field input:focus { border-color: rgba(34,211,238,0.6); background: rgba(255,255,255,0.05); }
.form-submit { width: 100%; justify-content: center; margin-top: 0.5rem; }
.auth-status { min-height: 1.5rem; margin-top: 1rem; font-size: 0.85rem; color: var(--muted); line-height: 1.5; }
.auth-switch { margin-top: 1.5rem; text-align: center; font-size: 0.9rem; color: var(--muted); }
.auth-switch a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 480px) { .nav-actions .btn-primary { display: none; } }
a.double-bezel { display: block; transition: transform 700ms var(--ease); }
a.double-bezel:hover { transform: translateY(-4px); }
.hero-inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero-title {
  font-size: clamp(3rem, 9vw, 6.5rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  max-width: 14ch;
  margin-inline: auto;
}
.hero-sub { margin-top: 1.75rem; max-width: 52ch; font-size: clamp(1rem, 1.6vw, 1.2rem); color: var(--muted); line-height: 1.6; }
.hero-cta { margin-top: 2.5rem; display: flex; gap: 0.75rem; flex-wrap: wrap; justify-content: center; }
.hero-visual { margin-top: 5rem; width: min(720px, 100%); }
.hero-card .double-bezel-core { padding: 2.5rem 2rem; }

.flow { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.node {
  padding: 0.9rem 1.25rem;
  border-radius: 1rem;
  border: 1px solid var(--hair);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.95rem;
  white-space: nowrap;
}
.node-hi { border-color: rgba(139, 123, 255, 0.5); background: rgba(139, 123, 255, 0.12); }
.flow-line { flex: 1; height: 1px; background: var(--hair); position: relative; overflow: hidden; }
.flow-line i {
  position: absolute; top: -1px; left: 0;
  width: 40%; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: travel 2.4s var(--ease) infinite;
}
.flow-line:nth-of-type(2) i { animation-delay: 1.2s; }
@keyframes travel {
  from { transform: translateX(-100%); }
  to   { transform: translateX(260%); }
}
.flow-caption { margin-top: 1.5rem; font-size: 0.8rem; color: var(--muted); text-align: left; }

/* ---------- Logos ---------- */
.logos { padding-block: 2rem 4rem; }
.logos .label { text-align: center; }
.logo-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 2.5rem 3.5rem; color: rgba(244,244,246,0.62); font-size: 1.1rem; font-weight: 500; letter-spacing: -0.02em; }

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.25rem; }
.bento > .double-bezel:nth-child(1) { grid-column: span 8; grid-row: span 2; }
.bento > .double-bezel:nth-child(2) { grid-column: span 4; }
.bento > .double-bezel:nth-child(3) { grid-column: span 4; }
.bento-wide { grid-column: span 12; }

.bar-chart { margin-top: 2.5rem; height: 160px; display: flex; align-items: flex-end; gap: 0.75rem; }
.bar-chart i {
  flex: 1;
  height: var(--h);
  border-radius: 0.75rem 0.75rem 0.25rem 0.25rem;
  background: linear-gradient(180deg, rgba(139,123,255,0.7), rgba(139,123,255,0.08));
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 1000ms var(--ease);
}
.reveal.is-visible .bar-chart i { transform: scaleY(1); }
.bar-chart i:nth-child(2) { transition-delay: 60ms; }
.bar-chart i:nth-child(3) { transition-delay: 120ms; }
.bar-chart i:nth-child(4) { transition-delay: 180ms; }
.bar-chart i:nth-child(5) { transition-delay: 240ms; }
.bar-chart i:nth-child(6) { transition-delay: 300ms; }

.pulse { margin-top: 2rem; position: relative; width: 3rem; height: 3rem; }
.pulse span {
  position: absolute; inset: 0; border-radius: 50%;
  background: var(--accent);
  animation: ping 2.4s var(--ease) infinite;
}
@keyframes ping {
  0%   { transform: scale(0.4); opacity: 0.7; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* ---------- Pricing ---------- */
.pricing { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; max-width: 880px; margin-inline: auto; }
.plan { font-size: 0.9rem; color: var(--muted); margin-bottom: 0.5rem; }
.price { font-size: 3.25rem; letter-spacing: -0.04em; font-weight: 500; margin-bottom: 1.5rem; }
.price small { font-size: 0.95rem; color: var(--muted); letter-spacing: 0; margin-left: 0.25rem; }
.pricing ul { display: grid; gap: 0.75rem; margin-bottom: 2rem; color: var(--muted); font-size: 0.95rem; }

/* ---------- FAQ ---------- */
.faq {
  border-bottom: 1px solid var(--hair);
  padding: 1.5rem 0;
}
.faq summary { cursor: pointer; font-size: 1.1rem; list-style: none; display: flex; justify-content: space-between; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); transition: transform 700ms var(--ease); }
.faq[open] summary::after { transform: rotate(45deg); }
.faq p { margin-top: 1rem; color: var(--muted); line-height: 1.6; }

/* ---------- CTA ---------- */
.cta-core { text-align: center; padding: clamp(2.5rem, 6vw, 4.5rem); }
.cta-core h2 { margin-bottom: 2rem; }
.cta-form { display: flex; gap: 0.5rem; max-width: 480px; margin-inline: auto; padding: 0.375rem; border-radius: 999px; border: 1px solid var(--hair); background: rgba(255,255,255,0.03); }
.cta-form input {
  flex: 1; min-width: 0;
  padding: 0 1rem;
  background: transparent; border: 0; outline: none;
  color: var(--text); font: inherit;
}
.cta-form input::placeholder { color: rgba(244,244,246,0.55); }

/* ---------- Footer ---------- */
.footer {
  position: sticky;
  bottom: 0;
  z-index: 0;
  border-top: 1px solid var(--hair);
  padding-block: 4rem calc(2rem + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
}
.footer-marquee {
  overflow: hidden;
  padding-block: 1rem 3rem;
  white-space: nowrap;
  user-select: none;
}
.footer-marquee-track {
  display: inline-flex;
  gap: 0;
  font-size: clamp(4rem, 16vw, 13rem);
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 0.9;
  color: rgba(244, 244, 246, 0.07);
  animation: marquee 30s linear infinite;
  will-change: transform;
}
.footer-marquee-track span { display: inline-block; padding-right: 3rem; }
@keyframes marquee {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 2rem; }
.footer-grid nav { display: grid; gap: 0.6rem; align-content: start; }
.footer-grid nav a { color: var(--muted); font-size: 0.92rem; transition: color 500ms var(--ease); }
.footer-grid nav a:hover { color: var(--text); }
.footer-grid .brand { display: block; margin-bottom: 0.5rem; }
.footer-bottom { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--hair); font-size: 0.85rem; }

/* ---------- Apparition au scroll (transform + opacity + blur) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(4rem);
  filter: blur(8px);
  transition: opacity 900ms var(--ease), transform 900ms var(--ease), filter 900ms var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; filter: none; }
.bento .reveal:nth-child(2) { transition-delay: 80ms; }
.bento .reveal:nth-child(3) { transition-delay: 160ms; }
.bento .reveal:nth-child(4) { transition-delay: 240ms; }

/* ---------- Studio : tuiles-miniatures vers les outils ---------- */
.tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
@media (min-width: 900px) {
  .tools { grid-template-columns: repeat(3, 1fr); }
  .tools > .tool:first-child { grid-column: span 2; }
}
a.tool { transition: transform 700ms var(--ease); }
a.tool:hover { transform: translateY(-6px); }
a.tool:active { transform: scale(0.99); }
.thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: calc(var(--radius-inner) - 0.5rem);
  background: linear-gradient(120deg, var(--c1), var(--c2), var(--c1));
  background-size: 200% 200%;
  animation: thumb-flow 9s var(--ease) infinite alternate;
  display: flex; align-items: flex-end;
  padding: 1.25rem;
  overflow: hidden;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25);
}
.thumb::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.35), transparent 55%);
  pointer-events: none;
}
.thumb-name {
  position: relative; z-index: 1;
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: #050505;
  text-shadow: 0 1px 0 rgba(255,255,255,0.2);
}
.tool-desc { margin-top: 1rem; padding-inline: 0.25rem; color: var(--muted); font-size: 0.95rem; line-height: 1.5; }
@keyframes thumb-flow {
  from { background-position: 0% 50%; }
  to   { background-position: 100% 50%; }
}

/* ---------- Responsive : colonne unique sous 768px ---------- */
@media (max-width: 767px) {
  .nav-links { display: none; }
  .nav-pill { gap: 1rem; }
  .bento { grid-template-columns: 1fr; gap: 1.5rem; }
  .bento > .double-bezel,
  .bento-wide { grid-column: span 1; grid-row: auto; }
  .pricing { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .cta-form { flex-direction: column; border-radius: 1.5rem; padding: 0.5rem; }
  .cta-form input { padding: 0.75rem 1rem; }
  .cta-form .btn { justify-content: center; }
  .flow { flex-direction: column; }
  .flow-line { width: 1px; height: 2rem; flex: none; }
  .flow-line i { width: 3px; height: 40%; top: 0; left: -1px; animation-name: travel-v; }
  .section { padding-block: 6rem; }
  .double-bezel-core { padding: 1.5rem; }
  .container { width: calc(100% - 2rem); }
}
@keyframes travel-v {
  from { transform: translateY(-100%); }
  to   { transform: translateY(260%); }
}

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; filter: none; }
}
