/* Palette claire « Papier & encre + sauge », alignée sur `lightColors` de src/theme/colors.ts.
   Seule la palette claire est utilisée : c'est la marque, pour tout visuel hors de l'app. */
@font-face {
  font-family: 'Playfair Display';
  font-weight: 700;
  font-display: swap;
  src: url('/static/fonts/playfair-display-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Playfair Display';
  font-weight: 500;
  font-style: italic;
  font-display: swap;
  src: url('/static/fonts/playfair-display-500-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans';
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/dm-sans-400.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans';
  font-weight: 600;
  font-display: swap;
  src: url('/static/fonts/dm-sans-600.woff2') format('woff2');
}

:root {
  --cream: #f7f2e9;
  --cream-deep: #efe7d8;
  --paper: #fffdf8;
  --ink: #2e2a22;
  --sage: #4e8c70;
  --terracotta: #c2703c;
  --amber: #d99a2b;
  /* Variantes foncées pour le TEXTE : sur crème, `foregroundMuted` (#7a7264) plafonne à 4,3:1, la
     sauge à 3,6:1 et le terracotta à 3,3:1, sous le seuil AA de 4,5:1 pour du texte courant. */
  --ink-soft: #6b6356;
  --sage-ink: #38705a;
  --terracotta-ink: #9e5428;
  --highlight: rgba(217, 154, 43, 0.5);
  --border: rgba(46, 42, 34, 0.12);
  --border-strong: rgba(46, 42, 34, 0.25);
  --shadow: 0 10px 28px rgba(46, 42, 34, 0.12);
  --radius: 1rem;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  overflow-wrap: break-word;
}
img {
  max-width: 100%;
}
a {
  color: var(--sage-ink);
  text-underline-offset: 0.2em;
}
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}
strong {
  font-weight: 600;
}

/* Coup de surligneur : seule la moitié basse du mot est couverte, comme au Stabilo dans une marge. */
mark {
  color: inherit;
  background: linear-gradient(var(--highlight), var(--highlight)) 0 88% / 100% 0.5em no-repeat;
  padding: 0 0.06em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.site-header {
  max-width: 68rem;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.35rem;
  text-decoration: none;
}
.brand img {
  border-radius: 9px;
  box-shadow: 0 2px 6px rgba(46, 42, 34, 0.2);
}
.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}
.site-header nav a {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}
.site-header nav a:hover,
.site-header nav a[aria-current='page'] {
  color: var(--ink);
}
.site-header nav a[aria-current='page'] {
  background: linear-gradient(var(--highlight), var(--highlight)) 0 90% / 100% 0.45em no-repeat;
}

.site-footer {
  max-width: 46rem;
  margin: 3rem auto 0;
  padding: 0 1rem 3rem;
  color: var(--ink-soft);
  font-size: 0.85rem;
  text-align: center;
}
.site-footer a {
  color: var(--ink-soft);
}

/* ——— Pages documentaires (support, légal) : une feuille posée sur le bureau. ——— */
main.doc {
  max-width: 46rem;
  margin: 1rem auto 0;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
}
@media (max-width: 34rem) {
  main.doc {
    margin: 0.5rem 0.75rem 0;
    padding: 1.5rem 1.25rem;
  }
}
.doc h1,
.doc h2,
.doc h3 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.25;
  margin: 2.5rem 0 1rem;
}
.doc h1 {
  margin-top: 0;
  font-size: 1.9rem;
}
.doc h2 {
  font-size: 1.3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.doc h3 {
  font-size: 1.1rem;
}
.doc em {
  color: var(--ink-soft);
  font-style: normal;
  font-size: 0.9rem;
}
.doc ul {
  padding-left: 1.25rem;
}
.doc li {
  margin: 0.4rem 0;
}
/* Les tableaux larges défilent dans leur propre conteneur : le body ne scrolle jamais
   horizontalement, y compris sur petit écran. */
.table-scroll {
  overflow-x: auto;
  margin: 1.25rem 0;
}
.doc table {
  border-collapse: collapse;
  width: 100%;
  min-width: 22rem;
  font-size: 0.95rem;
}
.doc th,
.doc td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.doc th {
  background: var(--cream-deep);
  font-weight: 600;
}
.doc blockquote {
  margin: 1.5rem 0;
  padding: 0.75rem 1.25rem;
  border-left: 3px solid var(--sage);
  background: var(--cream-deep);
  border-radius: 0 0.5rem 0.5rem 0;
}
.doc hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* ——— Pages vitrine ——— */
.wrap {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1rem;
}
.band {
  padding: 3.5rem 0;
}
.band-alt {
  background: var(--cream-deep);
}
.page h1,
.page h2,
.page h3 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.page h1 {
  font-size: clamp(2.4rem, 8vw, 4.1rem);
  margin: 0.6rem 0 1.25rem;
}
.page h2 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  margin: 0.4rem 0 1rem;
}
.page h3 {
  font-size: 1.3rem;
  margin: 0 0 0.4rem;
}
.kicker {
  margin: 0;
  color: var(--terracotta-ink);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 34rem;
  margin: 0;
}
.section-lede {
  color: var(--ink-soft);
  max-width: 40rem;
  margin: 0;
}
/* Annotation au crayon, dans la marge. */
.note {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  color: var(--terracotta-ink);
}

