/**
 * Tokens Missiforge — seule source des couleurs, polices et espacements.
 * Ne pas redéclarer ces variables ailleurs.
 *
 * Direction « chaleureux étudiant » (refonte du 01/10/2026, alignée sur la
 * nouvelle interface React — frontend/src/index.css) : papier crème, encre
 * brun chaud, un corail pour l'action, et trois couleurs d'état réservées à
 * ce qu'elles signalent : ok (sauge), attention (soleil), erreur.
 */

@font-face {
  font-family: "DM Sans";
  src: url("/static/fonts/dm-sans-latin-wght.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/static/fonts/bricolage-latin-wght.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/static/fonts/plex-mono-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/static/fonts/plex-mono-latin-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #fbf6ee;
  --bg-sunken: #f4ebdd;
  --surface: #ffffff;
  --card: #ffffff;
  --card-hover: #fdf9f3;
  --line: #eadfcf;
  --line-soft: #f1e8db;
  --line-strong: #d6c6af;

  --ink: #2a211c;
  --ink-soft: #54473d;
  --ink-mute: #76675a;
  --ink-dim: #76675a;

  /* Corail : actions, liens, sélection. Rien d'autre. */
  --accent: #c34a22;
  --accent-strong: #a23c1b;
  --accent-soft: #fdf0ea;

  --ok: #2f7a57;
  --ok-soft: #ecf6f0;
  --warn: #8a5a00;
  --warn-strong: #6e4800;
  --warn-soft: #fff8e6;
  --danger: #c2362b;
  --danger-strong: #9c2a21;
  --danger-soft: #fdecea;

  --shadow-soft: 0 1px 2px rgb(74 46 22 / 0.05), 0 8px 24px -14px rgb(74 46 22 / 0.22);
  --shadow-raised: 0 2px 4px rgb(74 46 22 / 0.06), 0 18px 40px -18px rgb(74 46 22 / 0.32);

  --tier-s: var(--accent);
  --tier-s-soft: var(--accent-soft);
  --tier-a: var(--warn);
  --tier-a-soft: var(--warn-soft);
  --tier-b: var(--ok);
  --tier-b-soft: var(--ok-soft);

  --font-heading: "Bricolage Grotesque", "DM Sans", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 0.95rem;
  --text-lg: 1.1rem;
  --text-xl: 1.3rem;
  --text-2xl: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  --text-3xl: clamp(1.9rem, 1.5rem + 1.6vw, 2.6rem);
  --text-hero: clamp(2.2rem, 1.6rem + 2.6vw, 3.4rem);

  --sp-xs: 0.4rem;
  --sp-sm: 0.8rem;
  --sp-md: 1.4rem;
  --sp-lg: 2.4rem;
  --sp-xl: 4rem;
  --sp-2xl: clamp(3.5rem, 3rem + 3vw, 6rem);

  --radius: 12px;
  --radius-lg: 18px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 150ms;
  --dur: 280ms;
  --dur-slow: 560ms;
}

.prestige-base {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/**
 * Lien retour injecté par JS quand une page est montée sous le shell.
 */
.shell-back-link {
  position: fixed;
  top: 0.6rem;
  left: 0.9rem;
  z-index: 200;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--ink-mute);
  text-decoration: none;
  padding: 0.25rem 0.55rem;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}
.shell-back-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}
