/* =========================================================
   ParentLien — feuille de style principale
   Direction : éditorial sobre, palette terre/encre.
   Pas de violet. Pas d'effets gratuits. Respect du sujet.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,400;1,9..144,500&family=Inter+Tight:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---------- TOKENS ---------- */
:root {
  /* Palette papier / encre / terre */
  --paper:        #f7f3ec;
  --paper-warm:   #f1ebde;
  --paper-deep:   #e9e1cf;
  --ink:          #1c1d1a;
  --ink-soft:     #2e2f2a;
  --ink-mute:     #5b5d56;
  --ink-faint:    #87887f;
  --line:         #d8d1be;
  --line-strong:  #b8b09a;

  --accent:       #3d5a4a;   /* vert forêt */
  --accent-dark:  #2c4337;
  --accent-soft:  #e8efe9;

  --warm:         #b8511e;   /* brique chaude */
  --warm-dark:    #8e3f15;
  --warm-soft:    #f4e2d4;

  --danger:       #8a2b1c;
  --danger-soft:  #f1dad3;

  /* Rayons */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;
  --r-xl: 22px;

  /* Espaces */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;

  /* Typo */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Inter Tight', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  /* Ombres */
  --shadow-sm: 0 1px 2px rgba(28,29,26,.05);
  --shadow-md: 0 4px 16px rgba(28,29,26,.08);
  --shadow-lg: 0 12px 40px rgba(28,29,26,.10);

  /* Largeurs */
  --w-narrow:  720px;
  --w-content: 1040px;
  --w-wide:    1280px;
}

/* ---------- RESET LÉGER ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 18% 12%, rgba(61,90,74,.06), transparent 55%),
    radial-gradient(circle at 82% 88%, rgba(184,81,30,.05), transparent 55%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
a { color: var(--accent-dark); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--warm-dark); }
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: var(--s-6) 0;
}

/* ---------- TYPOGRAPHIE ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 0 0 .6em;
  line-height: 1.15;
}
h1 { font-size: clamp(2.1rem, 4vw, 3.4rem); font-weight: 500; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

.h-italic { font-style: italic; font-weight: 400; }

p { margin: 0 0 1em; }
small, .muted { color: var(--ink-mute); }
.tiny { font-size: .82rem; color: var(--ink-mute); }
strong { font-weight: 600; color: var(--ink); }
em { font-style: italic; }

::selection { background: var(--accent); color: var(--paper); }

/* ---------- LAYOUT GÉNÉRAL ---------- */
.container {
  width: 100%;
  max-width: var(--w-content);
  margin: 0 auto;
  padding: 0 var(--s-5);
}
.container-narrow { max-width: var(--w-narrow); }
.container-wide   { max-width: var(--w-wide); }

/* ---------- HEADER PUBLIC ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(247, 243, 236, .82);
  border-bottom: 1px solid var(--line);
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-4) 0;
  gap: var(--s-5);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -.01em;
}
.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--warm);
  display: inline-block;
}
.brand:hover { color: var(--accent-dark); }

.nav-public {
  display: flex;
  align-items: center;
  gap: var(--s-5);
}
.nav-public a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .95rem;
}
.nav-public a:hover { color: var(--warm-dark); }

@media (max-width: 720px) {
  .nav-public .nav-link-secondary { display: none; }
}

/* ---------- FOOTER ---------- */
.site-footer {
  margin-top: var(--s-9);
  border-top: 1px solid var(--line);
  padding: var(--s-7) 0 var(--s-6);
  background: var(--paper-warm);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--s-6);
}
.footer-block h4 {
  font-family: var(--font-body);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--ink-mute);
  font-weight: 600;
}
.footer-block ul { list-style: none; padding: 0; margin: 0; }
.footer-block li { margin-bottom: .35em; }
.footer-block a { color: var(--ink-soft); text-decoration: none; font-size: .92rem; }
.footer-block a:hover { color: var(--warm-dark); text-decoration: underline; }
.footer-mention { font-family: var(--font-display); font-style: italic; color: var(--ink-mute); }
.footer-bottom {
  margin-top: var(--s-6);
  padding-top: var(--s-4);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
  font-size: .85rem;
  color: var(--ink-mute);
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; gap: var(--s-5); }
}

