@import "/brand.css";
/* The presentation pages are static and cannot import src/tokens.css: these values
   repeat it exactly (tests/tokens.test.ts fails if they drift apart). */
:root {
  --accent: #a6442f;
  --accent-fonce: #8a3624;
  --texte-principal: #2b2622;
  --texte-secondaire: #5e5650;
  --bordure-controle: #8f7f75;
  --bordure-decorative: #eddcd0;
  --fond-page: #fffaf5;
  --fond-carte: #fff;
  --fond-rose: #fff4ec;
  --fond-saumon: #ffe6da;
  --sur-accent: #fff;
  --focus: #a6442f;
  --focus-width: 2px;
  --focus-offset: 2px;
  /* Titres et texte dans la même famille, choisie pour sa lisibilité. */
  --police-titre:
    "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --police-corps:
    "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-h1: 2.5rem;
  --fs-h2: 1.5rem;
  --fs-corps: 1rem;
  --fs-secondaire: 0.875rem;
  --lh-h1: 1.1;
  --lh-h2: 1.25;
  --lh-corps: 1.55;
  --lh-secondaire: 1.5;
  --graisse-forte: 700;
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-24: 24px;
  --space-32: 32px;
  --space-48: 48px;
  --space-64: 64px;
  --radius-bouton: 8px;
  --radius-carte: 12px;
  --radius-pilule: 999px;
  --bordure: 1px;
  --bordure-active: 2px;
  --hauteur-controle: 44px;
  --etape-pastille: 28px;
  --largeur-contenu: 880px;
  font-family: var(--police-corps);
  font-size: 100%;
  line-height: var(--lh-corps);
  color: var(--texte-principal);
  background: var(--fond-page);
}
/* Big screens (27" and up): the column widens, paragraphs stay ~80 characters wide. */
@media (min-width: 1600px) {
  :root {
    --largeur-contenu: 1272px;
  }
}

/* Shared by the presentation and /chemins/ pages. */
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--fond-page);
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-24);
}
a {
  color: inherit;
  text-decoration: none;
}
:focus-visible {
  outline: var(--focus-width) solid var(--focus);
  outline-offset: var(--focus-offset);
}
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: var(--police-titre);
  font-weight: var(--graisse-forte);
}
.wrap {
  width: min(1280px, calc(100% - 96px));
  margin: auto;
}
.site-header {
  min-height: 72px;
  border-bottom: var(--bordure) solid var(--bordure-decorative);
  background: var(--fond-carte);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-24);
  padding: var(--space-12) var(--space-32);
}
.logo {
  display: flex;
  align-items: center;
  flex: none;
}
.logo img {
  display: block;
  height: 22px;
  width: auto;
}
.header-links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}
.site-header a:not(.logo, .button) {
  font-size: var(--fs-corps);
  min-height: var(--hauteur-controle);
  padding: 0 var(--space-12);
  display: inline-flex;
  align-items: center;
  color: var(--texte-secondaire);
  border-bottom: var(--bordure-active) solid transparent;
}
.site-header a:not(.logo, .button):hover {
  color: var(--texte-principal);
}
.header-links .button {
  margin-left: var(--space-8);
}
/* Three levels of action: principal (one per screen), secondary, tertiary link. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  min-height: var(--hauteur-controle);
  padding: var(--space-8) 20px;
  border-radius: var(--radius-bouton);
  border: var(--bordure) solid var(--accent);
  background: var(--accent);
  color: var(--sur-accent);
  font-size: var(--fs-corps);
  font-weight: var(--graisse-forte);
  line-height: 1.2;
  text-align: center;
}
.button:hover {
  background: var(--accent-fonce);
  border-color: var(--accent-fonce);
}
.button.secondary {
  background: var(--fond-carte);
  color: var(--texte-principal);
  border-color: var(--bordure-controle);
}
.button.secondary:hover {
  border-color: var(--texte-principal);
}
.button svg {
  flex: none;
}
.text-link {
  min-height: var(--hauteur-controle);
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  font-weight: var(--graisse-forte);
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.text-link:hover {
  color: var(--accent-fonce);
}
.eyebrow {
  font-size: var(--fs-secondaire);
  line-height: var(--lh-secondaire);
  font-weight: var(--graisse-forte);
  color: var(--accent);
  margin-bottom: var(--space-8);
}
.intro {
  font-size: var(--fs-corps);
  line-height: var(--lh-corps);
}
.cta-row {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  flex-wrap: wrap;
}
footer {
  border-top: var(--bordure) solid var(--bordure-decorative);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-8) var(--space-24);
  padding: var(--space-24) 0 var(--space-64);
}
footer .logo img {
  height: 18px;
}
footer p,
footer a {
  font-size: var(--fs-secondaire);
  color: var(--texte-secondaire);
}
footer > a:not(.logo),
.footer-links a {
  min-height: var(--hauteur-controle);
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  text-decoration: underline;
  text-underline-offset: 3px;
}
footer a:not(.logo):hover {
  color: var(--texte-principal);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-24);
}
.skip {
  position: absolute;
  top: -70px;
  left: var(--space-12);
  background: var(--fond-carte);
  border: var(--bordure) solid var(--bordure-controle);
  border-radius: var(--radius-bouton);
  padding: var(--space-12);
  z-index: 10;
}
.skip:focus {
  top: var(--space-12);
}

/* Presentation page (/decouvrir/, /en/discover/): one centred column, 880 px
   (1272 px from a 1600 px viewport), design-system blocks. */
