/* ==========================================================================
   Vies : feuille de styles de production
   Parti pris : « carnet de vie ». Papier chaud, encre profonde, vermillon
   d'imprimerie. Le récit est en serif, l'interface en sans-serif système.
   Convention : préfixe v- + BEM (v-bloc__element--modificateur), utilitaires u-.
   Aucune ressource distante. Voir docs/DESIGN.md.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  color-scheme: light;

  /* Papier et encre */
  --paper: #f5efe3;          /* fond de page */
  --paper-raised: #fffcf6;   /* cartes, champs */
  --paper-sunken: #ece4d4;   /* zones en creux, pistes de barres */
  --ink: #1e1914;            /* texte principal (15.2:1 sur --paper) */
  --ink-soft: #574c40;       /* texte secondaire (7.3:1) */
  --ink-faint: #6f6355;      /* métadonnées (5.1:1, 4.6:1 sur --paper-sunken) */
  --line: #d8ccb8;           /* filets */
  --line-strong: #8f8270;    /* bordures de champs (3.7:1, non textuel) */

  /* Accent d'imprimerie */
  --accent: #b5361b;         /* vermillon (5.2:1 sur --paper) */
  --accent-strong: #8e2a14;
  --accent-wash: #f6dfd3;
  --on-accent: #fffaf3;

  /* Action principale : l'encre */
  --primary: #1e1914;
  --primary-hover: #3a3129;
  --on-primary: #fffaf3;

  /* Sémantique */
  --success: #2c6e45;  --success-wash: #dcebdc;
  --warning: #8a5a00;  --warning-wash: #f5e6c4;
  --danger:  #a11d2b;  --danger-wash:  #f6d9d9;
  --info:    #2a5592;  --info-wash:    #dbe5f2;
  --focus: #2350b5;

  /* Couleurs des stats (pleines : barres et icônes ; texte en --ink) */
  --c-sante: #2f7d4f;
  --c-bonheur: #a8730a;
  --c-intelligence: #2f5fa0;
  --c-apparence: #b8466f;
  --c-forme: #cf6026;
  --c-karma: #2a8582;
  --c-notoriete: #7a4fa0;
  --c-reputation: #7d5b3b;

  /* Typographie : polices système de qualité, aucune police distante */
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
    Charter, "Bitstream Charter", "Sitka Text", Cambria, "Noto Serif", "DejaVu Serif", Georgia, serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    "Noto Sans", "Liberation Sans", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;

  --fs-2xs: 0.75rem;    /* 12 */
  --fs-xs: 0.8125rem;   /* 13 */
  --fs-sm: 0.875rem;    /* 14 */
  --fs-base: 1rem;      /* 16 */
  --fs-read: 1.125rem;  /* 18 : texte narratif */
  --fs-lg: 1.375rem;    /* 22 */
  --fs-xl: 1.75rem;     /* 28 */
  --fs-2xl: 2.25rem;    /* 36 */
  --fs-3xl: clamp(2.5rem, 7vw, 3.75rem);

  --lh-tight: 1.15;
  --lh-snug: 1.35;
  --lh-ui: 1.45;
  --lh-read: 1.62;

  --measure: 64ch;

  /* Espacements (base 4 px) */
  --sp-1: 0.25rem;  --sp-2: 0.5rem;   --sp-3: 0.75rem;  --sp-4: 1rem;
  --sp-5: 1.5rem;   --sp-6: 2rem;     --sp-7: 3rem;     --sp-8: 4rem;
  --gutter: 1rem;

  /* Rayons : sobres, le papier ne s'arrondit pas beaucoup */
  --r-1: 4px;  --r-2: 8px;  --r-3: 12px;  --r-pill: 999px;

  /* Ombres chaudes, très légères */
  --shadow-1: 0 1px 0 rgb(60 40 20 / 0.06), 0 1px 3px rgb(60 40 20 / 0.06);
  --shadow-2: 0 1px 0 rgb(60 40 20 / 0.05), 0 6px 18px -6px rgb(60 40 20 / 0.18);
  --shadow-3: 0 2px 0 rgb(60 40 20 / 0.04), 0 24px 48px -16px rgb(40 25 10 / 0.35);

  /* Mouvement */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t-fast: 120ms;
  --t-med: 220ms;
  --t-slow: 360ms;

  /* Mise en page */
  --tap: 44px;
  --topbar-h: 64px;
  --actionbar-h: 76px;
  --overlay: rgb(30 25 20 / 0.5);

  --grain-opacity: 0.5;
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23574c40' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9.5l6 6 6-6'/%3E%3C/svg%3E");
}