/* ---------- BOUTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4em;
  padding: .7em 1.2em;
  font-family: var(--font-body);
  font-size: .98rem;
  font-weight: 500;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  text-decoration: none;
  transition: transform .12s ease, background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
  cursor: pointer;
  line-height: 1.2;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: .45em .85em; font-size: .87rem; }
.btn-lg { padding: .95em 1.6em; font-size: 1.05rem; }

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover {
  background: var(--accent-dark);
  color: var(--paper);
}

.btn-secondary {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink-soft);
}
.btn-secondary:hover {
  border-color: var(--ink);
  background: var(--paper-warm);
}

.btn-warm {
  background: var(--warm);
  color: #fff;
}
.btn-warm:hover { background: var(--warm-dark); }

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border-color: transparent;
}
.btn-ghost:hover { color: var(--warm-dark); background: rgba(184,81,30,.06); }

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

.btn-block { width: 100%; }

/* ---------- FORMULAIRES ---------- */
.field { margin-bottom: var(--s-4); }
.field-row {
  display: grid;
  gap: var(--s-4);
}
.field-row.cols-2 { grid-template-columns: 1fr 1fr; }
.field-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) {
  .field-row.cols-2, .field-row.cols-3 { grid-template-columns: 1fr; }
}

.label {
  display: block;
  margin-bottom: .35em;
  font-size: .88rem;
  font-weight: 500;
  color: var(--ink-soft);
}
.hint {
  display: block;
  margin-top: .35em;
  font-size: .82rem;
  color: var(--ink-mute);
  line-height: 1.5;
}
.input, .textarea, .select {
  width: 100%;
  padding: .7em .9em;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(61,90,74,.18);
}
.textarea { resize: vertical; min-height: 120px; line-height: 1.55; }
.select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%235b5d56' d='M6 8 0 0h12z'/></svg>"); background-repeat: no-repeat; background-position: right .9em center; padding-right: 2.2em; }

.input.has-error, .textarea.has-error, .select.has-error {
  border-color: var(--danger);
  background-color: var(--danger-soft);
}
.field-error {
  margin-top: .3em;
  font-size: .85rem;
  color: var(--danger);
}

.checkbox-line {
  display: flex;
  align-items: flex-start;
  gap: .65em;
  font-size: .94rem;
  color: var(--ink-soft);
  line-height: 1.5;
  cursor: pointer;
}
.checkbox-line input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}
.checkbox-line.is-radio input[type="radio"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}

/* ---------- CARDS ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  box-shadow: var(--shadow-sm);
}
.card-tight { padding: var(--s-4); }
.card-warm  { background: var(--paper-warm); }
.card-quiet { border-style: dashed; box-shadow: none; }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  margin-bottom: var(--s-4);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--line);
}
.card-header h2, .card-header h3 { margin: 0; }

/* ---------- GRID ---------- */
.grid { display: grid; gap: var(--s-5); }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 880px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
@media (min-width: 881px) and (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- FLASH ---------- */
.flash {
  margin-bottom: var(--s-4);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  border-left: 4px solid;
  font-size: .95rem;
}
.flash-success { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-dark); }
.flash-error   { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.flash-info    { background: var(--paper-warm);  border-color: var(--ink-mute); color: var(--ink-soft); }

/* ---------- TABLE ---------- */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
}
.table th, .table td {
  text-align: left;
  padding: .75em .8em;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.table th {
  font-family: var(--font-body);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--ink-mute);
  font-weight: 600;
  background: var(--paper-warm);
}
.table tr:hover td { background: rgba(232, 225, 207, 0.25); }
.table .num { font-variant-numeric: tabular-nums; }

