/* QaRd.ch brand base: tokens, fonts and shared rules. Loaded first on every page.
   Tokens follow brand/qard/brandbook/web/design-tokens.css (brand book v2). Light theme only. */

@font-face {
  font-family: "DM Serif Display";
  src: url("fonts/dm-serif-display-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("fonts/manrope-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("fonts/manrope-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("fonts/manrope-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --qard-royal: #5B0D9B;
  --qard-ink: #171426;
  --qard-paper: #F7F5F1;
  --qard-lavender: #EDE5F7;
  --qard-muted: #655F70;
  --qard-border: #D8D1DE;
  --qard-white: #FFFFFF;
  --qard-font-editorial: "DM Serif Display", Georgia, serif;
  --qard-font-ui: "Manrope", Arial, sans-serif;
  --qard-radius-control: 8px;
  --qard-radius-card: 12px;
  --qard-space-unit: 4px;
  /* Additions to the brand tokens: violet hover, and the one colour outside the palette (errors, destructive actions). */
  --qard-royal-hover: #4A0A80;
  --qard-danger: #B3261E;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--qard-paper);
  color: var(--qard-ink);
  font-family: var(--qard-font-ui);
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  font-kerning: normal;
}
img, svg { max-width: 100%; }
a { color: var(--qard-royal); text-underline-offset: 3px; }
a:hover { color: var(--qard-royal-hover); }
:focus-visible { outline: 2px solid var(--qard-ink); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* Buttons (links styled as buttons on the public pages). */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 20px;
  border: 1px solid var(--qard-border); border-radius: var(--qard-radius-control);
  background: var(--qard-white); color: var(--qard-ink);
  font: 600 14px/20px var(--qard-font-ui); text-decoration: none; text-align: center;
  cursor: pointer;
}
.btn:hover { color: var(--qard-ink); border-color: var(--qard-ink); }
.btn-primary { background: var(--qard-royal); border-color: var(--qard-royal); color: var(--qard-white); }
.btn-primary:hover { background: var(--qard-royal-hover); border-color: var(--qard-royal-hover); color: var(--qard-white); }

/* Chip: a short status on lavender. */
.chip {
  display: inline-block; padding: 4px 10px;
  border-radius: var(--qard-radius-control);
  background: var(--qard-lavender); color: var(--qard-royal);
  font: 600 12px/18px var(--qard-font-ui); letter-spacing: .06em; text-transform: uppercase;
}

/* Eyebrow: the small label above a title. */
.eyebrow {
  margin: 0 0 12px;
  color: var(--qard-royal);
  font: 600 12px/18px var(--qard-font-ui); letter-spacing: .08em; text-transform: uppercase;
}

/* Motif: small spaced square modules, the last one violet (passing from one destination to another).
   Decorative only; keep it well away from any real QR code. */
.squares { display: inline-flex; gap: 6px; vertical-align: middle; }
.squares i { display: block; width: 8px; height: 8px; background: var(--qard-border); }
.squares i:last-child { background: var(--qard-royal); }

/* Language switch "FR · EN": discreet, Manrope in the muted colour, the current language in violet. */
.lang-switch { display: inline-flex; align-items: center; font: 600 13px/18px var(--qard-font-ui); letter-spacing: .04em; }
.lang-switch a {
  display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 44px; padding: 0 4px;
  color: var(--qard-muted); text-decoration: none;
}
.lang-switch a:hover { color: var(--qard-ink); text-decoration: underline; }
.lang-switch a[aria-current] { color: var(--qard-royal); }
.lang-switch span { color: var(--qard-border); }

/* Required fields: a violet asterisk after the label text (aria-hidden: the field's `required` is what
   screen readers announce), and one line above the form's button saying what it means. */
.req { margin-left: 2px; color: var(--qard-royal); font-weight: 700; }
.req-note { margin: 0; color: var(--qard-muted); font-size: 14px; line-height: 20px; }
