:root {
    color-scheme: light;
    --night: #172B37; --ink: #1F3645; --ink-2: #2B4656;
    --sage: #598057; --sage-l: #8FBB82; --sage-d: #3E6B41;
    --brass: #B39A67; --brass-l: #D5C29A;
    --bg: #F4F5F3; --surface: #FFFFFF; --line: #E2E6E3; --line-2: #CFD6D2;
    --text: #1C2A30; --muted: #69767A; --faint: #97A29F;
    --ok: #3E6B41; --ok-bg: #EDF3EB; --warn: #8A5A12; --warn-bg: #F8F0E1; --danger: #9B3526; --danger-bg: #F9ECE9;
    --display: "Libre Caslon Display", "Libre Caslon Text", Georgia, serif;
    --serif: "Libre Caslon Text", Georgia, serif;
    --body: "Work Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --lift: 0 1px 2px rgba(23,43,55,.04), 0 18px 40px -26px rgba(23,43,55,.28);
  }
  * { box-sizing: border-box; }
  html, body { height: 100%; }
  body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
  button, input, select, textarea { font: inherit; color: inherit; }
  button { cursor: pointer; }
  :focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; }
  p { margin: 0; }

  .shell { display: grid; grid-template-columns: 264px minmax(0,1fr); min-height: 100%; }

  /* ---------- Barre latérale ---------- */
  .side { background: var(--night); color: #DCE5E1; display: flex; flex-direction: column; padding: 28px 20px 24px; gap: 28px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
  .logo { display: flex; align-items: center; gap: 12px; padding: 0 8px; }
  .logo img { width: 44px; height: 44px; border-radius: 22px; box-shadow: 0 0 0 1px rgba(213,194,154,.45); }
  .logo b { display: block; font-family: var(--display); font-size: 21px; font-weight: 400; letter-spacing: .01em; color: #FFFFFF; line-height: 1.1; }
  .logo span { font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--brass-l); }
  .profile { display: flex; gap: 12px; align-items: center; padding: 16px 8px; border-top: 1px solid rgba(255,255,255,.08); border-bottom: 1px solid rgba(255,255,255,.08); }
  .avatar { width: 40px; height: 40px; border-radius: 20px; background: var(--ink-2); color: var(--brass-l); display: inline-flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 15px; letter-spacing: .04em; flex-shrink: 0; border: 1px solid rgba(213,194,154,.35); }
  .profile b { display: block; font-weight: 500; color: #FFFFFF; font-size: 14.5px; }
  .profile span { font-size: 12px; color: #9FB0AA; }
  .nav { display: flex; flex-direction: column; gap: 2px; }
  .nav-label { font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: #7F928C; padding: 0 12px 8px; }
  .nav button { background: transparent; border: 0; text-align: left; padding: 10px 12px; color: #C4D0CB; font-size: 14px; display: flex; align-items: center; gap: 12px; border-left: 2px solid transparent; }
  .nav button svg { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.5; }
  .nav button:hover { color: #FFFFFF; background: rgba(255,255,255,.04); }
  .nav button[aria-current="page"] { color: #FFFFFF; border-left-color: var(--brass); background: rgba(255,255,255,.06); }
  .side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
  .role { display: flex; border: 1px solid rgba(255,255,255,.14); }
  .role button { flex: 1; background: transparent; border: 0; color: #AFC0BA; padding: 9px 8px; font-size: 12.5px; }
  .role button[aria-pressed="true"] { background: var(--brass); color: var(--night); font-weight: 600; }
  .proto { font-size: 11px; letter-spacing: .08em; color: #7F928C; padding: 0 4px; }

  /* ---------- Contenu ---------- */
  .main { padding: 44px clamp(16px, 4vw, 56px) 72px; display: flex; flex-direction: column; gap: 28px; max-width: 1180px; width: 100%; }
  .head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding-bottom: 22px; border-bottom: 1px solid var(--line-2); }
  .kicker { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--brass); font-weight: 500; margin-bottom: 10px; }
  .head h1 { font-family: var(--display); font-weight: 400; font-size: clamp(34px, 4vw, 48px); line-height: 1.05; margin: 0; color: var(--ink); letter-spacing: -.005em; }
  .head p.sub { color: var(--muted); margin-top: 8px; }
  .chip { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 500; padding: 5px 11px; letter-spacing: .02em; white-space: nowrap; border: 1px solid currentColor; }
  .chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
  .c-ok { color: var(--ok); background: var(--ok-bg); border-color: rgba(62,107,65,.25); }
  .c-warn { color: var(--warn); background: var(--warn-bg); border-color: rgba(138,90,18,.25); }
  .c-danger { color: var(--danger); background: var(--danger-bg); border-color: rgba(155,53,38,.25); }
  .c-neutral { color: var(--ink); background: #EBEFED; border-color: rgba(31,54,69,.18); }
  .c-brass { color: #7E6A3F; background: #F6F1E6; border-color: rgba(179,154,103,.45); }

  .panel { background: var(--surface); border: 1px solid var(--line); padding: 28px; display: flex; flex-direction: column; gap: 18px; }
  .panel.lift { box-shadow: var(--lift); }
  .panel-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
  .panel h2 { font-family: var(--serif); font-weight: 400; font-size: 22px; margin: 0; color: var(--ink); }
  .label { font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
  .muted { color: var(--muted); font-size: 13.5px; }
  .rule { height: 1px; background: var(--line); border: 0; margin: 0; }

  /* Héros échéance */
  .hero { background: var(--ink); color: #E4ECE8; padding: 36px 36px 32px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 28px; align-items: end; position: relative; box-shadow: var(--lift); }
  .hero::after { content: ""; position: absolute; left: 36px; right: 36px; top: 0; height: 2px; background: var(--brass); }
  .hero .label { color: var(--brass-l); }
  .hero-when { font-family: var(--display); font-size: clamp(32px, 4.2vw, 50px); line-height: 1.05; color: #FFFFFF; margin: 10px 0 12px; }
  .count { display: flex; gap: 22px; align-items: baseline; flex-wrap: wrap; }
  .count div { display: flex; align-items: baseline; gap: 6px; }
  .count strong { font-family: var(--display); font-weight: 400; font-size: 30px; color: var(--sage-l); font-variant-numeric: tabular-nums; }
  .count span { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #9FB3AC; }
  .hero-rule { font-size: 13.5px; color: #A9BAB4; max-width: 60ch; margin-top: 14px; }
  .hero-note { font-size: 13.5px; color: var(--brass-l); margin-top: 8px; }

  .btn { border: 1px solid transparent; padding: 13px 22px; font-weight: 500; font-size: 14px; letter-spacing: .03em; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; transition: background .15s, border-color .15s; }
  .btn-light { background: #F4F1E8; color: var(--night); }
  .btn-light:hover { background: #FFFFFF; }
  .btn-ink { background: var(--ink); color: #FFFFFF; }
  .btn-ink:hover { background: var(--ink-2); }
  .btn-line { background: transparent; border-color: var(--line-2); color: var(--ink); }
  .btn-line:hover { border-color: var(--ink); }
  .btn[disabled] { opacity: .4; cursor: not-allowed; }
  .row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

  .grid-2 { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  .stack { display: flex; flex-direction: column; gap: 24px; min-width: 0; }

  .prio { font-family: var(--serif); font-size: clamp(22px, 2.4vw, 28px); line-height: 1.25; color: var(--ink); margin: 0; text-wrap: balance; }
  .track { height: 2px; background: var(--line); position: relative; }
  .track i { position: absolute; inset: 0 auto 0 0; background: var(--sage); }
  .figures { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); }
  .figures div { display: flex; flex-direction: column; gap: 2px; padding-right: 12px; }
  .figures div + div { border-left: 1px solid var(--line); padding-left: 20px; }
  .figures strong { font-family: var(--display); font-weight: 400; font-size: 36px; color: var(--ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
  .figures span { font-size: 12.5px; color: var(--muted); }

  .checks { list-style: none; margin: 0; padding: 0; }
  .checks li + li { border-top: 1px solid var(--line); }
  .checks label { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; cursor: pointer; }
  .checks input { appearance: none; width: 18px; height: 18px; border: 1px solid var(--line-2); margin: 2px 0 0; flex-shrink: 0; display: inline-grid; place-content: center; background: #fff; }
  .checks input:checked { background: var(--ink); border-color: var(--ink); }
  .checks input:checked::after { content: ""; width: 9px; height: 5px; border-left: 1.5px solid #fff; border-bottom: 1.5px solid #fff; transform: rotate(-45deg) translate(1px,-1px); }
  .checks .done span { color: var(--faint); text-decoration: line-through; text-decoration-color: var(--line-2); }

  .ledger { list-style: none; margin: 0; padding: 0; }
  .ledger li { display: grid; grid-template-columns: 56px minmax(0,1fr) auto; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); align-items: start; }
  .ledger .wk { font-family: var(--display); font-size: 26px; color: var(--ink); line-height: 1; }
  .ledger .wk small { display: block; font-family: var(--body); font-size: 10px; letter-spacing: .2em; color: var(--faint); text-transform: uppercase; margin-top: 6px; }
  .ledger p { color: var(--text); }
  .ledger .when { font-size: 12.5px; color: var(--muted); margin-top: 3px; }

  .meet b { font-family: var(--serif); font-weight: 400; font-size: 19px; color: var(--ink); display: block; }

  /* Parcours */
  .journey { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 0; border-top: 1px solid var(--line-2); }
  .phase { padding: 22px 22px 8px 0; display: flex; flex-direction: column; gap: 14px; }
  .phase + .phase { border-left: 1px solid var(--line); padding-left: 22px; }
  .phase h3 { font-family: var(--serif); font-weight: 400; font-size: 20px; color: var(--ink); margin: 0; }
  .phase ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
  .phase li { display: flex; gap: 10px; font-size: 14px; align-items: baseline; }
  .phase li em { font-style: normal; font-family: var(--display); font-size: 15px; color: var(--brass); min-width: 22px; }
  .phase li.done { color: var(--muted); }
  .phase li.done::after { content: "✓"; color: var(--sage-d); margin-left: auto; }
  .phase.locked { color: var(--faint); }

  /* Capsules */
  .caps { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; }
  .cap { background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; text-align: left; padding: 0; }
  .cap-top { background: var(--ink); aspect-ratio: 16 / 7; position: relative; display: flex; align-items: flex-end; padding: 16px 18px; }
  .cap-top span { font-family: var(--display); font-size: 40px; color: rgba(213,194,154,.85); line-height: 1; }
  .cap-top svg { position: absolute; right: 18px; top: 16px; width: 26px; height: 26px; stroke: var(--brass-l); fill: none; stroke-width: 1.3; }
  .cap.locked .cap-top { background: #D9DFDC; }
  .cap.locked .cap-top span { color: rgba(31,54,69,.35); }
  .cap.locked .cap-top svg { stroke: #8E9A97; }
  .cap-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
  .cap-body b { font-family: var(--serif); font-weight: 400; font-size: 17px; color: var(--ink); line-height: 1.3; }
  .cap-meta { margin-top: auto; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
  button.cap:hover:not([disabled]) { border-color: var(--line-2); box-shadow: var(--lift); }
  button.cap[disabled] { cursor: default; }

  /* Défis */
  .days { display: grid; grid-template-columns: repeat(10, minmax(0,1fr)); gap: 6px; }
  .day { aspect-ratio: 1; border: 1px solid var(--line-2); display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; background: #fff; }
  .day.done { background: var(--ink); color: var(--brass-l); border-color: var(--ink); }
  .day.today { border: 1.5px solid var(--brass); color: var(--ink); font-weight: 600; }
  button.day { cursor: pointer; }

  /* Suspension */
  .alert { border-top: 2px solid var(--danger); }
  .alert h2 { color: var(--danger); }
  .steps2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .stepbox { border: 1px solid var(--line); padding: 22px; display: flex; flex-direction: column; gap: 14px; }
  .stepbox.off { opacity: .45; }
  .stepbox h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 18px; color: var(--ink); display: flex; gap: 12px; align-items: baseline; }
  .stepbox h3 em { font-style: normal; font-family: var(--display); color: var(--brass); font-size: 22px; }
  .field { display: flex; flex-direction: column; gap: 7px; }
  .field label { font-size: 13px; font-weight: 500; color: var(--ink); }
  .field textarea, .field select { border: 1px solid var(--line-2); background: #fff; padding: 11px 12px; min-height: 46px; width: 100%; }
  .field textarea { min-height: 84px; resize: vertical; }
  .hint { font-size: 12px; color: var(--muted); }

  /* Fondateur */
  .kpis { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--lift); }
  .kpis div { padding: 22px 22px 20px; display: flex; flex-direction: column; gap: 4px; }
  .kpis div + div { border-left: 1px solid var(--line); }
  .kpis strong { font-family: var(--display); font-weight: 400; font-size: 36px; color: var(--ink); line-height: 1.05; font-variant-numeric: tabular-nums; }
  .kpis span { font-size: 12.5px; color: var(--muted); }
  table { width: 100%; border-collapse: collapse; font-size: 14px; }
  th, td { text-align: left; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
  th { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding-top: 0; }
  th:last-child, td:last-child { padding-right: 0; }
  td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
  .table-wrap { overflow-x: auto; }
  .who b { display: block; font-weight: 500; color: var(--ink); }
  .who span { font-size: 12.5px; color: var(--muted); }
  .mini { background: none; border: 1px solid var(--line-2); padding: 6px 12px; font-size: 12.5px; color: var(--ink); min-height: 34px; }
  .mini:hover { border-color: var(--ink); }
  .filters { display: flex; gap: 0; border: 1px solid var(--line-2); }
  .filters button { border: 0; background: var(--surface); padding: 8px 14px; font-size: 13px; min-height: 38px; color: var(--muted); }
  .filters button + button { border-left: 1px solid var(--line-2); }
  .filters button[aria-pressed="true"] { background: var(--ink); color: #fff; }

  /* Fenêtres */
  .overlay { position: fixed; inset: 0; background: rgba(15,28,36,.6); display: flex; align-items: flex-start; justify-content: center; padding: 56px 16px; overflow-y: auto; z-index: 20; }
  .modal { background: var(--surface); width: 100%; max-width: 560px; padding: 32px; display: flex; flex-direction: column; gap: 18px; position: relative; box-shadow: 0 30px 80px -30px rgba(0,0,0,.45); }
  .modal::before { content: ""; position: absolute; left: 32px; right: 32px; top: 0; height: 2px; background: var(--brass); }
  .modal h2 { font-family: var(--serif); font-weight: 400; font-size: 26px; margin: 0; color: var(--ink); }
  .video { background: var(--night); aspect-ratio: 16 / 9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #9FB3AC; font-size: 13px; }
  .video svg { width: 52px; height: 52px; stroke: var(--brass-l); fill: none; stroke-width: 1.2; }
  .q { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 14px; }
  .q p { font-weight: 500; color: var(--ink); }
  .q label { display: flex; gap: 10px; align-items: center; font-size: 14px; padding: 4px 0; cursor: pointer; }
  .q input { accent-color: var(--ink); width: 16px; height: 16px; }
  .q.wrong legend::after { content: " · à revoir"; color: var(--danger); font-weight: 400; font-size: 13px; }

  .toast { position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--night); color: #fff; padding: 14px 20px; font-size: 14px; max-width: calc(100% - 32px); z-index: 30; border-top: 2px solid var(--brass); box-shadow: var(--lift); }
  .demo { border: 1px dashed var(--line-2); padding: 14px 18px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
  .demo b { font-weight: 500; color: var(--ink); margin-right: auto; letter-spacing: .04em; }

  /* Cloche */
  .top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .top .logo { padding-right: 0; }
  .profile .bell { margin-left: auto; }
  .bell.bell-m { display: none; }
  .bell { position: relative; flex-shrink: 0; width: 40px; height: 40px; display: grid; place-items: center; background: transparent; border: 1px solid rgba(255,255,255,.14); color: #DCE5E1; }
  .bell:hover { border-color: var(--brass); color: #FFFFFF; }
  .bell svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.5; }
  .bell i { position: absolute; top: -7px; right: -7px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--brass); color: var(--night); font-style: normal; font-size: 11px; font-weight: 600; display: grid; place-items: center; }
  .bell i:empty { display: none; }

  /* Tiroir de notifications */
  .overlay.right { justify-content: flex-end; align-items: stretch; padding: 0; }
  .drawer { background: var(--surface); width: 100%; max-width: 460px; min-height: 100%; display: flex; flex-direction: column; border-left: 2px solid var(--brass); box-shadow: -30px 0 80px -40px rgba(0,0,0,.5); }
  .drawer-head { padding: 28px 28px 0; display: flex; flex-direction: column; gap: 14px; }
  .drawer-head .row { justify-content: space-between; }
  .drawer-head h2 { font-family: var(--serif); font-weight: 400; font-size: 26px; margin: 0; color: var(--ink); }
  .x { background: none; border: 1px solid var(--line-2); width: 38px; height: 38px; font-size: 18px; line-height: 1; color: var(--ink); }
  .x:hover { border-color: var(--ink); }
  .tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); }
  .tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 0 12px; font-size: 13.5px; color: var(--muted); margin-bottom: -1px; }
  .tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--brass); font-weight: 500; }
  .nlist { list-style: none; margin: 0; padding: 0; }
  .nlist li { display: grid; grid-template-columns: 38px minmax(0,1fr) 8px; gap: 14px; padding: 18px 28px; border-bottom: 1px solid var(--line); }
  .nlist li.unread { background: #FAF8F2; }
  .nicon { width: 38px; height: 38px; border: 1px solid var(--line-2); display: grid; place-items: center; background: #fff; }
  .nicon svg { width: 18px; height: 18px; stroke: var(--ink); fill: none; stroke-width: 1.4; }
  .nicon.bad svg { stroke: var(--danger); }
  .nicon.gold svg { stroke: #8C7445; }
  .nlist b { display: block; font-weight: 500; color: var(--ink); font-size: 14px; }
  .nlist p { font-size: 13.5px; color: var(--text); margin-top: 2px; }
  .nlist time, .nlist .ch { display: block; font-size: 12px; color: var(--faint); margin-top: 6px; }
  .ndot { width: 8px; height: 8px; border-radius: 50%; background: var(--brass); margin-top: 6px; }
  .drawer-body { flex: 1; overflow-y: auto; }
  .drawer-pad { padding: 22px 28px 28px; display: flex; flex-direction: column; gap: 16px; }
  .prefs td, .prefs th { padding: 12px 8px 12px 0; }
  .prefs td.c, .prefs th.c { text-align: center; width: 64px; padding-right: 0; }
  .tick { appearance: none; width: 18px; height: 18px; border: 1px solid var(--line-2); margin: 0; display: inline-grid; place-content: center; background: #fff; cursor: pointer; vertical-align: middle; }
  .tick:checked { background: var(--ink); border-color: var(--ink); }
  .tick:checked::after { content: ""; width: 9px; height: 5px; border-left: 1.5px solid #fff; border-bottom: 1.5px solid #fff; transform: rotate(-45deg) translate(1px,-1px); }
  .tick:disabled { cursor: not-allowed; opacity: .45; }
  .note { border-left: 2px solid var(--brass); padding: 4px 0 4px 14px; font-size: 13px; color: var(--muted); }

  /* Challengeur IA */
  .btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.5; }
  .ai-row { border-top: 1px solid var(--line); padding-top: 18px; }
  .modal.wide { max-width: 680px; }
  .ai { border-top: 1px solid var(--line); padding-top: 18px; display: flex; flex-direction: column; gap: 16px; }
  .ai:empty { display: none; }
  .ai-think { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 14px; flex-wrap: wrap; }
  .pulse { display: inline-flex; gap: 5px; }
  .pulse i { width: 6px; height: 6px; background: var(--brass); transform: rotate(45deg); animation: pl 1.2s infinite ease-in-out; }
  .pulse i:nth-child(2) { animation-delay: .15s; } .pulse i:nth-child(3) { animation-delay: .3s; }
  @keyframes pl { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
  .ai-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
  .ai-sum { font-family: var(--serif); font-size: 17px; line-height: 1.45; color: var(--ink); }
  .smart { list-style: none; margin: 0; padding: 0; }
  .smart li { display: grid; grid-template-columns: 32px minmax(0,1fr) auto; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); align-items: baseline; }
  .smart em { font-style: normal; font-family: var(--display); font-size: 22px; color: var(--brass); line-height: 1; }
  .smart b { display: block; font-weight: 500; color: var(--ink); font-size: 14px; }
  .smart span.n { font-size: 13px; color: var(--muted); }
  .qs { list-style: none; margin: 0; padding: 0; counter-reset: q; }
  .qs li { position: relative; padding: 13px 0 13px 40px; border-top: 1px solid var(--line); font-family: var(--serif); font-size: 17px; line-height: 1.45; color: var(--ink); }
  .qs li::before { counter-increment: q; content: counter(q, upper-roman); position: absolute; left: 0; top: 13px; font-family: var(--display); color: var(--brass); }
  .ai-err { color: var(--danger); font-size: 13.5px; }

  /* Accueil */
  .field input[type="text"] { border: 1px solid var(--line-2); background: #fff; padding: 11px 12px; min-height: 46px; width: 100%; }
  .field input[type="file"] { font-size: 13px; }
  .count-c { font-size: 12px; color: var(--faint); text-align: right; }
  .welcome-video { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); gap: 28px; align-items: center; }
  .step-k { display: flex; align-items: baseline; gap: 14px; }
  .step-k em { font-style: normal; font-family: var(--display); font-size: 30px; color: var(--brass); line-height: 1; }
  .fields-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .pledge { list-style: none; margin: 0; padding: 0; counter-reset: pl; }
  .pledge li { position: relative; padding: 14px 0 14px 44px; border-top: 1px solid var(--line); font-family: var(--serif); font-size: 17px; color: var(--ink); line-height: 1.45; }
  .pledge li::before { counter-increment: pl; content: counter(pl, upper-roman); position: absolute; left: 0; top: 14px; font-family: var(--display); color: var(--brass); }
  .agree { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; cursor: pointer; }
  .agree input { margin-top: 3px; }
  .sig { font-family: var(--serif) !important; font-style: italic; font-size: 20px !important; }

  /* Cohorte */
  .people { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; }
  .person { background: var(--surface); border: 1px solid var(--line); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
  .person.me { border-top: 2px solid var(--brass); box-shadow: var(--lift); }
  .person-h { display: flex; gap: 14px; align-items: center; }
  .person-h .avatar { background: var(--ink); width: 48px; height: 48px; border-radius: 24px; font-size: 17px; }
  .person-h b { display: block; font-family: var(--serif); font-weight: 400; font-size: 18px; color: var(--ink); }
  .person-h span { font-size: 12.5px; color: var(--muted); }
  .person .story { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 14.5px; line-height: 1.55; border-left: 1px solid var(--brass-l); padding-left: 14px; }
  .person-f { margin-top: auto; padding-top: 6px; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }

  /* Distinctions */
  .score { background: var(--ink); color: #E4ECE8; padding: 34px 36px; display: grid; grid-template-columns: auto minmax(0,1fr); gap: 40px; align-items: center; position: relative; box-shadow: var(--lift); }
  .score::after { content: ""; position: absolute; left: 36px; right: 36px; top: 0; height: 2px; background: var(--brass); }
  .score .label { color: var(--brass-l); }
  .score-n { font-family: var(--display); font-size: clamp(56px, 7vw, 84px); line-height: .95; color: #FFFFFF; font-variant-numeric: tabular-nums; }
  .score-n small { display: block; font-family: var(--body); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: #9FB3AC; margin-top: 10px; }
  .score h2 { font-family: var(--serif); font-weight: 400; font-size: 26px; color: #FFFFFF; margin: 8px 0 14px; }
  .score .track { background: rgba(255,255,255,.14); }
  .score .track i { background: var(--brass); }
  .score p.m { font-size: 13.5px; color: #A9BAB4; margin-top: 12px; }
  .circles { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 0; background: var(--surface); border: 1px solid var(--line); }
  .circle { padding: 26px 22px; display: flex; flex-direction: column; gap: 10px; }
  .circle + .circle { border-left: 1px solid var(--line); }
  .circle .rn { font-family: var(--display); font-size: 44px; line-height: 1; color: var(--brass); }
  .circle.todo .rn { color: var(--line-2); }
  .circle h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 19px; color: var(--ink); }
  .circle .th { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
  .circle p.rw { font-size: 14px; color: var(--text); }
  .circle .chip { align-self: flex-start; margin-top: auto; }
  .pts { font-family: var(--display); font-size: 22px; color: var(--sage-d); white-space: nowrap; }
  .medal-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
  .medal-row strong { font-family: var(--display); font-weight: 400; font-size: 44px; color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; }

  @media (max-width: 1080px) {
    .caps { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .journey { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .journey .phase:nth-child(3) { border-left: 0; padding-left: 0; }
    .kpis { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .people { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .circles { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .circle:nth-child(3) { border-left: 0; }
    .circle:nth-child(n+3) { border-top: 1px solid var(--line); }
    .kpis div:nth-child(4) { border-left: 0; }
    .kpis div:nth-child(n+4) { border-top: 1px solid var(--line); }
  }
  @media (max-width: 900px) {
    .shell { grid-template-columns: minmax(0, 1fr); }
    .side { position: static; height: auto; padding: 16px; gap: 14px; }
    .profile, .nav-label, .proto { display: none; }
    .bell.bell-m { display: grid; }
    .nav { flex-direction: row; overflow-x: auto; gap: 4px; margin: 0 -16px; padding: 0 16px; }
    .nav button { border-left: 0; border-bottom: 2px solid transparent; white-space: nowrap; padding: 10px 12px; }
    .nav button[aria-current="page"] { border-bottom-color: var(--brass); }
    .side-foot { margin-top: 0; }
    .grid-2, .steps2, .welcome-video, .fields-2 { grid-template-columns: 1fr; }
    .score { grid-template-columns: 1fr; gap: 18px; padding: 28px 22px; }
    .score::after { left: 22px; right: 22px; }
    .hero { grid-template-columns: 1fr; padding: 28px 22px 24px; }
    .hero::after { left: 22px; right: 22px; }
  }
  @media (max-width: 560px) {
    .caps, .journey, .people, .circles { grid-template-columns: 1fr; }
    .circle + .circle { border-left: 0; border-top: 1px solid var(--line); }
    .journey .phase + .phase { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
    .kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .kpis div:nth-child(odd) { border-left: 0; }
    .kpis div:nth-child(4) { border-left: 1px solid var(--line); }
    .kpis div:nth-child(n+3) { border-top: 1px solid var(--line); }
    .panel { padding: 22px 18px; }
    .figures strong { font-size: 28px; }
    .figures div + div { padding-left: 12px; }
    .days { grid-template-columns: repeat(6, minmax(0,1fr)); }
    .ledger li { grid-template-columns: 44px minmax(0,1fr); }
    .ledger li > :last-child { grid-column: 2; }
    .modal { padding: 26px 20px; }
  }
  @media (max-width: 560px) {
    .nlist li { padding: 16px 18px; }
    .drawer-head { padding: 22px 18px 0; }
    .drawer-pad { padding: 20px 18px 24px; }
    .prefs td.c, .prefs th.c { width: 52px; }
  }
  @media (prefers-reduced-motion: reduce) { * { transition: none !important; } .pulse i { animation: none; opacity: .7; } }

/* ---------- Ajouts de l'application ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; background: var(--night); }
.login-card { background: var(--surface); width: 100%; max-width: 440px; padding: 40px 36px 32px; display: flex; flex-direction: column; gap: 18px; position: relative; box-shadow: 0 30px 80px -30px rgba(0,0,0,.5); }
.login-card::before { content: ""; position: absolute; left: 36px; right: 36px; top: 0; height: 2px; background: var(--brass); }
.login-card .brand { display: flex; align-items: center; gap: 12px; }
.login-card .brand img { width: 48px; height: 48px; border-radius: 24px; }
.login-card .brand b { display: block; font-family: var(--display); font-weight: 400; font-size: 22px; color: var(--ink); line-height: 1.1; }
.login-card .brand span { font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--brass); }
.login-card h1 { font-family: var(--display); font-weight: 400; font-size: 32px; margin: 8px 0 0; color: var(--ink); }
.field input[type="email"], .field input[type="text"], .field input[inputmode="numeric"] { border: 1px solid var(--line-2); background: #fff; padding: 11px 12px; min-height: 46px; width: 100%; }
.err { color: var(--danger); font-size: 13.5px; }
.empty { border: 1px dashed var(--line-2); padding: 22px; color: var(--muted); font-size: 14px; }
.video iframe { width: 100%; height: 100%; border: 0; }
.video.has { padding: 0; }
.logout { background: transparent; border: 1px solid rgba(255,255,255,.14); color: #AFC0BA; padding: 9px 8px; font-size: 12.5px; }
.logout:hover { color: #fff; border-color: var(--brass); }
.act-row { display: flex; gap: 10px; }
.act-row input { flex: 1; border: 1px solid var(--line-2); padding: 10px 12px; min-height: 44px; }
.checks li { display: flex; align-items: flex-start; gap: 8px; }
.checks li label { flex: 1; }
.del { background: none; border: 0; color: var(--faint); font-size: 18px; line-height: 1; padding: 14px 4px; }
.del:hover { color: var(--danger); }
.loading { padding: 80px 0; text-align: center; color: var(--muted); }
.detail dl { display: grid; grid-template-columns: 140px minmax(0,1fr); gap: 10px 16px; margin: 0; font-size: 14px; }
.detail dt { color: var(--muted); }
.detail dd { margin: 0; white-space: pre-wrap; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--sage-d); text-decoration: underline; font-size: 12.5px; }
@media (max-width: 560px) { .detail dl { grid-template-columns: 1fr; gap: 2px; } .detail dd { margin-bottom: 10px; } .login-card { padding: 34px 22px 26px; } }
