/* ==========================================================================
   Noymo — vitrine
   Hand-written CSS, no build step, no external requests (fonts are the system
   stack, same as the app). Token names follow frontend/src/styles/app.css;
   the vitrine layers a warmer paper palette on top for its light theme.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  color-scheme: light;

  --bg: #f7f5ec;
  --bg-alt: #eee9dd;
  --surface: #fffdf7;
  --fg: #1d211a;
  --fg-strong: #11150f;
  --muted: #5f6459;
  --border: #e1dccd;

  --brand: #45703b;
  --brand-hover: #375c2f;
  --brand-ink: #ffffff;
  --brand-soft: rgba(69, 112, 59, 0.09);
  --brand-glow: rgba(69, 112, 59, 0.18);
  --brand-text: #45703b;

  --accent: #b0762f;
  --accent-soft: #f4e7d3;

  --warn-bg: #fff6e5;
  --warn-fg: #7a4d00;
  --error-fg: #a4262c;
  --ok-fg: #22694a;

  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(45, 40, 30, 0.07), 0 12px 30px -16px rgba(45, 40, 30, 0.22);
  /* First view: a warm paper surface, lighter than the page, fading into
     --bg behind the demo. The radial tints sit at the top corners. */
  --hero-surface:
    radial-gradient(ellipse at 2% 4%, rgba(247, 230, 209, 0.7), transparent 52%),
    radial-gradient(ellipse at 98% 32%, rgba(242, 237, 206, 0.62), transparent 50%),
    linear-gradient(180deg, #fbf9f1 0%, #fdfbf7 55%, var(--bg) 100%);
  --section-band: var(--bg-alt);
  --paper-card-padding: clamp(24px, 4vw, 40px);
  --paper-card-border: 1px solid var(--border);
  --paper-card-radius: var(--radius-lg);
  --paper-card-bg: var(--surface);
  --paper-card-shadow: var(--shadow);
  --maxw: 1120px;
  --font: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial,
    'Apple Color Emoji', 'Segoe UI Emoji';
}

/* The dark palette is declared twice on purpose, and the two token lists must
   stay in sync: an explicit choice wins, but the media query has to remain so
   the page still follows the phone when JavaScript is switched off. */
:root[data-theme='dark'] {
  color-scheme: dark;

  --bg: #1b1b1b;
  --bg-alt: #212121;
  --surface: #232323;
  --fg: #f5f5f4;
  --fg-strong: #ffffff;
  --muted: #a3a39f;
  --border: rgba(255, 255, 255, 0.11);

  --brand: #9acb86;
  --brand-hover: #add69b;
  --brand-ink: #0e1a13;
  --brand-soft: rgba(154, 203, 134, 0.12);
  --brand-glow: rgba(154, 203, 134, 0.16);
  --brand-text: #a6d492;

  --warn-bg: rgba(240, 192, 96, 0.12);
  --warn-fg: #f0c060;
  --error-fg: #ff9a9a;
  --ok-fg: #8fd3b0;

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -12px rgba(0, 0, 0, 0.6);

  --accent: var(--brand-text);
  --accent-soft: var(--brand-soft);
  --hero-surface:
    radial-gradient(ellipse at 8% 12%, rgba(70, 88, 56, 0.3), transparent 60%),
    radial-gradient(ellipse at 92% 34%, rgba(94, 83, 52, 0.16), transparent 55%),
    linear-gradient(180deg, #22261f 0%, #1e201b 55%, var(--bg) 100%);
  --section-band: transparent;
  --paper-card-padding: 0;
  --paper-card-border: none;
  --paper-card-radius: 0;
  --paper-card-bg: transparent;
  --paper-card-shadow: none;
}

/* No explicit light choice, system is dark: follow the system. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;

    --bg: #1b1b1b;
    --bg-alt: #212121;
    --surface: #232323;
    --fg: #f5f5f4;
    --fg-strong: #ffffff;
    --muted: #a3a39f;
    --border: rgba(255, 255, 255, 0.11);

    --brand: #9acb86;
    --brand-hover: #add69b;
    --brand-ink: #0e1a13;
    --brand-soft: rgba(154, 203, 134, 0.12);
    --brand-glow: rgba(154, 203, 134, 0.16);
    --brand-text: #a6d492;

    --warn-bg: rgba(240, 192, 96, 0.12);
    --warn-fg: #f0c060;
    --error-fg: #ff9a9a;
    --ok-fg: #8fd3b0;

    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -12px rgba(0, 0, 0, 0.6);

    --accent: var(--brand-text);
    --accent-soft: var(--brand-soft);
    --hero-surface:
      radial-gradient(ellipse at 8% 12%, rgba(70, 88, 56, 0.3), transparent 60%),
      radial-gradient(ellipse at 92% 34%, rgba(94, 83, 52, 0.16), transparent 55%),
      linear-gradient(180deg, #22261f 0%, #1e201b 55%, var(--bg) 100%);
    --section-band: transparent;
    --paper-card-padding: 0;
    --paper-card-border: none;
    --paper-card-radius: 0;
    --paper-card-bg: transparent;
    --paper-card-shadow: none;
  }
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  /* 17px base: this is read outdoors, on a phone, sometimes in gloves.
     Legibility beats density here on purpose. */
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--brand-text);
  text-underline-offset: 3px;
}