/* ---------- TAG / BADGE ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  padding: .2em .65em;
  font-size: .76rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .07em;
  border-radius: 999px;
  background: var(--paper-deep);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}
.tag-accent { background: var(--accent-soft); color: var(--accent-dark); border-color: var(--accent); }
.tag-warm   { background: var(--warm-soft);   color: var(--warm-dark);   border-color: var(--warm); }
.tag-danger { background: var(--danger-soft); color: var(--danger);      border-color: var(--danger); }
.tag-muted  { background: transparent;        color: var(--ink-mute);    border-color: var(--line); }

/* ---------- HERO LANDING ---------- */
.hero {
  padding: var(--s-9) 0 var(--s-8);
  position: relative;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font-family: var(--font-mono);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--warm-dark);
  margin-bottom: var(--s-4);
}
.hero-eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--warm);
}
.hero h1 {
  max-width: 18ch;
  font-size: clamp(2.4rem, 5.5vw, 4.4rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -.02em;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent-dark);
  font-feature-settings: "ss01";
}
.hero-lede {
  max-width: 52ch;
  font-size: 1.15rem;
  color: var(--ink-soft);
  margin-top: var(--s-4);
}
.hero-actions {
  margin-top: var(--s-6);
  display: flex;
  gap: var(--s-3);
  flex-wrap: wrap;
}
.hero-meta {
  margin-top: var(--s-5);
  font-size: .87rem;
  color: var(--ink-mute);
}

/* ---------- SECTION SHELL ---------- */
.section {
  padding: var(--s-8) 0;
}
.section-head {
  max-width: var(--w-narrow);
  margin-bottom: var(--s-6);
}
.section-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--accent-dark);
  margin-bottom: var(--s-3);
}

/* ---------- FEATURE CARD ---------- */
.feature-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.feature-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}
.feature-card .feature-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--warm-dark);
  letter-spacing: -.02em;
}
.feature-card h3 {
  font-size: 1.15rem;
  margin: 0;
}
.feature-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: .95rem;
}
.feature-card .feature-tag {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--ink-mute);
}

/* ---------- PULL QUOTE ---------- */
.pull-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  line-height: 1.4;
  color: var(--ink);
  max-width: 36ch;
  border-left: 3px solid var(--warm);
  padding-left: var(--s-4);
  margin: var(--s-6) 0;
}

/* ---------- EMPTY STATE ---------- */
.empty-state {
  text-align: center;
  padding: var(--s-8) var(--s-5);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--paper-warm);
}
.empty-state h3 {
  font-style: italic;
  font-weight: 400;
  margin-bottom: .4em;
}
.empty-state p {
  color: var(--ink-mute);
  max-width: 48ch;
  margin: 0 auto var(--s-4);
}

/* ---------- AUTH SHELL (deux colonnes) ---------- */
.auth-shell {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  min-height: 100vh;
}
.auth-aside {
  background: var(--ink);
  color: var(--paper);
  padding: var(--s-7) var(--s-7);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-image:
    radial-gradient(circle at 80% 20%, rgba(184,81,30,.18), transparent 50%),
    radial-gradient(circle at 10% 90%, rgba(61,90,74,.22), transparent 55%);
}
.auth-aside .brand { color: var(--paper); }
.auth-aside .brand:hover { color: var(--warm-soft); }
.auth-aside .auth-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.35;
  color: var(--paper);
  max-width: 28ch;
}
.auth-aside .auth-quote::before {
  content: '“';
  display: block;
  font-size: 3rem;
  line-height: 1;
  color: var(--warm);
  margin-bottom: .2em;
}
.auth-aside .auth-quote-attr {
  margin-top: var(--s-4);
  font-style: normal;
  font-family: var(--font-mono);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--paper-deep);
}
.auth-aside .auth-aside-foot {
  font-size: .82rem;
  color: var(--paper-deep);
}
.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-7) var(--s-5);
}
.auth-main-inner {
  width: 100%;
  max-width: 460px;
}
.auth-main-inner h1 {
  font-size: clamp(2rem, 3vw, 2.6rem);
  margin-bottom: .4em;
}
.auth-main-inner .auth-sub {
  color: var(--ink-mute);
  margin-bottom: var(--s-5);
}
.auth-main-inner .auth-foot {
  margin-top: var(--s-5);
  font-size: .9rem;
  color: var(--ink-mute);
  text-align: center;
}