.col {
  width: min(var(--largeur-contenu), calc(100% - 2 * var(--space-24)));
  margin-left: auto;
  margin-right: auto;
}
.presentation main {
  padding-top: var(--space-48);
  padding-bottom: var(--space-48);
}
.presentation main p,
.presentation main li {
  max-width: 40em;
}
.presentation h1 {
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  letter-spacing: normal;
}
.presentation h2,
.presentation h3 {
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
}
.presentation .lead,
.presentation .free,
.presentation .note,
.hero-visual figcaption {
  font-size: var(--fs-secondaire);
  line-height: var(--lh-secondaire);
  color: var(--texte-secondaire);
}

/* Hero: what Gravelax is, then what to do. */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--space-48);
  padding-bottom: var(--space-48);
}
.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-16);
}
.hero .eyebrow {
  margin-bottom: 0;
}
.hero .cta-row {
  margin-top: var(--space-8);
}
.hero-facts {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8) var(--space-24);
}
.hero-facts li {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  font-size: var(--fs-secondaire);
  font-weight: var(--graisse-forte);
}
.hero-facts li::before,
.checks li::before {
  content: "";
  flex: none;
  width: 14px;
  height: 8px;
  border-left: var(--bordure-active) solid var(--accent);
  border-bottom: var(--bordure-active) solid var(--accent);
  transform: translateY(-2px) rotate(-45deg);
}
.hero-visual img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
}
.hero-visual figcaption {
  margin-top: var(--space-12);
  text-align: center;
}

/* Blocks: hairline between them, head then body; side by side on wide screens. */
.block {
  border-top: var(--bordure) solid var(--bordure-decorative);
  padding: var(--space-48) 0;
  display: grid;
  gap: var(--space-24);
}
.block-head,
.block-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-16);
  min-width: 0;
}
.block-head .eyebrow {
  margin-bottom: calc(-1 * var(--space-8));
}
@media (min-width: 860px) {
  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
    gap: var(--space-48);
    align-items: start;
  }
}
.block-body > h3 {
  margin-top: var(--space-16);
}
.chips {
  list-style: none;
  display: flex;
  gap: var(--space-8);
  flex-wrap: wrap;
  padding: 0;
  margin: 0;
}
.chips li {
  border: var(--bordure) solid var(--bordure-decorative);
  background: var(--fond-carte);
  border-radius: var(--radius-pilule);
  padding: var(--space-4) var(--space-12);
  font-size: var(--fs-secondaire);
}

