/* Hub François Xavier
   Blanc dominant, noir en ponctuation, orange #ff3f00 pour ce qui demande une action. */
@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/bricolage-grotesque.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }
:root {
  --black: #000000;
  --ink: #1a1a1d;
  --ink-2: #44444c;
  --muted: #6b6b75;
  --line: #e5e5ea;
  --line-2: #d6d6dd;
  --canvas: #f4f4f6;
  --paper: #ffffff;
  --orange: #ff3f00;
  --orange-press: #e03700;
  --orange-soft: #fff1eb;
  --orange-line: #ffd2c2;
  --ok: #1b7f52;
  --ok-soft: #e7f6ee;
  --alert: #c22d0c;
  --alert-soft: #fdeceb;
  --warn: #8a5a00;
  --warn-soft: #fff6e0;
  --r-xl: 24px;
  --r-lg: 18px;
  --r-md: 12px;
  --r-sm: 9px;
  --head: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow: 0 1px 2px rgba(20, 20, 30, .04), 0 8px 24px -12px rgba(20, 20, 30, .10);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); font-size: 15.5px; line-height: 1.55; color: var(--ink); background: var(--canvas); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--head); line-height: 1.15; margin: 0; font-weight: 650; letter-spacing: -.015em; }
h1 { font-size: 30px; }
h2 { font-size: 18px; }
h3 { font-size: 15.5px; }
p { margin: 0 0 10px; }
small { color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.block { display: block; }
.mt { margin-top: 24px; }
.ico { width: 19px; height: 19px; flex: none; }
:focus-visible { outline: 2.5px solid var(--orange); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--black); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Marque ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--head); font-weight: 650; font-size: 16px; letter-spacing: -.01em; }
.mark { position: relative; width: 34px; height: 34px; border-radius: 11px; background: var(--black); color: #fff; display: inline-grid; place-items: center; font-family: var(--head); font-weight: 750; font-size: 13px; letter-spacing: .02em; flex: none; }
.mark i { position: absolute; right: 5px; bottom: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }

/* ---------- Menu latéral ---------- */
.sidebar { position: fixed; inset: 0 auto 0 0; width: 258px; background: var(--paper); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 22px 14px 18px; z-index: 30; }
.brand-side { padding: 2px 10px 26px; }
.sidebar nav { display: flex; flex-direction: column; gap: 3px; flex: 1; overflow-y: auto; }
.sidebar nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); text-decoration: none; color: var(--ink-2); font-weight: 550; transition: background .15s, color .15s; }
.sidebar nav a .ico { color: var(--muted); }
.sidebar nav a:hover { background: var(--canvas); color: var(--ink); }
.sidebar nav a.active { background: var(--black); color: #fff; }
.sidebar nav a.active .ico { color: var(--orange); }
.badge { margin-left: auto; background: var(--orange); color: #fff; font-size: 11.5px; font-weight: 700; min-width: 21px; height: 21px; border-radius: 11px; display: inline-grid; place-items: center; padding: 0 6px; font-style: normal; }
.side-foot { border-top: 1px solid var(--line); padding-top: 14px; }
.who { display: flex; gap: 10px; align-items: center; padding: 0 8px 8px; min-width: 0; }
.who > span:last-child { min-width: 0; }
.who strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who small { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-out { background: none; border: 0; color: var(--muted); font: inherit; font-size: 13.5px; display: flex; align-items: center; gap: 8px; padding: 8px; cursor: pointer; border-radius: 8px; width: 100%; }
.link-out:hover { color: var(--ink); background: var(--canvas); }
.topbar, .scrim, .tabbar { display: none; }
.main { margin-left: 258px; padding: 40px 48px 90px; max-width: 1260px; }

.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--orange); color: #fff; display: inline-grid; place-items: center; font-size: 12.5px; font-weight: 700; flex: none; }
.avatar.lg { width: 48px; height: 48px; font-size: 16px; background: var(--black); font-family: var(--head); }
.avatar.xl { width: 56px; height: 56px; font-size: 18px; font-family: var(--head); }

/* ---------- En-têtes ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head .sub { margin: 6px 0 0; color: var(--muted); max-width: 62ch; }
.head-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ph-client { display: flex; gap: 16px; align-items: center; }
.ph-client .sub span { display: inline-block; margin-right: 14px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-size: 14px; margin-bottom: 16px; font-weight: 550; }
.back:hover { color: var(--ink); }
.hello { margin-bottom: 24px; }
.hello h1 { font-size: 44px; font-weight: 750; letter-spacing: -.03em; }
.hello p { color: var(--muted); font-size: 16.5px; margin-top: 6px; }

/* ---------- Surfaces ---------- */
.card, .panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px 26px; margin-bottom: 18px; box-shadow: var(--shadow); }
.card > h2, .panel > h2 { margin-bottom: 14px; }
.card-head, .panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.card-head h2, .panel-head h2 { margin: 0; }
.card-head p { margin: 5px 0 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: end; }
.grid4 { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 14px; }
.grid2.top { align-items: start; gap: 18px; }
.grid2.top > .card { margin-bottom: 0; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.grid-main > .card { margin-bottom: 0; }
.collapsible { display: none; }
.collapsible.open { display: block; animation: open .22s ease-out; }
@keyframes open { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- Formulaires ---------- */
.stack { display: flex; flex-direction: column; gap: 15px; }
label { display: flex; flex-direction: column; gap: 7px; font-weight: 600; font-size: 14.5px; }
label small { font-weight: 400; font-size: 13px; }
input, select, textarea { font: inherit; font-size: 15.5px; color: var(--ink); background: var(--paper); border: 1.5px solid var(--line-2); border-radius: var(--r-md); padding: 11px 13px; width: 100%; transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: #a3a3ad; }
input:hover, select:hover, textarea:hover { border-color: #babac4; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(255, 63, 0, .13); }
input:disabled { background: var(--canvas); color: var(--muted); }
input[type=checkbox] { width: 19px; height: 19px; accent-color: var(--orange); margin: 0; }
input[type=file] { padding: 9px; }
label.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 500; }
fieldset { border: 1.5px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px 20px; margin: 0; display: flex; flex-direction: column; gap: 15px; }
legend { font-family: var(--head); font-weight: 650; font-size: 16px; padding: 0 8px; }
.hint { margin: 0; color: var(--muted); font-size: 14px; }
.filters { display: flex; gap: 10px; margin-bottom: 20px; }
.filters input { max-width: 340px; }
.filters select { width: auto; }
.add-inline { display: flex; gap: 10px; margin-top: 14px; }
.add-inline input { flex: 1; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 650; font-size: 15px; border-radius: 999px; padding: 11px 20px; border: 1.5px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, transform .1s; }
.btn:active { transform: scale(.98); }
.btn .ico { width: 17px; height: 17px; }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-press); }
.btn-ghost { background: var(--paper); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-danger { background: var(--alert); color: #fff; }
.btn-danger-ghost { background: none; color: var(--alert); }
.btn-danger-ghost:hover { background: var(--alert-soft); }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .35; cursor: default; }
.link { background: none; border: 0; padding: 0; color: var(--orange-press); font: inherit; font-size: 14px; font-weight: 650; cursor: pointer; text-decoration: none; }
.link:hover { text-decoration: underline; }
.icon-btn { background: none; border: 0; color: var(--muted); padding: 7px; border-radius: 8px; cursor: pointer; display: inline-grid; place-items: center; }
.icon-btn:hover { color: var(--alert); background: var(--alert-soft); }
.row-actions { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.inline-form > summary { list-style: none; }
.inline-form > summary::-webkit-details-marker { display: none; }
.inline-form[open] > summary { margin-bottom: 12px; }
.inline-form .stack { min-width: min(420px, 100%); }
details > summary.link { list-style: none; margin-top: 16px; display: inline-block; }
details[open] > summary.link { margin-bottom: 12px; }

/* ---------- Messages ---------- */
.flash { border-radius: var(--r-md); padding: 13px 16px; margin-bottom: 18px; font-size: 14.5px; font-weight: 500; }
.flash-ok { background: var(--black); color: #fff; }
.flash-ok::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); margin-right: 10px; vertical-align: 1px; }
.flash-error { background: var(--alert-soft); color: var(--alert); }
.flash-warn { background: var(--warn-soft); color: var(--warn); }
.pill { display: inline-flex; align-items: center; font-size: 12.5px; font-weight: 650; padding: 4px 11px; border-radius: 999px; white-space: nowrap; }
.pill::first-letter { text-transform: uppercase; }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-warm { background: var(--orange-soft); color: var(--orange-press); }
.pill-alert { background: var(--alert-soft); color: var(--alert); }
.pill-muted { background: var(--canvas); color: var(--muted); }
.empty { text-align: center; padding: 60px 24px; color: var(--muted); background: var(--paper); border: 1.5px dashed var(--line-2); border-radius: var(--r-lg); margin-bottom: 18px; }
.empty .ico { width: 30px; height: 30px; color: var(--orange); margin-bottom: 12px; }
.empty strong { display: block; color: var(--ink); font-family: var(--head); font-size: 18px; font-weight: 650; margin-bottom: 6px; }
.empty p { margin: 0 auto; max-width: 44ch; }

/* ---------- Chiffres ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; text-decoration: none; display: block; box-shadow: var(--shadow); }
a.stat:hover { border-color: var(--ink); }
.stat small { display: block; font-size: 13.5px; }
.stat strong { display: block; font-family: var(--head); font-size: 28px; font-weight: 700; margin-top: 6px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-accent { background: var(--black); border-color: var(--black); color: #fff; }
.stat-accent small { color: #a7a7b0; }

/* ---------- Accueil client ---------- */
.journey { background: var(--black); color: #fff; border-radius: var(--r-xl); padding: 28px 30px 26px; margin-bottom: 16px; overflow: hidden; }
.journey-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.journey h2 { font-size: 22px; }
.journey-head p { color: #a7a7b0; margin: 6px 0 0; }
.journey-pct { font-family: var(--head); font-size: 54px; font-weight: 750; line-height: .9; letter-spacing: -.04em; color: #fff; }
.journey-pct small { font-size: 22px; color: var(--orange); margin-left: 2px; }
.track { list-style: none; margin: 30px 0 6px; padding: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); }
.track li { position: relative; display: flex; flex-direction: column; gap: 10px; padding-right: 10px; min-width: 0; }
.track li::before { content: ""; position: absolute; top: 12px; left: 26px; right: 0; height: 2px; background: #33333a; }
.track li:last-child::before { display: none; }
.track li.t-done::before { background: var(--orange); }
.t-dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #4a4a52; background: var(--black); display: grid; place-items: center; position: relative; z-index: 1; }
.t-dot .ico { width: 14px; height: 14px; color: #fff; }
.t-done .t-dot { background: var(--orange); border-color: var(--orange); }
.t-now .t-dot { border-color: var(--orange); box-shadow: 0 0 0 5px rgba(255, 63, 0, .25); }
.t-now .t-dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.t-label { font-size: 13.5px; color: #8e8e98; line-height: 1.35; }
.t-done .t-label { color: #d8d8de; }
.t-now .t-label { color: #fff; font-weight: 650; }
.track em { white-space: nowrap; font-style: normal; font-size: 12px; font-weight: 700; color: var(--black); background: var(--orange); border-radius: 999px; padding: 3px 9px; align-self: flex-start; }
.journey-link { display: inline-block; margin-top: 18px; color: #fff; font-weight: 600; font-size: 14.5px; text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 4px; text-decoration-thickness: 2px; }

.next-step { display: flex; align-items: center; gap: 18px; background: var(--paper); border: 1.5px solid var(--orange-line); border-radius: var(--r-lg); padding: 18px 22px; margin-bottom: 18px; text-decoration: none; box-shadow: var(--shadow); }
a.next-step:hover { border-color: var(--orange); }
.next-step.calm { border-color: var(--line); }
.ns-ico { width: 46px; height: 46px; border-radius: 14px; background: var(--orange-soft); color: var(--orange); display: grid; place-items: center; flex: none; }
.calm .ns-ico { background: var(--ok-soft); color: var(--ok); }
.ns-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ns-text small { font-weight: 650; color: var(--orange-press); font-size: 13px; }
.ns-text strong { font-family: var(--head); font-size: 18px; font-weight: 650; }
.ns-text span { color: var(--muted); font-size: 14.5px; }

.shortcuts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.shortcuts a { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; text-decoration: none; display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; box-shadow: var(--shadow); transition: border-color .15s; }
.shortcuts a:hover { border-color: var(--ink); }
.shortcuts .ico { grid-row: span 2; width: 22px; height: 22px; color: var(--orange); }
.shortcuts strong { font-weight: 650; }
.shortcuts span { color: var(--muted); font-size: 13.5px; }
.home-bottom { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.home-bottom > .panel { margin: 0; }
.contact { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.contact h2 { margin-top: 10px; }
.contact p { color: var(--muted); }
.contact-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Clients ---------- */
.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 16px; }
.client-card { text-decoration: none; display: flex; flex-direction: column; gap: 14px; margin: 0; transition: border-color .15s; }
.client-card:hover { border-color: var(--ink); }
.cc-top { display: flex; gap: 12px; align-items: center; min-width: 0; }
.cc-top > div { min-width: 0; }
.cc-top strong { display: block; font-family: var(--head); font-size: 17px; font-weight: 650; }
.cc-top small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-offer { color: var(--ink-2); font-size: 14.5px; margin: 0; }
.cc-stats { margin: 0; display: grid; gap: 9px; border-top: 1px solid var(--line); padding-top: 14px; }
.cc-stats div { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.cc-stats dt { color: var(--muted); font-size: 13.5px; }
.cc-stats dd { margin: 0; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.cc-foot { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; margin-top: auto; }
.cc-foot .ico { color: var(--orange); }
.mini-bar { width: 70px; height: 6px; background: var(--canvas); border-radius: 3px; overflow: hidden; display: inline-block; }
.mini-bar i { display: block; height: 100%; background: var(--orange); }

.tabs { display: flex; gap: 6px; margin-bottom: 24px; overflow-x: auto; padding: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; width: max-content; max-width: 100%; }
.tabs a { padding: 9px 16px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14.5px; border-radius: 999px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); background: var(--canvas); }
.tabs a.active { color: #fff; background: var(--black); }

/* ---------- Réponses et fichiers ---------- */
.answers { display: flex; flex-direction: column; gap: 18px; margin: 8px 0 20px; }
.answer { border-left: 3px solid var(--orange-line); padding-left: 14px; }
.answer h3 { font-family: var(--body); font-size: 14px; color: var(--muted); font-weight: 600; margin-bottom: 4px; letter-spacing: 0; }
.answer p { margin: 0; font-size: 15.5px; }
.files { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 6px; }
.files li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--canvas); border-radius: var(--r-md); }
.files li .ico { color: var(--orange); }
.files li a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; font-weight: 600; }
.files li a:hover { text-decoration: underline; }
.files li small { white-space: nowrap; font-size: 12.5px; }
.drop { position: relative; border: 2px dashed var(--line-2); border-radius: var(--r-lg); padding: 20px; flex-direction: row; align-items: center; gap: 16px; cursor: pointer; background: var(--paper); transition: border-color .15s, background .15s; }
.drop:hover, .drop.drag { border-color: var(--orange); background: var(--orange-soft); }
.drop:focus-within { border-color: var(--orange); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop .ico { width: 44px; height: 44px; padding: 11px; border-radius: 50%; background: var(--orange-soft); color: var(--orange); }
.drop span { display: flex; flex-direction: column; }
.drop small { font-weight: 400; }

/* ---------- Projet ---------- */
.progress { height: 8px; background: var(--canvas); border-radius: 4px; overflow: hidden; margin: 8px 0; }
.progress.lg { height: 10px; }
.progress i { display: block; height: 100%; background: var(--orange); border-radius: 4px; transition: width .5s ease-out; }
.steps-admin, .q-list { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-direction: column; gap: 7px; }
.steps-admin > li, .q-list > li { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper); transition: border-color .15s; }
.steps-admin > li:hover, .q-list > li:hover { border-color: var(--line-2); }
.steps-admin summary, .q-list summary { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none; }
.steps-admin summary::-webkit-details-marker, .q-list summary::-webkit-details-marker { display: none; }
.steps-admin details[open], .q-list details[open] { padding-bottom: 16px; }
.steps-admin details > *:not(summary), .q-list details > *:not(summary) { margin-left: 14px; margin-right: 14px; }
.st-title { flex: 1; font-weight: 600; min-width: 0; }
.num { width: 26px; height: 26px; border-radius: 50%; background: var(--canvas); color: var(--ink-2); display: inline-grid; place-items: center; font-size: 12.5px; font-weight: 700; flex: none; }
.st-ok .num { background: var(--ok-soft); color: var(--ok); }
.st-warm .num { background: var(--orange); color: #fff; }
.st-alert .num { background: var(--alert); color: #fff; }
.q-list li.inactive { opacity: .55; }

.timeline { list-style: none; padding: 0; margin: 24px 0 0; }
.timeline li { display: flex; gap: 16px; position: relative; padding-bottom: 24px; }
.timeline li:not(:last-child)::before { content: ""; position: absolute; left: 12px; top: 28px; bottom: 2px; width: 2px; background: var(--line); }
.timeline li.tl-ok:not(:last-child)::before { background: var(--orange); }
.tl-dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--paper); flex: none; display: grid; place-items: center; margin-top: 1px; z-index: 1; }
.tl-dot .ico { width: 14px; height: 14px; color: #fff; }
.tl-ok .tl-dot { background: var(--orange); border-color: var(--orange); }
.tl-warm .tl-dot { border-color: var(--orange); box-shadow: 0 0 0 5px var(--orange-soft); }
.tl-alert .tl-dot { border-color: var(--alert); }
.tl-body { flex: 1; min-width: 0; }
.tl-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 4px; }
.tl-head strong { font-weight: 650; }
.tl-body p { color: var(--ink-2); font-size: 15px; }
.tl-focus .tl-body { background: var(--orange-soft); border-radius: var(--r-md); padding: 14px 16px; margin-top: -12px; }
.tl-body .row-actions { margin-top: 12px; }

/* ---------- Paiements ---------- */
.pay-list { display: flex; flex-direction: column; gap: 7px; }
.pay-row { border: 1px solid var(--line); border-radius: var(--r-md); }
.pay-row summary { display: flex; align-items: center; gap: 14px; padding: 13px 14px; cursor: pointer; list-style: none; }
.pay-row summary::-webkit-details-marker { display: none; }
.pay-row[open] { padding-bottom: 16px; }
.pay-row > form { margin: 0 14px; }
.pay-label { flex: 1; min-width: 0; }
.pay-label strong, .pay-label small { display: block; }
.pay-num { font-variant-numeric: tabular-nums; font-size: 14.5px; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-size: 13.5px; color: var(--muted); font-weight: 600; padding: 0 12px 12px; border-bottom: 1.5px solid var(--line); }
.table td { padding: 15px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; width: auto; height: auto; background: none; border-radius: 0; display: table-cell; font-size: inherit; font-weight: inherit; color: inherit; }
.pay-cards { display: none; }

/* ---------- Ressources ---------- */
.res-type { font-size: 12.5px; font-weight: 650; color: var(--orange-press); background: var(--orange-soft); padding: 3px 10px; border-radius: 999px; flex: none; }
.res-type::first-letter { text-transform: uppercase; }
.res-toggle { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 7px; }
.res-toggle li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); }
.res-title { flex: 1; min-width: 0; }
.res-title strong, .res-title small { display: block; }
.switch { width: 48px; height: 28px; border-radius: 14px; background: var(--line-2); border: 0; position: relative; cursor: pointer; transition: background .2s; flex: none; }
.switch i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.switch.on { background: var(--orange); }
.switch.on i { left: 23px; }
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.res-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; margin: 0; }
.video { aspect-ratio: 16 / 9; background: var(--black); }
.video iframe, .video video { width: 100%; height: 100%; border: 0; display: block; }
.res-cover { aspect-ratio: 16 / 9; background: var(--black); display: grid; place-items: center; }
.res-cover .ico { width: 42px; height: 42px; color: var(--orange); }
.res-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 9px; align-items: flex-start; }
.res-body h2 { font-size: 18px; }
.res-body p { color: var(--ink-2); font-size: 15px; margin: 0; }

/* ---------- Démarrage côté client ---------- */
.note-from { display: flex; gap: 14px; align-items: flex-start; background: var(--black); color: #fff; border-radius: var(--r-lg); padding: 20px 22px; margin-bottom: 18px; }
.note-from p { margin: 0; color: #ececf0; font-size: 16px; }
.onboarding-form { gap: 30px; }
.q { gap: 8px; }
.q-label { display: flex; gap: 12px; align-items: center; font-family: var(--head); font-size: 18px; font-weight: 650; }
.q-label em { font-family: var(--body); font-style: normal; font-weight: 400; color: var(--muted); font-size: 14px; }
.q-label .num { background: var(--black); color: #fff; font-family: var(--body); }
.q > small { margin-left: 38px; margin-top: -4px; font-size: 14px; }
.q input, .q textarea, .q .drop, .q .files { margin-left: 38px; width: calc(100% - 38px); }
div.q { display: flex; flex-direction: column; }
.sticky-actions { position: sticky; bottom: 0; background: var(--paper); padding: 14px 0 4px; border-top: 1px solid var(--line); z-index: 2; }

/* ---------- Listes ---------- */
.todo, .feed { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.todo li { display: flex; gap: 12px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); }
.todo li:last-child, .feed li:last-child { border-bottom: 0; }
.todo a { flex: 1; text-decoration: none; }
.todo a:hover { text-decoration: underline; }
.todo small { white-space: nowrap; font-size: 13px; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; transform: translateY(-1px); }
.dot-warm { background: var(--orange); }
.dot-alert { background: var(--alert); }
.feed li { display: flex; flex-direction: column; gap: 3px; padding: 12px 0 12px 18px; border-bottom: 1px solid var(--line); position: relative; }
.feed li::before { content: ""; position: absolute; left: 0; top: 19px; width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.feed li.unseen::before { background: var(--orange); }
.feed a { text-decoration: none; font-size: 15px; display: flex; flex-direction: column; }
.feed a span { color: var(--ink-2); }
.feed a:hover strong { text-decoration: underline; }
.feed small { font-size: 12.5px; }
.danger-title { color: var(--alert); margin-bottom: 8px; }

/* ---------- Connexion ---------- */
.auth-main { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); background: var(--paper); }
.auth-side { background: var(--black); color: #fff; padding: 44px 52px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side .mark { background: #fff; color: var(--black); }
.auth-line { font-family: var(--head); font-size: clamp(34px, 4vw, 56px); font-weight: 700; line-height: 1.04; letter-spacing: -.035em; max-width: 13ch; margin: 0; }
.auth-sign { color: #8e8e98; margin: 0; font-size: 14px; }
.auth-pane { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 24px; }
.auth-pane > .flash { width: 100%; max-width: 420px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-wide { max-width: 640px; }
.auth-brand { display: none; }
.auth-card h1 { font-size: 34px; font-weight: 700; letter-spacing: -.03em; }
.auth-card .sub { color: var(--muted); margin: 10px 0 26px; font-size: 16px; }
.auth-foot { text-align: center; margin: 20px 0 0; font-size: 14.5px; }
.auth-foot a { color: var(--muted); }

/* ---------- Écrans moyens ---------- */
@media (max-width: 1150px) {
  .shortcuts { grid-template-columns: repeat(2, 1fr); }
  .grid-main, .home-bottom { grid-template-columns: 1fr; }
  .main { padding: 34px 32px 90px; }
}

/* ---------- Téléphone ---------- */
@media (max-width: 860px) {
  body { font-size: 15.5px; }
  .topbar { display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); padding: 10px 16px; }
  .topbar .brand span:last-child { font-size: 15px; }
  .topbar .mark { width: 30px; height: 30px; font-size: 12px; border-radius: 9px; }
  .menu-btn { background: none; border: 0; color: var(--ink); padding: 6px; cursor: pointer; display: grid; border-radius: 10px; }
  .menu-btn .ico { width: 24px; height: 24px; }
  .sidebar { transform: translateX(-100%); transition: transform .25s ease-out; box-shadow: 0 0 40px rgba(0, 0, 0, .15); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 25; }
  .main { margin-left: 0; padding: 22px 16px 70px; }
  .role-client .main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 22; background: var(--black); border-radius: 22px; padding: 7px; box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .45); }
  .tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 2px 6px; border-radius: 15px; color: #9a9aa4; text-decoration: none; font-size: 11.5px; font-weight: 600; }
  .tabbar a .ico { width: 21px; height: 21px; }
  .tabbar a.active { color: #fff; background: #1f1f24; }
  .tabbar a.active .ico { color: var(--orange); }
  .tabbar .badge { position: absolute; top: 2px; right: calc(50% - 22px); min-width: 17px; height: 17px; font-size: 10px; padding: 0 4px; }
  h1 { font-size: 26px; }
  .hello h1 { font-size: 34px; }
  .grid2, .grid3, .grid4 { grid-template-columns: 1fr; }
  .card, .panel { padding: 20px 18px; border-radius: var(--r-lg); }
  .page-head { align-items: flex-start; margin-bottom: 20px; }
  .filters { flex-direction: column; }
  .filters input { max-width: none; }
  .pay-row summary { flex-wrap: wrap; }
  .q input, .q textarea, .q .drop, .q .files { margin-left: 0; width: 100%; }
  .q > small { margin-left: 0; }
  .journey { padding: 22px 20px; border-radius: var(--r-lg); }
  .journey-pct { font-size: 42px; }
  .track { grid-template-columns: 1fr; margin-top: 22px; gap: 0; }
  .track li { flex-direction: row; align-items: center; gap: 12px; padding: 0 0 14px; }
  .track li::before { left: 12px; top: 26px; bottom: 0; right: auto; width: 2px; height: auto; }
  .track li:not(.t-now) .t-label { font-size: 14px; }
  .next-step { flex-wrap: wrap; padding: 18px; }
  .next-step .btn { width: 100%; }
  .tabs { width: 100%; border-radius: var(--r-md); }
  .tabs a { border-radius: var(--r-sm); }
  .auth-main { grid-template-columns: 1fr; }
  .auth-side { padding: 22px 20px 30px; gap: 26px; }
  .auth-line { font-size: 30px; }
  .auth-sign { display: none; }
  .auth-pane { justify-content: flex-start; padding: 30px 20px 40px; }
  .ph-client .sub span { display: block; }
}
@media (max-width: 560px) {
  .shortcuts { grid-template-columns: 1fr 1fr; gap: 10px; }
  .shortcuts a { grid-template-columns: 1fr; row-gap: 6px; padding: 14px; }
  .shortcuts .ico { grid-row: auto; }
  .client-grid, .res-grid { grid-template-columns: 1fr; }
  .tl-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .add-inline { flex-direction: column; }
  .files li small { display: none; }
  .table-wrap.cardify .table { display: none; }
  .table-wrap.cardify .pay-cards { display: flex; flex-direction: column; gap: 10px; }
}
.pay-card { border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; }
.pay-card strong { font-weight: 650; }
.pay-card .amt { font-family: var(--head); font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pay-card small { grid-column: 1 / -1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Paiements côté client ---------- */
.pay-client { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.pay-item { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin: 0; }
.pay-item.is-paid { box-shadow: none; background: var(--canvas); }
.pi-main { min-width: 0; }
.pi-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.pi-amount { font-family: var(--head); font-size: 30px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 4px; font-variant-numeric: tabular-nums; }
.pi-amount small { font-family: var(--body); font-size: 14px; font-weight: 500; margin-left: 8px; letter-spacing: 0; }
.is-paid .pi-amount { color: var(--muted); }
.pi-note { background: var(--canvas); border-radius: var(--r-sm); padding: 8px 12px; font-size: 14.5px; margin: 8px 0 0; }
.pi-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; flex: none; max-width: 340px; }
.pi-actions .inline-form .stack { min-width: min(300px, 100%); }
@media (max-width: 860px) {
  .pay-item { flex-direction: column; align-items: stretch; }
  .pi-actions { align-items: stretch; max-width: none; }
  .pi-actions .btn { width: 100%; }
  .pi-amount { font-size: 26px; }
}
