/* Optimistic Text = police Muse / Meta (CDN Meta) */
@font-face {
  font-family: "Optimistic Text";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("https://static.xx.fbcdn.net/rsrc.php/y2/r/6YirsaXqsap.woff2") format("woff2");
}

@font-face {
  font-family: "Optimistic Text";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("https://static.xx.fbcdn.net/rsrc.php/ye/r/ndhgOwkNmDs.woff2") format("woff2");
}

@font-face {
  font-family: "Optimistic Text";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("https://static.xx.fbcdn.net/rsrc.php/y8/r/WF8VhTuShVE.woff2") format("woff2");
}

:root {
  --bg: #000000;
  --surface: #1c1c1e;
  --surface-hover: #2c2c2e;
  --text: #ffffff;
  --muted: #8e8e93;
  --blue: #4a90e2;
  --blue-press: #3a7bc8;
  --danger: #ff3b30;
  --font: "Optimistic Text", Helvetica, Arial, sans-serif;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100svh;
  font-family: var(--font);
  font-size: 17px;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  padding: 18px 20px;
  z-index: 2;
}

.topbar-brand {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 20px;
}

.stage {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 72px 20px 48px;
  text-align: center;
  animation: rise 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.mark {
  display: block;
  width: 140px;
  height: 140px;
  margin: 0 0 28px;
  object-fit: contain;
}

h1 {
  margin: 0;
  width: min(46rem, 100%);
  font-size: 37px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.headline-fixed {
  display: block;
  white-space: nowrap;
}

.rotator {
  position: relative;
  display: block;
  margin-top: 0;
  min-height: 1.25em;
}

.rotator-item {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex-wrap: nowrap;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition:
    opacity 420ms ease,
    transform 420ms ease;
}

.rotator-item.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.rotator-item.is-exit {
  opacity: 0;
  transform: translateY(-10px);
}

.topic {
  flex: 0 0 auto;
  font-size: 0.72em;
  line-height: 1;
}

.phrase {
  flex: 0 0 auto;
  text-align: center;
  white-space: nowrap;
}

.sub {
  margin: 28px 0 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 20px;
  color: var(--muted);
}

.waitlist {
  width: min(420px, 100%);
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}

.email-wrap {
  position: relative;
  width: 100%;
}

.waitlist input {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  padding: 0 20px;
  font-family: var(--font);
  font-size: 17px;
  font-weight: 400;
  line-height: 20px;
  text-align: left;
  outline: none;
  transition: background 160ms ease;
}

.waitlist input::placeholder {
  color: var(--muted);
}

.waitlist input:focus {
  background: var(--surface-hover);
}

.waitlist input.is-invalid {
  background: var(--surface) !important;
  color: transparent !important;
  caret-color: transparent;
}

.email-error {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 16px;
  border-radius: 999px;
  pointer-events: auto;
  cursor: pointer;
  color: #ffffff;
  font-family: var(--font);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: lowercase;
  line-height: 1.1;
}

.email-error[hidden] {
  display: none !important;
}

.waitlist button {
  height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 0 20px;
  background: var(--blue);
  color: #ffffff;
  font-family: var(--font);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 20px;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease, opacity 160ms ease;
}

.waitlist button:hover {
  background: var(--blue-press);
}

.waitlist button:active {
  transform: scale(0.98);
}

.waitlist button:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.waitlist-status {
  min-height: 20px;
  margin: 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 20px;
  color: var(--muted);
}

.waitlist-status.is-ok {
  color: #ffffff;
}

.waitlist-status.is-error {
  color: #ff8a80;
}

.success-check {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.success-check[hidden] {
  display: none !important;
}

.success-check-svg {
  width: 72px;
  height: 72px;
  overflow: visible;
}

.success-check-circle {
  stroke: #ffffff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 190;
  stroke-dashoffset: 190;
}

.success-check-mark {
  stroke: #ffffff;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
}

.success-check.is-play .success-check-circle {
  animation: draw-circle 520ms ease forwards;
}

.success-check.is-play .success-check-mark {
  animation: draw-check 380ms ease 280ms forwards;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes draw-circle {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes draw-check {
  to {
    stroke-dashoffset: 0;
  }
}

@media (max-width: 720px) {
  .mark {
    width: 112px;
    height: 112px;
    margin-bottom: 22px;
  }

  h1 {
    font-size: 33px;
    line-height: 1.15;
    width: 100%;
  }

  .headline-fixed,
  .rotator-item,
  .phrase {
    white-space: nowrap;
  }

  .rotator {
    min-height: 1.3em;
  }
}

@media (max-width: 420px) {
  /* Garde une seule ligne : réduit légèrement sans revenir au wrapping */
  h1 {
    font-size: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stage,
  .rotator-item,
  .success-check-circle,
  .success-check-mark {
    animation: none !important;
    transition: none !important;
  }

  .success-check.is-play .success-check-circle,
  .success-check.is-play .success-check-mark {
    stroke-dashoffset: 0;
  }
}
