/* Design system « Album » — tokens and component classes shared by the public
   site, the sign-in screen and the organiser dashboard.

   All three surfaces load THIS file before their own
   (web/templates/public/layout.html.tmpl, web/templates/auth/connexion.html.tmpl,
   web/templates/dash/layout.html.tmpl), and neither public.css nor dash.css
   redefines a single token: changing a colour here changes it everywhere,
   inline styles included, since those only ever handle var(--…). That is what
   made it possible to repaint the whole product without touching a template.

   It does NOT dress the guest page (web/static/guest/guest.css), which has a
   world of its own: there the palette is picked by the organiser, among the
   six in the catalogue (internal/theme/catalog.go).

   ┌─ This file changed direction on 2026-09-12 ─────────────────────────────
   │ It was a faithful copy of the Claude Design project « Modernist »
   │ (4288cbe2-07a7-4e9e-9f0e-dbe536206e5d): cold greys, vermilion, Archivo
   │ 800, sharp corners, no rounding anywhere. The language of professional
   │ software, put in front of someone throwing a party — while the guest
   │ page is warm. That is the flaw this file corrects.
   │
   │ The chosen direction is called « Album »: grainy cream paper, brown ink,
   │ tomato, mustard, frank strokes, solid shadows with no blur, and a
   │ handwriting for what gets jotted by hand. The reference mockups live in
   │ docs/pistes/ (public site and organiser space).
   └─────────────────────────────────────────────────────────────────────────

   ┌─ The fonts are SERVED BY US, never by Google ───────────────────────────
   │ The original opened with an @import to Google's font API. Keeping it
   │ would send the visitor's IP address to a third party on load of the home
   │ page and of the SIGN-IN screen — so before any consent, on a product
   │ that claims to be French.
   │
   │ NEVER PUT that @import back: TestAucunePoliceChargeeDepuisUnTiers
   │ (web/fonts_selfhosted_test.go) now reddens if it returns, here or in a
   │ template.
   │
   │ The three families live under web/static/organisateur/fonts/, ONE
   │ DIRECTORY EACH, with their OFL inside and their line in
   │ docs/legal/fonts.md. A directory per family is not tidiness:
   │ TestChaquePoliceEmbarqueeEstAccompagneeDeSaLicence checks that a
   │ directory carrying fonts ALSO carries a licence — with the three
   │ families flat, the neighbour's OFL covered the one whose licence had
   │ just vanished. Verified by removing it: the test stayed green.
   └───────────────────────────────────────────────────────────────────────── */

/* ══════════════════════════════════════════════════════════════════════════
   The fonts — self-hosted, and split by unicode-range

   Two files per family, latin and latin-ext. The browser only downloads the
   second when a character demands it: a French visitor pays for the first
   alone, and a Polish gallery title stays legible. Same mechanism as Cardo on
   the guest side.

   Bricolage Grotesque and Source Serif 4 are VARIABLE: one file carries the
   whole weight range, hence the `font-weight: 200 800` descriptor. Google
   serves two identical copies when two weights are requested; the bytes being
   the same (sha256 checked), we keep only one.
   ══════════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/static/organisateur/fonts/bricolage-grotesque/bricolage-grotesque-latin.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  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: 'Bricolage Grotesque';
  src: url('/static/organisateur/fonts/bricolage-grotesque/bricolage-grotesque-latin-ext.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  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: 'Source Serif 4';
  src: url('/static/organisateur/fonts/source-serif-4/source-serif-4-latin.woff2') format('woff2');
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
  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: 'Source Serif 4';
  src: url('/static/organisateur/fonts/source-serif-4/source-serif-4-latin-ext.woff2') format('woff2');
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
  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;
}

/* Caveat exists in a single weight here: it only serves annotations, and a
   second weight would be 50 kB for three words. */