/* Autocollant : contour blanc découpé + ombre portée, comme les compagnons des visuels. */
.sticker {
  height: auto;
  filter: drop-shadow(3px 0 0 #fff) drop-shadow(-3px 0 0 #fff) drop-shadow(0 3px 0 #fff)
    drop-shadow(0 -3px 0 #fff) drop-shadow(0 8px 10px rgba(46, 42, 34, 0.18));
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 1.75rem;
}
.privacy-line {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--sage-ink);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  padding: 0.9rem 1.4rem;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(56, 112, 90, 0.25);
}
.button:hover {
  background: #305f4c;
}
/* Liens vers l'App Store et Google Play : texte simple et non badges officiels, dont l'illustration ne
   peut être ni redessinée ni modifiée. */
.button-ink {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 6px 16px rgba(46, 42, 34, 0.22);
}
.button-ink:hover {
  background: #474034;
}
/* La classe `android` est posée par `_head.html` : le store du téléphone passe devant, et
   `reading-flow` aligne sur cet ordre visuel celui du clavier et des lecteurs d'écran (Chrome 137+). */
.android .store-play {
  order: -1;
}
.android .cta {
  reading-flow: flex-visual;
}
.link-more {
  font-weight: 600;
}

/* Héro : le texte, puis le renard qui grandit d'un autocollant à l'autre. */
.hero {
  padding: 1.5rem 0 3.5rem;
}
.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 56rem) {
  .hero {
    padding-top: 3rem;
  }
  .hero-grid {
    grid-template-columns: 1.15fr 1fr;
  }
}
.evolution {
  margin: 0;
}
.evolution ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.evolution li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.evolution li:nth-child(1) {
  width: 29%;
}
.evolution li:nth-child(2) {
  width: 33%;
  margin-bottom: 1.75rem;
}
.evolution li:nth-child(3) {
  width: 38%;
  margin-bottom: 3.5rem;
}
.evolution img {
  width: 100%;
}
.evolution li + li::before {
  content: '';
  position: absolute;
  top: 12%;
  left: -15%;
  width: 30%;
  aspect-ratio: 64 / 36;
  background: url('/static/img/fleche.svg') center / contain no-repeat;
}
.evolution .note {
  margin-top: 0.15rem;
  font-size: 1.05rem;
  transform: rotate(-3deg);
}
.evolution figcaption {
  margin: 1rem auto 0;
  max-width: 22rem;
  text-align: center;
  font-size: 1.1rem;
  text-wrap: balance;
  transform: rotate(-1.5deg);
}

/* Étapes numérotées dans un cercle tracé à main levée. */
.steps {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.75rem;
  counter-reset: step;
}
@media (min-width: 48rem) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 3.4rem;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.2rem;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.35rem;
  line-height: 1;
  border: 2px solid var(--amber);
  border-radius: 48% 52% 44% 56% / 56% 44% 56% 44%;
  transform: rotate(-8deg);
}
.steps p {
  margin: 0;
  color: var(--ink-soft);
}