h1,
h2,
h3 {
  color: var(--fg-strong);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.1rem, 1.2rem + 3.6vw, 3.6rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.6rem, 1.1rem + 1.7vw, 2.35rem);
  font-weight: 750;
}

h3 {
  font-size: 1.12rem;
  font-weight: 700;
  margin-bottom: 0.35em;
}

p {
  margin: 0 0 1rem;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 3px solid var(--brand-text);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* --------------------------------------------------------------------------
   3. Utilities
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 20px;
}

.container.narrow {
  max-width: 720px;
}

.center {
  text-align: center;
}

.muted {
  color: var(--muted);
}

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

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Author display rules otherwise override the UA's `[hidden]`. */
[hidden] {
  display: none !important;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--brand);
  color: var(--brand-ink);
  border-radius: var(--radius);
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
}

.icon {
  width: 24px;
  height: 24px;
  flex: none;
  color: var(--brand-text);
}

.icon--sm {
  width: 18px;
  height: 18px;
}

.icon--xs {
  width: 14px;
  height: 14px;
}

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  font: inherit;
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--brand);
  color: var(--brand-ink);
}

.btn--primary:hover {
  background: var(--brand-hover);
}

.btn--secondary {
  border-color: var(--border);
  background: var(--surface);
  color: var(--fg-strong);
}

.btn--secondary:hover {
  border-color: var(--brand);
  color: var(--brand-text);
}

.btn--sm {
  padding: 9px 14px;
  font-size: 0.92rem;
}

.btn--lg {
  padding: 15px 28px;
  font-size: 1.05rem;
}

.btn[disabled],
.btn[aria-busy='true'] {
  opacity: 0.6;
  cursor: progress;
}

/* --------------------------------------------------------------------------
   5. Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  margin-right: auto;
}

/* One <img> per logo variant (light wordmark, dark wordmark, mark alone).
   CSS decides which one shows, not <picture>: a source keyed on
   prefers-color-scheme ignored the explicit choice, so a light theme on a
   dark-preference device showed the white wordmark on the paper background.
   The mark alone is the default so narrow screens — including fractional
   widths that fall between two media queries — can never show nothing; the
   theme lists below mirror the palette ones above and must stay in sync. */
.logo {
  display: block;
  width: auto;
  height: 30px;
}

.logo--light,
.logo--dark {
  display: none;
}

.logo--mark {
  display: block;
}