@font-face {
  font-family: 'Caveat';
  src: url('/static/organisateur/fonts/caveat/caveat-latin.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  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: 'Caveat';
  src: url('/static/organisateur/fonts/caveat/caveat-latin-ext.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  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;
}

:root {
  --color-bg: #f7f1e4;      /* paper */
  --color-surface: #fffdf8; /* the white card laid on top of it */
  --color-text: #2b2520;    /* brown ink */
  --color-accent: #d9503c;  /* tomato */
  --color-accent-2: #2f5d7c;/* blue ink */

  /* Two strokes, and the distinction carries the whole style: --color-divider
     is the QUIET stroke separating two rows inside one block, --color-rule is
     the FRANK stroke bounding a whole block. The first is a beige, the second
     is the ink itself. Confusing them makes everything either limp or
     boxed-in. */
  --color-divider: #dccfb6;
  --color-rule: #2b2520;

  /* Tonal scales — the neutral one is warm, it belongs to the paper: a cold
     grey laid on it shows immediately. */
  --color-neutral-100: #fbf6ec;
  --color-neutral-200: #f2e9d9;
  --color-neutral-300: #e4d8c0;
  --color-neutral-400: #cdbea1;
  --color-neutral-500: #afa084;
  --color-neutral-600: #8e8069;
  --color-neutral-700: #6b6053;
  --color-neutral-800: #4a4239;
  --color-neutral-900: #2b2520;

  --color-accent-100: #fdede9;
  --color-accent-200: #f9d5cc;
  --color-accent-300: #f2b3a5;
  --color-accent-400: #e8846f;
  --color-accent-500: #d9503c;
  --color-accent-600: #c04331;
  --color-accent-700: #a93825;
  --color-accent-800: #78281d;
  --color-accent-900: #4e1b14;

  --color-accent-2-100: #eaf1f6;
  --color-accent-2-200: #ccdeea;
  --color-accent-2-300: #a5c4d9;
  --color-accent-2-400: #6d9cbc;
  --color-accent-2-500: #457e9f;
  --color-accent-2-600: #2f5d7c;
  --color-accent-2-700: #274d66;
  --color-accent-2-800: #1e3b4f;
  --color-accent-2-900: #152836;

  /* The two meaning colours, kept apart from the accent: a deadline met is
     not an action, and must not paint itself like a button. */
  --color-ok: #5f7137;
  --color-warn: #a8721b;

  --font-heading: 'Bricolage Grotesque', 'Helvetica Neue', system-ui, sans-serif;
  --font-heading-weight: 800;
  --font-body: 'Source Serif 4', 'Iowan Old Style', Georgia, serif;
  /* The handwriting. Reserved for annotations — never an action label, never
     an amount, never an error message: whatever must be read without
     hesitation is read in Source Serif. */
  --font-hand: 'Caveat', 'Snell Roundhand', cursive;

  --space-1: 4.0px;
  --space-2: 8.0px;
  --space-3: 12.0px;
  --space-4: 16.0px;
  --space-6: 24.0px;
  --space-8: 32.0px;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;

  /* The shadows are not shadows: they are solid offsets, with no blur, like
     one card laid on another. A gaussian blur would bring back the software
     interface vocabulary this direction is leaving behind. */
  --shadow-sm: 2px 2px 0 var(--color-divider);
  --shadow-md: 4px 5px 0 var(--color-divider);
  --shadow-lg: 8px 10px 0 var(--color-divider);
  /* The shadow of an element that ALREADY carries an ink stroke: it casts in
     the ink, not in the beige. */
  --shadow-ink: 3px 3px 0 var(--color-rule);
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
}
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: var(--font-heading-weight); }

.grayscale{filter:grayscale(1) contrast(1.08)}

/* ══════════════════════════════════════════════════════════════════════════
   Components — built on the tokens above. Plain CSS over plain HTML: no
   JavaScript, no build step.
   ══════════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-size: 15px; line-height: 1.6; font-weight: 400; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  line-height: 1.08; letter-spacing: -0.03em; margin: 0 0 var(--space-2);
  text-wrap: balance;
}
h1 { font-size: 42px; }
h2 { font-size: 32px; }
h3 { font-size: 25px; }
h4 { font-size: 20px; }
h5 { font-size: 16px; }
h6 { font-size: 13px; }
h6 { letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; }
p { margin: 0 0 var(--space-3); }
/* accent-700 and not accent: full tomato only reaches 3.6:1 on the paper,
   which does not pass for body text. It stays in use as a flat fill and at
   large sizes, where the threshold is the non-text one. */
a { color: var(--color-accent-700); text-underline-offset: 3px; }
img { display: block; max-width: 100%; }
figure { margin: 0; }
figcaption {
  font-size: 11px; margin-top: var(--space-1);
  color: var(--color-neutral-700);
}
.text-muted { color: var(--color-neutral-700); }
/* The handwritten annotation: a breath, never information on its own. */
.hand { font-family: var(--font-hand); font-size: 1.3em; color: var(--color-accent-2); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: var(--color-accent-200); }

/* — rules — */
.hr {
  height: 1.5px; border: 0; margin: var(--space-4) 0;
  background: var(--color-divider);
}

/* — buttons — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; text-decoration: none;
  font-family: var(--font-heading); font-weight: 600;
  font-size: 14px; line-height: 1.2; color: var(--color-text);
  background: transparent; border: 1.5px solid transparent;
  padding: var(--space-2) calc(var(--space-3) * 1.2);
  border-radius: var(--radius-md);
}
.btn svg { display: block; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

/* A button that ANNOUNCES instead of acting.
 *
 * The blanket disabled style fades the whole button to 45 %, which composites
 * BOTH the label and its fill against the page: a white label on the accent
 * fill measures 5.1:1 on its own and 2.0:1 once faded — unreadable. That is
 * the right trade-off for a button whose label the reader already knows
 * ("Enregistrer", greyed out), and the wrong one here, where the label IS the
 * information: the card says nothing else about when the option arrives.
 *
 * So this modifier drops the fade and says "inert" with colour instead —
 * neutral fill, no accent, muted ink. 7:1, and nothing that looks clickable.
 * Keep it for labels that announce; a disabled ACTION stays faded. */
.btn:disabled.btn-bientot {
  opacity: 1;
  background: var(--color-neutral-300);
  border-color: var(--color-divider);
  color: var(--color-neutral-800);
}
/* accent-600 and not accent-500: white on full tomato falls to 4.07:1, under
   the body-text threshold. At 600 it sits at 5.1:1. */
.btn-primary {
  background: var(--color-accent-600); color: #fff;
  border-color: var(--color-rule); box-shadow: var(--shadow-ink);
}
.btn-primary:hover { background: var(--color-accent-700); }
.btn-primary:active { background: var(--color-accent-800); box-shadow: 1px 1px 0 var(--color-rule); }
.btn-secondary { border-color: var(--color-rule); }
.btn-secondary:hover { background: var(--color-neutral-200); }
.btn-secondary:active { background: var(--color-neutral-300); }
.btn-ghost { color: var(--color-accent-700); padding-inline: var(--space-1); }
/* A translucent wash rather than an opaque tint: the ghost button sits both on
   the paper and on the white card, and one fixed colour cannot be right on
   both. accent-100 was a pinkish white — lighter than the paper it covered,
   and off its warm hue, so the hover read as a foreign patch. */
.btn-ghost:hover { background: color-mix(in srgb, var(--color-accent) 12%, transparent); }
.btn-ghost:active { background: color-mix(in srgb, var(--color-accent) 20%, transparent); }
.btn-icon { width: 36px; height: 36px; padding: 0; }
.btn-block { width: 100%; margin-top: var(--space-2); }

/* — forms — */
.field > label {
  display: block; font-family: var(--font-heading); font-weight: 600;
  font-size: 12.5px; margin-bottom: 5px;
  color: var(--color-text);
}
.input {
  width: 100%; min-height: 38px; padding: 8px 11px; font: inherit;
  font-size: 14px; color: var(--color-text); caret-color: var(--color-accent);
  background: var(--color-surface);
  border: 1.5px solid var(--color-rule); border-radius: var(--radius-md);
}
.input:hover { border-color: var(--color-accent-700); }
.input:focus-visible { border-color: var(--color-accent); outline-offset: 0; }
textarea.input { min-height: 90px; resize: vertical; }
.radio { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.radio input, .seg-opt input {
  position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none;
}
.radio .dot {
  width: 16px; height: 16px; flex: none; border-radius: 50%;
  border: 1.5px solid var(--color-rule);
}
.radio:hover .dot { border-color: var(--color-accent); }
.radio input:checked + .dot {
  border-color: var(--color-rule); background: var(--color-accent-600);
  box-shadow: inset 0 0 0 3px var(--color-surface);
}
.radio input:focus-visible + .dot { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.seg {
  display: inline-flex; overflow: hidden;
  border: 1.5px solid var(--color-rule); border-radius: var(--radius-md);
}
.seg-opt {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; font-family: var(--font-heading); font-weight: 600; font-size: 13px; cursor: pointer;
}
.seg-opt + .seg-opt { border-left: 1.5px solid var(--color-rule); }
.seg-opt:has(input:checked) { background: var(--color-accent-600); color: #fff; }
.seg-opt:not(:has(input:checked)):hover { background: var(--color-neutral-200); }
.seg-opt:has(input:focus-visible) { outline: 2px solid var(--color-accent); outline-offset: -2px; }

/* — cards — */
.card {
  display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-4); border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1.5px solid var(--color-divider);
}
/* The card carrying a screen's primary action: ink stroke and solid shadow.
   One per screen — otherwise nothing stands out any more. */
.card-forte { border-color: var(--color-rule); box-shadow: var(--shadow-md); }
.card-kicker {
  font-family: var(--font-heading); font-weight: 600;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--color-accent-700);
}
.card-title {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 17px; line-height: 1.2; letter-spacing: -0.02em;
}
.card-body { margin: 0; font-size: 14px; color: var(--color-neutral-800); flex: 1; }
.card-meta {
  display: flex; align-items: center; gap: 6px; font-size: 11px;
  color: var(--color-neutral-700);
}
.elev-sm { box-shadow: var(--shadow-sm); }
.elev-md { box-shadow: var(--shadow-md); }
.elev-lg { box-shadow: var(--shadow-lg); }

/* — tags — */
.tag {
  display: inline-flex; align-items: center;
  font-family: var(--font-heading); font-weight: 600; font-size: 11px;
  letter-spacing: 0.04em; padding: 3px 10px;
  border-radius: 999px;
}
.tag-accent { background: var(--color-accent-200); color: var(--color-accent-800); }
.tag-accent-2 { background: var(--color-accent-2-200); color: var(--color-accent-2-800); }
.tag-neutral { background: var(--color-neutral-200); color: var(--color-neutral-800); }
.tag-outline { border: 1.5px solid var(--color-accent-700); color: var(--color-accent-700); }

/* — navigation — */
.nav {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1.5px solid var(--color-rule);
}
.nav-brand {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 18px; letter-spacing: -0.04em; margin-right: auto;
}
.nav a { color: inherit; text-decoration: none; font-family: var(--font-heading); font-weight: 600; font-size: 14px; }
.nav a:hover, .nav a[aria-current='page'] { color: var(--color-accent-700); }

/* — tables — */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 12px; letter-spacing: 0.02em;
  color: var(--color-text); background: var(--color-neutral-200);
  padding: var(--space-2); border-bottom: 1.5px solid var(--color-rule);
}
.table td {
  padding: var(--space-2);
  border-bottom: 1.5px solid var(--color-divider);
}
.table tbody tr:hover { background: var(--color-neutral-100); }

/* — dialog — */
.dialog-backdrop {
  position: fixed; inset: 0; display: grid; place-items: center;
  padding: var(--space-4);
  background: color-mix(in srgb, var(--color-neutral-900) 55%, transparent);
}
.dialog {
  width: min(440px, 100%); display: flex; flex-direction: column; gap: var(--space-3);
  padding: var(--space-4); border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1.5px solid var(--color-rule); box-shadow: var(--shadow-lg);
}
.dialog-title {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 20px; letter-spacing: -0.02em;
}
.dialog-body { font-size: 14px; color: var(--color-neutral-800); }
.dialog-actions { display: flex; justify-content: flex-end; gap: var(--space-2); margin-top: var(--space-2); }

/* — stepper —

   The step trail of the creation wizard (E1). The rule joining the discs IS
   the progress bar: the stretch already walked turns tomato, the rest keeps
   the divider stroke. No extra bar underneath the discs — two objects saying
   the same thing end up contradicting each other.

   State never rests on colour alone. Each step carries its mention spelled
   out (.stepper-etat), out of sight but inside the accessibility tree, and
   the current step keeps its aria-current="step". */
.stepper { display: flex; list-style: none; margin: 0; padding: 0; }
.stepper-etape {
  position: relative; flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-align: center;
}
/* The rule runs from the previous disc's centre to its own. It passes BEHIND
   the discs, which are opaque and raised one stacking level. */
.stepper-etape + .stepper-etape::before {
  content: ""; position: absolute;
  top: 13px; left: -50%; right: 50%; height: 1.5px;
  background: var(--color-divider);
}
.stepper-etape.est-fait::before,
.stepper-etape[aria-current="step"]::before { background: var(--color-accent-600); }
.stepper-puce {
  position: relative; z-index: 1;
  width: 28px; height: 28px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; line-height: 1;
  background: var(--color-bg); border: 1.5px solid var(--color-divider);
  font-family: var(--font-heading); font-weight: 800; font-size: 13px;
  color: var(--color-neutral-500);
}
.stepper-puce svg { display: block; }
.est-fait .stepper-puce {
  background: var(--color-accent-600); border-color: var(--color-rule); color: #fff;
}
/* The house's solid shadow, but at 2px: --shadow-ink carries 3, which on a
   28px disc overruns the stroke and reads as a moon, not a shadow. */
[aria-current="step"] .stepper-puce {
  background: var(--color-surface); border-color: var(--color-rule);
  color: var(--color-text); box-shadow: 2px 2px 0 var(--color-rule);
}
.stepper-nom {
  font-family: var(--font-heading); font-weight: 600;
  font-size: 12px; line-height: 1.2; color: var(--color-neutral-600);
}
.est-fait .stepper-nom { color: var(--color-neutral-700); }
[aria-current="step"] .stepper-nom { font-weight: 800; color: var(--color-text); }
.stepper-etat {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
@media (max-width: 420px) {
  .stepper-nom { font-size: 11px; }
}