/* How it works: numbered cards, 1 / 2 / 4 columns. */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: etape;
  display: grid;
  gap: var(--space-16);
}
@media (min-width: 600px) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1600px) {
  .steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.steps li,
.card {
  background: var(--fond-carte);
  border: var(--bordure) solid var(--bordure-decorative);
  border-radius: var(--radius-carte);
  padding: var(--space-24);
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}
.steps li {
  counter-increment: etape;
}
.steps li::before,
.numbered li::before {
  width: var(--etape-pastille);
  height: var(--etape-pastille);
  border-radius: var(--radius-pilule);
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-family: var(--police-titre);
  font-weight: var(--graisse-forte);
  font-size: var(--fs-secondaire);
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps li::before {
  content: counter(etape);
}

/* Your data: check list and the "why no Strava" info box. */
.checks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}
.checks li {
  display: flex;
  gap: var(--space-12);
  align-items: baseline;
}
.info {
  background: var(--fond-rose);
  border: var(--bordure) solid var(--bordure-decorative);
  border-radius: var(--radius-carte);
  padding: var(--space-24);
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
  width: 100%;
  margin-top: var(--space-8);
}
.info summary {
  color: var(--accent);
  font-weight: var(--graisse-forte);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  min-height: var(--hauteur-controle);
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
}
.info details[open] > summary {
  margin-bottom: var(--space-4);
}

/* On your phone: the iPhone steps in a card. */
.ios-install {
  width: 100%;
}
.numbered {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: etape;
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}
.numbered li {
  counter-increment: etape;
  display: grid;
  grid-template-columns: var(--etape-pastille) minmax(0, 1fr);
  gap: var(--space-12);
  align-items: start;
}
.numbered li::before {
  content: counter(etape);
}
.ios-install p {
  color: var(--texte-secondaire);
  font-size: var(--fs-secondaire);
  line-height: var(--lh-secondaire);
}
.store-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-12);
}
.store img {
  display: block;
  height: 52px;
  width: auto;
}

/* FAQ: each question is a control, so it carries the control border. */
.faq .block-body {
  gap: var(--space-8);
}
.faq details {
  width: 100%;
  background: var(--fond-carte);
  border: var(--bordure) solid var(--bordure-controle);
  border-radius: var(--radius-carte);
}
.faq summary {
  list-style: none;
  cursor: pointer;
  min-height: var(--hauteur-controle);
  padding: var(--space-12) var(--space-16);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-16);
  font-weight: var(--graisse-forte);
  border-radius: var(--radius-carte);
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-right: var(--bordure-active) solid var(--accent);
  border-bottom: var(--bordure-active) solid var(--accent);
  transform: translateY(-2px) rotate(45deg);
}
.faq details[open] summary::after {
  transform: translateY(2px) rotate(-135deg);
}
.faq details p {
  padding: 0 var(--space-16) var(--space-16);
}
.faq .lead .text-link {
  min-height: 0;
}

/* Who is behind it and how to get in touch: the action box carries the screen's
   principal button. */
.action {
  background: var(--fond-saumon);
  border-radius: var(--radius-carte);
  padding: var(--space-24);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-12);
  width: 100%;
  margin-top: var(--space-8);
}
.action .note {
  color: var(--texte-principal);
}