@media (min-width: 420px) {
  .logo--light {
    display: block;
  }

  .logo--mark {
    display: none;
  }

  :root[data-theme='dark'] .logo--light {
    display: none;
  }

  :root[data-theme='dark'] .logo--dark {
    display: block;
  }
}

/* No explicit choice: follow the system, as the palette does. */
@media (min-width: 420px) and (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .logo--light {
    display: none;
  }

  :root:not([data-theme='light']) .logo--dark {
    display: block;
  }
}

.nav {
  display: none;
  gap: 26px;
  font-size: 1rem;
}

.nav a {
  color: var(--fg);
  text-decoration: none;
  font-weight: 550;
  transition: color 0.15s ease;
}

.nav a:hover {
  color: var(--brand-text);
}

@media (min-width: 900px) {
  .nav {
    display: flex;
  }
}

/* Mobile navigation. <details> keeps it usable without JavaScript; app.js
   only adds Escape/outside-click/link-click closing. */
.menu {
  display: none;
  flex: none;
}

.menu__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--fg-strong);
  cursor: pointer;
  list-style: none;
}

.menu__toggle::-webkit-details-marker {
  display: none;
}

.menu__toggle:hover {
  border-color: var(--brand);
  color: var(--brand-text);
}

.menu__icon--close,
.menu__label--close {
  display: none;
}

.menu[open] .menu__icon--open,
.menu[open] .menu__label--open {
  display: none;
}

.menu[open] .menu__icon--close {
  display: block;
}

.menu[open] .menu__label--close {
  display: inline;
}

.menu__panel {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  z-index: 30;
  padding: 8px 20px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  box-shadow: var(--shadow);
}

.menu__nav {
  display: flex;
  flex-direction: column;
}

.menu__nav > a {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  color: var(--fg);
  font-weight: 600;
  text-decoration: none;
}

.menu__nav > a:hover {
  color: var(--brand-text);
}

.menu__nav > a.menu__cta {
  margin-top: 12px;
  padding: 12px 18px;
  border: 0;
  border-radius: var(--radius);
  color: var(--brand-ink);
  text-align: center;
}

@media (max-width: 899px) {
  .site-header__login {
    display: none;
  }

  .menu {
    display: block;
  }
}

@media (min-width: 600px) {
  .menu__cta {
    display: none;
  }
}

/* Theme control (Système / Clair / Sombre). Hidden in the markup and revealed
   by app.js: without JavaScript there is nothing to switch, and the page
   already follows the system preference. */
.theme {
  display: none;
  flex: none;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-alt);
}

.theme:not([hidden]) {
  display: inline-flex;
}

.theme button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.theme button:hover {
  color: var(--fg-strong);
}

.theme button[aria-pressed='true'] {
  background: var(--surface);
  color: var(--fg-strong);
  box-shadow: var(--shadow);
}

/* Narrow screens keep the brand, the theme control and the menu button; the
   header CTA moves into the menu, and at 600-899 px it still fits beside it. */
@media (max-width: 599px) {
  .site-header__cta {
    display: none;
  }
}

/* Below this width the wordmark is swapped for the mark alone (see .logo--mark)
   and the gaps tighten, so brand + theme + menu still fit on one line. */
@media (max-width: 419px) {
  .site-header__inner {
    gap: 10px;
  }
}

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 18px 18px 0;
  background: var(--bg);
}

/* The rounded surface fades into the page at the bottom, the way the app
   landing page opens: a warm panel behind the copy that melts into --bg
   behind the demo. Insets match the 18px gap below the header. */
.hero::before {
  content: '';
  position: absolute;
  inset: 18px 18px 0;
  border-radius: 26px 26px 0 0;
  background: var(--hero-surface);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  padding-block: clamp(40px, 6vw, 84px) 0;
}

@media (max-width: 720px) {
  .hero {
    padding: 12px 10px 0;
  }

  .hero::before {
    inset: 12px 10px 0;
    border-radius: 20px 20px 0 0;
  }
}

