/* Rubik, la police du site de Forest, servie d'ici (licence OFL dans fonts/). */
@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("/fonts/rubik.woff2") format("woff2");
}

/* Les couleurs de l'app : fond groupé d'iOS, cartes blanches, accent iris.
   L'accent ne sert qu'en fond, comme dans l'app ; les liens restent à l'encre. */
:root {
  color-scheme: light dark;
  --bg: #f2f2f7;
  --card: #ffffff;
  --card-hover: #f7f7fa;
  --card-active: #f2f2f7;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: #e3e3e8;
  --accent: #5a4fcf;
  --on-accent: #ffffff;
  --shadow: 0 30px 60px -30px rgba(29, 29, 31, .35);
  --scene: #f2f2f7;
  --page: 68rem;
  --text-col: 44rem;
  --gutter: 24px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --card: #1c1c1e;
    --card-hover: #232326;
    --card-active: #2c2c2e;
    --text: #f5f5f7;
    --muted: #98989d;
    --line: #2c2c2e;
    --accent: #7067d5;
    --shadow: 0 30px 60px -30px rgba(0, 0, 0, .8);
    --scene: #1c1c1e;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
body {
  margin: 0;
  font: 20px/1.55 "Rubik", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Une seule largeur pour l'en-tête, le contenu et le pied : ils ne bougent
   pas d'une page à l'autre. Le pied reste en bas même sur une page courte. */
.wrap {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}
main { flex: 1; }

/* En-tête */
.top { display: flex; align-items: center; justify-content: space-between; height: 88px; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 600; letter-spacing: -0.01em; text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.top nav { display: flex; gap: 28px; }
.top nav a, .bottom a { color: var(--muted); text-decoration: none; transition: color .15s; }
.top nav a { font-size: 18px; }
.top nav a:hover, .bottom a:hover, .top nav [aria-current="page"], .bottom [aria-current="page"] { color: var(--text); }

/* Pied de page */
.bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px; padding: 28px 0 36px; border-top: 1px solid var(--line); font-size: 18px; color: var(--muted); }
.bottom nav { display: flex; flex-wrap: wrap; gap: 8px 28px; }

/* Accueil */
/* Comme Mononote : le texte et le téléphone forment un bloc centré sur la
   page, le téléphone à sa vraie taille, quitte à passer sous la ligne de
   flottaison. */
.hero {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(56px, 8vw, 104px);
  padding: 56px 0 96px;
}
/* Texte calé en haut, un peu sous le haut du téléphone : centré, il descendait
   de la moitié de l'écart de hauteur avec le téléphone. */
.pitch { flex: 0 1 460px; align-self: flex-start; padding-top: 48px; }
.pitch h1 {
  font-size: clamp(44px, 5.4vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 600;
  margin: 0 0 24px;
  text-wrap: balance;
}
.lead { font-size: 22px; line-height: 1.5; color: var(--muted); margin: 0 0 36px; text-wrap: pretty; }
.lead:has(+ .lead) { margin-bottom: 12px; }
/* La pilule pleine de l'app. */
/* La liste d'attente : un champ et la pilule pleine de l'app, dans une
   seule capsule. Sans JavaScript, le Worker répond par une page. */
.waitlist { max-width: 460px; }
.soon-label { font-size: 18px; line-height: 1.5; color: var(--muted); margin: 0 0 14px; }
.soon-label strong { color: var(--text); font-weight: 500; }
.field { display: flex; gap: 6px; padding: 6px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.field:focus-within { box-shadow: inset 0 0 0 2px var(--accent); }
.field input { flex: 1; width: 0; min-width: 0; padding: 0 8px 0 18px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 18px; outline: none; }
.field input::placeholder { color: var(--muted); opacity: 1; }
.field button { flex: none; padding: 14px 24px; border: 0; border-radius: 999px; background: var(--accent); color: var(--on-accent); font: inherit; font-size: 18px; font-weight: 500; line-height: 1.2; cursor: pointer; }
.field button:hover { filter: brightness(1.08); }
.note { margin: 12px 0 0; font-size: 16px; color: var(--muted); }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Les écrans du premier lancement, en cartes comme les Réglages de l'app. */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin: 0 0 96px;
  padding: 0;
  list-style: none;
}
.features li { background: var(--card); border-radius: 28px; padding: 28px; }
/* L'image de chaque écran du premier lancement, sur le fond de ses pages
   (#F2F2F7 en clair, #1C1C1E en sombre), comme une vignette dans la carte. */
.features picture { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; margin: -12px -12px 24px; padding: 12px; border-radius: 18px; background: var(--scene); overflow: hidden; }
.features img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; }
.features h2 { font-size: 22px; line-height: 1.25; letter-spacing: -0.01em; font-weight: 600; margin: 0 0 8px; text-wrap: balance; }
.features p { margin: 0; font-size: 18px; line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.features p + p { margin-top: 8px; }

/* Téléphone : cadre de titane, bordure noire, boutons sur les côtés, comme
   la vidéo de Mononote, et à sa taille (350 px). Les mesures suivent sa
   largeur (cqw). */
.phone {
  container-type: inline-size;
  flex: none;
  width: 350px;
  margin: 0;
}
.frame {
  position: relative;
  padding: 1.4cqw;
  border-radius: 17cqw;
  background: #2c2c2e;
  /* Du bord vers l'intérieur : filet sombre, reflet argent, titane. */
  box-shadow: inset 0 0 0 .3cqw #0b0b0c, inset 0 0 0 .65cqw #b4b4b9, inset 0 0 0 1cqw #48484a, var(--shadow);
}
.frame::before, .frame::after {
  content: "";
  position: absolute;
  width: .9cqw;
  background: linear-gradient(90deg, #48484a, #8e8e93 45%, #3a3a3c);
}
/* Bouton Action et volume à gauche, bouton latéral à droite. */
.frame::before {
  left: -.75cqw;
  top: 19%;
  height: 25%;
  border-radius: .5cqw 0 0 .5cqw;
  -webkit-mask: linear-gradient(#000 0 13%, transparent 13% 30%, #000 30% 62%, transparent 62% 70%, #000 70%);
  mask: linear-gradient(#000 0 13%, transparent 13% 30%, #000 30% 62%, transparent 62% 70%, #000 70%);
}
.frame::after { right: -.75cqw; top: 29%; height: 11.5%; border-radius: 0 .5cqw .5cqw 0; }
.screen {
  overflow: hidden;
  border: 2.3cqw solid #000;
  border-radius: 15.6cqw;
  background: #f2f2f7;
}
.screen video { display: block; width: 100%; height: auto; aspect-ratio: 1206 / 2622; object-fit: cover; }

/* Pages de texte : une colonne de lecture calée sur le logo. */
.doc { max-width: var(--text-col); padding: 32px 0 72px; }
.doc h1 { font-size: 44px; line-height: 1.1; letter-spacing: -0.02em; font-weight: 600; margin: 0 0 12px; }
.doc h2 { font-size: 26px; line-height: 1.25; letter-spacing: -0.01em; font-weight: 600; margin: 48px 0 12px; }
.doc h3 { font-size: 20px; line-height: 1.3; font-weight: 600; margin: 32px 0 8px; }
.doc p, .doc ul { margin: 0 0 16px; }
.doc ul { padding-left: 1.2em; }
.doc li + li { margin-top: 8px; }
.doc li::marker { color: var(--muted); }
.doc strong { font-weight: 600; }
.doc a { text-decoration-line: underline; }
.updated { font-size: 16px; color: var(--muted); margin: 0 0 32px; }
.card { background: var(--card); border-radius: 28px; padding: 8px 28px; margin: 0 0 16px; }
.card > p { margin: 16px 0; }
.todo { background: #fff3c4; color: #5c4a00; padding: 0 4px; border-radius: 4px; }

/* Guides : la colonne de lecture, un chapeau qui donne la réponse, une
   capture de l'app dans une carte, puis la liste d'attente en bas. */
.doc .chapo { font-size: 22px; line-height: 1.5; color: var(--muted); margin: 0 0 32px; text-wrap: pretty; }
.doc ol { margin: 0 0 16px; padding-left: 1.4em; }
.doc ol li::marker { color: var(--muted); }
.shot { margin: 32px 0; padding: 24px; border-radius: 28px; background: var(--scene); }
.shot img { display: block; width: 100%; max-width: 360px; height: auto; margin: 0 auto; }
.shot figcaption { margin: 16px 0 0; font-size: 16px; color: var(--muted); text-align: center; }
.table-wrap { margin: 0 0 24px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.compare { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.4; }
.compare th, .compare td { padding: 10px 12px 10px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.compare thead th { font-weight: 600; color: var(--muted); }
.compare tbody th { font-weight: 600; }
.compare td { color: var(--text); }
.guide-end { margin: 56px 0 0; padding: 40px 28px 44px; border-radius: 28px; background: var(--card); text-align: center; }
.doc .guide-end h2 { margin: 0 0 8px; }
.guide-end .waitlist { max-width: 460px; margin: 0 auto; }
.doc .soon-label strong { font-weight: 500; }
.guide-end .soon-label { margin-bottom: 20px; }
.guide-end .field { background: var(--bg); }
.guide-end .note { margin-top: 16px; }
/* Liste des guides : chaque carte est un lien entier, avec le chevron des
   lignes du Support à droite. Au survol la carte se rapproche du fond de la
   page, à l'appui elle le rejoint. */
.doc .guide-list { list-style: none; margin: 0; padding: 0; }
.doc .guide-list li { margin: 0 0 16px; padding: 0; border-radius: 28px; background: var(--card); }
.doc .guide-list a { display: flex; align-items: center; gap: 20px; padding: 24px 28px; border-radius: inherit; text-decoration: none; transition: background .15s; }
.doc .guide-list a:hover { background: var(--card-hover); }
.doc .guide-list a:active { background: var(--card-active); }
.doc .guide-list a > div { flex: 1; }
.doc .guide-list strong { display: block; font-size: 22px; line-height: 1.3; font-weight: 600; }
.doc .guide-list p { margin: 8px 0 0; font-size: 18px; color: var(--muted); }
.doc .guide-list a::after { content: ""; flex: none; width: 10px; height: 10px; margin-right: 4px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); }

/* Questions de l'aide, en lignes de carte comme les Réglages de l'app. */
details { border-top: 1px solid var(--line); }
details:first-child { border-top: 0; }
summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 14px 0; font-weight: 500; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
/* Chevron des lignes de l'app, tourné vers le bas quand la réponse est ouverte. */
summary::after { content: ""; flex: none; width: 8px; height: 8px; margin-right: 4px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 0 0 20px; color: var(--muted); }

@media (max-width: 820px) {
  :root { --gutter: 20px; }
  .top { height: 72px; }
  .brand { font-size: 20px; }
  .brand img { width: 28px; height: 28px; border-radius: 7px; }
  .top nav { gap: 22px; }
  .hero { flex-direction: column; gap: 48px; padding: 24px 0 56px; text-align: center; }
  .pitch { flex: none; max-width: 30rem; align-self: auto; padding-top: 0; }
  .pitch h1 { font-size: clamp(38px, 10vw, 52px); }
  .lead { font-size: 20px; }
  .waitlist { margin: 0 auto; }
  .phone { width: min(100%, 330px); }
  .features { margin-bottom: 56px; }
  .features li { padding: 24px; border-radius: 24px; }
  .features picture { margin: -8px -8px 20px; border-radius: 16px; }
  .doc { padding: 16px 0 56px; }
  .doc h1 { font-size: 36px; }
  .doc h2 { font-size: 22px; margin-top: 40px; }
  .card { padding: 4px 20px; border-radius: 24px; }
  .doc .chapo { font-size: 20px; }
  .shot { padding: 20px; border-radius: 24px; }
  .guide-end { padding: 32px 16px 36px; border-radius: 24px; }
  .doc .guide-list li { border-radius: 24px; }
  .doc .guide-list a { gap: 16px; padding: 20px; }
  /* Pied centré comme le haut de l'accueil, les trois liens sur une ligne. */
  .bottom { flex-direction: column; gap: 12px; padding: 24px 0 32px; font-size: 16px; text-align: center; }
  .bottom nav { justify-content: center; gap: 8px 20px; }
}

/* Une seule colonne : chaque image garde sa hauteur, sans vide autour. */
@media (max-width: 640px) {
  .features picture { aspect-ratio: auto; }
  .features img { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* Écran étroit : la pilule passe sous le champ. Dans la carte de fin de
   guide, plus étroite que l'accueil, dès la largeur d'un téléphone. */
@media (max-width: 359px) {
  .field { flex-direction: column; border-radius: 28px; }
  .field input { width: auto; padding: 12px 14px; text-align: center; }
}
@media (max-width: 480px) {
  .guide-end .field { flex-direction: column; border-radius: 28px; }
  .guide-end .field input { width: auto; padding: 12px 14px; text-align: center; }
}

/* Téléphone : trois liens dans l'en-tête. La langue passe en code (FR, EN) ;
   le lecteur d'écran garde le mot entier. */
@media (max-width: 420px) {
  .top nav { gap: 16px; }
  .top nav a { font-size: 16px; }
  .top nav a[hreflang] { font-size: 0; }
  .top nav a[hreflang]::after { content: attr(hreflang); content: attr(hreflang) / ""; font-size: 16px; text-transform: uppercase; }
}