@media (max-width: 1000px) {
  .wrap {
    width: calc(100% - 48px);
  }
  .site-header {
    padding: var(--space-12) var(--space-24);
  }
}
@media (max-width: 760px) {
  .hero {
    grid-template-columns: 1fr;
    gap: var(--space-32);
  }
  .hero-visual img {
    max-height: 320px;
  }
}
@media (max-width: 640px) {
  .site-header {
    padding: var(--space-8) var(--space-16);
    min-height: 64px;
    gap: var(--space-12);
  }
  .logo img {
    height: 18px;
  }
  .header-links {
    gap: 0;
  }
  .header-links .button {
    display: none;
  }
  .wrap {
    width: calc(100% - 32px);
  }
  .col {
    width: calc(100% - 2 * var(--space-16));
  }
  .presentation main {
    padding-top: var(--space-32);
  }
  .presentation h1 {
    font-size: 2rem;
  }
  .block {
    padding: var(--space-32) 0;
  }
  .cta-row {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .action .button {
    width: 100%;
  }
  .steps li,
  .card,
  .info,
  .action {
    padding: var(--space-16);
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Presentation page: sections alternate cream and white across the whole width
   (the colour runs to the screen edges, the content stays in the column). */
.presentation main > section {
  border-top: 0;
}
.presentation main > section:nth-of-type(even) {
  background: var(--fond-carte);
  box-shadow: 0 0 0 100vmax var(--fond-carte);
  clip-path: inset(0 -100vmax);
}
.presentation main > .hero {
  padding-top: var(--space-48);
}
/* One brighter band: "how it works" sits on the salmon background, text stays dark. */
.presentation main > #how {
  background: var(--fond-saumon);
  box-shadow: 0 0 0 100vmax var(--fond-saumon);
  clip-path: inset(0 -100vmax);
}

.presentation main {
  padding-top: 0;
}

/* Découvrir uses the app's own header, so every tab stays one click away,
   and a sticky sub-navigation for the sections of the page. */
.app-topbar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: var(--space-24);
  height: 72px;
  padding: 0 var(--space-32);
  border-bottom: var(--bordure) solid var(--bordure-decorative);
  background: var(--fond-carte);
}
.app-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  flex: none;
  text-decoration: none;
}
.app-brand img {
  display: block;
  width: auto;
  height: 21px;
}
.app-brand small {
  padding-left: 2px;
  color: var(--texte-secondaire);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.6px;
}
.app-nav {
  display: flex;
  align-items: stretch;
  gap: var(--space-4);
}
.app-nav-lien {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  padding: 0 var(--space-12);
  border-top: var(--bordure-active) solid transparent;
  border-bottom: var(--bordure-active) solid transparent;
  color: var(--texte-secondaire);
  font-size: var(--fs-corps);
  text-decoration: none;
  white-space: nowrap;
}
.app-nav-lien:hover {
  color: var(--texte-principal);
}
.app-nav-lien[aria-current="page"] {
  border-bottom-color: var(--accent);
  color: var(--accent);
  font-weight: var(--graisse-forte);
}
.app-nav-lien svg {
  flex: none;
}
.app-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 var(--space-4);
  border: var(--bordure) solid var(--accent-fonce);
  border-radius: var(--radius-pilule);
  color: var(--accent-fonce);
  font-size: var(--fs-secondaire);
  font-weight: var(--graisse-forte);
  line-height: 1;
}
.app-actions {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}
.app-actions .app-nav-lien {
  min-height: var(--hauteur-controle);
  border: 0;
}
.app-actions .app-langue {
  color: var(--texte-principal);
  font-weight: var(--graisse-forte);
}
.app-icone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--hauteur-controle);
  height: var(--hauteur-controle);
  border: var(--bordure) solid var(--bordure-controle);
  border-radius: var(--radius-bouton);
  color: var(--texte-principal);
}
.app-icone:hover {
  background: var(--fond-page);
}
.sous-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: var(--bordure) solid var(--bordure-decorative);
  background: var(--fond-carte);
}
.sous-nav-liens {
  display: flex;
  gap: var(--space-4);
  /* Aligned on the page column, so the links sit over the section titles. */
  width: min(var(--largeur-contenu), calc(100% - 2 * var(--space-24)));
  margin: auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.sous-nav-liens a {
  display: inline-flex;
  align-items: center;
  min-height: var(--hauteur-controle);
  padding: 0 var(--space-12);
  border-bottom: var(--bordure-active) solid transparent;
  color: var(--texte-secondaire);
  font-size: var(--fs-corps);
  text-decoration: none;
  white-space: nowrap;
}
/* Centred under the header on wide screens; on phones the row scrolls from the left. */
@media (min-width: 761px) {
  .sous-nav-liens {
    justify-content: center;
  }
}
.sous-nav-liens a:hover {
  border-bottom-color: var(--bordure-controle);
  color: var(--texte-principal);
}
html:has(.sous-nav) {
  scroll-padding-top: calc(var(--hauteur-controle) + var(--space-24));
}
.app-nav-mobile {
  display: none;
}
/* Same steps as the app: icons only between tablet and 1320 px. */
@media (max-width: 1319px) {
  .app-nav .app-nav-lien > span,
  .app-installer > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
  .app-nav .app-nav-lien {
    justify-content: center;
    min-width: var(--hauteur-controle);
  }
}
/* Phones: the tabs move to a bottom bar, as in the app. */
@media (max-width: 760px) {
  .app-topbar {
    height: 64px;
    padding: 0 var(--space-16);
  }
  .app-brand img {
    height: 16px;
  }
  .app-nav,
  .app-installer {
    display: none;
  }
  .sous-nav-liens {
    width: 100%;
    padding: 0 var(--space-16);
  }
  .app-nav-mobile {
    display: flex;
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 20;
    padding: var(--space-4) var(--space-4)
      calc(var(--space-4) + env(safe-area-inset-bottom));
    border-top: var(--bordure) solid var(--bordure-decorative);
    background: var(--fond-page);
  }
  .app-nav-mobile .app-nav-lien {
    flex: 1;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-4);
    min-height: 44px;
    padding: 0;
    border-top: 0;
  }
  .app-nav-mobile .app-nav-lien {
    min-width: 0;
  }
  /* As in the app: six tabs share the width, long labels end with an ellipsis. */
  .app-nav-mobile .app-nav-lien span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: var(--fs-secondaire);
  }
  .presentation {
    padding-bottom: 72px;
  }
}