.hero__copy {
  max-width: 960px;
  margin-inline: auto;
  text-align: center;
}

/* The headline is two sentences separated by a <br>; this scale keeps both
   lines intact at every width instead of dropping a lone word to its own line
   (close to the clamp range the application's landing page uses). */
.hero h1 {
  font-size: clamp(2rem, 0.6rem + 3.6vw, 3.2rem);
  margin-inline: auto;
}

.lead {
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  color: var(--muted);
  max-width: 58ch;
  margin-inline: auto;
}

.hl {
  color: var(--brand-text);
}

/* Hero app showcase -------------------------------------------------------
   A phone that blends into the page, circled by small feature cards. The
   cards are decorative (aria-hidden) and must stay small enough not to
   compete with the waitlist above. */
/* Heights are tuned to the phone screenshot's 780 x 1688 ratio: the frame is
   absolutely positioned, so a taller capture would spill into the next section.
   Change the heights with the image. */
.showcase {
  position: relative;
  max-width: 1040px;
  height: 680px;
  margin: clamp(36px, 5vw, 60px) auto 0;
  isolation: isolate;
}

.showcase__glow {
  position: absolute;
  inset: 6% 14% 14%;
  z-index: -1;
  background:
    radial-gradient(ellipse at 30% 45%, var(--brand-glow), transparent 62%),
    radial-gradient(ellipse at 72% 40%, var(--brand-soft), transparent 60%);
  filter: blur(28px);
  pointer-events: none;
}

.showcase__phone {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 3;
  width: 300px;
  padding: 9px;
  border-radius: 44px;
  background: linear-gradient(145deg, #6b6e64 0%, #171815 18%, #33352e 68%, #7c7e74 100%);
  box-shadow:
    -8px 8px 0 #2c2e29,
    -10px 10px 0 #6b6d63,
    0 32px 64px -20px rgba(20, 20, 20, 0.45);
  transform: translateX(-50%) rotate(-3deg);
}

.showcase__phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 35px;
  background: #ffffff;
}

.showcase__card {
  position: absolute;
  z-index: 4;
  width: 230px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow);
  text-align: left;
  pointer-events: none;
}

.showcase__card--invoice {
  top: 68px;
  left: 0;
  transform: rotate(-4deg);
}

.showcase__card--agenda {
  top: 38px;
  right: 0;
  transform: rotate(4deg);
}

.showcase__card--note {
  top: 372px;
  right: 28px;
  width: 220px;
  transform: rotate(-3deg);
}

.showcase__card--voice {
  top: 412px;
  left: 28px;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 250px;
  border-radius: 999px;
  transform: rotate(3deg);
}

.showcase__card-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.showcase__card-head strong,
.showcase__card-head small {
  display: block;
}

.showcase__card-head strong {
  color: var(--fg-strong);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.35;
}

.showcase__card-head small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.4;
}

.showcase__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--accent-soft);
}

.showcase__icon .icon {
  color: var(--accent);
}

.mini-doc {
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-alt);
}

.mini-doc__kicker {
  display: block;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.mini-doc strong {
  display: block;
  margin-top: 6px;
  color: var(--fg-strong);
  font-size: 0.84rem;
}

.mini-doc p {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.mini-doc__line {
  display: block;
  width: 100%;
  height: 4px;
  margin-top: 10px;
  border-radius: 3px;
  background: var(--border);
}

.mini-doc__line--short {
  width: 64%;
  margin-top: 5px;
}

.mini-doc__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  padding-top: 9px;
  border-top: 1px solid var(--border);
  color: var(--brand-text);
  font-size: 0.68rem;
}

.mini-event {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg);
}

.mini-event__time {
  color: var(--brand-text);
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.mini-event strong {
  display: block;
  color: var(--fg-strong);
  font-size: 0.76rem;
  line-height: 1.35;
}

.mini-event p {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.4;
}

.mini-event--muted {
  opacity: 0.72;
}

.mini-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.6;
}

