/*
 * Badge — the client-facing style sheet (issue #397, deliverable 2).
 *
 * Written by hand: no preprocessor, no build, no CDN (spec 017, tasks.md T009,
 * CSP "style-src 'self'"). The colour tokens keep the names and values of the
 * Badge style board (docs/design/prototype/badge/style.html, :root / .dark),
 * so the written charter, the prototype and this file share one vocabulary;
 * internal/views/tokens_test.go checks that they still agree.
 *
 * Theme: light by default; dark when the system asks for it, unless the
 * toggle set data-theme="light" on <html>; dark when the toggle set
 * data-theme="dark". Any element may carry data-theme to render its subtree in
 * one theme (the style board shows every component twice that way).
 */

/* ---------------------------------------------------------------- Fonts --- */
/* Caprasimo (titles, the logo's font) and Nunito (text), SIL OFL 1.1, from
   fontsource 5.3.0; provenance and digests in fonts/README.md. */

@font-face {
  font-family: "Caprasimo";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/caprasimo-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Caprasimo";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/caprasimo-latin-400-normal.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;
}

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("/assets/fonts/nunito-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("/assets/fonts/nunito-latin-wght-normal.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;
}

/* --------------------------------------------------------------- Tokens --- */
/* The palette of the 1d logo notice (sky, coral, turquoise, navy, cream,
   yellow), extended for text, states and dark mode by the prototype. The two
   dark blocks below are identical: plain CSS cannot share a declaration block
   between a media query and a selector (tokens_test.go checks they match). */

:root,
[data-theme="light"] {
  --paper: #fff1d0; --surface: #fff9ee; --ink: #1c2b4a; --muted: #5a5f73; --line: #1c2b4a; --soft: #ead3a2;
  --accent: #f2694b; --on-accent: #1c2b4a; --link: #1c2b4a; --hot: #b23f25; --sky: #ffe3a3;
  --fresh: #2a7a3b; --aging: #8a5300; --danger: #b3261e; --sea: #1ba6a6; --sun: #ffc23d;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #14203a; --surface: #1c2b4a; --ink: #fff6e8; --muted: #c9c2b0; --line: #fff6e8; --soft: #3a4a6e;
    --accent: #ff8a6b; --on-accent: #1c2b4a; --link: #ffc23d; --hot: #ff8a6b; --sky: #26355a;
    --fresh: #6fe0b0; --aging: #ffc23d; --danger: #ff9b8a; --sea: #5fd3cf; --sun: #ffc23d;
    color-scheme: dark;
  }
}

[data-theme="dark"] {
  --paper: #14203a; --surface: #1c2b4a; --ink: #fff6e8; --muted: #c9c2b0; --line: #fff6e8; --soft: #3a4a6e;
  --accent: #ff8a6b; --on-accent: #1c2b4a; --link: #ffc23d; --hot: #ff8a6b; --sky: #26355a;
  --fresh: #6fe0b0; --aging: #ffc23d; --danger: #ff9b8a; --sea: #5fd3cf; --sun: #ffc23d;
  color-scheme: dark;
}

/* Fixed colours of the logo, identical in both themes: the navy text on the
   sun yellow and coral pills stays navy in dark mode (contrast ≥ 7:1). */
:root {
  --navy: #1c2b4a;
  --font-display: "Caprasimo", Georgia, serif;
  --font-sans: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow-retro: 4px 4px 0 var(--line);
  --radius: 1rem;
  --radius-pill: 999px;
  --stroke: 2px;
}

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

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[data-theme] {
  /* A themed panel repaints its own background and text. A custom property
     whose value uses var() is resolved where it is declared: redeclared here,
     it follows the panel's theme instead of the page's (tokens_test.go). */
  --shadow-retro: 4px 4px 0 var(--line);
  background-color: var(--paper);
  color: var(--ink);
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure {
  margin: 0;
}

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.1;
}

h1 { font-size: 2.6rem; line-height: 1.05; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.25rem; }

@media (min-width: 640px) {
  h1 { font-size: 3.25rem; }
}

ul[role="list"], ol[role="list"] {
  list-style: none;
  padding: 0;
}

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

