/*
 * Front office stylesheet (F1.6) — one file, no framework, no third-party resource.
 *
 * Direction (FD9 is deferred: the brand sheet has not been provided): sober and light, derived from the colours of
 * the Flutter app (`#3FC96D` green, `#3F3E3F` text) so that the site and the app look related. The bright brand
 * green fails WCAG contrast against white, so it is only used for decoration and as a background under dark text;
 * links and buttons use a darker green (`--c-brand-strong`). Replacing the tokens below re-skins the whole site.
 *
 * Constraints kept on purpose: no inline style anywhere (the strict CSP of F2.1 will not allow `unsafe-inline`),
 * mobile first (min-width queries only), dark mode through `prefers-color-scheme`, and no JavaScript except the
 * optional privacy script of F1.7 (audience-measurement choice, click-to-play videos), never needed to read a page.
 */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  /* `swap`: text is shown at once in the fallback font, no invisible-text delay. */
  font-display: swap;
  src: url("fonts/inter-latin-wght-normal.260c81a4759b.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light dark;

  /* Colour tokens (light). Pairs checked against WCAG AA by the axe tests in both schemes. */
  --c-bg: #ffffff;
  --c-surface: #f7f8f9;
  --c-surface-brand: #f0fdf2;
  --c-text: #3f3e3f;
  --c-text-muted: #5e5e5e;
  --c-border: #d9dcde;
  --c-brand: #3fc96d;
  --c-brand-strong: #1b7a3b;
  --c-brand-strong-hover: #17652f;
  --c-on-brand-strong: #ffffff;
  --c-focus: #0b57d0;
  --c-error: #b3261e;
  --c-notice-bg: #1b7a3b;
  --c-notice-text: #ffffff;

  /* Typography: fluid between a phone and a desktop, no media query needed. */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-h1: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  --fs-h2: clamp(1.5rem, 1.2rem + 1.3vw, 2.125rem);
  --fs-h3: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);
  --fs-h4: 1.125rem;
  --lh-body: 1.65;
  --lh-heading: 1.2;

  /* Spacing scale and shape. */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 1rem;
  --s-4: 1.5rem;
  --s-5: 2.5rem;
  --s-6: 4rem;
  --radius: 0.75rem;
  --radius-small: 0.375rem;
  --measure: 70ch;
  --container: 72rem;
  --shadow: 0 1px 2px rgb(0 0 0 / 6%), 0 4px 16px rgb(0 0 0 / 6%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --c-bg: #151a17;
    --c-surface: #1e2621;
    --c-surface-brand: #1b2a20;
    --c-text: #e8ece9;
    --c-text-muted: #a9b3ac;
    --c-border: #34403a;
    /* On dark the bright brand green is readable: links use it, buttons keep dark text on it. */
    --c-brand-strong: #6fdb91;
    --c-brand-strong-hover: #9be8b4;
    --c-on-brand-strong: #0f2a18;
    --c-focus: #8ab4f8;
    --c-error: #ff8a80;
    --c-notice-bg: #3fc96d;
    --c-notice-text: #0f2a18;
    --shadow: none;
  }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--s-5);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-optical-sizing: auto;
  /* A long word breaks instead of overflowing on a narrow or heavily zoomed screen (WCAG 1.4.10 reflow). */
  overflow-wrap: break-word;
  hyphens: auto;
}

main {
  flex: 1 0 auto;
}

img,
picture,
svg {
  max-width: 100%;
}

img {
  /* Width and height attributes give the aspect ratio (no layout shift); the height follows the width. */
  height: auto;
  display: block;
}

h1,
h2,
h3,
h4 {
  line-height: var(--lh-heading);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: var(--s-5) 0 var(--s-3);
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-h1);
  margin-top: 0;
}
h2 {
  font-size: var(--fs-h2);
}
h3 {
  font-size: var(--fs-h3);
}
h4 {
  font-size: var(--fs-h4);
}

p,
ul,
ol,
dl,
blockquote,
figure {
  margin: 0 0 var(--s-3);
}

a {
  color: var(--c-brand-strong);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
}
a:hover {
  color: var(--c-brand-strong-hover);
  text-decoration-thickness: 0.14em;
}

/* Focus is always visible, on every interactive element, and never removed. */
:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 3px;
  border-radius: 2px;
}

small {
  font-size: var(--fs-small);
  color: var(--c-text-muted);
}

hr {
  border: 0;
  border-top: 1px solid var(--c-border);
  margin: var(--s-5) 0;
}

/* ---------- Layout ---------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--s-3);
}

@media (min-width: 48rem) {
  .container {
    padding-inline: var(--s-4);
  }
}

.page {
  padding-block: var(--s-5) var(--s-6);
}

/* Reading column: long text never runs wider than a comfortable line length. */
.page > .page-article > :where(p, ul, ol, blockquote, .rich-text, h2, h3, h4, details, .table-wrap, .document) {
  max-width: var(--measure);
}