/* Thème sombre : « encre de nuit ». Appliqué si le système le demande
   (sauf data-theme="light"), ou si data-theme="dark" est forcé. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #16120e;
    --paper-raised: #211b15;
    --paper-sunken: #0f0c09;
    --ink: #f1e8d8;
    --ink-soft: #c4b6a1;
    --ink-faint: #a69883;
    --line: #3a3128;
    --line-strong: #7a6d5c;
    --accent: #ef7650;
    --accent-strong: #ff9670;
    --accent-wash: #3a2017;
    --on-accent: #16120e;
    --primary: #f1e8d8;
    --primary-hover: #ffffff;
    --on-primary: #16120e;
    --success: #6cc38c;  --success-wash: #17301f;
    --warning: #e2b04a;  --warning-wash: #33270f;
    --danger:  #f07a80;  --danger-wash:  #3a1719;
    --info:    #86aee8;  --info-wash:    #172438;
    --focus: #8fb0ff;
    --c-sante: #5dbb84;
    --c-bonheur: #e6b33c;
    --c-intelligence: #6f9ee0;
    --c-apparence: #e57fa5;
    --c-forme: #f08b55;
    --c-karma: #4fbdb8;
    --c-notoriete: #b38ae0;
    --c-reputation: #c49a6f;
    --shadow-1: 0 1px 0 rgb(0 0 0 / 0.3);
    --shadow-2: 0 8px 24px -8px rgb(0 0 0 / 0.6);
    --shadow-3: 0 24px 60px -12px rgb(0 0 0 / 0.75);
    --overlay: rgb(5 4 3 / 0.66);
    --grain-opacity: 0.25;
    --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c4b6a1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9.5l6 6 6-6'/%3E%3C/svg%3E");
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #16120e;
  --paper-raised: #211b15;
  --paper-sunken: #0f0c09;
  --ink: #f1e8d8;
  --ink-soft: #c4b6a1;
  --ink-faint: #a69883;
  --line: #3a3128;
  --line-strong: #7a6d5c;
  --accent: #ef7650;
  --accent-strong: #ff9670;
  --accent-wash: #3a2017;
  --on-accent: #16120e;
  --primary: #f1e8d8;
  --primary-hover: #ffffff;
  --on-primary: #16120e;
  --success: #6cc38c;  --success-wash: #17301f;
  --warning: #e2b04a;  --warning-wash: #33270f;
  --danger:  #f07a80;  --danger-wash:  #3a1719;
  --info:    #86aee8;  --info-wash:    #172438;
  --focus: #8fb0ff;
  --c-sante: #5dbb84;
  --c-bonheur: #e6b33c;
  --c-intelligence: #6f9ee0;
  --c-apparence: #e57fa5;
  --c-forme: #f08b55;
  --c-karma: #4fbdb8;
  --c-notoriete: #b38ae0;
  --c-reputation: #c49a6f;
  --shadow-1: 0 1px 0 rgb(0 0 0 / 0.3);
  --shadow-2: 0 8px 24px -8px rgb(0 0 0 / 0.6);
  --shadow-3: 0 24px 60px -12px rgb(0 0 0 / 0.75);
  --overlay: rgb(5 4 3 / 0.66);
  --grain-opacity: 0.25;
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c4b6a1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9.5l6 6 6-6'/%3E%3C/svg%3E");
}

@media (min-width: 768px) {
  :root { --gutter: 1.5rem; }
}
@media (min-width: 1200px) {
  :root { --gutter: 2rem; }
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--paper);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-ui);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
  position: relative;
}

/* Grain de papier (SVG inline, aucune requête) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .32 0 0 0 0 .18 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 1; }

img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-strong); text-decoration-thickness: 2px; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-serif); font-weight: 600; line-height: var(--lh-tight); letter-spacing: -0.01em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--sp-5) 0; }
::selection { background: var(--accent-wash); color: var(--ink); }

:focus { outline: none; }
:focus-visible {
  outline: 2.5px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--r-1);
}

[hidden] { display: none !important; }

/* --------------------------------------------------------------------------
   3. Typographie
   -------------------------------------------------------------------------- */
.v-h1 { font-size: var(--fs-2xl); }
.v-h2 { font-size: var(--fs-xl); }
.v-h3 { font-size: var(--fs-lg); }
.v-h4 { font-family: var(--font-sans); font-size: var(--fs-base); font-weight: 650; letter-spacing: 0; }

.v-prose {
  font-family: var(--font-serif);
  font-size: var(--fs-read);
  line-height: var(--lh-read);
  max-width: var(--measure);
  font-variant-numeric: oldstyle-nums proportional-nums;
}
.v-prose > * + * { margin-top: 0.85em; }
.v-prose em { font-style: italic; }

/* Petit intitulé en capitales espacées */
.v-kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-sans);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.v-kicker .v-icon { width: 1rem; height: 1rem; }

.v-muted { color: var(--ink-soft); }
.v-meta { font-size: var(--fs-xs); color: var(--ink-faint); }
.v-num { font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }

/* Logotype */
.v-wordmark {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  font-size: var(--fs-xl);
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  line-height: 1;
}
.v-wordmark::after { content: "."; color: var(--accent); font-style: normal; }
.v-wordmark--lg { font-size: clamp(3rem, 10vw, 5rem); }

@media (max-width: 479px) {
  .v-prose, .v-journal__entry, .v-event__text { hyphens: auto; }
}

/* --------------------------------------------------------------------------
   4. Icônes
   -------------------------------------------------------------------------- */
.v-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  vertical-align: middle;
}
.v-icon--sm { width: 1rem; height: 1rem; }
.v-icon--lg { width: 1.5rem; height: 1.5rem; }
.v-icon--xl { width: 2rem; height: 2rem; }
.v-icon--flip { transform: scaleX(-1); }

/* --------------------------------------------------------------------------
   5. Mise en page générique
   -------------------------------------------------------------------------- */
.v-container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.v-container--narrow { max-width: 720px; }
.v-container--read { max-width: 680px; }

.v-stack { display: flex; flex-direction: column; gap: var(--stack-gap, var(--sp-4)); }
.v-stack--sm { --stack-gap: var(--sp-2); }
.v-stack--lg { --stack-gap: var(--sp-6); }
.v-cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--cluster-gap, var(--sp-3)); }
.v-split { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; }

.v-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--sp-4);
}
.v-section-title h2, .v-section-title h3 { font-size: var(--fs-lg); }

/* En-tête d'application (hors partie) */
.v-appbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(6px);
  -webkit-backdrop-filter: saturate(1.2) blur(6px);
  border-bottom: 1px solid var(--line);
}
.v-appbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  min-height: var(--topbar-h);
}

/* --------------------------------------------------------------------------
   6. Boutons
   -------------------------------------------------------------------------- */