/* Galerie des compagnons. */
.companions {
  list-style: none;
  margin: 2.25rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
@media (min-width: 48rem) {
  .companions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
  }
}
.companion {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1.1rem 0.85rem 1.25rem;
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.companion img {
  width: 72%;
  max-width: 9.5rem;
}
.companion h3 {
  margin: 0.35rem 0 0;
}
.traits {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
}
.companion .quote {
  margin: 0.4rem 0 0.6rem;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 0.98rem;
  line-height: 1.4;
}
.tag {
  margin-top: auto;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
}
.tag-free {
  background: rgba(78, 140, 112, 0.16);
  color: #2f5f49;
}
.tag-unlock {
  background: rgba(217, 154, 43, 0.22);
  color: #6b4a10;
}
.tag-pro {
  background: rgba(194, 112, 60, 0.16);
  color: #84461f;
}

/* Liste « coché au crayon ». */
.checks {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
  max-width: 44rem;
}
.checks li {
  position: relative;
  padding-left: 2rem;
}
.checks li::before {
  content: '✓';
  position: absolute;
  left: 0.15rem;
  top: -0.1rem;
  color: var(--sage-ink);
  font-weight: 600;
  font-size: 1.25rem;
  transform: rotate(-8deg);
}
.fine {
  color: var(--ink-soft);
  font-size: 0.92rem;
  max-width: 44rem;
}

/* Carte de mise en avant : une feuille scotchée et un texte. */
.feature-card {
  display: grid;
  gap: 1.75rem;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 2rem 1.5rem 1.5rem;
}
@media (min-width: 48rem) {
  .feature-card {
    grid-template-columns: 15rem 1fr;
    padding: 2.25rem;
    gap: 2.5rem;
  }
}
.feature-card p {
  margin: 0 0 1rem;
}
.feature-card > .sticker {
  justify-self: center;
  width: 100%;
  max-width: 12rem;
}
.pinned {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 15rem;
  transform: rotate(-2deg);
}
.pinned img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.35rem;
  box-shadow: var(--shadow);
}
/* Bande de scotch. */
.pinned::before {
  content: '';
  position: absolute;
  top: -0.8rem;
  left: 50%;
  z-index: 1;
  width: 6rem;
  height: 1.6rem;
  transform: translateX(-50%) rotate(-4deg);
  background: rgba(239, 231, 216, 0.88);
  box-shadow: 0 1px 2px rgba(46, 42, 34, 0.15);
}

.closing {
  text-align: center;
}
.closing .cta {
  justify-content: center;
}

/* ——— Défi 30 jours ——— */
.defi-grid {
  display: grid;
  gap: 2.75rem;
  align-items: start;
}
@media (min-width: 56rem) {
  .defi-grid {
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
  }
}
.defi-grid .pinned {
  max-width: 22rem;
}
.download-meta {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

/* ——— Presse ——— */
.press-banner {
  margin: 0 0 2.5rem;
}
.press-banner img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.facts {
  margin: 1.5rem 0 0;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.facts > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border-top: 1px solid var(--border);
}
.facts > div:first-child {
  border-top: 0;
}
@media (min-width: 40rem) {
  .facts > div {
    grid-template-columns: 12rem minmax(0, 1fr);
  }
}
.facts dt,
.facts dd {
  margin: 0;
  padding: 0.75rem 1.1rem;
}
.facts dt {
  font-weight: 600;
  background: var(--cream-deep);
}
.release {
  max-width: 46rem;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  margin-top: 1.5rem;
}
@media (min-width: 40rem) {
  .release {
    padding: 2.5rem;
  }
}
.release h3 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
}
.release .chapo {
  font-weight: 600;
}
.downloads {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
}
.downloads a {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 100%;
  padding: 0.85rem 1rem;
  color: var(--ink);
  text-decoration: none;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
}
.downloads a:hover {
  border-color: var(--border-strong);
}
.downloads img {
  flex: none;
  width: 4.5rem;
  height: 3rem;
  object-fit: cover;
  border-radius: 0.35rem;
}
.downloads img.thumb-square {
  width: 3rem;
  border-radius: 0.6rem;
}
.downloads strong {
  display: block;
}
.downloads span {
  color: var(--ink-soft);
  font-size: 0.85rem;
}
.page h3.subhead {
  margin: 2.75rem 0 0.4rem;
}
.press-companions {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}
@media (min-width: 48rem) {
  .press-companions {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}
.press-companions a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}
.press-companions img {
  width: 100%;
}
.captures {
  margin: 1rem 0 0;
  padding-left: 1.25rem;
  columns: 2 12rem;
}
.captures li {
  margin: 0.25rem 0;
}
.lang-en p {
  max-width: 46rem;
}