a {
  color: var(--link);
  text-decoration-thickness: 2px;
  text-decoration-color: var(--accent);
  text-underline-offset: 4px;
}

a:hover {
  color: var(--ink);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .9em;
}

time {
  font-variant-numeric: tabular-nums;
}

/* Visible focus on every interactive element (WCAG 2.4.7). */
:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
  border-radius: 4px;
}

[x-cloak] {
  display: none !important;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 50;
  padding: .5rem 1rem;
  border-radius: .5rem;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.muted { color: var(--muted); }
.block { display: block; }
.small { font-size: .875rem; }
.xsmall { font-size: .75rem; }
.strong { font-weight: 800; }
.lead { font-size: 1.125rem; line-height: 1.65; color: var(--muted); max-width: 42rem; }
.stack { display: grid; gap: 1rem; }
.stack-lg { display: grid; gap: 1.5rem; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }

/* --------------------------------------------------------------- Header --- */

.site-header {
  background: var(--surface);
  border-bottom: var(--stroke) solid var(--line);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap; /* the narrowest screens put the actions under the logo */
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: .75rem;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
}

.logo-link {
  display: inline-block;
  border-radius: .5rem;
}

.logo {
  height: 2.25rem;
  width: auto;
}

@media (min-width: 640px) {
  .logo { height: 3rem; }
}

/* The header shows the colour lockup on light, the negative one on dark. */
.logo--dark { display: none; }

[data-theme="dark"] .logo--light { display: none; }
[data-theme="dark"] .logo--dark { display: block; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo--light { display: none; }
  :root:not([data-theme="light"]) .logo--dark { display: block; }
}

/* The three bands of the sunset, under the header. */
.sunset-bands {
  display: grid;
}

.sunset-bands span {
  height: .375rem;
}

.sunset-bands span:nth-child(1) { background: var(--accent); }
.sunset-bands span:nth-child(2) { background: var(--sun); }
.sunset-bands span:nth-child(3) { background: var(--sea); }

.theme-toggle {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.theme-toggle:hover {
  background: var(--sky);
}

.theme-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* The moon offers dark mode, the sun offers light mode. */
.theme-toggle .icon-sun { display: none; }

[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
}

/* ----------------------------------------------------------------- Main --- */

.site-main {
  flex: 1;
  padding-block: 2.5rem 4rem;
}

/* The skip link focuses <main> (tabindex="-1"): no ring around the page. */
.site-main:focus {
  outline: none;
}

/* htmx request indicator (htmx-config includeIndicatorStyles is off: no
   injected <style>). */
.htmx-indicator { opacity: 0; transition: opacity .2s ease-in; }
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator { opacity: 1; }

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

.site-footer {
  background: var(--surface);
  border-top: var(--stroke) solid var(--line);
  color: var(--muted);
  font-size: .875rem;
}

.site-footer__inner {
  display: grid;
  gap: 1rem;
  padding-block: 2rem;
}

.site-footer a {
  color: var(--muted);
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
}

.site-footer a:hover {
  color: var(--ink);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ----------------------------------------------------------- Components --- */

/* Card: the postcard frame — navy 2 px stroke, offset shadow. */
.card {
  background: var(--surface);
  border: var(--stroke) solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-retro);
}

/* Pill: a small label on sun yellow ("Nouvelle offre"). */
.pill {
  display: inline-block;
  border-radius: var(--radius-pill);
  background: var(--sun);
  color: var(--navy);
  padding: .125rem .75rem;
  font-size: .875rem;
  font-weight: 800;
}

/* Offer card. */
.offer-card__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  font-size: .875rem;
}

.offer-card__title {
  margin-top: 1rem;
}

.offer-card__place {
  color: var(--muted);
  font-size: .875rem;
}

.facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .375rem 1rem;
  margin-top: 1rem;
  padding-block: .75rem;
  border-block: var(--stroke) dashed var(--soft);
  font-size: .9375rem;
}

.facts dt {
  color: var(--muted);
}

.facts dd {
  text-align: right;
  font-weight: 800;
}

.offer-card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-top: 1rem;
}