.v-btn {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-bd: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: var(--tap);
  min-width: var(--tap);
  padding: 0.625rem 1.125rem;
  border: 1.5px solid var(--btn-bd);
  border-radius: var(--r-2);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.v-btn:hover { text-decoration: none; color: var(--btn-fg); }
.v-btn:active { transform: translateY(1px); }
.v-btn:focus-visible { outline-offset: 3px; border-radius: var(--r-2); }

.v-btn--primary { --btn-bg: var(--primary); --btn-fg: var(--on-primary); --btn-bd: var(--primary); box-shadow: var(--shadow-1); }
.v-btn--primary:hover { --btn-bg: var(--primary-hover); --btn-bd: var(--primary-hover); }

.v-btn--accent { --btn-bg: var(--accent); --btn-fg: var(--on-accent); --btn-bd: var(--accent); }
.v-btn--accent:hover { --btn-bg: var(--accent-strong); --btn-bd: var(--accent-strong); }

.v-btn--secondary { --btn-bg: var(--paper-raised); --btn-fg: var(--ink); --btn-bd: var(--line-strong); }
.v-btn--secondary:hover { --btn-bd: var(--ink); }

.v-btn--ghost { --btn-fg: var(--ink-soft); }
.v-btn--ghost:hover { --btn-bg: var(--paper-sunken); --btn-fg: var(--ink); }

.v-btn--danger { --btn-bg: var(--danger); --btn-fg: #fff; --btn-bd: var(--danger); }
.v-btn--danger:hover { filter: brightness(0.92); }
:root[data-theme="dark"] .v-btn--danger { --btn-fg: #16120e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .v-btn--danger { --btn-fg: #16120e; } }

.v-btn--sm { min-height: 36px; padding: 0.375rem 0.75rem; font-size: var(--fs-sm); }
.v-btn--lg { min-height: 52px; padding: 0.875rem 1.5rem; font-size: var(--fs-read); }
.v-btn--block { display: flex; width: 100%; }
.v-btn--icon { padding: 0; width: var(--tap); }
/* Les petits boutons gardent une zone tactile de 44 px */
.v-btn--sm.v-btn--icon { width: 36px; position: relative; }
.v-btn--sm::after { content: ""; position: absolute; inset: -4px; }
.v-btn--sm { position: relative; }

.v-btn[disabled], .v-btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
  box-shadow: none;
}
.v-btn[aria-busy="true"] { cursor: progress; }
.v-btn[aria-busy="true"]::before {
  content: "";
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: v-spin 700ms linear infinite;
}

/* --------------------------------------------------------------------------
   7. Formulaires
   -------------------------------------------------------------------------- */
.v-field { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.v-label { font-size: var(--fs-sm); font-weight: 650; color: var(--ink); }
.v-label__opt { font-weight: 400; color: var(--ink-faint); }
.v-hint { font-size: var(--fs-xs); color: var(--ink-faint); }

.v-input, .v-select, .v-textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.6875rem 0.875rem;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-2);
  background: var(--paper-raised);
  color: var(--ink);
  font-size: var(--fs-base); /* 16 px : pas de zoom iOS */
  line-height: 1.4;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.v-input::placeholder, .v-textarea::placeholder { color: var(--ink-faint); opacity: 1; }
.v-input:hover, .v-select:hover, .v-textarea:hover { border-color: var(--ink-soft); }
.v-input:focus-visible, .v-select:focus-visible, .v-textarea:focus-visible {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 28%, transparent);
}
.v-textarea { min-height: 120px; resize: vertical; }
.v-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.75rem;
  background-image: var(--select-chevron);
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.25rem;
}
.v-input-group { display: flex; gap: var(--sp-2); }
.v-input-group > .v-input { flex: 1; min-width: 0; }

.v-field--error .v-input, .v-field--error .v-select, .v-field--error .v-textarea { border-color: var(--danger); }
.v-field__error {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--danger);
}
.v-field__error .v-icon { width: 1rem; height: 1rem; }

/* Choix segmenté (radios) */
.v-segmented {
  display: flex;
  padding: 4px;
  gap: 4px;
  border-radius: var(--r-2);
  background: var(--paper-sunken);
  border: 1px solid var(--line);
}
.v-segmented__opt { flex: 1; position: relative; display: flex; }
.v-segmented__opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.v-segmented__opt span {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 40px;
  padding: 0 var(--sp-3);
  border-radius: 6px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink-soft);
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.v-segmented__opt input:checked + span { background: var(--paper-raised); color: var(--ink); box-shadow: var(--shadow-1); }
.v-segmented__opt input:focus-visible + span { outline: 2.5px solid var(--focus); outline-offset: 1px; }

/* Case à cocher / interrupteur simple */
.v-check { display: flex; align-items: center; gap: var(--sp-3); min-height: var(--tap); font-size: var(--fs-sm); cursor: pointer; }
.v-check input { width: 1.25rem; height: 1.25rem; accent-color: var(--primary); margin: 0; }

/* --------------------------------------------------------------------------
   8. Cartes, panneaux, listes
   -------------------------------------------------------------------------- */
.v-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--card-pad, var(--sp-5));
  box-shadow: var(--shadow-1);
}
.v-card--flat { box-shadow: none; background: transparent; }
.v-card--sunken { background: var(--paper-sunken); box-shadow: none; border-color: transparent; }
.v-card--tight { --card-pad: var(--sp-4); }
.v-card__title { font-size: var(--fs-lg); margin-bottom: var(--sp-2); }
.v-card__footer { margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid var(--line); }

/* Carte cliquable (lien ou bouton) */
.v-card--link { display: block; color: inherit; text-decoration: none; transition: border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.v-card--link:hover { color: inherit; border-color: var(--line-strong); box-shadow: var(--shadow-2); transform: translateY(-1px); }

.v-list { list-style: none; }
.v-list__item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 56px;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--line);
}
.v-list__item:last-child { border-bottom: 0; }
.v-list__body { flex: 1; min-width: 0; }
.v-list__title { font-weight: 600; }
.v-list__sub { font-size: var(--fs-sm); color: var(--ink-soft); }
.v-list__aside { text-align: right; flex: none; }
a.v-list__item, button.v-list__item {
  width: 100%;
  color: inherit;
  text-decoration: none;
  background: none;
  border-left: 0; border-right: 0; border-top: 0;
  text-align: left;
  padding-inline: var(--sp-2);
  margin-inline: calc(var(--sp-2) * -1);
  width: calc(100% + var(--sp-4));
  border-radius: var(--r-2);
}
a.v-list__item:hover, button.v-list__item:hover { background: var(--paper-sunken); }

/* Description courte clé / valeur */
.v-dl { display: grid; grid-template-columns: auto 1fr; gap: var(--sp-2) var(--sp-4); margin: 0; font-size: var(--fs-sm); }
.v-dl dt { color: var(--ink-faint); }
.v-dl dd { margin: 0; font-weight: 600; text-align: right; }

