/* Osteolia — « bientôt disponible », Nuit claire.
   Maquette : canvas « Osteolia — maquettes », page « Vitrine · bientôt disponible »,
   artboards BientotPremium (ordinateur), BientotPremiumMobile (téléphone) et
   BientotPremiumNuitOk (après l'inscription, ici transposé en Nuit claire). */

@font-face {
  font-family: "Funnel Sans";
  src: url("fonts/funnel-sans-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist";
  src: url("fonts/geist-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Osteolia Nuit, thème Clair */
  --craie: #f5f6f2;
  --surface: #ffffff;
  --encre: #0b0d0c;
  --texte-doux: #3b423d;
  --texte-attenue: #545c56;
  --texte-discret: #5f6761; /* #6b736d dans la maquette, assombri pour tenir 4,5:1 sur la lumière */
  --placeholder: #6b736d; /* #7a817c dans la maquette : il tient lieu d'étiquette, il doit se lire (4,9:1) */
  --bordure: #dce0d9;
  --bordure-legere: #ecefe8;
  --chlorophylle: #c6f36d;
  --chlorophylle-survol: #b8ea55;
  --halo-focus: rgba(198, 243, 109, 0.45);
  --critique: #c2361b;
  --critique-texte: #9a2a12;
  --halo-critique: rgba(194, 54, 27, 0.16);
  --lien: #3e6b0a;

  --font-display: "Funnel Sans", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--craie);
  color: var(--encre);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
}

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

.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;
}

[hidden] {
  display: none !important;
}

/* ---------- Logo (marque encre à barres Chlorophylle + logotype) ---------- */

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.43em;
  font-size: 22px;
  line-height: 1;
  color: var(--encre);
  text-decoration: none;
}

.logo__mark {
  width: 1.12em;
  height: 1.12em;
  flex: none;
}

.logo__word {
  width: 3.347em;
  height: 0.71em;
  flex: none;
  overflow: visible;
}

/* ---------- Page ---------- */

/* La lumière Chlorophylle est un fond, pas un élément : une ellipse de
   1300 × 820 dont le centre est 50 px sous le bas de l'écran (maquette).
   Un élément débordant obligeait à masquer le débordement, et le conteneur
   masqué défilait quand le champ prenait le focus. */
.pm {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  background: radial-gradient(
      var(--glow-rx, 650px) var(--glow-ry, 410px) at 50% calc(100% + 50px),
      rgba(198, 243, 109, 0.55),
      rgba(198, 243, 109, 0.18) 55%,
      rgba(198, 243, 109, 0)
    )
    no-repeat;
}

.pm-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 56px;
}

.pm-mid {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px 40px;
}

.pm-h {
  margin: 0;
  max-width: 980px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 92px;
  line-height: 0.98;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

/* Le surligneur Chlorophylle, posé sous le bas des lettres */
.hl {
  padding: 0 0.04em;
  background: linear-gradient(
    180deg,
    transparent 58%,
    var(--chlorophylle) 58%,
    var(--chlorophylle) 86%,
    transparent 86%
  );
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.pm-l {
  margin: 28px 0 0;
  max-width: 540px;
  font-size: 19px;
  line-height: 1.6;
  color: var(--texte-attenue);
  text-wrap: pretty;
}

.pm-s {
  margin: 16px 0 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--texte-discret);
}

/* ---------- Formulaire : une pilule, un champ, un bouton ---------- */

.pm-f {
  margin-top: 40px;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 520px;
  max-width: 100%;
  height: 62px;
  padding: 6px 6px 6px 24px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--bordure), 0 30px 60px -36px rgba(11, 13, 12, 0.35);
  transition: box-shadow 0.15s ease;
}

.pm-f:has(input:focus-visible) {
  box-shadow: 0 0 0 1px var(--encre), 0 0 0 5px var(--halo-focus),
    0 30px 60px -36px rgba(11, 13, 12, 0.35);
}

.pm-f.is-invalid {
  box-shadow: 0 0 0 1px var(--critique), 0 30px 60px -36px rgba(11, 13, 12, 0.35);
}

.pm-f.is-invalid:has(input:focus-visible) {
  box-shadow: 0 0 0 1px var(--critique), 0 0 0 5px var(--halo-critique),
    0 30px 60px -36px rgba(11, 13, 12, 0.35);
}

.pm-field {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  height: 100%;
}

.pm-field input {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--encre);
  font: 16px/1.25 var(--font-sans);
  appearance: none;
}

.pm-field input::placeholder {
  color: var(--placeholder);
  opacity: 1;
}

/* Piège à robots : présent pour Brevo, invisible et hors du parcours clavier */
.pm-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.pm-b {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--chlorophylle);
  color: var(--encre);
  font: 600 15px/1 var(--font-sans);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.pm-b:hover {
  background: var(--chlorophylle-survol);
}

.pm-b:active {
  transform: translateY(1px);
}

.pm-b:focus-visible {
  outline: 2px solid var(--encre);
  outline-offset: 2px;
  border-radius: 999px;
}

.pm-b[aria-disabled="true"] {
  cursor: progress;
  opacity: 0.7;
}

.pm-b svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.pm-err {
  margin: 14px 0 0;
  max-width: 520px;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 500;
  color: var(--critique-texte);
}

/* ---------- Après l'inscription ---------- */