.offer-card__note {
  margin-top: .75rem;
  color: var(--muted);
  font-size: .75rem;
}

/* Price: amount in the display face, currency symbol of the catalogue. */
.price {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.1;
  white-space: nowrap;
}

.price-was {
  margin-left: .375rem;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 400;
}

.verify-link {
  font-weight: 800;
}

/* Places proposed under « Destination non reconnue »: a row of links that
   wraps, without bullets. */
.place-list {
  list-style: none;
  padding: 0;
  gap: .5rem 1rem;
}

/* Stamp: the age of a reading, as a dashed rubber stamp. Colour AND words
   carry the state (WCAG 1.4.1): "relevé il y a 3 h", "… · à revérifier". */
.stamp {
  display: inline-flex;
  align-items: center;
  border: var(--stroke) dashed currentColor;
  border-radius: var(--radius-pill);
  padding: .125rem .75rem;
  font-size: .875rem;
  font-weight: 800;
  letter-spacing: .025em;
  text-transform: uppercase;
  white-space: nowrap;
}

.stamp--fresh { color: var(--fresh); transform: rotate(-2deg); }
.stamp--aging { color: var(--aging); transform: rotate(1deg); }
.stamp--stale { color: var(--muted); border-style: dotted; transform: rotate(-1deg); }

@media (prefers-reduced-motion: reduce) {
  .btn--primary { transition: none; }
}

/* Buttons. A link styled as a button uses the same classes. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: var(--stroke) solid var(--line);
  border-radius: var(--radius-pill);
  padding: .5rem 1.25rem;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  line-height: 1.5;
  text-decoration: none;
  cursor: pointer;
}

.btn:focus-visible {
  outline-offset: 4px;
}

.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-retro);
  transition: transform .1s, box-shadow .1s;
}

.btn--primary:hover {
  color: var(--on-accent);
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--line);
}

.btn--secondary:hover {
  background: var(--sky);
}

.btn--danger {
  border-color: var(--danger);
  background: transparent;
  color: var(--danger);
}

.btn--danger:focus-visible,
.btn--danger-confirmed:focus-visible {
  outline-color: var(--danger);
}

/* Runs the destruction, after the box is ticked (charter, « Danger
   confirmé »). */
.btn--danger-confirmed {
  border-color: var(--danger);
  background: var(--danger);
  color: var(--paper);
}

/* ------------------------------------------------------------ Account --- */

/* A group of settings (charter, « Encadré ciel »). */
.settings-box {
  border: var(--stroke) solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  background: var(--sky);
}

/* Last on the page: the deletion (charter, « Zone de suppression »). */
.danger-zone {
  border: var(--stroke) solid var(--danger);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}

.danger-zone > h1,
.danger-zone > h2 {
  color: var(--danger);
}

/* A box with its label on the right; the danger colour for the deletion. */
.choice {
  display: flex;
  align-items: center;
  gap: .625rem;
  font-weight: 700;
  cursor: pointer;
}

.choice input {
  width: 1.375rem;
  height: 1.375rem;
  accent-color: var(--danger);
}