/* Tableau */
.v-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-inline: calc(var(--sp-2) * -1); padding-inline: var(--sp-2); }
.v-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.v-table caption { text-align: left; font-family: var(--font-serif); font-size: var(--fs-lg); font-weight: 600; padding-bottom: var(--sp-3); }
.v-table th, .v-table td { padding: var(--sp-3) var(--sp-3); text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.v-table th:first-child, .v-table td:first-child { padding-left: 0; }
.v-table th:last-child, .v-table td:last-child { padding-right: 0; }
.v-table thead th { font-size: var(--fs-2xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); border-bottom-color: var(--line-strong); white-space: nowrap; }
.v-table td.v-num, .v-table th.v-num { text-align: right; }
.v-table tfoot td { font-weight: 700; border-bottom: 0; border-top: 1.5px solid var(--ink); }

/* Avatar à initiales */
.v-avatar {
  --av: 44px;
  width: var(--av);
  height: var(--av);
  flex: none;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--av-bg, var(--accent-wash));
  color: var(--av-fg, var(--accent-strong));
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: calc(var(--av) * 0.4);
  letter-spacing: 0.02em;
  border: 1px solid color-mix(in srgb, var(--av-fg, var(--accent)) 25%, transparent);
}
.v-avatar--sm { --av: 36px; }
.v-avatar--lg { --av: 56px; }
.v-avatar--xl { --av: 88px; }
.v-avatar--ink { --av-bg: var(--paper-sunken); --av-fg: var(--ink-soft); }

/* --------------------------------------------------------------------------
   9. Badges et variations de stats
   -------------------------------------------------------------------------- */
.v-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  min-height: 24px;
  padding: 0.125rem 0.5rem;
  border-radius: var(--r-pill);
  background: var(--paper-sunken);
  color: var(--ink-soft);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
}
.v-badge .v-icon { width: 0.875rem; height: 0.875rem; }
.v-badge--accent { background: var(--accent-wash); color: var(--accent-strong); }
.v-badge--success { background: var(--success-wash); color: var(--success); }
.v-badge--warning { background: var(--warning-wash); color: var(--warning); }
.v-badge--danger { background: var(--danger-wash); color: var(--danger); }
.v-badge--info { background: var(--info-wash); color: var(--info); }
.v-badge--outline { background: transparent; border: 1px solid var(--line-strong); color: var(--ink-soft); }
.v-badge--live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Tampon d'imprimerie (statut fort, ex. « Terminée ») */
.v-stamp {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border: 2px solid currentColor;
  border-radius: var(--r-1);
  color: var(--accent);
  font-family: var(--font-sans);
  font-size: var(--fs-2xs);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transform: rotate(-4deg);
  opacity: 0.9;
}
.v-stamp--ink { color: var(--ink-soft); }

/* Variation : « +4 Bonheur » */
.v-delta {
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  font-size: var(--fs-xs);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
  white-space: nowrap;
}
.v-delta::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 2px;
  background: var(--stat, var(--ink-faint));
}
.v-delta:not([class*="v-stat--"])::before { display: none; }
.v-delta--up { color: var(--success); }
.v-delta--down { color: var(--danger); }

/* --------------------------------------------------------------------------
   10. Stats
   -------------------------------------------------------------------------- */
.v-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3) var(--sp-4); list-style: none; }
.v-stats--single { grid-template-columns: 1fr; gap: var(--sp-4); }

.v-stat {
  --stat: var(--ink-soft);
  --v: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "icon label value" "bar bar bar";
  align-items: center;
  column-gap: var(--sp-2);
  row-gap: 6px;
  min-width: 0;
}
.v-stat__icon { grid-area: icon; width: 1.125rem; height: 1.125rem; color: var(--stat); }
.v-stat__label { grid-area: label; font-size: var(--fs-sm); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v-stat__value { grid-area: value; font-size: var(--fs-sm); font-weight: 700; font-variant-numeric: tabular-nums; }
.v-stat__bar {
  grid-area: bar;
  display: block;
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--paper-sunken);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 6%, transparent);
}
.v-stat__fill {
  display: block;
  height: 100%;
  width: calc(var(--v) * 1%);
  border-radius: inherit;
  background: var(--stat);
  transition: width var(--t-slow) var(--ease);
}
/* Couleur par stat (après la règle de base pour la surcharger) */
.v-stat--sante        { --stat: var(--c-sante); }
.v-stat--bonheur      { --stat: var(--c-bonheur); }
.v-stat--intelligence { --stat: var(--c-intelligence); }
.v-stat--apparence    { --stat: var(--c-apparence); }
.v-stat--forme        { --stat: var(--c-forme); }
.v-stat--karma        { --stat: var(--c-karma); }
.v-stat--notoriete    { --stat: var(--c-notoriete); }
.v-stat--reputation   { --stat: var(--c-reputation); }

/* Seuil bas : la valeur passe en danger (la logique pose la classe) */
.v-stat--low .v-stat__value { color: var(--danger); }
.v-stat--low .v-stat__fill { background-image: repeating-linear-gradient(-45deg, transparent 0 4px, rgb(255 255 255 / 0.35) 4px 7px); }
/* Variante compacte (mobile, cartes de partie) */
.v-stat--compact { row-gap: 4px; }
.v-stat--compact .v-stat__bar { height: 6px; }
.v-stat--compact .v-stat__label { font-size: var(--fs-xs); }
.v-stat--compact .v-stat__value { font-size: var(--fs-xs); }

/* Jauge seule (relations, progression) */
.v-meter { display: block; height: 6px; border-radius: var(--r-pill); background: var(--paper-sunken); overflow: hidden; }
.v-meter > span { display: block; height: 100%; width: calc(var(--v, 50) * 1%); background: var(--stat, var(--ink-soft)); border-radius: inherit; }

/* --------------------------------------------------------------------------
   11. Onglets
   -------------------------------------------------------------------------- */
.v-tabs {
  display: flex;
  gap: var(--sp-1);
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line);
  -webkit-overflow-scrolling: touch;
}
.v-tabs::-webkit-scrollbar { display: none; }
.v-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: var(--tap);
  padding: 0 var(--sp-3);
  border: 0;
  background: none;
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}
.v-tab:hover { color: var(--ink); }
.v-tab .v-icon { width: 1.125rem; height: 1.125rem; }
.v-tab::after {
  content: "";
  position: absolute;
  left: var(--sp-3);
  right: var(--sp-3);
  bottom: -1px;
  height: 2.5px;
  border-radius: 2px 2px 0 0;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform var(--t-med) var(--ease);
}
.v-tab[aria-selected="true"], .v-tab[aria-current="page"] { color: var(--ink); }
.v-tab[aria-selected="true"]::after, .v-tab[aria-current="page"]::after { transform: scaleX(1); }
.v-tab__count { font-size: var(--fs-2xs); color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.v-tabpanel { padding-top: var(--sp-5); }
.v-tabpanel:focus-visible { outline-offset: 4px; }

/* --------------------------------------------------------------------------
   12. Superposition et carte d'événement
   -------------------------------------------------------------------------- */
.v-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: var(--overlay);
  animation: v-fade var(--t-med) var(--ease) both;
}
@media (min-width: 640px) {
  .v-overlay { align-items: center; padding: var(--sp-5); }
}