.lead {
  font-size: 1.25rem;
  color: var(--c-text-muted);
  max-width: var(--measure);
}

/* Skip link: the first focusable element, visible only when focused. */
.skip-link {
  position: absolute;
  inset-block-start: var(--s-2);
  inset-inline-start: var(--s-2);
  z-index: 100;
  padding: var(--s-2) var(--s-3);
  background: var(--c-bg);
  color: var(--c-text);
  border: 2px solid var(--c-focus);
  border-radius: var(--radius-small);
  transform: translateY(-300%);
}
.skip-link:focus {
  transform: none;
}

/* Target of the skip link: focus lands there without a visible ring on the whole page. */
#contenu:focus {
  outline: none;
}

/* ---------- Announcement ---------- */

.announcement {
  background: var(--c-notice-bg);
  color: var(--c-notice-text);
  text-align: center;
  padding: var(--s-2) var(--s-3);
  font-size: var(--fs-small);
}
.announcement p {
  margin: 0;
}
.announcement a {
  color: inherit;
  font-weight: 600;
}

/* ---------- Header and navigation ---------- */

.site-header {
  border-bottom: 1px solid var(--c-border);
  background: var(--c-bg);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2) var(--s-4);
  padding-block: var(--s-3);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  color: var(--c-text);
  text-decoration: none;
}
.site-brand:hover {
  color: var(--c-text);
}
.site-brand img {
  height: 2.5rem;
  width: auto;
}

/* The menu wraps under the logo on a phone and sits in line on a wider screen. No script, no hamburger: the
   links are always reachable, which is the most accessible navigation there is for a handful of entries. */
.site-header nav {
  flex: 1 1 100%;
  order: 3;
}
@media (min-width: 52rem) {
  .site-header nav {
    flex: 1 1 auto;
    order: 0;
  }
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1) var(--s-4);
}
nav a {
  display: inline-block;
  padding-block: var(--s-1);
  color: var(--c-text);
  text-decoration: none;
  font-weight: 500;
}
nav a:hover {
  color: var(--c-brand-strong);
  text-decoration: underline;
}
nav a[aria-current="page"] {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--c-brand);
  text-decoration-thickness: 0.18em;
  text-underline-offset: 0.3em;
}

/* Sub-menus stay visible (a hover-only dropdown is unreachable on touch and fails WCAG 1.4.13 without a script). */
nav li > ul {
  display: block;
  margin-block-start: var(--s-1);
  padding-inline-start: var(--s-3);
  border-inline-start: 2px solid var(--c-border);
  font-size: var(--fs-small);
}

.header-cta {
  margin-inline-start: auto;
  order: 2;
  max-width: 100%;
}
@media (min-width: 52rem) {
  .header-cta {
    order: 0;
  }
}

/* ---------- Buttons ---------- */

.button,
.header-cta,
button[type="submit"],
.cta-link a,
.store-buttons a:not(:has(img)) {
  display: inline-block;
  padding: 0.7em 1.3em;
  border: 2px solid var(--c-brand-strong);
  border-radius: 999px;
  background: var(--c-brand-strong);
  color: var(--c-on-brand-strong);
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  /* Never wider than the screen, even with a doubled font size (WCAG 1.4.4 / 1.4.10). */
  max-width: 100%;
  overflow-wrap: anywhere;
}
.button:hover,
.header-cta:hover,
button[type="submit"]:hover,
.cta-link a:hover,
.store-buttons a:not(:has(img)):hover {
  background: var(--c-brand-strong-hover);
  border-color: var(--c-brand-strong-hover);
  color: var(--c-on-brand-strong);
  text-decoration: none;
}

/* ---------- Store buttons, QR code and download call to action ---------- */

.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  align-items: center;
}
.store-buttons img {
  width: auto;
  height: 3rem;
}

.store-qr-block {
  width: min(9rem, 100%);
  margin-block: var(--s-3);
  padding: var(--s-2);
  background: #ffffff; /* a QR code needs a light quiet zone, also in dark mode */
  border-radius: var(--radius-small);
}
.store-qr-block svg {
  display: block;
  width: 100%;
  height: auto;
}

/* A phone cannot scan its own screen: the QR code is for visitors on a computer (touch + no hover = phone/tablet). */
@media (hover: none) and (pointer: coarse) {
  .app-cta-qr,
  .app-landing .store-qr-block {
    display: none;
  }
}