.mini-note__foot {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  color: var(--brand-text);
  font-size: 0.68rem;
  line-height: 1.5;
}

.showcase__card--voice strong {
  display: block;
  color: var(--fg-strong);
  font-size: 0.8rem;
  line-height: 1.35;
}

.showcase__card--voice p {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.45;
}

.voice-bars {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-soft);
}

.voice-bars i {
  width: 3px;
  height: 9px;
  border-radius: 2px;
  background: var(--brand-text);
}

.voice-bars i:nth-child(2),
.voice-bars i:nth-child(4) {
  height: 16px;
}

.voice-bars i:nth-child(3) {
  height: 22px;
}

.showcase::after {
  content: '';
  position: absolute;
  right: -12%;
  bottom: -1px;
  left: -12%;
  z-index: 6;
  height: 70px;
  background: linear-gradient(transparent, var(--bg));
  pointer-events: none;
}

@media (max-width: 1100px) {
  .showcase {
    max-width: 900px;
    height: 660px;
  }

  .showcase__phone {
    width: 280px;
  }

  .showcase__card {
    width: 210px;
  }

  .showcase__card--invoice {
    top: 58px;
  }

  .showcase__card--agenda {
    top: 28px;
  }

  .showcase__card--note {
    top: 336px;
    right: 20px;
    width: 205px;
  }

  .showcase__card--voice {
    top: 372px;
    left: 20px;
    width: 225px;
  }
}

@media (max-width: 900px) {
  .showcase {
    height: 600px;
  }

  .showcase__phone {
    width: 260px;
  }

  .showcase__card--note,
  .showcase__card--voice {
    display: none;
  }

  .showcase__card--invoice {
    top: 72px;
  }

  .showcase__card--agenda {
    top: 40px;
  }
}

@media (max-width: 720px) {
  .showcase {
    height: 560px;
  }

  .showcase__phone {
    width: 240px;
  }

  .showcase__card {
    width: 180px;
    padding: 12px;
  }

  .showcase__card--agenda {
    display: none;
  }

  .showcase__card--invoice {
    top: 150px;
    left: 0;
  }

  .showcase__card--invoice .showcase__card-head {
    gap: 8px;
  }

  .showcase__card--invoice .showcase__icon {
    width: 32px;
    height: 32px;
  }

  .showcase__card--invoice .mini-doc {
    margin-top: 9px;
    padding: 8px;
  }

  .showcase::after {
    height: 60px;
  }
}

@media (max-width: 560px) {
  .showcase {
    height: 540px;
    margin-top: 32px;
  }

  .showcase__phone {
    width: 230px;
    transform: translateX(-50%) rotate(-1.5deg);
  }

  .showcase__card {
    display: none;
  }

  .showcase__glow {
    inset: 0 0 10%;
  }

  .showcase::after {
    height: 45px;
  }
}

/* --------------------------------------------------------------------------
   7. Countdown + waitlist
   -------------------------------------------------------------------------- */
.beta-block {
  max-width: 620px;
  margin: 28px auto 0;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: left;
}

.beta-note {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.beta-open {
  margin-bottom: 20px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--brand-soft);
  border: 1px solid var(--border);
}

.beta-open__title {
  margin: 0 0 4px;
  font-weight: 700;
  color: var(--brand-text);
}

.beta-open__text {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.waitlist__row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 560px) {
  .waitlist__row {
    flex-direction: row;
  }
}

.waitlist input[type='email'] {
  flex: 1 1 auto;
  min-width: 0;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
  font: inherit;
}

.waitlist input[type='email']::placeholder {
  color: var(--muted);
}

.waitlist input[type='email']:focus {
  border-color: var(--brand);
  outline: none;
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.waitlist input[aria-invalid='true'] {
  border-color: var(--error-fg);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--error-fg) 18%, transparent);
}