.v-event {
  position: relative;
  width: 100%;
  max-width: 600px;
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--paper-raised);
  border-radius: var(--r-3) var(--r-3) 0 0;
  box-shadow: var(--shadow-3);
  padding: var(--sp-5) var(--gutter) calc(var(--sp-5) + env(safe-area-inset-bottom, 0px));
  animation: v-rise var(--t-slow) var(--ease) both;
}
/* Poignée de feuille (mobile) */
.v-event::before {
  content: "";
  display: block;
  width: 40px;
  height: 4px;
  margin: -0.5rem auto var(--sp-4);
  border-radius: 2px;
  background: var(--line);
}
@media (min-width: 640px) {
  .v-event { border-radius: var(--r-3); padding: var(--sp-6) var(--sp-6) var(--sp-5); border-top: 4px solid var(--accent); }
  .v-event::before { display: none; }
}
.v-event__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.v-event__title { font-size: var(--fs-xl); margin-bottom: var(--sp-3); }
.v-event__text { font-family: var(--font-serif); font-size: var(--fs-read); line-height: var(--lh-read); color: var(--ink); }
.v-event__text + .v-event__text { margin-top: 0.75em; }
.v-event__question { margin-top: var(--sp-4); font-family: var(--font-serif); font-style: italic; font-size: var(--fs-read); color: var(--ink-soft); }
.v-event__choices { list-style: none; display: flex; flex-direction: column; gap: var(--sp-2); margin-top: var(--sp-4); }
.v-event__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-top: var(--sp-5); padding-top: var(--sp-3); border-top: 1px dashed var(--line); }