.app-cta {
  margin-block: var(--s-5);
  padding: var(--s-4);
  background: var(--c-surface-brand);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
}
.app-cta h2 {
  margin-top: 0;
}
/* A link alone on its line is a pointer target: at least 24 px high (WCAG 2.5.8), unlike a link inside a sentence. */
.app-cta p > a {
  display: inline-block;
  padding-block: var(--s-2);
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: var(--s-6);
  padding-block: var(--s-5);
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  font-size: var(--fs-small);
}
.site-footer .app-cta {
  margin-block: 0 var(--s-4);
  background: var(--c-bg);
}
.site-footer nav {
  margin-bottom: var(--s-4);
}
.site-footer .footer-text {
  color: var(--c-text-muted);
  white-space: normal;
}
.social-links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1) var(--s-4);
}

.legal-links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1) var(--s-4);
}
/* A button that reads as a link (re-opening the privacy choices): same target size as the links around it. */
.link-button {
  padding: var(--s-1) 0;
  border: 0;
  background: none;
  color: var(--c-text);
  font: inherit;
  font-weight: 500;
  text-decoration: underline;
  cursor: pointer;
}
.link-button:hover {
  color: var(--c-brand-strong);
}

/* ---------- Privacy: consent banner and legal pages (F1.7) ---------- */

/* Fixed to the bottom: it appears without moving the content, and does not hide the page header. Hidden until the
   privacy script shows it (`hidden`): without JavaScript nothing is measured, so nothing is asked. */
.privacy-banner {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 10;
  padding-block: var(--s-3);
  background: var(--c-bg);
  border-top: 3px solid var(--c-brand-strong);
  box-shadow: 0 -4px 16px rgb(0 0 0 / 0.15);
  max-height: 60vh;
  overflow-y: auto;
}
.privacy-banner[hidden] {
  display: none;
}
.privacy-banner h2 {
  margin: 0 0 var(--s-2);
  font-size: var(--fs-h4);
}
.privacy-banner p {
  margin-block: 0 var(--s-3);
}
.privacy-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
}
/* A focused element must not end up behind the fixed banner (WCAG 2.4.11). */
html {
  scroll-padding-bottom: 12rem;
}

.legal-draft-notice {
  margin-block: var(--s-3);
  padding: var(--s-3);
  background: var(--c-surface);
  border: 2px solid var(--c-border);
  border-inline-start: 6px solid var(--c-brand-strong);
  border-radius: var(--radius-small);
}
.legal-version {
  margin-top: var(--s-5);
  padding-top: var(--s-3);
  border-top: 1px solid var(--c-border);
  color: var(--c-text-muted);
  font-size: var(--fs-small);
  overflow-wrap: anywhere;
}
.privacy-controls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-block: var(--s-3);
}

/* ---------- Breadcrumbs ---------- */

.breadcrumbs {
  padding-top: var(--s-3);
  font-size: var(--fs-small);
  color: var(--c-text-muted);
}
.breadcrumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1);
}
.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-inline-start: var(--s-1);
}
.breadcrumbs a {
  color: var(--c-text-muted);
}

/* ---------- Rich text and content blocks ---------- */

.rich-text > :last-child {
  margin-bottom: 0;
}
.rich-text ul,
.rich-text ol {
  padding-inline-start: 1.4em;
}
.rich-text li + li {
  margin-top: var(--s-1);
}
blockquote {
  padding: var(--s-1) var(--s-4);
  border-inline-start: 4px solid var(--c-brand);
  color: var(--c-text-muted);
  font-style: italic;
}

.page-article > picture,
.page-article > .image-block {
  margin-block: var(--s-4);
}
.page-article picture img {
  border-radius: var(--radius);
}
.hero-image {
  margin-block: var(--s-4);
}

.offer-cost {
  font-size: 1.25rem;
  color: var(--c-brand-strong);
}

/* Image + text */
.image-text {
  display: grid;
  gap: var(--s-4);
  align-items: center;
  margin-block: var(--s-5);
}
@media (min-width: 48rem) {
  .image-text {
    grid-template-columns: 1fr 1fr;
    gap: var(--s-5);
  }
  .image-text--right > :first-child {
    order: 2;
  }
}

/* Columns */
.columns {
  display: grid;
  gap: var(--s-4);
  margin-block: var(--s-5);
}
@media (min-width: 48rem) {
  .columns {
    grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
  }
}

/* Offer cards */
.offer-cards {
  list-style: none;
  padding: 0;
  margin-block: var(--s-5);
  display: grid;
  gap: var(--s-4);
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
}
.offer-cards > li {
  display: flex;
  flex-direction: column;
  padding: var(--s-4);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.offer-cards h3 {
  margin-top: 0;
}
.offer-cards ul {
  padding-inline-start: 1.2em;
  flex: 1;
}
.offer-cards .offer-cost {
  margin-bottom: var(--s-3);
}

/* Offer list of the index page */
.offer-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--s-3);
  grid-template-columns: repeat(auto-fill, minmax(min(18rem, 100%), 1fr));
}
.offer-list > li {
  padding: var(--s-4);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
}
.offer-list a {
  font-weight: 700;
  font-size: var(--fs-h4);
}
.offer-list p {
  margin: var(--s-1) 0 0;
  color: var(--c-text-muted);
}