.consent input[aria-invalid='true'] {
  outline: 2px solid var(--error-fg);
  outline-offset: 2px;
}

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 14px;
  font-size: 0.92rem;
  color: var(--muted);
}

.consent input {
  margin: 2px 0 0;
  width: 17px;
  height: 17px;
  flex: none;
  accent-color: var(--brand);
}

.consent a {
  color: inherit;
}

/* Honeypot — off-screen for humans, still reachable by bots. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin: 14px 0 0;
  font-size: 0.92rem;
  min-height: 1.2em;
}

.form-status[data-state='ok'] {
  color: var(--ok-fg);
  font-weight: 600;
}

.form-status[data-state='error'] {
  color: var(--error-fg);
}

.form-status[data-state='warn'] {
  color: var(--warn-fg);
}

.form-status a {
  color: inherit;
}

.form-success {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--brand-soft);
}

.form-success__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  color: var(--ok-fg);
  font-weight: 700;
}

.form-success__title .icon {
  color: var(--ok-fg);
}

.form-success__text {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.micro {
  margin: 14px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   8. Sections
   -------------------------------------------------------------------------- */
.section {
  padding: clamp(48px, 7vw, 92px) 0;
}

.section--alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}

/* Warm band used by the "how it works" section in the light theme. The token
   is transparent in dark mode, so the dark layout stays untouched. */
.section--band {
  background: var(--section-band);
}

/* A centred content block that reads as paper in light mode. Every property
   is tokenised: dark mode sets padding/border/shadow to zero, so the wrapper
   is layout- and paint-neutral there. */
.paper-card {
  padding: var(--paper-card-padding);
  border: var(--paper-card-border);
  border-radius: var(--paper-card-radius);
  background: var(--paper-card-bg);
  box-shadow: var(--paper-card-shadow);
}

.section--final {
  padding-bottom: clamp(56px, 8vw, 100px);
}

.section__title {
  margin-bottom: 0.5em;
}

.section__title--left {
  margin-top: 0;
}

.section__intro {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 62ch;
  margin-bottom: 2em;
}

.center .section__intro {
  margin-inline: auto;
}

/* Reassurance line under a section, one short claim per segment. */
.trust {
  margin: 0 0 2em;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Small tricolour in front of the "entreprise française" line, drawn in CSS so
   it renders the same everywhere and needs no image. */
.flag {
  display: inline-flex;
  width: 18px;
  height: 12px;
  margin-inline-end: 7px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 2px;
  vertical-align: -1px;
}

.flag i {
  width: 33.333%;
  background: #ffffff;
}

.flag i:first-child {
  background: #263bbb;
}

.flag i:last-child {
  background: #ed4953;
}

/* --------------------------------------------------------------------------
   9. How it works + interactive demo
   -------------------------------------------------------------------------- */
.how {
  display: grid;
  gap: 40px;
}

/* Colours from the app landing page's green band: same layout, dark-green
   palette in both themes, and a light demo card like the one on that page. */
#comment {
  --section-band: #203e30;
  --surface: #2c4b3b;
  --fg: #f8fbf4;
  --fg-strong: #f8fbf4;
  --muted: #c4d2c5;
  --border: rgba(255, 255, 255, 0.14);
  --brand: #bbd69a;
  --brand-hover: #c9e0ab;
  --brand-ink: #17301f;
  --brand-soft: #355a41;
  --brand-text: #bbd69a;
  color: var(--fg);
}

#comment .demo {
  --bg: #f7f5ec;
  --bg-alt: #eee9dd;
  --surface: #fffdf7;
  --fg: #1d211a;
  --fg-strong: #11150f;
  --muted: #5f6459;
  --border: #e1dccd;
  --brand: #45703b;
  --brand-hover: #375c2f;
  --brand-ink: #ffffff;
  --brand-soft: rgba(69, 112, 59, 0.09);
  --brand-text: #45703b;
  --accent: #b0762f;
  --accent-soft: #f4e7d3;
  --shadow: 0 14px 38px rgba(16, 33, 25, 0.19);
  color: var(--fg);
}