/* Choix d'événement */
.v-choice {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  min-height: 56px;
  padding: var(--sp-3) var(--sp-4) var(--sp-3) var(--sp-3);
  border: 1.5px solid var(--line);
  border-radius: var(--r-2);
  background: var(--paper);
  color: var(--ink);
  text-align: left;
  transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.v-choice:hover { border-color: var(--ink); background: var(--paper-raised); }
.v-choice:active { transform: translateY(1px); }
.v-choice:focus-visible { border-radius: var(--r-2); }
.v-choice__key {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1.5px solid var(--line-strong);
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: var(--fs-base);
  color: var(--ink-soft);
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.v-choice:hover .v-choice__key { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.v-choice__label { font-family: var(--font-serif); font-size: 1.0625rem; line-height: var(--lh-snug); }
.v-choice__hint { display: block; margin-top: 2px; font-family: var(--font-sans); font-size: var(--fs-xs); color: var(--ink-faint); }
.v-choice__arrow { width: 1.125rem; height: 1.125rem; color: var(--ink-faint); transition: transform var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.v-choice:hover .v-choice__arrow { transform: translateX(3px); color: var(--ink); }
.v-choice[aria-disabled="true"], .v-choice:disabled { opacity: 0.55; cursor: not-allowed; }
.v-choice[aria-disabled="true"]:hover, .v-choice:disabled:hover { border-color: var(--line); background: var(--paper); }

/* Modale générique (confirmation, réglages) : s'écrit class="v-event v-modal" */
.v-modal { max-width: 460px; }
@media (min-width: 640px) { .v-modal { border-top-color: var(--line-strong); } }
.v-modal__title { font-size: var(--fs-lg); margin-bottom: var(--sp-3); }
.v-modal__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--sp-2); margin-top: var(--sp-5); }
.v-modal__close { position: absolute; top: var(--sp-3); right: var(--sp-3); }

/* --------------------------------------------------------------------------
   13. Journal de vie (chronologie par âge)
   -------------------------------------------------------------------------- */
.v-journal { list-style: none; }
.v-journal__year {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  column-gap: var(--sp-4);
  padding: var(--sp-4) 0;
  border-top: 1px solid var(--line);
}
.v-journal__year:first-child { border-top: 0; padding-top: 0; }
.v-journal__age {
  align-self: start;
  position: sticky;
  top: calc(var(--topbar-h) + var(--sp-3));
  font-family: var(--font-serif);
  text-align: right;
  line-height: 1;
}
.v-journal__age b { display: block; font-size: var(--fs-xl); font-weight: 600; font-variant-numeric: lining-nums; }
.v-journal__age small { display: block; margin-top: 4px; font-family: var(--font-sans); font-size: var(--fs-2xs); color: var(--ink-faint); letter-spacing: 0.04em; }
.v-journal__entries { list-style: none; display: flex; flex-direction: column; gap: var(--sp-3); }
.v-journal__entry { font-family: var(--font-serif); font-size: var(--fs-read); line-height: var(--lh-read); max-width: var(--measure); }
.v-journal__when {
  font-family: var(--font-sans);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-right: 0.4em;
}
.v-journal__tag { font-family: var(--font-sans); font-size: var(--fs-2xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-right: 0.4em; }
.v-journal__deltas { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3); margin-top: var(--sp-1); }
/* Entrée marquante (choix d'événement, rencontre, décès d'un proche) */
.v-journal__entry--major {
  padding: var(--sp-3) var(--sp-4);
  border-left: 3px solid var(--accent);
  background: var(--paper-raised);
  border-radius: 0 var(--r-2) var(--r-2) 0;
}
.v-journal__entry--quiet { color: var(--ink-soft); font-size: var(--fs-base); }
/* Année en cours */
.v-journal__year--current .v-journal__age b { color: var(--accent); }
/* Animation d'arrivée d'une nouvelle entrée (la logique pose la classe) */
.v-journal__entry--new { animation: v-ink var(--t-slow) var(--ease) both; }

/* --------------------------------------------------------------------------
   14. Toasts
   -------------------------------------------------------------------------- */
.v-toasts {
  position: fixed;
  z-index: 80;
  top: calc(var(--sp-3) + env(safe-area-inset-top, 0px));
  left: var(--gutter);
  right: var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  pointer-events: none;
}
@media (min-width: 768px) {
  .v-toasts { left: auto; right: var(--gutter); top: calc(var(--topbar-h) + var(--sp-3)); align-items: flex-end; }
}
.v-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  width: 100%;
  max-width: 380px;
  padding: var(--sp-3) var(--sp-3) var(--sp-3) var(--sp-4);
  border-radius: var(--r-2);
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: var(--shadow-2);
  font-size: var(--fs-sm);
  animation: v-drop var(--t-med) var(--ease) both;
}
.v-toast__icon { margin-top: 1px; color: inherit; }
.v-toast__body { flex: 1; min-width: 0; }
.v-toast__title { display: block; font-weight: 700; }
.v-toast__close { margin: -6px -4px -6px 0; color: inherit; --btn-fg: currentColor; opacity: 0.8; }
.v-toast--success .v-toast__icon { color: #8fe0aa; }
.v-toast--danger .v-toast__icon { color: #ffb0b0; }
.v-toast--leaving { animation: v-fade var(--t-fast) var(--ease) reverse both; }
:root[data-theme="dark"] .v-toast--success .v-toast__icon { color: #1f6b3d; }
:root[data-theme="dark"] .v-toast--danger .v-toast__icon { color: #a11d2b; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .v-toast--success .v-toast__icon { color: #1f6b3d; }
  :root:not([data-theme="light"]) .v-toast--danger .v-toast__icon { color: #a11d2b; }
}

/* Bandeau d'alerte (erreurs de formulaire, réseau) */
.v-alert {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-2);
  border: 1px solid currentColor;
  background: var(--info-wash);
  color: var(--info);
  font-size: var(--fs-sm);
}
.v-alert p { color: var(--ink); }
.v-alert strong { display: block; }
.v-alert--danger { background: var(--danger-wash); color: var(--danger); }
.v-alert--success { background: var(--success-wash); color: var(--success); }
.v-alert--warning { background: var(--warning-wash); color: var(--warning); }

/* --------------------------------------------------------------------------
   15. États : vide, chargement
   -------------------------------------------------------------------------- */
.v-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-7) var(--sp-4);
  text-align: center;
  border: 1.5px dashed var(--line);
  border-radius: var(--r-3);
}
.v-empty__icon { width: 2.5rem; height: 2.5rem; color: var(--ink-faint); }
.v-empty__title { font-family: var(--font-serif); font-size: var(--fs-lg); font-weight: 600; }
.v-empty__text { max-width: 40ch; color: var(--ink-soft); }

.v-skeleton {
  display: block;
  height: 0.9em;
  border-radius: var(--r-1);
  background: linear-gradient(90deg, var(--paper-sunken) 0%, color-mix(in srgb, var(--paper-sunken) 50%, var(--paper-raised)) 50%, var(--paper-sunken) 100%);
  background-size: 200% 100%;
  animation: v-shimmer 1.4s linear infinite;
}
.v-skeleton--title { height: 1.4em; width: 60%; }
.v-skeleton--circle { width: 44px; height: 44px; border-radius: 50%; }
.v-spinner { width: 1.5rem; height: 1.5rem; border: 2.5px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: v-spin 800ms linear infinite; }

/* --------------------------------------------------------------------------
   16. Écran de jeu
   -------------------------------------------------------------------------- */
.v-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  backdrop-filter: saturate(1.2) blur(6px);
  -webkit-backdrop-filter: saturate(1.2) blur(6px);
  border-bottom: 1px solid var(--line);
}
.v-topbar__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: var(--topbar-h);
  padding-block: var(--sp-2);
}
.v-topbar__who { display: flex; align-items: center; gap: var(--sp-3); flex: 1; min-width: 0; }
.v-topbar__name { font-family: var(--font-serif); font-size: var(--fs-read); font-weight: 600; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-topbar__sub { font-size: var(--fs-xs); color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-topbar__figures { display: flex; align-items: center; gap: var(--sp-4); flex: none; }
.v-topbar__actions { display: flex; align-items: center; gap: var(--sp-1); flex: none; }

/* Chiffre clé (argent, âge) */
.v-figure { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.v-figure__label { font-size: var(--fs-2xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); }
.v-figure__value { font-family: var(--font-serif); font-size: var(--fs-read); font-weight: 600; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.v-figure__value--neg { color: var(--danger); }
.v-figure--age .v-figure__value { color: var(--accent); }
@media (max-width: 479px) {
  .v-topbar__figures { gap: var(--sp-3); }
  .v-topbar .v-figure__label { display: none; }
  .v-split > .v-figure { align-items: flex-start; }
  .v-topbar__actions .v-btn--icon:not(.v-keep) { display: none; }
}

.v-game {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "tabs" "side" "main" "extra";
  gap: var(--sp-5);
  padding-top: var(--sp-4);
  padding-bottom: calc(var(--actionbar-h) + var(--sp-6) + env(safe-area-inset-bottom, 0px));
}
.v-game__tabs { grid-area: tabs; margin-inline: calc(var(--gutter) * -1); padding-inline: calc(var(--gutter) - var(--sp-3)); }
.v-game__side { grid-area: side; }
.v-game__main { grid-area: main; min-width: 0; }
.v-game__extra { grid-area: extra; display: flex; flex-direction: column; gap: var(--sp-5); }
.v-game__title { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.v-game__title h2 { font-size: var(--fs-xl); }

@media (min-width: 768px) {
  .v-game {
    grid-template-columns: 260px minmax(0, 1fr);
    grid-template-areas: "side tabs" "side main" "extra main";
    align-items: start;
    gap: var(--sp-5) var(--sp-6);
    padding-top: var(--sp-5);
  }
  .v-game__tabs { margin-inline: 0; padding-inline: 0; }
  .v-game__side { position: sticky; top: calc(var(--topbar-h) + var(--sp-5)); }
  .v-game__side .v-stats { grid-template-columns: 1fr; gap: var(--sp-4); }
}
@media (min-width: 1200px) {
  .v-game {
    grid-template-columns: 272px minmax(0, 1fr) 300px;
    grid-template-areas: "side tabs tabs" "side main extra";
    gap: var(--sp-5) var(--sp-7);
  }
  /* Écrans sans colonne de droite (activités, relations, carrière, patrimoine) */
  .v-game--wide { grid-template-areas: "side tabs tabs" "side main main"; }
  .v-game__extra { position: sticky; top: calc(var(--topbar-h) + var(--sp-5)); }
}

/* Panneau de stats */
.v-panel { padding: var(--sp-4); border: 1px solid var(--line); border-radius: var(--r-3); background: var(--paper-raised); }
.v-panel__title { font-family: var(--font-sans); font-size: var(--fs-2xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: var(--sp-3); }

/* Barre d'action : collée en bas sur mobile, flottante sur grand écran */
.v-actionbar {
  position: fixed;
  z-index: 40;
  left: 0;
  right: 0;
  bottom: 0;
  padding: var(--sp-3) var(--gutter) calc(var(--sp-3) + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--paper-raised) 96%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px -12px rgb(40 25 10 / 0.25);
}
.v-actionbar__inner {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: var(--sp-3);
  max-width: 600px;
  margin-inline: auto;
}
.v-actionbar .v-btn { min-height: 52px; font-size: var(--fs-base); }
.v-actionbar__hint { display: none; }
@media (min-width: 768px) {
  .v-actionbar {
    left: 50%;
    right: auto;
    bottom: var(--sp-5);
    transform: translateX(-50%);
    width: min(560px, calc(100% - 2 * var(--gutter)));
    padding: var(--sp-2);
    border: 1px solid var(--line);
    border-radius: calc(var(--r-3) + 4px);
    box-shadow: var(--shadow-3);
  }
  .v-actionbar__inner { grid-template-columns: auto 1fr 1.3fr; align-items: center; }
  .v-actionbar__hint { display: flex; align-items: center; gap: var(--sp-2); padding: 0 var(--sp-3); font-size: var(--fs-xs); color: var(--ink-faint); white-space: nowrap; }
}

/* --------------------------------------------------------------------------
   17. Menu d'activités
   -------------------------------------------------------------------------- */
.v-activities { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: var(--sp-3); list-style: none; }
@media (max-width: 479px) {
  .v-activities { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.v-activity {
  --tone: var(--ink-soft);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-2);
  width: 100%;
  height: 100%;
  min-height: 112px;
  padding: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--paper-raised);
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  transition: border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.v-activity:hover { color: var(--ink); border-color: var(--line-strong); box-shadow: var(--shadow-2); transform: translateY(-1px); }
.v-activity:focus-visible { border-radius: var(--r-3); }
.v-activity__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-2);
  background: color-mix(in srgb, var(--tone) 14%, var(--paper-raised));
  color: var(--tone);
}
.v-activity__icon .v-icon { width: 1.375rem; height: 1.375rem; }
.v-activity__title { font-weight: 650; line-height: 1.25; }
.v-activity__sub { font-size: var(--fs-xs); color: var(--ink-faint); line-height: 1.35; }
.v-activity__top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--sp-2); width: 100%; }
.v-activity--active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.v-activity--locked { background: transparent; border-style: dashed; color: var(--ink-soft); }
.v-activity--locked .v-activity__icon { background: var(--paper-sunken); color: var(--ink-faint); }
.v-activity--locked:hover { transform: none; box-shadow: none; border-color: var(--line); }
/* Tons des familles d'activités */
.v-tone--sante { --tone: var(--c-sante); }
.v-tone--esprit { --tone: var(--c-intelligence); }
.v-tone--social { --tone: var(--c-apparence); }
.v-tone--engagement { --tone: var(--accent); }
.v-tone--argent { --tone: var(--c-bonheur); }
.v-tone--loisir { --tone: var(--c-karma); }
.v-tone--carriere { --tone: var(--c-reputation); }
.v-tone--celebrite { --tone: var(--c-notoriete); }

/* Liste de personnes (relations) */
.v-person { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--sp-3); }
.v-person__name { font-weight: 650; }
.v-person__rel { font-size: var(--fs-xs); color: var(--ink-faint); }
.v-person__meter { margin-top: 6px; max-width: 220px; }

/* --------------------------------------------------------------------------
   18. Authentification
   -------------------------------------------------------------------------- */
.v-auth { display: grid; min-height: 100dvh; grid-template-columns: minmax(0, 1fr); }
.v-auth__aside {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--sp-6);
  padding: var(--sp-6) var(--gutter) var(--sp-5);
  border-bottom: 1px solid var(--line);
}
.v-auth__tagline { font-family: var(--font-serif); font-size: var(--fs-lg); line-height: var(--lh-snug); max-width: 28ch; color: var(--ink-soft); }
.v-auth__tagline em { color: var(--ink); }
.v-auth__quote { display: none; }
.v-auth__main { display: flex; align-items: flex-start; justify-content: center; padding: var(--sp-6) var(--gutter) var(--sp-7); }
.v-auth__form { width: 100%; max-width: 400px; }
@media (min-width: 960px) {
  .v-auth { grid-template-columns: 1.1fr 1fr; }
  .v-auth__aside { padding: var(--sp-7) var(--sp-8); border-bottom: 0; border-right: 1px solid var(--line); background: var(--paper-sunken); }
  .v-auth__tagline { font-size: var(--fs-xl); }
  .v-auth__quote { display: block; font-family: var(--font-serif); font-size: var(--fs-read); line-height: var(--lh-read); max-width: 46ch; color: var(--ink-soft); }
  .v-auth__quote p + p { margin-top: 0.6em; }
  .v-auth__main { align-items: center; }
}

/* --------------------------------------------------------------------------
   19. Liste des parties
   -------------------------------------------------------------------------- */
.v-saves { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: var(--sp-4); list-style: none; }
.v-save {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  height: 100%;
  padding: var(--sp-5);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--paper-raised);
  box-shadow: var(--shadow-1);
  color: var(--ink);
  text-decoration: none;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
a.v-save:hover { color: var(--ink); border-color: var(--line-strong); box-shadow: var(--shadow-2); transform: translateY(-1px); }
a.v-save:focus-visible { border-radius: var(--r-3); }
.v-save__head { display: flex; align-items: center; gap: var(--sp-3); }
.v-save__who { flex: 1; min-width: 0; }
.v-save__name { font-family: var(--font-serif); font-size: var(--fs-lg); font-weight: 600; line-height: 1.2; }
.v-save__sub { font-size: var(--fs-sm); color: var(--ink-soft); }
.v-save__stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2) var(--sp-4); }
.v-save__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-top: auto; padding-top: var(--sp-3); border-top: 1px solid var(--line); font-size: var(--fs-xs); color: var(--ink-faint); }
.v-save__foot strong { font-family: var(--font-serif); font-size: var(--fs-base); color: var(--ink); font-variant-numeric: tabular-nums; }
.v-save__epitaph { font-family: var(--font-serif); font-style: italic; font-size: var(--fs-base); line-height: var(--lh-snug); color: var(--ink-soft); }
.v-save--ended { background: transparent; box-shadow: none; }
.v-save--ended .v-avatar { --av-bg: var(--paper-sunken); --av-fg: var(--ink-soft); }
.v-save--new {
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 220px;
  border: 1.5px dashed var(--line-strong);
  background: transparent;
  box-shadow: none;
}
.v-save--new .v-icon { width: 2rem; height: 2rem; color: var(--accent); }

