:root {
  --ink: #142033;
  --muted: #5c6b7a;
  --line: #d5e3f2;
  --paper: #f3f7fc;
  --card: #ffffff;
  --blue: #5b98eb;
  --navy: #1d4f8a;
  --green: #1d4f8a;
  --alert: #8a3d2f;
  color: var(--ink);
  font-family: Tahoma, "Trebuchet MS", Verdana, sans-serif;
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--navy); }
button, input, select, textarea {
  font: inherit;
  color: inherit;
}
button {
  background: var(--blue);
  color: #0e2744;
  border: 0;
  border-radius: 8px;
  padding: 0.7rem 1rem;
  cursor: pointer;
  font-weight: 650;
}
input, select, textarea {
  width: 100%;
  background: white;
  border: 1px solid #d5d0c4;
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
}
textarea { min-height: 7rem; resize: vertical; }
label { display: grid; gap: 0.35rem; font-size: 0.98rem; }
.top, .page { width: min(1100px, calc(100% - 2rem)); margin: 0 auto; }
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 0;
}
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img, .login .logo { height: 52px; width: auto; display: block; }
.who { display: flex; gap: 1rem; align-items: center; color: var(--muted); }
.who a { text-decoration: none; font-family: Tahoma, "Trebuchet MS", Verdana, sans-serif; }
.who form { margin: 0; }
.link { background: transparent; color: var(--navy); padding: 0; }
.page { padding-bottom: 4rem; }
.eyebrow { margin: 0; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.75rem; color: var(--green); font-family: Tahoma, "Trebuchet MS", Verdana, sans-serif; }
h1 { font-weight: 600; letter-spacing: -0.02em; margin: 0.2rem 0; }
.lead, .intro p, .meta, .empty { color: var(--muted); }
.alert, .notice {
  padding: 0.8rem 1rem;
  border-radius: 10px;
}
.alert {
  background: #fff4e8;
  border: 1px solid #efd3b4;
  color: var(--alert);
}
.notice {
  background: #e7f1fc;
  border: 1px solid #c5daf3;
  color: var(--navy);
}
.gate { min-height: 100vh; display: grid; place-items: center; }
.login { width: min(420px, calc(100% - 2rem)); display: grid; gap: 0.9rem; }
.card, .sheet, .create {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.3rem;
}
.dossiers { list-style: none; padding: 0; display: grid; gap: 0.7rem; }
.dossiers a {
  display: grid;
  gap: 0.15rem;
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.1rem;
}
.dossiers .role { color: var(--navy); }
.dossiers strong { color: var(--ink); }
.dossiers span, .dossiers em { color: var(--muted); font-style: normal; }
.create { margin-top: 1.5rem; }
.create h2 { margin-top: 0; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.grid button, .grid .span { grid-column: 1 / -1; }
.grid button { justify-self: start; }
.progress { height: 8px; background: #e7f1fc; border-radius: 99px; overflow: hidden; min-width: 7rem; }
.progress span { display: block; height: 100%; background: var(--blue); }
.row-actions { display: flex; gap: 0.8rem; white-space: nowrap; }
.text-link { font-family: Tahoma, "Trebuchet MS", Verdana, sans-serif; text-decoration: none; }
.dossier { display: grid; grid-template-columns: 250px 1fr; gap: 1.5rem; align-items: start; }
aside { position: sticky; top: 1rem; display: grid; gap: 0.7rem; }
aside nav { display: grid; gap: 0.35rem; }
aside nav a { text-decoration: none; font-family: Tahoma, "Trebuchet MS", Verdana, sans-serif; font-size: 0.92rem; }
.save { margin: 0.4rem 0 0; color: var(--muted); font-family: Tahoma, "Trebuchet MS", Verdana, sans-serif; font-size: 0.85rem; }
.pdf {
  display: inline-block;
  text-decoration: none;
  background: var(--blue);
  color: #0e2744;
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  text-align: center;
  font-weight: 650;
}
.pdf.secondary { background: transparent; color: var(--navy); border: 1px solid var(--blue); font-weight: 500; }
.sheets { display: grid; gap: 1rem; }
.sheet h2 { margin: 0 0 1rem; font-size: 1.35rem; }
.fields { display: flex; flex-wrap: wrap; gap: 1rem 1.2rem; }
.field { width: 100%; display: grid; gap: 0.4rem; }
.field.half { width: calc(50% - 0.6rem); }
.field.is-hidden { display: none; }
.label-row { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.owner { color: var(--muted); font-family: Tahoma, "Trebuchet MS", Verdana, sans-serif; font-size: 0.75rem; white-space: nowrap; }
.choices { display: flex; flex-wrap: wrap; gap: 0.7rem 1.2rem; }
.choices label { display: flex; align-items: center; gap: 0.4rem; width: auto; }
.choices input { width: auto; }
.info { width: 100%; background: #e7f1fc; border-radius: 10px; padding: 0.8rem 1rem; }
.hint { margin: 0; color: var(--muted); font-family: Tahoma, "Trebuchet MS", Verdana, sans-serif; font-size: 0.9rem; }
.computed { margin: 0.35rem 0 0; font-weight: 650; }
.back { margin: 0 0 0.6rem; }
.levels { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin: 0; padding: 0; list-style: none; font-family: Tahoma, "Trebuchet MS", Verdana, sans-serif; font-size: 0.85rem; }
.levels b { color: var(--navy); }
.grille { width: 100%; display: grid; gap: 0.8rem; }
.grille h3 { margin: 0.6rem 0 0; color: var(--navy); }
.grille-group { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.grille-group-head { display: flex; justify-content: space-between; gap: 1rem; background: #e7f1fc; padding: 0.6rem 0.8rem; }
.grille-scroll { overflow-x: auto; }
.grille table { width: 100%; border-collapse: collapse; font-family: Tahoma, "Trebuchet MS", Verdana, sans-serif; font-size: 0.9rem; }
.grille th, .grille td { border-top: 1px solid var(--line); padding: 0.45rem 0.4rem; text-align: center; }
.grille th:first-child { text-align: left; font-weight: 500; width: 48%; }
.grille input { width: auto; accent-color: var(--blue); }
.grille-totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; margin: 0; }
.grille-totals div { background: #e7f1fc; border-radius: 10px; padding: 0.7rem 0.8rem; }
.grille-totals dt { color: var(--muted); font-family: Tahoma, "Trebuchet MS", Verdana, sans-serif; font-size: 0.8rem; }
.grille-totals dd { margin: 0.15rem 0 0; font-size: 1.45rem; color: var(--navy); }
.table-wrap { overflow-x: auto; }
.people { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.people th, .people td { text-align: left; padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--line); font-family: Tahoma, "Trebuchet MS", Verdana, sans-serif; }
.people th { color: var(--muted); font-weight: 600; font-size: 0.8rem; }
.check { display: flex; align-items: center; gap: 0.5rem; }
.check input { width: auto; }
.create form + form { margin-top: 0.8rem; }
.stack { display: grid; gap: 0.8rem; max-width: 28rem; }
.stack button { justify-self: start; }
.actions { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; }
.actions form { margin: 0; }
.danger { background: transparent; color: var(--alert); border: 1px solid #efd3b4; }
.table, .matrix { display: grid; gap: 0.7rem; }
.table.goals { gap: 0.8rem; }
.table.goals .rows { display: grid; gap: 0.8rem; counter-reset: goal; }
.table.goals .row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  counter-increment: goal;
  background: #f8fbfe;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem 1rem;
}
.table.goals .row::before {
  content: "Objectif " counter(goal);
  color: var(--navy);
  font-weight: 650;
}
.table.goals.upcoming .row::before { content: "Prochain objectif " counter(goal); }
.table.goals .goal-field { display: grid; gap: 0.3rem; }
.table.goals .goal-label { color: var(--navy); font-size: 0.82rem; font-weight: 650; }
.table.goals textarea { min-height: 4.2rem; }
.stars-line { display: flex; align-items: center; gap: 0.75rem; }
.table.goals .stars { display: flex; flex-direction: row; gap: 0.15rem; }
.table.goals .stars label {
  position: relative;
  width: 1.8rem;
  height: 1.8rem;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.table.goals .stars input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.table.goals .stars span { font-size: 1.6rem; line-height: 1; color: #c5d4e6; pointer-events: none; }
.table.goals .stars label.is-on span { color: #e0a322; }
.table.goals .stars input:disabled { cursor: default; }
.star-caption { color: var(--muted); font-size: 0.9rem; }
.horizon { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.horizon-card {
  display: grid;
  gap: 0.85rem;
  align-content: start;
  background: #f8fbfe;
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  border-radius: 16px;
  padding: 1rem 1.05rem 1.1rem;
}
.horizon-card.later { border-top-color: #1d4f8a; }
.horizon-card.balance { grid-column: 1 / -1; border-top-color: #7aa7e0; background: white; }
.horizon-card header h3 { margin: 0; color: var(--navy); font-size: 1.2rem; }
.horizon-card .field { width: 100%; gap: 0.35rem; }
.horizon-card textarea { min-height: 6.2rem; background: white; }
.matrix.plan { width: 100%; gap: 0.9rem; }
.action-card {
  display: grid;
  gap: 0.85rem;
  background: #f8fbfe;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem 1.05rem 1.1rem;
}
.action-card header { display: flex; gap: 0.8rem; align-items: center; }
.action-index {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  background: #e7f1fc;
  color: var(--navy);
  display: grid;
  place-items: center;
  font-weight: 700;
  flex: none;
}
.action-card h3 { margin: 0; color: var(--navy); font-size: 1.05rem; }
.action-card header p { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.85rem; }
.action-grid { display: grid; grid-template-columns: 1.4fr 0.8fr; gap: 0.7rem; }
.action-grid .wide { grid-column: 1 / -1; }
.action-grid .goal-field { display: grid; gap: 0.3rem; }
.action-grid textarea { min-height: 3.6rem; background: white; }
.action-grid input { background: white; }
.row, .matrix-grid { display: grid; gap: 0.6rem; padding: 0.8rem; border: 1px dashed var(--line); border-radius: 12px; }
.row { grid-template-columns: 1fr; }
.remove, .add { background: transparent; color: var(--navy); border: 1px solid var(--navy); width: fit-content; }
input[readonly], textarea[readonly] { background: #f4f1ea; color: #3e4650; }
@media (max-width: 800px) {
  .dossier, .grid, .grille-totals, .horizon, .action-grid { grid-template-columns: 1fr; }
  .horizon-card.balance { grid-column: auto; }
  .field.half { width: 100%; }
  aside { position: static; }
  .brand img, .login .logo { height: 40px; }
}