@media (min-width: 980px) {
  .how {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.9fr);
    align-items: start;
    gap: 64px;
  }
}

.how__copy .section__intro {
  margin-bottom: 1.6em;
}

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.step.is-active {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.step__title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
}

.step__trigger {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.step__trigger:disabled {
  opacity: 1;
  cursor: default;
}

.step__num {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-text);
  font-weight: 800;
}

.step.is-active .step__num {
  background: var(--surface);
}

.step__label {
  min-width: 0;
}

.step__chevron {
  margin-left: auto;
  color: var(--muted);
  transition: color 0.15s ease, transform 0.15s ease;
}

.step.is-active .step__chevron {
  color: var(--brand-text);
  transform: rotate(90deg);
}

.step__text {
  margin: 10px 0 0 48px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.65;
}

@media (max-width: 420px) {
  .step__text {
    margin-left: 0;
  }
}

/* Demo card ---------------------------------------------------------------
   Without JavaScript every panel is visible and the controls stay hidden;
   `data-demo-ready` is only set by app.js, which turns it into a stepper. */
.demo {
  position: relative;
  max-width: 460px;
  margin-inline: auto;
  overflow: hidden;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse 70% 46% at 50% 28%, var(--brand-soft), transparent 70%),
    var(--surface);
  box-shadow: var(--shadow);
}

@media (min-width: 980px) {
  .demo {
    max-width: none;
    margin-inline: 0;
  }
}

.demo__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.demo__title {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.demo__progress {
  color: var(--brand-text);
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.demo__mascot {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.demo__mascot img {
  width: auto;
  height: clamp(140px, 18vw, 180px);
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.12));
}

.demo__greeting {
  margin: 10px 0 0;
  color: var(--fg-strong);
  font-size: clamp(1.1rem, 0.95rem + 0.5vw, 1.3rem);
  font-weight: 750;
  line-height: 1.35;
  text-align: center;
}

.demo__conversation {
  margin-top: 10px;
}

.demo__bubble {
  max-width: 92%;
  margin: 0 0 0 auto;
  padding: 12px 14px;
  border-radius: 14px 14px 4px 14px;
  background: var(--brand-soft);
  color: var(--fg-strong);
  font-size: 0.92rem;
  line-height: 1.55;
}

.demo__bubble .icon {
  display: block;
  margin: 4px 0 0 auto;
}

.demo__panels {
  margin-top: 12px;
}

.demo__panel + .demo__panel {
  margin-top: 10px;
}

.demo[data-demo-ready] .demo__panel {
  display: none;
}

.demo[data-demo-ready] .demo__panel.is-active {
  display: block;
}

.demo__hint {
  margin: 0;
  padding: 11px 12px;
  border-radius: 10px;
  background: var(--bg-alt);
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.demo__draft {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}

.demo__draft--done {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.demo__draft-icon {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent-soft);
  line-height: 0;
}

.demo__draft-icon .icon {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  color: var(--accent);
}

.demo__draft--done .demo__draft-icon {
  background: var(--surface);
}

.demo__draft strong,
.demo__draft span,
.demo__draft small {
  display: block;
}

.demo__draft strong {
  color: var(--fg-strong);
  font-size: 0.9rem;
  line-height: 1.4;
}

.demo__draft span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.84rem;
}

.demo__draft small {
  margin-top: 6px;
  color: var(--brand-text);
  font-size: 0.76rem;
  line-height: 1.45;
}

.demo__actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.demo__actions .btn {
  flex: 1;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 0.86rem;
}

@media (max-width: 360px) {
  .demo__actions {
    flex-direction: column;
  }
}

/* --------------------------------------------------------------------------
   10. Ticks (icon lists)
   -------------------------------------------------------------------------- */
.ticks {
  display: grid;
  gap: 12px;
  margin-top: 1.5em;
}

.ticks--stack {
  margin-bottom: 2.5em;
}

.ticks li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 0.98rem;
}