/* FAQ accordion (native <details>: keyboard and screen-reader friendly without a script) */
.faq {
  margin-block: var(--s-5);
}
.faq details {
  border-bottom: 1px solid var(--c-border);
}
.faq details:first-of-type {
  border-top: 1px solid var(--c-border);
}
.faq summary {
  padding: var(--s-3) var(--s-1);
  font-weight: 600;
  cursor: pointer;
}
.faq details[open] > summary {
  color: var(--c-brand-strong);
}
.faq details > div {
  padding: 0 var(--s-1) var(--s-3);
}

/* Table: a keyboard-focusable scroll region so that a wide table never forces the whole page to scroll sideways. */
.table-wrap {
  overflow-x: auto;
  margin-block: var(--s-4);
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: var(--fs-small);
}
caption {
  text-align: start;
  font-weight: 700;
  padding-bottom: var(--s-2);
}
th,
td {
  text-align: start;
  padding: var(--s-2) var(--s-3);
  border-bottom: 1px solid var(--c-border);
  vertical-align: top;
}
thead th {
  background: var(--c-surface);
}

/* Call to action band */
.call-to-action {
  margin-block: var(--s-5);
  padding: var(--s-5) var(--s-4);
  background: var(--c-surface-brand);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  text-align: center;
}
.call-to-action h2 {
  margin-top: 0;
}
.call-to-action p:last-child {
  margin-bottom: 0;
}

/* Video: no third-party player is loaded until the visitor asks (privacy.js, F1.7): a link and the title first. */
.video {
  margin-block: var(--s-4);
  padding: var(--s-4);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
}
.video figcaption {
  font-weight: 700;
}
.video p:last-child {
  margin-bottom: 0;
}
.embed-play {
  margin-top: var(--s-3);
}
.embed-frame {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  margin-bottom: var(--s-3);
  border: 0;
}

/* PDF document */
.document {
  padding: var(--s-3);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-small);
}

/* ---------- Contact form ---------- */

.form-field {
  margin-bottom: var(--s-3);
  max-width: 40rem;
}
.form-field label {
  display: block;
  margin-bottom: var(--s-1);
  font-weight: 600;
}
input[type="text"],
input[type="email"],
input[type="password"],
textarea {
  width: 100%;
  padding: 0.7em 0.9em;
  font: inherit;
  color: var(--c-text);
  background: var(--c-bg);
  border: 2px solid var(--c-text-muted);
  border-radius: var(--radius-small);
}
input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--c-error);
}
.field-error {
  display: block;
  margin-top: var(--s-1);
  color: var(--c-error);
  font-weight: 600;
}
.form-errors {
  max-width: 40rem;
  padding: var(--s-3);
  margin-bottom: var(--s-3);
  border: 2px solid var(--c-error);
  border-radius: var(--radius-small);
  color: var(--c-error);
  font-weight: 600;
}
.form-status {
  max-width: 40rem;
  padding: var(--s-3);
  background: var(--c-surface-brand);
  border: 1px solid var(--c-brand-strong);
  border-radius: var(--radius-small);
}
/* ---------- Member area (F2.3) ---------- */

.member-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
  padding: 0;
  margin: 0 0 var(--s-3);
  list-style: none;
}
.member-nav a[aria-current="page"] {
  font-weight: 700;
}
.member-logout {
  margin-bottom: var(--s-4);
}
.button-secondary,
button[type="submit"].button-secondary {
  background: transparent;
  color: var(--c-brand-strong);
}
button[type="submit"].button-secondary:hover {
  background: var(--c-surface-brand);
  color: var(--c-brand-strong);
}
.member-facts dt {
  font-weight: 700;
  margin-top: var(--s-3);
}
.member-facts dd {
  margin: 0;
}
.form-field--check {
  display: flex;
  gap: var(--s-2);
  align-items: baseline;
}
.form-field--check label {
  display: inline;
}
.header-link {
  font-weight: 600;
}

/* ---------- Accessibility statement ---------- */

.statement dt {
  font-weight: 700;
  margin-top: var(--s-3);
}
.statement dd {
  margin: 0;
}

/* ---------- Respect user preferences ---------- */

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

@media print {
  .skip-link,
  .announcement,
  .site-header nav,
  .header-cta,
  .app-cta,
  .privacy-banner,
  .store-qr-block {
    display: none;
  }
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
  }
}