/* The theme checkboxes of the search forms (spec 018). */
.themes {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.themes__list {
  gap: .5rem 1.25rem;
}

.choice--theme {
  font-weight: 400;
}

.choice--theme input {
  accent-color: var(--accent);
}

.themes[aria-invalid="true"] .themes__list {
  outline: var(--stroke) solid var(--danger);
  outline-offset: .375rem;
  border-radius: var(--radius);
}

/* What the account holds: a term, then its value. */
.data-list {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  gap: .375rem 1rem;
  overflow-wrap: anywhere;
}

.data-list dt {
  color: var(--muted);
}

.data-list dd {
  font-weight: 700;
}

/* A small button, for the header. On a phone its label may take two lines,
   so that the logo and the button share one row from 360px up. */
.btn--sm {
  max-width: 8rem;
  padding: .25rem .875rem;
  font-size: .875rem;
  line-height: 1.2;
  text-align: center;
}

@media (min-width: 640px) {
  .btn--sm { max-width: none; padding: .375rem 1rem; font-size: 1rem; line-height: 1.5; }
}

.btn--link {
  border-color: transparent;
  background: transparent;
  padding-inline: .25rem;
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: .4;
  cursor: not-allowed;
  transform: none;
}

/* Field: label, input, help and error. */
.field {
  display: grid;
  gap: .25rem;
}

/* The pill « compris » of a criterion the free-text search filled (spec
   019): as wide as its word, under the label, not stretched by the grid of
   the field nor by the column of the form. */
.field > .pill,
form.stack > .pill {
  justify-self: start;
  align-self: flex-start;
}

.field__label {
  font-weight: 700;
}

.field__input {
  width: 100%;
  border: var(--stroke) solid var(--line);
  border-radius: var(--radius-pill);
  padding: .625rem 1.25rem;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.field__input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.field__input:focus-visible {
  outline-offset: 2px;
}

.field__help {
  color: var(--muted);
  font-size: .875rem;
}

.field__error {
  color: var(--danger);
  font-size: .875rem;
  font-weight: 700;
}

.field__input[aria-invalid="true"] {
  border-color: var(--danger);
}

.field__input[aria-invalid="true"]:focus-visible {
  outline-color: var(--danger);
}

/* Alerts: a framed message inside the page. */
.alert {
  border: var(--stroke) solid var(--line);
  border-radius: var(--radius);
  padding: .75rem 1rem;
  background: var(--surface);
  font-size: .875rem;
}

.alert__title {
  font-weight: 800;
}

.alert--info { background: var(--sky); }
.alert--success { border-color: var(--fresh); }
.alert--warning { border-color: var(--aging); }
.alert--error { border-color: var(--danger); }

/* Banner: a full-width strip above or under the header. */
.banner {
  padding: .375rem 1rem;
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  font-size: .875rem;
}

.banner--info {
  background: var(--sky);
  color: var(--ink);
  border-bottom: var(--stroke) solid var(--line);
}

.banner--warning {
  background: var(--surface);
  color: var(--ink);
  border-bottom: var(--stroke) solid var(--aging);
}

/* Empty state. */
.empty-state {
  border: var(--stroke) dashed var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.25rem;
  background: var(--surface);
  text-align: center;
}

.empty-state__title {
  font-size: 1.25rem;
}

.empty-state__body {
  margin-top: .25rem;
  color: var(--muted);
  font-size: .875rem;
}

.empty-state__action {
  margin-top: 1rem;
}

/* Error and 404 pages. */
.error-page {
  display: grid;
  gap: 1rem;
  justify-items: start;
  max-width: 40rem;
}

.error-page__code {
  font-family: var(--font-display);
  font-size: 4rem;
  line-height: 1;
  /* --hot, not --accent: the logo coral reads 2.7:1 on cream, under the 3:1
     of large text; --hot is the coral made for text (5.4:1 light). */
  color: var(--hot);
}

/* ---------------------------------------------------------- Style board --- */
/* The /style page: tokens, typography and every component, in both themes. */

.board {
  display: grid;
  gap: 3.5rem;
}

.board__section {
  display: grid;
  gap: 1.25rem;
}

.board__grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .board__grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board__grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board__grid--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .board__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .board__grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .board__panels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.board__panels {
  display: grid;
  gap: 1.5rem;
}

.theme-panel {
  display: grid;
  gap: 1.5rem;
  border: var(--stroke) solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.theme-panel__label {
  color: var(--muted);
  font-size: .875rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.logo-tile {
  display: grid;
  place-items: center;
  gap: .5rem;
  border: var(--stroke) solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  font-size: .875rem;
  font-weight: 700;
  text-align: center;
}

/* Logo tiles keep the backgrounds the logo was drawn for, in both themes. */
.logo-tile--cream { background: #fff6e8; color: var(--navy); }
.logo-tile--navy { background: var(--navy); color: #fff6e8; }
.logo-tile--white { background: #ffffff; color: var(--navy); }

.logo-tile img {
  width: 4rem;
  height: 4rem;
}

.logo-tile .logo {
  width: auto;
  height: 4rem;
}

.swatch {
  display: flex;
  align-items: center;
  gap: .75rem;
  border: var(--stroke) solid var(--line);
  border-radius: var(--radius);
  padding: .75rem;
  background: var(--surface);
  font-size: .875rem;
}

.swatch__chips {
  display: flex;
  flex-shrink: 0;
  overflow: hidden;
  border: var(--stroke) solid var(--line);
  border-radius: .75rem;
}

.swatch__chip {
  width: 2rem;
  height: 3rem;
}

/* One background class per token, for the swatches: the chip carries
   data-theme, so var() resolves in that theme. */
.bg-paper { background: var(--paper); }
.bg-surface { background: var(--surface); }
.bg-ink { background: var(--ink); }
.bg-muted { background: var(--muted); }
.bg-line { background: var(--line); }
.bg-soft { background: var(--soft); }
.bg-accent { background: var(--accent); }
.bg-on-accent { background: var(--on-accent); }
.bg-link { background: var(--link); }
.bg-hot { background: var(--hot); }
.bg-sky { background: var(--sky); }
.bg-fresh { background: var(--fresh); }
.bg-aging { background: var(--aging); }
.bg-danger { background: var(--danger); }
.bg-sea { background: var(--sea); }
.bg-sun { background: var(--sun); }

.type-sample--display {
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 1;
}

.type-sample--display-sm {
  font-family: var(--font-display);
  font-size: 1.5rem;
}

/* ------------------------------------------------------- Marketing page --- */
/* The public pages of #391: the marketing page, its invitation form and the
   legal pages (internal/views/marketing.templ, legal.templ). Mobile first;
   the document's mobile variants switch at 640px (only-wide / only-narrow). */

.only-wide { display: none; }

@media (min-width: 640px) {
  .only-wide { display: revert; }
  .only-narrow { display: none; }
}

/* A text that stays a placeholder while #335 is open. */
.pending-mark {
  display: inline-block;
  border: 1px dashed currentColor;
  border-radius: .375rem;
  padding: 0 .375rem;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .025em;
  white-space: nowrap;
}

/* Header of the public pages: the logo, then the invitation button; on a
   phone "Se connecter" moves to the footer and under the form (block 0). */
.header-signin {
  display: none;
  padding: .5rem .75rem;
  border-radius: var(--radius-pill);
}

@media (min-width: 640px) {
  .header-signin { display: inline-block; }
}


.mk {
  display: grid;
  gap: 3.5rem;
}

@media (min-width: 640px) {
  .mk { gap: 5rem; }
}

.mk-section {
  display: grid;
  gap: 1.5rem;
  scroll-margin-top: 1rem;
}

.mk-section > h2 {
  font-size: 1.875rem;
}

@media (min-width: 640px) {
  .mk-section > h2 { font-size: 2.25rem; }
}

.mk-grid {
  display: grid;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
}

@media (min-width: 768px) {
  .mk-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mk-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Block 1: hook, with the badge as the illustration (no photo, no visual of
   an offer). */
.mk-hero {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.mk-hero__text {
  display: grid;
  gap: 1.25rem;
}

.mk-hero__actions {
  gap: 1rem 1.5rem;
}

.mk-more {
  font-weight: 800;
}

.mk-hero__art {
  display: none;
}

.mk-hero__badge {
  width: 100%;
  max-width: 16rem;
  height: auto;
  transform: rotate(-6deg);
  filter: drop-shadow(6px 6px 0 var(--line));
}

@media (min-width: 900px) {
  .mk-hero { grid-template-columns: 1.6fr 1fr; }
  .mk-hero__art { display: grid; place-items: center; }
}

/* Block 2: the three findings. */
.mk-fact {
  line-height: 1.6;
}

.mk-fact strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1.2;
  margin-bottom: .375rem;
}

/* Block 3: the steps on a sky band, and the example alerts. */
.mk-band {
  border: var(--stroke) solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  background: var(--sky);
}

@media (min-width: 640px) {
  .mk-band { padding: 2.5rem 2rem; }
}

.mk-step {
  display: grid;
  gap: .75rem;
  align-content: start;
}

.mk-step p {
  color: var(--muted);
  line-height: 1.6;
}

/* Step numbers: a 48 px disc, coral, sun then sea, navy figure (charter). */
.mk-step__number {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: var(--stroke) solid var(--line);
  border-radius: 50%;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 1.5rem;
}

.mk-step__number--1 { background: var(--accent); }
.mk-step__number--2 { background: var(--sun); }
.mk-step__number--3 { background: var(--sea); }

.mk-examples {
  display: grid;
  gap: .75rem;
  margin: 0;
}

.mk-alert__title {
  margin-top: 1rem;
  font-size: 1.375rem;
  line-height: 1.15;
}

.mk-alert__price {
  margin-top: 1rem;
  padding-block: .75rem;
  border-block: var(--stroke) dashed var(--soft);
  line-height: 1.8;
}

.mk-alert__verify {
  font-weight: 800;
}

/* Block 4: what we do, what we do not. */
.mk-list {
  display: grid;
  gap: .75rem;
  align-content: start;
}

.mk-list ul {
  display: grid;
  gap: .625rem;
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.6;
}

.mk-list li::marker {
  color: var(--fresh);
  content: "✓  ";
}

.mk-list--not {
  border-style: dashed;
  box-shadow: none;
}

.mk-list--not li::marker {
  color: var(--danger);
  content: "✕  ";
}

/* Block 5: the invitation panel, always dark (data-theme="dark"), like the
   navy block of the prototype. */
.mk-invite {
  display: grid;
  gap: 1.5rem;
  border: var(--stroke) solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  background: var(--surface);
  box-shadow: 8px 8px 0 var(--accent);
}

@media (min-width: 640px) {
  .mk-invite { padding: 2.5rem; }
}

@media (min-width: 900px) {
  .mk-invite { grid-template-columns: 1fr 1fr; align-items: start; gap: 2.5rem; }
}

.mk-invite__intro p {
  line-height: 1.65;
}

.mk-form .btn {
  width: 100%;
}

@media (min-width: 640px) {
  .mk-form .btn { width: auto; justify-self: start; }
}

.mk-form__field {
  gap: .25rem;
}

/* The trap field: out of sight and out of the tab order, but not
   display:none, which some robots skip. */
.mk-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.mk-next {
  display: grid;
  gap: .5rem;
  margin: 0;
  padding-left: 1.5rem;
  line-height: 1.6;
}

/* Disclosures: "Et ensuite ?" and the questions of block 6. */
.mk-details {
  border: var(--stroke) solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.mk-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .875rem 1.25rem;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.mk-details > summary::-webkit-details-marker {
  display: none;
}

.mk-details > summary::after {
  content: "+";
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--hot);
}

.mk-details[open] > summary::after {
  content: "−";
}

.mk-details > :not(summary) {
  margin: 0 1.25rem 1rem;
  line-height: 1.65;
}

.mk-details > p + p {
  margin-top: -.25rem;
}

.mk-faq {
  display: grid;
  gap: .75rem;
  max-width: 48rem;
}

/* Legal pages. */
.mk-legal {
  max-width: 44rem;
}

.mk-legal h2 {
  font-size: 1.375rem;
}

.mk-legal p {
  line-height: 1.7;
}

.contact-address {
  font-weight: 800;
  user-select: all;
  -webkit-user-select: all;
  overflow-wrap: anywhere;
}

/* ------------------------------------------------------------- Sign-in --- */
/* The sign-in pages: one card, centred, the width of a form. */

.auth {
  max-width: 32rem;
  margin-inline: auto;
}

/* A form that holds one button, inline in a header or a row of actions. */
.header-form {
  display: inline;
  margin: 0;
}

/* Search on its way (js/app.js, data-busy-label, #453): while the form is
   aria-busy, its button is disabled (aria-disabled: .btn[aria-disabled],
   40 % as the charter says) and reads « Recherche en cours… », and a still
   band in the colours of the sunset shows under it. Nothing moves (charter,
   « Mouvement »). Without JavaScript the form is never busy. */
.busy-bar {
  display: none;
  height: .375rem;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--accent) 0 33%, var(--sun) 33% 67%, var(--sea) 67% 100%);
}

form[aria-busy="true"] .busy-bar { display: block; }
form[aria-busy="true"] button[type="submit"] { cursor: progress; }