/* --------------------------------------------------------------------------
   20. Nouvelle vie
   -------------------------------------------------------------------------- */
.v-newlife { display: grid; gap: var(--sp-6); grid-template-columns: minmax(0, 1fr); padding-block: var(--sp-6) var(--sp-8); }
@media (min-width: 960px) {
  .v-newlife { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; gap: var(--sp-7); }
  .v-newlife__preview { position: sticky; top: calc(var(--topbar-h) + var(--sp-5)); }
}
.v-form-grid { display: grid; gap: var(--sp-4); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .v-form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Fiche de naissance (aperçu) : rappel de document officiel */
.v-certificate {
  position: relative;
  padding: var(--sp-5);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-1);
  background: var(--paper-raised);
  box-shadow: var(--shadow-2);
  outline: 1px solid var(--line);
  outline-offset: -8px;
}
.v-certificate__title { font-family: var(--font-serif); font-size: var(--fs-xs); letter-spacing: 0.2em; text-transform: uppercase; text-align: center; color: var(--ink-faint); padding-top: var(--sp-2); }
.v-certificate__name { font-family: var(--font-serif); font-size: var(--fs-2xl); font-style: italic; text-align: center; margin: var(--sp-3) 0 var(--sp-4); }
.v-certificate .v-stamp { position: absolute; right: var(--sp-5); bottom: var(--sp-5); }