@media (max-width: 880px) {
  .auth-shell { grid-template-columns: 1fr; min-height: auto; }
  .auth-aside { padding: var(--s-5); }
  .auth-aside .auth-quote { font-size: 1.3rem; }
}

/* ---------- APP SHELL (sidebar + main) ---------- */
.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: var(--ink);
  color: var(--paper);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar .brand { color: var(--paper); font-size: 1.3rem; }
.sidebar .brand:hover { color: var(--warm-soft); }
.sidebar-section-label {
  font-family: var(--font-mono);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--ink-faint);
  margin: var(--s-3) 0 var(--s-2);
  padding-left: .6em;
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: .55em;
  padding: .65em .85em;
  color: var(--paper-deep);
  text-decoration: none;
  border-radius: var(--r-md);
  font-size: .95rem;
  transition: background .15s ease, color .15s ease;
}
.sidebar-link:hover {
  background: rgba(255,255,255,.05);
  color: var(--paper);
}
.sidebar-link.is-active {
  background: rgba(184,81,30,.18);
  color: var(--paper);
  border-left: 3px solid var(--warm);
  padding-left: calc(.85em - 3px);
}
.sidebar-foot {
  margin-top: auto;
  padding-top: var(--s-3);
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: .82rem;
  color: var(--ink-faint);
}
.sidebar-user {
  display: flex;
  flex-direction: column;
  gap: .3em;
  margin-bottom: var(--s-3);
}
.sidebar-user strong { color: var(--paper); font-weight: 500; }
.sidebar-user .sidebar-user-email { font-size: .8rem; color: var(--paper-deep); }
.sidebar-logout {
  display: inline;
}
.sidebar-logout button {
  background: transparent;
  border: 1px solid rgba(255,255,255,.15);
  color: var(--paper-deep);
  padding: .45em .85em;
  border-radius: var(--r-md);
  font-size: .82rem;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.sidebar-logout button:hover {
  background: var(--warm);
  border-color: var(--warm);
  color: #fff;
}

.app-main {
  background: var(--paper);
  background-image:
    radial-gradient(circle at 90% 0%, rgba(61,90,74,.05), transparent 50%);
  padding: var(--s-6) var(--s-7);
}
@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .app-main { padding: var(--s-5) var(--s-4); }
}

.app-topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
  margin-bottom: var(--s-6);
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--line);
}
.app-topbar h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}
.app-topbar .app-topbar-sub {
  color: var(--ink-mute);
  margin-top: .2em;
  font-size: .98rem;
}
.app-topbar-actions {
  display: flex;
  gap: var(--s-2);
  flex-wrap: wrap;
}

/* ---------- STATS ---------- */
.stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-4) var(--s-5);
}
.stat-label {
  font-family: var(--font-mono);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--ink-mute);
  margin-bottom: .3em;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.1;
}
.stat-foot {
  margin-top: .3em;
  font-size: .85rem;
  color: var(--ink-mute);
}

/* ---------- TIMELINE / FAITS ---------- */
.timeline {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.timeline-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: var(--s-4);
  padding: var(--s-4);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color .15s ease;
}
.timeline-item:hover { border-color: var(--line-strong); }
.timeline-item.imp-3 { border-left: 4px solid var(--danger); }
.timeline-item.imp-2 { border-left: 4px solid var(--warm); }
.timeline-item.imp-1 { border-left: 4px solid var(--ink-faint); }
.timeline-date {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: .08em;
  padding-top: 3px;
}
.timeline-body h4 {
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 600;
  margin: 0 0 .25em;
}
.timeline-body p { margin: 0; color: var(--ink-soft); font-size: .92rem; }
.timeline-body .timeline-meta {
  margin-top: var(--s-2);
  display: flex;
  gap: var(--s-2);
  flex-wrap: wrap;
  align-items: center;
  font-size: .82rem;
  color: var(--ink-mute);
}