.pm-ok {
  margin-top: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 100%;
  min-height: 62px;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--bordure), 0 30px 60px -36px rgba(11, 13, 12, 0.35);
  font-size: 15.5px;
  line-height: 1.45;
  text-align: left;
  outline: none;
}

.pm-ok b {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.pm-ok__check {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  background: var(--chlorophylle);
  color: var(--encre);
}

.pm-ok__check svg {
  width: 15px;
  height: 15px;
}

.pm-share {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.pm-share:hover {
  color: var(--encre);
}

@media (prefers-reduced-motion: no-preference) {
  .is-entering {
    animation: entree 0.32s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  @keyframes entree {
    from {
      opacity: 0;
      transform: translateY(6px);
    }
  }
}

/* ---------- Pied ---------- */

.pm-bot {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 56px 30px;
  font-size: 13px;
  color: var(--texte-discret);
}

.pm-bot nav {
  display: flex;
  gap: 24px;
}

.pm-bot a {
  text-decoration: none;
}

.pm-bot a:hover {
  color: var(--encre);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Pages de texte (mentions légales, confidentialité) ---------- */

.doc {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.doc-main {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 24px 72px;
}

.doc-retour {
  display: inline-block;
  margin-bottom: 28px;
  font-size: 14px;
  font-weight: 500;
  color: var(--texte-attenue);
  text-decoration: none;
}

.doc-retour:hover {
  color: var(--encre);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.doc h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 48px;
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.doc-maj {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--texte-discret);
}

.doc h2 {
  margin: 44px 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.doc p,
.doc li {
  font-size: 16px;
  line-height: 1.65;
  color: var(--texte-doux);
}

.doc p {
  margin: 12px 0 0;
}

.doc ul {
  margin: 12px 0 0;
  padding-left: 1.2em;
}

.doc li + li {
  margin-top: 6px;
}

.doc strong {
  color: var(--encre);
  font-weight: 600;
}

.doc :is(p, li, dd) a {
  color: var(--lien);
  text-underline-offset: 3px;
}

.doc dl {
  margin: 16px 0 0;
  border-top: 1px solid var(--bordure);
}

.doc dl > div {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--bordure);
}

.doc dt {
  font-size: 14px;
  font-weight: 600;
  color: var(--encre);
}

.doc dd {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--texte-doux);
}

.doc .pm-bot {
  border-top: 1px solid var(--bordure);
}

/* ---------- Page introuvable ---------- */

.pm-retour {
  margin-top: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 50px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--encre);
  color: #ffffff;
  font: 600 15px/1 var(--font-sans);
  text-decoration: none;
}

.pm-retour:hover {
  background: #2a302c;
}

/* ---------- Tablette ---------- */

@media (max-width: 1024px) {
  .pm-h {
    font-size: 76px;
  }
}

/* ---------- Téléphone (maquette 390 px) ---------- */

@media (max-width: 640px) {
  .pm {
    --glow-rx: 380px;
    --glow-ry: 280px;
  }

  .pm-top {
    padding: 22px;
  }

  .pm-top .logo {
    font-size: 19px;
  }

  .pm-mid {
    padding: 0 22px 24px;
  }

  .pm-h {
    font-size: clamp(40px, 12.8vw, 50px);
    line-height: 1;
  }

  .pm-l {
    margin-top: 20px;
    font-size: 16.5px;
  }

  /* La pilule se scinde : champ pleine largeur, bouton pleine largeur dessous */
  .pm-f,
  .pm-f.is-invalid,
  .pm-f:has(input:focus-visible),
  .pm-f.is-invalid:has(input:focus-visible) {
    margin-top: 32px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    height: auto;
    padding: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }

  .pm-field {
    flex: none;
    height: 56px;
    padding: 4px 4px 4px 20px;
    border-radius: 999px;
    background: var(--surface);
    box-shadow: 0 0 0 1px var(--bordure), 0 30px 60px -36px rgba(11, 13, 12, 0.35);
    transition: box-shadow 0.15s ease;
  }

  .pm-field:focus-within {
    box-shadow: 0 0 0 1px var(--encre), 0 0 0 5px var(--halo-focus),
      0 30px 60px -36px rgba(11, 13, 12, 0.35);
  }

  .pm-f.is-invalid .pm-field {
    box-shadow: 0 0 0 1px var(--critique), 0 30px 60px -36px rgba(11, 13, 12, 0.35);
  }

  .pm-f.is-invalid .pm-field:focus-within {
    box-shadow: 0 0 0 1px var(--critique), 0 0 0 5px var(--halo-critique),
      0 30px 60px -36px rgba(11, 13, 12, 0.35);
  }

  .pm-b {
    height: 54px;
  }

  .pm-b svg {
    display: none;
  }

  .pm-ok {
    margin-top: 32px;
    align-items: flex-start;
    width: 100%;
    padding: 16px 18px;
    border-radius: 20px;
    font-size: 15px;
  }

  .pm-ok__check {
    margin-top: -2px;
  }

  .pm-bot {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 22px 26px;
  }

  .pm-bot nav {
    gap: 18px;
  }

  /* Le téléphone ne garde que les deux liens ; l'adresse est dans les mentions */
  .pm-bot .pm-mail {
    display: none;
  }

  .pm-bot .pm-copy {
    order: 2;
  }

  .doc-main {
    padding: 8px 22px 56px;
  }

  .doc h1 {
    font-size: 36px;
  }

  .doc h2 {
    margin-top: 36px;
    font-size: 21px;
  }

  .doc dl > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