/* --------------------------------------------------------------------------
   21. Fin de vie
   -------------------------------------------------------------------------- */
.v-ending { padding-block: var(--sp-7) var(--sp-8); text-align: center; }
.v-ending__kicker { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-faint); }
.v-ending__name { font-size: var(--fs-3xl); margin-top: var(--sp-3); letter-spacing: -0.02em; }
.v-ending__dates { margin-top: var(--sp-2); font-family: var(--font-serif); font-size: var(--fs-read); color: var(--ink-soft); font-variant-numeric: lining-nums; }
.v-ending__epitaph {
  margin: var(--sp-6) auto 0;
  max-width: 30ch;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.375rem, 4vw, 1.875rem);
  line-height: 1.35;
  text-wrap: balance;
}
.v-ending__cause { margin-top: var(--sp-4); font-size: var(--fs-sm); color: var(--ink-faint); }
.v-ornament { display: flex; align-items: center; justify-content: center; gap: var(--sp-3); margin: var(--sp-6) auto; max-width: 240px; color: var(--line-strong); }
.v-ornament::before, .v-ornament::after { content: ""; flex: 1; height: 1px; background: currentColor; }
.v-ornament span { width: 7px; height: 7px; transform: rotate(45deg); background: var(--accent); }
.v-ending__body { text-align: left; display: grid; gap: var(--sp-5); grid-template-columns: minmax(0, 1fr); margin-top: var(--sp-6); }
@media (min-width: 768px) { .v-ending__body { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.v-ending__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-3); margin-top: var(--sp-7); }
.v-facts { list-style: none; counter-reset: fact; display: flex; flex-direction: column; gap: var(--sp-3); }
.v-facts li { display: grid; grid-template-columns: 3.75rem 1fr; gap: var(--sp-2); font-family: var(--font-serif); font-size: var(--fs-base); line-height: var(--lh-snug); }
.v-facts li b { white-space: nowrap; font-family: var(--font-sans); font-size: var(--fs-xs); color: var(--ink-faint); font-variant-numeric: tabular-nums; padding-top: 3px; }

/* --------------------------------------------------------------------------
   22. Utilitaires (u-)
   -------------------------------------------------------------------------- */
.u-sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.u-mt-0 { margin-top: 0 !important; }
.u-mt-2 { margin-top: var(--sp-2) !important; }
.u-mt-4 { margin-top: var(--sp-4) !important; }
.u-mt-5 { margin-top: var(--sp-5) !important; }
.u-mt-6 { margin-top: var(--sp-6) !important; }
.u-mb-4 { margin-bottom: var(--sp-4) !important; }
.u-center { text-align: center; }
.u-right { text-align: right; }
.u-grow { flex: 1; min-width: 0; }
.u-nowrap { white-space: nowrap; }
.u-serif { font-family: var(--font-serif); }
@media (max-width: 767px) { .u-hide-mobile { display: none !important; } }
@media (min-width: 768px) { .u-hide-desktop { display: none !important; } }

/* --------------------------------------------------------------------------
   23. Animations
   -------------------------------------------------------------------------- */
@keyframes v-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes v-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes v-drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes v-ink { from { opacity: 0; transform: translateY(4px); filter: blur(1px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes v-spin { to { transform: rotate(360deg); } }
@keyframes v-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
  .v-skeleton { animation: none; }
}

/* Contraste renforcé */
@media (prefers-contrast: more) {
  :root { --line: var(--line-strong); --ink-faint: var(--ink-soft); }
}

/* Mode fenêtre Windows (couleurs forcées) */
@media (forced-colors: active) {
  .v-stat__fill, .v-meter > span { background: CanvasText; }
  .v-btn, .v-choice, .v-activity, .v-save { border: 1px solid ButtonText; }
}