.ticks li strong {
  color: var(--fg);
}

.ticks .icon {
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   11. CTA card
   -------------------------------------------------------------------------- */
.cta-card {
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-alt);
}

.cta-card h3 {
  font-size: 1.3rem;
}

.cta-card > p {
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   12. FAQ
   -------------------------------------------------------------------------- */
.faq {
  border-bottom: 1px solid var(--border);
}

.faq:first-of-type {
  border-top: 1px solid var(--border);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-weight: 650;
  color: var(--fg-strong);
  cursor: pointer;
  list-style: none;
  transition: color 0.15s ease;
}

.faq summary:hover {
  color: var(--brand-text);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  flex: none;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--brand-text);
  line-height: 1;
}

.faq[open] summary::after {
  content: '–';
}

.faq p {
  margin: 0 0 18px;
  color: var(--muted);
  max-width: 68ch;
}

/* --------------------------------------------------------------------------
   13. Final CTA
   -------------------------------------------------------------------------- */
.mascot-round {
  width: min(150px, 40vw);
  height: auto;
  margin-bottom: 20px;
}

/* --------------------------------------------------------------------------
   14. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  padding: 56px 0 32px;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  font-size: 0.94rem;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 760px) {
  .site-footer__inner {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 48px;
  }
}

.site-footer__brand img {
  width: auto;
  height: 26px;
  margin-bottom: 14px;
}

.site-footer__brand p {
  max-width: 34ch;
}

.site-footer__nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 28px;
}

.site-footer__title {
  margin: 0 0 12px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-weight: 700;
}

.site-footer__nav ul {
  display: grid;
  gap: 8px;
}

.site-footer__nav a {
  color: var(--fg);
  text-decoration: none;
}

.site-footer__nav a:hover {
  color: var(--brand-text);
  text-decoration: underline;
}

.site-footer__bottom {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 10px;
  font-size: 0.9rem;
}

.site-footer__bottom p {
  margin: 0;
  max-width: 80ch;
}

/* --------------------------------------------------------------------------
   15. Legal pages
   -------------------------------------------------------------------------- */
.legal {
  padding: clamp(36px, 5vw, 64px) 0 72px;
}

.legal h1 {
  font-size: clamp(1.8rem, 1.2rem + 2.2vw, 2.6rem);
}

.legal h2 {
  margin-top: 2.2em;
  font-size: 1.25rem;
}

.legal h3 {
  margin-top: 1.6em;
  font-size: 1.05rem;
}

.legal p,
.legal li {
  color: var(--muted);
}

.legal ul {
  list-style: disc;
  padding-left: 1.3em;
  margin-bottom: 1rem;
  display: grid;
  gap: 6px;
}

.legal .back {
  display: inline-block;
  margin-bottom: 24px;
  font-size: 0.92rem;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   16. Motion
   Subtle by design: this page is read by tired people, on phones, in a barn.
   The reduced-motion block in section 2 neutralises everything below.
   -------------------------------------------------------------------------- */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.hero__copy {
  animation: rise 0.45s ease both;
}

.showcase {
  animation: rise 0.45s ease 0.08s both;
}

.faq[open] > p {
  animation: fade 0.18s ease both;
}

/* Scroll reveal. app.js hides only the elements that are fully below the fold
   at load, then plays the existing `rise` when they enter the viewport. With
   no JavaScript, no observer or reduced motion, nothing is ever hidden: the
   page stays exactly as it is. */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal].reveal-hidden {
    opacity: 0;
    transform: translateY(12px);
  }

  [data-reveal].reveal-in {
    animation: rise 0.45s ease both;
    animation-delay: var(--reveal-delay, 0ms);
  }
}