@media (max-width: 640px) {
  .timeline-item { grid-template-columns: 1fr; }
  .timeline-date { padding-top: 0; }
}

/* ---------- FACT BLOCK (show) ---------- */
.fact-block {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-6);
}
.fact-section {
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--line);
}
.fact-section:last-child { border-bottom: 0; padding-bottom: 0; }
.fact-section:first-child { padding-top: 0; }
.fact-section-label {
  font-family: var(--font-mono);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--ink-mute);
  margin-bottom: var(--s-2);
}
.fact-section-content {
  white-space: pre-wrap;
  color: var(--ink);
  line-height: 1.65;
}
.fact-section-content.is-empty {
  font-style: italic;
  color: var(--ink-faint);
}

/* ---------- SITUATION CARDS (générateur) ---------- */
.situation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--s-3);
}
.situation-card {
  display: block;
  padding: var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--paper);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.situation-card:hover { border-color: var(--line-strong); }
.situation-card input { display: none; }
.situation-card .sit-title {
  font-weight: 600;
  margin-bottom: .3em;
  color: var(--ink);
}
.situation-card .sit-hint {
  font-size: .85rem;
  color: var(--ink-mute);
  line-height: 1.45;
}
.situation-card input:checked + .sit-inner {
  /* géré via parent */
}
.situation-card:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}

/* ---------- MESSAGE PREVIEW (résultat) ---------- */
.msg-preview {
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  font-family: var(--font-body);
  line-height: 1.7;
  white-space: pre-wrap;
  font-size: 1.02rem;
}

/* ---------- LIMITS BANNER (landing) ---------- */
.limits {
  background: var(--ink);
  color: var(--paper);
  padding: var(--s-7) 0;
  border-radius: var(--r-xl);
  margin: var(--s-8) auto;
  position: relative;
  overflow: hidden;
}
.limits::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 20%, rgba(184,81,30,.18), transparent 50%),
    radial-gradient(circle at 88% 80%, rgba(61,90,74,.18), transparent 50%);
  pointer-events: none;
}
.limits-inner { position: relative; padding: 0 var(--s-6); }
.limits .section-eyebrow { color: var(--warm-soft); }
.limits h2 { color: var(--paper); max-width: 22ch; }
.limits-list {
  list-style: none;
  padding: 0;
  margin: var(--s-5) 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3) var(--s-6);
  color: var(--paper-deep);
}
.limits-list li {
  display: flex;
  align-items: flex-start;
  gap: .55em;
}
.limits-list li::before {
  content: '×';
  color: var(--warm);
  font-family: var(--font-display);
  font-size: 1.4em;
  line-height: .9;
  flex-shrink: 0;
}
@media (max-width: 720px) {
  .limits-list { grid-template-columns: 1fr; }
}

/* ---------- UTIL ---------- */
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: var(--s-2); }
.mb-3 { margin-bottom: var(--s-3); }
.mb-4 { margin-bottom: var(--s-4); }
.mb-5 { margin-bottom: var(--s-5); }
.mb-6 { margin-bottom: var(--s-6); }
.mt-0 { margin-top: 0 !important; }
.mt-3 { margin-top: var(--s-3); }
.mt-4 { margin-top: var(--s-4); }
.mt-5 { margin-top: var(--s-5); }
.mt-6 { margin-top: var(--s-6); }
.gap-2 { gap: var(--s-2); }
.gap-3 { gap: var(--s-3); }
.gap-4 { gap: var(--s-4); }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.text-center { text-align: center; }
.text-mute { color: var(--ink-mute); }
.text-warm { color: var(--warm-dark); }
.text-accent { color: var(--accent-dark); }
.full-w { width: 100%; }
.hidden { display: none !important; }

/* ---------- IMPRESSION ---------- */
@media print {
  .sidebar, .site-header, .site-footer, .app-topbar-actions,
  .btn, form { display: none !important; }
  body { background: white; color: black; }
  .app-shell { display: block; }
  .app-main { padding: 0; }
  .fact-block { border: 1px solid #ccc; box-shadow: none; }
}
